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

Lotus Chain Export Times Out #12882

Open
5 of 11 tasks
jamerduhgamer opened this issue Feb 8, 2025 · 1 comment
Open
5 of 11 tasks

Lotus Chain Export Times Out #12882

jamerduhgamer opened this issue Feb 8, 2025 · 1 comment
Labels
kind/bug Kind: Bug

Comments

@jamerduhgamer
Copy link

Checklist

  • This is not a security-related bug/issue. If it is, please follow please follow the security policy.
  • I have searched on the issue tracker and the lotus forum, and there is no existing related issue or discussion.
  • I am running the Latest release, the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.
  • I did not make any code changes to lotus.

Lotus component

  • lotus daemon - chain sync
  • lotus fvm/fevm - Lotus FVM and FEVM interactions
  • lotus miner/worker - sealing
  • lotus miner - proving(WindowPoSt/WinningPoSt)
  • lotus JSON-RPC API
  • lotus message management (mpool)
  • Other

Lotus Version

lotus version
Daemon:  1.30.0+mainnet+git.9c1964e8a+api1.5.0
Local: lotus version 1.30.0+mainnet+git.9c1964e8a

Repro Steps

  1. Run 'lotus chain export --recent-stateroots=900 --skip-old-msgs snapshot_mainnet_2025-02-06'
  2. See error:

2025-02-07T09:08:58.155Z WARN rpc [email protected]/websocket.go:871 websocket long time no response {"lastAction": "pong", "time": 14.236651866}
2025-02-07T10:42:29.823Z ERROR rpc [email protected]/websocket.go:850 Connection timeout {"remote": "127.0.0.1:1234", "lastAction": ""}
2025-02-07T10:42:29.824Z WARN rpc [email protected]/websocket.go:861 failed to write close message: write tcp 127.0.0.1:51338->127.0.0.1:1234: use of closed network connection
2025-02-07T10:42:29.824Z WARN rpc [email protected]/websocket.go:864 websocket close error {"error": "close tcp 127.0.0.1:51338->127.0.0.1:1234: use of closed network connection"}
ERROR: incomplete export (remote connection lost?) '

Describe the Bug

Trying to create a snapshot of the chain using the following command

lotus chain export --recent-stateroots=900 --skip-old-msgs snapshot_mainnet_2025-02-06

and it times out after a few days with the incomplete export error.

Logging Information

lotus log level was set to debug for the course of the chain export attempt. the file is >9 GB so let me know what log lines to look for!
@jamerduhgamer jamerduhgamer added the kind/bug Kind: Bug label Feb 8, 2025
@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Feb 8, 2025
@rvagg
Copy link
Member

rvagg commented Feb 11, 2025

I had a quick look at this and added some logging per-chunk and got nothing before my node borked and I gave up (disk problems, possibly unrelated). But I was surprised that I didn't even get any initial chunks through to the client, I thought it should have at least sent a CAR header. Perhaps it's buffering more than I imagined and then needed to do an initial walk, but my expectation from glancing through the code is that this is a standard traversal. The channel from the server side is delimited in 1MiB chunks so it should be spitting these across the websocket to the client.

Needs deeper investigation, it really should be able to write the file as it traverses, not buffer up a whole bunch and then do it in one go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Kind: Bug
Projects
Status: 📌 Triage
Development

No branches or pull requests

2 participants