get10101 / 10101

10101 (Ten-Ten-One): Self-custodial derivative trading at your fingertips.
https://10101.finance
MIT License
124 stars 21 forks source link

Failed to run DLC manager periodic check: Storage error Packet extended beyond the provided bytes #2587

Open holzeis opened 1 month ago

holzeis commented 1 month ago

Closed channel remains in state Collaborative Close Offered even though the on-chain transaction has already been confirmed.

IMG_D5D09B783D7D-1 IMG_C1DDC5D02D0E-1
holzeis commented 1 month ago

Full sync up to a gap of 40 did not change anything.

holzeis commented 1 month ago

I found this in my logs

[ERROR] TIME: 2024-05-30T18:30:27.451100Z r: dlc_manager::chain_monitor: Transaction 8542319af59123ebc80b623470698d2fada0406eb27a5bccc0400898ffb71ed4 already confirmed: ChannelInfo { channel_id: [118, 210, 199, 19, 9, 245, 67, 50, 162, 86, 2, 245, 52, 56, 216, 85, 60, 89, 87, 184, 31, 34, 30, 215, 254, 110, 130, 169, 213, 103, 135, 54], tx_type: CollaborativeClose } 
[ERROR] TIME: 2024-05-30T18:30:34.067231Z r: Failed to run DLC manager periodic check: Storage error Packet extended beyond the provided bytes 

I believe the periodic check is not working for me, because I have a broken dlc channel.

luckysori commented 1 month ago

I did not do any meaningful work towards fixing this beyond trying to reproduce it. I'm unassigning myself now.

Can we close this, @holzeis? I think the assumption here is that we just failed to process this channel because we can no longer deserialise it due to a breaking change.

holzeis commented 4 weeks ago

Can we close this, @holzeis? I think the assumption here is that we just failed to process this channel because we can no longer deserialise it due to a breaking change.

It seems to me, because of a broken channel in my storage, that the periodic check never completes. I think this is somewhat critical.

luckysori commented 4 weeks ago

Right, you are saying that one bad channel blocks the rest of the periodic check.

That's weird because surely we would run into the same situation in the coordinator, where we have way more channels. In the last 30 days, we did not see the message "Failed to run DLC manager periodic check".

I think we should try to reproduce this with more logs to figure out where it's happening. Maybe it's not a DLC channel that is being deserialised.

luckysori commented 4 weeks ago

Having had a quick look, I don't see how failing to deserialise a channel out of a list of them can cause problems, because we seemingly always log an error and continue in such a scenario.

Unless you have other ideas, I would just log on every error returned by every ? in xxi-node/src/storage/mod.rs and run your app again.

holzeis commented 4 weeks ago

Since this is happening on my mainnet app I can do some debugging and see why this is happening.