Forum: Ruby-core [ruby-trunk - Bug #6573][Open] Webrick test failures

Posted by bkabrda (Bohuslav Kabrda) (Guest)
on 2012-06-11 12:34
(Received via mailing list)
Issue #6573 has been reported by bkabrda (Bohuslav Kabrda).

----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573

Author: bkabrda (Bohuslav Kabrda)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by Vít Ondruch (vo_x)
on 2012-06-11 12:35
(Received via mailing list)
Issue #6573 has been updated by vo.x (Vit Ondruch).


It seems that the same issues are facing Debian guys: 
https://buildd.debian.org/status/fetch.php?pkg=rub...
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-27160

Author: bkabrda (Bohuslav Kabrda)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by Vít Ondruch (vo_x)
on 2012-06-11 12:52
(Received via mailing list)
Issue #6573 has been updated by vo.x (Vit Ondruch).


vo.x (Vit Ondruch) wrote:
> It seems that the same issues are facing Debian guys: 
https://buildd.debian.org/status/fetch.php?pkg=rub...

Arrgh, the Debian error is something different: 
http://bugs.ruby-lang.org/issues/5135 sorry for confusion :/
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-27161

Author: bkabrda (Bohuslav Kabrda)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by bkabrda (Bohuslav Kabrda) (Guest)
on 2012-06-12 15:52
(Received via mailing list)
Issue #6573 has been updated by bkabrda (Bohuslav Kabrda).


Hmm, actually it seems that the tests don't fail randomly; The error 
seems to be:

NameError: uninitialized constant TestWEBrickCGI::RubyBin

Which then forces the webrick.cgi to use /usr/bin/ruby, which is not 
found during the build, if Ruby are not installed.
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-27180

Author: bkabrda (Bohuslav Kabrda)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by bkabrda (Bohuslav Kabrda) (Guest)
on 2012-06-13 09:40
(Received via mailing list)
Issue #6573 has been updated by bkabrda (Bohuslav Kabrda).


Minimal reproducer:
1. Don't have ruby installed (no /usr/bin/ruby).
2. Build Ruby and run
$ make test-all TESTS="-v test/webrick/test_httpproxy.rb 
test/webrick/test_cgi.rb test/webrick/test_filehandler.rb"

The test_httpproxy.rb seems to cause this. Strangely, when I comment out 
3 its requires (webrick, webrick/httpproxy, webrick/ssl), all its test 
still run and pass and so do the two, that I reported to fail. So it 
seems that this issue is hidden somewhere in these 3 requires. It really 
puzzles me that all of these 3 requires must be commented out, in order 
for the tests to pass.
When running with "-v", the failing tests also print

sh: /usr/bin/ruby: No such file or directory
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-27217

Author: bkabrda (Bohuslav Kabrda)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by Michael Artz (mlartz)
on 2012-06-21 18:10
(Received via mailing list)
Issue #6573 has been updated by mlartz (Michael Artz).


I'm seeing the same behavior with CentOS 6.2, both using your (Fedora's) 
RPM spec file and building Ruby from scratch.

Based on @bkabrada's "fixes" via commenting the webrick 'requires's, I 
dug a little deeper.  It looks like "require '../ruby/envutil'" needs to 
come before any of the webrick 'require's, as that is where RubyBin is 
set up.  This, along with all of the webrick 'require's (i.e. webrick, 
webrick/https, webrick/httpproxy) is all done in 'utils.rb'.  Luckily, 
this is required in 'test_httpproxy.rb', however it is *after* the 
webrick requires, which seems to be why commenting out the require 
statements worked ... they were getting required anyway in utils.rb.

Unfortunately, all of the above works when the webrick tests are 
executed alone (make yes-test-all TESTS="-v test/webrick/test*.rb"), but 
they still fail when executed with the entire test suite (make 
yes-test-all).  So I'm stumped.

----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-27337

Author: bkabrda (Bohuslav Kabrda)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by Michael Artz (mlartz)
on 2012-06-21 22:52
(Received via mailing list)
Issue #6573 has been updated by mlartz (Michael Artz).


