Message393161
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:
Item
>
> 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.
https://www.ibm.com/docs/en/aix/7.1?topic=l-lockfx-lockf-flock-lockf64-subroutine
(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: https://github.com/python/cpython/blob/main/Modules/fcntlmodule.c#L426 |
|
Date |
User |
Action |
Args |
2021-05-07 01:57:38 | kadler | set | recipients:
+ kadler, vstinner, Michael.Felt, Mariatta, miss-islington |
2021-05-07 01:57:38 | kadler | set | messageid: <1620352658.6.0.178399680485.issue35633@roundup.psfhosted.org> |
2021-05-07 01:57:38 | kadler | link | issue35633 messages |
2021-05-07 01:57:38 | kadler | create | |
|