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 Maxime Belanger
Recipients Maxime Belanger, ned.deily, ronaldoussoren
Date 2017-10-30.19:38:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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`.
Date User Action Args
2017-10-30 19:38:53Maxime Belangersetrecipients: + Maxime Belanger, ronaldoussoren, ned.deily
2017-10-30 19:38:53Maxime Belangersetmessageid: <>
2017-10-30 19:38:53Maxime Belangerlinkissue31903 messages
2017-10-30 19:38:53Maxime Belangercreate