Exception objects don't contain the traceback of where they were
raised from (to avoid cyclic data structures wrecking gc and causing
mem leaks), so the singular "raise obj" form creates a new traceback
from the current execution location, thus losing the original location
of the error.
Gevent explicitly wants to throw away the traceback, to release any
objects the greenlet may still be referring to, closing files,
releasing locks etc. In this case, we think it's safe, so stash the
exception info away in a holder object, and resurrect it on the other
side of the results queue.
http://stackoverflow.com/questions/9268916/how-to-capture-a-traceback-in-gevent
This can be reproduced easily with
from teuthology.parallel import parallel
def f():
raise RuntimeError("bork")
with parallel() as p:
p.spawn(f)
and looking at the resulting traceback with and without this change.