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

From: Michael Welsh Duggan <[email-masked]>
Date: Wed, 31 Mar 2021 09:53:56 -0400

And, trapped!  Backtrace is included.  Maybe unfortunately, it isn't one
of the new easserts, but at least we now have a different backtrace.
Hopefully that will lead to new insights.  I will note that, in this
instance, the reproducer did not follow the same formula, as you can see
in the Lisp backtrace.

#0  raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
        set = {
          __val = {402653184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 268435456, 0, 0, 93824994300624, 18446744067266838271}
        }
        pid = <optimized out>
        tid = <optimized out>
#1  0x00005555557197a1 in terminate_due_to_signal
    (sig=6, backtrace_limit=2147483647) at ../../master/src/emacs.c:416
#2  0x00005555557c4858 in die
    (msg=0x55555594f2a0 "b->window_count == 0", file=0x55555594da8a "../../master/src/buffer.c", line=1969) at ../../master/src/alloc.c:7420
#3  0x0000555555759190 in Fkill_buffer (buffer_or_name=XIL(0x555557888814))
    at ../../master/src/buffer.c:1969
        buffer = XIL(0x555557889325)
        b = 0x555557889320
        tem = XIL(0)
        m = 0x0
#4  0x00005555557fd881 in funcall_subr
    (subr=0x555555dd8ce0 <Skill_buffer>, numargs=1, args=0x7fffffffcbf0)
    at ../../master/src/eval.c:2987
        internal_argbuf = 
          {XIL(0x7fffffffcb10), XIL(0x1000000000), XIL(0x555555dd8ce0), XIL(0x7fffffffcb18), XIL(0x5555557f44c4), XIL(0x10557f3f8b), XIL(0x555555dd8ce5), XIL(0x7fffffffcb30)}
        internal_args = 0x7fffffffcbf0
#5  0x00005555557fd349 in Ffuncall (nargs=2, args=0x7fffffffcbe8)
    at ../../master/src/eval.c:2914
        fun = XIL(0x555555dd8ce5)
        original_fun = XIL(0x2aaa9c7157e0)
        funcar = XIL(0x555557d5a980)
        numargs = 1
        val = XIL(0x7fffffffcbb0)
        count = 12
#6  0x0000555555856a0c in exec_byte_code
    (bytestr=XIL(0x5555575d6464), vector=XIL(0x5555575d5985), maxdepth=make_fixnum(9), args_template=make_fixnum(256), nargs=0, args=0x7fffffffd390)
    at ../../master/src/bytecode.c:632
        op = 1
        type = (CONDITION_CASE | CATCHER_ALL | unknown: 0x55855e08)
        targets = 
        const_length = 42
        bytestr_length = 271
        vectorp = 0x5555575d5988
        quitcounter = 1 '\001'
        stack_items = 10
        sa_avail = 16033
        sa_count = 10
        alloc = 0x7fffffffcbc0
        stack_base = 0x7fffffffcbc0
        top = 0x7fffffffcbe8
        stack_lim = 0x7fffffffcc10
        bytestr_data = 0x7fffffffcc10 "\bƉ\031\032\307\001!\002\204\034"
        pc = 0x7fffffffcc7c "\210\325 \210\210\016%\211\211\205\204"
        count = 10
        result = XIL(0x30)
#7  0x00005555557fdb34 in fetch_and_exec_byte_code (fun=XIL(0x5555575d5af5), syms_left=make_fixnum(256), nargs=0, args=0x7fffffffd390) at ../../master/src/eval.c:3036
#8  0x00005555557fdfba in funcall_lambda (fun=XIL(0x5555575d5af5), nargs=0, arg_vector=0x7fffffffd390) at ../../master/src/eval.c:3117
        val = XIL(0x7fffffffd140)
        syms_left = make_fixnum(256)
        next = XIL(0x555555e62060)
        lexenv = XIL(0x1800000000)
        count = 10
        i = 93824994985156
        optional = false
        rest = false
#9  0x00005555557fd38d in Ffuncall (nargs=1, args=0x7fffffffd388) at ../../master/src/eval.c:2916
        fun = XIL(0x5555575d5af5)
        original_fun = XIL(0x17286d0)
        funcar = XIL(0xffffd1e0)
        numargs = 0
        val = XIL(0)
        count = 9
