My full archival 0.16.2 core node (64bit) always gets stuck during shutdown.
I switched off port mapping via UPnP - now it shuts down fine after running for a short timespan but still gets hung up after running for a bit longer.
Tested with and without my personal bitcoin.conf - same issue Tried listenonion=0 - didn't help.
The longest I waited was a bit more than 24h - no success: https://pastebin.com/nrQsZz94
Installed https://bitcoincore.org/bin/bitcoin-core-0.16.2/bitcoin-0.16.2-win64-setup.exe to C:\Program Files (SSD), chainstate is on C:\chainstate and data directory is on an external USB 2.0 HDD
debug.log:
2018-08-03 13:34:00 GUI: requestShutdown : Requesting shutdown 2018-08-03 13:34:00 GUI: shutdown : Running Shutdown in thread 2018-08-03 13:34:00 Interrupting HTTP server 2018-08-03 13:34:00 Interrupting HTTP RPC server 2018-08-03 13:34:00 Interrupting RPC 2018-08-03 13:34:00 tor: Thread interrupt 2018-08-03 13:34:00 Shutdown: In progress... 2018-08-03 13:34:00 Stopping HTTP RPC server 2018-08-03 13:34:00 Stopping RPC 2018-08-03 13:34:00 Stopping HTTP server 2018-08-03 13:34:00 Stopped HTTP server 2018-08-03 13:34:00 CDBEnv::Flush: Flush(false) 2018-08-03 13:34:00 CDBEnv::Flush: Flush(false) took 0ms 2018-08-03 13:34:00 torcontrol thread exit 2018-08-03 13:34:00 opencon thread exit 2018-08-03 13:34:00 addcon thread exit 2018-08-03 13:34:00 msghand thread exit 2018-08-03 13:34:00 net thread exit 2018-08-03 13:34:00 UPNP_DeletePortMapping() returned: 0 2018-08-03 13:34:00 upnp thread interrupt 2018-08-03 13:34:01 Flushed 48201 addresses to peers.dat 408ms 2018-08-03 13:34:01 disconnecting peer=1 2018-08-03 13:34:01 disconnecting peer=2 2018-08-03 13:34:01 disconnecting peer=3 2018-08-03 13:34:01 disconnecting peer=4 2018-08-03 13:34:01 disconnecting peer=5 2018-08-03 13:34:01 disconnecting peer=7 2018-08-03 13:34:01 disconnecting peer=12 2018-08-03 13:34:01 disconnecting peer=15 2018-08-03 13:34:01 disconnecting peer=27 2018-08-03 13:34:01 disconnecting peer=32 2018-08-03 13:34:01 disconnecting peer=36 2018-08-03 13:34:01 disconnecting peer=38 2018-08-03 13:34:01 disconnecting peer=55 2018-08-03 13:34:01 disconnecting peer=83 2018-08-03 13:34:01 disconnecting peer=200 2018-08-03 13:34:01 disconnecting peer=208 2018-08-03 13:34:01 disconnecting peer=245 2018-08-03 13:34:01 disconnecting peer=269 2018-08-03 13:34:01 disconnecting peer=396 2018-08-03 13:34:01 disconnecting peer=426 2018-08-03 13:34:01 disconnecting peer=427 2018-08-03 13:34:01 disconnecting peer=447 2018-08-03 13:49:09 Flushed 48201 addresses to peers.dat 10074ms 2018-08-03 14:04:09 Flushed 48201 addresses to peers.dat 518ms 2018-08-03 14:06:24 Potential stale tip detected, will try using extra outbound peer (last tip update: 2117 seconds ago) 2018-08-03 14:06:24 net: setting try another outbound peer=true 2018-08-03 14:16:54 Potential stale tip detected, will try using extra outbound peer (last tip update: 2747 seconds ago) 2018-08-03 14:16:54 net: setting try another outbound peer=true 2018-08-03 14:19:10 Flushed 48201 addresses to peers.dat 479ms 2018-08-03 14:27:25 Potential stale tip detected, will try using extra outbound peer (last tip update: 3378 seconds ago) 2018-08-03 14:27:25 net: setting try another outbound peer=true 2018-08-03 14:29:35
when it shuts down fine, it looks like this: https://pastebin.com/5JFBMkjw log for a 24h waiting period: https://pastebin.com/nrQsZz94 log for a 20 min waiting period: https://pastebin.com/Pa38DTev