Author

Topic: Bitcoin core shutdown fails / hungs (Read 276 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
September 16, 2019, 11:42:03 AM
#8
This is very likely to be a bug in Bitcoin Core. There is already an open issue for this problem: https://github.com/bitcoin/bitcoin/issues/16778.
newbie
Activity: 4
Merit: 0
September 16, 2019, 08:17:38 AM
#7
UPD: Resolved!

Not know in details but problem with my local (ISP) DNS server. When I start bitcoind with local DNS - it fails to shutdown all time.
When I change DNS to 8.8.8.8 - and start bitcoind - shutdown works ideally!

Maybe my ISP blocks something etc. I just don't have time now to explore this question. Maybe later. For now I just changed to use 8.8.8.8 in my local net and problem gone!

Do you have a router? If so, can there be a problem in it?
newbie
Activity: 13
Merit: 3
September 16, 2019, 04:29:16 AM
#6
UPD: Resolved!

Not know in details but problem with my local (ISP) DNS server. When I start bitcoind with local DNS - it fails to shutdown all time.
When I change DNS to 8.8.8.8 - and start bitcoind - shutdown works ideally!

Maybe my ISP blocks something etc. I just don't have time now to explore this question. Maybe later. For now I just changed to use 8.8.8.8 in my local net and problem gone!
legendary
Activity: 1610
Merit: 1183
September 05, 2019, 06:38:49 PM
#5
So it basically wants to re-download the whole chain after you shut it down and start again? Odd I have never observed that issue. Which OS are you exactly running?

This has been happening to me for years too, tested on Windows nodes as well. The only workaround I've found is run a shortcut with this:

-reindex-chainstate

Remove the shortcun when completed. I think it may be related to RPC calls, a lot of people complained for years with problems related to crashes while shutting down and it's still not nailed down for all system it seems. I can't see anything odd on the logs. I have to run that shortcut whenever it starts derping again.
OP should try this. I've seen luke-jr recommend this (albeit on an issue which was a bit different) a couple times for similar problems. (Although OP seems to indicate that he has installed/uninstalled bitcoin core multiple times, so the issue might not be directly related to his Bitcoin Core software but rather... settings/hardware .. ?)

Right now im not sure if uninstalling Bitcoin Core typically in your "uninstall wizard" doesn't necessarily delete the files on the bitcoin folder. And if it does, I guess it not necessary, if keeps happening often then it must be an error involving faulty RAM, so scan your RAM for errors.
legendary
Activity: 1946
Merit: 1427
September 05, 2019, 10:04:37 AM
#4
So it basically wants to re-download the whole chain after you shut it down and start again? Odd I have never observed that issue. Which OS are you exactly running?

This has been happening to me for years too, tested on Windows nodes as well. The only workaround I've found is run a shortcut with this:

-reindex-chainstate

Remove the shortcun when completed. I think it may be related to RPC calls, a lot of people complained for years with problems related to crashes while shutting down and it's still not nailed down for all system it seems. I can't see anything odd on the logs. I have to run that shortcut whenever it starts derping again.
OP should try this. I've seen luke-jr recommend this (albeit on an issue which was a bit different) a couple times for similar problems. (Although OP seems to indicate that he has installed/uninstalled bitcoin core multiple times, so the issue might not be directly related to his Bitcoin Core software but rather... settings/hardware .. ?)
newbie
Activity: 38
Merit: 0
September 04, 2019, 10:36:10 PM
#3
So it basically wants to re-download the whole chain after you shut it down and start again? Odd I have never observed that issue. Which OS are you exactly running?
legendary
Activity: 1610
Merit: 1183
September 04, 2019, 07:31:05 PM
#2
This has been happening to me for years too, tested on Windows nodes as well. The only workaround I've found is run a shortcut with this:

-reindex-chainstate

Remove the shortcun when completed. I think it may be related to RPC calls, a lot of people complained for years with problems related to crashes while shutting down and it's still not nailed down for all system it seems. I can't see anything odd on the logs. I have to run that shortcut whenever it starts derping again.

newbie
Activity: 13
Merit: 3
August 31, 2019, 12:51:43 PM
#1
Hi everyone!

I have problem with shutting down bitcoin core on linux platform for years with different bitcoin core versions Sad
bitcoind and bitcoin-qt hungs after shutdown it. In bitcon.conf only one line - server=1

Note that is with empty database (like 1st bitcoind run!)

Here is debug.log with debug=0:
...

2019-08-31T16:29:46Z Shutdown: In progress...
2019-08-31T16:29:46Z net thread exit
2019-08-31T16:29:47Z msghand thread exit

Here is debug.log with debug=1:
...
019-08-31T16:46:40Z Shutdown: In progress...
2019-08-31T16:46:40Z Stopping HTTP RPC server
2019-08-31T16:46:40Z Unregistering HTTP handler for / (exactmatch 1)
2019-08-31T16:46:40Z Unregistering HTTP handler for /wallet/ (exactmatch 0)
2019-08-31T16:46:40Z Stopping RPC
2019-08-31T16:46:40Z RPC stopped.
2019-08-31T16:46:40Z Stopping HTTP server
2019-08-31T16:46:40Z Waiting for HTTP worker threads to exit
2019-08-31T16:46:40Z libevent: epoll_dispatch: epoll_wait reports 1
2019-08-31T16:46:40Z libevent: event_active: 0x559cf948bda0 (fd 24), res 2, callback 0x7fc92f469610
2019-08-31T16:46:40Z libevent: event_process_active: event: 0x559cf948bda0, EV_READ   call 0x7fc92f469610
2019-08-31T16:46:40Z libevent: event_base_loop: asked to terminate loop.
2019-08-31T16:46:40Z libevent: event_del: 0x7fc914000d00 (fd -1), callback 0x559cf681f6d0
2019-08-31T16:46:40Z torcontrol thread exit
2019-08-31T16:46:40Z addcon thread exit
2019-08-31T16:46:40Z opencon thread exit
2019-08-31T16:46:40Z libevent: event_del: 0x559cf8d236c8 (fd 9), callback 0x7fc92f476500
2019-08-31T16:46:40Z libevent: Epoll DEL(1) on fd 9 okay. Old events were 2; read change was 2 (del); write change was 0 (none); close change was 0 (none)
2019-08-31T16:46:40Z libevent: event_del: 0x559cf8d230a8 (fd 10), callback 0x7fc92f476500
2019-08-31T16:46:40Z libevent: Epoll DEL(1) on fd 10 okay. Old events were 2; read change was 2 (del); write change was 0 (none); close change was 0 (none)
2019-08-31T16:46:40Z Waiting for HTTP event thread to exit
2019-08-31T16:46:40Z libevent: epoll_dispatch: epoll_wait reports 1
2019-08-31T16:46:40Z libevent: event_active: 0x559cf8d228e0 (fd Cool, res 2, callback 0x7fc92f469610
2019-08-31T16:46:40Z libevent: event_process_active: event: 0x559cf8d228e0, EV_READ   call 0x7fc92f469610
2019-08-31T16:46:40Z libevent: event_base_loop: no events registered.
2019-08-31T16:46:40Z Exited http event loop
2019-08-31T16:46:40Z libevent: event_del: 0x559cf8d228e0 (fd Cool, callback 0x7fc92f469610
2019-08-31T16:46:40Z libevent: Epoll DEL(1) on fd 8 okay. Old events were 2; read change was 2 (del); write change was 0 (none); close change was 0 (none)
2019-08-31T16:46:40Z libevent: event_base_free_: 0 events freed
2019-08-31T16:46:40Z Stopped HTTP server
2019-08-31T16:46:40Z BerkeleyEnvironment::Flush: [/bitcoin/bitcoin/] Flush(false)
2019-08-31T16:46:40Z BerkeleyEnvironment::Flush: Flushing wallet.dat (refcount = 0)...
2019-08-31T16:46:40Z BerkeleyEnvironment::Flush: wallet.dat checkpoint
2019-08-31T16:46:40Z BerkeleyEnvironment::Flush: wallet.dat detach
2019-08-31T16:46:40Z net thread exit
2019-08-31T16:46:40Z BerkeleyEnvironment::Flush: wallet.dat closed
2019-08-31T16:46:40Z BerkeleyEnvironment::Flush: Flush(false) took              72ms
2019-08-31T16:46:40Z msghand thread exit

The same configuration with bitcoin testnet shutdowns fine.

Maybe someone can help me with finding where problem is ? I'm very tired with it. Thanks in advance.
Jump to: