OK, I now have better instrumentation (OOPS-c19ccefbed6bcb7b0d094cc14e180842) and I think I see the problem: it's essentially the same kind of thing I was working on in https://lists.gnupg.org/pipermail/gnupg-devel/2017-September/033086.html. Since a modified version of that patch has landed in gpgme 1.10.0, I'm going to backport it to our production systems.
OK, I now have better instrumentation (OOPS-c19ccefbed6bcb7b0d094cc14e180842) and I think I see the problem: it's essentially the same kind of thing I was working on in https:/ /lists. gnupg.org/ pipermail/ gnupg-devel/ 2017-September/ 033086. html. Since a modified version of that patch has landed in gpgme 1.10.0, I'm going to backport it to our production systems.