Skip to content


Subversion checkout URL

You can clone with
Download ZIP


With :git dependencies in Gemfile, calling Bundler.setup causes script to become unresponsive to signals on Ruby 1.9.2-p180 #1200

nathansobo opened this Issue · 10 comments

4 participants


We're using the following Gemfile:

source ''

#gem 'erector', :path => 'vendor/erector'
gem 'erector', :git => '', :tag => 'rails3'

with the following simple ruby script:

#!/usr/bin/env ruby
require 'rubygems'
require 'bundler'

while true do
  sleep 1

on Ubuntu 11.04

When we run the script with ruby on the command line, we are unable to ctrl-c it. When we ctrl-z and then fg the script, the signal is finally handled upon re-foregrounding and the process exits. It's as if the signal is stuck or something, and re-foregrounding the process lets it go. We have also experimented with other signal traps, and none work. This bug is manifesting itself as an inability to terminate a resque-scheduler process (rake resque:scheduler) with a QUIT signal.

If we don't run Bundler.setup, all signals are processed as normal. And if we comment out the git dependency and use the file system path instead, it also works. All combinations work in Ruby 1.8.7 and on Mac OS X – it's only Ubuntu (both 10.04 and 11.04) Ruby 1.9.2-p180, and git dependencies that produce the unresponsiveness.

We've also noticed that we can't ctrl-c bundle install processes when there is a git dependency involved, which may be related.



I can confirm seeing this exact behavior on Ubuntu 11.04 with ruby 1.9.2.-p180.


I don't use Ubuntu myself, so I can't really comment as far as that goes. That said, I'm not going to be able to help you guys regardless, because Bundler is just ruby code, and doesn't do any signal handling or processing. If interrupts work everywhere except Ubuntu 11.04 with ruby 1.9.2-p180, it sounds like you have found a bug either in Ubuntu, or in Ubuntu's Ruby package.

@indirect indirect closed this

I think it's actually a bug in the ruby interpretter. We're installing Ruby from source with RVM, so it's not a package issue.

Here is a link to the bug on Ruby's site. Didn't get a very friendly reception there :-)


Ah, yeah, I think you're right and it's somehow a bad interaction between Ruby itself and Ubuntu. Seems like it would be nice to give exact repro steps on the redmine ticket, though. :)


Yeah you right (sigh)... I'll do it later :-).


FWIW, we're experiencing the same issue with same ruby and ubuntu versions with resque-scheduler.


This gist will reproduce: Ruby 1.9.2-p180, ubuntu natty 11.04, kernel version 2.6.38-8-virtual. It seems if you shell out to the system, signal trapping ceases to work. The kernel bug is reported here:


If you look at the ruby issue: you will see that the bug is in the kernel that ships with Ubuntu 11.04.

The suggested fix is to either upgrade the kernel to 2.6.39 (via kernel-ppa) or downgrade to the 10.10 kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.