2.2.0: Python 2.7.10 subprocess.Popen + Thread causes SIGSEGV (Win 2012R2 - WOW64 on AMD64)
Luong, Gumpwa
gumpwa.luong@emc.com
Tue Aug 11 19:32:00 GMT 2015
Hi,
First time mailing this list, so hopefully I followed the guidelines correctly. I was able to simplify the problem I am having into a simple test.
I create a thread and in that thread use Popen to execute 'echo hello' but the process ends up getting terminated with -11 most of the time and I end up with no stdout or stderr. When it does work as expected, I get 'hello' on stdout. This looks to only happen on Win 2012, I have tried 2008 and it did not encounter the same problem. I also tested on Ubuntu 12.04 Python 2.7.
I tried rebaseall a few times but did not seem to help. I also looked at the installed apps, but there is barely anything on the system.
Please find attached the cygcheck output and testcase below with output.
Thanks for any help,
Gump
---
import subprocess
import shlex
from threading import Thread
def execute():
cmd = 'echo hello'
def exc():
for x in range(10):
p = subprocess.Popen(shlex.split(cmd),
stdout=subprocess.PIPE)
print p.communicate()
print p.poll()
t = Thread(target=exc)
t.start()
t.join()
if __name__ == '__main__':
execute()
OUTPUT:
('hello\n', None)
0
('hello\n', None)
0
('hello\n', None)
0
('', None)
-11
('', None)
-11
('', None)
-11
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 32600 bytes
Desc: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150811/860e9124/attachment.obj>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list