igrigorik/em-http-request — Issue #170: client_fiber_spec.rb seg faults
Author: tomekr
Created: 2012-02-07 18:36:18+00:00
State: open

Not quite sure why this is happening, but its the only spec that does this. When removing the spec, all other tests pass. Here is the trace.

```
** Invoke test (first_time)
** Invoke spec (first_time)
** Execute spec
/Users/tomek/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -S rspec ./spec/client_fiber_spec.rb ./spec/client_spec.rb ./spec/dns_spec.rb ./spec/encoding_spec.rb ./spec/external_spec.rb ./spec/http_proxy_spec.rb ./spec/middleware_spec.rb ./spec/multi_spec.rb ./spec/pipelining_spec.rb ./spec/redirect_spec.rb ./spec/socksify_proxy_spec.rb ./spec/ssl_spec.rb
/Users/tomek/workspace/em-http-request/spec/client_fiber_spec.rb:9: [BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0]

-- control frame ----------
c:0032 p:---- s:0116 b:0116 l:000115 d:000115 CFUNC :resume
c:0031 p:0021 s:0113 b:0113 l:002108 d:001a68 BLOCK /Users/tomek/workspace/em-http-request/spec/client_fiber_spec.rb:9
c:0030 p:---- s:0111 b:0111 l:000110 d:000110 FINISH
c:0029 p:---- s:0109 b:0109 l:000108 d:000108 CFUNC :call
c:0028 p:---- s:0107 b:0107 l:000106 d:000106 CFUNC :run_machine
c:0027 p:0248 s:0104 b:0104 l:000103 d:000103 METHOD /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179
c:0026 p:0015 s:0097 b:0097 l:002108 d:000848 BLOCK /Users/tomek/workspace/em-http-request/spec/client_fiber_spec.rb:8
c:0025 p:---- s:0095 b:0095 l:000094 d:000094 FINISH
c:0024 p:---- s:0093 b:0093 l:000092 d:000092 CFUNC :instance_eval
c:0023 p:0026 s:0090 b:0090 l:001310 d:000089 BLOCK /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:80
c:0022 p:0024 s:0087 b:0087 l:000086 d:000086 METHOD /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:173
c:0021 p:0059 s:0083 b:0083 l:001310 d:001310 METHOD /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:77
c:0020 p:0071 s:0077 b:0077 l:000066 d:000076 BLOCK /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:355
c:0019 p:---- s:0072 b:0072 l:000071 d:000071 FINISH
c:0018 p:---- s:0070 b:0070 l:000069 d:000069 CFUNC :map
c:0017 p:0023 s:0067 b:0067 l:000066 d:000066 METHOD /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351
c:0016 p:0096 s:0063 b:0063 l:000062 d:000062 METHOD /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:337
c:0015 p:0014 s:0056 b:0056 l:000047 d:000055 BLOCK /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338
c:0014 p:---- s:0053 b:0053 l:000052 d:000052 FINISH
c:0013 p:---- s:0051 b:0051 l:000050 d:000050 CFUNC :map
c:0012 p:0119 s:0048 b:0048 l:000047 d:000047 METHOD /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338
c:0011 p:0014 s:0041 b:0041 l:000024 d:000040 BLOCK /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28
c:0010 p:---- s:0038 b:0038 l:000037 d:000037 FINISH
c:0009 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC :map
c:0008 p:0041 s:0033 b:0033 l:000024 d:000032 BLOCK /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28
c:0007 p:0025 s:0030 b:0030 l:000029 d:000029 METHOD /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/reporter.rb:34
c:0006 p:0136 s:0025 b:0025 l:000024 d:000024 METHOD /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:25
c:0005 p:0055 s:0020 b:0020 l:000019 d:000019 METHOD /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80
c:0004 p:0101 s:0014 b:0014 l:000013 d:000013 METHOD /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69
c:0003 p:0021 s:0007 b:0006 l:002068 d:000005 BLOCK /Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0015d8 d:0015d8 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:25:in `run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/reporter.rb:34:in `report'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block in run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `map'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `map'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `block in run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:337:in `run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `run_examples'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `map'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:355:in `block in run_examples'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:77:in `run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:173:in `with_around_hooks'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:80:in `block in run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:80:in `instance_eval'
/Users/tomek/workspace/em-http-request/spec/client_fiber_spec.rb:8:in `block (3 levels) in '
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in `run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in `run_machine'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in `call'
/Users/tomek/workspace/em-http-request/spec/client_fiber_spec.rb:9:in `block (4 levels) in '
/Users/tomek/workspace/em-http-request/spec/client_fiber_spec.rb:9:in `resume'

-- C level backtrace information -------------------------------------------

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

rake aborted!
/Users/tomek/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -S rspec ./spec/client_fiber_spec.rb ./spec/client_spec.rb ./spec/dns_spec.rb ./spec/encoding_spec.rb ./spec/external_spec.rb ./spec/http_proxy_spec.rb ./spec/middleware_spec.rb ./spec/multi_spec.rb ./spec/pipelining_spec.rb ./spec/redirect_spec.rb ./spec/socksify_proxy_spec.rb ./spec/ssl_spec.rb failed
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/rake_task.rb:137:in `block (2 levels) in initialize'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:60:in `verbose'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/rake_task.rb:127:in `block in initialize'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/tomek/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/Users/tomek/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in `'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/Users/tomek/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `

'
Tasks: TOP => test => spec
```