farcaster-node icon indicating copy to clipboard operation
farcaster-node copied to clipboard

taker peerd panics if maker peerd times out during connection setup

Open Lederstrumpf opened this issue 3 years ago • 1 comments

Panic on TimedOut returned by PeerConnection::connect_brontozaur(..) since not handled here https://github.com/farcaster-project/farcaster-node/blob/d53c878d1bc3cae5e8425c7f1cf4d9a63a48041e/src/bin/peerd.rs#L228-L229

[2022-10-03T09:37:36Z DEBUG peerd] MSG RPC socket /root/parallel-offer-taker/data_dirs/.data_dir_42/msg
[2022-10-03T09:37:36Z DEBUG peerd] CTL RPC socket /root/parallel-offer-taker/data_dirs/.data_dir_42/ctl
[2022-10-03T09:37:36Z INFO  peerd] Local node id: 03449fe50cb85f6e88e443e4ea0ea6d20cab156da41d451e7c99b08c0255c9dd4c
[2022-10-03T09:37:36Z DEBUG peerd] Peer socket parameter interpreted as --connect=03d63e0f2b4084ffe041e931bade4a2571d2602eb88aa88aedd328712204c1d0d2@xx.xxx.xx.xx:xxxx
[2022-10-03T09:37:36Z DEBUG peerd] Peerd running in CONNECT mode
[2022-10-03T09:37:36Z DEBUG peerd] Connecting to 03d63e0f2b4084ffe041e931bade4a2571d2602eb88aa88aedd328712204c1d0d2@xx.xxx.xx.xx:xxxx
[2022-10-03T09:37:36Z DEBUG farcaster_node::farcasterd::runtime] New instance of peerd launched with PID 1560155
[2022-10-03T09:37:36Z DEBUG farcaster_node::farcasterd::runtime] Awaiting for peerd to connect...
[2022-10-03T09:37:36Z INFO  farcaster_node::farcasterd::trade_state_machine] Public offer registered: cbdddd25-f594-4ddf-b065-70d4e8656c2e
[2022-10-03T09:37:36Z TRACE microservices::esb::controller] Sending take_offer(Offer:Cke4ftrP5A77LMYAAtgz8CWWGMApE9qD71LQM2fvVdFMNR4h5TrWhRR11111uMM5r39sKSfGKUEiq11111TBBgPR
113GTvtvqfD1111112g5B8cqRMKpcSttoC2RGdaKmhaxcBufKUapvpCcKVpVgCzp4H111111111111111111111111111111111111111115ymH83buC2EYYA1k, ..)) from farcasterd to walletd directly
[2022-10-03T09:37:36Z TRACE microservices::esb::controller] Sending ---
    offerid: cbdddd25-f594-4ddf-b065-70d4e8656c2e
    message: Public offer registered
     from farcasterd to client<10227918184306946533> directly
[2022-10-03T09:37:36Z INFO  farcaster_node::farcasterd::runtime] Trade state transition Start Taker -> Take Offer
[2022-10-03T09:37:36Z TRACE microservices::esb::controller] request processing complete
[2022-10-03T09:37:36Z TRACE microservices::esb::controller] Awaiting for ESB request from 4 service buses...
[2022-10-03T09:37:36Z TRACE microservices::esb::controller] Received ESB request from 1 service busses...
[2022-10-03T09:37:36Z DEBUG microservices::esb::controller] farcasterd -> walletd: take_offer(Offer:Cke4ftrP5A77LMYAAtgz8CWWGMApE9qD71LQM2fvVdFMNR4h5TrWhRR11111uMM5r39sKSfGK
UEiq11111TBBgPR113GTvtvqfD1111112g5B8cqRMKpcSttoC2RGdaKmhaxcBufKUapvpCcKVpVgCzp4H111111111111111111111111111111111111111115ymH83buC2EYYA1k, ..))
thread 'main' panicked at 'Unable to connect to the remote peer: TimedOut', src/bin/peerd.rs:229:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Lederstrumpf avatar Oct 03 '22 12:10 Lederstrumpf

Can you post another 20 lines or so from that log to indicate if farcasterd understand that the connection has failed or not? If farcasterd correctly reports the connection failure, this should be handled by the call site. If not, we need to work on another / better mechanism to detected failed connections.

sedited avatar Oct 06 '22 16:10 sedited

This should be handled properly now. @Lederstrumpf can we close this?

sedited avatar Dec 17 '22 12:12 sedited

This should be handled properly now. @Lederstrumpf can we close this?

Indeed

Lederstrumpf avatar Dec 19 '22 08:12 Lederstrumpf