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 Emil.Styrke
Recipients Emil.Styrke, amaury.forgeotdarc, brian.curtin, eckhardt, ggenellina, javen72, terry.reedy
Date 2015-03-26.06:40:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427352011.32.0.763547542427.issue4944@psf.upfronthosting.co.za>
In-reply-to
Content
I have experienced this issue with Python 2.7.8 and 2.7.9.  It is almost the same issue as the OP experiences as far as I can tell: spawn some Python threads that each create a file, flush, fsync, close, then start a subprocess which uses the file through the Windows API.  One thing that may differ is that I create the file and spawn the child from the same thread.

I tried with close_fds=True, and it indeed works then, but like the OP, in my production code I need to get the output from the process, so it is not a usable workaround for me.

Test script and child program code is available at https://gist.github.com/anonymous/5d7d198cd3c22b31fa2a (the file upload button doesn't work for me it seems).  Running the script on my machine will print at least one failure most of the time, but not always.
History
Date User Action Args
2015-03-26 06:40:11Emil.Styrkesetrecipients: + Emil.Styrke, terry.reedy, amaury.forgeotdarc, ggenellina, eckhardt, javen72, brian.curtin
2015-03-26 06:40:11Emil.Styrkesetmessageid: <1427352011.32.0.763547542427.issue4944@psf.upfronthosting.co.za>
2015-03-26 06:40:11Emil.Styrkelinkissue4944 messages
2015-03-26 06:40:10Emil.Styrkecreate