Repository navigation
tests/ui-smoke: match the versioned python in coredumpctl - #4703
grandixximo wants to merge 1 commit into
Conversation
A bare name given to coredumpctl matches the command name, and the GUIs run from a "#!/usr/bin/python3.13" line, so systemd-coredump records them as "gmoccapy", "qtvcp" and so on, with /usr/bin/python3.13 as the executable. The "python3" match found nothing and crashdump.sh never got the core. Match the resolved path of python3 instead, which coredumpctl compares with the executable, and give the same path to gdb. Hannes Diethelm found it in LinuxCNC#4648.
|
Thanks for fixing this. Tested, it works. Now looking at the code: coredumpctl could race in parallel tests. You take the newest coredump since test start, right? So if multiple tests crash, you could get twice the same coredump or otherwise mixed up results. There is pretty much no doc about this, so i tested it. Inside bwrap, you see coredumps created in an other bwrap the way it is set up right now with coredumpctl due to the host handles coredumps but read access inside the bwrap to coredumps works fine. However, the PID is not the one inside but the one from the host. File coredumps work well due to there are handled respecting the mount namespace. With Do you have a good idea to fix this?
|
@hdiethelm, this is the coredumpctl bug you found in #4648.
A bare name given to coredumpctl matches the command name, and the GUIs start from a
#!/usr/bin/python3.13line, so systemd-coredump records a crashed gmoccapy asgmoccapy, with/usr/bin/python3.13as the executable. Thepython3match incrashdump.shfound nothing and the report always fell back to "no readable core dump". It now matchesreadlink -f "$(command -v python3)", which coredumpctl compares with the executable and which finds the right interpreter whatever its version, and gdb gets that path too.Tested with systemd-coredump on Debian 13: a script with a
#!/usr/bin/python3.13line that segfaults aftercrashdump_arm. On master the report says there is no core; with this change it prints the native backtrace. The plain-filecore_patternpath is unchanged.