Message320742
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 | Joseph Sible |
|---|---|
| Recipients | Joseph Sible |
| Date | 2018-06-29.21:43:37 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1530308617.47.0.56676864532.issue34004@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
When Python is built on Alpine Linux or in any other configuration that uses musl libc, calls to Lock.acquire() can't be interrupted by signals. This bug is caught by test_lock_acquire_interruption and test_rlock_acquire_interruption in Lib/test/test_threadsignals.py, both of which fail when Python is built on musl. POSIX explicitly says that sem_timedwait ever failing with EINTR is optional: http://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_timedwait.html#tag_16_508_05 And musl deliberately chooses not to support it: http://www.openwall.com/lists/musl/2018/02/24/3 http://git.musl-libc.org/cgit/musl/commit/?id=c0ed5a201b2bdb6d1896064bec0020c9973db0a1 However, we incorrectly rely on it for correct operation. Our documentation https://docs.python.org/3.6/library/threading.html#threading.Lock.acquire just says that "Lock acquires can now be interrupted by signals on POSIX", not that any optional POSIX features are required for it. A similar bug was #11223, which was the same problem but with pthread_cond_timedwait, which is used when semaphores aren't available. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-06-29 21:43:37 | Joseph Sible | set | recipients: + Joseph Sible |
| 2018-06-29 21:43:37 | Joseph Sible | set | messageid: <1530308617.47.0.56676864532.issue34004@psf.upfronthosting.co.za> |
| 2018-06-29 21:43:37 | Joseph Sible | link | issue34004 messages |
| 2018-06-29 21:43:37 | Joseph Sible | create | |