Following a bitcoin core issue on debian stretch which was resolved on the master branch, I am now running a pre-release test build. Each time I exit bitcoin-qt, I have to wait about 5 minutes until final shutdown occurs. My debug file is showing:

I have not experienced this before ever on any system. I am not seeing a similar issue when shutting down bitcoind (EDIT actually it does happen with bitcoind at times). I am wondering if anyone is aware of any pending change (on master branch for future release) which would explain such behavior (I worry this may be related to debian stretch, but my hardware is new, very cheap and hopelessly slow on known benchmarks, which may also be the cause of this).

I am now attempting to install bitcoind. I have already set up a directory db4 in my build directory for the Berkeley database version 4.8.30. I have installed all the dependencies as per doc/build-unix, including boost from the distribution: