This project is archived and is in readonly mode.
Rails 3.0 crashes Ruby 1.9.2p0 on repeated browser refresh
-
Rohit Arondekar
- State changed from new to open
- Assigned user set to Yehuda Katz (wycats)
- Importance changed from to High
I wasn't able to reproduce this yet but can you post the output of the crash?
-
sponeil
There was no output other than what I just posted. I was using the default web server (WEBrick) in Windows, and with serve_static_assets defaulted to false in production mode, it was generating routing errors trying to find the CSS and JS files under the public folder. When I hit refresh too fast, it also generated connection reset errors. After a time, Windows popped up its standard GPF message box with no other output. I couldn't get any other information out of it without running ruby.exe in the debugger so I could get a stack trace and try to figure out where it was crashing. The crash was much easier to reproduce in debug mode.
When trying to reproduce it, I find I can get it to happen faster by holding F5 for a random period of time (1-5 seconds), releasing it for a second or two, and repeating the random hold. Try to vary how long you hold it down and release it to get different timing conditions. The speed and number of cores of the processor you're using may affect how hard it is to reproduce (mine is dual-core). If you're not, it may be much harder for you to reproduce it.
If there's something specific you want me to look for, let me know. If not, I may be able to arrange a time to show you it happening on my system (via a WebEx meeting).
-
habermann24
+1 here!!
I'm experiencing the same issue. So far only on Windows...i will try if i can reproduce it on a UNIX-based machine. It only happens for me if I have e.g. Javascript or CSS resources that can't be found.
If it only happens on windows, i guess it might be a ruby problem concerning threading or something?
-
gnufied
- Tag set to windows 1.9.2
Can't reproduce on *nix. Very likely windows specific. You may have to post this to ruby-core.
-
sponeil
I have already posted it to ruby-core. Thanks.
-
David Trasbo
- State changed from open to invalid
Marking as invalid for now. Will re-open if it turns out to be a non-Ruby issue.
-
jtw
Just wanted to say that I installed ruby 1.9.2p0 and rails 3.0.3 via the rubyinstaller on my windows xp box. Ruby.exe started crashing on almost every page load. Then I came across this page and got the hint that something about having unloadable assets is causing this. I noticed in the webrick output that it couldn't find an image. As soon as I fixed that the crashing stopped.
-
Jason Thomas
I'm having the same issue with Rails 3.0.3 on Windows using Ruby 1.9.2p0. My site will randomly crash when refreshing the main page. Debugging with Visual Studio shows the following:
Unhandled exception at 0x62e1a822 in ruby.exe: 0xC0000005: Access violation writing location 0x0000000c.
I then break into the disassembly which doesn't really help me. Here is the disassembly in case it is meaningful to anyone:
62E1A809 jmp 62E1A692
62E1A80E xchg ax,ax
62E1A810 push ebp
62E1A811 mov ebp,esp
62E1A813 push edi
62E1A814 push esi
62E1A815 push ebx
62E1A816 sub esp,4Ch
62E1A819 mov ebx,dword ptr [ebp+8]
62E1A81C lea eax,[ebp-19h]
62E1A81F mov dword ptr [ebp-20h],eax
-> 62E1A822 mov dword ptr [ebx+0Ch],1 This is the failure line 62E1A829 mov ecx,dword ptr [ebp+0Ch]
62E1A82C test ecx,ecx
62E1A82E je 62E1ACE8
62E1A834 mov edx,dword ptr [ebp+14h]
62E1A837 test edx,edx
62E1A839 je 62E1ACD8 -
Jason Thomas
When running my application in production mode: rails server -e production I have observed the following on rapid refreshes of the application but it does NOT crash:
Started GET "/packets/list.xml" for 162.18.166.125 at 2010-12-15 11:17:57 -0700
Processing by PacketsController#list as XML Rendered packets/list.xml.builder (0.0ms)
Completed 200 OK in 0ms (Views: 0.0ms)
[2010-12-15 11:17:57] ERROR Errno::ECONNABORTED: An established connection was aborted by the software in your host machine.C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `write' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `<<' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `_write_data' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:295:in `send_body_string' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:186:in `send_body' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:103:in `send_response' C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:86:in `run' C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'[2010-12-15 11:17:57] ERROR Errno::ECONNABORTED: An established connection was aborted by the software in your host machine.
C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `eof?' C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `run' C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'[2010-12-15 11:17:57] ERROR Errno::ECONNABORTED: An established connection was aborted by the software in your host machine.
C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `write' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `<<' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `_write_data' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:295:in `send_body_string' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:186:in `send_body' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:103:in `send_response' C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:86:in `run' C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'[2010-12-15 11:17:57] ERROR Errno::ECONNABORTED: An established connection was aborted by the software in your host machine.
C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `eof?' C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `run' C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'[2010-12-15 11:17:57] ERROR Errno::ECONNABORTED: An established connection was aborted by the software in your host machine.
C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `write' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `<<' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `_write_data' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:295:in `send_body_string' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:186:in `send_body' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:103:in `send_response' C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:86:in `run' C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'[2010-12-15 11:17:57] ERROR Errno::ECONNABORTED: An established connection was aborted by the software in your host machine.
C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `write' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `<<' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:323:in `_write_data' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:295:in `send_body_string' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:186:in `send_body' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:103:in `send_response' C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:86:in `run' C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'Started GET "/packets/list.xml" for 162.18.166.125 at 2010-12-15 11:19:09 -0700
Processing by PacketsController#list as XML Rendered packets/list.xml.builder (15.6ms)
Completed 200 OK in 16ms (Views: 15.6ms)
[2010-12-15 11:19:09] ERROR Errno::ECONNABORTED: An established connection was aborted by the software in your host machine.C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `eof?' C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `run' C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' -
Peter Moberg
I can confirm this issue on Windows 7, Rails 3.0.3 and Ruby 1.9.2p136.
In my application.html.erb i had a reference to a .css file that did not exist in the stylesheets directory
<%= stylesheet_link_tag 'custom', :media => 'screen' %>When I browsed to http://localhost:3000/, WEBrick outputed:
Started GET "/stylesheet/custom.css" for 127.0.0.1 at 2011-01-05 18:53:44 +0100ActionController::RoutingError (No route matches "/stylesheet/custom.css"):
And after 2-3 requests Ruby crashed. If i remove the reference to the missing stylesheet, the application works fine.
I also tried crashing the application by requesting http://localhost:3000/stylesheet/custom.css and http://localhost:3000/ in different browser windows a few times (with the reference to the stylesheet removed from application.html.erb), but this did not crash the site. So it seems like some timing issue.
-
Zaknafein88
I found this on google, and wanted to share with others in the same circumstance.
In the ruby-core thread for this problem, it was stated that this had something to do with the Rails log file. As a temporary workaround, I added to development.rb the following line:
config.log_level = :fatal
Experimentially I've found that log levels of :debug and :info allow the bug to be triggered, but all other log levels do not. For me the annoyance is serious enough that I'm willing to switch back and forth between log levels.
-
iviney
I have been having this problem too, on Windows XP, Rails 3.0.5 and Ruby 1.9.2-p180: Ruby crashes and exits with error code -1073741819. The crash is 'An unhandled win32 exception occurred in ruby.exe [ 7952 ]'. The Visual Studio debugger then says, 'Unhandled exception at 0x62e1a00e in ruby.exe: 0xC0000005: Access violation writing location 0x0000000c.'
In my case I didn't have a missing resource file, but the problem occurred after the log said:
Started GET "/states.js" for 127.0.0.1 at 2011-04-18 20:14:40 +1200This was issued as a result of the following Rails code (this is in the Spree code base):
<%= javascript_include_tag 'checkout', '/states' %>The javascript response is (usually) generated by the default action of the states controller. The crashes stopped when I changed the logging level in config/environments/development.rb:
config.log_level = :warn(Thanks, Zaknafein88!) A proper fix would be nice. :-)