0

I'm using Ubuntu server without GUI(ssh into the server), so I use Emacs in terminal, but since the first day I use it, Ctrl-g will stop Emacs and send it to background multiple times one day, it is very frustrating, sometimes I can just use fg to get it back to foreground, and sometimes it just core dumped.

It happens when Emacs gets stuck (for a few seconds) or it is doing some tasks such as trying to show the new window of which-key or scrolling, and in the middle of this kind of process I tried to Ctrl-g to cancel the task, it will stop and exit, and Emacs will become a background job.

I cannot reproduce it as I want, but it happens multiple times when I'm using Emacs.

This following info is the latest info of core dump (coredumpctl info)

>> emacs
Job 1, 'emacs' has stopped
>> fg                                                                                                                                                                                                         
Send job 1, “emacs” to foreground
Job 1, 'emacs' has stopped
>> fg                                                                                                                                                                                                                
Send job 1, “emacs” to foreground
Job 1, 'emacs' has stopped
>> fg
Send job 1, “emacs” to foreground
Emacs is resuming after an emergency escape.
Garbage collection in progress; cannot auto-save now
but will instead do a real quit after garbage collection ends
Abort (and dump core)? (y or n) y
Fatal error 6: Aborted


$ coredumpctl info

       ....
       Message: Process 26910 (emacs) of user 1009 dumped core.

                Stack trace of thread 26910:
                #0  0x00007fefae383269 raise (libpthread.so.0)
                #1  0x0000000000546d02 terminate_due_to_signal (emacs-26.1)
                #2  0x000000000056d82c emacs_abort (emacs-26.1)
                #3  0x00000000005f2bb7 signal_or_quit (emacs-26.1)
                #4  0x00000000005f2b0e Fsignal (emacs-26.1)
                #5  0x0000000000544655 xsignal (emacs-26.1)
                #6  0x00000000005f3007 xsignal1 (emacs-26.1)
                #7  0x00000000004d7510 Fcheck_coding_system (emacs-26.1)
                #8  0x00000000004daadd code_convert_string (emacs-26.1)
                #9  0x00000000004dada9 code_convert_string_norecord (emacs-26.1)
                #10 0x00000000004dadfc decode_file_name (emacs-26.1)
                #11 0x0000000000591c99 Fexpand_file_name (emacs-26.1)
                #12 0x0000000000591886 Fexpand_file_name (emacs-26.1)
                #13 0x000000000059c394 Fdo_auto_save (emacs-26.1)
                #14 0x0000000000549523 shut_down_emacs (emacs-26.1)
                #15 0x0000000000546cb2 terminate_due_to_signal (emacs-26.1)
                #16 0x000000000056d82c emacs_abort (emacs-26.1)
                #17 0x000000000055ed5f handle_interrupt (emacs-26.1)
                #18 0x000000000055eb59 handle_interrupt_signal (emacs-26.1)
                #19 0x000000000056cefa deliver_process_signal (emacs-26.1)
                #20 0x000000000055eb77 deliver_interrupt_signal (emacs-26.1)
                #21 0x00007fefae383390 __restore_rt (libpthread.so.0)
                #22 0x00000000005d14d1 sweep_conses (emacs-26.1)
                #23 0x00000000005d1d8c gc_sweep (emacs-26.1)
                #24 0x00000000005cfa60 garbage_collect_1 (emacs-26.1)
                #25 0x00000000005d00dc Fgarbage_collect (emacs-26.1)
                #26 0x00000000005447ec maybe_gc (emacs-26.1)
                #27 0x00000000005f5bde Ffuncall (emacs-26.1)
                #28 0x000000000063f2af exec_byte_code (emacs-26.1)
                #29 0x00000000005f66c7 funcall_lambda (emacs-26.1)
                #30 0x00000000005f6437 apply_lambda (emacs-26.1)
                #31 0x00000000005f494b eval_sub (emacs-26.1)
                #32 0x00000000005f1725 FletX (emacs-26.1)
                #33 0x00000000005f4344 eval_sub (emacs-26.1)
                #34 0x00000000005f0996 Fprogn (emacs-26.1)
                #35 0x00000000005f6995 funcall_lambda (emacs-26.1)
                #36 0x00000000005f6437 apply_lambda (emacs-26.1)
                #37 0x00000000005f4b19 eval_sub (emacs-26.1)
                #38 0x00000000005f1725 FletX (emacs-26.1)
                #39 0x00000000005f4344 eval_sub (emacs-26.1)
                #40 0x00000000005f0996 Fprogn (emacs-26.1)
                #41 0x00000000005f6995 funcall_lambda (emacs-26.1)

You can see from the info here, that Emacs becomes a background job multiple times, and I use fg to get it back to foreground, but it will end with core-dump.

Similar link: https://stackoverflow.com/questions/51926876/emacs-26-1-hangs-when-tramp-is-trying-to-save-a-file-over-ssh

I found a useful link about emergency escape, but how to get rid of this frustrating issue?

FYI:

Ubuntu 16.04.3 64bit LTS

Emacs 26.1

  • Any crash (e.g. core dump) in Emacs indicates a bug. Use M-x report-emacs-bug, providing a step-by-step recipe to reproduce the problem starting with emacs -Q (no init file). – Drew Mar 14 at 14:28
  • @Drew Like I said, I cannot reproduce this problem as I want, but it happens. And I'm using my init.el which contains a lot of configs. – CodyChan Mar 15 at 2:14
  • Please consider reporting the problem anyway, providing as much info as you can. That will help. Regardless of what config you have (e.g. lots of packages and customizations), a crash means a bug in Emacs itself. – Drew Mar 15 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.