I was debugging smart card issues with thunderbird and saw lots of random SCARD_E_NO_SERVICE in the logs. Turned out that this was because of communication errors in pcsctun. That in turn was because g_cond_wait() was returning even though the request had not yet completed.
Turns out that this is a documented behaviour for it and it is required to run it in a loop until you can verify the transaction is done.
Tester should run Thunderbird with PCSCTUN_DEBUG=all and OPENSC_DEBUG=9 and look for 0x8010001d in the output. ThinLinc 4.10.0 should have it, but not the new code.
I did not see any tangible functional changes, so the debug log is the only known way to test.
Could reproduce with 4.10.0, but can no longer see the 0x8010001d error after upgrading to a nightly build. Was running "PCSCTUN_DEBUG=all OPENSC_DEBUG=9 thunderbird" in a ThinLinc session with smart card redirection activated.