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: test_asyncio.test_unix_events constructor failures on AIX
Type: Stage:
Components: Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: David.Edelsohn, gvanrossum, python-dev, vstinner
Priority: normal Keywords:

Created on 2013-11-24 12:42 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
msg204203 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-24 12:42
buildbot.python.org/all/builders/PPC64 AIX 3.x/builds/1138/steps/test/logs/stdio 

======================================================================
FAIL: test_ctor (test.test_asyncio.test_unix_events.UnixWritePipeTransportTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_asyncio/test_unix_events.py", line 389, in test_ctor
    self.loop.assert_reader(5, tr._read_ready)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/asyncio/test_utils.py", line 217, in assert_reader
    assert fd in self.readers, 'fd {} is not registered'.format(fd)
AssertionError: fd 5 is not registered

======================================================================
FAIL: test_ctor_with_waiter (test.test_asyncio.test_unix_events.UnixWritePipeTransportTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_asyncio/test_unix_events.py", line 397, in test_ctor_with_waiter
    self.loop.assert_reader(5, tr._read_ready)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/asyncio/test_utils.py", line 217, in assert_reader
    assert fd in self.readers, 'fd {} is not registered'.format(fd)
AssertionError: fd 5 is not registered
msg204241 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-24 17:41
Oh, this failure is probably related to this comment in unix_events.py:

        # On AIX, the reader trick only works for sockets.
        # On other platforms it works for pipes and sockets.
        # (Exception: OS X 10.4?  Issue #19294.)
        if is_socket or not sys.platform.startswith("aix"):
            self._loop.add_reader(self._fileno, self._read_ready)

UnixWritePipeTransportTests should use a real socket, or the 2 tests should be skipped on AIX.
msg204264 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-11-24 20:29
Can you try this patch?

diff -r 14cbf01b1929 tests/test_unix_events.py
--- a/tests/test_unix_events.py Sun Nov 24 11:04:44 2013 -0800
+++ b/tests/test_unix_events.py Sun Nov 24 12:28:42 2013 -0800
@@ -379,7 +379,7 @@
         fstat_patcher = unittest.mock.patch('os.fstat')
         m_fstat = fstat_patcher.start()
         st = unittest.mock.Mock()
-        st.st_mode = stat.S_IFIFO
+        st.st_mode = stat.S_IFSOCK
         m_fstat.return_value = st
         self.addCleanup(fstat_patcher.stop)
msg204374 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-25 17:44
New changeset 871d496fa06c by Guido van Rossum in branch 'default':
asyncio: Change mock pipe to mock socket. Hope to fix issue 19750.
http://hg.python.org/cpython/rev/871d496fa06c
msg204414 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-25 21:24
Sporadic failure (test failed and then passed), probably unrelated to your commit:

http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7595/steps/test/logs/stdio

======================================================================
ERROR: testWriteNonBlocking (test.test_socket.UnbufferedFileObjectClassTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_socket.py", line 261, in _tearDown
    raise exc
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_socket.py", line 273, in clientRun
    test_func()
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_socket.py", line 4206, in _testWriteNonBlocking
    n = self.write_file.write(BIG)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\socket.py", line 391, in write
    return self._sock.send(b)
OSError: [WinError 10055] An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full
msg204415 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-11-25 21:27
That's not even in test_asyncio.  It also doesn't belong in this bug (which is for AIX).
msg204417 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-25 21:28
I posted it here because the only change of this build is the changeset 871d496fa06cfeae5f00478035b8ec6703d43ee2.
http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7595/

I will to see if the failure reappears before opened in a new issue.
msg205989 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-12-12 23:20
The initial test failure have been fixed, so I'm closing the issue.
History
Date User Action Args
2022-04-11 14:57:54adminsetgithub: 63949
2013-12-12 23:20:06vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg205989
2013-11-25 21:28:59vstinnersetmessages: + msg204417
2013-11-25 21:27:37gvanrossumsetmessages: + msg204415
2013-11-25 21:24:41vstinnersetmessages: + msg204414
2013-11-25 17:44:57python-devsetnosy: + python-dev
messages: + msg204374
2013-11-24 20:29:02gvanrossumsetmessages: + msg204264
2013-11-24 17:41:59vstinnersetmessages: + msg204241
2013-11-24 12:42:30vstinnercreate