Repository navigation
fix(valgrind): stop the libpython symlink warning from firing falsely - #594
Conversation
115a636 to
28e9c26
Compare
[Medium impact] The PR appears safe to merge. SummaryThe PR avoids false
Reviews (2) · Last reviewed commit: "fix(valgrind): stop the libpython symlin..." · Reviewed by Greptile |
The venv compat script treated any python it found as a venv. With a uv shim in ~/.local/bin the link target directory did not exist, and for a non-venv python it tried to link a file onto itself, so `ln` failed and the runner warned although benchmarks ran fine. The script now skips pythons that are not in a virtual environment, creates the lib directory, and uses `ln -sfn` so a dangling link left by a moved or upgraded uv python is replaced instead of failing with "File exists". The warning keeps its level but now includes the script error and says that flamegraphs may contain artifacts. Fixes COD-3977
28e9c26 to
d9612e3
Compare
Merging this PR will not alter performance2 warnings, 1 note
Comparing Footnotes
|
The simulation setup runs
venv_compat.shto symlinklibpythoninto a uv venv'slibdirectory. It warnedFailed to symlink libpythonin cases where nothing was wrong, and gave no reason at the default log level.False positives:
python3is a uv shim in~/.local/binand~/.local/libdoes not exist, solnfails.lddcannot find libpython, so the script links a file onto itself.Real failure the warning should explain:
.venvwhose uv Python moved (e.g. a patch upgrade) has a dangling link.[ -e ]misses it andln -sfails with "File exists". Valgrind then crashes.Changes:
pyvenv.cfg), runsmkdir -pon the lib directory, and usesln -sfnso stale links are replaced.uvandlddfor the missing lib dir, the dangling link, and the non-venv case. All three fail on the old script.Fixes COD-3977