eclipse-iceoryx / eclipse-iceoryx/iceoryx
Make history acquisition lock-free - A perfect job for our future selves
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 492
- Avg merge
- 18h 57m
- Merged PRs (30d)
- 1
Description
## Brief feature description
To cite the grand master @budrus himself:
There are currently some challenge:
For the stored queues and the history, containers are used which are not thread safe. Therefore we use an
inter-process mutex. But this can lead to deadlocks if a user process gets terminated while one of its
threads is in the ChunkDistributor and holds a lock. An easier setup would be if changing the queues
by a middleware thread and sending chunks by the user process would not interleave. I.e. there is no concurrent
access to the containers. Then a memory synchronization would be sufficient.
The cleanup() call is the biggest challenge. This is used to free chunks that are still held by a not properly
terminated user application. Even if access from middleware and user threads do not overlap, the history
container to cleanup could be in an inconsistent state as the application was hard terminated while changing it.
We would need a container like the UsedChunkList to have one that is robust against such inconsistencies....
**A perfect job for our future selves**
Contributor guide
Research direction
Start by reading the ChunkDistributor, the stored-queue and history access paths, cleanup(), and the existing UsedChunkList. Trace how middleware and user threads access these containers and how hard termination affects cleanup. Done means the history acquisition and cleanup approach avoids the inter-process mutex and remains robust against inconsistent state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100