contrib: tracing: Fix read of `pmsg_type` in p2p_monitor.py #32771

pull davidgumberg wants to merge 1 commits into bitcoin:master from davidgumberg:6-18-25-p2p-mon-fix changing 1 files +2 −2
  1. davidgumberg commented at 6:45 PM on June 18, 2025: contributor

    This fixes a bug in the contrib tracing script p2p_monitor.py. currently the script fails to read the msg_type of inbound and outbound messages, which is useful in the per-peer message view.

    <details> <summary>Screenshot of p2p_monitor.py on master</summary>

    Screenshot From 2025-06-18 11-37-43

    </details>

    <details> <summary>Screenshot of p2p_monitor.py on this branch</summary>

    Screenshot From 2025-06-18 11-41-38

    </details>

  2. contrib: tracing: Correctly read msg type in p2p_monitor.py 3473986fe1
  3. DrahtBot added the label Scripts and tools on Jun 18, 2025
  4. DrahtBot commented at 6:45 PM on June 18, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32771.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK janb84, 0xB10C, yuvicc

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. fanquake requested review from 0xB10C on Jun 18, 2025
  6. janb84 commented at 7:44 AM on June 19, 2025: contributor

    ut ACK 3473986fe10e2689fe36cc93e1e50013649ac14b

    This PR fixes bug not displaying msg_type. bpf_probe_read_user_str(&msg.msg_type, sizeof(msg.msg_type), pmsg_type tries to copy pmsg_type into kernel space but pmsg_type was still NULL (unassigned). This PR changes bpf_usdt_readarg to copy argument 4 to pmsg_type fixing the bug.

    Steps taken in this review:

    • git blame (history of bug) ✅
    • code review ✅
  7. 0xB10C approved
  8. 0xB10C commented at 7:23 AM on June 20, 2025: contributor

    ACK 3473986fe10e2689fe36cc93e1e50013649ac14b

    Changes look good to me, but I haven't tested them yet.

    Introduced by me in https://github.com/bitcoin/bitcoin/commit/ec47ba349d0b3cb2d274593ca7b828ae70584e10

  9. yuvicc commented at 8:38 PM on June 20, 2025: contributor

    Concept ACK

    It would be good to have the message type with the size of message in p2p_monitor.py

  10. yuvicc commented at 9:03 PM on June 20, 2025: contributor

    ACK 3473986fe10e2689fe36cc93e1e50013649ac14b

    Testing

    On master

    <details> <summary>Screenshot</summary>

    Screenshot from 2025-06-21 02-21-57

    </details>

    commit 3473986fe10e2689fe36cc93e1e50013649ac14b

    <details> <summary>Screenshot</summary>

    Screenshot from 2025-06-21 02-31-21

    </details>

  11. fanquake merged this on Jun 23, 2025
  12. fanquake closed this on Jun 23, 2025

  13. fanquake referenced this in commit 5697605414 on Jun 23, 2025
  14. fanquake commented at 9:03 AM on June 23, 2025: member

    Backported to 29.x in #32589.

  15. fanquake referenced this in commit 983b268768 on Jun 25, 2025
  16. stringintech referenced this in commit f19e7819e9 on Jul 19, 2025
  17. alexanderwiederin referenced this in commit 9997c3d993 on Jul 25, 2025
  18. alexanderwiederin referenced this in commit 8d6ebb9c4e on Jul 28, 2025
  19. alexanderwiederin referenced this in commit 533a4585b5 on Jul 28, 2025
  20. yuvicc referenced this in commit 22f55cf11d on Aug 26, 2025
  21. bug-castercv502 referenced this in commit d4bd8a1259 on Sep 28, 2025
  22. stickies-v referenced this in commit a19c56cd7c on Nov 4, 2025
  23. morozow referenced this in commit bfed43d612 on May 8, 2026
  24. morozow referenced this in commit c81a1e776a on May 8, 2026
  25. Kino1994 referenced this in commit 928bae5f1a on Jun 28, 2026
  26. BigcoinBGC referenced this in commit 23e244b8fc on Jun 30, 2026
  27. bitcoin locked this on Jul 30, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-11 12:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me