SiaFoundation / walletd

A new Sia wallet
https://sia.tech/software/walletd
MIT License
14 stars 6 forks source link

Walletd crash since SQL transaction is taking too long #86

Closed ps2xu closed 4 months ago

ps2xu commented 4 months ago

Hey,

Sorry to bother you again, the reason is that I encountered another issue.🙏🙏 I've encountered an issue after compiling the latest walletd code. The CLI outputted a sqlite3.transaction long transaction message accompanied by a lengthy JSON string. Moreover, a few hours into running the program, walletd terminated unexpectedly, which might be attributed to a memory overflow. Attached below is the log file copied from the CLI for your examination.

DEBUG  sqlite3.transaction     long transaction      
 {
    "id": "21f96c22",
    "attempt": 1,
    "elapsed": "35.421ms",
    "stack": "go.sia.tech/walletd/persist/sqlite.doTransaction.func1\n\tgo.sia.tech/walletd/persist/sqlite/store.go:92\ngo.sia.tech/walletd/persist/sqlite.doTransaction\n\tgo.sia.tech/walletd/persist/sqlite/store.go:105\ngo.sia.tech/walletd/persist/sqlite.(*Store).transaction\n\tgo.sia.tech/walletd/persist/sqlite/store.go:40\ngo.sia.tech/walletd/persist/sqlite.(*Store).ProcessChainApplyUpdate\n\tgo.sia.tech/walletd/persist/sqlite/consensus.go:587\ngo.sia.tech/coreutils/chain.(*Manager).applyTip\n\tgo.sia.tech/coreutils@v0.0.4-0.20240308153335-c2b088520ec8/chain/manager.go:330\ngo.sia.tech/coreutils/chain.(*Manager).reorgTo\n\tgo.sia.tech/coreutils@v0.0.4-0.20240308153335-c2b088520ec8/chain/manager.go:402\ngo.sia.tech/coreutils/chain.(*Manager).AddBlocks\n\tgo.sia.tech/coreutils@v0.0.4-0.20240308153335-c2b088520ec8/chain/manager.go:244\ngo.sia.tech/coreutils/syncer.(*Syncer).syncLoop.func3\n\tgo.sia.tech/coreutils@v0.0.4-0.20240308153335-c2b088520ec8/syncer/syncer.go:563\ngo.sia.tech/coreutils/syncer.(*Peer).SendBlocks\n\tgo.sia.tech/coreutils@v0.0.4-0.20240308153335-c2b088520ec8/syncer/peer.go:153\ngo.sia.tech/coreutils/syncer.(*Syncer).syncLoop\n\tgo.sia.tech/coreutils@v0.0.4-0.20240308153335-c2b088520ec8/syncer/syncer.go:598\ngo.sia.tech/coreutils/syncer.(*Syncer).Run.func3\n\tgo.sia.tech/coreutils@v0.0.4-0.20240308153335-c2b088520ec8/syncer/syncer.go:621",
    "failed": false
}

logFile: SiaWallet_emory_overflow.log

n8maninger commented 4 months ago

This should be fixed by #72, but I highly recommend waiting until the beta release to run walletd on Mainnet. We're still making breaking changes to the API and data structures.