-
Notifications
You must be signed in to change notification settings - Fork 178
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
listaddressgroupings causes a crash to desktop on Windows 10 with 5.3.1.7 (RC4) #2240
Comments
Looks like I may have duplicated the problem in one of my testnet nodes and have a clean trace: Thread 4 "QThread" received signal SIGSEGV, Segmentation fault. |
This seems to indicate that the solver is returning a zero length vector of solutions despite also returning a status of true. This will require further investigation. |
Crashes also on MacOS. Below is what I believe is the interesting parts of the OS crash log. Have saved the whole thing so just ping me if you want me to post it all.
|
@cyrossignol I am going to need your help on this one... I modified GetAddressGroupings() thusly... set< set > CWallet::GetAddressGroupings()
} In particular I put in a check for txin.prevout.n >= mapWallet[txin.prevout.hash].vout.size(), because I was suspecting an out of range vector element access attempt, as that would be the most likely cause of the exception. Looks like I was right: With that invalid element (off the end) check in place, listaddressgroupings is successful. On my testnet node that is exhibiting crashing, here are the errors in the debug.log from the range check. 2021-07-17T22:23:41Z ERROR: GetAddressGroupings: txin.prevout.n = 2 >= mapWallet[txin.prevout.hash].vout.size() = 0. I am going to do a zaptransactions and rebuild the wallet.dat and see if that fixes the errors. If it does that tells us something, but raises questions about How the prevout.n of the txin could be greater than or equal to the vector size for the prevout vout.... |
Actually, first I am going to put in more detailed logging including the transaction hashes to see what gettransaction shows.... |
2021-07-17T22:41:28Z ERROR: GetAddressGroupings: txin.prevout.n = 2 >= mapWallet[txin.prevout.hash].vout.size() = 0 for input prevout transaction hash 33270d104b127a564ca25b7a6f61e9880a2c0580116d4ec826c58ccf8ef85914 |
What in the heck?? |
Let's try a rescan first. |
Something really really screwy is going on. The rescan didn't work. Zapwallettxes didn't work. Taking the blockchain from another testnet node doesn't work. Doing a dumpwallet, folllowed by importwallet with a fresh, known good blockchain results in the following for that last transaction hash above: Node with the problem: Good node: Note that the blockchain on the problem node was copied from the good node, and the wallet.dat was completely rebuilt. |
The above adaptation of bitcoin/bitcoin#1872 fixes the problem. Thanks to @iFoggz by finding it while I was doing further troubleshooting! :) |
Bug Report
Current behavior
listaddressgroupings
causes a crash to desktopExpected behavior
Application should not crash
Steps to reproduce:
Open console
Enter
listaddressgroupings
Gridcoin version
v5.3.1.7-gf47664e2c-3
Machine specs
Extra information
Nothing is printed to debug.log even with noisy set to true. With Jim's help I ran it in gdb, here are the backtraces:
and a single trace:
The text was updated successfully, but these errors were encountered: