Author Michael.Felt
Recipients Michael.Felt, akeskimo, miss-islington, nierob, vstinner
Date 2018-12-27.22:14:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <9c1f1132-9fa3-601a-ff25-90913d650db0@felt.demon.nl>
In-reply-to <1545922121.41.0.242075111373.issue35189@roundup.psfhosted.org>
Content
On 27/12/2018 15:48, Michael Felt wrote:
> Michael Felt <aixtools@felt.demon.nl> added the comment:
>
> The "improved" output after getting back to "latest" commit:
>
> == CPython 3.8.0a0 (heads/master-dirty:34ae04f74d, Dec 27 2018, 14:05:08) [C]
> == AIX-1-00C291F54C00-powerpc-32bit big-endian
> == cwd: /data/prj/python/python3-3.8/build/test_python_13566116
> == CPU count: 8
> == encodings: locale=ISO8859-1, FS=iso8859-1
> Run tests sequentially
> 0:00:00 [1/1] test_eintr
> test_all (test.test_eintr.EINTRTests) ...
> --- run eintr_tester.py ---
> test_flock (__main__.FNTLEINTRTest) ... ok
> test_lockf (__main__.FNTLEINTRTest) ... ERROR
> test_read (__main__.OSEINTRTest) ... ok
> test_wait (__main__.OSEINTRTest) ... ok
> test_wait3 (__main__.OSEINTRTest) ... ok
> test_wait4 (__main__.OSEINTRTest) ... ok
> test_waitpid (__main__.OSEINTRTest) ... ok
> test_write (__main__.OSEINTRTest) ... ok
> test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll'
> test_epoll (__main__.SelectEINTRTest) ... skipped 'need select.epoll'
> test_kqueue (__main__.SelectEINTRTest) ... skipped 'need select.kqueue'
> test_poll (__main__.SelectEINTRTest) ... ok
> test_select (__main__.SelectEINTRTest) ... ok
> test_sigtimedwait (__main__.SignalEINTRTest) ... ok
> test_sigwaitinfo (__main__.SignalEINTRTest) ... ok
> test_accept (__main__.SocketEINTRTest) ... ok
> test_open (__main__.SocketEINTRTest) ... ok
> test_os_open (__main__.SocketEINTRTest) ... ok
> test_recv (__main__.SocketEINTRTest) ... ok
> test_recvmsg (__main__.SocketEINTRTest) ... ok
> test_send (__main__.SocketEINTRTest) ... ok
> test_sendall (__main__.SocketEINTRTest) ... ok
> test_sendmsg (__main__.SocketEINTRTest) ... ok
> test_sleep (__main__.TimeEINTRTest) ... ok
>
> ======================================================================
> ERROR: test_lockf (__main__.FNTLEINTRTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/data/prj/python/git/python3-3.8/Lib/test/eintrdata/eintr_tester.py", line 522, in test_lockf
>     self._lock(fcntl.lockf, "lockf")
>   File "/data/prj/python/git/python3-3.8/Lib/test/eintrdata/eintr_tester.py", line 507, in _lock
>     lock_func(f, fcntl.LOCK_EX | fcntl.LOCK_NB)
> PermissionError: [Errno 13] Permission denied
>
> ----------------------------------------------------------------------
> Ran 24 tests in 8.822s
>
> FAILED (errors=1, skipped=3)
> --- eintr_tester.py completed: exit code 1 ---
> FAIL
>
> ======================================================================
> FAIL: test_all (test.test_eintr.EINTRTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/data/prj/python/git/python3-3.8/Lib/test/test_eintr.py", line 31, in test_all
>     self.fail("eintr_tester.py failed")
> AssertionError: eintr_tester.py failed
>
> ----------------------------------------------------------------------
>
> Ran 1 test in 9.392s
>
> FAILED (failures=1)
> test test_eintr failed
> test_eintr failed
>
> == Tests result: FAILURE ==
>
> 1 test failed:
>     test_eintr
>
> Total duration: 9 sec 609 ms
> Tests result: FAILURE
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue35189>
> _______________________________________
>
I have been doing reading and debugging.

Question: does mode "wb" imply also open for reading? Both Freebsd and
AIX man pages specify that a file needs to be open for a shared lock to
even be considered.

Further, AIX talks about "enforced" and "advisory" locks, as well as
"read" and "write" locks. In much older documentation I recall the names
"simple" and "complex" locks. From memory, advisory (aka simple) locks
tend to be exclusive in nature. Shared is only for reading, writing is
always exclusive. I'll have to dig for how "wait" is actually handled -
and work to not confuse "in memory" locks (for multi-threaded locking of
variables) with "file-locking".

Regards,

Michael
History
Date User Action Args
2018-12-27 22:14:15Michael.Feltsetrecipients: + Michael.Felt, vstinner, miss-islington, akeskimo, nierob
2018-12-27 22:14:12Michael.Feltlinkissue35189 messages
2018-12-27 22:14:12Michael.Feltcreate