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_socket failures on Debian unstable #54313

Closed
pitrou opened this issue Oct 14, 2010 · 6 comments
Closed

test_socket failures on Debian unstable #54313

pitrou opened this issue Oct 14, 2010 · 6 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@pitrou
Copy link
Member

pitrou commented Oct 14, 2010

BPO 10104
Nosy @doko42, @pitrou, @lekma

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 2011-01-04.00:55:22.500>
created_at = <Date 2010-10-14.16:09:32.250>
labels = ['type-bug', 'tests']
title = 'test_socket failures on Debian unstable'
updated_at = <Date 2011-01-04.00:55:22.499>
user = 'https://github.com/pitrou'

bugs.python.org fields:

activity = <Date 2011-01-04.00:55:22.499>
actor = 'pitrou'
assignee = 'none'
closed = True
closed_date = <Date 2011-01-04.00:55:22.500>
closer = 'pitrou'
components = ['Tests']
creation = <Date 2010-10-14.16:09:32.250>
creator = 'pitrou'
dependencies = []
files = []
hgrepos = []
issue_num = 10104
keywords = ['buildbot']
message_count = 6.0
messages = ['118677', '118680', '118684', '118686', '118687', '125267']
nosy_count = 4.0
nosy_names = ['doko', 'pitrou', 'lekma', 'nvetoshkin']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue10104'
versions = ['Python 3.2']

@pitrou
Copy link
Member Author

pitrou commented Oct 14, 2010

This is following r85480 (issue bpo-7523). It seems the Debian unstable system on one of the buildbots has SOCK_NONBLOCK and SOCK_CLOEXEC, but doesn't support creating sockets using these flags:

======================================================================
ERROR: testInitNonBlocking (test.test_socket.NonBlockingTCPTests)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/test/test_socket.py", line 914, in testInitNonBlocking
    socket.SOCK_NONBLOCK)
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/socket.py", line 94, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
socket.error: [Errno 22] Invalid argument

======================================================================
ERROR: test_SOCK_CLOEXEC (test.test_socket.CloexecConstantTest)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/test/test_socket.py", line 1834, in test_SOCK_CLOEXEC
    socket.SOCK_STREAM | socket.SOCK_CLOEXEC)
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/socket.py", line 94, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
socket.error: [Errno 22] Invalid argument

======================================================================
ERROR: test_SOCK_NONBLOCK (test.test_socket.NonblockConstantTest)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/test/test_socket.py", line 1854, in test_SOCK_NONBLOCK
    socket.SOCK_STREAM | socket.SOCK_NONBLOCK)
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/socket.py", line 94, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
socket.error: [Errno 22] Invalid argument

(full log at http://www.python.org/dev/buildbot/3.x/builders/alpha%20Debian%203.x/builds/258/steps/test/logs/stdio)

@pitrou pitrou added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Oct 14, 2010
@nvetoshkin
Copy link
Mannequin

nvetoshkin mannequin commented Oct 14, 2010

What about kernel version? As far as I know 2.6.27 is minimum requirement.

@nvetoshkin
Copy link
Mannequin

nvetoshkin mannequin commented Oct 14, 2010

@pitrou
Copy link
Member Author

pitrou commented Oct 14, 2010

Thanks for the research. Given that it only happens on Debian unstable, and it only happens if you explicitly use SOCK_{CLOEXEC,NONBLOCK}, I would vote for not adding a workaround until some supported OS also exhibits the issue.

@nvetoshkin
Copy link
Mannequin

nvetoshkin mannequin commented Oct 14, 2010

Agree.
Already written code won't suffer, new code should be ready to use new linux kernel.

@pitrou
Copy link
Member Author

pitrou commented Jan 4, 2011

Fixed some time ago.

@pitrou pitrou closed this as completed Jan 4, 2011
@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
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant