New submission from Fedor Korotkiy <darts...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue34466>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to