[BUG] Segmentation fault 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:
- Installed latest ruby 1.9.2 p0 for windows on xp machine.
- upgraded all the gems.
- Migrated the database.
- Invoked the delayed job using the rake jobs:work
- 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,
columnize (0.3.2, 0.3.1)
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)
mail (2.2.14, 2.2.7)
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 (126.96.36.199 x86-mingw32)
rack-test (0.5.7, 0.5.6)
rdoc (2.5.11, 2.5.8)
sqlite3-ruby (1.3.1 x86-mingw32)
thor (0.14.6, 0.14.3)
treetop (1.4.9, 1.4.8)
win32-api (1.4.6 x86-mingw32)
ZenTest (4.4.2, 4.4.0)
#1 Updated by sorah (sorah Shota Fukumori) over 6 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: http://redmine.ruby-lang.org/wiki/ruby/HowtoReport
#2 Updated by luislavena (Luis Lavena) over 6 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 6 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 6 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.
#5 Updated by luislavena (Luis Lavena) over 6 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 6 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.
- Uninstalled the mysql2. (which was installed in the ruby directory, we are not using it)
- bundle install.
- libmysql.dll is in the path.
- Mysql version : mysql-5.0.83-win32
- 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 X.new from the file named x.rb which is in same folder.
'sqlite3-ruby', :require => 'sqlite3'
The above are the only gems we have now and the dependencies.
#7 Updated by mahendravadar (Rama Mahendravada) over 6 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 6 years ago
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.