-
-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doom Emacs segfaults when using LSP #4510
Comments
UPDATE: I was using Emacs version 29.4 from the Fedora package repositories. I've compiled version 28.2 from source and so far there aren't any segfaults when using LSP. |
Can you also reproduce the bug in Emacs 29.4 without using doom emacs but just using plain lsp-mode ? |
I have the same issue. I tried both vanilla emacs 29.4 and emacs-wayland. This is my stacktrace:
|
Emacs 29.4 seems to run fine in plain LSP mode but I didn't test it for very long. I had a Python project opened with LSP mode enabled and was able to use it for a while until it crashed again. Here is the backtrace from said crash, which might give a clue as to the cause. It looks like company has something to do with it this time, same as for @luciusmagn. I do notice that the crash only happens when the code completion menu pops up. I'm going to try disabling company and using corfu. Fatal error 11: Segmentation fault
Backtrace:
/usr/bin/emacs(emacs_backtrace+0x5a)[0x5982ea]
/usr/bin/emacs(terminate_due_to_signal+0x9f)[0x4678b5]
/usr/bin/emacs[0x468653]
/usr/bin/emacs[0x7116c4]
/lib64/libc.so.6(+0x40d00)[0x7fe18c84fd00]
/usr/bin/emacs(parse_modifiers+0x104)[0x57c2e4]
/usr/bin/emacs[0x5930c8]
/usr/bin/emacs(read_char+0x218a)[0x581b7a]
/usr/bin/emacs[0x64d282]
/usr/bin/../lib64/emacs/29.4/native-lisp/29.4-95d1479c/preloaded/subr-13adf6a6-bfb9f448.eln(F7369742d666f72_sit_for_0+0x19f)[0x7fe186b623af]
/usr/bin/emacs(Ffuncall+0xfd)[0x624ead]
/home/jas/.config/emacs/.local/cache/eln/29.4-95d1479c/lsp-mode-4bd57f83-6ee62a7e.eln(F6c73702d726571756573742d7768696c652d6e6f2d696e707574_lsp_request_while_no_input_0+0x427)[0x7fe16d6108f7]
/usr/bin/emacs(exec_byte_code+0x56c)[0x6701bc]
/usr/bin/emacs(Ffuncall+0xfd)[0x624ead]
/usr/bin/emacs(Fall_completions+0x372)[0x5b8c42]
/usr/bin/emacs(exec_byte_code+0x56c)[0x6701bc]
/usr/bin/emacs(Ffuncall+0xfd)[0x624ead]
/usr/bin/../lib64/emacs/29.4/native-lisp/29.4-95d1479c/preloaded/minibuffer-1b0f548b-25462d74.eln(F636f6d706c6574696f6e2d2d736f6d65_completion__some_0+0x1e2)[0x7fe185ba9852]
/usr/bin/emacs(Ffuncall+0xfd)[0x624ead]
/usr/bin/../lib64/emacs/29.4/native-lisp/29.4-95d1479c/preloaded/minibuffer-1b0f548b-25462d74.eln(F636f6d706c6574696f6e2d2d6e74682d636f6d706c6574696f6e_completion__nth_completion_0+0x2d4)[0x7fe185bae914]
/usr/bin/emacs(Ffuncall+0xfd)[0x624ead]
/usr/bin/../lib64/emacs/29.4/native-lisp/29.4-95d1479c/preloaded/minibuffer-1b0f548b-25462d74.eln(F636f6d706c6574696f6e2d616c6c2d636f6d706c6574696f6e73_completion_all_completions_0+0x50)[0x7fe185baecd0]
/usr/bin/emacs(Ffuncall+0xfd)[0x624ead]
/usr/bin/emacs(Fapply+0x1b0)[0x6255c0]
/usr/bin/emacs(exec_byte_code+0x56c)[0x6701bc]
/usr/bin/emacs(Ffuncall+0xfd)[0x624ead]
/home/jas/.config/emacs/.local/cache/eln/29.4-95d1479c/company-capf-b4167445-0ccac283.eln(F636f6d70616e792d636170662d2d63616e646964617465732d31_company_capf__candidates_1_0+0x36d)[0x7fe16e61664d]
/usr/bin/emacs(exec_byte_code+0x56c)[0x6701bc]
/usr/bin/emacs(Ffuncall+0xfd)[0x624ead]
/usr/bin/emacs(Fapply+0x4a2)[0x6258b2]
/usr/bin/emacs(eval_sub+0xa57)[0x61a797]
/usr/bin/emacs(Flet+0x2cd)[0x61b84d]
/usr/bin/emacs(eval_sub+0x839)[0x61a579]
/usr/bin/emacs[0x6249bd]
/usr/bin/emacs(Ffuncall+0xfd)[0x624ead]
/usr/bin/emacs(Fapply+0x4a2)[0x6258b2]
/usr/bin/emacs(exec_byte_code+0x56c)[0x6701bc]
/usr/bin/emacs(Ffuncall+0xfd)[0x624ead]
/home/jas/.config/emacs/.local/cache/eln/29.4-95d1479c/company-capf-b4167445-0ccac283.eln(F636f6d70616e792d63617066_company_capf_0+0x22f)[0x7fe16e614a5f]
/usr/bin/emacs(Ffuncall+0xfd)[0x624ead]
/home/jas/.config/emacs/.local/cache/eln/29.4-95d1479c/company-a57d1860-b64d4357.eln(F636f6d70616e792d2d6d756c74692d6261636b656e642d616461707465722d63616e64696461746573_company__multi_backend_adapter_candidates_0+0x9c)[0x7fe16f75091c]
...
[1] 183834 segmentation fault (core dumped) /usr/bin/emacs |
I haven't had any issues using corfu so far. I'm going to try using LSP mode with |
Hi, I can confirm that switching to corfu prevents the segfault |
Probably cross post on the |
Corresponding Doom issue: doomemacs/doomemacs#7915. Though that issue suggests the problem is specific to Emacs 29, on my system it is still present after switching to git master (944e45d) AFAIK we don't actually know if this is a company-mode, lsp-mode, Doom Emacs, or upstream Emacs issue. Or, rather, it's an upstream issue (Elisp is generally not supposed to cause segfaults), but we don't know how it shows up in this specific situation. TL;DR after doing the debug runs below:
With a debugger I was able to trigger a crash on master (944e45d, with native-comp) with this message: Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x000055555579a569 in Fget (symbol=<optimized out>, propname=XIL(0x7e00)) at ../../src/fns.c:2629
2629 return plist_get (XSYMBOL (symbol)->u.s.plist, propname); The C backtrace: C backtrace (all-completions ... unwind_protect ... read_filtered_event ... get)(gdb) bt
#0 0x000055555579a569 in Fget (symbol=<optimized out>, propname=XIL(0x7e00)) at ../../src/fns.c:2629
#1 Fget (symbol=<optimized out>, propname=XIL(0x7e00)) at ../../src/fns.c:2618
#2 0x00005555556f2b00 in parse_modifiers (symbol=XIL(0x555556682540)) at ../../src/keyboard.c:7382
#3 parse_modifiers (symbol=XIL(0x555556682540)) at ../../src/keyboard.c:7373
#4 0x00005555557014e0 in reorder_modifiers (symbol=XIL(0x555556682540)) at ../../src/keyboard.c:7513
#5 access_keymap_1 (map=XIL(0x7fffefca71e3), idx=XIL(0x555556682540), t_ok=false, noinherit=false, autoload=true) at ../../src/keymap.c:342
#6 0x00005555556ee51f in access_keymap (noinherit=false, autoload=true, map=<optimized out>, idx=<optimized out>, t_ok=false) at ../../src/keymap.c:496
#7 read_char (commandflag=0, map=XIL(0), prev_event=XIL(0), used_mouse_menu=0x0, end_time=0x7fffffffa450) at ../../src/keyboard.c:3060
#8 0x00005555557ba955 in read_filtered_event (no_switch_frame=false, ascii_required=false, error_nonascii=false, input_method=<optimized out>, seconds=XIL(0x7ffff25e9aef)) at ../../src/lread.c:787
#9 0x00007ffff06b303f in F7369742d666f72_sit_for_0 () at /usr/bin/../lib/emacs/31.0.50/native-lisp/31.0.50-b90a846c/preloaded/subr-13adf6a6-cdd9cb44.eln
#10 0x0000555555786447 in eval_sub (form=<optimized out>) at ../../src/eval.c:2593
#11 0x0000555555786680 in Fprogn (body=<optimized out>, body@entry=XIL(0x5555643a9f93)) at ../../src/eval.c:439
#12 0x000055555578393a in internal_catch (tag=<optimized out>, func=0x555555786650 <Fprogn>, arg=XIL(0x5555643a9f93)) at ../../src/eval.c:1292
#13 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#14 0x0000555555787540 in Fprogn (body=<optimized out>) at ../../src/eval.c:439
#15 prog_ignore (body=<optimized out>) at ../../src/eval.c:450
#16 Fwhile (args=<optimized out>) at ../../src/eval.c:1130
#17 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#18 0x0000555555786680 in Fprogn (body=<optimized out>) at ../../src/eval.c:439
#19 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#20 0x000055555578761b in Funwind_protect (args=XIL(0x5555643ab6e3)) at ../../src/lisp.h:1533
#21 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#22 0x0000555555786dd0 in Fprogn (body=<optimized out>) at ../../src/eval.c:439
#23 FletX (args=<optimized out>) at ../../src/eval.c:1042
#24 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#25 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#26 0x0000555555787ec0 in Fprogn (body=<optimized out>) at ../../src/eval.c:439
#27 funcall_lambda (fun=<optimized out>, nargs=<optimized out>, arg_vector=<optimized out>) at ../../src/eval.c:3342
#28 0x000055555578bee9 in apply_lambda (fun=<optimized out>, args=<optimized out>, count=count@entry=...) at ../../src/eval.c:3207
#29 0x0000555555785cd5 in eval_sub (form=<optimized out>) at ../../src/eval.c:2679
#30 0x0000555555786f42 in FletX (args=XIL(0x555556295f63)) at ../../src/eval.c:1017
#31 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#32 0x00005555557867f0 in Fprogn (body=<optimized out>) at ../../src/eval.c:439
#33 Fcond (args=XIL(0x555556295b43)) at ../../src/eval.c:419
#34 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#35 0x00005555557872e0 in Fprogn (body=<optimized out>) at ../../src/eval.c:439
#36 Flet (args=<optimized out>) at ../../src/eval.c:1109
#37 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#38 0x0000555555786680 in Fprogn (body=<optimized out>, body@entry=XIL(0x555556294f63)) at ../../src/eval.c:439
#39 0x000055555578393a in internal_catch (tag=<optimized out>, func=0x555555786650 <Fprogn>, arg=XIL(0x555556294f63)) at ../../src/eval.c:1292
#40 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#41 0x0000555555787366 in Flet (args=<optimized out>) at ../../src/eval.c:1080
#42 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#43 0x0000555555787ec0 in Fprogn (body=<optimized out>) at ../../src/eval.c:439
#44 funcall_lambda (fun=<optimized out>, nargs=<optimized out>, arg_vector=<optimized out>) at ../../src/eval.c:3342
#45 0x00005555557885be in Ffuncall (nargs=1, args=0x7fffffffb300) at ../../src/eval.c:3085
--Type <RET> for more, q to quit, c to continue without paging--c
#46 0x0000555555786500 in eval_sub (form=<optimized out>) at ../../src/eval.c:2562
#47 0x0000555555786307 in eval_sub (form=<optimized out>) at ../../src/eval.c:2578
#48 0x00005555557867f0 in Fprogn (body=<optimized out>) at ../../src/eval.c:439
#49 Fcond (args=XIL(0x55556326ee03)) at ../../src/eval.c:419
#50 0x00005555557862c9 in eval_sub (form=<optimized out>) at ../../src/eval.c:2541
#51 0x0000555555787ec0 in Fprogn (body=<optimized out>) at ../../src/eval.c:439
#52 funcall_lambda (fun=<optimized out>, nargs=<optimized out>, arg_vector=<optimized out>) at ../../src/eval.c:3342
#53 0x00005555557885be in Ffuncall (nargs=4, args=0x7fffffffb640) at ../../src/eval.c:3085
#54 0x0000555555728665 in Fall_completions (string=<optimized out>, collection=<optimized out>, predicate=XIL(0), hide_spaces=XIL(0)) at ../../src/minibuf.c:1875
#55 0x0000555555786425 in eval_sub (form=<optimized out>) at ../../src/eval.c:2600
#56 0x0000555555787ec0 in Fprogn (body=<optimized out>) at ../../src/eval.c:439
#57 funcall_lambda (fun=<optimized out>, nargs=<optimized out>, arg_vector=<optimized out>) at ../../src/eval.c:3342
#58 0x00005555557dd62e in exec_byte_code (fun=XIL(0), args_template=1, nargs=4, args=0x7fffeddff168) at ../../src/bytecode.c:814
#59 0x00005555557885be in Ffuncall (nargs=2, args=0x7fffffffb960) at ../../src/eval.c:3085
#60 0x0000555555796b0b in mapcar1 (leni=2, vals=vals@entry=0x0, fn=fn@entry=XIL(0x555568d1434d), seq=seq@entry=XIL(0x55556326d653)) at ../../src/fns.c:3366
#61 0x0000555555796e04 in Fmapc (function=XIL(0x555568d1434d), sequence=XIL(0x55556326d653)) at ../../src/fns.c:3503
#62 0x00005555557dd75f in exec_byte_code (fun=XIL(0), args_template=1, nargs=2, args=0x7fffeddff0e0) at ../../src/lisp.h:2255
#63 0x00005555557885be in Ffuncall (nargs=3, args=0x7fffffffbbe0) at ../../src/eval.c:3085
#64 0x00007fffef005f64 in F636f6d706c6574696f6e2d2d6e74682d636f6d706c6574696f6e_completion__nth_completion_0 ()
at /usr/bin/../lib/emacs/31.0.50/native-lisp/31.0.50-b90a846c/preloaded/minibuffer-1b0f548b-aed76e44.eln
#65 0x00005555557885be in Ffuncall (nargs=7, args=0x7fffffffbd10) at ../../src/eval.c:3085
#66 0x00007fffef0063a0 in F636f6d706c6574696f6e2d616c6c2d636f6d706c6574696f6e73_completion_all_completions_0 ()
at /usr/bin/../lib/emacs/31.0.50/native-lisp/31.0.50-b90a846c/preloaded/minibuffer-1b0f548b-aed76e44.eln
#67 0x00005555557885be in Ffuncall (nargs=nargs@entry=6, args=0x7fffffffbdc0) at ../../src/eval.c:3085
#68 0x00005555557896a0 in Fapply (nargs=2, args=0x7fffeddff048) at ../../src/eval.c:2757
#69 0x00005555557dd75f in exec_byte_code (fun=XIL(0), args_template=1, nargs=2, args=0x7fffeddff048) at ../../src/lisp.h:2255
#70 0x00005555557885be in Ffuncall (nargs=6, args=0x7fffffffc0b0) at ../../src/eval.c:3085
#71 0x00007fffc4068b53 in F636f6d706c6574696f6e2d707265766965772d2d7472792d7461626c65_completion_preview__try_table_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/31.0.50-b90a846c/completion-preview-b8bd3a06-2fbe13ad.eln
#72 0x00005555557885be in Ffuncall (nargs=5, args=0x7fffffffc1a0) at ../../src/eval.c:3085
#73 0x00007fffc40690f9 in F636f6d706c6574696f6e2d707265766965772d2d636170662d77726170706572_completion_preview__capf_wrapper_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/31.0.50-b90a846c/completion-preview-b8bd3a06-2fbe13ad.eln
#74 0x00005555557885be in Ffuncall (nargs=2, args=args@entry=0x7fffffffc2c0) at ../../src/eval.c:3085
#75 0x000055555578bdb1 in run_hook_wrapped_funcall (nargs=<optimized out>, args=0x7fffffffc2c0) at ../../src/eval.c:2864
#76 0x0000555555784b72 in run_hook_with_args (nargs=2, args=0x7fffffffc2c0, funcall=0x55555578bd90 <run_hook_wrapped_funcall>) at ../../src/eval.c:2945
#77 0x00007fffc4069330 in F636f6d706c6574696f6e2d707265766965772d2d757064617465_completion_preview__update_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/31.0.50-b90a846c/completion-preview-b8bd3a06-2fbe13ad.eln
#78 0x00005555557885be in Ffuncall (nargs=1, args=0x7fffffffc4a0) at ../../src/eval.c:3085
#79 0x00007fffc4069a0f in F636f6d706c6574696f6e2d707265766965772d2d7472792d757064617465_completion_preview__try_update_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/31.0.50-b90a846c/completion-preview-b8bd3a06-2fbe13ad.eln
#80 0x00005555557885be in Ffuncall (nargs=1, args=0x7fffffffc620) at ../../src/eval.c:3085
#81 0x00007fffc4069ff2 in F636f6d706c6574696f6e2d707265766965772d2d73686f77_completion_preview__show_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/31.0.50-b90a846c/completion-preview-b8bd3a06-2fbe13ad.eln
#82 0x00005555557885be in Ffuncall (nargs=1, args=0x7fffffffc6f0) at ../../src/eval.c:3085
#83 0x00007fffc406a13d in F636f6d706c6574696f6e2d707265766965772d2d706f73742d636f6d6d616e64_completion_preview__post_command_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/31.0.50-b90a846c/completion-preview-b8bd3a06-2fbe13ad.eln
#84 0x00005555557885be in Ffuncall (nargs=1, args=0x7fffffffc7b8) at ../../src/eval.c:3085
#85 0x00005555558579f1 in internal_condition_case_n.constprop.0
(bfun=bfun@entry=0x5555556e6ef0 <safe_run_hooks_1>, nargs=nargs@entry=2, args=args@entry=0x7fffffffc7b0, hfun=hfun@entry=0x5555556e7240 <safe_run_hooks_error>, handlers=XIL(0x30)) at ../../src/eval.c:1693
#86 0x00005555556e7777 in safe_run_hook_funcall (nargs=2, args=0x7fffffffc870) at ../../src/keyboard.c:1944
#87 0x0000555555784b72 in run_hook_with_args (nargs=2, args=0x7fffffffc870, funcall=0x5555556e76a0 <safe_run_hook_funcall>) at ../../src/eval.c:2945
#88 0x00005555558692db in safe_run_hooks_maybe_narrowed.isra.0 (hook=hook@entry=XIL(0xf1e0), w=<optimized out>) at ../../src/keyboard.c:1982
#89 0x00005555556eb35c in command_loop_1 () at ../../src/keyboard.c:1568
#90 0x00005555557839f7 in internal_condition_case (bfun=0x5555556eaee0 <command_loop_1>, handlers=<optimized out>, hfun=0x5555556e8af0 <cmd_error>) at ../../src/eval.c:1613
#91 0x00005555556e709e in command_loop_2 (handlers=handlers@entry=XIL(0x90)) at ../../src/keyboard.c:1168
#92 0x000055555578393a in internal_catch (tag=<optimized out>, func=0x5555556e7070 <command_loop_2>, arg=XIL(0x90)) at ../../src/eval.c:1292
#93 0x00005555556eaea3 in command_loop () at ../../src/keyboard.c:1146
#94 0x0000555555868f8b in recursive_edit_1.isra.0 () at ../../src/keyboard.c:754
#95 0x00005555556f04d1 in Frecursive_edit () at ../../src/keyboard.c:837
#96 0x00005555555b3318 in main (argc=<optimized out>, argv=0x7fffffffce78) at ../../src/emacs.c:2624 The propname in the final line refers to the Lisp backtrace from gdb: Lisp backtrace (completion-all-completions ... all-completions ... lsp-request-while-no-input ... sit-for)
So the crash, at least in my case, seems to be, for some reason, happening in Also, notably, this is triggered by completion-preview-mode (an Emacs 30 feature) and not by Company, suggesting that Company is not the problem here. After going back to Emacs 29.4 I am still able to reproduce it under gdb. Though I wasn't able to trigger it in another attempt when I turned off optimizations (-O0 -g3). My guess is because this is a race condition that is harder to trigger when the performance is worse. For the 29.4 crash, the error is Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
Fget (symbol=<optimized out>, propname=XIL(0x6a20)) at ../../src/fns.c:2516
2516 DEFUN ("get", Fget, Sget, 2, 2, 0, C backtrace: C backtrace (with some spurious file not found errors sprinkled within, they can probably be ignored)(gdb) bt
#0 Fget (symbol=<optimized out>, propname=XIL(0x6a20)) at ../../src/fns.c:2516
#1 0x00005555556f448f in parse_modifiers (symbol=XIL(0x55555685e590)) at ../../src/keyboard.c:6897
#2 parse_modifiers (symbol=XIL(0x55555685e590)) at ../../src/keyboard.c:6888
#3 0x0000555555703ea8 in reorder_modifiers (symbol=XIL(0x55555685e590)) at ../../src/keyboard.c:7028
#4 access_keymap_1
(map=XIL(0x7fffefe09fcb), idx=XIL(0x55555685e590), t_ok=false, noinherit=false, autoload=true)
at ../../src/keymap.c:342
#5 0x00005555556f9c97 in access_keymap
(noinherit=false, autoload=true, map=<optimized out>, idx=<optimized out>, t_ok=false)
at ../../src/keymap.c:496
#6 read_char
(commandflag=0, map=XIL(0), prev_event=XIL(0), used_mouse_menu=0x0, end_time=0x7fffffffb5c0)
at ../../src/keyboard.c:3018
#7 0x00005555557b9f61 in read_filtered_event
(no_switch_frame=false, ascii_required=false, error_nonascii=false, input_method=<optimized out>, seconds=XIL(0x555559982d67)) at ../../src/lread.c:702
#8 0x00007fffef4433d7 in F7369742d666f72_sit_for_0 ()
at /usr/bin/../lib/emacs/29.4/native-lisp/29.4-0af1ed90/preloaded/subr-13adf6a6-bfb9f448.eln
#9 0x00005555557df1be in exec_byte_code (fun=XIL(0), args_template=1, nargs=1, args=0x7fffedfff3f0)
at ../../src/bytecode.c:809
#10 0x0000555555789eae in Ffuncall (nargs=4, args=0x7fffffffb850) at ../../src/eval.c:2999
#11 0x000055555572cc4f in call3
(fn=XIL(0x555576c25405), arg1=<optimized out>, arg2=XIL(0), arg3=XIL(0x30))
at ../../src/lisp.h:3262
#12 Fall_completions
(string=<optimized out>, collection=XIL(0x555576c25405), predicate=XIL(0), hide_spaces=XIL(0))
at ../../src/minibuf.c:1869
#13 0x00005555557df1be in exec_byte_code (fun=XIL(0), args_template=1, nargs=3, args=0x7fffedfff278)
at ../../src/bytecode.c:809
warning: BFD: reopening /tmp/freefn-2b656d6163732d6c6973702d686967686c696768742d766172732d616e642d6661636573_emacs_lisp_highlight_vars_and_faces_0wlu2fe.eln: 沒有此一檔案或目錄
warning: Can't read data for section '.eh_frame' in file '/tmp/freefn-2b656d6163732d6c6973702d686967686c696768742d766172732d616e642d6661636573_emacs_lisp_highlight_vars_and_faces_0wlu2fe.eln'
#14 0x0000555555789eae in Ffuncall (nargs=2, args=0x7fffffffba90) at ../../src/eval.c:2999
#15 0x00007fffef3e28f2 in F636f6d706c6574696f6e2d2d736f6d65_completion__some_0 ()
at /usr/bin/../lib/emacs/29.4/native-lisp/29.4-0af1ed90/preloaded/minibuffer-1b0f548b-25462d74.eln
#16 0x0000555555789eae in Ffuncall (nargs=3, args=0x7fffffffbb90) at ../../src/eval.c:2999
#17 0x00007fffef3e7f34 in F636f6d706c6574696f6e2d2d6e74682d636f6d706c6574696f6e_completion__nth_completion_0 ()
at /usr/bin/../lib/emacs/29.4/native-lisp/29.4-0af1ed90/preloaded/minibuffer-1b0f548b-25462d74.eln
#18 0x0000555555789eae in Ffuncall (nargs=7, args=0x7fffffffbcc0) at ../../src/eval.c:2999
#19 0x00007fffef3e834e in F636f6d706c6574696f6e2d616c6c2d636f6d706c6574696f6e73_completion_all_completions_0 ()
at /usr/bin/../lib/emacs/29.4/native-lisp/29.4-0af1ed90/preloaded/minibuffer-1b0f548b-25462d74.eln
#20 0x0000555555789eae in Ffuncall (nargs=nargs@entry=6, args=0x7fffffffbd40) at ../../src/eval.c:2999
#21 0x000055555578ad80 in Fapply (nargs=2, args=0x7fffedfff1d0) at ../../src/eval.c:2670
#22 0x00005555557df1be in exec_byte_code (fun=XIL(0), args_template=1, nargs=2, args=0x7fffedfff1d0)
at ../../src/bytecode.c:809
#23 0x0000555555789eae in Ffuncall (nargs=3, args=0x7fffffffc000) at ../../src/eval.c:2999
#24 0x00007fffc223af0c in F636f6d70616e792d2d6d756c74692d6261636b656e642d616461707465722d63616e64696461--Type <RET> for more, q to quit, c to continue without paging--c
746573_company__multi_backend_adapter_candidates_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/29.4-0af1ed90/company-ce1324ef-b64d4357.eln
#25 0x0000555555789eae in Ffuncall (nargs=5, args=0x7fffffffc170) at ../../src/eval.c:2999
#26 0x00007fffc2239fbc in F636f6d70616e792d2d6d756c74692d6261636b656e642d61646170746572_company__multi_backend_adapter_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/29.4-0af1ed90/company-ce1324ef-b64d4357.eln
#27 0x0000555555789eae in Ffuncall (nargs=nargs@entry=4, args=0x7fffffffc210) at ../../src/eval.c:2999
#28 0x000055555578ad80 in Fapply (nargs=3, args=0x7fffffffc310) at ../../src/eval.c:2670
#29 0x0000555555789eae in Ffuncall (nargs=4, args=0x7fffffffc308) at ../../src/eval.c:2999
#30 0x00007fffc22398ed in F636f6d70616e792d63616c6c2d6261636b656e642d726177_company_call_backend_raw_0
()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/29.4-0af1ed90/company-ce1324ef-b64d4357.eln
#31 0x0000555555789eae in Ffuncall (nargs=3, args=0x7fffffffc3c0) at ../../src/eval.c:2999
#32 0x00007fffc223d7f2 in F636f6d70616e792d2d66657463682d63616e64696461746573_company__fetch_candidates_0 () at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/29.4-0af1ed90/company-ce1324ef-b64d4357.eln
#33 0x0000555555789eae in Ffuncall (nargs=2, args=0x7fffffffc4c8) at ../../src/eval.c:2999
#34 0x00007fffc223d1ba in F636f6d70616e792d63616c63756c6174652d63616e64696461746573_company_calculate_candidates_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/29.4-0af1ed90/company-ce1324ef-b64d4357.eln
#35 0x0000555555789eae in Ffuncall (nargs=3, args=0x7fffffffc590) at ../../src/eval.c:2999
#36 0x00007fffc2241e8a in F636f6d70616e792d2d636f6e74696e7565_company__continue_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/29.4-0af1ed90/company-ce1324ef-b64d4357.eln
#37 0x0000555555789eae in Ffuncall (nargs=1, args=0x7fffffffc638) at ../../src/eval.c:2999
#38 0x00007fffc224295d in F636f6d70616e792d2d706572666f726d_company__perform_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/29.4-0af1ed90/company-ce1324ef-b64d4357.eln
#39 0x0000555555789eae in Ffuncall (nargs=1, args=0x7fffffffc6d0) at ../../src/eval.c:2999
#40 0x00007fffc22438d6 in F636f6d70616e792d706f73742d636f6d6d616e64_company_post_command_0 ()
at /home/kisaragi-hiu/.config/emacs/.local/cache/eln/29.4-0af1ed90/company-ce1324ef-b64d4357.eln
#41 0x0000555555789eae in Ffuncall (nargs=1, args=0x7fffffffc7b8) at ../../src/eval.c:2999
#42 0x0000555555859f01 in internal_condition_case_n.constprop.0
(bfun=bfun@entry=0x5555556ebb00 <safe_run_hooks_1>, nargs=nargs@entry=2, args=args@entry=0x7fffffffc7b0, hfun=hfun@entry=0x5555556ec1b0 <safe_run_hooks_error>, handlers=XIL(0x30))
at ../../src/eval.c:1558
#43 0x00005555556ec77e in safe_run_hook_funcall (nargs=2, args=0x7fffffffc890)
at ../../src/keyboard.c:1893
#44 0x0000555555788c1c in run_hook_with_args
(nargs=2, args=0x7fffffffc890, funcall=0x5555556ec6a0 <safe_run_hook_funcall>)
at ../../src/eval.c:2858
#45 0x000055555586a6db in safe_run_hooks_maybe_narrowed.isra.0
(hook=hook@entry=XIL(0xd290), w=<optimized out>) at ../../src/keyboard.c:1931
#46 0x00005555556ee908 in command_loop_1 () at ../../src/keyboard.c:1518
#47 0x0000555555787907 in internal_condition_case
(bfun=0x5555556ee430 <command_loop_1>, handlers=<optimized out>, hfun=0x5555556edc30 <cmd_error>)
at ../../src/eval.c:1474
#48 0x00005555556ec06e in command_loop_2 (handlers=handlers@entry=XIL(0x90))
at ../../src/keyboard.c:1133
#49 0x000055555578784a in internal_catch
(tag=<optimized out>, func=0x5555556ec040 <command_loop_2>, arg=XIL(0x90))
at ../../src/eval.c:1197
#50 0x00005555556ee3f3 in command_loop () at ../../src/keyboard.c:1111
#51 0x000055555586a57b in recursive_edit_1.isra.0 () at ../../src/keyboard.c:720
#52 0x00005555556f0411 in Frecursive_edit () at ../../src/keyboard.c:803
#53 0x00005555555b358d in main (argc=1, argv=0x7fffffffce68) at ../../src/emacs.c:2521 Lisp backtrace: Lisp backtrace: company-post-command ... completion-all-completions ... all-completions ... lsp-request-while-no-input → sit-for
So on Emacs 29.4 this is happening at the same place: in |
Same thing with Spacemacs + intelephense(PHP) with emacs 29.4.
It happens quite rarely actually. Most of time I'm just working without any issues. When I open emacs again, open the same project and do the same things which I was doing when it crashed (autocompleting the same item) - it just does it without crashing. So it's related rather to specific moment than to specific project code state. I'm not really sure but it seems to happen more often while working on a laptop in powersaving cpu profile while the A/C adapter is detached - so it may be some timeout related issue. But again: I'm really not sure about this thing, it's very hard to gather reliable statistics because as I mentioned above in my case the crashes are generally quite rare. |
You need to run gdb from the src directory of a local Emacs source code checkout (to load src/.gdbinit), and also probably build Emacs from the local checkout, to get a useful backtrace. etc/DEBUG has some useful info as well and is worth a read. |
Hi! I have face a similar issue with vanilla Emacs 29.4 on Arch Linux. I am using corfu, not I have found two bug reports in the GNU mailing lists that could be possibly be related:
As a temporary workaround, I have downgraded Emacs to 29.3. Since then, no crash has happened. I hope this information can help others. |
This looks right, and this bug is fixed in emacs 30 which will be released soon. |
I tried out the Emacs 30 pretest, which includes the patch, and haven't encountered the crash once in several hours. I think this issue is fixed now (and it seems to have turned out to solely be an upstream issue). (The corresponding commit on upstream master is a967efdd.) |
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
When using the Go or Python LSP, the LSP is initialized and after a few seconds it causes Emacs to crash. It seems to be related to this bug. I ran Emacs from the terminal and then reproduced the crash. The backtrace is in the screenshot below. I'm not sure how else to debug this, but I would be more than happy to provide any other information and/or help run tests on my end.
Steps to reproduce
On my machine, all I have to do is open a Python or Go project, let the LSP initialize, start typing code, and then it segfaults.
Expected behavior
Emacs doesn't segfault.
Which Language Server did you use?
lsp-python, lsp-go
OS
Linux
Error callstack
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: