guard / rb-inotify

A thorough inotify wrapper for Ruby using FFI.
MIT License
312 stars 64 forks source link

Allows versions of ffi (1.9.22, 1.9.23) that throw SIGABRT (RHEL/Centos) or Segfault (MacOS) #86

Closed msducheminjr closed 5 years ago

msducheminjr commented 6 years ago

I recently updated a Rails 5.1 bundle on systems running Centos 6 and RHEL7 and then my DelayedJob workers would abort when I tried to start the commands.

$ bin/delayed_job start
pid-file for killed process 22998 found (/rails_app/pids/delayed_job.pid), deleting.
delayed_job: process with pid 16048 started.
Aborted (core dumped)
$ 

I chased the bundle update down gem by gem and determined that bundle update spring-watcher-listen was causing the Aborted on DelayedJob startup.

There are issues Segfault on macOS with ffi > 1.9.21 and SIGABRT on Centos/RHEL 6+7 open or FFI for this, but it may make sense to modify the gemspec to exclude ffi versions 1.9.22 and 1.9.23.

I also just tried a fresh rails new testapp and ffi locks at 1.9.23, so any new Rails 5.1.x app generated on Centos, RHEL, and possibly MacOS (not confirmed) could be affected.

Changing spec.add_dependency "ffi", "~> 1.0" to spec.add_dependency "ffi", "~> 1.0", '!= 1.9.22', '!= 1.9.23' solved the issue for me locally.

techgique commented 6 years ago

We are running our apps on CentOS 7 with Phusion Passenger via Apache. We also recently updated a few Rails apps to Ruby 2.5.1 and Rails 5.2.0 and have seen sporadic "Incomplete response received from application" Apache error pages. Looking at the logs, I see this:

/usr/local/rvm/gems/ruby-2.5.1@earlywashingtondc/gems/rb-inotify-0.9.10/lib/rb-inotify/notifier.rb:54: [BUG] Segmentation fault at 0x0000000000000000

Our Gemfile.lock reads ffi (1.9.23) so we're trying the suggested changes to version constraints. Thanks @msducheminjr for your notes.

ioquatix commented 5 years ago

Has upstream ffi fixed this issue yet?

ioquatix commented 5 years ago

I see the latest version is 1.9.25 - does this fix the issue?

ioquatix commented 5 years ago

Assuming this is no longer a problem, as ffi has released new versions.