Issue 30765: PyThread_acquire_lock can block even when asked not ot - Python tracker

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.

classification
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, pitrou, ronaldoussoren, vstinner
Priority: normal Keywords:

Created on 2017-06-26 12:27 by pitrou, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2403 merged pitrou, 2017-06-26 12:36
PR 2418 merged pitrou, 2017-06-26 18:46
PR 2419 merged pitrou, 2017-06-26 18:51
PR 2420 merged pitrou, 2017-06-26 18:56
Messages (6)
msg296886 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2017-06-26 12:27
Discovered in issue30703.  When POSIX semaphores are not used for Python locks, pthread_mutex_lock() is called for acquiring a lock even when asked not to block.  This can be disastrous when called from a signal handler.
msg296929 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2017-06-26 18:41
New changeset f84ac420c2af98339678744953869cad3c253281 by Antoine Pitrou in branch 'master':
bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (#2403)
https://github.com/python/cpython/commit/f84ac420c2af98339678744953869cad3c253281
msg296937 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2017-06-26 19:57
New changeset 55ab604e3fdb91baabe98d1c407b5910eeb31cef by Antoine Pitrou in branch '3.6':
[3.6] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) (#2418)
https://github.com/python/cpython/commit/55ab604e3fdb91baabe98d1c407b5910eeb31cef
msg296939 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2017-06-26 20:07
New changeset 85b34edd8b575b918490afbcb0db6f791874dbdd by Antoine Pitrou in branch '3.5':
[3.5] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) (#2419)
https://github.com/python/cpython/commit/85b34edd8b575b918490afbcb0db6f791874dbdd
msg296940 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2017-06-26 20:13
New changeset 828488393ca79f2ceb0acc2d7c30fb68baad85f8 by Antoine Pitrou in branch '2.7':
[2.7] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) (#2420)
https://github.com/python/cpython/commit/828488393ca79f2ceb0acc2d7c30fb68baad85f8
msg296941 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2017-06-26 20:14
Travis-CI and the 3.x buildbots seem fine.