Bug #4573
closed[BUG] Segmentation fault - Ruby interpreter (CUI) 1.9.2p180 [i386-mingw32] has stopped working
Description
=begin
Scenario : run existing ROR application on windows 7 with Service Pack 1 installed (all windows updates were done)
(this same application works fine on xp and ubuntu)
Note: I have installed on my machine mysql 5.1
Steps followed by us:
- Installed latest ruby (rubyinstaller-1.9.2-p180.exe) for windows on windows 7 machine with Path option checked. (c:\Ruby192)
[Command] ruby -v
[Output]: ruby 1.9.2p180 (2011-02-18) [i386-mingw32] - started ruby console with admin rights to upgrade all the gems(followed instructions from Apress.Beginning.Rails.3.Sep.2010.pdf):
gem update --system
gem sources -a http://gemcutter.org
gem install rails
rails -v
[Output]: Rails 3.0.6 - download latest devkit(DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe) and run all the requested install comands (c:\DevKit)
ruby dk.rb init
ruby dk.rb install
gem install rdiscount --platform=ruby #used to verify it installed correctly - In application directory (path doesn't contains spaces) run the following commands
bundle install
rails s
The last command is returning the following error:
rails s
Booting WEBrick
Rails 3.0.6 application starting in development on http://0.0.0.0:3000
Call with -d to detach
Ctrl-C to shutdown server
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.6/lib/active_support/core_ext/module/introspection.rb:79: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18) [i386-mingw32].......I've attached all the command output in a file.
=end
Files
Updated by rmiron (Rares Miron) over 13 years ago
=begin
Is these bug handled by someone? There is a week since it was created.
=end
Updated by usa (Usaku NAKAMURA) over 13 years ago
- Status changed from Open to Assigned
- Assignee changed from wanabe (_ wanabe) to luislavena (Luis Lavena)
=begin
Hmm, Luis, how do you think?
=end
Updated by luislavena (Luis Lavena) over 13 years ago
- Status changed from Assigned to Feedback
=begin
Hello,
I see you commented on installed mysql 5.1, what mysql gem are you using? "mysql" or "mysql2"?
Asking this because the binary version of mysql gem strictly requires mysql 5.0, not 5.1.
That could lead to some segfaults if certain methods of the extension are invoked.
Also, can you verify that Service Pack 1 did not enable DEP validation?
See this in RubyInstaller troubleshooting page:
https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#dep_segfault
If you have a clean Rails 3 application that present this issue, please upload to GitHub so I can clone it and test it locally.
Thank you.
=end
Updated by rmiron (Rares Miron) over 13 years ago
=begin
Hello,
Thanks for your suggestions.
I've checked the mysql gem version using:
bundle show mysql
C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32
I've checked the mysql site and Windows 7 is compatabile just with mysql 5.1 or 5.5.
http://www.mysql.com/support/supportedplatforms/database.html
The DEP is enabled by default, I've added the ruby executable to the DEP rules.
After windows restart the error is still reproducing in the same manner.
Unfortunatelly, I can't provide you access to the project source files. (Rails 3 application as you mentioned)
If you have any other suggestion I could try it would be great, I'm forced to work on 2 systems in the meantime.
Thanks again for your support.
=end
Updated by luislavena (Luis Lavena) over 13 years ago
=begin
In relation to MySQL 5.1 or 5.5, did you place libmysql.dll from MySQL 5.0?
As I mentioned, the binary of the gem really requires the exact version of MySQL library:
http://blog.mmediasys.com/2009/08/21/mysqlruby-2-8-1-released/
Please place libmysql.dll from a 5.0 version of MySQL in the Ruby bin directory just to discard any possible issues with it.
As for the source code, can you provide me at least a list of gems that compose the project bundle (Gemfile)? Something to take a look and work with.
This is important for me for trying to reproduce the issue.
=end
Updated by rmiron (Rares Miron) over 13 years ago
=begin
Hi Luis,
Many thanks,
The issue is solved now.
I've copied the libmysql.dll from another Windows machine with mysql 5.0 instaled version into the Ruby bin directory and this fixed the problem.
I appreciate the effort for helping me solve this issue.
=end
Updated by luislavena (Luis Lavena) over 13 years ago
- Status changed from Feedback to Closed
=begin
Awesome to hear that, closing this out.
On a sidenote:
Is a bummer the issues related to the MySQL DLL binary compatibility and the segfaults it generates, I hope have time to work on an update to that that is more clear and solve the problem moving forward for everybody.
=end