X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE755385780B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1617292931; bh=qxq95bnEfDj8qJtoKJDcKLlVjKxDRsjS7NNYO32Gzgk=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=rzPt0FO3pg4+ABx8OEEHNep9ebhO66r6gaG7NLGCvXx8LDxE2UjS7sEe/YmcL0WKD NSoDuS5q7eQCKyA3JQEXBnp8CGIDI1rOibXAArnwnlu8vOTsbAb7fDJUFHMkpKLnkt BFSVk+1Z2q4BPyrTNC5YN/jgEY5ajuhvRLq6k1kI= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 944963858012 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X8JWg/Olrvi0xrrejVy4m9Y2RIEWq4rVFwToMFzHMd7zmzE80XMoyf2Ztvkt54Tf+wBqueV9bbETYLCQkm/rgJgA2dX2RA/W/B5nRGOr26vIzaYFM2kuai2ETjiuNq4NeMuWp2OmbDcTTram15ltWSL11/ZG7q2gBD4/aaPuQUCyJhD0GTb4m2JcltZ5XWKIBkAXN5B5VttuinA81gsJ9DqGLGSeeXi6UOPFhkhGQsWnXCNbfod3Vut0uv5aqdBb069Z/r9qDMduB4T6s8zBZ6a/4XnglEf3GrFRQE4qJgYPbEmCXP+n99wgxXHo12TQkhtfIP1pBSKqprSS4MG2gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x5GJqcuvkJYf0PVi6VPkL8Q7kV31jdWfJ7QAKs+2LCo=; b=hQ9Q/gi1RWOJ9zFvtPqAGJXqtc75VFGK6cNONjgqGg0p1uuGJCQULw33bBJj+CBjCf715InYVL4dxgIAlh7U/uIFUE/WRaRSPPggdZXgni/hgN+CijuopfA7q67ExUBzGpVpJBjulHaBIRa5wxkBPCJI4tMJna+ayfnZDmho7i7QBgsqtj9l/jvvU2Au2VtUyc85Pk1UEnKgXTRxJCah8x06WgVsD/xYih8mn8bjMHAmo9eqM51esercs73q6OtHsA0F0fDBwSypsalmBibArL4ixSFGF7jxkWvz0hLrZLe6WJCCx95sJ22TGvHE8aqS442Ueod2bffddb7Wfc77Gw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none Subject: Re: AF_UNIX/SOCK_DGRAM is dropping messages To: sten DOT kristian DOT ivarsson AT gmail DOT com, cygwin AT cygwin DOT com References: <04cc01d71ffa$7d1e6cf0$775b46d0$@gmail.com> <00d901d7208e$97c05c50$c74114f0$@gmail.com> <860668bf-8cf9-0969-6a01-7fbf8b782db1 AT cornell DOT edu> <000901d72607$55dc5a90$01950fb0$@gmail.com> <3346cd1c-b93f-83c4-ff26-553ac95ec692 AT cornell DOT edu> Message-ID: <7c21a430-9609-7fd4-1a02-8b7c1978d2f8@cornell.edu> Date: Thu, 1 Apr 2021 12:02:02 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 In-Reply-To: <3346cd1c-b93f-83c4-ff26-553ac95ec692@cornell.edu> Content-Language: en-US X-Originating-IP: [2603:7081:7e41:6a00:70be:1fd2:1143:8157] X-ClientProxiedBy: BL1PR13CA0174.namprd13.prod.outlook.com (2603:10b6:208:2bd::29) To BN7PR04MB4388.namprd04.prod.outlook.com (2603:10b6:406:f8::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2603:7081:7e41:6a00:70be:1fd2:1143:8157] (2603:7081:7e41:6a00:70be:1fd2:1143:8157) by BL1PR13CA0174.namprd13.prod.outlook.com (2603:10b6:208:2bd::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.9 via Frontend Transport; Thu, 1 Apr 2021 16:02:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d00d6f63-6553-4b08-e09f-08d8f5277ec9 X-MS-TrafficTypeDiagnostic: BN6PR04MB0242: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yhdYSnhvusZN52IGeuz0u9cVTCDJ7YWEjDyVn6HRX4C0btHDpZh0LFlOn9E4knuyadL/OXYjZ896MrlPAr9RR9z8GQvHHtOoKRfLr6VXXIbdQL6C+Nnkz5JJHWljogzpjeqJD9L0cAs8OgkCaqc3PRF9IKLQlGkGcmY9UMZ6kZ5VXaK/J0W8Q1zrgk2VH9SB6Vylomr347s22arqMHHtSFHEpCNcP6IL/qmD9VSu7fXNuBQJMgSpjtvCGLyXXzDRrOl3ykN0sOjb8yxnTO9sfC6umo6a10ugy1UMp7SKGvPkmBtWZ4vKihX/Nf4VX7UMaldCgo5AoKyWxBcatFBCJhJ4OcX469liqPZk5cgqnr+2ELYprt+F0TRYSJQWfK7WysbMbKca88lC/fpBJvOTKpTfzlLcl4bTGOE2rHWcowWg8U7F18vNxq7anHawSx+XtI2IsBsiSSgsAP2WEJBQzvCfcS/2Tb/LPQ7N5EBjMOndCSHoHu68d/aiLggOL/DKU7KP8s1qkCAbJm6J3Ed7VPxwZ7y8uQ+Z6QEP0VZbBr3HWFX4p8peqK6SUCZZRrgbbKctWeQQp0/epwqYa/tL+TdRjEo5lxzOirhXEuQpoGV61DbJ4I+4mGvp8xM2SqFksp+8gqMsTMPTB+yy+RZxX4MfiYB+CXBj4QKdMYELtdIoNTlYNC0PJPJpDpHAqGM24DD4Y50akf7TZ++4X7GRQ98uIA1LUVf7O6lAj81Ds+E= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN7PR04MB4388.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(366004)(31686004)(8676002)(75432002)(8936002)(83380400001)(316002)(786003)(86362001)(6486002)(38100700001)(66556008)(66476007)(53546011)(2616005)(36756003)(6666004)(2906002)(31696002)(186003)(66946007)(478600001)(15650500001)(52116002)(16526019)(5660300002)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?Windows-1252?Q?Q9H33D5WGGdyQ0RhQlSN76NnY+50rzKY21wva6jF6GHKrtT6jI1mV3M3?= =?Windows-1252?Q?3OyjAW3poHA+E3+bGeF0n6gfQYeBcu5vwbg2rHTVY/R+gL6Fr9ne7dvV?= =?Windows-1252?Q?xjZy5ag/KE3R8jhVNtjwZroK7xe5Dw9TLV7MUwZALY91ap6juNEh4uZr?= =?Windows-1252?Q?MXiyu5BHB/frxhIR7GAYve3LQmF1ax/vVoSxMuLBf7/k/n/aPwpu+ALd?= =?Windows-1252?Q?eMwKeuH2nd9Zk3HWafatDYt9riykdhh6YOfUpX4LhPRYTLs6xj+7BLYN?= =?Windows-1252?Q?HPWZpKMUauK+s9hSf6dqJMzQr6zi9nIlbzuIfW55yDzrhVPHpb6f4nvg?= =?Windows-1252?Q?viyMli+4Vq3392eZAnOeWhvsRVI/O7Iv/vHjuYnBdxBbgpc6caaN7XEP?= =?Windows-1252?Q?XXekpojJGrWE+5iBOSkYaFpWCYZe8cDX0mkUVVI6Rak6Rx89UPCdRTd4?= =?Windows-1252?Q?FoC0sqv2pZKA/VQh0LeBPOdf3p7UnhzTdB9Kx+ZOrJAo9qaTj9juWPic?= =?Windows-1252?Q?F+tglEuT3llRdYwsxqJO5yyO4Yml8FBeoqN7Ccr3jfBvIXCP+hKjSpKj?= =?Windows-1252?Q?UewjQUwLRckEjmUJ7hB75nsbSdgkSVLgYv7LAtBnvD/BW7iEVw2KqOZo?= =?Windows-1252?Q?ia+oDDaL3gidXkUxqmqfbUScVYIE/hTjMDH63kjZOsN+ZYgEJxGtaLmq?= =?Windows-1252?Q?2+ZUh0kIvJH2shq9fBwqQiEQtFZZ1JfDSS+vy01W5IgVeS8pXND+rpTX?= =?Windows-1252?Q?AB0wJoiCM52rBmitM2/3Kp169Oa6N0t5nPE8BxmozTNVYC8A6e9gdSao?= =?Windows-1252?Q?NTO6apO7uttJ9Wfenbq1j9pwWAQINcOf7084WyJ2vaeiBIPozBOUK3WK?= =?Windows-1252?Q?j9d8bmp7VzReckEq5V75Nhx+tyAKAz+EXNP10ytYE4zyevpW+qaTXSBM?= =?Windows-1252?Q?S4NUvZr7qUNLt+r5ipfXJqAkYogtGcQSY44myuXNdXvwIcyAoeAfkS8k?= =?Windows-1252?Q?CmTT5GUozocTSPjYFpeMWkaqUqNvRPyuRyk7rgfFlDDdtxuWStno1WLf?= =?Windows-1252?Q?yWBYZeUtCvw0Ge6n2cMX141HoGDRXDShDOjTq8otwpQUvlqofnEBLm+7?= =?Windows-1252?Q?fQjuzuVg4KfgeYc1DAymdVFs3Fy9CNQQa3awdqGfJjOSAXGan392cBXu?= =?Windows-1252?Q?3SHfRCEdzCfMsYtR481Kzj3GGfS1FFNmiYRpXNDWC7zDQpLjrGOJcZKK?= =?Windows-1252?Q?wG6vgdJ0DO0LPHOEqEeFY2es8IbQJUfgP8XJDSyGw1qpx/CCtAbzREeM?= =?Windows-1252?Q?W03GcCF2vTugOPPlLXXtpZ8WpulPFEtld6TN44CK3pj2D8mnl065sWnj?= =?Windows-1252?Q?09l0dT60PubWPbsX/8Xc1Xq+Ptj3vLXbvAhnkER/loUnjiQXeclwlakn?= =?Windows-1252?Q?TrR33LXg7uyHeOdXYNV9eknlCSp75QYM/KoPWze8OthR54gaw+uY4ctj?= =?Windows-1252?Q?501eUeVF?= X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: d00d6f63-6553-4b08-e09f-08d8f5277ec9 X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2021 16:02:05.4083 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yn//O67TkwN1vdQHDMAm0ERrrt6MxXwz/I07hO5rdIdAKjT/HF48alxyChzdjVoQ9JJHA2TXgBadeE90cyWfGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR04MB0242 X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, KAM_DMARC_STATUS, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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 AT cygwin DOT 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: , From: Ken Brown via Cygwin Reply-To: Ken Brown Content-Type: text/plain; charset="windows-1252"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 131G2GGF031735 n 3/31/2021 11:07 AM, Ken Brown via Cygwin wrote: > On 3/31/2021 4:24 AM, sten DOT kristian DOT ivarsson AT gmail DOT com wrote: >> [snip] >>>>>> Using AF_UNIX/SOCK_DGRAM with current version (3.2.0) seems to drop >>>>>> messages or at least they are not received in the same order they >>>>>> are  sent >> >> [snip] >> >>> Thanks for the test case.  I can confirm the problem.  I'm not familiar enough >>> with the current AF_UNIX implementation to debug this easily.  I'd rather >>> spend my time on the new implementation (on the topic/af_unix branch).  It >>> turns out that your test case fails there too, but in a completely different >>> way, >>> due to a bug in sendto for datagrams.  I'll see if I can fix that bug and >>> then try >>> again. >>> >>> Ken >> >> Ok, too bad it wasn't our own code base but good that the "mystery" is verified >> >> I finally succeed to build topic/af_unix (after finding out what version of >> zlib was needed), but not with -D__WITH_AF_UNIX to CXXFLAGS though and thus I >> haven’t tested it yet >> >> Is it sufficient to add the define to the "main" Makefile or do you have to >> add it to all the Makefile:s ? I guess I can find out though > > I do it on the configure line, like this: > >  ../af_unix/configure CXXFLAGS="-g -O0 -D__WITH_AF_UNIX" --prefix=... > >> Is topic/af_unix fairly up to date with master branch ? > > Yes, I periodically cherry-pick commits from master to topic/af_unix.  I'lldo > that again right now. > >> Either way, I'll be glad to help out testing topic/af_unix > > Thanks! I've now pushed a fix for that sendto bug, and your test case runs without error on the topic/af_unix branch. By the way, I think the implementation of sendto/recv for datagrams is very inefficient when there are repeated calls to sendto as in your test case. Nevertheless, your test case actually runs slightly faster on the topic/af_unix branch than it does on master (when the latter succeeds, which it does about half the time for me). So I'm not sure whether it's worth worrying about this. Here's the issue, briefly. The communication is done via a Windows named pipe. The receiver creates the pipe when it creates and binds its socket. It creates only one pipe instance. The sender connects to the pipe, writes, and closes its handle. But the pipe is not available for another sender to connect to until the receiver reads the message, after which it disconnects the sender. Ken -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple