Skip to content

gh-156703: Set LD_LIBRARY_PATH in SystemTap trace commands - #156424

Open
stratakis wants to merge 1 commit into
python:mainfrom
stratakis:shared_issue_oot
Open

gh-156703: Set LD_LIBRARY_PATH in SystemTap trace commands#156424
stratakis wants to merge 1 commit into
python:mainfrom
stratakis:shared_issue_oot

Conversation

@stratakis

@stratakis stratakis commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Prefix commands passed to stap -c with LD_LIBRARY_PATH via env, when probes reside in libpython. This allows the interpreter to find libpython when staprun does not preserve the loader path.

@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Aug 26, 2026
@stratakis

Copy link
Copy Markdown
Contributor Author

cc @encukou this should be fixing the buildbots dtrace issues, however if you can add the label to test with buildbots.

@stratakis

Copy link
Copy Markdown
Contributor Author

If that works, it also requires the backport to 3.15 label.

@StanFromIreland StanFromIreland added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 26, 2026
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @StanFromIreland for commit 96277bb 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F156424%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 26, 2026
@encukou

encukou commented Aug 27, 2026

Copy link
Copy Markdown
Member

Unfortunately PPC64LE still fails:

dtrace(1) failed: /usr/bin/dtrace invalid option -q

@encukou

encukou commented Aug 31, 2026

Copy link
Copy Markdown
Member

Is there a reason to go through /usr/bin/env, rather than give the environment directly to subprocess.Popen (i.e. create_process_group)?

@encukou encukou added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 31, 2026
@vstinner

Copy link
Copy Markdown
Member

Is this change a fix for #156703 issue?

I see multiple failures on PPC64LE buildbots. Example on "buildbot/PPC64LE Fedora Stable PR":

Warning -- test_dtrace leaked temporary files (4): GMfifo3365795, GMfifo3366470, stapjjRj5t, stapt2e6lv

Oh, that's issue #156701.

@stratakis

Copy link
Copy Markdown
Contributor Author

Unfortunately PPC64LE still fails:

dtrace(1) failed: /usr/bin/dtrace invalid option -q

Us that a failure? That is expected as the dtrace path is not exercised on Linux, Systemtap doesn't have the -q option.

@stratakis

Copy link
Copy Markdown
Contributor Author

Is there a reason to go through /usr/bin/env, rather than give the environment directly to subprocess.Popen (i.e. create_process_group)?

staprun removes LD_LIBRARY_PATH before starting Python so passing it to Popen is not enough, it must be added to the command that starts Python.

Prefix commands passed to stap -c with LD_LIBRARY_PATH via env, when
probes reside in libpython. This allows the interpreter to find
libpython when staprun does not preserve the loader path.
@stratakis

Copy link
Copy Markdown
Contributor Author

Rebased to change the commit message to reference the proper issue, no code changes.

@stratakis stratakis changed the title gh-98894: Set LD_LIBRARY_PATH in SystemTap trace commands gh-156703: Set LD_LIBRARY_PATH in SystemTap trace commands Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants