crypto-power / cryptopower

A cross-platform SPV (DCR, BTC & LTC) privacy wallet built with go.
ISC License
35 stars 23 forks source link

rescan: Random freeze. #492

Open JoeGruffins opened 3 months ago

JoeGruffins commented 3 months ago

Encountered on #491 but I do not THINK it is related to those changes. It could be though. The ui froze.

partial stack trace ``` goroutine 4211 gp=0xc0087c48c0 m=nil [select]: runtime.gopark(0xc000afdf58?, 0x2?, 0x60?, 0x20?, 0xc000afddbc?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc000afdbd0 sp=0xc000afdbb0 pc=0x44628e runtime.selectgo(0xc000afdf58, 0xc000afddb8, 0x40?, 0x0, 0x0?, 0x1) /usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc000afdcf0 sp=0xc000afdbd0 pc=0x458105 github.com/crypto-power/cryptopower/libwallet/assets/btc.(*Asset).handleNotifications(0xc002e67c20) /home/joe/git/cryptopower/libwallet/assets/btc/sync.go:227 +0x1c5 fp=0xc000afdfc8 sp=0xc000afdcf0 pc=0x1230a25 github.com/crypto-power/cryptopower/libwallet/assets/btc.(*Asset).startSync.gowrap1() /home/joe/git/cryptopower/libwallet/assets/btc/sync.go:477 +0x25 fp=0xc000afdfe0 sp=0xc000afdfc8 pc=0x1232425 runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000afdfe8 sp=0xc000afdfe0 pc=0x47e421 created by github.com/crypto-power/cryptopower/libwallet/assets/btc.(*Asset).startSync in goroutine 4194 /home/joe/git/cryptopower/libwallet/assets/btc/sync.go:477 +0x22d goroutine 4214 gp=0xc0087c56c0 m=nil [select]: runtime.gopark(0xc005572f78?, 0x3?, 0x0?, 0x0?, 0xc005572f32?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc005572dd8 sp=0xc005572db8 pc=0x44628e runtime.selectgo(0xc005572f78, 0xc005572f2c, 0x0?, 0x0, 0x0?, 0x1) /usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc005572ef8 sp=0xc005572dd8 pc=0x458105 github.com/btcsuite/btcwallet/wallet.(*Wallet).rescanProgressHandler(0xc002e67b00) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/wallet/rescan.go:211 +0xd5 fp=0xc005572fc8 sp=0xc005572ef8 pc=0xcda435 github.com/btcsuite/btcwallet/wallet.(*Wallet).SynchronizeRPC.gowrap3() /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/wallet/wallet.go:215 +0x25 fp=0xc005572fe0 sp=0xc005572fc8 pc=0xcdcba5 runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc005572fe8 sp=0xc005572fe0 pc=0x47e421 created by github.com/btcsuite/btcwallet/wallet.(*Wallet).SynchronizeRPC in goroutine 4194 /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/wallet/wallet.go:215 +0x2c6 goroutine 4232 gp=0xc0087db340 m=nil [select]: runtime.gopark(0xc004f6cf60?, 0x5?, 0xa0?, 0xcd?, 0xc004f6ce6e?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc004f6cd08 sp=0xc004f6cce8 pc=0x44628e runtime.selectgo(0xc004f6cf60, 0xc004f6ce64, 0x0?, 0x0, 0x0?, 0x1) /usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc004f6ce28 sp=0xc004f6cd08 pc=0x458105 github.com/btcsuite/btcd/peer.(*Peer).queueHandler(0xc000002008) /home/joe/go/pkg/mod/github.com/btcsuite/btcd@v0.23.4/peer/peer.go:1666 +0x1fd fp=0xc004f6cfc8 sp=0xc004f6ce28 pc=0xc79f1d github.com/btcsuite/btcd/peer.(*Peer).start.gowrap3() /home/joe/go/pkg/mod/github.com/btcsuite/btcd@v0.23.4/peer/peer.go:2312 +0x25 fp=0xc004f6cfe0 sp=0xc004f6cfc8 pc=0xc7cc05 runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc004f6cfe8 sp=0xc004f6cfe0 pc=0x47e421 created by github.com/btcsuite/btcd/peer.(*Peer).start in goroutine 4227 /home/joe/go/pkg/mod/github.com/btcsuite/btcd@v0.23.4/peer/peer.go:2312 +0x2d3 goroutine 4197 gp=0xc0081eca80 m=nil [select]: runtime.gopark(0xc0004faf80?, 0x2?, 0xb0?, 0xae?, 0xc0004faf74?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc0004fae18 sp=0xc0004fadf8 pc=0x44628e runtime.selectgo(0xc0004faf80, 0xc0004faf70, 0x0?, 0x0, 0x0?, 0x1) /usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc0004faf38 sp=0xc0004fae18 pc=0x458105 github.com/btcsuite/btcd/addrmgr.(*AddrManager).addressHandler(0xc0040d6508) /home/joe/go/pkg/mod/github.com/btcsuite/btcd@v0.23.4/addrmgr/addrmanager.go:348 +0xc5 fp=0xc0004fafc8 sp=0xc0004faf38 pc=0xc5fea5 github.com/btcsuite/btcd/addrmgr.(*AddrManager).Start.gowrap1() /home/joe/go/pkg/mod/github.com/btcsuite/btcd@v0.23.4/addrmgr/addrmanager.go:582 +0x25 fp=0xc0004fafe0 sp=0xc0004fafc8 pc=0xc61e65 runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0004fafe8 sp=0xc0004fafe0 pc=0x47e421 created by github.com/btcsuite/btcd/addrmgr.(*AddrManager).Start in goroutine 4196 /home/joe/go/pkg/mod/github.com/btcsuite/btcd@v0.23.4/addrmgr/addrmanager.go:582 +0xda goroutine 4201 gp=0xc0081ed180 m=nil [select]: runtime.gopark(0xc003f6fc08?, 0x4?, 0xd8?, 0xff?, 0xc003f6fa74?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc003f6f908 sp=0xc003f6f8e8 pc=0x44628e runtime.selectgo(0xc003f6fc08, 0xc003f6fa6c, 0x0?, 0x0, 0x18b4700?, 0x1) /usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc003f6fa28 sp=0xc003f6f908 pc=0x458105 github.com/lightninglabs/neutrino/query.(*WorkManager).workDispatcher(0xc002fd0240) /home/joe/go/pkg/mod/github.com/lightninglabs/neutrino@v0.15.0/query/workmanager.go:255 +0x451 fp=0xc003f6ffc8 sp=0xc003f6fa28 pc=0xc50491 github.com/lightninglabs/neutrino/query.(*WorkManager).Start.gowrap1() /home/joe/go/pkg/mod/github.com/lightninglabs/neutrino@v0.15.0/query/workmanager.go:133 +0x25 fp=0xc003f6ffe0 sp=0xc003f6ffc8 pc=0xc4ffa5 runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc003f6ffe8 sp=0xc003f6ffe0 pc=0x47e421 created by github.com/lightninglabs/neutrino/query.(*WorkManager).Start in goroutine 4196 /home/joe/go/pkg/mod/github.com/lightninglabs/neutrino@v0.15.0/query/workmanager.go:133 +0x65 goroutine 4234 gp=0xc0081fa700 m=nil [select]: runtime.gopark(0xc004f6ef80?, 0x2?, 0x98?, 0xee?, 0xc004f6ef5c?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc004f6ee00 sp=0xc004f6ede0 pc=0x44628e runtime.selectgo(0xc004f6ef80, 0xc004f6ef58, 0x0?, 0x0, 0x0?, 0x1) /usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc004f6ef20 sp=0xc004f6ee00 pc=0x458105 github.com/btcsuite/btcd/peer.(*Peer).pingHandler(0xc000002008) /home/joe/go/pkg/mod/github.com/btcsuite/btcd@v0.23.4/peer/peer.go:1874 +0xcd fp=0xc004f6efc8 sp=0xc004f6ef20 pc=0xc7b18d github.com/btcsuite/btcd/peer.(*Peer).start.gowrap5() /home/joe/go/pkg/mod/github.com/btcsuite/btcd@v0.23.4/peer/peer.go:2314 +0x25 fp=0xc004f6efe0 sp=0xc004f6efc8 pc=0xc7cb45 runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc004f6efe8 sp=0xc004f6efe0 pc=0x47e421 created by github.com/btcsuite/btcd/peer.(*Peer).start in goroutine 4227 /home/joe/go/pkg/mod/github.com/btcsuite/btcd@v0.23.4/peer/peer.go:2314 +0x35b goroutine 4202 gp=0xc0081fb500 m=nil [sync.Cond.Wait]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc005577ea8 sp=0xc005577e88 pc=0x44628e runtime.goparkunlock(...) /usr/lib/go/src/runtime/proc.go:408 sync.runtime_notifyListWait(0xc000d3d6d0, 0x0) /usr/lib/go/src/runtime/sema.go:569 +0x159 fp=0xc005577ef8 sp=0xc005577ea8 pc=0x47a219 sync.(*Cond).Wait(0x0?) /usr/lib/go/src/sync/cond.go:70 +0x85 fp=0xc005577f38 sp=0xc005577ef8 pc=0x49bbe5 github.com/lightninglabs/neutrino.(*UtxoScanner).batchManager(0xc002fd48c0) /home/joe/go/pkg/mod/github.com/lightninglabs/neutrino@v0.15.0/utxoscanner.go:226 +0x1f5 fp=0xc005577fc8 sp=0xc005577f38 pc=0xca46b5 github.com/lightninglabs/neutrino.(*UtxoScanner).Start.gowrap1() /home/joe/go/pkg/mod/github.com/lightninglabs/neutrino@v0.15.0/utxoscanner.go:141 +0x25 fp=0xc005577fe0 sp=0xc005577fc8 pc=0xca4085 runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc005577fe8 sp=0xc005577fe0 pc=0x47e421 created by github.com/lightninglabs/neutrino.(*UtxoScanner).Start in goroutine 4196 /home/joe/go/pkg/mod/github.com/lightninglabs/neutrino@v0.15.0/utxoscanner.go:141 +0x78 goroutine 8115 gp=0xc0088376c0 m=nil [sync.RWMutex.RLock]: runtime.gopark(0x7fcbfc040c48?, 0xc0084ee1e0?, 0x40?, 0xd7?, 0x424996?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc005cbd718 sp=0xc005cbd6f8 pc=0x44628e runtime.goparkunlock(...) /usr/lib/go/src/runtime/proc.go:408 runtime.semacquire1(0xc005a816cc, 0x0, 0x3, 0x0, 0x16) /usr/lib/go/src/runtime/sema.go:160 +0x225 fp=0xc005cbd780 sp=0xc005cbd718 pc=0x459145 sync.runtime_SemacquireRWMutexR(0x0?, 0x0?, 0xc005cbd7f0?) /usr/lib/go/src/runtime/sema.go:82 +0x25 fp=0xc005cbd7b8 sp=0xc005cbd780 pc=0x479fc5 sync.(*RWMutex).RLock(...) /usr/lib/go/src/sync/rwmutex.go:70 github.com/btcsuite/btcwallet/waddrmgr.(*Manager).WatchOnly(0xc005a816c0) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/waddrmgr/manager.go:395 +0x48 fp=0xc005cbd800 sp=0xc005cbd7b8 pc=0xc13068 github.com/btcsuite/btcwallet/waddrmgr.(*ScopedKeyManager).AccountProperties(0xc0058380c0, {0x7fcbfc14e148, 0xc003518000}, 0x0) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/waddrmgr/scoped_manager.go:601 +0x168 fp=0xc005cbd8a0 sp=0xc005cbd800 pc=0xc201c8 github.com/btcsuite/btcwallet/wallet.(*Wallet).Accounts.func1.1(0x41795b?) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/wallet/wallet.go:2502 +0x3c fp=0xc005cbd950 sp=0xc005cbd8a0 pc=0xce9c3c github.com/btcsuite/btcwallet/waddrmgr.forEachAccount.func1({0xc003f9c040?, 0x1b7?, 0x1b7?}, {0xc003f9c044?, 0x10?, 0x7fcc43585b38?}) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/waddrmgr/db.go:1010 +0x31 fp=0xc005cbd970 sp=0xc005cbd950 pc=0xc0a251 go.etcd.io/bbolt.(*Bucket).ForEach(0xc005cbd9f8?, 0xc0063a8090) /home/joe/go/pkg/mod/go.etcd.io/bbolt@v1.3.8/bucket.go:389 +0x90 fp=0xc005cbd9d0 sp=0xc005cbd970 pc=0x7ad570 github.com/btcsuite/btcwallet/walletdb/bdb.(*bucket).ForEach(0x7fcbfc14e148?, 0x309f0a4?) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet/walletdb@v1.4.0/bdb/db.go:190 +0x17 fp=0xc005cbda08 sp=0xc005cbd9d0 pc=0x11b0cf7 github.com/btcsuite/btcwallet/waddrmgr.forEachAccount({0x7fcbfc14e148?, 0xc003518000?}, 0xc003518040?, 0xc0080e8300) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/waddrmgr/db.go:1005 +0xa4 fp=0xc005cbda48 sp=0xc005cbda08 pc=0xc0a1c4 github.com/btcsuite/btcwallet/waddrmgr.(*ScopedKeyManager).ForEachAccount(...) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/waddrmgr/scoped_manager.go:2388 github.com/btcsuite/btcwallet/wallet.(*Wallet).Accounts.func1({0x233c140, 0xc003128020}) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/wallet/wallet.go:2501 +0x23e fp=0xc005cbdc78 sp=0xc005cbda48 pc=0xce999e github.com/btcsuite/btcwallet/walletdb/bdb.(*db).View(0xc005ab06c8, 0xc0080e8000, 0xf63c8c?) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet/walletdb@v1.4.0/bdb/db.go:392 +0x9e fp=0xc005cbdce8 sp=0xc005cbdc78 pc=0x11b27de github.com/btcsuite/btcwallet/walletdb.View(...) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet/walletdb@v1.4.0/interface.go:260 github.com/btcsuite/btcwallet/wallet.(*Wallet).Accounts(0xc002e67b00, {0x87a7598?, 0xc0?}) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/wallet/wallet.go:2490 +0x11f fp=0xc005cbdd50 sp=0xc005cbdce8 pc=0xce969f github.com/crypto-power/cryptopower/libwallet/assets/btc.(*Asset).GetAccountsRaw(0xc002e67c20) /home/joe/git/cryptopower/libwallet/assets/btc/accounts.go:50 +0x59 fp=0xc005cbde08 sp=0xc005cbdd50 pc=0x1228c19 github.com/crypto-power/cryptopower/ui/page/components.CalculateTotalWalletsBalance({0x235f448, 0xc002e67c20}) /home/joe/git/cryptopower/ui/page/components/components.go:779 +0x36 fp=0xc005cbdf08 sp=0xc005cbde08 pc=0x14b5696 github.com/crypto-power/cryptopower/ui/page/wallet.(*SingleWalletMasterPage).updateBalance(0xc007f18008) /home/joe/git/cryptopower/ui/page/wallet/single_wallet_main_page.go:257 +0x27 fp=0xc005cbdf70 sp=0xc005cbdf08 pc=0x16b2ba7 github.com/crypto-power/cryptopower/ui/page/wallet.(*SingleWalletMasterPage).listenForNotifications.func3(0xc0030684e0?, 0x3068540?) /home/joe/git/cryptopower/ui/page/wallet/single_wallet_main_page.go:756 +0x125 fp=0xc005cbdfc0 sp=0xc005cbdf70 pc=0x16b9725 github.com/crypto-power/cryptopower/libwallet/assets/btc.(*Asset).AddTxAndBlockNotificationListener.func2.gowrap1() /home/joe/git/cryptopower/libwallet/assets/btc/txandblocknotifications.go:37 +0x27 fp=0xc005cbdfe0 sp=0xc005cbdfc0 pc=0x1234647 runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc005cbdfe8 sp=0xc005cbdfe0 pc=0x47e421 created by github.com/crypto-power/cryptopower/libwallet/assets/btc.(*Asset).AddTxAndBlockNotificationListener.func2 in goroutine 4211 /home/joe/git/cryptopower/libwallet/assets/btc/txandblocknotifications.go:37 +0x75 goroutine 8102 gp=0xc008837c00 m=nil [select]: runtime.gopark(0xc0036f0f78?, 0x3?, 0xff?, 0xff?, 0xc0036f0f12?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc0036f0da8 sp=0xc0036f0d88 pc=0x44628e runtime.selectgo(0xc0036f0f78, 0xc0036f0f0c, 0xc003aee600?, 0x0, 0xc003aee600?, 0x1) /usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc0036f0ec8 sp=0xc0036f0da8 pc=0x458105 github.com/lightninglabs/neutrino/blockntfns.(*SubscriptionManager).NewSubscription.func1() /home/joe/go/pkg/mod/github.com/lightninglabs/neutrino@v0.15.0/blockntfns/manager.go:224 +0xfd fp=0xc0036f0fe0 sp=0xc0036f0ec8 pc=0xc551bd runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0036f0fe8 sp=0xc0036f0fe0 pc=0x47e421 created by github.com/lightninglabs/neutrino/blockntfns.(*SubscriptionManager).NewSubscription in goroutine 8084 /home/joe/go/pkg/mod/github.com/lightninglabs/neutrino@v0.15.0/blockntfns/manager.go:220 +0x27c goroutine 8101 gp=0xc00884ae00 m=nil [select]: runtime.gopark(0xc0036f2f78?, 0x2?, 0xb8?, 0x2d?, 0xc0036f2ef4?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc0036f2d90 sp=0xc0036f2d70 pc=0x44628e runtime.selectgo(0xc0036f2f78, 0xc0036f2ef0, 0xc0036f2f74?, 0x0, 0xc0036f2f78?, 0x1) /usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc0036f2eb0 sp=0xc0036f2d90 pc=0x458105 github.com/lightningnetwork/lnd/queue.(*ConcurrentQueue).Start.func1() /home/joe/go/pkg/mod/github.com/lightningnetwork/lnd/queue@v1.0.1/queue.go:68 +0x3a5 fp=0xc0036f2fe0 sp=0xc0036f2eb0 pc=0xc53e45 runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0036f2fe8 sp=0xc0036f2fe0 pc=0x47e421 created by github.com/lightningnetwork/lnd/queue.(*ConcurrentQueue).Start in goroutine 8084 /home/joe/go/pkg/mod/github.com/lightningnetwork/lnd/queue@v1.0.1/queue.go:59 +0x76 goroutine 4178 gp=0xc00884b340 m=nil [select]: runtime.gopark(0xc004125c40?, 0x4?, 0xc0?, 0xc3?, 0xc004125a08?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc004125700 sp=0xc0041256e0 pc=0x44628e runtime.selectgo(0xc004125c40, 0xc004125a00, 0x0?, 0x0, 0xedd945f6c?, 0x1) /usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc004125820 sp=0xc004125700 pc=0x458105 github.com/dcrlabs/neutrino-ltc.rescan({0x2347730, 0xc009406078}, {0xc0085bca20, 0x7, 0xc?}) /home/joe/go/pkg/mod/github.com/dcrlabs/neutrino-ltc@v0.0.0-20221031001456-55ef06cefead/rescan.go:670 +0x1309 fp=0xc004125f28 sp=0xc004125820 pc=0x1364329 github.com/dcrlabs/neutrino-ltc.(*Rescan).Start.func1() /home/joe/go/pkg/mod/github.com/dcrlabs/neutrino-ltc@v0.0.0-20221031001456-55ef06cefead/rescan.go:1322 +0x13d fp=0xc004125fe0 sp=0xc004125f28 pc=0x136851d runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc004125fe8 sp=0xc004125fe0 pc=0x47e421 created by github.com/dcrlabs/neutrino-ltc.(*Rescan).Start in goroutine 215 /home/joe/go/pkg/mod/github.com/dcrlabs/neutrino-ltc@v0.0.0-20221031001456-55ef06cefead/rescan.go:1318 +0xa7 goroutine 8084 gp=0xc008879dc0 m=nil [select]: runtime.gopark(0xc004f3bc10?, 0x4?, 0x80?, 0x11?, 0xc004f3b9d8?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc004f3b6a0 sp=0xc004f3b680 pc=0x44628e runtime.selectgo(0xc004f3bc10, 0xc004f3b9d0, 0x32124a0?, 0x0, 0xedd945f70?, 0x1) /usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc004f3b7c0 sp=0xc004f3b6a0 pc=0x458105 github.com/lightninglabs/neutrino.rescan({0x23476d8, 0xc008b5efa8}, {0xc003580960, 0x7, 0xc?}) /home/joe/go/pkg/mod/github.com/lightninglabs/neutrino@v0.15.0/rescan.go:670 +0x1309 fp=0xc004f3bf28 sp=0xc004f3b7c0 pc=0xc9f0c9 github.com/lightninglabs/neutrino.(*Rescan).Start.func1() /home/joe/go/pkg/mod/github.com/lightninglabs/neutrino@v0.15.0/rescan.go:1326 +0x13d fp=0xc004f3bfe0 sp=0xc004f3bf28 pc=0xca331d runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc004f3bfe8 sp=0xc004f3bfe0 pc=0x47e421 created by github.com/lightninglabs/neutrino.(*Rescan).Start in goroutine 4215 /home/joe/go/pkg/mod/github.com/lightninglabs/neutrino@v0.15.0/rescan.go:1322 +0xa7 goroutine 8117 gp=0xc00889e380 m=nil [sync.RWMutex.RLock]: runtime.gopark(0xc000028c20?, 0xc000b0da28?, 0x3e?, 0xd6?, 0x10?) /usr/lib/go/src/runtime/proc.go:402 +0xce fp=0xc000b0d9b0 sp=0xc000b0d990 pc=0x44628e runtime.goparkunlock(...) /usr/lib/go/src/runtime/proc.go:408 runtime.semacquire1(0xc005a816cc, 0x0, 0x3, 0x0, 0x16) /usr/lib/go/src/runtime/sema.go:160 +0x225 fp=0xc000b0da18 sp=0xc000b0d9b0 pc=0x459145 sync.runtime_SemacquireRWMutexR(0xc0055d7410?, 0x0?, 0x1?) /usr/lib/go/src/runtime/sema.go:82 +0x25 fp=0xc000b0da50 sp=0xc000b0da18 pc=0x479fc5 sync.(*RWMutex).RLock(...) /usr/lib/go/src/sync/rwmutex.go:70 github.com/btcsuite/btcwallet/waddrmgr.(*Manager).AddrAccount(0xc005a816c0, {0x7fcbfc14e148, 0xc0036f87c0}, {0x233d9e8, 0xc0046f2ae0}) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/waddrmgr/manager.go:756 +0x8b fp=0xc000b0db60 sp=0xc000b0da50 pc=0xc1552b github.com/btcsuite/btcwallet/wallet.(*Wallet).CalculateAccountBalances.func1({0x233c140, 0xc008830a10}) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/wallet/wallet.go:1612 +0x1c5 fp=0xc000b0dc50 sp=0xc000b0db60 pc=0xce41e5 github.com/btcsuite/btcwallet/walletdb/bdb.(*db).View(0xc005ab06c8, 0xc0046f27e0, 0x11?) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet/walletdb@v1.4.0/bdb/db.go:392 +0x9e fp=0xc000b0dcc0 sp=0xc000b0dc50 pc=0x11b27de github.com/btcsuite/btcwallet/walletdb.View(...) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet/walletdb@v1.4.0/interface.go:260 github.com/btcsuite/btcwallet/wallet.(*Wallet).CalculateAccountBalances(0xc002e67b00, 0x0, 0x6) /home/joe/go/pkg/mod/github.com/btcsuite/btcwallet@v0.16.9/wallet/wallet.go:1593 +0xb8 fp=0xc000b0dd00 sp=0xc000b0dcc0 pc=0xce3fb8 github.com/crypto-power/cryptopower/libwallet/assets/btc.(*Asset).GetAccountBalance(0xc002e67c20, 0x0) /home/joe/git/cryptopower/libwallet/assets/btc/accounts.go:107 +0x68 fp=0xc000b0dd50 sp=0xc000b0dd00 pc=0x1228fe8 github.com/crypto-power/cryptopower/libwallet/assets/btc.(*Asset).GetAccountsRaw(0xc002e67c20) /home/joe/git/cryptopower/libwallet/assets/btc/accounts.go:57 +0x125 fp=0xc000b0de08 sp=0xc000b0dd50 pc=0x1228ce5 github.com/crypto-power/cryptopower/ui/page/components.CalculateTotalWalletsBalance({0x235f448, 0xc002e67c20}) /home/joe/git/cryptopower/ui/page/components/components.go:779 +0x36 fp=0xc000b0df08 sp=0xc000b0de08 pc=0x14b5696 github.com/crypto-power/cryptopower/ui/page/wallet.(*SingleWalletMasterPage).updateBalance(0xc007f18008) /home/joe/git/cryptopower/ui/page/wallet/single_wallet_main_page.go:257 +0x27 fp=0xc000b0df70 sp=0xc000b0df08 pc=0x16b2ba7 github.com/crypto-power/cryptopower/ui/page/wallet.(*SingleWalletMasterPage).listenForNotifications.func3(0xc003aee600?, 0x3aee5a0?) /home/joe/git/cryptopower/ui/page/wallet/single_wallet_main_page.go:756 +0x125 fp=0xc000b0dfc0 sp=0xc000b0df70 pc=0x16b9725 github.com/crypto-power/cryptopower/libwallet/assets/btc.(*Asset).AddTxAndBlockNotificationListener.func2.gowrap1() /home/joe/git/cryptopower/libwallet/assets/btc/txandblocknotifications.go:37 +0x27 fp=0xc000b0dfe0 sp=0xc000b0dfc0 pc=0x1234647 runtime.goexit({}) /usr/lib/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000b0dfe8 sp=0xc000b0dfe0 pc=0x47e421 created by github.com/crypto-power/cryptopower/libwallet/assets/btc.(*Asset).AddTxAndBlockNotificationListener.func2 in goroutine 4211 /home/joe/git/cryptopower/libwallet/assets/btc/txandblocknotifications.go:37 +0x75 rax 0xca rbx 0x0 rcx 0x480263 rdx 0x0 rdi 0x32151a0 rsi 0x80 rbp 0x7fff2051ecb0 rsp 0x7fff2051ec68 r8 0x0 r9 0x0 r10 0x0 r11 0x286 r12 0x7fff2051ec88 r13 0xc000095f94 r14 0x32134e0 r15 0x3fffffffffffffff rip 0x480261 rflags 0x286 cs 0x33 fs 0x0 gs 0x0 ```
JoeGruffins commented 3 months ago

I'm not publishing blocks if the chain is not synced now in that pr. I think that was spamming the wallets getting balance updates. I don't think that would cause them to lock up but it should make the stack trace easier to read whenever it happens again.

JoeGruffins commented 3 months ago

I just had a similar looking freeze on master with dcr, not rescanning.

dreacot commented 3 months ago

I just had a similar looking freeze on master with dcr, not rescanning.

i think the culprit is usually btc and ltc

the way the upstream code is structured, it blocks during a rescan, if i can find the upstream LOC i'd update this comment