back

Runaway ruby process uses 100% cpu

I’ve noticed over the last year or so that occasionally Ruby would start using 100% and I would have to kill -9 it.

I figured that I was the only one with this problem, and for some reason assumed that it was cucumber, since it usually happened after running features.

However, it looks like it happens when I close an iterm window with an open ruby console without quitting the console first.

So, I suspect now that it was happening after running features because I would finish a feature, run the specific feature, then run all the features, then commit, then be done working and quit iterm, without remembering to close a script/console session that I had open in another iterm tab.

Problem identified.

January 18, 2009

  1. Mike says:

    I never quit iTerm and I have the same problem... I also almost always quit of out console sessions...

  2. Mischa says:

    Mike - Interesting, perhaps it's something else then.

  3. ste says:

    You don't have to do anything special to reproduce it, just launch an irb session and then force-quit the Terminal, or kill the ssh connection: voila', 99% CPU usage (actually, it's more something like 15% user, 40% system and 45% idle - at least on a Mac).

  4. rezaprima says:

    apparently the culprit is readline, instead. I experienced this long ago with an app (forgot which) that use readline (waiting user input)