[zeromq-dev] [PATCH] Fixed OOM handling while writing to a pipe

Martin Sustrik sustrik at 250bpm.com
Fri May 20 12:21:39 CEST 2011


Paul,

> But as currently nobody expects zeromq to work under OOM,
> it's probably fine to live with this for some time.

There's one important point to be made: 0MQ currently behaves 100% 
predictably in OOM condition -- it terminates the process. User is then 
free to restart the process or take whatever emergency measures are 
necessary.

Any patches to OOM handling should preseve this 100% predictability. 
zmq_send() can return ENOMEM instead of terminating the process, 
however, it must do so consistently. Introducing undefined behaviour 
under OOM conditions is not an option.

Martin



More information about the zeromq-dev mailing list