[openstack-dev] [Oslo] Does ZeroMQ RPCs handle caller side exceptions correctly?

Eric Windisch eric at cloudscaling.com
Sun Jan 27 17:54:28 UTC 2013


>  A simply try/catch around proxy.dispatch() like in amqp.py would be the fix.
> 


Such as on line 269 of impl_zmq.py?

The code actually calls proxy.dispatch() in two places. I suppose you're referring to line 339 where proxy.dispatch() is called without catching exceptions? This is in the processing of a cast(), not a call(). As no response is expected from a cast(), the exception isn't caught, raises, and the greenthread dies.  The greenthread, by the way, was spawned by 'def consume' around line 557 using spawn_n. It is an untracked thread.

>From experience, I believe I've seen stacktraces from these greenthreads enter logs. It could be that changes to the logging module make it such that that is no longer the case, or that individual logging preferences would change that behavior. It might even be worthwhile, as you suggest, to explicitly catch and log remote exceptions, even for cast().

Regards,
Eric Windisch






More information about the OpenStack-dev mailing list