I'm using gpgme with python to encrypt/decrypt some data using pipes.
I experienced a segfault and started a hard search for the reason.
The final reason was not my application, but the python exception handler of abrt (abrt_exception_handler3).
It is doing some inspection of the objects which might have caused the exception, which also includes the gpg Context object.
A small snippet to reproduce the problem:
import gpg import sys def handle_exception(etype, value, tb): trace = tb while trace.tb_next: trace = trace.tb_next frame = trace.tb_frame for (key, val) in frame.f_locals.items(): "{0}: {1}".format(key, repr(val)) sys.excepthook = lambda etype, value, tb: \ handle_exception(etype, value, tb) with gpg.Context() as ctx: raise Exception("error")
I'm running Fedora 36 with gpgme-1.15.1-6.fc36.x86_64 and python3-gpg-1.15.1-6.fc36.x86_64.