X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD80F3857811 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1636555700; bh=nFuEJxSrxQX1jfoPi1Qmsms3bd5GundqoncTWx7ETPI=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Ik1aeiYknX9AOs8lj77F+kZrwHZkhAnYB9AkujyzLud2ll/ZpuIDnasJuPZ46B+8h u5VKyd0ys7YXLiNKO6hpJK8gUghcVeLJxVk/I1A77Nqe+1YrXtI7v+Ed9U7GsKIiG2 f63mKomv53tXzZzxuRw23b31yWpdLYqYsu3TnjuQ= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1B65A3857805 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wx0UQMx/kQRVYrnlu7PrLGBESq3a4KYGC3WzbM1ibrm/1NeWON5Bi/j+aPNmU6IbNMCfsYXGardP4CPKfZqBRvle85sIsKHE9leFUhif62T26ECIIXnGjT/He9W2eq+rROb4TMVujhJf/1i7jnsbi/78Ys7Ljt7S4D7ZJKEIAMkKPctsiEtGkzeilaLMkCYJSh+CkgtQ5mCKBvP1FAlodmuQe+qEuv01rt2NhGiOeRdBacWQCkQgnreT/OPwN4cmTNGgotFYS4DkvXjWl4k76hGafp+kfolDKzyonmUJ6E2sBecapbjZt3xXo90Vzj4MxxKaFxjOJKCwAG27QqE6mg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6gplGs7KSPyUBG7Rl66EkYcCg0OzHYlxDILW+iMLsHY=; b=Za+S5raIg/R0YcekqYmNR1kZ7zeF3cbbsbJwaJo1kCfyWxFgfuB+npkBs/9Q74PJTfTuSPZbpmenvoLbooo/Myp7kP7Q8hj0U8WdVD6CRwgoQLVvVu0nqiFg0JCoGBc2Vl0kmFxjaRfI29LFqsovAKwF/oY/BPRx2EfV7vg8oyBAL2KWtS9g7ilUx0TzpTYoLrOYLL1MLLDgwaaeJErsgQ3Hhl+Vy90d0v4Se15posIbZDyk8vd+cad1nGg2X4siFyNcEQdX3ghNlp3X0HgfQN+ulwABP64ul886WjQlS0ta/yqhmWP/6hxMEQebkMkmDYnk50k128x7mArlJ4Avow== 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 Message-ID: <4b937b32-e348-19d2-2406-c55fa12e20a3@cornell.edu> Date: Wed, 10 Nov 2021 09:47:31 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: Another pipe-related problem? Content-Language: en-US To: cygwin AT cygwin DOT com References: <05c4180e-396b-4af3-ac0c-2ab8125df17e AT cornell DOT edu> <0971ace1-5ee8-bdcc-5fd9-4551b294ebf8 AT cornell DOT edu> <75197fd0-d5da-3236-a7df-b8ffc3f67da7 AT cornell DOT edu> In-Reply-To: X-ClientProxiedBy: CH2PR10CA0009.namprd10.prod.outlook.com (2603:10b6:610:4c::19) To BN7PR04MB4388.namprd04.prod.outlook.com (2603:10b6:406:f8::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9870d4d5-67ab-43a0-f508-08d9a4590749 X-MS-TrafficTypeDiagnostic: BN7PR04MB3842: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pLVM9B7y/bot7Q51PGYPKknhuT/SVPFHBD/kD5I/7/TtMezDJk8WR+2drre25GemcHy5/1on6iZ8I8ryr8U5NE90FUrs4wR7NSdvpPZCm//yxsDMe71fPlYkvrqX+zrGQr8YWVdSL3QSNOtuxqY+ILfV2BIUoQLWqAMZ+umtxV8ZFnW5iOVtGBS6nddRcw6nhGk9m87i4JMitRAbLsk2v9nCBcP7/OeDLCaTyYZLifkrxXBEA10yXXrKreZhGJLAovS/ttYlkdD8YbjLUGwixCeTMFDZVIpdqy0Jial6x/mqnNfOP1vKqd3V7//tqk8ERCfSv2YImfPltmI42b/hIMmAhS7d90/41XR0SgAu8YARKwIbuHRxTIrCwFzphUtauits/YR9Z/pEhGlM85nEV6qxX+2RedLT/Jofai9X5J3e63JiahoKfFc+b5q4omINuNCI373zIVdCYOHN3930GzCnzj8dj55KMK2qjoKQ6WASCHjhyBKbwuSpso69ZXQjcZBvb3c4usq5Cd953F9Fg9jqI1qWhLhCI6lEAPVNEiHGSMCLznFsYjSC8m1PaDafNz66ZLQ9SgZYCV/Gscf6FmA6eShVqlA43C6hg0ZW8U4bapSfVdyNpmB+VUn7WeJLyhKZYubnihIjJ6LEtmsa5Xtm/g/00yDF3ZmfV4BGJfz7p7/DamsyuXDL/8NVzf6MJKL2Lm7MfOMnzvMMbsMDNPCcjhVU+wyO2s7uibb8964= 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)(366004)(2906002)(38100700002)(86362001)(3480700007)(786003)(316002)(75432002)(2616005)(19627235002)(6486002)(186003)(5660300002)(66476007)(83380400001)(508600001)(31696002)(36756003)(66556008)(53546011)(8676002)(66946007)(6916009)(8936002)(31686004)(45980500001)(43740500002); DIR:OUT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SFVSVlRFbFFLVFZtYmhZdFJXU21B?= =?utf-8?B?UUhuK0lMZVUwcEVtWkx4VERMM1VBbVdkSDNKT3h4RFdpU2k3MHRCZXBvVGxD?= =?utf-8?B?UzlPcnFzdXRVQkRvWGV2aUNLc2NNRVFoNC84d0dwaDRsSkRUcVo2dDhCMUVQ?= =?utf-8?B?aEpDWmNhTGFPczRwbGswclJhSHN3eTcrUFJzWnFTYzBZQ0VhQkhFeEpiS1ln?= =?utf-8?B?enh4cjVvUUhIQzVJSkhGeU9UUHB4WERTaFlUMXFxK2pkVm9ya05HMkI0REp5?= =?utf-8?B?U2VnbkR5bHhPcXFNdVpvd0tzVnh1dFgzb05KRFlwQksvTzhEWkdVek1pR1cy?= =?utf-8?B?TFl3UzM0SHd2SUxpZFJUSVVlREhVL1RYYTd0YklxUzEzWDhkYXRpUVRDTHla?= =?utf-8?B?T2dERE5walBBQm9ZOTB3M3poWUpFNmNySVBIRVFsVDFlNjZ0aEFaWTIzQnBo?= =?utf-8?B?M3Q1MjZKeDlxWHdaVUtiSm9UNE0xZ21Bb09odjd1RDVWVWNSYjlOTXk1UHd6?= =?utf-8?Q?OdYOHm5qCxyqX50U+b0z3V3r6iKCHnuGi8KkB/fPiM=3D?= X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 9870d4d5-67ab-43a0-f508-08d9a4590749 X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 14:47:33.2696 (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: UDUB9kUerispkGRG352ou4ii1GJE3aRQ9vmyCj524M7rDUw84UtZ17s6YGZl+jQ651TuL3HVCcIKfh9eIWvNTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR04MB3842 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Ken Brown via Cygwin Reply-To: Ken Brown Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Cygwin" On 11/9/2021 9:53 PM, Ken Brown via Cygwin wrote: > Back to the drawing board. It finally occurred to me to stop looking for a bug in fhandler_pipe::raw_read and instead see if something is in fact repeatedly writing to the pipe, so that drain_signal_event_pipe never finishes. Putting a breakpoint at fhandler_pipe::raw_write, I found that this is in fact the case. While the main thread is repeatedly reading from the pipe, a second thread is repeatedly writing to it. Here's the backtrace of that thread: #0 fhandler_pipe_fifo::raw_write (this=0x18039f370, ptr=0x2c4ca3b, len=1) at ../../../../temp/winsup/cygwin/fhandler_pipe.cc:430 #1 0x000000018006f39a in fhandler_base::write (this=0x18039f370, ptr=0x2c4ca3b, len=1) at ../../../../temp/winsup/cygwin/fhandler.cc:907 #2 0x0000000180158fd1 in write (fd=4, ptr=0x2c4ca3b, len=1) at ../../../../temp/winsup/cygwin/syscalls.cc:1360 #3 0x00000001801b9b5b in _sigfe () at sigfe.s:35 #4 0x00000001006ae471 in retry_write_1 (fildes=4, buf=0x2c4ca3b, nbyte=1, allow_quit=0) at sysdep.c:2364 #5 0x00000001006ae581 in retry_write (fildes=4, buf=0x2c4ca3b, nbyte=1) at sysdep.c:2386 #6 0x00000001004b3ba5 in signal_fake_event () at event-unixoid.c:149 #7 0x0000000100691060 in alarm_signal (signo=14) at signal.c:559 #8 0x00000001006ec6e4 in mswindows_raise (nsig=14) at win32.c:694 #9 0x00000001006ec72d in setitimer_helper_proc (unused_uID=96, unused_uMsg=0, dwUser=14, unused_dw1=0, unused_dw2=0) at win32.c:742 #10 0x00007ffb363c2811 in WINMM!PlaySoundW () from /c/WINDOWS/SYSTEM32/WINMM.dll #11 0x000000018004771c in _cygtls::call2 (this=0x2c4ce00, func=0x7ffb363c26c0 , arg=0x0, buf=0x2c4cce0) at ../../../../temp/winsup/cygwin/cygtls.cc:40 #12 0x00000001800476c1 in _cygtls::call ( func=0x7ffb363c26c0 , arg=0x0) at ../../../../temp/winsup/cygwin/cygtls.cc:27 #13 0x00000001800e4f15 in threadfunc_fe (arg=0x0) at ../../../../temp/winsup/cygwin/init.cc:28 #14 0x00007ffb43da7034 in KERNEL32!BaseThreadInitThunk () from /c/WINDOWS/System32/KERNEL32.DLL #15 0x00007ffb448c2651 in ntdll!RtlUserThreadStart () from /c/WINDOWS/SYSTEM32/ntdll.dll #16 0x0000000000000000 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) This looks to me like an XEmacs bug that happens to be triggered by the new pipe code, although maybe there's also a Cygwin bug that I'm not seeing. The comment at the beginning of signal_fake_event might be relevant: void signal_fake_event (void) { Rawbyte rbyte = 0; /* We do the write always. Formerly I tried to "optimize" this by setting a flag indicating whether we're blocking and only doing the write in that case, but there is a race condition if the signal occurs after we've checked for the signal occurrence (which could occur in many places throughout an iteration of the command loop, e.g. in status_notify()), but before we set the blocking flag. This should be OK as long as write() is reentrant, which I'm fairly sure it is since it's a system call. */ if (signal_event_pipe_initialized) /* In case a signal comes through while we're dumping */ { int old_errno = errno; retry_write (signal_event_pipe[1], &rbyte, 1); errno = old_errno; } } 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