It appears that WEBrick::HTTPServlet::CGIHandler 
(webrick/httpservlet/cgihandler.rb) file embeds RbConfig.ruby into a 
constant when the file is required.  test/ruby/envutil.rb monkeypatches 
RbConfig.ruby to use the newly compiled Ruby.  If, however, webrick gets 
'require'd before test/ruby/envutil, then the internal CGIHandler 
constant has already been set.

So there is a simple fix, but I'm not sure if its the right one 
(although it feels right).  Put the following line into test/runner.rb:

require_relative 'ruby/envutil'

which should setup the environment for all the tests, which is what I 
think we want.

The not-so-simple solution is to find the offending webrick-requiring 
test and update it to require ruby/envutil before it requires webrick. 
This seems like unnecessary work, assuming that the previous solution is 
sufficient.

I'm not in a place where I can provide a patch at the moment, so I'm 
hoping that someone else can finalize this.
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-27341

Author: bkabrda (Bohuslav Kabrda)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by bkabrda (Bohuslav Kabrda) (Guest)
on 2012-06-22 11:04
(Received via mailing list)
Issue #6573 has been updated by bkabrda (Bohuslav Kabrda).

File ruby-1.9.3.p195-fix-webrick-tests.patch added

Michael, thanks, a very helpful information. I believe that the patch 
you are proposing is correct, yet I would prefer a different approach 
(attaching). A little problem that I see with your proposed patch that 
it alters environment for many tests, it seems to be too global. 
Therefore I would only propose modifying test_httpproxy.rb to require 
utils.rb in the first place, that fixes all.
Could someone review/commit this patch (and possibly to other 
releases/versions of Ruby too)?
Thanks!
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-27358

Author: bkabrda (Bohuslav Kabrda)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by Artem (Guest)
on 2012-06-22 12:16
(Received via mailing list)
r

On Fri, Jun 22, 2012 at 1:03 PM, bkabrda (Bohuslav Kabrda) <
Posted by Michael Artz (mlartz)
on 2012-06-23 01:18
(Received via mailing list)
Issue #6573 has been updated by mlartz (Michael Artz).


Unfortunately, like I mentioned earlier, just doing this for 
test_httpproxy.rb fixed it when just running webrick tests, but still 
failed when running the entire test suite, as some other non-webrick 
test includes webrick without first including envutils.  I think that my 
solution is the right one, since all tests should want to have the local 
version of Ruby, which is about all that envutils does.  I used your 
spec file (plus my fix) to successfully build a ruby 1.9.3 for CentOS 6.
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-27364

Author: bkabrda (Bohuslav Kabrda)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by bkabrda (Bohuslav Kabrda) (Guest)
on 2012-06-25 07:55
(Received via mailing list)
Issue #6573 has been updated by bkabrda (Bohuslav Kabrda).


Hmm, it is strange that I don't have any problems building with my patch 
- all tests pass for me. Are you sure you didn't make any further 
adjustments?
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-27399

Author: bkabrda (Bohuslav Kabrda)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by bkabrda (Bohuslav Kabrda) (Guest)
on 2012-06-25 09:26
(Received via mailing list)
Issue #6573 has been updated by bkabrda (Bohuslav Kabrda).


Thinking of it further, I realized that this may be caused by order in 
which tests are required - and I think that they aren't required in the 
same order every time. So maybe I was just lucky when running test 
suite. But your proposed solution should make the tests pass every time.
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-27403

Author: bkabrda (Bohuslav Kabrda)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by mame (Yusuke Endoh) (Guest)
on 2012-07-01 11:01
(Received via mailing list)
Issue #6573 has been updated by mame (Yusuke Endoh).

Status changed from Open to Assigned
Assignee set to nahi (Hiroshi Nakamura)


----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-27648

Author: bkabrda (Bohuslav Kabrda)
Status: Assigned
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by Vít Ondruch (vo_x)
on 2012-10-05 12:14
(Received via mailing list)
Issue #6573 has been updated by vo.x (Vit Ondruch).


