Skip to content

Conversation

@youknowone
Copy link
Member

@youknowone youknowone commented Feb 2, 2026

parking_lot_core maintains a global hash table (HASHTABLE) mapping lock addresses to queues of parked threads. Each bucket holds a linked list of ThreadData pointers.

fork() copies all memory but only one thread survives in the child. The hash table still references ThreadData of the dead threads, WordLocks held by them will never be released, and queue pointers become stale. When the child later hits a contended lock, park() follows these stale pointers and segfaults.
parking_lot_core currently has no such handling for child process

Issue reported to parking_lot Amanieu/parking_lot#515

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 2, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant