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

Bor cannot be gracefully shutdown when disconnected from Heimdall #1146

Closed
MqllR opened this issue Jan 25, 2024 · 9 comments
Closed

Bor cannot be gracefully shutdown when disconnected from Heimdall #1146

MqllR opened this issue Jan 25, 2024 · 9 comments
Labels

Comments

@MqllR
Copy link
Contributor

MqllR commented Jan 25, 2024

System information

Tested with bor 1.1.0 and 1.2.3.

Overview of the problem

When bor is disconnected from Heimdall, it seems impossible to gracefully shutdown bor. This issue can easily led to corrupted DB (kill -9 bor generally get into "Head state missing, repairing").

Reproduction Steps

Spin up a bor instance with a wrong Heimdall URL:

docker run -it --rm 0xpolygon/bor:1.2.3 server --bor.heimdall=http://1.2.3.4:1234

Wait until the block synchronization started:

Block synchronization started

Then hit Ctrl-C or send signals:

docker exec -it <container_name> kill -INT 1
docker exec -it <container_name> kill -TERM 1

Logs / Traces / Output / Error Messages

Logs from bor after receiving an interrupt signal:

Caught signal: interrupt
Gracefully shutting down agent...
{"endpoint":"[::]:8545","lvl":"info","msg":"HTTP server stopped","t":"2024-01-25T11:51:04.015831701Z"}
{"endpoint":"[::]:8546","lvl":"info","msg":"HTTP server stopped","t":"2024-01-25T11:51:04.015918833Z"}
{"lvl":"info","msg":"IPC endpoint closed","t":"2024-01-25T11:51:04.016001352Z","url":"/data/bor.ipc"}
{"attempt":3,"lvl":"info","msg":"Retrying again in 5 seconds to fetch data from Heimdall","path":"/milestone/latest","t":"2024-01-25T11:51:08.100408984Z"}
{"attempt":3,"lvl":"info","msg":"Retrying again in 5 seconds to fetch data from Heimdall","path":"/checkpoints/latest","t":"2024-01-25T11:51:08.100450328Z"}
{"attempt":1,"error":"Get \"http://xxx/milestone/lastNoAck\": context deadline exceeded","lvl":"warn","msg":"an error while trying fetching from Heimdall","path":"/milestone/lastNoAck","t":"2024-01-25T11:51:08.100520499Z"}
{"attempt":1,"lvl":"info","msg":"Retrying again in 5 seconds to fetch data from Heimdall","path":"/milestone/lastNoAck","t":"2024-01-25T11:51:08.100554963Z"}
{"err":"context deadline exceeded","lvl":"eror","msg":"Failed to fetch latest no-ack milestone","t":"2024-01-25T11:51:08.100574545Z"}
...
@MqllR MqllR changed the title Bor cannot be gracefully shutdown when not connected to Heimdall Bor cannot be gracefully shutdown when disconnected from Heimdall Jan 25, 2024
@petejkim
Copy link

Run into the same issue several times. This is very problematic

@VAIBHAVJINDAL3012
Copy link
Contributor

It shouldn't be a case, but we will check it.

Copy link

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Feb 16, 2024
@petejkim
Copy link

It shouldn't be a case, but we will check it.

It totally is the case. Please do not close this issue

@github-actions github-actions bot removed the Stale label Feb 17, 2024
@Zorato
Copy link

Zorato commented Feb 22, 2024

Experiencing the same issue

Copy link

github-actions bot commented Mar 8, 2024

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Mar 8, 2024
@manav2401 manav2401 removed the Stale label Mar 15, 2024
@manav2401
Copy link
Contributor

Hi, I am able to reproduce this issue locally. Will create a PR for fixing it soon (will updated here). Thanks for reporting.

Copy link

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Mar 31, 2024
@VAIBHAVJINDAL3012
Copy link
Contributor

We will release it in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants