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

panicked at /__w/smoldot/smoldot/light-base/src/runtime_service.rs:1845:35 #1712

Closed
ryanleecode opened this issue Mar 7, 2024 · 8 comments · Fixed by #1798
Closed

panicked at /__w/smoldot/smoldot/light-base/src/runtime_service.rs:1845:35 #1712

ryanleecode opened this issue Mar 7, 2024 · 8 comments · Fixed by #1798

Comments

@ryanleecode
Copy link

[smoldot] Smoldot v2.0.22. Current memory usage: 64.5 MiB. Average download: 99.8 kiB/s. Average upload: 3.1 kiB/s. Average CPU cores: 0.17.
0132e122:0x18b7b0 Smoldot has panicked while executing task runtime-asset-hub-kusama. This is a bug in smoldot. Please open an issue at https://github.com/smol-dot/smoldot/issues with the following message:
panicked at /__w/smoldot/smoldot/light-base/src/runtime_[service.rs:1845](http://service.rs:1845/):35:
called Option::unwrap() on a None value

Steps to Reproduce

  1. Have substrate connect installed and open the options page then open the chrome console
  2. Go to https://paritytech.github.io/substrate-connect/demo/
  3. Connect and disconnect to VPN or turn your internet on and off
  4. Refresh the webpage in step 2.
  5. Check the logs in the substrate connect options console and also the logs in the webpage
@tomaka
Copy link
Contributor

tomaka commented Mar 10, 2024

I can't do much without the debug logs of smoldot.

@ryanleecode
Copy link
Author

Seems to be fixed as of the latest update. Closing for now.

@ryanleecode ryanleecode closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
@ryanleecode
Copy link
Author

ryanleecode commented Apr 26, 2024

Logs provided here: https://gist.github.com/ryanleecode/f7f7b4e5008ead9aa7ab0ae2ce759314
smoldot version: 2.0.22

@ryanleecode ryanleecode reopened this Apr 26, 2024
@ryanleecode
Copy link
Author

The issue is probably here https://github.com/smol-dot/smoldot/blob/main/light-base/src/sync_service.rs#L255, the other side of the channel died and panics on unwrap

@tomaka
Copy link
Contributor

tomaka commented Apr 29, 2024

The issue is probably here https://github.com/smol-dot/smoldot/blob/main/light-base/src/sync_service.rs#L255, the other side of the channel died and panics on unwrap

Line 1845 points to the call to is_near_head_of_the_chain() on the main branch, but that's misleading. In the version that you're using, it points to a different line that I linked above.

@tomaka
Copy link
Contributor

tomaka commented Apr 29, 2024

I unfortunately need the entire logs.

There's a list of blocks, and one of these is the best block. The panic is caused by the fact that the best block can't be found in the list of blocks. To figure out where it comes from I need to know all the blocks that are inserted or removed and how the best block changes. This all happens way before the actual panic.

@tomaka
Copy link
Contributor

tomaka commented Apr 29, 2024

I had already taken a look at the issue when you opened it, and I looked at it again, and I've found a bug which is fixed in #1798.
I cannot tell however if this bugfix is what causes the issue (I would need the entire logs), but it is likely to, so I'm going to close it after the PR is meged.

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 a pull request may close this issue.

2 participants