Skip to content

tsan warning: lock-order-inversion (potential deadlock) #14

Closed
@larsonmpdx

Description

@larsonmpdx

found this when running llvm thread sanitizer on my program which has control flow similar to the pubsub sample:

https://github.com/aws/aws-iot-device-sdk-cpp/blob/master/samples/PubSub/PubSub.cpp

tsan warns about this mutex sequence:

first sync_action_response_lock_ here:
https://github.com/aws/aws-iot-device-sdk-cpp/blob/master/src/ClientCoreState.cpp#L98

ack_map_lock_ here:
https://github.com/aws/aws-iot-device-sdk-cpp/blob/master/src/ClientCoreState.cpp#L197

then sync_action_response_lock_ again here:
https://github.com/aws/aws-iot-device-sdk-cpp/blob/master/src/ClientCoreState.cpp#L112

before I investigate further, is this something you've seen in testing or maybe fixed in an upcoming release?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.closed-for-stalenessguidanceQuestion that needs advice or information.help wantedWe are asking the community to submit a PR to resolve this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions