oneapi-src / oneapi-src/level-zero
Sysman API is not thread-safe when the handle is same
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 335
- Forks
- 140
- Avg merge
- 12h 32m
- Merged PRs (30d)
- 5
Description
I just want to confirm that this is the expected API behavior: When Sysman API (e.g., zesMemoryGetState) is called with same handle concurrently, they are not thread-safe.
Because almost all Sysman API doc (e.g., zesMemoryGetState Doc) says "The application may call this function from simultaneous threads.", I get an impression that all these functions are thread-safe in all cases. But in fact when calling it from concurrent threads using same handle, I get SIGABT due to memory corruption. So I guess that this "The application may call this function from simultaneous threads." requires different handles as described in the introduction section of LevelZero spec.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the zesMemoryGetState documentation and the Level Zero introduction's multithreading and concurrency section linked in the report. Reproduce the concurrent same-handle call that causes SIGABT, then compare the observed behavior with the documented threading guarantees. Done means the expected handle-concurrency behavior is confirmed and the API documentation or implementation issue is clearly identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100