Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support loom in rtic-common and rtic-sync. Fix rtic-sync bug. #1027

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

datdenkikniet
Copy link
Contributor

@datdenkikniet datdenkikniet commented Mar 9, 2025

Adds --cfg loom support to rtic-common and rtic-sync.

Additionally, adds a test for an rtic-sync bug & fixes it (I cannot find the bug report itself here on github).

Perhaps splitting out the bug fix into its own PR (d8f8a15) is desirable. I can do that if we deem that it makes sense.

Fixes #780

A description of the path leading to the bug, which also proves that the fix actually solves the problem:

  1. try_recv pushes into freeq.
  2. Before popping wait_queue, an interrupt occurs.
  3. send no. 1 eats up the freeq slot.
  4. send no. 2 is called, pushes its link to wait_queue and goes to sleep (because freeq is now empty)
  5. Control returns to try_recv, which pops wait_queue (from the newly waiting send call) without touching the free queue.
  6. send is awoken at some point. Its link is popped, but the freeq is empty.

@datdenkikniet datdenkikniet force-pushed the loom2 branch 2 times, most recently from fae1035 to 0bbd46d Compare March 10, 2025 15:15
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.

assertion failed: !self.0.access(cs).freeq.is_empty() in rtic-sync 1.0.1 when trying to send data to channel
1 participant