seredat / karbowanec

Karbo (Karbovanets) - Digital Exchange Medium - cryptocurrency made in Ukraine, CryptoNote protocol implementation.
https://karbo.io/
Other
104 stars 66 forks source link

Crashing on certain reorgs #192

Closed aivve closed 2 years ago

aivve commented 2 years ago

At some reorgs the daemon crashes with: malloc(): unsorted double linked list corrupted karbowanecd[3372]: segfault at 0 ip (null) sp 000000002d8f23a8 error 14 in karbowanecd[400000+34b000]

This seems to happen when a competing chain overcomes the node's chain.

The log from daemon:

2022-Mar-26 08:31:33.005479 INFO    [Blockchain] ----- BLOCK ADDED AS ALTERNATIVE ON HEIGHT 731240
2022-Mar-26 08:31:33.005479 INFO    [Blockchain] id:            b06b3742f6b809f95f28cc556978a04a614ccc1c6380cb0f3aaf00ba6cf09ee1
2022-Mar-26 08:31:33.005479 INFO    [Blockchain] PoW:   1ce2e082004545c2e9201ed27558fb5669d89377db47c038c388a02646020000
2022-Mar-26 08:31:33.005479 INFO    [Blockchain] difficulty:    6650000
2022-Mar-26 08:33:28.219372 INFO    [Blockchain] ###### REORGANIZE on height: 731240 of 731240 with cum_difficulty 5918048409836289
2022-Mar-26 08:33:28.219372 INFO    [Blockchain]  alternative blockchain size: 2 with cum_difficulty 5918048416506289
2022-Mar-26 08:33:31.464732 INFO    [Blockchain] ----- BLOCK ADDED AS ALTERNATIVE ON HEIGHT 731240
2022-Mar-26 08:33:31.464732 INFO    [Blockchain] id:            815381047325bac3172f51d0fdfb9429c22431cb6bf1132190cde8f1d55ab4c3
2022-Mar-26 08:33:31.464732 INFO    [Blockchain] PoW:   490d62f55730c638d41b5633b9b9a57d357ffd34c0677d75963e7bc948000000
2022-Mar-26 08:33:31.464732 INFO    [Blockchain] difficulty:    6650000
aivve commented 2 years ago

Possibly #172 has something in common

aivve commented 2 years ago

Image 14 So it seems to be fixed now by #193