Message305247
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:53 | Maxime Belanger | set | recipients:
+ Maxime Belanger, ronaldoussoren, ned.deily |
2017-10-30 19:38:53 | Maxime Belanger | set | messageid: <1509392333.58.0.213398074469.issue31903@psf.upfronthosting.co.za> |
2017-10-30 19:38:53 | Maxime Belanger | link | issue31903 messages |
2017-10-30 19:38:53 | Maxime Belanger | create | |
|