This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2177062 - python3.11: systemtap probe python.function.entry doesn't work
Summary: python3.11: systemtap probe python.function.entry doesn't work
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: python3.11
Version: 9.2
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Orsava
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-09 20:19 UTC by Lukáš Zachar
Modified: 2023-09-20 17:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-20 17:07:48 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github python cpython issues 98894 0 None open Some DTrace probes are broken in 3.11 2023-03-09 20:19:57 UTC
Red Hat Issue Tracker   RHEL-5558 0 None Migrated None 2023-09-20 17:07:44 UTC
Red Hat Issue Tracker RHELPLAN-151359 0 None None None 2023-03-09 20:21:25 UTC

Description Lukáš Zachar 2023-03-09 20:19:58 UTC
Description of problem:

Probe 'python.function.entry' doesn't fire when used with python3.11, the older versions do.

Version-Release number of selected component (if applicable):
python3.11-3.11.2-2.el9

How reproducible:
always

Steps to Reproduce:
1. create script.py with:
  import random, time
  print(random.random())
  time.sleep(3)

2. create probe.stp with:
   #!/usr/bin/stap -v
   probe python.function.entry
   {
     if ( filename =~ "random" )
       printf("%s => %s in %s:%d\n", thread_indent(1), funcname, filename, lineno);
   }

3. stap probe.stp -v -c "python3.11 script.py"

Actual results:
just random integer printed

Expected results:
output from python3.8 is like
  3649 python3.8(61912):  => Random in /usr/lib64/python3.8/random.py:78
  3677 python3.8(61912):   => SystemRandom in /usr/lib64/python3.8/random.py:709
  3694 python3.8(61912):    => __init_subclass__ in /usr/lib64/python3.8/random.py:103
  3705 python3.8(61912):     => __init__ in /usr/lib64/python3.8/random.py:94
  3707 python3.8(61912):      => seed in /usr/lib64/python3.8/random.py:123


Additional info:

Comment 2 Miro Hrončok 2023-03-12 20:25:47 UTC
I can reproduce the difference on Fedora:

$ sudo stap probe.stp -v -c "python3.11 script.py"
Pass 1: parsed user script and 535 library scripts using 575376virt/332460res/15484shr/316708data kb, in 490usr/80sys/566real ms.
Pass 2: analyzed script: 11 probes, 14 functions, 2 embeds, 2 globals using 608656virt/357412res/19124shr/349988data kb, in 110usr/10sys/117real ms.
Pass 3: translated to C into "/tmp/stape4dZII/stap_9fa553ac31a31de18203ad90492e581a_12144_src.c" using 608672virt/369488res/19612shr/350004data kb, in 100usr/90sys/192real ms.
Pass 4: compiled C into "stap_9fa553ac31a31de18203ad90492e581a_12144.ko" in 1760usr/390sys/1988real ms.
Pass 5: starting run.
0.246567578357341
Pass 5: run completed in 30usr/60sys/3431real ms.


$ sudo stap probe.stp -v -c "python3.10 script.py"
Pass 1: parsed user script and 535 library scripts using 575376virt/332400res/15424shr/316708data kb, in 490usr/70sys/562real ms.
Pass 2: analyzed script: 11 probes, 14 functions, 2 embeds, 2 globals using 608656virt/357372res/19084shr/349988data kb, in 110usr/0sys/115real ms.
Pass 3: translated to C into "/tmp/stapsfa1kk/stap_960a509d59f42ecc5fdfe3e95b6e8abd_12144_src.c" using 608672virt/369440res/19564shr/350004data kb, in 110usr/90sys/198real ms.
Pass 4: compiled C into "stap_960a509d59f42ecc5fdfe3e95b6e8abd_12144.ko" in 1800usr/440sys/2073real ms.
Pass 5: starting run.
     0 python3.10(3588962): => <module> in /usr/lib64/python3.10/random.py:1
0.9428721885880854
  3159 python3.10(3588962):  => Random in /usr/lib64/python3.10/random.py:103
  3179 python3.10(3588962):   => SystemRandom in /usr/lib64/python3.10/random.py:813
  3192 python3.10(3588962):    => __init_subclass__ in /usr/lib64/python3.10/random.py:219
  3207 python3.10(3588962):     => __init__ in /usr/lib64/python3.10/random.py:119
  3208 python3.10(3588962):      => seed in /usr/lib64/python3.10/random.py:128
Pass 5: run completed in 20usr/70sys/3443real ms.


$ sudo stap probe.stp -v -c "python3.9 script.py"
Pass 1: parsed user script and 535 library scripts using 575376virt/332424res/15448shr/316708data kb, in 520usr/80sys/601real ms.
Pass 2: analyzed script: 11 probes, 14 functions, 2 embeds, 2 globals using 608656virt/357448res/19160shr/349988data kb, in 120usr/0sys/123real ms.
Pass 3: translated to C into "/tmp/stapQ3UJLx/stap_0c04ce72ddc21345525440096a38419c_12143_src.c" using 608672virt/369556res/19680shr/350004data kb, in 110usr/100sys/212real ms.
Pass 4: compiled C into "stap_0c04ce72ddc21345525440096a38419c_12143.ko" in 1740usr/320sys/1886real ms.
Pass 5: starting run.
     0 python3.9(3589395): => <module> in /usr/lib64/python3.9/random.py:1
0.41255422987101886
  3231 python3.9(3589395):  => Random in /usr/lib64/python3.9/random.py:101
  3251 python3.9(3589395):   => SystemRandom in /usr/lib64/python3.9/random.py:778
  3264 python3.9(3589395):    => __init_subclass__ in /usr/lib64/python3.9/random.py:217
  3274 python3.9(3589395):     => __init__ in /usr/lib64/python3.9/random.py:117
  3276 python3.9(3589395):      => seed in /usr/lib64/python3.9/random.py:126
Pass 5: run completed in 10usr/60sys/3439real ms.

Comment 3 Martin Cermak 2023-03-20 09:17:41 UTC
I think this is a possible dupe of https://bugzilla.redhat.com/show_bug.cgi?id=2152970 .

Comment 4 Tomas Orsava 2023-08-09 12:20:10 UTC
There is some movement on the upstream issue [0], let's wait on what develops. We currently don't have the resources to address the issue downstream.

[0] https://github.com/python/cpython/issues/104280

Comment 5 RHEL Program Management 2023-09-20 17:05:33 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 6 RHEL Program Management 2023-09-20 17:07:48 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.