delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/01/27/14:00:32

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 50RJ0VaW2017871
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 50RJ0VaW2017871
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=V5YTOrJz
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A69F3858431
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1738004429;
bh=LZTQwJpNcATtv9qj4yVE9MSLPmTQ0GKQSr1nu86ySbQ=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=V5YTOrJznONC2GC+yt4sveKUHQaUHJr5/jQiuOBSLgmDSDON9WDMEPmBOLoRRRHeX
WJv8rDiNm2VoDuVAVrfhASxq3+BNaGhSKsnLXvVjF1yoWPHy2gKY1eij4aK5PU+Ply
SryEG09RfMpxnpStq/bFtMWbRNNtDQr0twDFfzCM=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87E3B3858D37
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 87E3B3858D37
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1738004358; cv=none;
b=awbTKTbvDlYOFjKxVK0Nn9vTR0UWhOOn9hbvQxEdcmcdTYg7YOi9I2QqOk2+42QYbf69k8loXmIcDyurZq9ewAdIBzky724oDARDzX8v+sXqDpH/PYp53xNqhak90YLkBtGGbLv0wlilL+HIXS0rBDbWV7OxCh1lEllGUspnoLc=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1738004358; c=relaxed/simple;
bh=OQSbmw6ajuFHjdiEaZidquGyxGWy8IstD+Hy6vYJ6Us=;
h=Subject:From:To:Message-ID:Date:MIME-Version;
b=W+Gyz27Oxa1YgQ4E94sigD2b2qfPL9yPkejyv0S0dQ3g5adgLhcfbjrz3MPeVgqGEV394n42zuc3eB+zqLdWmh4LxS0dGB8STYco+uAkbqjqDvy0xVPDv29LGFJTJ8bdEzJmljyO6cHa6x9J5SMTYlSZiLzuPbBDCG3FENmc1hA=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87E3B3858D37
Subject: Re: mq_send()/mq_receive() may never return if used from threads
To: cygwin AT cygwin DOT com
References: <838238ed-0bf4-9374-fb8a-bc6a47c512a9 AT t-online DOT de>
Message-ID: <ea441ab3-14ab-3d2e-4e54-ec81c14efa92@t-online.de>
Date: Mon, 27 Jan 2025 19:59:14 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101
SeaMonkey/2.53.20
MIME-Version: 1.0
In-Reply-To: <838238ed-0bf4-9374-fb8a-bc6a47c512a9@t-online.de>
X-TOI-EXPURGATEID: 150726::1738004355-CAFFA956-64E3B027/0/0 CLEAN NORMAL
X-TOI-MSGID: cb803cd8-dabc-4f71-82ae-e5e1a4dd8cca
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: Christian Franke via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Christian Franke <Christian DOT Franke AT t-online DOT de>
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>

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


> $ gcc -o mqhang mqhang.c
>
> $ ./mqhang
> mq_send...
> mq_send = 0
> mq_receive...
> mq_receive = 8
> mq_receive...
> mq_send...
> [...hangs...]
>
> Problem does not occur if mq_receive() is called from a fork()ed 
> process instead of a thread.
>

-- 
Regards,
Christian


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