-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
dag import
hangs indefinitely for seemingly valid CAR
#10159
Comments
Does it hang with |
@hsanjuan thanks for the pointer! Indeed, I tried importing the CAR with On the one hand, this has highlighted an actual mistake on my part when constructing the CAR. On the other hand, hanging indefinitely with no feedback seems like an insufficient mechanism to inform me of this problem. I would really like to have been given some indication of what was causing the hold up. |
Car isn't as strict as that, this car isn't wrong it just have different semantics than kubo's semantics. I've talked a bit with encoding semantics of cars in their headers with a few peoples but didn't found anyone interested and neither am I. |
Thanks for the additional context @Jorropo
I actually meant to imply that the mistake was mine, because my original intention was for the CAR to contain a complete set of blocks that includes all references that may not already be known to Kubo (this CAR was produced as part of a controlled test). At any rate, it would be nice to have received some indication from Kubo that there was a missing referenced block which it would attempt to discover elsewhere. |
What you ask for is not too easy as "dag import" is one step (which finishes) and "recursive pin" is a second separate step (which hangs), and both steps are mixed under the same API call which only does OK/NOT OK responses. The concept of timeouts when pinning does not exist in Kubo either, wanted blocks stay indefinitely on want lists. But as a workaround you can try |
@hsanjuan thank you for the suggestion of a workaround. The main place I'm encountering this issue personally is via the HTTP RPC API, so unfortunately I appreciate that there may be some complexity that makes this difficult to handle at the level of API consumer UX. Another satisfying resolution for me would be for the documentation to state clearly that this hanging behavior is a possible complication if the CAR does not contain all of the referenced blocks. The main issue for me was that I assumed that as long as I had a valid CAR, the API would behave a certain way; an appropriate warning in the documentation would go a long way towards setting my expectations. |
So to make this issue an actionable item. Everything is working as intended, it seems this behavior is not what you want. Should we transform this issue in one that would make |
@Jorropo that design would suit my use case well. It was indeed a mistake that I was trying to import blocks with missing references, and at least in my case those blocks would never be found on the network. If you're okay with such a design, I would be happy for the issue to be updated to reflect such a feature request. As I said above, I would also be satisfied with documentation updates. |
triage:
|
triage notes:
|
Thanks for this thread - helped me to figure out why my dag import was hanging. I did also find out that I actually want to upload a CAR which is not including all referenced CIDs - it's not directly related to this but thought if I'm lucky the the implementation decisions also incorporate my use-case (e.g. adding a way to pin all blocks in CAR instead of roots?) |
Checklist
Installation method
ipfs-desktop
Version
Config
Description
What I wanted to do
Import a CARv1 via Kubo's
dag import
API.What happened instead
Kubo hangs with no output.
Reproduction steps
test.car
ipfs dag import ./test.car
Problematic CAR
The CAR itself: test.car.zip
The output from running
car inspect
(via go-car) ontest.car
: test.car.debug.txtElaboration
I recently ran into an issue where a CARv1 that I produced could not be added to Kubo via the
dag import
routine. The problem occurs when I doipfs dag import
and also when I invoke the corresponding HTTP RPC API/v0/dag/import
.As a smoke test, I verified that my node could import CAR files via these interfaces by importing the test fixture found at https://ipld.io/specs/transport/car/fixture/carv1-basic/.
Additionally, I wrote a small utility to read back the CAR myself based on my understanding of the spec, and also attempted to analyze the CAR with with go-car. As far as I can tell from my use of these tools, the CAR is valid.
The text was updated successfully, but these errors were encountered: