[New-bugs-announce] [issue34466] socket.settimeout working incorrectly for connect() method of AF_UNIX socket

Fedor Korotkiy report at bugs.python.org
Wed Aug 22 17:04:11 EDT 2018


New submission from Fedor Korotkiy <dartslon at gmail.com>:

Attached program creates listening server socket, fills backlog queue with 2 client socket and performs third connect attempt after setting socket timeout to 5 second.

I expect third connect() attempt to fail after specified timeout of 5 second. That is indeed what's happening for tcp socket (AF_INET).

But when underlying socket has type AF_UNIX, connect() fails immediately with 'Resource temporarily unavailable' error. I'm able to reproduce this issue on linux 4.17.12 and python 3.6.6.

The underlying issue seems to be different behavior of connect(3) system call for unix sockets. Instead of starting operation and returning EINPROGRESS error it fails immediately with EAGAIN error.

Thanks to Vladislav Bidzilya for discovering this issue.

----------
files: bug.py
messages: 323910
nosy: Slon
priority: normal
severity: normal
status: open
title: socket.settimeout working incorrectly for connect() method of AF_UNIX socket
versions: Python 3.6
Added file: https://bugs.python.org/file47759/bug.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34466>
_______________________________________


More information about the New-bugs-announce mailing list