Git-Jiro / homebrew-jiro

This repository contains homebrew formulae authored by me
26 stars 11 forks source link

5.2.0.0 crashes due to excess cpu usage #91

Closed chuckcoleman closed 3 years ago

chuckcoleman commented 3 years ago

MacOS 11.2.0

Some context: 5.1.0.0 stopped accepting new blocks about a week or so ago. After a few tries at installing 5.2.0.0, I did a fresh install. It happily updated the chain but my wallet was empty. I added my keys to gridcoinresearch.conf. That didn't fix the problem, so I restarted with an old wallet. Everything loaded find, then twice..

debug.log is attached.

The latest diag file (the other is similar):

Date/Time: 2021-03-08 20:27:03.190 -0500 End time: 2021-03-08 20:29:24.406 -0500 OS Version: macOS 11.2 (Build 20D64) Architecture: x86_64h Report Version: 32 Incident Identifier: B6BDC2A5-EAFC-4D44-9C6E-5458547896A0 Share With Devs: Yes

Data Source: Microstackshots Shared Cache: A33707D1-FC47-30FB-A239-A6AFA68DA7C0 slid base address 0x7fff202e4000, slide 0x2e4000

Command: gridcoinresearch Path: /Applications/gridcoinresearch.app/Contents/MacOS/gridcoinresearch Identifier: org.bitcoinfoundation.Bitcoin-Qt Version: 5.2.0 (5.2.0) Parent: UNKNOWN [1] PID: 9306

Event: cpu usage Action taken: none CPU: 90 seconds cpu time over 141 seconds (64% cpu average), exceeding limit of 50% cpu over 180 seconds CPU limit: 90s Limit duration: 180s CPU used: 90s CPU duration: 141s Duration: 141.22s Duration Sampled: 131.90s Steps: 41

Hardware model: iMac18,1 Active cpus: 4

Fan speed: 1195 rpm

Heaviest stack for the target process: 41 thread_start + 15 (libsystem_pthread.dylib + 9339) [0x7fff205f147b] 41 _pthread_start + 224 (libsystem_pthread.dylib + 26960) [0x7fff205f5950] 41 ??? (libboost_thread-mt.dylib + 11256) [0x104f2fbf8] 41 ??? (gridcoinresearch + 2634905) [0x104827499] 41 ??? (gridcoinresearch + 2635430) [0x1048276a6] 40 ??? (gridcoinresearch + 2348184) [0x1047e1498] 29 ??? (gridcoinresearch + 2360018) [0x1047e42d2] 29 ??? (gridcoinresearch + 2592756) [0x10481cff4] 29 ??? (gridcoinresearch + 2414083) [0x1047f1603] 29 ??? (gridcoinresearch + 2414249) [0x1047f16a9]

Powerstats for: gridcoinresearch (Gridcoin) [9306] UUID: 115D23AD-5817-3D0B-94CE-FF8976A486DF App Version: 5.2.0 Build Version: 5.2.0 Path: /Applications/gridcoinresearch.app/Contents/MacOS/gridcoinresearch Architecture: x86_64 Parent: UNKNOWN [1] UID: 501 Footprint: 873.92 MB Pageins: 5 pages Start time: 2021-03-08 20:27:12.332 -0500 End time: 2021-03-08 20:29:24.229 -0500 Num samples: 41 (100%) Primary state: 35 samples Non-Frontmost App, Non-Suppressed, User mode, Effective Thread QoS Default, Requested Thread QoS Default, Override Thread QoS Unspecified User Activity: 0 samples Idle, 41 samples Active Power Source: 0 samples on Battery, 41 samples on AC 41 thread_start + 15 (libsystem_pthread.dylib + 9339) [0x7fff205f147b] 41 _pthread_start + 224 (libsystem_pthread.dylib + 26960) [0x7fff205f5950] 41 ??? (libboost_thread-mt.dylib + 11256) [0x104f2fbf8] 41 ??? (gridcoinresearch + 2634905) [0x104827499] 41 ??? (gridcoinresearch + 2635430) [0x1048276a6] 40 ??? (gridcoinresearch + 2348184) [0x1047e1498] 29 ??? (gridcoinresearch + 2360018) [0x1047e42d2] 29 ??? (gridcoinresearch + 2592756) [0x10481cff4] 29 ??? (gridcoinresearch + 2414083) [0x1047f1603] 29 ??? (gridcoinresearch + 2414249) [0x1047f16a9] 3 2 6 ??? (gridcoinresearch + 2359887) [0x1047e424f] 6 ??? (gridcoinresearch + 2592756) [0x10481cff4] 6 ??? (gridcoinresearch + 2414083) [0x1047f1603] 6 ??? (gridcoinresearch + 2414249) [0x1047f16a9] 1 5 ??? (gridcoinresearch + 2360891) [0x1047e463b] 5 ??? (gridcoinresearch + 2330269) [0x1047dce9d] 5 ??? (gridcoinresearch + 2592756) [0x10481cff4] 5 ??? (gridcoinresearch + 2414083) [0x1047f1603] 5 ??? (gridcoinresearch + 2414249) [0x1047f16a9] 1 ??? (gridcoinresearch + 2347874) [0x1047e1362] 1 ??? (gridcoinresearch + 3862838) [0x104953136] 1 ??? (gridcoinresearch + 3866472) [0x104953f68]

