Skip to content

p2p: recover stream handler panics to avoid node crash - #4706

Open
KaloyanTanev wants to merge 1 commit into
mainfrom
kalo/parsigex-handler-recover
Open

KaloyanTanev wants to merge 1 commit into
mainfrom
kalo/parsigex-handler-recover

Conversation

@KaloyanTanev

Copy link
Copy Markdown
Collaborator

Recovers panics in the libp2p stream handler goroutine so a malformed peer message can no longer crash the whole process. On a panic the stream is dropped and the node keeps serving; go-libp2p does not recover handler panics itself. Adds a p2p_message_handler_panics_total counter so recovered panics stay visible and alertable.

category: bug
ticket: none

@KaloyanTanev KaloyanTanev self-assigned this Sep 18, 2026
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.48%. Comparing base (2ab39d6) to head (67b84f9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4706      +/-   ##
==========================================
- Coverage   65.52%   65.48%   -0.04%     
==========================================
  Files         246      246              
  Lines       30062    30069       +7     
==========================================
- Hits        19698    19691       -7     
- Misses      10363    10377      +14     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant