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 kadler
Recipients Mariatta, Michael.Felt, kadler, miss-islington, vstinner
Date 2021-05-07.01:57:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
FYI, the problem here is that AIX fcntl returns EACCES in the case that the lock is held and non-blocking behavior was requested:

> The lockfx and lockf subroutines fail if one of the following is true:
> EACCES 	The Command parameter is F_SETLK, the l_type field is F_RDLCK, and the segment of the file to be locked is already write-locked by another process.
> EACCES 	The Command parameter is F_SETLK, the l_type field is F_WRLCK, and the segment of a file to be locked is already read-locked or write-locked by another process.

(Note the docs are a bit wonky referring to lockf/lockfx but talking about parameters and fields which apply to fcntl instead)

The lockf/flock APIs provided by AIX handle this appropriately, mapping EACCES to EWOULDBLOCK, but while Python calls the libbsd flock API, it uses its own lockf implementation which calls fcntl directly:
Date User Action Args
2021-05-07 01:57:38kadlersetrecipients: + kadler, vstinner, Michael.Felt, Mariatta, miss-islington
2021-05-07 01:57:38kadlersetmessageid: <>
2021-05-07 01:57:38kadlerlinkissue35633 messages
2021-05-07 01:57:38kadlercreate