get10101 / 10101

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

Aborting after panic: Commitment txids are unique outside of fuzzing, where hashes can collide #1074

Closed holzeis closed 1 year ago

holzeis commented 1 year ago

After upgrading my test app to the latest build, my app is crashing at startup when updating the channel monitor.

2023-08-05T07:40:46.992981Z ERROR native::api: Aborting after panic in task info=panicked at 'Commitment txids are unique outside of fuzzing, where hashes can collide', /Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/chain/channelmonitor.rs:2115:17

See full logs below

flutter: | 2023-08-05 09:40:45.711 | LogLevel.INFO | Built on commit: 261cf2aca2293cc80ca24b804b9406f7cc462094
flutter: | 2023-08-05 09:40:45.711 | LogLevel.INFO | Built on branch: main
flutter: | 2023-08-05 09:40:45.711 | LogLevel.INFO | Build number: 1.1.0
flutter: | 2023-08-05 09:40:45.711 | LogLevel.INFO | Build version: 1.1.0
flutter: | 2023-08-05 09:40:45.711 | LogLevel.INFO | Network: regtest
flutter: | 2023-08-05 09:40:45.713 | LogLevel.INFO | Esplora endpoint: http://35.189.57.114:3000
flutter: | 2023-08-05 09:40:45.713 | LogLevel.INFO | Coordinator: 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802@35.189.57.114:9045
flutter: | 2023-08-05 09:40:45.714 | LogLevel.INFO | Oracle endpoint: http://127.0.0.1:8081
flutter: | 2023-08-05 09:40:45.714 | LogLevel.INFO | Oracle PK: 16f88cf7d21e6c0f46bcbc983a4e3b19726c6c98858cc31c83551a88fde171c0
flutter: | 2023-08-05 09:40:45.716 | LogLevel.INFO | Node ID: 034de0c34cc7941dc8fb901b2923d8f4480e4358ec08f1c08726f12facc1f4fd79
flutter: | 2023-08-05 09:40:45.719 | LogLevel.DEBUG | Last login was at 2023-08-05 05:37:50 +00:00:00
2023-08-05T07:40:45.728573Z DEBUG ln_dlc_node::node::connection: Connection setup completed peer=03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802@35.189.57.114:9045
2023-08-05T07:40:45.728808Z DEBUG ln_dlc_node::node::connection: Waiting to confirm established connection peer=03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802@35.189.57.114:9045
flutter: | 2023-08-05 09:40:45.729 | LogLevel.DEBUG | Connection setup completed peer: 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802@35.189.57.114:9045
flutter: | 2023-08-05 09:40:45.729 | LogLevel.DEBUG | Waiting to confirm established connection peer: 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802@35.189.57.114:9045
2023-08-05T07:40:46.019615Z DEBUG log: Finished noise handshake for connection with 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802 log.target="lightning::ln::peer_handler" log.module_path="lightning::ln::peer_handler" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/peer_handler.rs" log.line=1191
flutter: | 2023-08-05 09:40:46.020 | LogLevel.DEBUG | lightning::ln::peer_handler: Finished noise handshake for connection with 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802
2023-08-05T07:40:46.029592Z  INFO orderbook_client: Connected to orderbook realtime API
flutter: | 2023-08-05 09:40:46.030 | LogLevel.INFO | Connected to orderbook realtime API
2023-08-05T07:40:46.034912Z DEBUG native::orderbook: New message from orderbook msg={"AllOrders":[{"id":"72227378-2589-4fa9-b998-08a9d019e9e9","price":28941.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Long","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.229126Z","expiry":"2023-08-05T07:41:15.228389Z"},{"id":"dfb833b8-cf44-41e1-9676-c35aef9877a1","price":29180.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Short","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.232972Z","expiry":"2023-08-05T07:41:15.232047Z"},{"id":"a0415d72-3f72-4b59-9cbe-97550e819b67","price":28941.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Long","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.242801Z","expiry":"2023-08-05T07:41:15.24153Z"},{"id":"98751ec7-c2ff-48f8-922f-1edf8f4ebeab","price":29180.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Short","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.246796Z","expiry":"2023-08-05T07:41:15.245835Z"},{"id":"f9c31b62-a151-4025-a868-30b7609e0ef5","price":28941.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Long","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.249865Z","expiry":"2023-08-05T07:41:15.24915Z"},{"id":"a64c893b-42dc-4cef-bcf6-9eed41df7750","price":29180.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Short","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.252697Z","expiry":"2023-08-05T07:41:15.25195Z"},{"id":"ff4d4f36-e0cd-4f84-ab6a-5e314133bd5a","price":28941.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Long","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.255442Z","expiry":"2023-08-05T07:41:15.254561Z"},{"id":"f3afb961-a2cf-4f48-aa2b-3db1dea8f6ae","price":29180.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Short","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.257995Z","expiry":"2023-08-05T07:41:15.257302Z"},{"id":"e852970c-8fbd-4149-9560-f4bd607c1efa","price":28941.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Long","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.260901Z","expiry":"2023-08-05T07:41:15.260265Z"},{"id":"665e8adb-c3d2-45e4-be91-dd59a9285666","price":29180.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Short","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.26338Z","expiry":"2023-08-05T07:41:15.262637Z"}]}
flutter: | 2023-08-05 09:40:46.035 | LogLevel.DEBUG | New message from orderbook msg: {"AllOrders":[{"id":"72227378-2589-4fa9-b998-08a9d019e9e9","price":28941.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Long","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.229126Z","expiry":"2023-08-05T07:41:15.228389Z"},{"id":"dfb833b8-cf44-41e1-9676-c35aef9877a1","price":29180.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Short","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.232972Z","expiry":"2023-08-05T07:41:15.232047Z"},{"id":"a0415d72-3f72-4b59-9cbe-97550e819b67","price":28941.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Long","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.242801Z","expiry":"2023-08-05T07:41:15.24153Z"},{"id":"98751ec7-c2ff-48f8-922f-1edf8f4ebeab","price":29180.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Short","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.246796Z","expiry":"2023-08-05T07:41:15.245835Z"},{"id":"f9c31b62-a151-4025-a868-30b7609e0ef5","price":28941.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Long","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.249865Z","expiry":"2023-08-05T07:41:15.24915Z"},{"id":"a64c893b-42dc-4cef-bcf6-9eed41df7750","price":29180.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Short","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.252697Z","expiry":"2023-08-05T07:41:15.25195Z"},{"id":"ff4d4f36-e0cd-4f84-ab6a-5e314133bd5a","price":28941.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Long","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.255442Z","expiry":"2023-08-05T07:41:15.254561Z"},{"id":"f3afb961-a2cf-4f48-aa2b-3db1dea8f6ae","price":29180.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Short","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.257995Z","expiry":"2023-08-05T07:41:15.257302Z"},{"id":"e852970c-8fbd-4149-9560-f4bd607c1efa","price":28941.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Long","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.260901Z","expiry":"2023-08-05T07:41:15.260265Z"},{"id":"665e8adb-c3d2-45e4-be91-dd59a9285666","price":29180.5,"trader_id":"03f75f318471d32d39be3c86c622e2c51bd5731bf95f98aaa3ed5d6e1c0025927f","taken":false,"direction":"Short","quantity":1000.0,"order_type":"Limit","timestamp":"2023-08-05T07:40:15.26338Z","expiry":"2023-08-05T07:41:15.262637Z"}]}
2023-08-05T07:40:46.03652Z DEBUG native::event::event_hub: Publishing an internal event event=ServiceHealthUpdate
2023-08-05T07:40:46.036737Z DEBUG native::event::api: Forwarding event to flutter event=ServiceHealthUpdate
flutter: | 2023-08-05 09:40:46.037 | LogLevel.DEBUG | Publishing an internal event event: ServiceHealthUpdate
flutter: | 2023-08-05 09:40:46.038 | LogLevel.DEBUG | Forwarding event to flutter event: ServiceHealthUpdate
2023-08-05T07:40:46.039084Z DEBUG native::orderbook: Received all orders from orderbook orders=[]
2023-08-05T07:40:46.039458Z DEBUG native::trade::position::handler: Updating prices prices={BtcUsd: Price { bid: Some(28941.5), ask: Some(29180.5) }}
2023-08-05T07:40:46.039529Z DEBUG native::event::event_hub: Publishing an internal event event=PriceUpdateNotification
2023-08-05T07:40:46.039591Z DEBUG native::event::api: Forwarding event to flutter event=PriceUpdateNotification
flutter: | 2023-08-05 09:40:46.040 | LogLevel.DEBUG | Received event: Event.serviceHealthUpdate(field0: Instance of 'ServiceUpdate')
flutter: | 2023-08-05 09:40:46.041 | LogLevel.DEBUG | Received all orders from orderbook orders: []
flutter: | 2023-08-05 09:40:46.041 | LogLevel.DEBUG | Updating prices prices: {BtcUsd: Price { bid: Some(28941.5), ask: Some(29180.5) }}
flutter: | 2023-08-05 09:40:46.042 | LogLevel.DEBUG | Publishing an internal event event: PriceUpdateNotification
flutter: | 2023-08-05 09:40:46.042 | LogLevel.DEBUG | Forwarding event to flutter event: PriceUpdateNotification
2023-08-05T07:40:46.347194Z DEBUG native::orderbook: New message from orderbook msg="Authenticated"
2023-08-05T07:40:46.3476Z DEBUG native::orderbook: Skipping message from orderbook msg=Authenticated
2023-08-05T07:40:46.348221Z  INFO log: Received peer Init message from 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802: DataLossProtect: supported, InitialRoutingSync: not supported, UpfrontShutdownScript: supported, GossipQueries: supported, VariableLengthOnion: required, StaticRemoteKey: required, PaymentSecret: required, BasicMPP: supported, Wumbo: supported, AnchorsZeroFeeHtlcTx: not supported, ShutdownAnySegwit: supported, OnionMessages: not supported, ChannelType: supported, SCIDPrivacy: supported, ZeroConf: supported, unknown flags: none log.target="lightning::ln::peer_handler" log.module_path="lightning::ln::peer_handler" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/peer_handler.rs" log.line=1333
flutter: | 2023-08-05 09:40:46.348 | LogLevel.DEBUG | New message from orderbook msg: "Authenticated"
2023-08-05T07:40:46.348825Z DEBUG log: Generating channel_reestablish events for 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802 log.target="lightning::ln::channelmanager" log.module_path="lightning::ln::channelmanager" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/channelmanager.rs" log.line=6596
2023-08-05T07:40:46.349452Z TRACE log: Enough info to generate a Data Loss Protect with per_commitment_secret dad98ff6c18bc7235f85e8ddda6232de350c6a1adf9115ef88c24f6024194f2a for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a log.target="lightning::ln::channel" log.module_path="lightning::ln::channel" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/channel.rs" log.line=5656
2023-08-05T07:40:46.350434Z TRACE log: Persisting ChannelManager... log.target="lightning_background_processor" log.module_path="lightning_background_processor" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning-background-processor/src/lib.rs" log.line=472
flutter: | 2023-08-05 09:40:46.350 | LogLevel.DEBUG | Skipping message from orderbook msg: Authenticated
flutter: | 2023-08-05 09:40:46.352 | LogLevel.INFO | lightning::ln::peer_handler: Received peer Init message from 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802: DataLossProtect: supported, InitialRoutingSync: not supported, UpfrontShutdownScript: supported, GossipQueries: supported, VariableLengthOnion: required, StaticRemoteKey: required, PaymentSecret: required, BasicMPP: supported, Wumbo: supported, AnchorsZeroFeeHtlcTx: not supported, ShutdownAnySegwit: supported, OnionMessages: not supported, ChannelType: supported, SCIDPrivacy: supported, ZeroConf: supported, unknown flags: none
flutter: | 2023-08-05 09:40:46.353 | LogLevel.DEBUG | lightning::ln::channelmanager: Generating channel_reestablish events for 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802
2023-08-05T07:40:46.354919Z DEBUG log: Handling SendChannelReestablish event in peer_handler for node 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802 for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a log.target="lightning::ln::peer_handler" log.module_path="lightning::ln::peer_handler" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/peer_handler.rs" log.line=1800
flutter: | 2023-08-05 09:40:46.355 | LogLevel.TRACE | lightning::ln::channel: Enough info to generate a Data Loss Protect with per_commitment_secret dad98ff6c18bc7235f85e8ddda6232de350c6a1adf9115ef88c24f6024194f2a for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a
flutter: | 2023-08-05 09:40:46.357 | LogLevel.TRACE | lightning_background_processor: Persisting ChannelManager...
flutter: | 2023-08-05 09:40:46.359 | LogLevel.DEBUG | lightning::ln::peer_handler: Handling SendChannelReestablish event in peer_handler for node 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802 for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a
2023-08-05T07:40:46.362724Z TRACE log: Done persisting ChannelManager. log.target="lightning_background_processor" log.module_path="lightning_background_processor" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning-background-processor/src/lib.rs" log.line=472
flutter: | 2023-08-05 09:40:46.363 | LogLevel.TRACE | lightning_background_processor: Done persisting ChannelManager.
2023-08-05T07:40:46.731319Z  INFO ln_dlc_node::node::connection: Connection established peer=03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802@35.189.57.114:9045
flutter: | 2023-08-05 09:40:46.732 | LogLevel.INFO | Connection established peer: 03507b924dae6595cfb78492489978127c5f1e3877848564de2015cd6d41375802@35.189.57.114:9045
2023-08-05T07:40:46.974579Z TRACE log: Creating an announcement_signatures message for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a log.target="lightning::ln::channel" log.module_path="lightning::ln::channel" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/channel.rs" log.line=5534
2023-08-05T07:40:46.974853Z TRACE log: Ignore : Channel is not available for public announcements log.target="lightning::ln::channel" log.module_path="lightning::ln::channel" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/channel.rs" log.line=5538
2023-08-05T07:40:46.975076Z DEBUG log: Reconnected channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a with no loss log.target="lightning::ln::channel" log.module_path="lightning::ln::channel" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/channel.rs" log.line=4120
2023-08-05T07:40:46.97527Z TRACE log: Attempting to generate channel update for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a log.target="lightning::ln::channelmanager" log.module_path="lightning::ln::channelmanager" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/channelmanager.rs" log.line=2635
2023-08-05T07:40:46.975721Z TRACE log: Generating channel update for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a log.target="lightning::ln::channelmanager" log.module_path="lightning::ln::channelmanager" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/channelmanager.rs" log.line=2644
flutter: | 2023-08-05 09:40:46.975 | LogLevel.TRACE | lightning::ln::channel: Creating an announcement_signatures message for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a
2023-08-05T07:40:46.977224Z TRACE log: Handling channel resumption for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a with no RAA, no commitment update, 0 pending forwards, not broadcasting funding, without channel ready, without announcement log.target="lightning::ln::channelmanager" log.module_path="lightning::ln::channelmanager" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/channelmanager.rs" log.line=4371
flutter: | 2023-08-05 09:40:46.977 | LogLevel.TRACE | lightning::ln::channel: Ignore : Channel is not available for public announcements
flutter: | 2023-08-05 09:40:46.978 | LogLevel.DEBUG | lightning::ln::channel: Reconnected channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a with no loss
2023-08-05T07:40:46.978917Z TRACE log: Updating HTLCs on receipt of RAA in channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a... log.target="lightning::ln::channel" log.module_path="lightning::ln::channel" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/channel.rs" log.line=3449
2023-08-05T07:40:46.979175Z DEBUG log: Received a valid revoke_and_ack for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a with no reply necessary. log.target="lightning::ln::channel" log.module_path="lightning::ln::channel" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/ln/channel.rs" log.line=3610
2023-08-05T07:40:46.979397Z TRACE log: Updating ChannelMonitor for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a log.target="lightning::chain::chainmonitor" log.module_path="lightning::chain::chainmonitor" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/chain/chainmonitor.rs" log.line=697
2023-08-05T07:40:46.979666Z  INFO log: Applying update to monitor a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a, bringing update_id from 54 to 55 with 1 changes. log.target="lightning::chain::channelmonitor" log.module_path="lightning::chain::channelmonitor" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/chain/channelmonitor.rs" log.line=2303
flutter: | 2023-08-05 09:40:46.979 | LogLevel.TRACE | lightning::ln::channelmanager: Attempting to generate channel update for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a
2023-08-05T07:40:46.979935Z TRACE log: Updating ChannelMonitor with commitment secret log.target="lightning::chain::channelmonitor" log.module_path="lightning::chain::channelmonitor" log.file="/Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/chain/channelmonitor.rs" log.line=2343
flutter: | 2023-08-05 09:40:46.980 | LogLevel.TRACE | lightning::ln::channelmanager: Generating channel update for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a
flutter: | 2023-08-05 09:40:46.982 | LogLevel.TRACE | lightning::ln::channelmanager: Handling channel resumption for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a with no RAA, no commitment update, 0 pending forwards, not broadcasting funding, without channel ready, without announcement
flutter: | 2023-08-05 09:40:46.983 | LogLevel.TRACE | lightning::ln::channel: Updating HTLCs on receipt of RAA in channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a...
flutter: | 2023-08-05 09:40:46.983 | LogLevel.DEBUG | lightning::ln::channel: Received a valid revoke_and_ack for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a with no reply necessary.
flutter: | 2023-08-05 09:40:46.985 | LogLevel.TRACE | lightning::chain::chainmonitor: Updating ChannelMonitor for channel a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a
flutter: | 2023-08-05 09:40:46.985 | LogLevel.INFO | lightning::chain::channelmonitor: Applying update to monitor a09469245c68a07be830d7d2cd533a8dc32e8fbb9c5d4629fb5d9b0aaf5fcf7a, bringing update_id from 54 to 55 with 1 changes.
flutter: | 2023-08-05 09:40:46.986 | LogLevel.TRACE | lightning::chain::channelmonitor: Updating ChannelMonitor with commitment secret
2023-08-05T07:40:46.992981Z ERROR native::api: Aborting after panic in task info=panicked at 'Commitment txids are unique outside of fuzzing, where hashes can collide', /Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/chain/channelmonitor.rs:2115:17
flutter: | 2023-08-05 09:40:46.993 | LogLevel.ERROR | Aborting after panic in task info: panicked at 'Commitment txids are unique outside of fuzzing, where hashes can collide', /Users/holzeis/.cargo/git/checkouts/rust-lightning-bee3233422fa4387/26db954/lightning/src/chain/channelmonitor.rs:2115:17
   0: std::backtrace::Backtrace::create
   1: native::api::run::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::begin_panic::{{closure}}
   4: std::sys_common::backtrace::__rust_end_short_backtrace
   5: std::panicking::begin_panic
   6: lightning::chain::channelmonitor::ChannelMonitorImpl<Signer>::provide_secret
   7: lightning::chain::channelmonitor::ChannelMonitorImpl<Signer>::update_monitor
   8: lightning::chain::channelmonitor::ChannelMonitor<Signer>::update_monitor
   9: <lightning::chain::chainmonitor::ChainMonitor<ChannelSigner,C,T,F,L,P> as lightning::chain::Watch<ChannelSigner>>::update_channel
  10: lightning::ln::channelmanager::ChannelManager<M,T,ES,NS,SP,F,R,L>::internal_revoke_and_ack
  11: <lightning::ln::channelmanager::ChannelManager<M,T,ES,NS,SP,F,R,L> as lightning::ln::msgs::ChannelMessageHandler>::handle_revoke_and_ack
  12: <dlc_manager::sub_channel_manager::SubChannelManager<W,M,S,B,O,T,F,D,SP> as lightning::ln::msgs::ChannelMessageHandler>::handle_revoke_and_ack
  13: lightning::ln::peer_handler::PeerManager<Descriptor,CM,RM,OM,L,CMH,NS>::handle_message
  14: lightning::ln::peer_handler::PeerManager<Descriptor,CM,RM,OM,L,CMH,NS>::do_read_event
  15: lightning::ln::peer_handler::PeerManager<Descriptor,CM,RM,OM,L,CMH,NS>::read_event
  16: lightning_net_tokio::Connection::schedule_read::{{closure}}
  17: lightning_net_tokio::setup_outbound::{{closure}}
  18: <core::pin::Pin<P> as core::future::future::Future>::poll
  19: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
  20: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
  21: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
  22: tokio::runtime::task::core::Core<T,S>::poll
  23: tokio::runtime::task::harness::poll_future::{{closure}}
  24: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  25: std::panicking::try::do_call
  26: ___rust_try
  27: std::panicking::try
  28: std::panic::catch_unwind
  29: tokio::runtime::task::harness::poll_future
  30: tokio::runtime::task::harness::Harness<T,S>::poll_inner
  31: tokio::runtime::task::harness::Harness<T,S>::poll
  32: tokio::runtime::task::raw::poll
  33: tokio::runtime::task::raw::RawTask::poll
  34: tokio::runtime::task::LocalNotified<S>::run
  35: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
  36: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
  37: tokio::runtime::scheduler::multi_thread::worker::Context::run
  38: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
  39: tokio::macros::scoped_tls::ScopedKey<T>::set
  40: tokio::runtime::scheduler::multi_thread::worker::run
  41: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
  42: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
  43: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
  44: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
  45: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
  46: tokio::runtime::task::core::Core<T,S>::poll
  47: tokio::runtime::task::harness::poll_future::{{closure}}
  48: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  49: std::panicking::try::do_call
  50: ___rust_try
  51: std::panicking::try
  52: std::panic::catch_unwind
  53: tokio::runtime::task::harness::poll_future
  54: tokio::runtime::task::harness::Harness<T,S>::poll_inner
  55: tokio::runtime::task::harness::Harness<T,S>::poll
  56: tokio::runtime::task::raw::poll
  57: tokio::runtime::task::raw::RawTask::poll
  58: tokio::runtime::task::UnownedTask<S>::run
  59: tokio::runtime::blocking::pool::Task::run
  60: tokio::runtime::blocking::pool::Inner::run
  61: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
  62: std::sys_common::backtrace::__rust_begin_short_backtrace
  63: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
  64: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  65: std::panicking::try::do_call
  66: ___rust_try
  67: std::panicking::try
  68: std::panic::catch_unwind
  69: std::thread::Builder::spawn_unchecked_::{{closure}}
  70: core::ops::function::FnOnce::call_once{{vtable.shim}}
  71: std::sys::unix::thread::Thread::new::thread_start
  72: <unknown>

* thread #39, name = 'tokio-runtime-worker', stop reason = signal SIGABRT
    frame #0: 0x000000020a7ff674 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`:
->  0x20a7ff674 <+8>:  b.lo   0x20a7ff694               ; <+40>
    0x20a7ff678 <+12>: pacibsp 
    0x20a7ff67c <+16>: stp    x29, x30, [sp, #-0x10]!
    0x20a7ff680 <+20>: mov    x29, sp
Target 0: (10101) stopped.
Connecting to the VM Service is taking longer than expected...
Still attempting to connect to the VM Service...
If you do NOT see the Flutter application running, it might have crashed. The device logs (e.g. from adb or XCode) might have more details.
If you do see the Flutter application running on the device, try re-running with --host-vmservice-port to use a specific port known to be available.
bonomat commented 1 year ago

The responsible line for this panic is here:

https://github.com/p2pderivatives/rust-lightning/blob/b190b7e6a9c01d97dba045e97843bfcca34d4cbd/lightning/src/chain/channelmonitor.rs#L2115

It looks like that we had the current_counterparty_commitment_txid was equal to the prev_counterparty_commitment_txid which should not happen.

I would not know what todo with this info though and I don't think there is anything for us to do.

I'll close this for now but feel free to reopen if it happens again.

holzeis commented 1 year ago

Reopening that bug as it is happening on production.

https://itchysats.grafana.net/explore?panes=%7B%22xz-%22:%7B%22datasource%22:%22grafanacloud-logs%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bcontainer%3D%5C%22coordinator%5C%22,%20setup%3D%5C%22get10101-production%5C%22%7D%20%7C%3D%20%60panicked%20at%20%27Commitment%20txids%20are%20unique%20outside%20of%20fuzzing%60%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22grafanacloud-logs%22%7D,%22editorMode%22:%22builder%22%7D%5D,%22range%22:%7B%22from%22:%22now-7d%22,%22to%22:%22now%22%7D%7D%7D&schemaVersion=1&orgId=1