GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-98894: fix `CheckDtraceProbes` tests on Solaris by kulikjak · Pull Request #154803 · python/cpython

Conversation

@kulikjak

@kulikjak kulikjak commented Jul 28, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Solaris does not use the notes section to list available probes (readelf -n <binary> returns nothing), which makes the test_check_probes fail.

This PR adds a Solaris specific path which gets all the available probes by listing those available in the running test process instead.

The output below is very different so the comparison needs to be updated a little as well.

>>> import subprocess
>>> import os
>>> res = subprocess.run(["dtrace", "-l", "-P", f"python{os.getpid()}"])
   ID   PROVIDER            MODULE                          FUNCTION NAME
   34 python1427 libpython3.16.so.1.0                         sys_audit audit
   35 python1427 libpython3.16.so.1.0           sys_audit_tstate.part.0 audit
   36 python1427 libpython3.16.so.1.0             dtrace_function_entry function-entry
   37 python1427 libpython3.16.so.1.0          _PyEval_EvalFrameDefault function-entry
   38 python1427 libpython3.16.so.1.0            dtrace_function_return function-return
   39 python1427 libpython3.16.so.1.0          _PyEval_EvalFrameDefault function-return
   40 python1427 libpython3.16.so.1.0                   gc_collect_main gc-done
   41 python1427 libpython3.16.so.1.0                   gc_collect_main gc-start
   42 python1427 libpython3.16.so.1.0 import_find_and_load_with_name.isra.0 import-find-load-done
   43 python1427 libpython3.16.so.1.0 import_find_and_load_with_name.isra.0 import-find-load-start

A little unfortunate thing is that the test now requires elevated privileges, but that is true of all other DTrace tests as well, so I don't think that's a big deal.

BTW: there is Solaris specific ELF section for DTrace metadata and at first I wanted to fix the test by reading that one (with readelf -p .SUNW_dof <binary>). Unfortunately, the section includes more metadata than just available probes, and the now removed line probe is also present in the dumped strings (so test_check_probes passes, but test_missing_probes unexpectedly passes as well).

It's possible to use elfdump and do some binary parsing to extract only the available ones, but that is a huge overkill for a test like this. For those interested, the change is here: kulikjak@564e946

  • Issue: Some DTrace probes are broken in 3.11 #98894

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kulikjak
fix 'CheckDtraceProbes' tests by reading available probes from the te…
4dcbf65
…st process itself
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Jul 28, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Jul 28, 2026
Some DTrace probes are broken in 3.11 #98894
Open
@bedevere-app bedevere-app Bot added the awaiting review label Jul 28, 2026
vstinner
vstinner approved these changes Oct 16, 2026
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I didn't test the change on Solaris, but I trust @kulikjak for that.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Oct 16, 2026
@vstinner vstinner added skip news needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 16, 2026
@vstinner
Merge branch 'main' into dtrace-probes-fix-list
61d7d79
@vstinner

vstinner commented Oct 16, 2026

Copy link
Copy Markdown
Member

@kulikjak: I pushed a merge commit to your branch to solve a merge conflict.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner enabled auto-merge (squash) October 16, 2026 23:37
@vstinner
vstinner merged commit 967fb3a into python:main Oct 17, 2026
50 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Oct 17, 2026

Copy link
Copy Markdown

Thanks @kulikjak for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Oct 17, 2026
@miss-islington-app

miss-islington-app Bot commented Oct 17, 2026

Copy link
Copy Markdown

Sorry, @kulikjak and @vstinner, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker 967fb3afc7e2f706d757925e9346f0bc8aab3c46 3.14
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned vstinner Oct 17, 2026
@bedevere-app

bedevere-app Bot commented Oct 17, 2026

Copy link
Copy Markdown

GH-159602 is a backport of this pull request to the 3.15 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 17, 2026
vstinner added a commit that referenced this pull request Oct 17, 2026
@miss-islington @kulikjak @vstinner
[3.15] gh-98894: Fix test_dtrace on Solaris (GH-154803) (#159602)
dc4adb0
gh-98894: Fix test_dtrace on Solaris (GH-154803)

Fix 'CheckDtraceProbes' tests by reading available probes from the test process itself.
(cherry picked from commit 967fb3a)

Co-authored-by: Jakub Kulík <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
vstinner added a commit to vstinner/cpython that referenced this pull request Oct 17, 2026
@kulikjak @vstinner
pythongh-98894: Fix test_dtrace on Solaris (python#154803)
d468fd9
Fix 'CheckDtraceProbes' tests by reading available probes from the test process itself.

Co-authored-by: Victor Stinner <[email protected]>
(cherry picked from commit 967fb3a)
@bedevere-app

bedevere-app Bot commented Oct 17, 2026

Copy link
Copy Markdown

GH-159605 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 17, 2026
@vstinner

vstinner commented Oct 17, 2026

Copy link
Copy Markdown
Member

Merged! Thanks for your fix.

kulikjak reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vstinner added a commit that referenced this pull request Oct 17, 2026
@vstinner @kulikjak
[3.14] gh-98894: Fix test_dtrace on Solaris (#154803) (#159605)
41ca93f
gh-98894: Fix test_dtrace on Solaris (#154803)

Fix 'CheckDtraceProbes' tests by reading available probes from the test process itself.


(cherry picked from commit 967fb3a)

Co-authored-by: Jakub Kulík <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@vstinner vstinner

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@kulikjak @vstinner
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.