eclipse-iceoryx / eclipse-iceoryx/iceoryx
Listener addEvent deadlock
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 492
- Avg merge
- 18h 57m
- Merged PRs (30d)
- 1
Description
Hi we encounter a deadlock in the Listener on b18411364d1cac72422c53a4b254fad0c9061204 in the follow situation.
We have main thread (M) and an iceoryx listener thread (L) with the following execution trace 1..4;
1(M): M creates a new iceoryx client (C1) and call Listener::attatchEvent and then send a request (Req1).
2(L): We get the reply (Req1) and go into the ReplyHandler (H1). It recursive **lock m_events[2]**.
3(M): M creates a new iceoryx client (C2) and call Listener::attatchEvent, it **locks Listener::m_addEventMutex and block on m_events[2]**
4(L): H1 creates a new iceoryx client(C3) and call Listener::attatchEvent, it **blocks on Listener::m_addEventMutex** ==> **DEADLOCK**
By judging from the attatchEvent comments ("This method can be called from any thread concurrently without any restrictions!") this is an iceoryx bug.
Please advice
Best regards
Contributor guide
Assessment
This issue has not been assessed yet.