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

From: Michael Welsh Duggan <[email-masked]>
Date: Wed, 31 Mar 2021 13:01:29 -0400

martin rudalics <[email-masked]> writes:

>> b->window_count is 1.
>
> What else should I have expected?  I attach yet another diff.  When the
> same assertion triggers we'll at least know which buffer got killed.

I have no idea what changed to cause this, but with this current
patchset I can't actually start emacs.

#0  set_buffer_internal_2 (b=0x7ffff2a3cb10) at ../../master/src/buffer.c:2157
        old_buf = 0x0
        tail = XIL(0x7ffff2a3cb15)
#1  0x0000555555759834 in set_buffer_internal_1 (b=0x7ffff2a3cb10)
    at ../../master/src/buffer.c:2146
#2  0x0000555555753b93 in set_buffer_internal (b=0x7ffff2a3cb10)
    at ../../master/src/buffer.h:1184
#3  0x0000555555759b16 in Fset_buffer (buffer_or_name=XIL(0x7ffff2a3cb15))
    at ../../master/src/buffer.c:2246
        buffer = XIL(0x7ffff2a3cb15)
#4  0x000055555564f0e4 in set_window_buffer
    (window=XIL(0x555555f06315), buffer=XIL(0x7ffff2a3cb15), run_hooks_p=false, keep_margins_p=false) at ../../master/src/window.c:4041
        w = 0x555555f06310
        b = 0x7ffff2a3cb10
        count = 0
        samebuf = false
#5  0x00005555555a958f in make_frame (mini_p=true)
    at ../../master/src/frame.c:978
        frame = XIL(0x555555efe9dd)
        f = 0x555555efe9d8
        rw = 0x555555efec40
        mw = 0x555555f06310
        root_window = XIL(0x555555efec45)
        mini_window = XIL(0x555555f06315)
#6  0x00005555555a9b5c in make_initial_frame ()
    at ../../master/src/frame.c:1105
        f = 0x7fffffffdbc0
        terminal = 0x555555efe7c0
        frame = make_fixnum(23456248299993)
#7  0x000055555565cce3 in init_window_once_for_pdumper ()
    at ../../master/src/window.c:8198
        old_mode_line_in_non_selected_windows = true
        saved_dumped_with_pdumper = true
        f = 0x7fffffffdbd0
#8  0x00005555557d1f02 in pdumper_load
    (dump_filename=0x555555ec59f0 "/home/md5i/src/emacs/build/src/emacs.pdmp")
    at ../../master/src/pdumper.c:5402
        i = 7
        dump_size = 10671168
        stat = {
          st_dev = 26,
          st_ino = 2932069,
          st_nlink = 2,
          st_mode = 33188,
          st_uid = 1000,
          st_gid = 1000,
          __pad0 = 0,
          st_rdev = 0,
          st_size = 10671168,
          st_blksize = 4096,
          st_blocks = 20848,
          st_atim = {
            tv_sec = 1617209633,
            tv_nsec = 635319963
          },
          st_mtim = {
            tv_sec = 1617209633,
            tv_nsec = 619319612
          },
          st_ctim = {
            tv_sec = 1617209633,
            tv_nsec = 619319612
          },
          __glibc_reserved = {0, 0, 0}
        }
        dump_base = 140737259114496
        dump_page_size = 65536
        adj_discardable_start = 7208960
        mark_bits = {{
            bits = 0x7ffff252a010,
            number_words = 13995
          }, {
            bits = 0x7ffff2545568,
            number_words = 13995
          }}
        mark_bits_needed = 895639
        header_buf = {
          magic = "DUMPEDGNUEMACS\000",
          fingerprint = "\336xÝ®hP\231\005n\261\265\071\226\201&\267\017L\211\005J\212K\366\242\263\274\250)H\353m",
          dump_relocs = {
            offset = 8354696,
            nr_entries = 405189
          },
          object_starts = {
            offset = 9975456,
            nr_entries = 161879
          },
          emacs_relocs = {
            offset = 10622976,
            nr_entries = 3012
          },
          discardable_start = 7165112,
          cold_start = 7340032,
          hash_list = 7160960
        }
        header = 0x7fffffffdd50
        sections = {{
            spec = {
              fd = 3,
              size = 7208960,
              offset = 0,
              protection = DUMP_MEMORY_ACCESS_READWRITE
            },
            mapping = 0x0,
            release = 0x0,
            private = 0x0
          }, {
            spec = {
              fd = 3,
              size = 131072,
              offset = 7208960,
              protection = DUMP_MEMORY_ACCESS_READWRITE
            },
            mapping = 0x0,
            release = 0x0,
            private = 0x0
          }, {
            spec = {
              fd = 3,
              size = 3331136,
              offset = 7340032,
              protection = DUMP_MEMORY_ACCESS_READWRITE
            },
            mapping = 0x0,
            release = 0x0,
            private = 0x0
          }}
        start_time = {
          tv_sec = 1617209923,
          tv_nsec = 161514409
        }
        dump_filename_copy = 0x555555ec5a80 "/home/md5i/src/emacs/build/src/emacs.pdmp"
        err = 0
        dump_fd = 3
        desired = "\336xÝ®hP\231\005n\261\265\071\226\201&\267\017L\211\005J\212K\366\242\263\274\250)H\353m"
        hashes = XIL(0x7ffff2c35485)
        load_timespec = {
          tv_sec = 0,
          tv_nsec = 0
        }
#9  0x000055555571a568 in load_pdump (argc=1, argv=0x7fffffffe1c8)
    at ../../master/src/emacs.c:860
        real_exename = 0x555555ec59f0 "/home/md5i/src/emacs/build/src/emacs.pdmp"
        exenamelen = 36
        needed = 42
        suffix = 0x555555946c46 ".pdmp"
        result = 124
        strip_suffix = 0x0
        path_exec = 0x555555946c78 "/usr/local/libexec/emacs/28.0.50/x86_64-pc-linux-gnu"
        dump_file = 0x555555ec59f0 "/home/md5i/src/emacs/build/src/emacs.pdmp"
        skip_args = 0
        bufsize = 128
        argv0_base = 0x7fffffffe010 "\251\221\234!"
        needed = 140737318400460
#10 0x000055555571aac9 in main (argc=1, argv=0x7fffffffe1c8) at ../../master/src/emacs.c:1068
        stack_bottom_variable = 0x7ffff617e053
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x0
        original_pwd = 0x0
        dump_mode = 0x0
        skip_args = 0
        temacs = 0x0
        attempt_load_pdump = true
        rlim = {
          rlim_cur = 140737323689568,
          rlim_max = 140737318407889
        }
        lc_all = 0x687475410000001e <error: Cannot access memory at address 0x687475410000001e>
        sockfd = 0
        module_assertions = false

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