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
Title: PyThread_acquire_lock can block even when asked not ot
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.7, Python 3.6, Python 3.5, Python 2.7
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.
History
Date User Action Args
2022-04-11 14:58:48adminsetgithub: 74950
2017-06-26 20:14:13pitrousetstatus: open -> closed
resolution: fixed
messages: + msg296941

stage: needs patch -> resolved
2017-06-26 20:13:41pitrousetmessages: + msg296940
2017-06-26 20:07:24pitrousetmessages: + msg296939
2017-06-26 19:57:31pitrousetmessages: + msg296937
2017-06-26 18:56:35pitrousetpull_requests: + pull_request2470
2017-06-26 18:51:19pitrousetpull_requests: + pull_request2469
2017-06-26 18:46:34pitrousetpull_requests: + pull_request2468
2017-06-26 18:41:09pitrousetmessages: + msg296929
2017-06-26 14:25:53pitrouunlinkissue30703 dependencies
2017-06-26 12:44:15pitroulinkissue30703 dependencies
2017-06-26 12:36:14pitrousetpull_requests: + pull_request2450
2017-06-26 12:27:17pitroucreate