From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.bugs Subject: bug#47244: 28.0.50; SIGSEGV in long-runnning Emacs Date: Thu, 08 Apr 2021 13:11:34 -0400 Message-ID: References: <87im5ofp3z.fsf@md5i.com> <870479cc-efd3-3a19-98a3-1d7a8b9346e8@gmx.at> <79cfe67d-3a2c-952d-7c51-20e8a4859380@gmx.at> <87czv6q1f8.fsf@md5i.com> <233daa4b-ca64-955f-2612-49a0503b1938@gmx.at> <8735w2p8oc.fsf@md5i.com> <5181da75-e80d-22e0-bdcb-a0ffdc1bac6a@gmx.at> <5c4e5857-6a76-b8e8-204b-b4a855e95a16@gmx.at> <8f4516d5-1080-71bb-7da7-acf7832d5529@gmx.at> <87r1jlvnrc.fsf@md5i.com> <871rbkn6op.fsf@md5i.com> <83pmz493ag.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19950"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Michael Welsh Duggan , "schwab@linux-m68k.org" , "47244@debbugs.gnu.org" <47244@debbugs.gnu.org> To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 08 19:13:37 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUYDk-00053k-7L for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Apr 2021 19:13:37 +0200 Original-Received: from localhost ([::1]:48130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUYDj-00016k-7z for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Apr 2021 13:13:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUYCI-0000K2-Rj for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2021 13:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36570) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lUYCI-0007DT-JF for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2021 13:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lUYCI-0002Zy-Cv for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2021 13:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Welsh Duggan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Apr 2021 17:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47244 X-GNU-PR-Package: emacs Original-Received: via spool by 47244-submit@debbugs.gnu.org id=B47244.16179019069887 (code B ref 47244); Thu, 08 Apr 2021 17:12:02 +0000 Original-Received: (at 47244) by debbugs.gnu.org; 8 Apr 2021 17:11:46 +0000 Original-Received: from localhost ([127.0.0.1]:48116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUYC1-0002ZP-V9 for submit@debbugs.gnu.org; Thu, 08 Apr 2021 13:11:46 -0400 Original-Received: from taper.sei.cmu.edu ([147.72.252.16]:36026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUYBy-0002Z9-Hr for 47244@debbugs.gnu.org; Thu, 08 Apr 2021 13:11:45 -0400 Original-Received: from korb.sei.cmu.edu (korb.sei.cmu.edu [10.64.21.30]) by taper.sei.cmu.edu (8.14.7/8.14.7) with ESMTP id 138HBZRk003345; Thu, 8 Apr 2021 13:11:35 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 taper.sei.cmu.edu 138HBZRk003345 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cert.org; s=yc2bmwvrj62m; t=1617901895; bh=rEPAZ2d4n6IeGNxn0LDoOrH8SBZgcfP5PY55ybfMAnk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=TUPqhVU7JMJ84X5QaijWqY7GMBQHM+Oe8PqsjaR9yE23twmp2PZy3cgLTyws5H4P9 TiHyv7QfEw6QOtJuVQF/Yjc0oKUamcVxawrfVsw6oGasVMwLlyf19Ib97I7UQ977RM MLw/geXU2DLrHkNrlpqShmGUVF1OBgzUR51c+u8Q= Original-Received: from lx-birch.ad.sei.cmu.edu (lx-birch.ad.sei.cmu.edu [10.64.53.120]) by korb.sei.cmu.edu (8.14.7/8.14.7) with ESMTP id 138HBYkB012257; Thu, 8 Apr 2021 13:11:34 -0400 Original-Received: from lx-birch.ad.sei.cmu.edu (localhost [127.0.0.1]) by lx-birch.ad.sei.cmu.edu (8.14.7/8.14.7) with ESMTP id 138HBYYm014475; Thu, 8 Apr 2021 13:11:34 -0400 Original-Received: (from mwd@localhost) by lx-birch.ad.sei.cmu.edu (8.14.7/8.14.7) id 138HBYMN014472; Thu, 8 Apr 2021 13:11:34 -0400 X-Authentication-Warning: lx-birch.ad.sei.cmu.edu: mwd set sender to mwd@cert.org using -f In-Reply-To: <83pmz493ag.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 8 Apr 2021 11:58:15 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203746 Archived-At: Eli Zaretskii writes: >> Lisp Backtrace: >> "window-list-1" (0xffffbfa0) >> "replace-buffer-in-windows" (0xffffc4a8) >> "kill-buffer" (0xffffc710) >> 0x571d80f8 PVEC_COMPILED >> "substitute-command-keys" (0xffffd3d8) >> "command-error-default-function" (0xffffd628) >> "apply" (0xffffd7e8) >> 0xf2c1d0e8 PVEC_COMPILED > > This seems to indicate that kill-buffer is called by > substitute-command-keys, in which case the buffer in question is a > temporary buffer. Can you verify that by looking at the buffer's name > in frame #13: > >> #13 0x0000555555758e6d in Fkill_buffer >> (buffer_or_name=XIL(0x5555571d7ced)) at >> ../../master/src/buffer.c:1830 >> buffer = XIL(0x5555571d7ced) >> b = 0x5555571d7ce8 >> tem = XIL(0x555555753673) >> m = 0x7fffffffc5f0 As expected, it is " *temp*". This time I've kept the session around. >> Once again, the state triggered when, due to the VPN state changing, a >> background gnus demon hung trying to fetch mail. The trigger was me >> hitting C-g twice rapidly in succession to regain interactivity. >> >> Can anyone recommend a means to check if this my theory is true? Does >> list_windows() need to be protected against quit? > > Set a breakpoint in 'quit' and disable it. Set another breakpoint at > entry to 'window_list' that enables the breakpoint in 'quit', then > another breakpoint at exit which disables the breakpoint in 'quit'. > Then wait for the breakpoint in 'quit' to break during your recipe. > > Perhaps also do the same with a breakpoint in Fthrow. I hit the breakpoint in quit. It looks like Fnconc uses FOR_EACH_TAIL, which uses FOR_EACH_TAIL_INTENAL, which calls maybe_quit. The question in my mind now is whether block/unblock_input belongs in window_list or in Fnconc. Thread 4.1 "emacs" hit Breakpoint 8, quit () at ../../master/src/eval.c:1660 1660 return signal_or_quit (Qquit, Qnil, true); (gdb) bt #0 quit () at ../../master/src/eval.c:1660 #1 0x00005555557f9a27 in process_quit_flag () at ../../master/src/eval.c:1607 #2 0x00005555557f9a6a in maybe_quit () at ../../master/src/eval.c:1627 #3 0x000055555580eb65 in Fnconc (nargs=2, args=0x7fffffffb910) at ../../master/src/fns.c:2783 #4 0x000055555580ea3b in nconc2 (s1=XIL(0x5555573e73a3), s2=XIL(0x5555573e73c3)) at ../../master/src/fns.c:2759 #5 0x000055555564b2db in window_list () at ../../master/src/window.c:2578 #6 0x00005555555eb138 in prepare_menu_bars () at ../../master/src/xdisp.c:12717 #7 0x00005555555f2a3c in redisplay_internal () at ../../master/src/xdisp.c:15668 #8 0x00005555555f48f2 in redisplay_preserve_echo_area (from_where=8) at ../../master/src/xdisp.c:16385 #9 0x00005555557393fa in detect_input_pending_run_timers (do_display=true) at ../../master/src/keyboard.c:10308 #10 0x0000555555869789 in wait_reading_process_output (time_limit=0, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=XIL(0), wait_proc=0x0, just_wait_proc=0) at ../../master/src/process.c:5657 #11 0x0000555555728ed2 in kbd_buffer_get_event (kbp=0x7fffffffd428, used_mouse_menu=0x7fffffffda6f, end_time=0x0) at ../../master/src/keyboard.c:3869 #12 0x0000555555723ba7 in read_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fffffffd800, used_mouse_menu=0x7fffffffda6f) at ../../master/src/keyboard.c:2159 #13 0x0000555555723f25 in read_decoded_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fffffffd800, prev_event=XIL(0), used_mouse_menu=0x7fffffffda6f) at ../../master/src/keyboard.c:2223 #14 0x0000555555725ee8 in read_char (commandflag=1, map=XIL(0x55555730fcb3), prev_event=XIL(0), used_mouse_menu=0x7fffffffda6f, end_time=0x0) at ../../master/src/keyboard.c:2833 #15 0x00005555557375dc in read_key_sequence (keybuf=0x7fffffffdc70, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at ../../master/src/keyboard.c:9491 #16 0x0000555555721412 in command_loop_1 () at ../../master/src/keyboard.c:1353 #17 0x00005555557f9424 in internal_condition_case (bfun=0x555555720f96 , handlers=XIL(0x90), hfun=0x5555557205b9 ) at ../../master/src/eval.c:1439 #18 0x0000555555720b86 in command_loop_2 (ignore=XIL(0)) at ../../master/src/keyboard.c:1094 #19 0x00005555557f8834 in internal_catch (tag=XIL(0xd9e0), func=0x555555720b59 , arg=XIL(0)) at ../../master/src/eval.c:1189 #20 0x0000555555720b25 in command_loop () at ../../master/src/keyboard.c:1073 #21 0x00005555557200a2 in recursive_edit_1 () at ../../master/src/keyboard.c:720 #22 0x0000555555720299 in Frecursive_edit () at ../../master/src/keyboard.c:789 #23 0x000055555571c17e in main (argc=2, argv=0x7fffffffe168) at ../../master/src/emacs.c:2050 Lisp Backtrace: "redisplay_internal (C function)" (0x0) -- Michael Welsh Duggan (mwd@cert.org)