www.delorie.com/archives/browse.cgi | search |
DMARC-Filter: | OpenDMARC Filter v1.4.2 delorie.com 54SCvbd34132529 |
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 54SCvbd34132529 |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
DMARC-Filter: | OpenDMARC Filter v1.4.2 sourceware.org 7E76B3857723 |
ARC-Filter: | OpenARC Filter v1.0.0 sourceware.org 7E76B3857723 |
ARC-Seal: | i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1748437033; cv=none; |
b=MTu1nRI8Wb6g90gxC3I4hUSkxw6eV15TyrnlJHDA9O4iWSbVOsBhXLg8tVnyQN+RmkWr6a+cuJ8c/DCLlgiEkwL//OnWYufLKPAdgXgXfOz23T9YdMrFtTthLxuFfGC8LQqueCjLeDxhGe3dNfO4rwLLtlcxO4Nl7fHUh0phnkM= | |
ARC-Message-Signature: | i=1; a=rsa-sha256; d=sourceware.org; s=key; |
t=1748437033; c=relaxed/simple; | |
bh=Ziyo2/L6/wnC9cWNA3Ad5oXc+KVVQs9SFbxXGf26usw=; | |
h=Date:From:To:Subject:Message-Id:Mime-Version:DKIM-Signature; | |
b=vuuS9yyE7uDnTIC0iUIcCuKLMifIpshyL88nzh/O573bKW8oFWqL41KutMjequAYwBpq/I86a470inHmzMR5+TtxvrWxiuk0gkwG3MAObbHvT/T/hAwdIRe3TC9usLvCNHfO7t56vuvHaGKQyxVapQzs9VT4OTQ+/2l9uoAxQt4= | |
ARC-Authentication-Results: | i=1; server2.sourceware.org |
Date: | Wed, 28 May 2025 21:57:07 +0900 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Crash or hang if SIGSEGV+SIGALRM are nested |
Message-Id: | <20250528215707.ddb72fb28122c3ed07da8c5b@nifty.ne.jp> |
In-Reply-To: | <c4335d1d-5394-2a41-f06b-feb5c9fb1398@t-online.de> |
References: | <c4335d1d-5394-2a41-f06b-feb5c9fb1398 AT t-online DOT de> |
X-Mailer: | Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) |
Mime-Version: | 1.0 |
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: | Takashi Yano via Cygwin <cygwin AT cygwin DOT com> |
Reply-To: | Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp> |
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 54SCvbd34132529 |
Hi Christian, On Mon, 19 May 2025 12:55:46 +0200 Christian Franke wrote: > The attached testcase was originally intended to investigate why a > SIGSEGV from non-signal code could interrupt an already running signal > handler. > https://sourceware.org/pipermail/cygwin-patches/2025q2/013703.html > > If run without strace, the testcase may crash silently (with exit status 0): > > $ uname -r > 3.7.0-0.98.gb39b510c1ce6.x86_64 > > $ gcc -o sigsegvalrm sigsegvalrm.c > > $ while { ./sigsegvalrm; s=$?; echo exit $s; test $s = 42; }; do :; done > ... > [SEGV during ALRM] > [SEGV] > [ALRM during SEGV] > [ALRM] > 101 total, 24 ALRM during SEGV, 13 SEGV during ALRM > exit 42 > ... > [SEGV during ALRM] > [ALRM] > [SEGV] > [ALRM] > [SEGV] > [ALRM during SEGV] > [SEGV] > [ALRM] > [SEGV] > exit 0 > > > If the above was run with 'strace ./sigsegvalrm', the result was an > infinte loop: > https://cygwin.com/pipermail/cygwin/2025-May/258144.html > > Fortunately this is fixed since b39b510c. A new result: > > ... > [SEGV during ALRM] > Â 205Â 556472 [main] sigsegvalrm 1342 fhandler_console::write: 19 = > fhandler_console::write(...) > Â Â 91Â 556563 [main] sigsegvalrm 1342 write: 19 = write(1, 0x100403020, 19) > Â Â 81Â 556644 [main] sigsegvalrm 1342 clock_nanosleep: clock_nanosleep > (0.001000000) > Â 8396Â 565040 [itimer] sigsegvalrm 1342 timer_tracker::thread_func: > 0x7FFE4CC69640 timer expired > Â 230Â 565270 [main] sigsegvalrm 1342 clock_nanosleep: 0 = > clock_nanosleep(1, 0, 0.001000000, 0.d) > Â 123Â 565393 [itimer] sigsegvalrm 1342 timer_tracker::thread_func: > 0x7FFE4CC69640 sending signal 14 > Â 230Â 565623 [main] sigsegvalrm 1342 set_signal_mask: setmask 2400, > newmask 0, mask_bits 2400 > Â 147Â 565770 [main] sigsegvalrm 1342 pthread_sigmask: 0 = > pthread_sigmask(0, 0x100407128, 0x0) > Â 220Â 565990 [itimer] sigsegvalrm 1342 sig_send: sendsig 0x158, pid > 1342, signal 14, its_me 1 > Â 278Â 566268 [main] sigsegvalrm 1342 pthread_sigmask: 0 = > pthread_sigmask(0, 0x0, 0x100407128) > --- Process 148 (pid: 1342), exception c0000005 at 0000000100401287 > Â 1579Â 567847 [sig] sigsegvalrm 1342 sigpacket::process: signal 14 > processing > Â 189Â 568036 [sig] sigsegvalrm 1342 init_cygheap::find_tls: sig 14 > Â 235Â 568271 [sig] sigsegvalrm 1342 sigpacket::process: using tls > 0x7FFFFCE00 > Â 195Â 568466 [main] sigsegvalrm 1342 exception::handle: In > cygwin_except_handler exception 0xC0000005 at 0x100401287 sp 0x7FFFFCBE0 > Â 131Â 568597 [sig] sigsegvalrm 1342 sigpacket::process: signal 14, > signal handler 0x100401080 > Â Â 82Â 568679 [main] sigsegvalrm 1342 exception::handle: In > cygwin_except_handler signal 11 at 0x100401287 > Â Â 79Â 568758 [sig] sigsegvalrm 1342 sigpacket::setup_handler: > suspending thread, tls 0x7FFFFCE00, _main_tls 0x7FFFFCE00 > [~30s delay] > --- Process 148 (pid: 1342) thread 14964 created > --- Process 148 (pid: 1342) thread 14048 created > [~30s delay] > --- Process 148 (pid: 1342) thread 5184 exited with status 0x0 > --- Process 148 (pid: 1342) thread 5056 exited with status 0x0 > [several minutes delay] > --- Process 148 (pid: 1342) thread 9388 created > > The process then ignores SIGKILL. Thanks for reporting this. I finally found the solution. Please test https://cygwin.com/pipermail/cygwin-patches/2025q2/013731.html https://cygwin.com/pipermail/cygwin-patches/2025q2/013732.html -- Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp> -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |