-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
test_regrtest leaves a test_python_* directory in TEMPDIR #76433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
After running test_regrtest in the source tree on linux, the build/ subdirectory (i.e. test.libregrtest.main.TEMPDIR) contains a new test_python_* directory that contains a core file when the core file size is unlimited. I did not test on 3.6. |
Can you please explain how to reproduce the bug? (Which commands should I type?) What is your /proc/sys/kernel/core_pattern? On my Fedora 27, /proc/sys/kernel/core_pattern is "|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %e". |
./python -m test test_regrtest
$ cat /proc/sys/kernel/core_pattern
core-%e.%s
$ ulimit -c
unlimited FWIW on archlinux (my platform) coredumps are handled by systemd and to enable coredumps the file /etc/sysctl.d/50-coredump.conf has to be updated to contain: kernel.core_pattern=core-%e.%s |
Oh it seems your Fedora 27 also uses systemd and uses the same configuration as archlinux, see https://wiki.archlinux.org/index.php/Core_dump. In that case according to this wiki your core dumps go to /var/lib/systemd/coredump and this may explain the different behaviors between your system and mine. My setup (updating the file /etc/sysctl.d/50-coredump.conf) was the documented archlinux practice 4 years ago when systemd used to store the coredumps in log files (very annoying). This setup is still working although it is not documented in this wiki (maybe somewhere else). FWIW I have kept the notes made when configuring archlinux at that time, they are: disable core dumps managed by systemd-coredumpctl(1) - see also man pages for sysctl.d and sysctl # per user |
I'm unable to reproduce the issue on Fedora 27: vstinner@apu$ cat /proc/sys/kernel/core_pattern Total duration: 14 sec While core dump works as expected: vstinner@apu$ ./python
>>> import faulthandler
>>> faulthandler._sigsegv()
Segmentation fault (core dumped)
vstinner@apu$ ls core*
core-python.11.32456 |
Ah! I misunderstood the bug report. I was looking for a ENV_FAILED failure, but no, regrtest fails to remove its temporary directory but no warning is emitted in this case. vstinner@apu$ ls -d build/test_python_; ./python -m test test_regrtest -m test.test_regrtest.ArgsTestCase.test_crashed; ls -d build/test_python_ Run tests sequentially Total duration: 537 ms build/test_python_816 So running test_regrtest creates build/test_python_816/ but fails to remove it because it contains a core dump: core-python.11.816.
|
What is now the content of the 'build/' subdirectory of the source tree ? |
Yes :-) |
Not sure that it is because it contains a core file. Maybe it just does not remove it because the test crashed ? |
Ah, you're right :-) |
My bad. It's an obvious bug that was missed before because regrtest creates a temporary directory to run tests and then remove it. I wrote the PR 4794 to fix faulthandler. |
This issue has been fixed in a more generic way: when using -jN, child processes reuse the temporary directory of the main process, and then main process ensures that the temporary directory is always removed: commit 3c93153
I close the issue. Moreover, the initial issue has been fixed. Thanks for the report Xavier :-) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: