[issue31903] `_scproxy` calls SystemConfiguration functions in a way that can cause deadlocks

2018-09-12 Thread miss-islington


miss-islington  added the comment:


New changeset aa12534acff4868f6dce9e2364a66fbb0ebcb3ca by Miss Islington (bot) 
in branch '3.6':
closes bpo-31903: Release the GIL when calling into SystemConfiguration 
(GH-4178)
https://github.com/python/cpython/commit/aa12534acff4868f6dce9e2364a66fbb0ebcb3ca


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31903] `_scproxy` calls SystemConfiguration functions in a way that can cause deadlocks

2018-09-12 Thread miss-islington


miss-islington  added the comment:


New changeset 72c34cf6dd5fb206fe4d407ff603468af466fd2e by Miss Islington (bot) 
in branch '3.7':
closes bpo-31903: Release the GIL when calling into SystemConfiguration 
(GH-4178)
https://github.com/python/cpython/commit/72c34cf6dd5fb206fe4d407ff603468af466fd2e


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31903] `_scproxy` calls SystemConfiguration functions in a way that can cause deadlocks

2018-09-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8647

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31903] `_scproxy` calls SystemConfiguration functions in a way that can cause deadlocks

2018-09-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8648

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31903] `_scproxy` calls SystemConfiguration functions in a way that can cause deadlocks

2018-09-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Yes it should, the same problem has been present from the start.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31903] `_scproxy` calls SystemConfiguration functions in a way that can cause deadlocks

2018-09-11 Thread Ned Deily


Ned Deily  added the comment:

Thanks, Benjamin!

Ronald, do you think this should be backported?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31903] `_scproxy` calls SystemConfiguration functions in a way that can cause deadlocks

2018-09-11 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 4859ba0d2ce4506fddc3f55f90f8dce031b3804f by Benjamin Peterson 
(Max Bélanger) in branch 'master':
closes bpo-31903: Release the GIL when calling into SystemConfiguration 
(GH-4178)
https://github.com/python/cpython/commit/4859ba0d2ce4506fddc3f55f90f8dce031b3804f


--
nosy: +benjamin.peterson
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31903] `_scproxy` calls SystemConfiguration functions in a way that can cause deadlocks

2017-10-30 Thread Max Bélanger

Change by Max Bélanger :


--
keywords: +patch
pull_requests: +4148
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31903] `_scproxy` calls SystemConfiguration functions in a way that can cause deadlocks

2017-10-30 Thread Maxime Belanger

New submission from Maxime Belanger :

Through the use of various Python packages (such as `pyobjc`), it is possible 
for a deadlock to occur due to how `_scproxy.c` calls 
`SCDynamicStoreCopyProxies`.

In more recent versions of macOS (10.7+), this function can block on acquiring 
a lock deep inside `NSUserPreferences`. As `pyobjc` allows Python-wrapped 
`NSString`s to be stored in `CFPreferences`, it is thus possible for one thread 
to hold the `CFPreferences` lock and block on the GIL while another thread 
holds the GIL and blocks on the `CFPreferences` lock.

We've observed this on a significant number of macOS devices before fixing 
ourselves by wrapping the calls to `SCDynamicStoreCopyProxies` with 
`Py_BEGIN/END_ALLOW_THREADS`.

--
components: macOS
messages: 305247
nosy: Maxime Belanger, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: `_scproxy` calls SystemConfiguration functions in a way that can cause 
deadlocks
type: crash
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com