Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

fix(hamt): catch panic in walkChildren #123

Closed
wants to merge 1 commit into from

Conversation

schomatis
Copy link
Contributor

Catch panic from ipfs/kubo#9063. Both links and children seem to have a nil value at some position of the array (this is inconsistent per our own documentation and should never happen).

I have no idea what's causing this. It could either have been introduced during sharding or just exposed by it. In any case unless this is recurrent I don't see much value in delving deeper, if anything we should be investing in cleaning HAMT internals first.

As a defensive refactoring I'm iterating children instead of links as the existing each() already does for walkTrie, but this should be a no-op.

@BigLep
Copy link

BigLep commented Jul 22, 2022

2022-07-22 conversation: before we merge this code, we want to understand why we are even hitting this case to begin with. @ajnavarro is going to dig in here to help and will consult with @aschmahmann if necessary.

@schomatis
Copy link
Contributor Author

Sounds good, un-assigning then. Ping me if I can be of help.

@schomatis schomatis removed their assignment Jul 22, 2022
@schomatis
Copy link
Contributor Author

@ajnavarro One more thought: I'd still advise landing this while delving deeper into the issue. It's not a proper fix but doesn't do additional harm either; worst case scenario you may catch the issue in the wild again with more information now from the log.

@ajnavarro
Copy link
Member

Fixing a race condition here: #124

@Jorropo
Copy link
Contributor

Jorropo commented Jun 26, 2023

Moved to ipfs/boxo#393

@Jorropo Jorropo closed this Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants