contrib: [tracing] fix pointer argument handling in mempool_monitor.py #33086

pull deadmanoz wants to merge 1 commits into bitcoin:master from deadmanoz:fix-mempool-monitor-hash-reason-pointers changing 1 files +7 −7
  1. deadmanoz commented at 8:39 AM on July 29, 2025: contributor

    The BPF code was incorrectly passing pointer variables by value to bpf_usdt_readarg(), causing the function to fail silently and resulting in transaction hashes showing as zeros and reason strings displaying empty strings.

    This fix adds the missing reference operator (&) when passing pointer variables to bpf_usdt_readarg(), allowing the function to properly write the pointer values and enabling correct display of transaction hashes and removal/rejection reasons.

    Fixes the regression introduced in ec47ba349d where bpf_usdt_readarg_p was replaced with bpf_usdt_readarg but the calling convention wasn't properly updated for pointer arguments.

    Before: "0000000000000000000000000000000000000000000000000000000000000000" tx hashes, and missing reasons (empty strings) for removal.

    <img width="1683" height="1330" alt="Screenshot 2025-07-29 at 4 30 03 PM" src="https://github.com/user-attachments/assets/71ba88be-dbcc-43a6-bfe7-bd49ae082b13" />

    After: tx hashes show, reasons for removal showing.

    <img width="1682" height="1330" alt="Screenshot 2025-07-29 at 4 29 23 PM" src="https://github.com/user-attachments/assets/03738c75-5526-4c1e-82c2-ba100cdf128a" />

  2. tracing: fix pointer argument handling in mempool_monitor.py
    The BPF code was incorrectly passing pointer variables by value to
    bpf_usdt_readarg(), causing the function to fail silently and resulting
    in transaction hashes and reason strings displaying as zeros or garbage.
    
    This fix adds the missing reference operator (&) when passing pointer
    variables to bpf_usdt_readarg(), allowing the function to properly
    write the pointer values and enabling correct display of transaction
    hashes and removal/rejection reasons.
    
    Fixes the regression introduced in ec47ba349d where bpf_usdt_readarg_p
    was replaced with bpf_usdt_readarg but the calling convention wasn't
    properly updated for pointer arguments.
    0ce041ea88
  3. DrahtBot added the label Scripts and tools on Jul 29, 2025
  4. DrahtBot commented at 8:39 AM on July 29, 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/33086.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK 0xB10C

    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 Jul 29, 2025
  6. 0xB10C commented at 9:26 AM on July 29, 2025: contributor

    tested ACK 0ce041ea88dbea2bdfaf21fd0e60a86012498f0a

    Thanks! I can reproduce the problem and confirm that this fixes it.

  7. fanquake added the label Needs backport (29.x) on Jul 29, 2025
  8. fanquake merged this on Jul 29, 2025
  9. fanquake closed this on Jul 29, 2025

  10. fanquake referenced this in commit 9437415024 on Jul 29, 2025
  11. fanquake commented at 9:56 AM on July 29, 2025: member

    Backported to 29.x in #33074.

  12. deadmanoz deleted the branch on Jul 29, 2025
  13. fanquake removed the label Needs backport (29.x) on Jul 29, 2025
  14. alexanderwiederin referenced this in commit 28fe919bf7 on Aug 6, 2025
  15. sedited referenced this in commit b98d982d79 on Aug 7, 2025
  16. alexanderwiederin referenced this in commit 4152176d02 on Aug 8, 2025
  17. alexanderwiederin referenced this in commit 9ef94c31db on Aug 8, 2025
  18. fanquake referenced this in commit 837c5c7fd8 on Aug 15, 2025
  19. stringintech referenced this in commit 71275a1b5e on Aug 17, 2025
  20. yuvicc referenced this in commit 22f55cf11d on Aug 26, 2025
  21. ajtowns referenced this in commit 9748bd64c1 on Sep 4, 2025
  22. bug-castercv502 referenced this in commit 4aa5572aea on Sep 28, 2025
  23. stickies-v referenced this in commit a19c56cd7c on Nov 4, 2025
  24. morozow referenced this in commit 5fec7bfd2f on May 8, 2026
  25. morozow referenced this in commit 149ac9db50 on May 8, 2026
  26. Kino1994 referenced this in commit 7bb61aa729 on Jun 28, 2026
  27. BigcoinBGC referenced this in commit 39b0ac48a0 on Jun 30, 2026
  28. 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-10 22:51 UTC

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