From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id AB28117C4583; Tue, 8 Nov 2011 17:56:32 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 801FAEA693C; Tue, 8 Nov 2011 17:44:05 +0900 (JST) Received: from localhost (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 34F338FC21; Tue, 8 Nov 2011 17:44:06 +0900 (JST) X-Virus-Scanned: amavisd-new at funfun.nagaokaut.ac.jp Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by localhost (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C55V+7paQqdE; Tue, 8 Nov 2011 17:44:06 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id EAAEC8FC26; Tue, 8 Nov 2011 17:44:05 +0900 (JST) Received: from carbon.ruby-lang.org (carbon.ruby-lang.org [221.186.184.68]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id CF3D0952420; Tue, 8 Nov 2011 17:44:01 +0900 (JST) Received: from beryllium.ruby-lang.org (beryllium.ruby-lang.org [127.0.0.1]) by carbon.ruby-lang.org (Postfix) with ESMTP id 248593C21E7BE; Tue, 8 Nov 2011 17:44:00 +0900 (JST) Received: from fluorine.ruby-lang.org (www.rubyist.net [210.251.121.216]) by carbon.ruby-lang.org (Postfix) with ESMTP id E203E3C21F104 for ; Tue, 8 Nov 2011 17:43:53 +0900 (JST) Received: from ruby-lang.org (localhost [127.0.0.1]) by fluorine.ruby-lang.org (Postfix) with ESMTP id C70B560001 for ; Tue, 8 Nov 2011 17:43:53 +0900 (JST) Delivered-To: ruby-dev@ruby-lang.org Date: Tue, 8 Nov 2011 17:43:54 +0900 Posted: Tue, 8 Nov 2011 17:43:53 +0900 From: Kazuhiro NISHIYAMA Reply-To: ruby-dev@ruby-lang.org Subject: [ruby-dev:44831] [ruby-trunk - Bug #5577] test/testunit/test_parallel.rb causes NoMethodError when file descriptor is limited to 30. To: ruby-dev@ruby-lang.org (ruby developers list) Message-Id: References: X-ML-Name: ruby-dev X-Mail-Count: 44831 X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post) X-ML-Info: If you have a question, send e-mail with the body "help" (without quotes) to the address ruby-dev-ctl@ruby-lang.org; help= X-Mailer: Redmine X-Spam-Checker-Version: SpamAssassin 3.1.7-deb3 (2006-10-05) on carbon.ruby-lang.org X-Spam-Level: * X-Spam-Status: No, score=1.0 required=7.0 tests=BAYES_50,CONTENT_TYPE_PRESENT, FAKEDWORD_BACKQUOTE,FORGED_RCVD_HELO,TOOLONGSTR,UTF8,X_MAILER_PRESENT autolearn=disabled version=3.1.7-deb3 X-Redmine-Issue-Author: akr X-Redmine-Issue-Assignee: sorah X-Redmine-Issue-Id: 5577 X-Redmine-Mailinglistintegration-Message-Ids: 10415 X-Redmine-Project: ruby-trunk Auto-Submitted: auto-generated X-Redmine-Site: Ruby Issue Tracking System X-Redmine-Host: redmine.ruby-lang.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Precedence: bulk List-Id: ruby-dev.ruby-lang.org List-Software: fml [fml 4.0.3 release (20011202/4.0.3)] List-Post: List-Owner: List-Help: List-Unsubscribe: Issue #5577 has been updated by Kazuhiro NISHIYAMA. Assignee set to Shota Fukumori ---------------------------------------- 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: Shota Fukumori 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 `
' 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 `
' 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 `
' 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 `
' 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 `
' 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 `
' 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 `
'\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 `
'\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 `
'\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 `
'\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