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 11:33:27 -0400 Message-ID: <87pmz4rdtk.fsf@md5i.com> References: <87im5ofp3z.fsf@md5i.com> <58c0bfca-02e6-760f-dcff-05fdc4cca135@gmx.at> <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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34480"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "schwab@linux-m68k.org" , "47244@debbugs.gnu.org" <47244@debbugs.gnu.org>, Michael Welsh Duggan To: Michael Welsh Duggan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 08 17:34:26 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 1lUWfp-0008sJ-Vn for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Apr 2021 17:34:25 +0200 Original-Received: from localhost ([::1]:56714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUWfn-0002KH-IM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Apr 2021 11:34:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUWfT-0002Ho-2I for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2021 11:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36465) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lUWfS-0008FM-P7 for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2021 11:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lUWfS-00005G-Cl for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2021 11:34: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 15:34: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.161789602032754 (code B ref 47244); Thu, 08 Apr 2021 15:34:02 +0000 Original-Received: (at 47244) by debbugs.gnu.org; 8 Apr 2021 15:33:40 +0000 Original-Received: from localhost ([127.0.0.1]:48011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUWf6-0008WC-Cw for submit@debbugs.gnu.org; Thu, 08 Apr 2021 11:33:40 -0400 Original-Received: from md5i.com ([75.151.244.229]:59350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUWf1-0008Vx-NU for 47244@debbugs.gnu.org; Thu, 08 Apr 2021 11:33:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=md5i.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Z/alllpSfs+aLJ/MH8PcT/yj4YW8ALv2lgnqzskZvSM=; b=t8tv3qj5bM0O5St6PROhJfQD8q hfL2VNAgM4wnE+Leg99ptslpKNbm2Tbmm5zCGATy2gYQMRLirqYJt+BKL1eA20TS5cfdpcKnBdPoY Y2vCQ4/0m4SVNqGR0qPVBB2s5; Original-Received: from abode.md5i.com ([192.168.177.1] helo=miko) by md5i.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lUWeu-004BhI-JO; Thu, 08 Apr 2021 11:33:28 -0400 In-Reply-To: <871rbkn6op.fsf@md5i.com> (Michael Welsh Duggan's message of "Thu, 08 Apr 2021 11:21:10 -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:203733 Archived-At: Michael Welsh Duggan writes: > Michael Welsh Duggan writes: > >> martin rudalics writes: >> >>> > FWIW, I've been trying to do the same and have been similarly >>> > unsuccessful. >>> >>> I attach a version where I make a shadow copy of Vwindow_list called >>> Vwindow_list_2. The two should behave the same just that Vwindow_list_2 >>> is never accessed by other code. So we can put an assertion like >>> >>> eassert (!NILP (Fequal (Vwindow_list, Vwindow_list_2))); >>> >>> anywhere in the code. I put one in window_list and it should trigger >>> the same way as the length check before. >>> >>> Now if anyone can suggest some strategic positions where to put these >>> assertions, I'll be all ears. >> >> I've yet to run this code yet (will do so shortly), but I'd like to >> mention that some other debugging I've been doing involving tricky >> breakpoint commands is implying that, somehow, list_windows() is getting >> called while list_windows() is still running. I've got a breakpoint >> at the beginning of the if clause in window_list() and one at the end, >> and it looks like I'm seeing the first one get called twice without the >> second getting called inbetween. > > Okay, close, but not quite. What seems to be happening is this: > list_windows() is called while Vwindow_list is nil, and the if branch is > taken. Something causes list_windows() to exit without reaching the end > of the if block. This leaves Vwindow_list partially created. The next > time list_windows() is called it returns the partially created list. > > To determine this I put a breakpoint at the beginning of the if block > that sets a gdb convenience variable called $in_list_windows to one and > continues. I put a breakpoint at the end of that block that sets it to > zero and continues. I put a third condition breakpoint at the entrance > to list_windows() that only triggers if $in_list_windows is one. This > triggered with the included backtrace. > > 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? For the backtrace of that run, please note that I was using my own modified version of list_windows(), not Martin's latest one. I'm now running with Martin's version for the next trigger. -- Michael Welsh Duggan (md5i@md5i.com)