Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_asyncio.test_unix_events constructor failures on AIX #63949

Closed
vstinner opened this issue Nov 24, 2013 · 8 comments
Closed

test_asyncio.test_unix_events constructor failures on AIX #63949

vstinner opened this issue Nov 24, 2013 · 8 comments

Comments

@vstinner
Copy link
Member

BPO 19750
Nosy @gvanrossum, @vstinner

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2013-12-12.23:20:06.149>
created_at = <Date 2013-11-24.12:42:30.968>
labels = []
title = 'test_asyncio.test_unix_events constructor failures on AIX'
updated_at = <Date 2013-12-12.23:20:06.148>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2013-12-12.23:20:06.148>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2013-12-12.23:20:06.149>
closer = 'vstinner'
components = []
creation = <Date 2013-11-24.12:42:30.968>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 19750
keywords = []
message_count = 8.0
messages = ['204203', '204241', '204264', '204374', '204414', '204415', '204417', '205989']
nosy_count = 4.0
nosy_names = ['gvanrossum', 'vstinner', 'python-dev', 'David.Edelsohn']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue19750'
versions = ['Python 3.4']

@vstinner
Copy link
Member Author

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

@vstinner
Copy link
Member Author

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 python/cpython#63493.)
        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.

@gvanrossum
Copy link
Member

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)

@python-dev
Copy link
Mannequin

python-dev mannequin commented Nov 25, 2013

New changeset 871d496fa06c by Guido van Rossum in branch 'default':
asyncio: Change mock pipe to mock socket. Hope to fix bpo-19750.
http://hg.python.org/cpython/rev/871d496fa06c

@vstinner
Copy link
Member Author

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

@gvanrossum
Copy link
Member

That's not even in test_asyncio. It also doesn't belong in this bug (which is for AIX).

@vstinner
Copy link
Member Author

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.

@vstinner
Copy link
Member Author

The initial test failure have been fixed, so I'm closing the issue.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants