-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Two async ops resolving exactly at the same time = assert_eq failure when doing a sync op #9903
Comments
@bartlomieju @inteon The shared queue will very soon be dropped, which will fix this bug/assert check. I remember thinking that assert might have been misplaced when reading the code, we can also just move it into the |
Thank you for the bug report. Line 415 in f46e39c
|
@bartlomieju @inteon Pushed a quickfix #9904 I don't think the quickfix is necessary, since I plan to submit a PR dropping the shared queue today or tomorrow. But I'll let you guys decide on that. |
@bartlomieju @fasterthanlime |
Can someone comment on this thread when a new version of |
A new version will be released on Tuesday 13th of April. |
This is a fun one!
I kept hitting this assertion:
And eventually investigated a bit.
This only seems to happen if:
By the time the sync op is dispatched,
deno_core::bindings::send
expect "everything to have been shifted off the shared queue" bycore.js
, but it hasn't been yet, because it's doing so in a loop:I was able to work around this issue by not calling any async handler until we're done collecting
shift()
(ie. until it returns null):Ideally this issue would be a PR with a clean reproduction (outside of my large codebase), but that's going to take me some time, in the meantime I'd be happy to know if I identified the right problem / if this seems like a good solution.
This is the full diff of my fix/workaround btw:
The text was updated successfully, but these errors were encountered: