New submission from Andrew Gross:

In the latest OSX, 10.9, it looks like there have been some security changes 
related to inheriting file descriptors from parent to child processes.  While 
in the past it would allow you to inherit the parents open FDs, now it will 
kill the process. 

It looks like urllib2 does not properly unsubscribe from the KQUEUE after 
opening a remote connection, causing the process to be killed if you try use 
"evecv" style commands, or fork.

Simple Reproduction:
import urllib2
request = urllib2.urlopen('http://www.python.org')
response = request.read()
request.close()
os.execvp('ssh', ['ssh', 'user@1.2.3.4'])
# Killed: 9

I have attached the diagnostic crash report from OSX, appended to the end is a 
snippet from `lsof` showing the open KQUEUE file descriptor.

----------
assignee: ronaldoussoren
components: Library (Lib), Macintosh
files: urllib2.crash
messages: 210860
nosy: Andrew.Gross, ronaldoussoren
priority: normal
severity: normal
status: open
title: urllib2 unrelease KQUEUE on Mac OSX 10.9+
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file34024/urllib2.crash

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20585>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to