Bug #2877
Intermittent failure in spec/integration/network/server/webrick.rb
| Status: | Closed | Start date: | 11/27/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | server | |||
| Target version: | 0.25.2 | |||
| Affected Puppet version: | 0.25.1 | Branch: | http://github.com/jes5199/puppet/tree/ticket/0.25.x/2877 | |
| Keywords: | ||||
| Votes: | 0 |
Description
spec/integration/network/server/webrick.rb occasionally produces the error:
should not be reachable on the port and address assigned (FAILED - #)
This was originally believed to be a test isolation problem (see below) but the observed behavior is more consistent with a real, though intermittent, bug.
Initial characterization
The effect has been observed when running the webrick tests before:
- spec/integration/file_serving/fileset.rb
- spec/integration/network/server/mongrel.rb
- spec/unit/type/file/group.rb
- spec/unit/rails/host.rb
- spec/unit/type/service.rb
- spec/unit/parameter.rb
- spec/integration/ssl/certificate_request.rb
- spec/unit/network/rest_authorization.rb
or after:
- spec/integration/reference/providers.rb
- spec/unit/other/transobject.rb
- spec/unit/indirector/memory.rb
- spec/unit/type/noop_metaparam.rb
- spec/unit/node.rb
- spec/unit/type/filebucket.rb
There are probably other confounding factors; at least, I can’t come up with a plausible model to explain the observed effects.
To reproduce:
touch spec/integration/network/server/webrick.rb
ruby spec/integration/network/server/webrick.rb spec/integration/file_serving/fileset.rb -t 60 --format s --loadby mtime
Related issues
History
Updated by Markus Roberts about 2 years ago
A very similar problem can be observed with the mongrel test; when spec/integration/network/server/mongrel.rb is run before any of the following tests:
- spec/unit/property/ordered_list.rb
- spec/unit/resource/reference.rb
- spec/unit/provider/ldap.rb
- spec/unit/util/selinux.rb
- spec/unit/util/feature.rb
the analogous test (“should not be reachable on the port and address assigned”) fails.
To reproduce:
touch spec/integration/network/server/mongrel.rb
ruby spec/integration/network/server/mongrel.rb spec/unit/util/feature.rb -t 60 --format s --loadby mtime
Updated by Jesse Wolfe about 2 years ago
This wasn’t failing for me, so I started to do a git-bisect to see if it had changed due to a fix. I did manage to reproduce the error during the bisect run, but then when I reran the test on the reported version, it no longer failed! So I wrote a script to step through the git history and test every single commit back to early november … and it ran without failing a single time. There’s something else going on here. I did manage to save the stack trace of the failure:
1)
in ‘Puppet::Network::Server when using webrick after unlistening should not be reachable on the port and address assigned’
execution expired
/home/jes5199/puppet/spec/../lib/puppet/network/http/webrick.rb:52:in synchronize'
/home/jes5199/puppet/spec/../lib/puppet/network/http/webrick.rb:52:inunlisten'
/home/jes5199/puppet/lib/puppet/network/server.rb:136:in unlisten'
./spec/integration/network/server/webrick.rb:81:
/home/jes5199/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:inrun'
/home/jes5199/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in each'
/home/jes5199/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:inrun'
Apparently that’s some sort of timeout.
Updated by Markus Roberts about 2 years ago
- Subject changed from Test isolation: Spurious failure in spec/integration/network/server/webrick.rb to Intermittent failure in spec/integration/network/server/webrick.rb
- Category changed from testing to server
- Priority changed from Low to Normal
This is probably an actual intermittent bug.
Updated by Jesse Wolfe about 2 years ago
- Status changed from Accepted to In Topic Branch Pending Review
- Branch set to http://github.com/jes5199/puppet/tree/ticket/0.25.x/2877
Markus and I think that this is a race condition on Webrick startup.
Updated by Markus Roberts about 2 years ago
- Status changed from In Topic Branch Pending Review to Ready For Checkin
Updated by James Turnbull about 2 years ago
- Status changed from Ready For Checkin to Closed
Pushed in commit:0f63a54b710e3a3390240404565515e362ce78d1 in branch 0.25.x