-
Notifications
You must be signed in to change notification settings - Fork 447
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
Possible unhandleable crash in kad-dht #2216
Labels
need/triage
Needs initial labeling and prioritization
Comments
achingbrain
added a commit
that referenced
this issue
Nov 9, 2023
If a DHT query is aborted during reading, the deferred promise can become rejected while nothing is `await`ing it. Switch the implementation to use a `pushable` queue instead. Fixes #2216
3 tasks
achingbrain
added a commit
that referenced
this issue
Nov 9, 2023
If a DHT query is aborted during reading, the deferred promise can become rejected while nothing is `await`ing it. Switch the implementation to use a `pushable` queue instead. Fixes #2216
No, I think this is a possible crash though it's hard to trigger. I managed to get a repro in a test for #2225 but it was complicated slightly as mocha seems to do something funny to Registering a listener directly surfaces the error. Switching the internal implementation to use a |
achingbrain
added a commit
that referenced
this issue
Nov 10, 2023
If a DHT query is aborted during reading, the deferred promise can become rejected while nothing is `await`ing it. Switch the implementation to use a `pushable` queue instead. Fixes #2216
maschad
pushed a commit
to maschad/js-libp2p
that referenced
this issue
Nov 10, 2023
If a DHT query is aborted during reading, the deferred promise can become rejected while nothing is `await`ing it. Switch the implementation to use a `pushable` queue instead. Fixes libp2p#2216
This was referenced Jan 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Severity: ?
Description:
I have been downloading many blocks in parallel via Helia and on (rare) occasions it would crash without much of a trace:
Further debugging shows that the abort signal triggering this can be called from bitswap
Steps to reproduce the error:
Unfortunately I can't seem to trigger this reliably. The error is thrown in query-path.ts#L227. I believe this error is thrown and is uncatchable if the following steps happen:
.next
is called on the iterator AND before it is resolved. query-path.ts#L227In case that is not clear enough here is some code illustrating the error when everything aligns:
It's possible that I am barking up the wrong tree here and my crash is caused by something else but after many hours of debugging it is the only possibility that I can think of that causes this issue.
The text was updated successfully, but these errors were encountered: