Segfault w/ Ruby 1.9.2-p180 and the uglifier gem #79

Closed
dhh opened this Issue Jun 6, 2011 · 22 comments

Projects

None yet

7 participants

@dhh
dhh commented Jun 6, 2011

Running on Rails 3.1-stable with the uglifier preprocessor turned on:

[2011-06-06 18:32:39] INFO  WEBrick 1.3.1
[2011-06-06 18:32:39] INFO  ruby 1.9.2 (2011-02-18) [x86_64-darwin10.7.1]
[2011-06-06 18:32:39] INFO  WEBrick::HTTPServer#start: pid=47448 port=3000
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/therubyracer-9e79fab5fa54/lib/v8/context.rb:17: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.1]

-- control frame ----------
c:0088 p:---- s:0508 b:0508 l:000507 d:000507 CFUNC  :New
c:0087 p:0140 s:0505 b:0505 l:000504 d:000504 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/therubyracer-9e79fab5fa54/lib/v8/context.rb:17
c:0086 p:---- s:0498 b:0498 l:000497 d:000497 FINISH
c:0085 p:---- s:0496 b:0496 l:000495 d:000495 CFUNC  :new
c:0084 p:0026 s:0493 b:0493 l:000492 d:000492 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/execjs-1.1.0/lib/execjs/ruby_racer_runtime.rb:5
c:0083 p:---- s:0489 b:0489 l:000488 d:000488 FINISH
c:0082 p:---- s:0487 b:0487 l:000486 d:000486 CFUNC  :new
c:0081 p:0019 s:0483 b:0483 l:000482 d:000482 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/execjs-1.1.0/lib/execjs/ruby_racer_runtime.rb:77
c:0080 p:0019 s:0479 b:0479 l:000478 d:000478 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/execjs-1.1.0/lib/execjs/module.rb:28
c:0079 p:0038 s:0475 b:0475 l:000474 d:000474 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/coffee-script-2.2.0/lib/coffee_script.rb:31
c:0078 p:0107 s:0472 b:0472 l:000471 d:000471 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/coffee-script-2.2.0/lib/coffee_script.rb:57
c:0077 p:0045 s:0467 b:0467 l:000466 d:000466 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/tilt-1.3.2/lib/tilt/coffee.rb:46
c:0076 p:0042 s:0461 b:0461 l:000460 d:000460 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/tilt-1.3.2/lib/tilt/template.rb:76
c:0075 p:0039 s:0455 b:0455 l:001840 d:0011d0 BLOCK  /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/context.rb:83
c:0074 p:---- s:0450 b:0450 l:000449 d:000449 FINISH
c:0073 p:---- s:0448 b:0448 l:000447 d:000447 CFUNC  :each
c:0072 p:0149 s:0445 b:0445 l:001840 d:001840 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/context.rb:80
c:0071 p:0105 s:0433 b:0433 l:000432 d:000432 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:22
c:0070 p:---- s:0424 b:0424 l:000423 d:000423 FINISH
c:0069 p:---- s:0422 b:0422 l:000421 d:000421 CFUNC  :new
c:0068 p:0098 s:0415 b:0415 l:000414 d:000414 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:118
c:0067 p:0091 s:0408 b:0408 l:000407 d:000407 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:64
c:0066 p:0051 s:0401 b:0401 l:000392 d:000400 BLOCK  /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:96
c:0065 p:---- s:0398 b:0398 l:000397 d:000397 FINISH
c:0064 p:---- s:0396 b:0396 l:000395 d:000395 CFUNC  :each
c:0063 p:0033 s:0393 b:0393 l:000392 d:000392 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:92
c:0062 p:0222 s:0387 b:0387 l:000386 d:000386 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:31
c:0061 p:---- s:0378 b:0378 l:000377 d:000377 FINISH
c:0060 p:---- s:0376 b:0376 l:000375 d:000375 CFUNC  :new
c:0059 p:0098 s:0369 b:0369 l:000368 d:000368 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:118
c:0058 p:0091 s:0362 b:0362 l:000361 d:000361 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:64
c:0057 p:0051 s:0355 b:0355 l:000346 d:000354 BLOCK  /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:96
c:0056 p:---- s:0352 b:0352 l:000351 d:000351 FINISH
c:0055 p:---- s:0350 b:0350 l:000349 d:000349 CFUNC  :each
c:0054 p:0033 s:0347 b:0347 l:000346 d:000346 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:92
c:0053 p:0222 s:0341 b:0341 l:000340 d:000340 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:31
c:0052 p:---- s:0332 b:0332 l:000331 d:000331 FINISH
c:0051 p:---- s:0330 b:0330 l:000329 d:000329 CFUNC  :new
c:0050 p:0098 s:0323 b:0323 l:000322 d:000322 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:118
c:0049 p:0089 s:0316 b:0316 l:000315 d:000315 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:100
c:0048 p:0175 s:0308 b:0305 l:000304 d:000304 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:72
c:0047 p:0173 s:0298 b:0298 l:000297 d:000297 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/server.rb:42
c:0046 p:0229 s:0287 b:0287 l:000286 d:000286 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/prefix.rb:26
c:0045 p:0127 s:0280 b:0280 l:000253 d:000279 BLOCK  /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/route_set.rb:152
c:0044 p:0014 s:0273 b:0273 l:000259 d:000272 BLOCK  /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/code_generation.rb:93
c:0043 p:0099 s:0268 b:0268 l:000267 d:000267 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/code_generation.rb:68
c:0042 p:0198 s:0260 b:0260 l:000259 d:000259 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/code_generation.rb:92
c:0041 p:0092 s:0254 b:0254 l:000253 d:000253 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/route_set.rb:141
c:0040 p:0025 s:0248 b:0248 l:000247 d:000247 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/routing/route_set.rb:531
c:0039 p:0014 s:0244 b:0244 l:000237 d:000243 BLOCK  /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/signal_id-3.1.2/lib/signal_id/query_cache.rb:9
c:0038 p:0019 s:0242 b:0242 l:000241 d:000241 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activerecord/lib/active_record/connection_adapters/abstr
c:0037 p:0025 s:0238 b:0238 l:000237 d:000237 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/signal_id-3.1.2/lib/signal_id/query_cache.rb:8
c:0036 p:0015 s:0234 b:0234 l:000233 d:000233 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/signal_id-3.1.2/lib/signal_id/connection_management.rb:8
c:0035 p:0015 s:0230 b:0230 l:000229 d:000229 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/best_standards
c:0034 p:0015 s:0223 b:0223 l:000222 d:000222 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/etag.rb:23
c:0033 p:0068 s:0215 b:0215 l:000214 d:000214 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/conditionalget.rb:25
c:0032 p:0093 s:0208 b:0208 l:000207 d:000207 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/head.rb:14
c:0031 p:0046 s:0201 b:0201 l:000200 d:000200 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/params_parser.
c:0030 p:0054 s:0196 b:0196 l:000195 d:000195 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/flash.rb:243
c:0029 p:0031 s:0188 b:0188 l:000187 d:000187 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/session/abstract/id.rb:195
c:0028 p:0013 s:0180 b:0180 l:000179 d:000179 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/session/abstract/id.rb:190
c:0027 p:0020 s:0176 b:0176 l:000175 d:000175 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/cookies.rb:321
c:0026 p:0064 s:0168 b:0168 l:000167 d:000167 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activerecord/lib/active_record/query_cache.rb:54
c:0025 p:0029 s:0160 b:0160 l:000159 d:000159 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activerecord/lib/active_record/connection_adapters/abstr
c:0024 p:0050 s:0152 b:0152 l:000151 d:000151 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activerecord/lib/active_record/identity_map.rb:152
c:0023 p:0014 s:0144 b:0144 l:000080 d:000143 BLOCK  /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/callbacks.rb:2
c:0022 p:0155 s:0142 b:0142 l:000141 d:000141 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activesupport/lib/active_support/callbacks.rb:392
c:0021 p:0024 s:0132 b:0132 l:000131 d:000131 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activesupport/lib/active_support/callbacks.rb:81
c:0020 p:0013 s:0126 b:0126 l:000080 d:000080 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/callbacks.rb:2
c:0019 p:0027 s:0122 b:0122 l:000121 d:000121 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/reloader.rb:68
c:0018 p:0015 s:0117 b:0117 l:000116 d:000116 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/sendfile.rb:102
c:0017 p:0049 s:0107 b:0107 l:000106 d:000106 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/remote_ip.rb:4
c:0016 p:0017 s:0103 b:0103 l:000102 d:000102 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/show_exception
c:0015 p:0027 s:0095 b:0095 l:000094 d:000094 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/railties/lib/rails/rack/logger.rb:13
c:0014 p:0155 s:0091 b:0091 l:000090 d:000090 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/methodoverride.rb:24
c:0013 p:0032 s:0085 b:0085 l:000084 d:000084 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/runtime.rb:17
c:0012 p:0057 s:0076 b:0076 l:000075 d:000075 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activesupport/lib/active_support/cache/strategy/local_ca
c:0011 p:0068 s:0072 b:0072 l:000071 d:000071 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/lock.rb:34
c:0010 p:0124 s:0066 b:0066 l:000065 d:000065 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/static.rb:53
c:0009 p:0032 s:0060 b:0060 l:000059 d:000059 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/railties/lib/rails/engine.rb:438
c:0008 p:0015 s:0056 b:0056 l:000055 d:000055 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/railties/lib/rails/rack/content_length.rb:16
c:0007 p:0015 s:0047 b:0047 l:000046 d:000046 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/railties/lib/rails/rack/log_tailer.rb:14
c:0006 p:0356 s:0042 b:0042 l:000041 d:000041 METHOD /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/handler/webrick.rb:59
c:0005 p:0257 s:0030 b:0030 l:000029 d:000029 METHOD /Users/david/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111
c:0004 p:0393 s:0020 b:0020 l:000019 d:000019 METHOD /Users/david/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:70
c:0003 p:0126 s:0009 b:0009 l:001b28 d:000008 BLOCK  /Users/david/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP   
---------------------------
-- Ruby level backtrace information ----------------------------------------
/Users/david/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
/Users/david/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/Users/david/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/handler/webrick.rb:59:in `service'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/railties/lib/rails/rack/log_tailer.rb:14:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/railties/lib/rails/rack/content_length.rb:16:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/railties/lib/rails/engine.rb:438:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/static.rb:53:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/lock.rb:34:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/runtime.rb:17:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/methodoverride.rb:24:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/railties/lib/rails/rack/logger.rb:13:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/sendfile.rb:102:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/reloader.rb:68:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/callbacks.rb:28:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activesupport/lib/active_support/callbacks.rb:392:in `_run_call_callbacks'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activerecord/lib/active_record/identity_map.rb:152:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activerecord/lib/active_record/query_cache.rb:54:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/cookies.rb:321:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/session/abstract/id.rb:190:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/session/abstract/id.rb:195:in `context'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/flash.rb:243:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/conditionalget.rb:25:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0/lib/rack/etag.rb:23:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/signal_id-3.1.2/lib/signal_id/connection_management.rb:8:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/signal_id-3.1.2/lib/signal_id/query_cache.rb:8:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:26:in `cache'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/signal_id-3.1.2/lib/signal_id/query_cache.rb:9:in `block in call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-1f59c57ef12e/actionpack/lib/action_dispatch/routing/route_set.rb:531:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/route_set.rb:141:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/code_generation.rb:92:in `recognize'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/code_generation.rb:68:in `optimized_each'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/code_generation.rb:93:in `block in recognize'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/route_set.rb:152:in `block in call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/rack-mount-0.8.1/lib/rack/mount/prefix.rb:26:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/server.rb:42:in `call'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:72:in `find_asset'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:100:in `find_asset_in_path'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:118:in `build_asset'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:118:in `new'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:31:in `initialize'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:92:in `compute_dependencies!'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:92:in `each'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:96:in `block in compute_dependencies!'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:64:in `find_asset'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:118:in `build_asset'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:118:in `new'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:31:in `initialize'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:92:in `compute_dependencies!'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:92:in `each'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:96:in `block in compute_dependencies!'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:64:in `find_asset'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:118:in `build_asset'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/environment_index.rb:118:in `new'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/bundled_asset.rb:22:in `initialize'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/context.rb:80:in `evaluate'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/context.rb:80:in `each'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.9/lib/sprockets/context.rb:83:in `block in evaluate'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/tilt-1.3.2/lib/tilt/template.rb:76:in `render'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/tilt-1.3.2/lib/tilt/coffee.rb:46:in `evaluate'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/coffee-script-2.2.0/lib/coffee_script.rb:57:in `compile'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/coffee-script-2.2.0/lib/coffee_script.rb:31:in `context'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/execjs-1.1.0/lib/execjs/module.rb:28:in `compile'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/execjs-1.1.0/lib/execjs/ruby_racer_runtime.rb:77:in `compile'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/execjs-1.1.0/lib/execjs/ruby_racer_runtime.rb:77:in `new'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/execjs-1.1.0/lib/execjs/ruby_racer_runtime.rb:5:in `initialize'
/Users/david/.rvm/gems/ruby-1.9.2-p180/gems/execjs-1.1.0/lib/execjs/ruby_racer_runtime.rb:5:in `new'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/therubyracer-9e79fab5fa54/lib/v8/context.rb:17:in `initialize'
/Users/david/.rvm/gems/ruby-1.9.2-p180/bundler/gems/therubyracer-9e79fab5fa54/lib/v8/context.rb:17:in `New'

-- 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

Abort trap
@cowboyd
Owner
cowboyd commented Jun 6, 2011

Bizarre place for a crash. I'll have a look.

@ineu
ineu commented Jun 6, 2011

Same in ubuntu 11.04 x86

@cowboyd
Owner
cowboyd commented Jun 7, 2011

The problem appears to be a threading issue, and probably the same one that @anildigital encountered in #73 Specifically, the thread that initializes v8 is different than the one handling the request. My guess is that v8 uses a thread local to store its global data, and so it freaks out when it can't find it.

For right now, you can work around this issue by adding this middleware to your stack to lock V8. This shouldn't be a problem since assets are only generated on the fly during development mode. Also, this is not a problem for forking servers like passenger and unicorn.

It's been on my list to do more intelligent locking, so that these type of workarounds aren't necessary, but it definitely needs some thought to get it right.

@josh
josh commented Jun 7, 2011

Interesting. Explains why it doesn't happen from a single process rake task.

@josh
josh commented Jun 7, 2011

@cowboyd wdty about moving this lock into execjs? Wrap all eval calls with it.

@cowboyd
Owner
cowboyd commented Jun 7, 2011

I think that's the best place for it. I'd thought about putting the lock into the rubyracer itself, but it would need to be done carefully since you need to unlock v8 whenever you call back out from JavaScript into embedded Ruby code.

Since execjs does not embed any Ruby code (that's a valid assumption, right?), then it would be perfectly safe to put a lock around it.

It might be a little bit finicky, since according to the v8 list if you use locking anywhere, then you need to use it everywhere, but I don't see any reason why it couldn't be made to work.

@cowboyd
Owner
cowboyd commented Jun 8, 2011

@josh BTW, I can submit a pull request for this if you'd like.

@josh
josh commented Jun 8, 2011

@cowboyd how does this look? sstephenson/execjs@a48bc7c

@cowboyd
Owner
cowboyd commented Jun 9, 2011

v8 locking has been integrated into ExecJS 1.1.2

@cowboyd cowboyd closed this Jun 9, 2011
@ineu
ineu commented Jun 9, 2011

I'm afraid it doesn't fix the issue. If I turn off https://gist.github.com/1011718 middleware, error comes back even with execjs 1.1.2: https://gist.github.com/1017379

@cowboyd
Owner
cowboyd commented Jun 9, 2011

This appears to be a different error, is this a consistent and reproducible or intermittent?

@cowboyd
Owner
cowboyd commented Jun 9, 2011

Crap. What's happening is that therubyracer garbage collection routines are not locking V8, and so when your ruby process stops to do GC and free up some old JavaScript objects, it crashes. By putting this in the middleware, you greatly reduce the chance that the ruby GC will run in code that doesn't hold the V8 lock, but you still are open to a crash happening if GC runs before you enter the locking middleware.

I'd hoped to put off a comprehensive locking solution until 0.9.1 or 0.9.2, but maybe we can fit it into 0.9.0

@cowboyd cowboyd reopened this Jun 12, 2011
@cowboyd
Owner
cowboyd commented Jun 13, 2011

This will be going into 0.9.1, for a write up of the issue as well as an explanation of the timing:

http://blog.thefrontside.net/2011/06/13/therubyracer-isnt-threadsafe-yet/

@sheldonh

I'm so glad you reopened. I've been trying to get a handle on these segfaults, assuming that it must be something else since execjs-1.1.2 was supposed to fix the problem. It's amazing how the experience of a problem changes when upstream says there's a fix coming. :-)

@cowboyd
Owner
cowboyd commented Jun 15, 2011

Ok. therubyracer >= 0.9.1beta1 will not do any V8 operations inside the Ruby GC thread, and so now the locking put in place by ExecJS should actually do the trick. I'd appreciate it if folks could test this out and let me know how things go.

For those interested, the patch is here @05e4c57

@ineu
ineu commented Jun 15, 2011

No errors on 0.9.1b1 for now. Using webrick.

@voke
voke commented Jun 16, 2011

Same goes for me, no errors since I upgraded to 0.9.1b1.

@sheldonh

1.9.1 is solid, thanks.

@cowboyd
Owner
cowboyd commented Jun 22, 2011

Looks like that's a wrap folks.

@cowboyd cowboyd closed this Jun 22, 2011
@ArthurN
ArthurN commented Jul 18, 2011

I'm seeing this issue on 0.9.2 with Ruby 1.9.2. Here's the dump.

partial gem list:

therubyracer (0.9.2)
libv8 (3.3.10.2 x86_64-darwin-10)
@cowboyd
Owner
cowboyd commented Jul 18, 2011

What About 0.9.3beta1?

@ArthurN
ArthurN commented Jul 18, 2011

Yes, 0.9.3beta1 fixes it.

After I posted that comment I discovered issue #89 and now I understand the autolocking stuff. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment