for ob in gc.get_objects():
    if not isinstance(ob, greenlet):
        continue
if not ob:
    continue
log.error(''.join(traceback.format_stack(ob.gr_frame)))
In gevent, how can I dump stack traces of all running greenlets?