Question

I get a slightly heisen error from eventmachine (0.12.10, on OSX 10.6.4):

terminate called after throwing an instance of 'std::runtime_error'
  what():  no loop breaker

It only occurs in tests, and only when all tests are run together. Run individually they pass.

I spotted the only place in the eventmachine code that mentions the error's message:

http://github.com/eventmachine/eventmachine/blob/master/ext/em.cpp#L333

(What puzzles me as well is that it looks like a win32 code path, or am I wrong?)

To me it looks like some ressource like sockets are used up. That would explain the occurence pattern.

Was it helpful?

Solution

Ok, I found it myself.

The error comes in fact from the win32 conditionally compiled code. I get a plain old "Too many open files" error if I build locally, and that problem is easy to releave by increasing the ulimit value for open files (which is said to be quite modest by default on OSX).

ulimit -n 1024 # or whichever value you find appropriate

(Default is 255, look at the output of ulimit -a)

If I build and install from the cloned git repository using rake gem:install, I get the expected (Unix) error message. So the bug appears to be fixed in master.

Filed bug for the rubygems.org gem is here: http://github.com/eventmachine/eventmachine/issues#issue/88

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top