#10 0x00005555557f1481 in Ffuncall_interactively (nargs=1, args=0x7fffffffd388) at ../../master/src/callint.c:260
        speccount = 8
#11 0x00005555557fd772 in funcall_subr (subr=0x555555ddeca0 <Sfuncall_interactively>, numargs=1, args=0x7fffffffd388) at ../../master/src/eval.c:2967
#12 0x00005555557fd349 in Ffuncall (nargs=2, args=0x7fffffffd380) at ../../master/src/eval.c:2914
        fun = XIL(0x555555ddeca5)
        original_fun = XIL(0x70b0)
        funcar = XIL(0x7fffffffd2b0)
        numargs = 1
        val = XIL(0)
        count = 7
#13 0x00005555557fc032 in Fapply (nargs=3, args=0x7fffffffd380) at ../../master/src/eval.c:2497
        i = 2582717749968
        funcall_nargs = 0
        funcall_args = 0x0
        spread_arg = XIL(0)
        fun = XIL(0x70b0)
        sa_avail = 16384
        sa_count = 7
        numargs = 0
        retval = XIL(0x5555557f01c1)
#14 0x00005555557f18f6 in Fcall_interactively (function=XIL(0x17286d0), record_flag=XIL(0), keys=XIL(0x5555579ee805)) at ../../master/src/callint.c:353
        funval = XIL(0x5555575d5af5)
        events = 794
        input = XIL(0)
        speccount = 6
        arg_from_tty = false
        key_count = 1
        record_then_fail = false
        save_this_command = XIL(0x17286d0)
        save_this_original_command = XIL(0x17286d0)
        save_real_this_command = XIL(0x17286d0)
        save_last_command = XIL(0)
        prefix_arg = XIL(0)
        enable = XIL(0)
        up_event = XIL(0)
        form = XIL(0x555557520b53)
        specs = XIL(0)
        sa_avail = 93825001726048
        sa_count = 0
        string_len = 93824993913168
        string = 0x5555575d5af5 ""
        string_end = 0x7fffffffd4e0 ""
        next_event = 93824994845205
        nargs = 0
        args = 0x0
        visargs = 0x0
        varies = 0x555555e62060 <lispsym> "\230\001"
        tem = 0x7fffffffd570 "\365Z]WUU"
        val = XIL(0)
#15 0x00005555557fd8db in funcall_subr (subr=0x555555ddece0 <Scall_interactively>, numargs=3, args=0x7fffffffd720) at ../../master/src/eval.c:2992
        internal_argbuf = {XIL(0x7fffffffd630), XIL(0x1000000000), XIL(0x555555ddece0), XIL(0x7fffffffd638), XIL(0x5555557f44c4), XIL(0x10557f3f8b), XIL(0x555555ddece5), XIL(0x7fffffffd650)}
        internal_args = 0x7fffffffd720
#16 0x00005555557fd349 in Ffuncall (nargs=4, args=0x7fffffffd718) at ../../master/src/eval.c:2914
        fun = XIL(0x555555ddece5)
        original_fun = XIL(0x2aaa9c71a1f0)
        funcar = XIL(0x7fffffffd6b0)
        numargs = 3
        val = XIL(0x7fffffffd6d0)
        count = 5
#17 0x0000555555856a0c in exec_byte_code (bytestr=XIL(0x7ffff26110fc), vector=XIL(0x7ffff2610d65), maxdepth=make_fixnum(13), args_template=make_fixnum(1025), nargs=1, args=0x7fffffffdc90) at ../../master/src/bytecode.c:632
        op = 3
        type = CATCHER
        const_length = 24
        bytestr_length = 138
        vectorp = 0x7ffff2610d68
        quitcounter = 1 '\001'
        stack_items = 14
        sa_avail = 16134
        sa_count = 5
        alloc = 0x7fffffffd6e0
        stack_base = 0x7fffffffd6e0
        top = 0x7fffffffd718
        stack_lim = 0x7fffffffd750
        bytestr_data = 0x7fffffffd750 "\304\020\211?\205\023"
        pc = 0x7fffffffd7b2 "\006\006\071\203\211"
        count = 5
        result = XIL(0x30)
