-
Notifications
You must be signed in to change notification settings - Fork 119
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
[bug]: Tapd crashed during minting some unexpected non-final batches #1125
Comments
Thanks for the detailed issue! I initially thought this could be an issue with the on-disk state of one of those Could you try out this branch with that DB? Or apply the patch in some other way if you prefer. https://github.com/lightninglabs/taproot-assets/tree/batch_marshal_fixes |
@btcwer thank you for such a well-written review |
Applied this patch but it didn't work. When marshalMintingBatch() failed, the daemon quitted too.
|
Yes, I expected a quit to still happen; just wanted to make sure the panic was now prevented. Can you inspect the DB entries for that batch? A first step would be to see if a TX was made, and if so if it ever got confirmed. Alsoc, could you provide more details about that batch, such as if you created it with an older version, maybe it had a large # of assets, etc.? Perhaps we should adjust the minter to skip batches that were stored in a bad state, but I'd prefer finding out how we got there. |
@btcwer Would you be able to provide the requested information? #1125 (comment) |
will close if we can't get more info |
Wont panic now, Will reopen if we get more information from @bitwer |
Background
Tapd crashed quickly when starting up in bitcoin testnet enviroment. It can be seen from below logs that this is from an nil pointer reference.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x12de1fd]
Your environment
Steps to reproduce
Tapd's logs as followed:
Cause
For some reason there were unfinished minting batches in db. The Tapd was running for a month properly, but crash during a restart recently. Don't know why this can't be handled properly but a crash.
Solution
The func marshalMintingBatch() in tapdb/assets_store.go, should has a validation on assetRoot like below:
The text was updated successfully, but these errors were encountered: