There seems to have been introduced recently some sort of sleep of 10 seconds into a loop somewhere because now the debug.log keeps sleeping for 10 seconds regularly. This is causing problems with timeouts that I'm trying to test, with 2 being triggered together, when they should be 5 seconds apart.
bitcoin-qt keeps freezing every ~10 seconds #5037
issue rebroad opened this issue on October 3, 2014-
rebroad commented at 12:24 AM on October 3, 2014: contributor
-
laanwj commented at 6:31 AM on October 3, 2014: member
I don't see this particular behaviour, but it may be specific to your connections. When the whole program hangs probably the cs_main lock is contended for some reason. Compiling with
-DDEBUG_LOCKCONTENTIONcould help figure out what threads are contending for the lock. -
rebroad commented at 8:31 AM on October 3, 2014: contributor
Actually, my wording should have been "freezes for ~10 seconds"... I'll try that compile option, thanks.
-
laanwj commented at 8:37 AM on October 3, 2014: member
./configure ... CPPFLAGS="-DDEBUG_LOCKCONTENTION" -
rebroad commented at 6:40 AM on October 5, 2014: contributor
why is it a compile option rather than the code being enabled by default but optionally logged?
-
rebroad commented at 6:41 AM on October 5, 2014: contributor
anyway, I've enabled this, but so far nothing is showing up in the logs.
-
TheBlueMatt commented at 7:06 AM on October 5, 2014: member
For performance reasons, originally. Not sure what the overhead actually is, though.
-
TheBlueMatt commented at 7:06 AM on October 5, 2014: member
-
laanwj commented at 2:26 AM on October 6, 2014: member
Because locking is performance sensitive (that's sort of the point of it). Anything that slows the locking primitives down slows down the whole program. You're free to always build and run with it of course.
- laanwj added the label GUI on Oct 28, 2014
-
laanwj commented at 4:19 PM on October 28, 2014: member
I've also noticed that the client can hang for seconds at a time while syncing (in
ActivateBestChain, which has a loop to catch up), this is mostly an issue in the GUI as it tries to get the cs_main lock as well.Message handler thread:
[#18](/bitcoin-bitcoin/18/) 0x00005555556dd99b in ConnectBlock (block=..., state=..., pindex=pindex@entry=0x7fffb7854240, view=..., fJustCheck=fJustCheck@entry=false) at main.cpp:1612 [#19](/bitcoin-bitcoin/19/) 0x00005555556e1e23 in ConnectTip (pblock=0x7fff90a9dbf0, pindexNew=0x7fffb7854240, state=...) at main.cpp:1867 [#20](/bitcoin-bitcoin/20/) ActivateBestChainStep (pblock=0x0, pindexMostWork=0x7fffb64e1ed0, state=...) at main.cpp:1985 [#21](/bitcoin-bitcoin/21/) ActivateBestChain (state=..., pblock=pblock@entry=0x7fff90a9e440) at main.cpp:2047 [#22](/bitcoin-bitcoin/22/) 0x00005555556e312a in ProcessBlock (state=..., pfrom=pfrom@entry=0x7fff80000b20, pblock=pblock@entry=0x7fff90a9e440, dbp=dbp@entry=0x0) at main.cpp:2529 [#23](/bitcoin-bitcoin/23/) 0x00005555556e80f9 in ProcessMessage (pfrom=pfrom@entry=0x7fff80000b20, strCommand=..., vRecv=..., nTimeReceived=nTimeReceived@entry=1414512718258751) at main.cpp:3937 [#24](/bitcoin-bitcoin/24/) 0x00005555556ea143 in ProcessMessages (pfrom=0x7fff80000b20) at main.cpp:4261The GUI, meanwhile:
[#8](/bitcoin-bitcoin/8/) 0x0000555555675631 in TransactionTablePriv::updateWallet (this=0x5555566ab640, hash=..., status=status@entry=0) at qt/transactiontablemodel.cpp:98 [#9](/bitcoin-bitcoin/9/) 0x000055555567449f in TransactionTableModel::updateTransaction (this=0x555556a77ac0, hash=..., status=0) at qt/transactiontablemodel.cpp:258 [#10](/bitcoin-bitcoin/10/) 0x000055555561a4d6 in WalletModel::updateTransaction (this=this@entry=0x555556ab9880, hash=..., status=<optimized out>) at qt/walletmodel.cpp:170 [#11](/bitcoin-bitcoin/11/) 0x0000555555635484 in WalletModel::qt_static_metacall (_o=0x555556ab9880, _c=<optimized out>, _id=<optimized out>, _a=0x7fffcba78470) at qt/moc_walletmodel.cpp:86 [#12](/bitcoin-bitcoin/12/) 0x00007ffff5f75c1e in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 - gmaxwell closed this on Jan 9, 2015
-
jonasschnelli commented at 9:06 AM on January 10, 2015: contributor
- MarcoFalke locked this on Sep 8, 2021