Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Armory seg fault in rescanWalletZeroConf -- txn is not initialized #113

Open
gandrewstone opened this issue Oct 14, 2013 · 0 comments
Open

Comments

@gandrewstone
Copy link

(ERROR) armoryengine.py:12163 - BDM was not ready for your request! Waited 20 sec.
(ERROR) armoryengine.py:12164 - getattr name: hasHeaderWithHash
(ERROR) armoryengine.py:12165 - BDM currently doing: ReadBlkUpdate (98006486)
(ERROR) armoryengine.py:12166 - Waiting for completion: ID= 65819571
(ERROR) armoryengine.py:12167 - Direct traceback
File "ArmoryQt.py", line 4981, in
os.exit(QAPP.exec())
File "/me/git/BitcoinArmory/qt4reactor.py", line 103, in read
log.callWithLogger(w, _read)
File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 84, in callWithLogger
return callWithContext({"system": lp}, func, _args, *_kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, _args, *_kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, _args, *_kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
return func(args,*kw)
File "/me/git/BitcoinArmory/qt4reactor.py", line 92, in _read
why = w.doRead()
File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 203, in doRead
return self._dataReceived(data)
File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 209, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/me/git/BitcoinArmory/armoryengine.py", line 10457, in dataReceived
self.processMessage(msg)
File "/me/git/BitcoinArmory/armoryengine.py", line 10480, in processMessage
TheBDM.hasHeaderWithHash(inv[1]):
File "/me/git/BitcoinArmory/armoryengine.py", line 12168, in passthruFunc
traceback.print_stack()
(ERROR) armoryengine.py:12170 - Traceback:
Traceback (most recent call last):
File "/me/git/BitcoinArmory/armoryengine.py", line 12160, in passthruFunc
out = self.outputQueue.get(True, self.mtWaitSec)
File "/usr/lib/python2.7/Queue.py", line 176, in get
raise Empty
Empty
(ERROR) armoryengine.py:12163 - BDM was not ready for your request! Waited 20 sec.
(ERROR) armoryengine.py:12164 - getattr name: hasHeaderWithHash
(ERROR) armoryengine.py:12165 - BDM currently doing: ReadBlkUpdate (98006486)
(ERROR) armoryengine.py:12166 - Waiting for completion: ID= 12821533
(ERROR) armoryengine.py:12167 - Direct traceback
File "ArmoryQt.py", line 4981, in
os.exit(QAPP.exec())
File "/me/git/BitcoinArmory/qt4reactor.py", line 103, in read
log.callWithLogger(w, _read)
File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 84, in callWithLogger
return callWithContext({"system": lp}, func, _args, *_kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, _args, *_kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, _args, *_kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
return func(args,*kw)
File "/me/git/BitcoinArmory/qt4reactor.py", line 92, in _read
why = w.doRead()
File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 203, in doRead
return self._dataReceived(data)
File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 209, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/me/git/BitcoinArmory/armoryengine.py", line 10457, in dataReceived
self.processMessage(msg)
File "/me/git/BitcoinArmory/armoryengine.py", line 10480, in processMessage
TheBDM.hasHeaderWithHash(inv[1]):
File "/me/git/BitcoinArmory/armoryengine.py", line 12168, in passthruFunc
traceback.print_stack()
(ERROR) armoryengine.py:12170 - Traceback:
Traceback (most recent call last):
File "/me/git/BitcoinArmory/armoryengine.py", line 12160, in passthruFunc
out = self.outputQueue.get(True, self.mtWaitSec)
File "/usr/lib/python2.7/Queue.py", line 176, in get
raise Empty
Empty
(ERROR) armoryengine.py:12163 - BDM was not ready for your request! Waited 20 sec.
(ERROR) armoryengine.py:12164 - getattr name: hasHeaderWithHash
(ERROR) armoryengine.py:12165 - BDM currently doing: ReadBlkUpdate (98006486)
(ERROR) armoryengine.py:12166 - Waiting for completion: ID= 14550054
(ERROR) armoryengine.py:12167 - Direct traceback
File "ArmoryQt.py", line 4981, in
os.exit(QAPP.exec())
File "/me/git/BitcoinArmory/qt4reactor.py", line 103, in read
log.callWithLogger(w, _read)
File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 84, in callWithLogger
return callWithContext({"system": lp}, func, _args, *_kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, _args, *_kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, _args, *_kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
return func(args,*kw)
File "/me/git/BitcoinArmory/qt4reactor.py", line 92, in _read
why = w.doRead()
File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 203, in doRead
return self._dataReceived(data)
File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 209, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/me/git/BitcoinArmory/armoryengine.py", line 10457, in dataReceived
self.processMessage(msg)
File "/me/git/BitcoinArmory/armoryengine.py", line 10480, in processMessage
TheBDM.hasHeaderWithHash(inv[1]):
File "/me/git/BitcoinArmory/armoryengine.py", line 12168, in passthruFunc
traceback.print_stack()
(ERROR) armoryengine.py:12170 - Traceback:
Traceback (most recent call last):
File "/me/git/BitcoinArmory/armoryengine.py", line 12160, in passthruFunc
out = self.outputQueue.get(True, self.mtWaitSec)
File "/usr/lib/python2.7/Queue.py", line 176, in get
raise Empty
Empty
-INFO - 1381626177: (BlockUtils.cpp:4222) Added new blocks to memory pool: 88
(ERROR) armoryengine.py:13106 - ErrorOut var over-represented number of errors!
New Block: True

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffee4b7700 (LWP 11189)]
0x00007fffeeeb938d in Tx::getTxInOffset (this=0x7fffcb044ff8, i=0) at BlockObj.h:497
(gdb) bt
#0 0x00007fffeeeb938d in Tx::getTxInOffset (this=0x7fffcb044ff8, i=0) at BlockObj.h:497
#1 0x00007fffeee9726b in BtcWallet::isMineBulkFilter (this=0x1ec4af0, tx=..., txiomap=..., withMultiSig=false) at BlockUtils.cpp:414
#2 0x00007fffeee971a4 in BtcWallet::isMineBulkFilter (this=0x1ec4af0, tx=..., withMultiSig=false) at BlockUtils.cpp:393
#3 0x00007fffeee99d4d in BtcWallet::scanTx (this=0x1ec4af0, tx=..., txIndex=0, txtime=0, blknum=4294967295) at BlockUtils.cpp:881
#4 0x00007fffeeeaf64a in BlockDataManager_LevelDB::rescanWalletZeroConf (this=0x1874210, wlt=...) at BlockUtils.cpp:5124
#5 0x00007fffef0c1fb8 in _wrap_BlockDataManager_LevelDB_rescanWalletZeroConf (args=(<BlockDataManager_LevelDB(this=<SwigPyObject at remote 0x1972d50>) at remote 0x1987ab8>, <BtcWallet(this=<SwigPyObject at remote 0x1e695d0>) at remote 0x1e64b90>)) at CppBlockUtils_wrap.cxx:59177
#6 0x0000000000463e75 in ext_do_call (nk=14724272, na=, flags=, pp_stack=0x7fffee4b6410, func=) at ../Python/ceval.c:4331
#7 PyEval_EvalFrameEx (f=f@entry=Frame 0x22b3490, for file /me/git/BitcoinArmory/CppBlockUtils.py, line 1330, in rescanWalletZeroConf (self=<BlockDataManager_LevelDB(this=<SwigPyObject at remote 0x1972d50>) at remote 0x1987ab8>, args=(<BtcWallet(this=<SwigPyObject at remote 0x1e695d0>) at remote 0x1e64b90>,)), throwflag=throwflag@entry=0) at ../Python/ceval.c:2705
#8 0x00000000004671e9 in PyEval_EvalCodeEx (co=0x15223b0, globals=, locals=, args=, argcount=, kws=kws@entry=0x0, kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, closure=closure@entry=0x0) at ../Python/ceval.c:3253
#9 0x00000000004ab99a in function_call (func=, arg=, kw=) at ../Objects/funcobject.c:526
#10 0x00000000004617b6 in PyObject_Call (kw=0x0, arg=(<BlockDataManager_LevelDB(this=<SwigPyObject at remote 0x1972d50>) at remote 0x1987ab8>, <BtcWallet(this=<SwigPyObject at remote 0x1e695d0>) at remote 0x1e64b90>), func=<function at remote 0x156f938>) at ../Objects/abstract.c:2529
#11 ext_do_call (nk=37479128, na=, flags=, pp_stack=0x7fffee4b6710, func=<function at remote 0x156f938>) at ../Python/ceval.c:4334
#12 PyEval_EvalFrameEx (f=, throwflag=throwflag@entry=0) at ../Python/ceval.c:2705
#13 0x0000000000460227 in fast_function (nk=, na=, n=, pp_stack=0x7fffee4b68e0, func=<function at remote 0x198fa28>) at ../Python/ceval.c:4107
#14 call_function (oparg=, pp_stack=0x7fffee4b68e0) at ../Python/ceval.c:4042
#15 PyEval_EvalFrameEx (f=, throwflag=throwflag@entry=0) at ../Python/ceval.c:2666
#16 0x0000000000460227 in fast_function (nk=, na=, n=, pp_stack=0x7fffee4b6ab0, func=<function at remote 0x1105d70>) at ../Python/ceval.c:4107
#17 call_function (oparg=, pp_stack=0x7fffee4b6ab0) at ../Python/ceval.c:4042
#18 PyEval_EvalFrameEx (f=f@entry=Frame 0x7fffe8000910, for file /usr/lib/python2.7/threading.py, line 525, in __bootstrap (self=<BlockDataManagerThread(_Thread__ident=140737191311104, errorOut=0, masterCppWallet=<BtcWallet(this=<SwigPyObject at remote 0x1972b70>) at remote 0x1987c20>, _Thread__started=<_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0x7ffff7f67a90>, acquire=<built-in method acquire of thread.lock object at remote 0x7ffff7f67a90>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0x7ffff7f67a90>) at remote 0x198e390>) at remote 0x198e2d0>, aboutToRescan=False, prefMode=2, blkMode=4, btcdir='/home/stone/.bitcoin/', _Thread__initialized=True, _Thread__block=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0x7ffff7f679f0>, acquire=<built-in method acquire of thread.lock object at remote 0x7ffff7f679f0>, _Condition__waiters=[], release=<built-in method release of thread.lo...(truncated), throwflag=throwflag@entry=0) at ../Python/ceval.c:2666
#19 0x00000000004671e9 in PyEval_EvalCodeEx (co=0x10fc730, globals=, locals=, args=, argcount=, kws=kws@entry=0x0, kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, closure=closure@entry=0x0) at ../Python/ceval.c:3253
#20 0x00000000004ab99a in function_call (func=, arg=, kw=) at ../Objects/funcobject.c:526
#21 0x0000000000486e2d in PyObject_Call (kw=0x0, arg=(<BlockDataManagerThread(_Thread__ident=140737191311104, errorOut=0, masterCppWallet=<BtcWallet(this=<SwigPyObject at remote 0x1972b70>) at remote 0x1987c20>, _Thread__started=<_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0x7ffff7f67a90>, acquire=<built-in method acquire of thread.lock object at remote 0x7ffff7f67a90>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0x7ffff7f67a90>) at remote 0x198e390>) at remote 0x198e2d0>, aboutToRescan=False, prefMode=2, blkMode=4, btcdir='/home/stone/.bitcoin/', _Thread__initialized=True, _Thread__block=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0x7ffff7f679f0>, acquire=<built-in method acquire of thread.lock object at remote 0x7ffff7f679f0>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0x7ffff7f679f0>) at remote 0x198e450>, bdm=<BlockDataManager_LevelDB(this=...(truncated), func=<function at remote 0x1105c80>) at ../Objects/abstract.c:2529
#22 instancemethod_call.8751 (func=<function at remote 0x1105c80>, arg=(<BlockDataManagerThread(_Thread__ident=140737191311104, errorOut=0, masterCppWallet=<BtcWallet(this=<SwigPyObject at remote 0x1972b70>) at remote 0x1987c20>, _Thread__started=<_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0x7ffff7f67a90>, acquire=<built-in method acquire of thread.lock object at remote 0x7ffff7f67a90>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0x7ffff7f67a90>) at remote 0x198e390>) at remote 0x198e2d0>, aboutToRescan=False, prefMode=2, blkMode=4, btcdir='/home/stone/.bitcoin/', _Thread__initialized=True, _Thread__block=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0x7ffff7f679f0>, acquire=<built-in method acquire of thread.lock object at remote 0x7ffff7f679f0>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0x7ffff7f679f0>) at remote 0x198e450>, bdm=<BlockDataManager_LevelDB(this=...(truncated), kw=0x0) at ../Objects/classobject.c:2602
#23 0x0000000000491ddd in PyObject_Call (kw=, arg=(), func=<instancemethod at remote 0x16d9f00>) at ../Objects/abstract.c:2529
#24 PyEval_CallObjectWithKeywords (func=<instancemethod at remote 0x16d9f00>, arg=(), kw=) at ../Python/ceval.c:3890
#25 0x00000000004d8d32 in t_bootstrap.49490 (boot_raw=0x1900e80) at ../Modules/threadmodule.c:614
#26 0x00007ffff7bc4e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#27 0x00007ffff6fd7cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#28 0x0000000000000000 in ?? ()

(gdb) p i
$1 = 0
(gdb) p offsetsTxIn_
$2 = {<std::_Vector_base<unsigned int, std::allocator >> = {_M_impl = {<std::allocator> = {<__gnu_cxx::new_allocator> = {}, }, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, }
(gdb) up
#1 0x00007fffeee9726b in BtcWallet::isMineBulkFilter (this=0x1ec4af0, tx=..., txiomap=..., withMultiSig=false) at BlockUtils.cpp:414

(gdb) p txStartPtr
$3 = (const uint8_t *) 0x0
(gdb) up
#2 0x00007fffeee971a4 in BtcWallet::isMineBulkFilter (this=0x1ec4af0, tx=..., withMultiSig=false) at BlockUtils.cpp:393

(gdb) down
#1 0x00007fffeee9726b in BtcWallet::isMineBulkFilter (this=0x1ec4af0, tx=..., txiomap=..., withMultiSig=false) at BlockUtils.cpp:414

(gdb) up
#2 0x00007fffeee971a4 in BtcWallet::isMineBulkFilter (this=0x1ec4af0, tx=..., withMultiSig=false) at BlockUtils.cpp:393

(gdb) up
#3 0x00007fffeee99d4d in BtcWallet::scanTx (this=0x1ec4af0, tx=..., txIndex=0, txtime=0, blknum=4294967295) at BlockUtils.cpp:881

(gdb) up
#4 0x00007fffeeeaf64a in BlockDataManager_LevelDB::rescanWalletZeroConf (this=0x1874210, wlt=...) at BlockUtils.cpp:5124

(gdb) p zcd.txobj_
$4 = {dataCopy_ = {data_ = {<std::_Vector_base<unsigned char, std::allocator >> = {_M_impl = {<std::allocator> = {<gnu_cxx::new_allocator> = {}, }, M_start = 0x0, M_finish = 0x0, M_end_of_storage = 0x0}}, }}, isInitialized = false, version = 0, lockTime = 0, thisHash = {data = {<std::_Vector_base<unsigned char, std::allocator >> = {_M_impl = {<std::allocator> = {<__gnu_cxx::new_allocator> = {}, }, _M_start = 0x0, _M_finish = 0x0, M_end_of_storage = 0x0}}, }}, offsetsTxIn = {<std::_Vector_base<unsigned int, std::allocator >> = {_M_impl = {<std::allocator> = {<__gnu_cxx::new_allocator> = {}, }, _M_start = 0x0, _M_finish = 0x0, M_end_of_storage = 0x0}}, }, offsetsTxOut = {<std::_Vector_base<unsigned int, std::allocator >> = {_M_impl = {<std::allocator> = {<__gnu_cxx::new_allocator> = {}, }, M_start = 0x0, M_finish = 0x0, M_end_of_storage = 0x0}}, }, txRefObj = {dbKey6B = {data = {<std::_Vector_base<unsigned char, std::allocator >> = {_M_impl = {<std::allocator> = {<__gnu_cxx::new_allocator> = {}, }, _M_start = 0x0, _M_finish = 0x0, M_end_of_storage = 0x0}}, }}, dbIface = 0x18747e0}}
(gdb) down
#3 0x00007fffeee99d4d in BtcWallet::scanTx (this=0x1ec4af0, tx=..., txIndex=0, txtime=0, blknum=4294967295) at BlockUtils.cpp:881

(gdb) p zcd.txobj_.dataCopy_.getSize()
No symbol "zcd" in current context.
(gdb) up
#4 0x00007fffeeeaf64a in BlockDataManager_LevelDB::rescanWalletZeroConf (this=0x1874210, wlt=...) at BlockUtils.cpp:5124

(gdb) p zcd.txobj_.dataCopy_.getSize()
$5 = 0
(gdb) p zcd.txobj_.dataCopy_.isInitialized
There is no member or method named isInitialized.
(gdb) p zcd.txobj_.isInitialized
$6 = {bool (const Tx * const)} 0x7fffeee8511c <Tx::isInitialized() const>
(gdb) p zcd.txobj_.isInitialized()
$7 = false
(gdb) p txHash
$8 = {data_ = {<std::_Vector_base<unsigned char, std::allocator >> = {_M_impl = {<std::allocator> = {<_gnu_cxx::new_allocator> = {}, }, M_start = 0x7fffe81a0e80 "w\272H\277\356\335\033\220\300\366\362vm\250\022\346||%\376\267\032\371q\266\243*\322\210\060", M_finish = 0x7fffe81a0ea0 "0", M_end_of_storage = 0x7fffe81a0ea0 "0"}}, }}
(gdb) p zeroConfMap.hasKey(txHash)
No symbol "zeroConfMap" in current context.
(gdb) p zeroConfMap
.hasKey(txHash)
Couldn't find method std::map<BinaryData, ZeroConfData, std::less, std::allocator<std::pair<BinaryData const, ZeroConfData> > >::hasKey
(gdb) p zeroConfMap
.haskey(txHash)
Couldn't find method std::map<BinaryData, ZeroConfData, std::less, std::allocator<std::pair<BinaryData const, ZeroConfData> > >::haskey
(gdb) p zeroConfMap
.size()
Cannot evaluate function -- may be inlined
(gdb) p zeroConfMap.count(txHash)
Cannot evaluate function -- may be inlined
(gdb)

I am testing with the workaround:

  if(!zcd.txobj_.isInitialized() || !isTxFinal(zcd.txobj_) )
     continue;

but this will not address the question of why an uninited txn got into the zeroConfMap_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant