Manual file cleanup on exit, safe? [coredump backtrace] [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2012-06-15T23:11:39+00:00


Summary:

In a discussion on June 15, 2012, a user named grarpamp expressed concern about the safety of cleaning up the blockchain hierarchy when bitcoind exits cleanly. Another user named Pieter suggested using the -detachdb argument to detach the blockchain database files from the database environment at exit. However, Pieter noted that this feature was turned off by default in version 0.6.0 to speed up the shutdown process and that only a few people would need to manually manipulate their blockchain database files.The article delves into the issue of cleaning up files and directories when the Bitcoin server exits cleanly or crashes. It warns against using the 'rm -r' command to clean up the hierarchy, which includes files such as database/, db.log, .lock, debug.log, addr.dat, and wallet.dat. Furthermore, it advises adding __db. * to the list in case bitcoind crashes. The article poses a question regarding the availability of an option to flush or roll the mentioned files on exit, allowing them to be removed or ported. Regardless of the answer, it emphasizes that bitcoind should not be dumping core.Providing specific details, the article mentions the version of Bitcoin being discussed, v0.6.2.2-unk-beta (), and the default data directory /.../.bitcoin. It also highlights an EXCEPTION: 11DbException error caused by invalid arguments while opening a database. The error message suggests that the error could be due to moving a database from one database environment to another without clearing the database LSNs or removing all of the log files from a database environment.Lastly, the article references a gdb backtrace command that can be used to obtain information about the threads and functions involved in the issue.


Updated on: 2023-08-01T03:38:38.232080+00:00