Bug #4573


[BUG] Segmentation fault - Ruby interpreter (CUI) 1.9.2p180 [i386-mingw32] has stopped working

Added by rmiron (Rares Miron) about 11 years ago. Updated about 11 years ago.

Target version:
ruby -v:
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]


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:

  1. 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]
  2. 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
    gem install rails
    rails -v
    [Output]: Rails 3.0.6
  3. 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
  4. 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
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.


Rails_error_output.txt (9.69 KB) Rails_error_output.txt rmiron (Rares Miron), 04/12/2011 09:02 PM

Updated by rmiron (Rares Miron) about 11 years ago

Is these bug handled by someone? There is a week since it was created.

Updated by usa (Usaku NAKAMURA) about 11 years ago

  • Status changed from Open to Assigned
  • Assignee changed from wanabe (_ wanabe) to luislavena (Luis Lavena)

Hmm, Luis, how do you think?

Updated by luislavena (Luis Lavena) about 11 years ago

  • Status changed from Assigned to Feedback


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:

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.


Updated by rmiron (Rares Miron) about 11 years ago


Thanks for your suggestions.

I've checked the mysql gem version using:
bundle show mysql

I've checked the mysql site and Windows 7 is compatabile just with mysql 5.1 or 5.5.

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.


Updated by luislavena (Luis Lavena) about 11 years ago

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:

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.

Updated by rmiron (Rares Miron) about 11 years ago

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.

Updated by luislavena (Luis Lavena) about 11 years ago

  • Status changed from Feedback to Closed

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.



Also available in: Atom PDF