Skip to content

.NET library multithreading problems #186

@nd1012

Description

@nd1012

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

Example 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions