From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id A491C3851C36 for ; Wed, 5 May 2021 09:10:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A491C3851C36 Received: by mail-wm1-x333.google.com with SMTP id b19-20020a05600c06d3b029014258a636e8so675947wmn.2 for ; Wed, 05 May 2021 02:10:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gKfIH0pfcw4zTlR164wAqlcN7qngNmruRAYHRlyVaiU=; b=fMop/TAkoFNtsYOwUWddjG9vybciWgN/tlHNov9yOJ96pi/67R2AQwHTcTDhMOz4eI XffdjKx7L/JxX+D+WWgRqZbOX/p5Ax2JDTS+m0PR5peVc0LiFoHJRnw1TNYBWj4mhR+7 kfz2cTWizPL0K5vPwAAasXvpr+brlG5G6Cdt2eCfLOzCWUEZV4kubB0sk8COQBtz9yqb /KPneTaixs1tsJ1eqkruytnVgvoH8gmdZTMVExG9M5ydt7Tke2q9t37abOlfWUULsbEO Fy5EatZYP8Yhm6FjCLTWZpy564WS+Y6mp0HFaI2p9QG2/l94lqaGg16x5E/DDAOd+tzL L0Cw== X-Gm-Message-State: AOAM531M0s9rSuikPgZ8jGOutSfN1BVU9LcbwV2wEGeN7kHZ66JoCt85 C0+PeZbDWYnypD0lDrFMdzNHHpjuUd9mdQ== X-Google-Smtp-Source: ABdhPJxZZVAFqnzpKcwAqne9dJdLKRJGSJQ/VSrHC4A2wbHRVmrS9VTye2RMe1PiyIT/U3YYjC2zVA== X-Received: by 2002:a7b:c8ca:: with SMTP id f10mr32289339wml.118.1620205846688; Wed, 05 May 2021 02:10:46 -0700 (PDT) Received: from ?IPv6:2003:cc:9f04:e338:1d22:f8f2:4e47:ef13? (p200300cc9f04e3381d22f8f24e47ef13.dip0.t-ipconnect.de. [2003:cc:9f04:e338:1d22:f8f2:4e47:ef13]) by smtp.gmail.com with ESMTPSA id i12sm11117628wry.57.2021.05.05.02.10.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 May 2021 02:10:46 -0700 (PDT) Subject: Re: python > 3.5: Issue with unix domain sockets To: cygwin@cygwin.com References: <1620046759893.5340@bmw.de> From: Marco Atzeri Message-ID: Date: Wed, 5 May 2021 11:10:45 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <1620046759893.5340@bmw.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: it Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: Wed, 05 May 2021 09:10:50 -0000 On 03.05.2021 14:57, Maximilian.Blenk--- via Cygwin wrote: > Hello everyone, > > I noticed that latest Cygwin release (3.2.0-1) has an issue with python and unix domain sockets, although I’m not a 100% sure about the root cause. My best guess is that something is wrong with the unix domain dockets implementation. I would like to attach the cygcheck.out but it seems to exceed the 180kb limit mentioned on the website (even zipped) > > Simple Reproducer: > I tried to get the example shown at https://pymotw.com/3/socket/uds.html working. It works if I execute it with python3.5 (both client and server), but it doesn’t if I use python3.6 or newer (actually tested 3.6 and 3.7 on Windows 10): > > Correct Behavior: > Server: > $ python3.5 server.py > starting up on ./uds_socket > waiting for a connection > connection from > received b'This is the mess' > sending data back to the client > received b'age. It will be' > sending data back to the client > received b' repeated.' > sending data back to the client > received b'' > no data from > waiting for a connection > … > > Client: > $ python3.5 client.py > connecting to ./uds_socket > sending b'This is the message. It will be repeated.' > received b'This is the mess' > received b'age. It will be' > received b' repeated.' > closing socket > > Incorrect Behavior: > Server: > $ python3.7 server.py > starting up on ./uds_socket > waiting for a connection > Traceback (most recent call last): > File "server.py", line 27, in > connection, client_address = sock.accept() > File "/usr/lib/python3.7/socket.py", line 214, in accept > sock = socket(self.family, self.type, self.proto, fileno=fd) > File "/usr/lib/python3.7/socket.py", line 151, in __init__ > _socket.socket.__init__(self, family, type, proto, fileno) > SystemError: returned NULL without setting an error > > Client: > $ python3.7 client.py > connecting to ./uds_socket > sending b'This is the message. It will be repeated.' > closing socket > Traceback (most recent call last): > File "client.py", line 27, in > data = sock.recv(16) > ConnectionResetError: [Errno 104] Connection reset by peer > > > Am I missing something? > > BR Max > Hi Max, thanks for the example. Mark Geisert provided me a solution and it passes your test case on python3.8 and it seems to not add other problem at list in my tests. give me some time to update all packages (3.6, 3.7, 3.8) for both architecture in the coming days Regards Marco