X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-IronPortListener: Outbound_SMTP X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgEFAOSvs1CcKEel/2dsb2JhbABEhii5BXYWc4IeAQEBAwESERFKCwIBCA0NAgYgAgICHRMVEAIEGxqHZQajWooHkmWBIo5DMmEDjTWOWYo3gm+CHQ From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" To: "cygwin AT cygwin DOT com" Subject: RE: Possible race in SYSV IPC (semaphores) Date: Mon, 26 Nov 2012 18:09:40 +0000 Message-ID: <5F8AAC04F9616747BC4CC0E803D5907D016FEA@MLBXv04.nih.gov> References: <5F8AAC04F9616747BC4CC0E803D5907D012856 AT MLBXV09 DOT nih DOT gov> <20121123113605 DOT GN17347 AT calimero DOT vinschen DOT de> <20121123131020 DOT GR17347 AT calimero DOT vinschen DOT de> <20121123133332 DOT GU17347 AT calimero DOT vinschen DOT de> <20121123164404 DOT GX17347 AT calimero DOT vinschen DOT de> <5F8AAC04F9616747BC4CC0E803D5907D0162C6 AT MLBXv04 DOT nih DOT gov> <20121123172937 DOT GA12624 AT calimero DOT vinschen DOT de> <5F8AAC04F9616747BC4CC0E803D5907D0162E7 AT MLBXv04 DOT nih DOT gov> <20121123175903 DOT GA11546 AT calimero DOT vinschen DOT de> <20121126125342 DOT GA3800 AT calimero DOT vinschen DOT de> In-Reply-To: <20121126125342.GA3800@calimero.vinschen.de> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id qAQIA9Fi010652 > I just checked in the change. Thank you. I will test it as soon as it's available in a snapshot. > ...especially since I can't reproduce this. I tried with cygserver > before and after my patch and in both cases your semaphore testcase > worked as expected with -d -l 7. I see. Maybe this will help. My sequence of actions: In an elevated cmd.exe, from Cygwin's /bin: cygrunsrv.exe -I cygserver -x /usr/sbin/cygserver.exe -a "-d -l 7" cygrunsrv.exe -S cygserver In a regular cmd.exe: a.exe (this is my testcase that locks/unlocks the semaphores). It never gets past iteration 1000. Also, if I start cygserver just as a regular process (not as a background thing), so that it logs right to the window, it does not lock up. Anton Lavrentiev Contractor NIH/NLM/NCBI