valgrind aborts after fork during replay
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
#16. My guess is that valgrind saves a tid value before ptrace-seize, then after makes a syscall that exposes a tid. Since before-seize the tid is real, and afterwards emulated from the recording, the world changes out from under valgrind and it's unhappy.
valgrind: ../../coregrind/m_scheduler/sema.c:139 (vgModuleLocal_sema_up): Assertion 'sema->owner_lwpid == VG_(gettid)()' failed.
This obviously causes a replay divergence and rr abort.
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 at the Valgrind assertion in coregrind/m_scheduler/sema.c:139 and trace the interaction around fork, ptrace-seize, and replayed thread IDs. Reproduce the failure and determine what change prevents the semaphore assertion and replay divergence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100