[#39222] [Bug #2036] AIX 5L 5.2にて、ruby-1.8.7-p174のビルド時にmake testをするとエラーになった。not ok float 7 -- ./sample/test.rb:1232 — 和弥 寺元 <redmine@...>
Bug #2036: AIX 5L 5.2にて、ruby-1.8.7-p174のビルド時にmake testをするとエラーになった。not ok float 7 -- ./sample/test.rb:1232
チケット #2036 が更新されました。 (by 和弥 寺元)
[#39248] pdeque - Double-Ended Priority Queue — Tanaka Akira <akr@...>
優先順位つきキューとして、このメールにつけてある pdeque.rb
[#39249] [Bug #2060] DLをCからRubyに変換する事を勧めます — Aaron Patterson <redmine@...>
Bug #2060: DLをCからRubyに変換する事を勧めます
なかだです。
2009/9/7 Nobuyoshi Nakada <nobu@ruby-lang.org>:
[#39277] Why doesn't Array#product return Enumerator? — Yusuke ENDOH <mame@...>
遠藤です。
まつもと ゆきひろです
遠藤です。
まつもと ゆきひろです
[#39282] [Bug #2067] bodyが大きいエラーページをopen-uriで取得するとfdがリークしている — takeru sasaki <redmine@...>
チケット #2067 が更新されました。 (by takeru sasaki)
まつもと ゆきひろです
なかだです。
まつもと ゆきひろです
In article <E1MliJq-0000yc-4o@x61.netlab.jp>,
言いだしっぺの佐々木です。
まつもと ゆきひろです
佐々木です。
In article <c507366f0909102211s5ae74f72r82afabdf57ae89@mail.gmail.com>,
[#39301] [Feature #2080] Proc#to_source, Method#to_source — Yuki Sonoda <redmine@...>
Feature #2080: Proc#to_source, Method#to_source
[#39322] [Feature #2093] String#stripの対象は\sか[:space:]か — Yui NARUSE <redmine@...>
Feature #2093: String#stripの対象は\sか[:space:]か
[#39325] makeターゲットrdevを抽象化 — "KISHIMOTO, Makoto" <ksmakoto@...4u.or.jp>
きしもとです
なかだです。
[#39352] [ruby19] Thread 切替えが異常に遅い? — Hidetoshi NAGAI <nagai@...>
永井@知能.九工大です.
なかだです。
永井@知能.九工大です.
ささだです.
永井@知能.九工大です.
なかだです。
[#39361] [Bug:1.9] ("00".."00").to_a => ["0"] — Nobuhiro IMAI <nov@...>
いまいです。
[#39367] Almost endless loop of BigMath::atan(x) when x.abs >= 1 — "Masahiro Kanai (CanI)" <cani.m.61st@...>
金井 仁弘と申します。
豊福です。遅い反応ですが。
豊福です。
金井です。
豊福です。
豊福です。
豊福です。
金井です。
[#39372] [Proposal] メンテナ確認大会のお知らせ — Yugui <yugui@...>
Yuguiです。
WXVndWkbJEIkNSRzJWEhPCVrJCIkaiQsJEgkJiQ0JDYkJCReJDckPyEjJDMkQSRpJEtKVj8uJDck
[#39385] Removing constant-able macros inside of the loop. — "Masahiro Kanai (CanI)" <cani.m.61st@...>
金井 仁弘と申します。
[#39388] Re: [ruby-cvs:32331] Ruby:r25113 (trunk): String#inspect's encoding should be fixed. — "Martin J. Dürst" <duerst@...>
成瀬さん、こんにちは。
こんにちは、なかむら(う)です。
成瀬です。
中村さん、成瀬さん、こんにちは。
MjAwOeW5tDnmnIgyOeaXpTEyOjMxICJNYXJ0aW4gSi4gRMO8cnN0IiA8ZHVlcnN0QGl0LmFveWFt
[#39404] [ANN] Ruby Developer's Meeting 20091013 — Yugui <yugui@...>
Yuguiです。
[ruby-dev:39308] Re: [Bug #2067] bodyが大きいエラーページをopen-uriで取得するとfdがリークしている
佐々木です。
ありがとうございます。
下記スクリプトを実行すると1.8(ちょっと古いのですが)では251回目で
Errno::EMFILEとなってしまいました。
例外オブジェクトが持つioがcloseされないようです。
しかし、1.9では2000回まで行きました。
======================
require "pp"
require "open-uri"
p [RUBY_VERSION,RUBY_PATCHLEVEL,RUBY_RELEASE_DATE,RUBY_PLATFORM]
pid = Process.pid
puts "pid=#{pid}"
url = "http://ssktkr.com/asdf"
puts "before -----------------------------"
puts `lsof -p #{pid}`
2000.times do |n|
puts "n=#{n}"
begin
open(url) do |f|
p f
end
rescue OpenURI::HTTPError => e
p e
pp e.backtrace
#e.io.close
end
end
GC.start
puts "after -----------------------------"
puts `lsof -p #{pid}`
======================
ruby open_uri_bug.rb
["1.8.6", 114, "2008-03-03", "i686-darwin8.11.1"]
pid=29011
before -----------------------------
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ruby 29011 takeru cwd DIR 14,2 4998 1356361 /Users/takeru/tmp
ruby 29011 takeru txt REG 14,2 13412 550135
/opt/local/bin/ruby
ruby 29011 takeru txt REG 14,2 23860 559917
/opt/local/lib/ruby/1.8/i686-darwin8.11.1/stringio.bundle
ruby 29011 takeru txt REG 14,2 783224 552430
/opt/local/lib/libruby.1.8.6.dylib
ruby 29011 takeru txt REG 14,2 1688500 1538264 /usr/lib/dyld
ruby 29011 takeru txt REG 14,2 8008576 7501385
/usr/lib/libSystem.B.dylib
ruby 29011 takeru txt REG 14,2 1580212 7501394
/usr/lib/libobjc.A.dylib
ruby 29011 takeru txt REG 14,2 3559472 7501739
/usr/lib/libstdc++.6.0.4.dylib
ruby 29011 takeru txt REG 14,2 251320 7501746
/usr/lib/libgcc_s.1.dylib
ruby 29011 takeru txt REG 14,2 212160 7501474
/usr/lib/libauto.dylib
ruby 29011 takeru 0u CHR 4,20 0t49144 61411076 /dev/ttyq4
ruby 29011 takeru 1u CHR 4,20 0t49144 61411076 /dev/ttyq4
ruby 29011 takeru 2u CHR 4,20 0t49144 61411076 /dev/ttyq4
ruby 29011 takeru 3 PIPE 0x400c248 16384
ruby 29011 takeru 11r PSXSHM 4096
apple.shm.notification_center
n=0
#<OpenURI::HTTPError: 404 Not Found>
["/opt/local/lib/ruby/1.8/open-uri.rb:278:in `open_http'",
"/opt/local/lib/ruby/1.8/open-uri.rb:617:in `buffer_open'",
"/opt/local/lib/ruby/1.8/open-uri.rb:164:in `open_loop'",
"/opt/local/lib/ruby/1.8/open-uri.rb:162:in `catch'",
"/opt/local/lib/ruby/1.8/open-uri.rb:162:in `open_loop'",
"/opt/local/lib/ruby/1.8/open-uri.rb:132:in `open_uri'",
"/opt/local/lib/ruby/1.8/open-uri.rb:519:in `open'",
"/opt/local/lib/ruby/1.8/open-uri.rb:30:in `open'",
"open_uri_bug.rb:15",
"open_uri_bug.rb:12:in `times'",
"open_uri_bug.rb:12"]
n=1
#<OpenURI::HTTPError: 404 Not Found>
["/opt/local/lib/ruby/1.8/open-uri.rb:278:in `open_http'",
"/opt/local/lib/ruby/1.8/open-uri.rb:617:in `buffer_open'",
"/opt/local/lib/ruby/1.8/open-uri.rb:164:in `open_loop'",
"/opt/local/lib/ruby/1.8/open-uri.rb:162:in `catch'",
"/opt/local/lib/ruby/1.8/open-uri.rb:162:in `open_loop'",
"/opt/local/lib/ruby/1.8/open-uri.rb:132:in `open_uri'",
"/opt/local/lib/ruby/1.8/open-uri.rb:519:in `open'",
"/opt/local/lib/ruby/1.8/open-uri.rb:30:in `open'",
"open_uri_bug.rb:15",
"open_uri_bug.rb:12:in `times'",
"open_uri_bug.rb:12"]
(snip)
n=249
#<OpenURI::HTTPError: 404 Not Found>
["/opt/local/lib/ruby/1.8/open-uri.rb:278:in `open_http'",
"/opt/local/lib/ruby/1.8/open-uri.rb:617:in `buffer_open'",
"/opt/local/lib/ruby/1.8/open-uri.rb:164:in `open_loop'",
"/opt/local/lib/ruby/1.8/open-uri.rb:162:in `catch'",
"/opt/local/lib/ruby/1.8/open-uri.rb:162:in `open_loop'",
"/opt/local/lib/ruby/1.8/open-uri.rb:132:in `open_uri'",
"/opt/local/lib/ruby/1.8/open-uri.rb:519:in `open'",
"/opt/local/lib/ruby/1.8/open-uri.rb:30:in `open'",
"open_uri_bug.rb:15",
"open_uri_bug.rb:12:in `times'",
"open_uri_bug.rb:12"]
n=250
#<OpenURI::HTTPError: 404 Not Found>
["/opt/local/lib/ruby/1.8/open-uri.rb:278:in `open_http'",
"/opt/local/lib/ruby/1.8/open-uri.rb:617:in `buffer_open'",
"/opt/local/lib/ruby/1.8/open-uri.rb:164:in `open_loop'",
"/opt/local/lib/ruby/1.8/open-uri.rb:162:in `catch'",
"/opt/local/lib/ruby/1.8/open-uri.rb:162:in `open_loop'",
"/opt/local/lib/ruby/1.8/open-uri.rb:132:in `open_uri'",
"/opt/local/lib/ruby/1.8/open-uri.rb:519:in `open'",
"/opt/local/lib/ruby/1.8/open-uri.rb:30:in `open'",
"open_uri_bug.rb:15",
"open_uri_bug.rb:12:in `times'",
"open_uri_bug.rb:12"]
n=251
/opt/local/lib/ruby/1.8/tempfile.rb:55:in `initialize': Too many open
files - /tmp/open-uri.29011.251 (Errno::EMFILE)
from /opt/local/lib/ruby/1.8/tempfile.rb:55:in `open'
from /opt/local/lib/ruby/1.8/tempfile.rb:55:in `initialize'
from /opt/local/lib/ruby/1.8/open-uri.rb:303:in `new'
from /opt/local/lib/ruby/1.8/open-uri.rb:303:in `<<'
from /opt/local/lib/ruby/1.8/open-uri.rb:259:in `open_http'
from /opt/local/lib/ruby/1.8/net/protocol.rb:381:in `call_block'
from /opt/local/lib/ruby/1.8/net/protocol.rb:372:in `<<'
from /opt/local/lib/ruby/1.8/net/protocol.rb:84:in `read'
... 15 levels...
from /opt/local/lib/ruby/1.8/open-uri.rb:30:in `open'
from open_uri_bug.rb:15
from open_uri_bug.rb:12:in `times'
from open_uri_bug.rb:12
tkrmb:tmp%
2009年9月11日7:46 Yukihiro Matsumoto <matz@ruby-lang.org>:
> まつもと ゆきひろです
>
> In message "Re: [ruby-dev:39302] Re: [Bug #2067] bodyが大きいエラーページをopen-uriで取得するとfdがリークしている"
> on Fri, 11 Sep 2009 01:34:01 +0900, takeru sasaki <sasaki.takeru@gmail.com> writes:
>
> |GC.start
> |の様に書けば確実にcloseされるのなら問題ないですが、そうでもないようです。
>
> RubyのGCは保守的なのですべて回収されることは保証できません。
>
> |GCでは未使用のメモリを回収してくれるだけで未使用のfdを回収してくれることは
> |ないのですよね。
> |メモリに余裕がある状態だとfdをつかんだ例外オブジェクトも回収されず、
> |fdも開きっぱなしになるのではないかとおもいます。
> |(再現スクリプトでは1.9では開きっぱなしのfdの数が少ないです。GCが効いている?)
>
> GCは参照されていないオブジェクトを回収します。そのオブジェク
> トがfdを持てば、それは自動的にcloseします。
>
> |この問題に気がついたのは、「EMFILE too many open files」になったせいでした。
> |例外オブジェクトへの参照は確実に無いはずで(メソッドからreturnしている)
> |gcされるより前にtoo many open filesにぶつかったのでした。
>
> RubyはEMFILEが発生すると自動的にGCを起動します。それでもなお
> EMFILEが出ると言うことは、また別の問題を示唆しますね。
>
>