Bug #4256

[BUG] Segmentation fault ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

Added by mahendravadar (Rama Mahendravada) over 7 years ago. Updated 4 months ago.

Target version:
ruby -v:
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]


Scenario : upgraded the existing ROR application from 1.8.6/2.8.1 => 1.9.2/3.0.1

Steps followed by us:

  1. Installed latest ruby 1.9.2 p0 for windows on xp machine.
  2. upgraded all the gems.
  3. Migrated the database.
  4. Invoked the delayed job using the rake jobs:work
  5. job is executing fine for the first time, once the second job is being pickedup console has this error and crashing the ruby.

Please let us know if ytou need more info. we will be glad to help you with that.

Attached the dump,

gem list
abstract (1.0.0)
actionmailer (3.0.1)
actionpack (3.0.1)
activemodel (3.0.1)
activerecord (3.0.1)
activeresource (3.0.1)
activesupport (3.0.1)
ar_fixtures (0.0.4)
archive-tar-minitar (0.5.2)
arel (1.0.1)
authlogic (2.1.6)
bones (3.5.0)
builder (2.1.2)
bundler (1.0.3)
cgi_multipart_eof_fix (2.5.0)
columnize (0.3.2, 0.3.1)
commonwatir (1.6.6)
daemons (1.1.0)
delayed_job (2.1.2)
directory_watcher (1.3.2)
dynamic_form (1.1.3)
erubis (2.6.6)
firewatir (1.6.6)
gem_plugin (0.2.3)
gemsonrails (0.7.2)
google-spreadsheet-ruby (0.1.2)
hoe (2.8.0, 2.6.2)
hpricot (0.8.2 x86-mswin32)
i18n (0.4.2, 0.4.1)
json (1.4.6 x86-mingw32)
json_pure (1.4.6)
little-plugger (1.1.2)
loquacious (1.7.0)
mail (2.2.14, 2.2.7)
mime-types (1.16)
minitest (1.7.2, 1.6.0)
mongrel (1.1.5 x86-mingw32)
mysql (2.8.1 x86-mingw32)
mysql2 (0.2.6 x86-mingw32)
nokogiri ( x86-mingw32)
oauth (0.4.3)
pik (0.2.8)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.7, 0.5.6)
rails (3.0.1)
rails-upgrade (0.0.2)
railties (3.0.1)
rake (0.8.7)
rdoc (2.5.11, 2.5.8)
require (0.2.7)
RingyDingy (1.2.1)
roo (1.9.3)
rspec (1.1.12)
ruby-ole (1.2.11)
ruby_core_source (0.1.4)
rubyforge (2.0.4)
rubygems-update (1.3.7)
rwebspec (1.6.4)
s4t-utils (1.0.4)
spreadsheet (
sqlite3-ruby (1.3.1 x86-mingw32)
term-ansicolor (1.0.5)
thor (0.14.6, 0.14.3)
treetop (1.4.9, 1.4.8)
tzinfo (0.3.23)
user-choices (
why-hpricot (0.7.229)
win32-api (1.4.6 x86-mingw32)
win32-process (0.6.2)
windows-api (0.4.0)
windows-pr (1.0.9)
xml-simple (1.0.12)
yaml_db (0.2.0)
ZenTest (4.4.2, 4.4.0)
zip (2.0.2)

segmentation_error.txt (11.8 KB) segmentation_error.txt mahendravadar (Rama Mahendravada), 01/10/2011 05:02 PM


#1 Updated by sorah (Sorah Fukumori) over 7 years ago

  • Status changed from Open to Feedback

Thank you for your report, but it needs feedback.

  • Can you produce small reproducing code?
  • Does delayed_work gem include native extensions?

See also:

#2 Updated by luislavena (Luis Lavena) over 7 years ago


Also note the follow: JSON binary gem is not compatible with Ruby 1.9.2, it only provides binaries for Ruby 1.8.6, and you need to compile yourself.

Please search for this on on Google (json ruby 1.9.2 windows) which will provide you links to RubyInstaller group where this was discussed.


#3 Updated by mahendravadar (Rama Mahendravada) over 7 years ago

@Shota : I am new to ruby can tell me what does it mean by "native extensions" of delayed_work? As we are using delayed_job gem not delayed_work.

@Luis : No need for the JSON gem, so removed it and still getting the same error.

#4 Updated by luislavena (Luis Lavena) over 7 years ago

Can you please check what "C:/Program Files/waftt/lib/script_worker2.rb:152" is requiring in that line?

It is triggering a dependency on one library (that ActiveSupport is loading) but there is no indication in the backtrace due the metamagical nature of Rails.

Also, seems you have both mysql and mysql2 installed, both in binary form, which one are you using?

Asking this because:

  • mysql gem requires an specific version of MySQL to be installed, during installation it outputs what version of libmysql.dll it requires, if you fail to comply that, chances are you're going to get a segfault

  • mysql2 gem works on Windows, but there has been some reports of issues, so if using it, chances are it could be the root of the segfault.

Also, try avoiding path with spaces for your installations. Ruby, mainly *nix scripts do not handle properly path with spaces (Program Files directory for example). Try avoiding installing things in these directories.

Last but no least, try to provide as much more information about the issue than you're currently reporting, for example, what is your config/database.yml contents, what your application is using, etc.

Without that information, we can only scratch our head.

Thank you.

#5 Updated by luislavena (Luis Lavena) over 7 years ago

Also, forgot to mention but win32-* gems that are binaries (win32-api 1.4.6 mingw32) do not contain binaries for Ruby 1.9.2, similar to JSON example I mentioned before.

Proceed to removal in case you're not using them or follow the instructions I provided before.

#6 Updated by mahendravadar (Rama Mahendravada) over 7 years ago

As mentioned I am very new to the ROR, please ask me specific questions so that I can provide you the required data.

  1. Uninstalled the mysql2. (which was installed in the ruby directory, we are not using it)
  2. bundle install.
  3. libmysql.dll is in the path.
  4. Mysql version : mysql-5.0.83-win32
  5. as of now our application is related to the path mention will try to check the dependencies before altering it.

at the line number 152 myworker is a trying to intiate the object of class X using from the file named x.rb which is in same folder.

database: waftt_development
adapter: mysql
encoding: utf8
username: root
password: **************
socket: /tmp/mysql.sock
host: localhost
port: 3306
reconnect: true

'rails', '3.0.1'
'authlogic', '2.1.6'
'mysql', '2.8.1'
'sqlite3-ruby', :require => 'sqlite3'
'delayed_job', '2.1.2'
'RingyDingy', '1.2.1'
'ar_fixtures', '0.0.4'

The above are the only gems we have now and the dependencies.

Thank you


#7 Updated by mahendravadar (Rama Mahendravada) over 7 years ago

Sorry, forgot to mention application is using watir 1.6.7 to support the functionality in X.rb mentioned above.

and we added the code to intialize the win32ole by using WIN32API.coInitiallize(), to get the access to the window objects.

I hope this information will be helpful.

@Luis Lavena : Thank you for the directions specified,

We have the watir 1.6.7 (=activesupport 2.3.9) which is not compatiable with the rails 3.0 (activesupport >=3.0.0) due to its active support dependency. We have taken the out watir script execution and then segmentation error disappeared.

We have gone thru your article "Using different versions of gems across application doesnot work" on engineyard community- "Luis Lavena".

Is there any way that we can load the different versions of active support dynamically at runtime or any other .

any suggestions / direction in regard is greatly anticipated.


#8 Updated by mahendravadar (Rama Mahendravada) over 7 years ago

Hi all,

The issue was resolved when we uninstalled IE7 and installed IE6. We want know if there is any compatibility issues of Ruby 1.9.2 and the other installed gems, with IE7.

The same code however, is working with Ruby 1.8.6 and IE7.


#9 Updated by naruse (Yui NARUSE) almost 7 years ago

  • Assignee set to suke (Masaki Suketa)

#10 Updated by naruse (Yui NARUSE) about 5 years ago

  • Target version changed from 1.9.2 to 2.6

#11 Updated by naruse (Yui NARUSE) 4 months ago

  • Target version deleted (2.6)

Also available in: Atom PDF