I'm noticing a disbalance in function__entry and function__return static marker hits. Python comes with systemtap static markers as described in [1]. The following is a demonstration how the function__return marker is hit, while the respective function__entry marker is not. Let's have a simple python script: $ cat test.py import random print(random.random()) $ The following is a demonstration how certain function__return markers are hit: $ cat gdb.cmds # run program so that all .SO's load and so do the static markers r # list avail static markers info probes stap python # print the 1st marker argument (filename) each time the static marker is hit: b -probe-stap function__return commands 1 p (char*)$_probe_arg0 c end r $ gdb --command=gdb.cmds --batch --args python3 ./test.py | grep -F random $2944 = 0x7ffff74e9780 "/usr/lib64/python3.11/random.py" $2945 = 0x7ffff74e9780 "/usr/lib64/python3.11/random.py" $2946 = 0x7ffff74e9780 "/usr/lib64/python3.11/random.py" $2947 = 0x7ffff74e9780 "/usr/lib64/python3.11/random.py" $2948 = 0x7ffff74e9780 "/usr/lib64/python3.11/random.py" $2949 = 0x7ffff74e9780 "/usr/lib64/python3.11/random.py" $ Now let's modify our gdb.cmds file so that function__entry markers are being monitored instead of function__return markers: $ cat gdb.cmds # run program so that all .SO's load and so do the static markers r # list avail static markers info probes stap python # print the 1st marker argument (filename) each time the static marker is hit: b -probe-stap function__entry commands 1 p (char*)$_probe_arg0 c end r $ gdb --command=gdb.cmds --batch --args python3 ./test.py | grep -F random $ No hit at all. That said, if the function return marker is hit, the respective entry marker should be hit as well. So this is the reported disbalance. Please investigate. Also note that with python2.7-2.7.18-27.fc38.x86_64 there is no disbalance. The reported problem happens with python3-3.11.1-1.fc38.x86_64 and gdb-12.1-9.fc38.x86_64. It can also be observed using systemtap instead of gdb, as shown in [2]. ------------ [1] https://github.com/python/cpython/blob/main/Doc/howto/instrumentation.rst [2] https://sourceware.org/bugzilla/show_bug.cgi?id=29832
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle. Changing version to 38.
A new bz2177062 appears to be a dupe of this one.
This is an upstream issue. As Python is optimized (function calls are inlined, or at least some of the setup/teardown is skipped), the systemtap markers are being left behind :(
This message is a reminder that Fedora Linux 38 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '38'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 38 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21. Fedora Linux 38 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.