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

Fix concurrency issues on Apple Silicon #73

Merged
merged 2 commits into from
Aug 30, 2022
Merged

Conversation

slp
Copy link
Contributor

@slp slp commented Aug 30, 2022

No description provided.

On Apple Silicon, we were hitting a concurrency error that manifest
with recv() panicking like this:

thread '<unnamed>' panicked at 'internal error: entered unreachable
code'

Seems to be a known issue
rust-lang/rust#39364

Follow the recommendation on the thread, and switch from mpsc (which
seems its going to be retired) to crossbeam-channel.

Signed-off-by: Sergio Lopez <slp@sinrega.org>
We need an acquire fence before reading next descriptor index to make
sure we catch the latest updates on the queue.

This bug seems to be only reproducible on Apple Silicon (I've tried
other 3 AArch64 machines, without success), most likely due to it's
very large ROB.

Fixes: containers/krunvm#12

Signed-off-by: Sergio Lopez <slp@sinrega.org>
@slp slp merged commit 47bd817 into containers:main Aug 30, 2022
@slp slp deleted the fix-queue-m1 branch August 30, 2022 10:33
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.

None yet

1 participant