Subject: bug#47244: 28.0.50; SIGSEGV in long-runnning Emacs

From: Michael Welsh Duggan <[email-masked]>
Date: Wed, 07 Apr 2021 11:29:49 -0400

martin rudalics <[email-masked]> writes:

>  > I can run with this, but I am uncertain how I should be using it.  What
>  > should I be trapping on and looking at?  I'm guessing the same process
>  > as I used before, but we get another variable we can look at in the
>  > process?
>
> Occasionally, with your two visible frames setup for Gnus look at its
> value.  So far we only know that it can eventually become 2 and by
> explicitly setting Vframe_list to nil and triggering a window_list call
> it gets set to 6.  I'd like to know whether it can become 2 earlier
> and/or we can detect some sort of pattern how it gets set to that value.

Don't know where to go from here, but I have a breakpoint set on

      replace_buffer_in_windows_safely_count = 0;

conditioned on count != 0.

I've hit that, and here's some info.  Don't know where to go from here,
but I'm happy to give more info if requested.

Thread 3.1 "emacs" hit Breakpoint 5, replace_buffer_in_windows_safely (
    buffer=XIL(0x555556c75c9d)) at ../../master/src/window.c:3477
3477          replace_buffer_in_windows_safely_count = 0;
(gdb) p Vwindow_list
$1 = XIL(0x555557f034d3)
(gdb) p list_length(Vwindow_list)
$2 = 2
(gdb) p Vwindow_list 
$3 = XIL(0x555557f034d3)
(gdb) xlist
$4 = 0x55555791df75
Lisp_Vectorlike
PVEC_WINDOW
$5 = (struct window *) 0x55555791df70
100x57+0+0
---
$6 = 0x5555577f28a5
Lisp_Vectorlike
PVEC_WINDOW
$7 = (struct window *) 0x5555577f28a0
100x1+0+57
---
nil
(gdb) p $5->contents 
$8 = XIL(0x5555579dc345)
(gdb) xbuffer
$9 = (struct buffer *) 0x5555579dc340
0x555557e69358 "build.py"
(gdb) p $7->contents 
$10 = XIL(0x7ffff2a3cb25)
(gdb) xbuffer
$11 = (struct buffer *) 0x7ffff2a3cb20
0x7ffff2d244ea " *Minibuf-0*"
(gdb) p window_list_lengths
$12 = XIL(0x5555575cd343)
(gdb) xlist
$13 = 0x1a
Lisp_Int0
$14 = 6
---
$15 = 0x1e
Lisp_Int1
$16 = 7
---
$17 = 0x1a
Lisp_Int0
$18 = 6
---
$19 = 0x1e
Lisp_Int1
$20 = 7
---
$21 = 0x1a
Lisp_Int0
$22 = 6
---
$23 = 0x1e
Lisp_Int1
$24 = 7
---
$25 = 0x1a
Lisp_Int0
$26 = 6
---
$27 = 0x1e
Lisp_Int1
$28 = 7
---
$29 = 0x1a
Lisp_Int0
$30 = 6
---
$31 = 0x22
Lisp_Int0
$32 = 8
---
...
$33 = 93825046649712
(gdb) p Vframe_list
$34 = XIL(0x5555582da543)
(gdb) xlist
$35 = 0x555558285545
Lisp_Vectorlike
PVEC_FRAME
$36 = (struct frame *) 0x555558285540
"build.py"
---
$37 = 0x555556fc830d
Lisp_Vectorlike
PVEC_FRAME
$38 = (struct frame *) 0x555556fc8308
"*Server*"
---
$39 = 0x555555eff9dd
Lisp_Vectorlike
PVEC_FRAME
$40 = (struct frame *) 0x555555eff9d8
"F1"
---
nil

-- 
Michael Welsh Duggan
([email-masked])