From: Akira Tanaka <akr@fsij.org>
To: ruby-dev@ruby-lang.org (ruby developers list)
Subject: [ruby-dev:44802] [ruby-trunk - Bug #5577][Open] test/testunit/test_parallel.rb causes NoMethodError when file descriptor is limited to 30.
Date: Sun, 6 Nov 2011 13:17:36 +0900 [thread overview]
Message-ID: <redmine.issue-5577.20111106131735@ruby-lang.org> (raw)
Issue #5577 has been reported by Akira Tanaka.
----------------------------------------
Bug #5577: test/testunit/test_parallel.rb causes NoMethodError when file descriptor is limited to 30.
http://redmine.ruby-lang.org/issues/5577
Author: Akira Tanaka
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0dev (2011-11-06 trunk 33645) [x86_64-linux]
ulimit -n 30 として、file descriptor を 30個に制限した状態で、
test/testunit/test_parallel.rb をテストすると以下のように失敗します。
失敗する事自体は問題ではないのですが、
undefined method `close' for nil:NilClass (NoMethodError)
NoMethodError: undefined method `chomp' for nil:NilClass
などと存在しないメソッドを呼んでしまっているのはよろしくないのではないでしょうか。
失敗の原因がわかるメッセージが出ると良いのではないかと思います。
% (ulimit -n 30; make test-all TESTS='test/testunit/test_parallel.rb')
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" test/testunit/test_parallel.rb
Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems"
# Running tests:
.FFFF/home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:137:in `ensure in run': undefined method `close' for nil:NilClass (NoMethodError)
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:138:in `run'
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:156:in `<main>'
F/home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:137:in `ensure in run': undefined method `close' for nil:NilClass (NoMethodError)
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:138:in `run'
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:156:in `<main>'
F/home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:137:in `ensure in run': undefined method `close' for nil:NilClass (NoMethodError)
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:138:in `run'
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:156:in `<main>'
E/home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:137:in `ensure in run': undefined method `close' for nil:NilClass (NoMethodError)
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:138:in `run'
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:156:in `<main>'
F/home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:137:in `ensure in run': undefined method `close' for nil:NilClass (NoMethodError)
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:138:in `run'
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:156:in `<main>'
F/home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:137:in `ensure in run': undefined method `close' for nil:NilClass (NoMethodError)
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:138:in `run'
from /home/akr/ruby/tst2/ruby/test/testunit/../../lib/test/unit/parallel.rb:156:in `<main>'
F
Finished tests in 5.751803s, 1.9124 tests/s, 1.9124 assertions/s.
1) Failure:
test_jobs_status(TestParallel::TestParallel) [/home/akr/ruby/tst2/ruby/test/testunit/test_parallel.rb:177]:
Expected /\d+=ptest_(first|second|third|forth) */ to match "Run options: --ruby \"./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems\" -j t1 --jobs-status\n\n# Running tests:\n\n/home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:137:in `ensure in run': undefined method `close' for nil:NilClass (NoMethodError)\n\tfrom /home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:138:in `run'\n\tfrom /home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:156:in `<main>'\n\nSome worker was crashed. It seems ruby interpreter's bug\nor, a bug of test/unit/parallel.rb. try again without -j\noption.\n\n".
2) Failure:
test_no_retry_option(TestParallel::TestParallel) [/home/akr/ruby/tst2/ruby/test/testunit/test_parallel.rb:171]:
Expected /^ +\d+\) Failure:\ntest_fail_at_worker\(TestD\)/ to match "Run options: --ruby \"./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems\" -j t1 --no-retry\n\n# Running tests:\n\n/home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:137:in `ensure in run': undefined method `close' for nil:NilClass (NoMethodError)\n\tfrom /home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:138:in `run'\n\tfrom /home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:156:in `<main>'\n\nSome worker was crashed. It seems ruby interpreter's bug\nor, a bug of test/unit/parallel.rb. try again without -j\noption.\n\n".
3) Failure:
test_should_retry_failed_on_workers(TestParallel::TestParallel) [/home/akr/ruby/tst2/ruby/test/testunit/test_parallel.rb:164]:
Expected /^Retrying\.+$/ to match "Run options: --ruby \"./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems\" -j t1\n\n# Running tests:\n\n/home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:137:in `ensure in run': undefined method `close' for nil:NilClass (NoMethodError)\n\tfrom /home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:138:in `run'\n\tfrom /home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:156:in `<main>'\n\nSome worker was crashed. It seems ruby interpreter's bug\nor, a bug of test/unit/parallel.rb. try again without -j\noption.\n\n".
4) Failure:
test_should_run_all_without_any_leaks(TestParallel::TestParallel) [/home/akr/ruby/tst2/ruby/test/testunit/test_parallel.rb:158]:
Expected /^[SF\.]{7}$/ to match "Run options: --ruby \"./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems\" -j t1\n\n# Running tests:\n\n/home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:137:in `ensure in run': undefined method `close' for nil:NilClass (NoMethodError)\n\tfrom /home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:138:in `run'\n\tfrom /home/akr/ruby/tst2/ruby/lib/test/unit/parallel.rb:156:in `<main>'\n\nSome worker was crashed. It seems ruby interpreter's bug\nor, a bug of test/unit/parallel.rb. try again without -j\noption.\n\n".
5) Failure:
test_accept_run_command_multiple_times(TestParallel::TestParallelWorker) [/home/akr/ruby/tst2/ruby/test/testunit/test_parallel.rb:64]:
Expected /^ready/ to match nil.
6) Failure:
test_run(TestParallel::TestParallelWorker) [/home/akr/ruby/tst2/ruby/test/testunit/test_parallel.rb:40]:
Expected /^ready/ to match nil.
7) Failure:
test_run_multiple_testcase_in_one_file(TestParallel::TestParallelWorker) [/home/akr/ruby/tst2/ruby/test/testunit/test_parallel.rb:51]:
Expected /^ready/ to match nil.
8) Failure:
test_quit(TestParallel::TestParallelWorker) [/home/akr/ruby/tst2/ruby/test/testunit/test_parallel.rb:116]:
Expected /^bye$/m to match "".
9) Failure:
test_done(TestParallel::TestParallelWorker) [/home/akr/ruby/tst2/ruby/test/testunit/test_parallel.rb:96]:
Expected /^done (.+?)$/ to match nil.
10) Error:
test_p(TestParallel::TestParallelWorker):
NoMethodError: undefined method `chomp' for nil:NilClass
/home/akr/ruby/tst2/ruby/test/testunit/test_parallel.rb:86:in `block in test_p'
11 tests, 11 assertions, 9 failures, 1 errors, 0 skips
ruby -v: ruby 2.0.0dev (2011-11-06 trunk 33645) [x86_64-linux]
make: *** [yes-test-all] エラー 10
zsh: exit 2 ( ulimit -n 30; make test-all TESTS='test/testunit/test_parallel.rb'; )
% ./ruby -v
ruby 2.0.0dev (2011-11-06 trunk 33645) [x86_64-linux]
--
http://redmine.ruby-lang.org
next reply other threads:[~2011-11-06 4:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 4:17 Akira Tanaka [this message]
2011-11-08 8:43 ` [ruby-dev:44831] [ruby-trunk - Bug #5577] " Kazuhiro NISHIYAMA
2012-03-11 9:53 ` [ruby-dev:45340] [ruby-trunk - Bug #5577][Assigned] " Shota Fukumori
2019-12-03 8:27 ` [ruby-dev:50874] [Ruby master Bug#5577] " mame
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.issue-5577.20111106131735@ruby-lang.org \
--to=akr@fsij.org \
--cc=ruby-dev@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).