#18 0x00005555557fdb34 in fetch_and_exec_byte_code (fun=XIL(0x7ffff2610d35), syms_left=make_fixnum(1025), nargs=1, args=0x7fffffffdc88) at ../../master/src/eval.c:3036
#19 0x00005555557fdfba in funcall_lambda (fun=XIL(0x7ffff2610d35), nargs=1, arg_vector=0x7fffffffdc88) at ../../master/src/eval.c:3117
        val = XIL(0x7fffffffdc00)
        syms_left = make_fixnum(1025)
        next = XIL(0x555555e62060)
        lexenv = XIL(0x1800000000)
        count = 5
        i = 93824994985156
        optional = false
        rest = false
#20 0x00005555557fd38d in Ffuncall (nargs=2, args=0x7fffffffdc80) at ../../master/src/eval.c:2916
        fun = XIL(0x7ffff2610d35)
        original_fun = XIL(0x4470)
        funcar = XIL(0)
        numargs = 1
        val = XIL(0x7fffffffdca8)
        count = 4
#21 0x00005555557fcb57 in call1 (fn=XIL(0x4470), arg1=XIL(0x17286d0)) at ../../master/src/eval.c:2774
#22 0x000055555572150e in command_loop_1 () at ../../master/src/keyboard.c:1466
        scount = 3
        cmd = XIL(0x17286d0)
        keybuf = {make_fixnum(81), XIL(0x7ffff2c1d0d5), XIL(0), XIL(0), XIL(0x7fffffffdd70), XIL(0x5555557fcbe1), XIL(0), XIL(0x7ffff25734c4), XIL(0x5555586b9583), XIL(0), XIL(0x555555e62060), XIL(0), XIL(0x7fffffffdd50), make_fixnum(23456248526024), XIL(0), XIL(0), XIL(0x555555e62060), XIL(0), XIL(0x7fffffffdd80), XIL(0x5555557f3f8b), XIL(0), XIL(0x555555e62060), XIL(0), XIL(0), XIL(0x7fffffffdda0), XIL(0x5555557f3fdf), make_fixnum(2), make_fixnum(0), XIL(0x7fffffffdde0), XIL(0x5555557f9645)}
        i = 1
        prev_modiff = 262
        prev_buffer = 0x555557376798
        already_adjusted = false
#23 0x00005555557f9105 in internal_condition_case (bfun=0x555555720cb8 <command_loop_1>, handlers=XIL(0x90), hfun=0x5555557202db <cmd_error>) at ../../master/src/eval.c:1439
        val = XIL(0x5555560c2983)
        c = 0x555555f5d3e0
#24 0x00005555557208a8 in command_loop_2 (ignore=XIL(0)) at ../../master/src/keyboard.c:1094
        val = make_fixnum(0)
#25 0x00005555557f8515 in internal_catch (tag=XIL(0xd9e0), func=0x55555572087b <command_loop_2>, arg=XIL(0)) at ../../master/src/eval.c:1189
        val = XIL(0xd9e0)
        c = 0x555555f46710
#26 0x0000555555720847 in command_loop () at ../../master/src/keyboard.c:1073
#27 0x000055555571fdc4 in recursive_edit_1 () at ../../master/src/keyboard.c:720
        count = 1
        val = XIL(0x7fffffffdf50)
#28 0x000055555571ffbb in Frecursive_edit () at ../../master/src/keyboard.c:789
        count = 0
        buffer = XIL(0)
#29 0x000055555571bea0 in main (argc=2, argv=0x7fffffffe1b8) at ../../master/src/emacs.c:2050
        stack_bottom_variable = 0x7ffff617e053
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x0
        original_pwd = 0x0
        dump_mode = 0x0
        skip_args = 1
        temacs = 0x0
        attempt_load_pdump = true
        rlim = {
          rlim_cur = 10022912,
          rlim_max = 18446744073709551615
        }
        lc_all = 0x0
        sockfd = -1
        module_assertions = false

Lisp Backtrace:
"kill-buffer" (0xffffcbf0)
"gnus-summary-exit-no-update" (0xffffd390)
"funcall-interactively" (0xffffd388)
"call-interactively" (0xffffd720)
"command-execute" (0xffffdc88)

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