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.

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

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

  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

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

    Code Coverage & Benchmarks

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

    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.

  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

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

    commit 3473986fe10e2689fe36cc93e1e50013649ac14b

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

  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.

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: 2025-07-04 09:13 UTC

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