You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reading #59 I was confident that I could do it - but multithreading doesn't work for me. I've created a MS Test project that can reproduce the problem: When using a Tpm2 from multiple threads, it won't work - see https://github.com/nd1012/Demo/tree/TSS-Multithreaded/TPM
I had to find a solution for this problem fast, so I'm now using a singleton Tpm2 instance only, which I access synchronized from multiple threads - and this works like a charm. But, of course, it does decrease the apps performance in some places, where threads want to access the Tpm2.
I wonder how someone could use multiple Tpm2 instances in multiple thread without running into problems!? For me it doesn't work at all. Anyway, at the moment I'm fine with thread synchronized singleton Tpm2 instance access, and try to reduce TPM2 usage to a minimum only.
After reading #59 I was confident that I could do it - but multithreading doesn't work for me. I've created a MS Test project that can reproduce the problem: When using a
Tpm2
from multiple threads, it won't work - see https://github.com/nd1012/Demo/tree/TSS-Multithreaded/TPMExample 1: https://github.com/nd1012/Demo/blob/c802a62c36ed1086a82e6ed9a4054fa812bab5db/TPM/TPM%20Tests/Tpm2Tests.cs#L9
Only a few HMACs will be created (usually 5-6), then all other tasks fail.
Example 2: https://github.com/nd1012/Demo/blob/c802a62c36ed1086a82e6ed9a4054fa812bab5db/TPM/TPM%20Tests/SimulatorTests.cs#L9
I guess the test would run forever, 'cause there seems to be a dead-lock somewhere?
The tests use the simulator and a real TPM2 - both fail with multithreading.
Am I doing it wrong, or is there a bug?
The text was updated successfully, but these errors were encountered: