Startup blocks on mutex at “Loading Addresses” #982

issue luke-jr openend this issue on March 25, 2012
  1. luke-jr commented at 1:59 am on March 25, 2012: member

    Note, this occurs when Bitcoin-Qt is still single-threaded…

     0[#0](/bitcoin-bitcoin/0/)  0xffffe430 in __kernel_vsyscall () <-- this *never* finishes
     1[#1](/bitcoin-bitcoin/1/)  0xf6b7045c in pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
     2[#2](/bitcoin-bitcoin/2/)  0xf7c29fa8 in __db_pthread_mutex_lock (env=0x86502c0, mutex=4180)
     3    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../mutex/mut_pthread.c:318
     4[#3](/bitcoin-bitcoin/3/)  0xf7c296ca in __db_tas_mutex_lock_int (env=0x86502c0, mutex=4180, nowait=0)
     5    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../mutex/mut_tas.c:218
     6[#4](/bitcoin-bitcoin/4/)  0xf7c29753 in __db_tas_mutex_lock (env=0x86502c0, mutex=4180)
     7    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../mutex/mut_tas.c:248
     8[#5](/bitcoin-bitcoin/5/)  0xf7ce1ced in __lock_get_internal (lt=0x8784ab8, sh_locker=0xf10c5884, flags=0, obj=0x86a4400, 
     9    lock_mode=DB_LOCK_WRITE, timeout=0, lock=0xffffb4f4)
    10    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../lock/lock.c:953
    11[#6](/bitcoin-bitcoin/6/)  0xf7ce0679 in __lock_get (env=0x86502c0, locker=0xf10c5884, flags=0, obj=0x86a4400, lock_mode=DB_LOCK_WRITE, 
    12    lock=0xffffb4f4) at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../lock/lock.c:459
    13[#7](/bitcoin-bitcoin/7/)  0xf7d20be2 in __db_lget (dbc=0x86a4378, action=0, pgno=3, mode=DB_LOCK_WRITE, lkflags=0, lockp=0xffffb4f4)
    14    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../db/db_meta.c:1203
    15[#8](/bitcoin-bitcoin/8/)  0xf7c4e7a8 in __bam_get_root (dbc=0x86a4378, pg=3, slevel=1, flags=12802, stack=0xffffb564)
    16    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../btree/bt_search.c:192
    17[#9](/bitcoin-bitcoin/9/)  0xf7c4ea7c in __bam_search (dbc=0x86a4378, root_pgno=3, key=0xffffb950, flags=12802, slevel=1, recnop=0x0, 
    18    exactp=0xffffb6cc)
    19    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../btree/bt_search.c:290
    20[#10](/bitcoin-bitcoin/10/) 0xf7c39c1d in __bamc_search (dbc=0x86a4378, root_pgno=3, key=0xffffb950, flags=14, exactp=0xffffb6cc)
    21    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../btree/bt_cursor.c:2785
    22[#11](/bitcoin-bitcoin/11/) 0xf7c37db1 in __bamc_put (dbc=0x86a4378, key=0xffffb950, data=0xffffb99c, flags=20, pgnop=0xffffb774)
    23    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../btree/bt_cursor.c:2130
    24[#12](/bitcoin-bitcoin/12/) 0xf7d0d3f0 in __dbc_iput (dbc=0x86a4378, key=0xffffb950, data=0xffffb99c, flags=20)
    25    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../db/db_cam.c:2103
    26[#13](/bitcoin-bitcoin/13/) 0xf7d0d23e in __dbc_put (dbc=0x86a4378, key=0xffffb950, data=0xffffb99c, flags=20)
    27    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../db/db_cam.c:2016
    28[#14](/bitcoin-bitcoin/14/) 0xf7cfb989 in __db_put (dbp=0x86a8368, ip=0x0, txn=0x877c3e8, key=0xffffb950, data=0xffffb99c, flags=20)
    29    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../db/db_am.c:477
    30[#15](/bitcoin-bitcoin/15/) 0xf7d1a713 in __db_put_pp (dbp=0x86a8368, txn=0x877c3e8, key=0xffffb950, data=0xffffb99c, flags=20)
    31    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../db/db_iface.c:1579
    32[#16](/bitcoin-bitcoin/16/) 0xf7c1ab34 in Db::put (this=0x87805e8, txnid=0x0, key=0xffffb950, value=0xffffb99c, flags=20)
    33    at /var/tmp/portage/sys-libs/db-4.8.30/work/db-4.8.30/build_unix/../dist/../cxx/cxx_db.cpp:346
    34[#17](/bitcoin-bitcoin/17/) 0x08163a66 in CDB::Rewrite (strFile="addr.dat", pszSkip=0x83139a0 "\004addr") at src/db.cpp:250
    35[#18](/bitcoin-bitcoin/18/) 0x08167863 in LoadAddresses () at src/db.cpp:797
    36[#19](/bitcoin-bitcoin/19/) 0x0813d351 in AppInit2 (argc=4, argv=0xffffc714) at src/init.cpp:366
    37[#20](/bitcoin-bitcoin/20/) 0x08082ffe in main (argc=4, argv=0xffffc714) at src/qt/bitcoin.cpp:217
    

    http://luke.dashjr.org/tmp/code/addr.dat.hang

  2. gavinandresen commented at 2:57 pm on March 26, 2012: contributor
    Is this reproducible? Are you running git-head or next-test? Anything special or weird about the addr.dat?
  3. ghost assigned sipa on Mar 26, 2012
  4. luke-jr commented at 3:03 pm on March 26, 2012: member
    I can reproduce with both master and next-test by copying the addr.dat to my testnet dir. I don’t know what caused whatever is in that addr.dat triggering this.
  5. sipa commented at 3:06 pm on March 26, 2012: member
    I can’t reproduce it on master with luke’s addr.dat file.
  6. luke-jr commented at 3:08 pm on March 26, 2012: member
    Interesting. I’d be willing to share my entire testnet dir with other devs (though not the general public).
  7. sipa commented at 3:12 pm on March 26, 2012: member
    Wallet and block index are only loaded after the point that caused the backtrace above. Can you still reproduce with empty database/ dir and __db* files? If so, wallet.dat and blkindex.dat should not matter.
  8. gavinandresen commented at 2:36 pm on March 28, 2012: contributor
    New reports: https://bitcointalk.org/index.php?topic=74447.0 and twmz in IRC.
  9. gavinandresen closed this on Apr 4, 2012

  10. suprnurd referenced this in commit a6a0f75614 on Dec 5, 2017
  11. ptschip referenced this in commit 5cfa4e39cb on Mar 7, 2018
  12. lateminer referenced this in commit a0a1af9f78 on Oct 30, 2019
  13. KolbyML referenced this in commit 565e630f64 on Sep 4, 2020
  14. MarcoFalke locked this on Sep 8, 2021


luke-jr gavinandresen sipa

Labels
Bug

Milestone
0.6.0


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: 2024-12-22 03:12 UTC

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