From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.hc324-48.eu.iphmx.com (esa4.hc324-48.eu.iphmx.com [207.54.71.48]) by sourceware.org (Postfix) with ESMTPS id 37F5B393A41A for ; Mon, 3 May 2021 12:57:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 37F5B393A41A Received: from esagw2.bmwgroup.com (HELO esagw2.muc) ([160.46.252.38]) by esa4.hc324-48.eu.iphmx.com with ESMTP/TLS; 03 May 2021 14:57:51 +0200 Received: from esabb5.muc ([160.50.100.47]) by esagw2.muc with ESMTP/TLS; 03 May 2021 14:57:27 +0200 Received: from smucm23k.bmwgroup.net (HELO smucm23k.europe.bmw.corp) ([160.46.167.12]) by esabb5.muc with ESMTP/TLS; 03 May 2021 14:57:26 +0200 Received: from smucm23m.europe.bmw.corp (160.46.167.14) by smucm23k.europe.bmw.corp (160.46.167.12) with Microsoft SMTP Server (TLS; Mon, 3 May 2021 14:57:26 +0200 Received: from smucm23m.europe.bmw.corp ([160.46.167.14]) by smucm23m.europe.bmw.corp ([160.46.167.14]) with mapi id 15.00.1497.015; Mon, 3 May 2021 14:57:26 +0200 From: To: Subject: python > 3.5: Issue with unix domain sockets Thread-Topic: python > 3.5: Issue with unix domain sockets Thread-Index: AQHXQBhBgI/0QVFcvkOkGGRaQ+5yPw== Date: Mon, 3 May 2021 12:57:26 +0000 Message-ID: <1620046759893.5340@bmw.de> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_ASCII_DIVIDERS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2021 12:57:55 -0000 Hello everyone,=0A= =0A= I noticed that latest Cygwin release (3.2.0-1) has an issue with python and= unix domain sockets, although I=92m not a 100% sure about the root cause. = My best guess is that something is wrong with the unix domain dockets imple= mentation. I would like to attach the cygcheck.out but it seems to exceed t= he 180kb limit mentioned on the website (even zipped)=0A= =0A= Simple Reproducer:=0A= I tried to get the example shown at https://pymotw.com/3/socket/uds.html wo= rking. It works if I execute it with python3.5 (both client and server), bu= t it doesn=92t if I use python3.6 or newer (actually tested 3.6 and 3.7 on = Windows 10):=0A= =0A= Correct Behavior:=0A= Server:=0A= $ python3.5 server.py=0A= starting up on ./uds_socket=0A= waiting for a connection=0A= connection from=0A= received b'This is the mess'=0A= sending data back to the client=0A= received b'age. It will be'=0A= sending data back to the client=0A= received b' repeated.'=0A= sending data back to the client=0A= received b''=0A= no data from=0A= waiting for a connection=0A= =85=0A= =0A= Client:=0A= $ python3.5 client.py=0A= connecting to ./uds_socket=0A= sending b'This is the message. It will be repeated.'=0A= received b'This is the mess'=0A= received b'age. It will be'=0A= received b' repeated.'=0A= closing socket=0A= =0A= Incorrect Behavior:=0A= Server:=0A= $ python3.7 server.py=0A= starting up on ./uds_socket=0A= waiting for a connection=0A= Traceback (most recent call last):=0A= File "server.py", line 27, in =0A= connection, client_address =3D sock.accept()=0A= File "/usr/lib/python3.7/socket.py", line 214, in accept=0A= sock =3D socket(self.family, self.type, self.proto, fileno=3Dfd)=0A= File "/usr/lib/python3.7/socket.py", line 151, in __init__=0A= _socket.socket.__init__(self, family, type, proto, fileno)=0A= SystemError: returned= NULL without setting an error=0A= =0A= Client:=0A= $ python3.7 client.py=0A= connecting to ./uds_socket=0A= sending b'This is the message. It will be repeated.'=0A= closing socket=0A= Traceback (most recent call last):=0A= File "client.py", line 27, in =0A= data =3D sock.recv(16)=0A= ConnectionResetError: [Errno 104] Connection reset by peer=0A= =0A= =0A= Am I missing something? =0A= =0A= BR Max=0A= =0A= --=0A= =0A= BMW Car IT GmbH=0A= Maximilian Blenk=0A= Security Engineer=0A= =0A= Lise-Meitner-Str. 14=0A= 89081 Ulm=0A= =0A= Web: http://www.bmw-carit.de=0A= ------------------------------------------------------=0A= BMW Car IT GmbH=0A= Gesch=E4ftsf=FChrer: Kai-Uwe Balszuweit und Michael B=F6ttrich=0A= Sitz und Registergericht: M=FCnchen HRB 134810=0A= ------------------------------------------------------=0A=