This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients serhiy.storchaka, vstinner, zach.ware
Date 2017-04-26.13:17:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493212642.62.0.333467089335.issue30170@psf.upfronthosting.co.za>
In-reply-to
Content
On buildbots, it's common to see such warning:


0:32:04 [269/404] test_property passed -- running: test_multiprocessing_spawn (74 sec)
D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py:1012: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\buildarea\\3.x.bolen-windows10\\build\\build\\test_python_1048': [WinError 183] Cannot create a file when that file already exists: 'D:\\buildarea\\3.x.bolen-windows10\\build\\build\\test_python_1048'
  with temp_dir(path=name, quiet=quiet) as temp_path:
running: test_cmd_line_script (30 sec), test_multiprocessing_spawn (104 sec)

I also got it *sometimes*. It took me months to understand where it does come from.

It's quite stupid in fact: temporary directories are not removed if a test does crash (ex: segfault). Later, if a test process has the same PID than the crashed process, you get the warning.

I suggest to add a "clean" step on buildbots to first remove old "test_python_*" directories leaked by previous runs.

First, I wanted to add such cleanup in regrtest directly, but it's common that I run two main regrtest processes in parallel, and I would like to keep this feature. If regrtest starts by removing test_python_*: it will break currently running tests.

I'm not 100% confident that the warning is caused by previous runs, but I think that it's worth it to try to cleanup to check if it's case ;-)
History
Date User Action Args
2017-04-26 13:17:22vstinnersetrecipients: + vstinner, zach.ware, serhiy.storchaka
2017-04-26 13:17:22vstinnersetmessageid: <1493212642.62.0.333467089335.issue30170@psf.upfronthosting.co.za>
2017-04-26 13:17:22vstinnerlinkissue30170 messages
2017-04-26 13:17:22vstinnercreate