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

From: Michael Welsh Duggan <[email-masked]>
Date: Tue, 23 Mar 2021 10:18:25 -0400

Eli Zaretskii <[email-masked]> writes:

>> From: Michael Welsh Duggan <[email-masked]>
>> Cc: Michael Welsh Duggan <[email-masked]>,
>>         "[email-masked]"
>>  <[email-masked]>,
>>         "[email-masked]" <[email-masked]>
>> Date: Fri, 19 Mar 2021 10:21:18 -0400
>> 
>> Lisp Backtrace:
>> "kill-buffer" (0xfffeca60)
>> 0x56e58d70 PVEC_COMPILED
>> "substitute-command-keys" (0xfffed728)
>> "redisplay_internal (C function)" (0x0)
>
> Thanks.  This case isn't interesting, because this is a temporary
> buffer we don't display.  So I guess we need to augment the breakpoint
> condition:
>
>   break buffer.c:1840 if redisplaying_p != 0 && b->window_count > 0

This triggered today.

#0  0x00005555555e1b6d in redisplay_internal ()
    at ../../master/src/xdisp.c:15789
        w = 0x555557ef0018
        sw = 0x555557ef0018
        fr = 0x555556d8c360
        pending = false
        must_finish = true
        match_p = true
        tlbufpos = {
          charpos = 127,
          bytepos = 127
        }
        tlendpos = {
          charpos = 0,
          bytepos = 0
        }
        number_of_visible_frames = 6
        count = 3
        sf = 0x555556d8c360
        polling_stopped_here = false
        tail = XIL(0)
        frame = XIL(0x555555d61a05)
        hscroll_retries = 0
        garbaged_frame_retries = 0
        consider_all_windows_p = false
        update_miniwindow_p = true
#1  0x00005555555e072a in redisplay () at ../../master/src/xdisp.c:15245
#2  0x00005555556e9a9d in read_char
    (commandflag=1, map=XIL(0x555559e15883), prev_event=XIL(0), used_mouse_menu=0x7fffffffdabf, end_time=0x0) at ../../master/src/keyboard.c:2496
        echo_current = false
        c = XIL(0)
        jmpcount = 93825000034176
        local_getcjmp = {{
            __jmpbuf = {93825000067056, 0, 93825000034176, 0, 0, 140737488345232, 93824994486998, 93825057660325},
            __mask_was_saved = -10032,
            __saved_mask = {
              __val = {93824994503983, 140737259836008, 140737259835960, 0, 46912259801784, 0, 140737259836008, 93825000034176, 0, 0, 140737488345344, 93824993978237, 4066447928, 93825000034176, 0, 0}
            }
          }}
        save_jump = {{
            __jmpbuf = {0, 32880, 0, 140737266328160, 0, 0, 93825057660320, 0},
            __mask_was_saved = 0,
            __saved_mask = {
              __val = {93825000067056, 93824994486998, 0, 140737488345184, 93824994508583, 140737266328160, 12884891664, 0, 32880, 93825057660320, 140737266328160, 93824995129573, 51539607552, 93825057660325, 93825057660320, 93824995130016}
            }
          }}
        tem = XIL(0)
        save = XIL(0x5555556fe77d)
        previous_echo_area_message = XIL(0)
        also_record = XIL(0)
        reread = false
        recorded = false
        polling_stopped_here = false
        orig_kboard = 0x555555df8ad0
#3  0x00005555556f8848 in read_key_sequence
    (keybuf=0x7fffffffdcc0, 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
        interrupted_kboard = 0x555555df8ad0
        interrupted_frame = 0x555556d8c360
        key = XIL(0x555555713fdd)
        used_mouse_menu = false
        echo_local_start = 0
        last_real_key_start = 0
        keys_local_start = 0
        new_binding = XIL(0x555556e620a0)
        count = 3
        t = 0
        echo_start = 0
        keys_start = 0
        current_binding = XIL(0x555559e15883)
        first_unbound = 31
        mock_input = 0
        used_mouse_menu_history = {false <repeats 30 times>}
        fkey = {
          parent = XIL(0x555556b8de53),
          map = XIL(0x555556b8de53),
          start = 0,
          end = 0
        }
        keytran = {
          parent = XIL(0x7ffff2c29383),
          map = XIL(0x7ffff2c29383),
          start = 0,
          end = 0
        }
        indec = {
          parent = XIL(0x555556b8de43),
          map = XIL(0x555556b8de43),
          start = 0,
          end = 0
        }
        shift_translated = false
        delayed_switch_frame = XIL(0)
        original_uppercase = XIL(0)
        original_uppercase_position = -1
        dummyflag = false
        starting_buffer = 0x5555593b9da0
        fake_prefixed_keys = XIL(0)
        first_event = XIL(0)
        second_event = XIL(0)
#4  0x00005555556e6d1f in command_loop_1 () at ../../master/src/keyboard.c:1353
        cmd = XIL(0x7fffffffde10)
        keybuf = {XIL(0), XIL(0x7ffff2c2932d), make_fixnum(23456248600171), XIL(0x15665d0), XIL(0x7fffffffdd70), XIL(0x55555579dee5), XIL(0x15665d0), XIL(0x7ffff25804c4), XIL(0x555559e15ae3), XIL(0x7ffff2c2932d), XIL(0x7ffff2c2932d), XIL(0x555559e15ae3), XIL(0x7ffff25804c4), XIL(0x15665d0), XIL(0), XIL(0), XIL(0x555555cc4f80), XIL(0), XIL(0), XIL(0x7fffffffdd70), XIL(0x5555556e3c40), XIL(0xffffddc0), XIL(0x555555cc4f80), XIL(0), XIL(0), XIL(0x7fffffffdda0), XIL(0x5555557979dd), make_fixnum(0), XIL(0x7fffffffdde0), make_fixnum(23456248654899)}
        i = 1
        prev_modiff = 0
        prev_buffer = 0x0
        already_adjusted = false
#5  0x000055555579acc9 in internal_condition_case (bfun=0x5555556e68d9 <command_loop_1>, handlers=XIL(0x90), hfun=0x5555556e6075 <cmd_error>) at ../../master/src/eval.c:1439
        val = XIL(0x5555556e3c40)
        c = 0x555555dc03e0
#6  0x00005555556e65a1 in command_loop_2 (ignore=XIL(0)) at ../../master/src/keyboard.c:1094
        val = make_fixnum(0)
#7  0x000055555579a4d7 in internal_catch (tag=XIL(0xd9e0), func=0x5555556e6574 <command_loop_2>, arg=XIL(0)) at ../../master/src/eval.c:1189
        val = XIL(0xd9e0)
        c = 0x555555da9710
#8  0x00005555556e6540 in command_loop () at ../../master/src/keyboard.c:1073
#9  0x00005555556e5c46 in recursive_edit_1 () at ../../master/src/keyboard.c:720
        count = 1
        val = XIL(0x7fffffffdf50)
#10 0x00005555556e5dc9 in Frecursive_edit () at ../../master/src/keyboard.c:789
        count = 0
        buffer = XIL(0)
#11 0x00005555556e27f6 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:
"redisplay_internal (C function)" (0x0)

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