delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/01/28/03:58:27

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 50S8wROB2295861
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 50S8wROB2295861
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=lY7/fyp5
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A08DC385841D
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1738054706;
bh=5HfBMLC9jNd1/Fz9Y47jTcgeaAZh20n03cDcqwuqU28=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=lY7/fyp5dRrIACcqX6N0945+a3Pc2xNID4Nz9u27mBSB4V2gFnuG3gaW5roU6ybNn
xOI5be0dv8aREg74efBqAPUfvwEOICY5r7T6S8B3la1B+mi94zGzX+/fC1veLZX0n1
bYPSuG0vJeQ//eqMSV1UJ8NKc+UDWrC54JLGIM24=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3139F3858039
Date: Tue, 28 Jan 2025 09:57:26 +0100
To: cygwin AT cygwin DOT com
Subject: Re: mq_send()/mq_receive() may never return if used from threads
Message-ID: <Z5ib9s_N8rdKdKKK@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <838238ed-0bf4-9374-fb8a-bc6a47c512a9 AT t-online DOT de>
<ea441ab3-14ab-3d2e-4e54-ec81c14efa92 AT t-online DOT de>
<Z5ff7yCrS0CTPVwe AT calimero DOT vinschen DOT de>
<Z5f_2XFwGbS9U5AM AT calimero DOT vinschen DOT de>
<cd4e6214-9ccb-5829-3fb1-c615aebc44f1 AT t-online DOT de>
MIME-Version: 1.0
In-Reply-To: <cd4e6214-9ccb-5829-3fb1-c615aebc44f1@t-online.de>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 50S8wROB2295861

On Jan 28 09:00, Christian Franke via Cygwin wrote:
> Corinna Vinschen via Cygwin wrote:
> > On Jan 27 20:35, Corinna Vinschen via Cygwin wrote:
> > > On Jan 27 19:59, Christian Franke via Cygwin wrote:
> > > > Christian Franke wrote:
> > > > > Found with 'stress-ng --workload ...':
> > > > > 
> > > > > If mq_receive is called on an empty queue and mq_send is called later
> > > > > from a different thread, both functions never return and signals
> > > > > (including SIGKILL) are no longer processed.
> > > > > 
> > > > > Testcase (attached):
> > > > > 
> > > > > $ uname -r
> > > > > 3.5.5-1.x86_64
> > > > > 
> > > > The problem is also reproducible with 3.5.6-1 and recent
> > > > 3.6.0-0.345.gb940faa144ca
> > > Yes, because I didn't have the time to look into it yet.
> > > 
> > > I just did, and I think I see what's going on.  This should be fixed
> > > in 3.5.7.
> > I just pushed a patch, please try cygwin-3.6.0-0.346.gfe6ddc15a356.
> 
> $ uname -r
> 3.6.0-0.346.gfe6ddc15a356.x86_64
> 
> $ time ./mqhang
> mq_send...
> mq_send = 0
> mq_receive...
> mq_receive = 8
> mq_receive...
> mq_send...
> mq_receive = 8
> mq_send = 0
> 
> real    0m5.002s
> user    0m0.000s
> sys     0m0.000s
> 
> $ stress-ng --workload 16 --timeout 60 --verify
> stress-ng: info:  [4873] setting to a 1 min run per stressor
> stress-ng: info:  [4873] dispatching hogs: 16 workload
> stress-ng: info:  [4874] workload: running with 2 threads per stressor
> instance
> stress-ng: info:  [4873] skipped: 0
> stress-ng: info:  [4873] passed: 16: workload (16)
> stress-ng: info:  [4873] failed: 0
> stress-ng: info:  [4873] metrics untrustworthy: 0
> stress-ng: info:  [4873] successful run completed in 1 min, 3.31 secs
> 
> Looks good!

Cool, thanks for testing.  I guess I release a 3.5.7 pretty soon.


Thanks,
Corinna

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019