detachdb - coredump backtrace #1472

issue grarpamp opened this issue on June 16, 2012
  1. grarpamp commented at 12:36 AM on June 16, 2012: none

    Without detachdb and rm -r <these>, breaks things and crashes. database/ db.log .lock debug.log addr.dat wallet.dat __db.*

    Bitcoin version v0.6.2.2-unk-beta () Default data directory /.../.bitcoin Loading addresses... dbenv.open LogDir=/.../.bitcoin/database ErrorFile=/.../.bitcoin/db.log


    EXCEPTION: 11DbException Db::open: Invalid argument bitcoin in AppInit() terminate called after throwing an instance of 'DbException' what(): Db::open: Invalid argument sh: abort (core dumped)

    file unknown has LSN 38/7968116, past end of log at 1/28 Commonly caused by moving a database from one database environment to another without clearing the database LSNs, or by removing all of the log files from a database environment __db_meta_setup: /.../.bitcoin/addr.dat: unexpected file type or format

    [New Thread 28801140 (LWP 100964/initial thread)] #0 0x2873e9a7 in kill () from /lib/libc.so.7 #1 0x2852d397 in raise () from /lib/libthr.so.3 #2 0x2873d4da in abort () from /lib/libc.so.7 #3 0x285a0880 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.6 #4 0x285a508a in std::set_unexpected () from /usr/lib/libstdc++.so.6 #5 0x285a50d2 in std::terminate () from /usr/lib/libstdc++.so.6 #6 0x285a4f58 in __cxa_rethrow () from /usr/lib/libstdc++.so.6 #7 0x0816d2ea in PrintException (pex=0x288251b0, pszThread=0x82f4cfa "AppInit()") at util.cpp:792 #8 0x08087625 in AppInit (argc=2, argv=0xbfbfedf0) at init.cpp:113 #9 0x0808766d in main (argc=Cannot access memory at address 0x3) at init.cpp:96

  2. gavinandresen commented at 12:44 AM on June 16, 2012: contributor

    I don't understand -- what did you do to cause the crash?

  3. sipa commented at 1:14 AM on June 16, 2012: member

    He deleted database logfiles, without using -detachdb.

  4. grarpamp commented at 1:50 AM on June 16, 2012: none

    I don't understand -- what did you do to cause the crash? He deleted database logfiles, without using -detachdb.

    github apparently snips stuff in carets. It should have said: 'rm -r <these files>'. Or more simply, nuke everything after shutdown except: blkindex.dat and blk0001.dat I used to do this under an old 0.5.x, ok semantics changed. It's a crash issue.

  5. laanwj commented at 9:13 AM on September 21, 2012: member

    This is the expected behavior when not using -detachdb. And in contrary to many cases, the error message is clear:

    Commonly caused by moving a database from one database environment
    to another without clearing the database LSNs, or by removing all of
    the log files from a database environment
    

    Use -detachdb when you plan to remove log files or move around the databases between machines.

  6. laanwj closed this on Sep 21, 2012

  7. lateminer referenced this in commit 46585f7b62 on May 6, 2020
  8. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me