Subject: Re: bug#40225: 27.0.90; abort with apparent stack explosion in lsp-mode

From: Valtteri Vuorikoski <[email-masked]>
Date: Tue, 31 Mar 2020 16:59:47 +0300

On 2020-03-26 20:49, Eli Zaretskii wrote:
> What do these display?
>    (gdb) p/x $sp
>    (gdb) p/x &stack_bottom

Sorry, I had already killed off that emacs, but here's the requested 
data from a new crash. I have left the gdb session running if you need 
more data.

This crash happened while editing markdown, so it doesn't seem specific 
to lsp-mode.

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x00005568e2e5dc1b in mark_object (arg=<error reading variable: Cannot 
access memory at address 0x7ffde9c2fff8>) at alloc.c:6386
6386    {
(gdb) p/x $sp
$1 = 0x7ffde9c2fff0
(gdb) p/x &stack_bottom
No symbol "stack_bottom" in current context.
(gdb) p/x $stack_bottom
$2 = 0x0
(gdb) bt full 3
#0  0x00005568e2e5dc1b in mark_object (arg=Python Exception <class 
'gdb.MemoryError'> Cannot access memory at address 0x7ffde9c2fff8:
#1  0x00005568e2e5df9c in mark_object (arg=0x5568e6c1f003) at alloc.c:6629
         ptr = 0x5568e6c1f000
         obj = 0x5568e6c1f043
         po = 0x5568e6c1f000
         cdr_count = 0
#2  0x00005568e2e5d507 in mark_vectorlike (header=0x5568e5b27830) at 
alloc.c:6158
         ptr = 0x5568e5b27830
         size = 9
         i = 5
#3  0x00005568e2e5dde6 in mark_object (arg=0x5568e6c24033) at alloc.c:6567
         ptr = 0x5568e5b27830
         pvectype = PVEC_NORMAL_VECTOR
         obj = 0x5568e5b27835
         po = 0x5568e5b27830
         cdr_count = 1
(gdb) bt full -40
#100018 0x00005568e2e5de33 in mark_object (arg=0x29ef70404a40) at 
alloc.c:6582
         ptr = 0x7f5853b53a80
         obj = 0x29ef70404a40
         po = 0x7f5853b53a80
         cdr_count = 0
#100019 0x00005568e2e5d507 in mark_vectorlike (header=0x7f58540ab4b0) at 
alloc.c:6158
         ptr = 0x7f58540ab4b0
         size = 2
         i = 1
#100020 0x00005568e2e5dde6 in mark_object (arg=0x7f58540ab47d) at 
alloc.c:6567
         ptr = 0x7f58540ab4b0
         pvectype = PVEC_NORMAL_VECTOR
         obj = 0x7f58540ab4b5
         po = 0x7f58540ab4b0
         cdr_count = 0
#100021 0x00005568e2e5de33 in mark_object (arg=0x6ed0) at alloc.c:6582
         ptr = 0x5568e3755f10 <lispsym+28368>
         obj = 0x6ed0
         po = 0x5568e3755f10 <lispsym+28368>
         cdr_count = 0
#100022 0x00005568e2e5c749 in mark_object_root_visitor 
(root_ptr=0x5568e3744d10 <buffer_defaults+80>, 
type=GC_ROOT_BUFFER_LOCAL_DEFAULT, data=0x0) at alloc.c:5742
#100023 0x00005568e2e5c5d7 in visit_vectorlike_root (visitor=..., 
ptr=0x5568e3744cc0 <buffer_defaults>, type=GC_ROOT_BUFFER_LOCAL_DEFAULT) 
at alloc.c:5693
         size = 74
         i = 9
#100024 0x00005568e2e5c629 in visit_buffer_root (visitor=..., 
buffer=0x5568e3744cc0 <buffer_defaults>, 
type=GC_ROOT_BUFFER_LOCAL_DEFAULT) at alloc.c:5708
#100025 0x00005568e2e5c673 in visit_static_gc_roots (visitor=...) at 
alloc.c:5720
#100026 0x00005568e2e5cc7a in garbage_collect () at alloc.c:5941
         nextb = 0x0
         stack_top_variable = 0 '\000'
         message_p = false
         count = 13
         start = {tv_sec = 1585662763, tv_nsec = 196930673}
         tot_before = 18446744073709551615
         visitor = {visit = 0x5568e2e5c727 <mark_object_root_visitor>, 
data = 0x0}
#100027 0x00005568e2e5ca5c in maybe_garbage_collect () at alloc.c:5853
#100028 0x00005568e2ea0c75 in maybe_gc () at lisp.h:5065
#100029 0x00005568e2ea9085 in Ffuncall (nargs=2, args=0x7ffdea5b55d0) at 
eval.c:2778
         fun = 0x5568edbdfc10
         original_fun = 0x1ea5b5580
         funcar = 0x30
         numargs = 1
         val = 0x30
         count = 12
#100030 0x00005568e2ea5a07 in internal_condition_case_n 
(bfun=0x5568e2ea8fc9 <Ffuncall>, nargs=2, args=0x7ffdea5b55d0, 
handlers=0x30, hfun=0x5568e2bdbcdb <safe_eval_handler>) at eval.c:1435
         val = 0x5568e2bcd60b <builtin_lisp_symbol+48>
         c = 0x5568e4298ae0
#100031 0x00005568e2bdbf3d in safe__call (inhibit_quit=false, nargs=2, 
func=0x29ef7052cd08, ap=0x7ffdea5b5690) at xdisp.c:2807
         i = 2
         count = 11
         sa_avail = 16368
         sa_count = 11
         args = 0x7ffdea5b55d0
         val = 0x0
#100032 0x00005568e2bdc034 in safe_call (nargs=2, func=0x29ef7052cd08) 
at xdisp.c:2822
         retval = 0x5568e2e76fa4 <set_internal+1034>
         ap = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 
0x7ffdea5b5770, reg_save_area = 0x7ffdea5b56b0}}
#100033 0x00005568e2bdc085 in safe_call1 (fn=0x29ef7052cd08, arg=0x255a) 
at xdisp.c:2833
[trimmed]