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

Shutdown gracefully in 2 minutes or less .... #147

Merged
merged 3 commits into from Nov 18, 2020
Merged

Shutdown gracefully in 2 minutes or less .... #147

merged 3 commits into from Nov 18, 2020

Conversation

johnsonjh
Copy link

@johnsonjh johnsonjh commented Nov 3, 2020

then shutdown .... less gracefully.

Using our GoLevelDB fork, (and probably the latest upstream GoLevelDB too), panic is hooked so a graceful shutdown for at least the database is still attempted to avoid corruption.

Demonstration:

1604377240 [INF] BTCD signal.go:35: Received signal (terminated).  Shutting down...
1604377240 [INF] BTCD btcd.go:159: Attempting graceful shutdown (1m0s timeout)...
1604377240 [WRN] SRVR server.go:2372: Server shutting down
1604377240 [WRN] RPCS rpcserver.go:4016: RPC server shutting down
1604377240 [INF] RPCS rpcserver.go:4028: RPC server shutdown complete
1604377240 [INF] SYNC manager.go:1534: Sync manager shutting down
1604377240 [INF] AMGR addrmanager.go:595: Address manager shutting down
1604377300 [ERR] BTCD btcd.go:170: Graceful shutdown in 1m0s failed - forcefully terminating in 5s...
1604377305 [INF] BTCD btcd.go:109: Gracefully shutting down the database...
panic: Forcefully terminating the server process...

goroutine 1 [running]:
main.pktdMain.func3(0xc000380f00)
	btcd.go:173 +0x24b
main.pktdMain(0x0, 0x0, 0x0)
	btcd.go:188 +0x97a
main.main()
	btcd.go:345 +0x13f

then shutdown .... less gracefully. Using our
GoLevelDB fork, or the latest GoLevelDB, panic
is hooked so a graceful shutdown for at least
the database is attempted, to avoid corruption.
@johnsonjh
Copy link
Author

johnsonjh commented Nov 5, 2020

I should probably make this 2 minutes because running a build with the race detector enabled - it's that slow.

@johnsonjh johnsonjh changed the title Shutdown gracefully in a minute or less .... Shutdown gracefully in 2 minutes or less .... Nov 5, 2020
@johnsonjh
Copy link
Author

Oh, Travis.

Once again, this is a false positive test failure, see Issue #128 and the fix/workaround is in PR #161

@cjdelisle cjdelisle merged commit b5d9508 into pkt-cash:develop Nov 18, 2020
@johnsonjh johnsonjh deleted the killyourself branch December 28, 2020 23:50
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 this pull request may close these issues.

2 participants