Can somebody look into this issue, please? This is very annoying bug. 
When I am doing build for Fedora or Red Hat Enterprise Linux, it builds 
for more platforms at once in parallel, so there is higher chance to 
fail. Now I am doing already 4th attempt but this bug always hits me :/ 
Thank you.
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-30065

Author: bkabrda (Bohuslav Kabrda)
Status: Assigned
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by nahi (Hiroshi Nakamura) (Guest)
on 2012-11-27 14:37
(Received via mailing list)
Issue #6573 has been updated by nahi (Hiroshi Nakamura).


Thanks to bkabrda and mlartz's minimal reproducer and the investigation, 
I could easily understand the issue.

I think we should fix this by avoiding RbConfig.ruby caching at 
cgihandler.rb. Let me try.
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-34041

Author: bkabrda (Bohuslav Kabrda)
Status: Assigned
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by Vít Ondruch (vo_x)
on 2013-01-24 10:49
(Received via mailing list)
Issue #6573 has been updated by vo.x (Vit Ondruch).


Could somebody please do something about this bug? I am sad that 
although this was reported almost 8 months ago and triaged including 
patch, it is still not fixed. Sometimes I have feeling that it would be 
faster to ask committer rights myself :/
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-35577

Author: bkabrda (Bohuslav Kabrda)
Status: Assigned
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Posted by Vít Ondruch (vo_x)
on 2013-02-22 16:00
(Received via mailing list)
Issue #6573 has been updated by vo.x (Vit Ondruch).


The attached patch does not work every time. I went ahead and applied 
[1] (i.e. the patch described in comment 6, if I got it correctly ;)) 
for Fedora and so far so good.


[1] 
http://pkgs.fedoraproject.org/cgit/ruby.git/tree/r...
----------------------------------------
Bug #6573: Webrick test failures
https://bugs.ruby-lang.org/issues/6573#change-36791

Author: bkabrda (Bohuslav Kabrda)
Status: Assigned
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category:
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


Hi,
I'm randomly getting test failures for WEBrick with Ruby 1.9.3. The 
problem seems to be that WEBrick hangs during some test suite executions 
(I think it may be improperly shut down after previous tests). These are 
the failures I'm getting (running Fedora 17 x86_64):


50) Failure:
test_cgi(TestWEBrickCGI) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_cgi.rb:34]:
webrick log start:
  [2012-06-11 10:06:35] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:35] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:35] INFO  WEBrick::HTTPServer#start: pid=15944 
port=40082
  [2012-06-11 10:06:35] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:35] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi

webrick log end.
<"/webrick.cgi"> expected but was
<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<HTML>\n 
<HEAD><TITLE>Internal Server Error</TITLE></HEAD>\n  <BODY>\n 
<H1>Internal Server Error</H1>\n    Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi\n 
<HR>\n    <ADDRESS>\n     WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) 
OpenSSL/1.0.1c at\n     127.0.0.1:40082\n    </ADDRESS>\n 
</BODY>\n</HTML>\n">.
 51) Failure:
test_script_disclosure(WEBrick::TestFileHandler) 
[/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/test_filehandler.rb:265]:
webrick log start:
  [2012-06-11 10:06:49] INFO  WEBrick 1.3.1
  [2012-06-11 10:06:49] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
  [2012-06-11 10:06:49] INFO  WEBrick::HTTPServer#start: pid=15944 
port=34515
  [2012-06-11 10:06:49] ERROR CGIHandler: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi exit with 
127
  [2012-06-11 10:06:49] ERROR Premature end of script headers: 
/builddir/build/BUILD/ruby-1.9.3-p194/test/webrick/webrick.cgi
webrick log end.
<"200"> expected but was
<"500">.

Here is the full build log from Fedora's Koji: 
http://koji.fedoraproject.org/koji/getfile?taskID=...

Is anyone experiencing the same failures
Thanks!
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.