Binary Images: 0x1045a4000 - 0x104dfbfff org.bitcoinfoundation.Bitcoin-Qt 5.2.0 (5.2.0) <115D23AD-5817-3D0B-94CE-FF8976A486DF> /Applications/gridcoinresearch.app/Contents/MacOS/gridcoinresearch 0x104f2d000 - 0x104f40fff libboost_thread-mt.dylib (0) <5A04F107-39F0-3560-8FAA-5CB5C94B5C9A> /Applications/gridcoinresearch.app/Contents/Frameworks/libboost_thread-mt.dylib 0x7fff205ef000 - 0x7fff205fafff libsystem_pthread.dylib (454.80.2) /usr/lib/system/libsystem_pthread.dylib debug.log

chuckcoleman commented 3 years ago

Same setup, now 5.2.1.0 dies after startup. It updates the blockchain, then can't find the database. I loaded Gridcoin twice and got the same messages, per below. Both times produce the below message twice. Log is attached. debug.log

EXCEPTION: St13runtime_error
CDB() : can't open database file , error -30974
gridcoin in ProcessMessages()

Git-Jiro commented 3 years ago

Hm ... very strange. On my Catalina machine it works without any flaws.

chuckcoleman commented 3 years ago

I'm using Big Sur. On Friday, March 12, 2021, 02:33:44 PM EST, Martin Schimandl @.***> wrote:

Hm ... very strange. On my Catalina machine it works without any flaws.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Git-Jiro commented 3 years ago

I will see if i can get a BigSur VM running, and try to reproduce the issue there.

chuckcoleman commented 3 years ago

We're still not there with 5.2.2.0. Now after, the following error, gridcoin runs a few commands and dies:


EXCEPTION: St13runtime_error
CWalletDB::ListAccountCreditDebit() : cannot create DB cursor
gridcoin in ProcessMessages() debug.log

chuckcoleman commented 3 years ago

5.3.0.0 produces the same error. debug.log

Git-Jiro commented 3 years ago

hm... maybe the error has nothing to do with the Gridcoin version you are using. Maybe you have some data corruption of the gridcoin related data on your machine? Unfortunately I am not sure what are the important files to keep and which ones can be deleted. I am 100% sure ~/Library/Application Support/GridcoinResearch/ gridcoinresearch.conf and wallet.dat are important. But i am not sure what can be deleted and will be re downloaded automatically to fix your issue.

scribblemaniac commented 3 years ago

I am 100% sure ~/Library/Application Support/GridcoinResearch/ gridcoinresearch.conf and wallet.dat are important. But i am not sure what can be deleted and will be re downloaded automatically to fix your issue.

In addition to the files mentioned, you should also keep the walletbackups folder. This is particularly important if your wallet is not exiting properly. Everything other than these three things can be deleted while the wallet is closed and then you can either install the snapshot or sync from zero.

chuckcoleman commented 3 years ago

I restored an old wallet and edited gridcoinresearch.conf to remove the addnodes to keep it minimal. On startup, the blockchain is synchronized and everything looks fine. Then, it stops accepting new blocks. I see many "ORPHAN BLOCK" messages. I know that about 100 should be real. debug.log

scribblemaniac commented 3 years ago

Orphan blocks are normal and not something to be concerned about right now. They come from connections you have to forked nodes and are still quite common right now from nodes that forked while running 5.1/5.2. Higher CPU usage while processing these blocks is also normal.

chuckcoleman commented 3 years ago

I think I overreacted or displayed the effects of decades of forgoing caffeine.  I'm on chain.  Everything looks good. On Monday, March 22, 2021, 01:43:03 PM EDT, scribblemaniac @.***> wrote:

Orphan blocks are normal and not something to be concerned about right now. They come from connections you have to forked nodes and are still quite common right now from nodes that forked while running 5.1/5.2. Higher CPU usage while processing these blocks is also normal.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.