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
gridcoinreseach client not shutting down via File/Exit resulting in corrupted database and wallet. #1293
Comments
The log shows clear evidence of at least two gridcoinresearch processes running simultaneously. It appears the first instance only partially shut down and another instance tried to access the database, leading to corruption. I helped do initial troubleshooting for this on Discord yesterday night and requested that an issue be created. I was able to determine that a normal kill signal finishes off the residual process that remains after file/exit is executed. I cannot duplicate this issue on my Linux platforms. |
Please check the integrity of your disk and then as for wallet try a previous backup of the wallet and see if it loads without any problems. if transactions are missing shutdown the wallet and then restart with -rescan so it will rescan for missing transactions. the wallet will backup daily if ran for a daily amount of time. |
keep this issue up to date with your progress and lets figure this out |
I had the same or similar issue on a dedicated laptop wallet ( no crunching just wallet , no normal computer use ) and we assumed it was due to my 100ish wallet addresses. I had the client running on the 3.7.15.0 series distro and had not noticed for 2 days that it was complaining about a corrupt database. As I had created wallet addresses A-Z , AA-ZZ and 1-50 and would use a new one each time with a faucet. So each UTXO only had .02-1grc each and that was it vs the main address at 25kish. |
Well, I think I figured out what is going on with wallet not always shutting down when I think it should. I did check the drive integrity: no SMART errors, /messages/syslog/dmesg entries, e2fsck is clean. First some background. My main Slackware box is configured with Xfce 4.12 and 2 independent X screens: Your wallet has "File - Exit" and the X in the upper corner but no "File -Close". In both GTK(Boinc) and Qt (GRC) these are fully configurable. With GRC-wallet I was expecting the X to be "File - Exit" and not "File -Close". "File -Close" usually is set to minimize to task bar or systray (see Boinc Manager) as it is on my system (checked with some other programs as well). Thus, when I clicked the X, GRC-wallet did not close but minimized to systray. Since Screen1 has no systray...GRC-wallet was still in memory when I would launch it again (on either X screen). Recommendations:
This will alleviate some confusion among users (i.e. me) running multiple screens and various DE/WM configurations. Thanks. |
In which DE the systray does not show applications from other screens? It is interesting issue, because systrayed apps are not on any particular screen, because they do not have window. Gridcoin locks it's data directory and keeps it locked during run time, therefore the second instance should not start. If it does not, and corrupts data if multiple are started, then issue specific to that should be opened. |
Since moving the GRC wallet to the other X screen running a systray so I know if its "really" shut down and not just "closed", verified with htop, it seems stable. It is concerning that there does not seem to be a start up check to make sure the wallet is not already in memory, or to prevent the new copy from accessing the files. /off-topic |
I agree that the [X] should close the wallet if there is no systray. I'd assume Qt abstracted this but I'll have a look. Edit: It looks from the Bitcoin source that it handles the [X] the same way as we do. It either minimizes to tray if the option is enabled, or it quits. Are you sure it works in other wallets? |
Is this still an issue? BTW there IS a startup check to see if the files are already locked. I am going to close this if there is no response after a few days. |
With v3.7.15.0 stopping and restarting the gridcoinreseach (no server) was not an issue. After upgrading to v3.7.16.0, yesterday noticed that the gridcoinreseach client green check mark was replaced with sync icon: client had lost sync/not up-to-date and wasn't downloading blocks. After File/Exit, the client would not start up, giving corrupt DB and wallet errors. I was able to restore and backup wallet and reload teh snapshot.zip files. Client starting normally and was back up-to-date in about an hour. Asked about this issue on #gridcoin (IRC/Dicord). After another shutdown, we noted that gridcoinreseach was still running and writing to log. Killed process; gridcoinreseach started up normally. Several hours later, shut down gridcoinreseach, killed dangling process, error on startup:
Deleted blk0001.dat, tcleveldb/* and reloaded snapshot.db. gridcoinresearch syndec with no wallet errors. The only difference I can find after v3.7.16.0 installation (Tuesday) is that I upgraded to linux kernel 4.4.153 (more spectre/meltdown mitigations, new i7-6850K firmware) and nvidia-390.87 (Thursday) and the issues happened/noticed 2 days later. System info:
I've attached IRC transcript, dg.log and debug.log around the time on the errors.
db-1st_error.log
db-2nd_error_.log
grc_debuglog1.txt
grc_debuglog2.txt
grc_debuglog3.txt
grc_irc_debug_transcript-edited.txt
The text was updated successfully, but these errors were encountered: