3

I'm running emacs 26.2 RC1 compiled with debugging features on Debian 8 Jessie 64bit. Sometimes the Emacs GUI will freeze and all the buffers will go black. I've tried hitting C-g a number of times and ESC but it doesn't listen. It freezes now about once a day, sometimes twice. It seems to freeze more when I run the GUI Emacs over X2go (within XFCE or using EXWM).

It froze today and I got some information from the frozen process.

prtstat output

  : prtstat <Emacs PID>

  output
  : Process: gdb                State: S (sleeping)
  :   CPU#:  2          TTY: 0:0    Threads: 1
  : Process, Group and Session IDs
  :   Process ID: 31419       Parent ID: 30824
  :     Group ID: 30667      Session ID: 30667
  :   T Group ID: -1
  : 
  : Page Faults
  :   This Process    (minor major):   815094         0
  :   Child Processes (minor major):     6942         0
  : CPU Times
  :   This Process    (user system guest blkio):  19.14  57.47   0.00   0.00
  :   Child processes (user system guest):         0.05   0.00   0.00
  : Memory
  :   Vsize:       120 MB    
  :   RSS:         83 MB             RSS Limit: 18446744073709 MB
  :   Code Start:  0x400000          Code Stop:  0x973954  
  :   Stack Start: 0x7ffe02196e70
  :   Stack Pointer (ESP):          0    Inst Pointer (EIP):          0
  : Scheduling
  :   Policy: normal
  :   Nice:   0          RT Priority: 0 (non RT)

lsof output

  : lsof -a -p <Emacs PID>

  : COMMAND   PID USER   FD   TYPE             DEVICE SIZE/OFF      NODE NAME
  : gdb     31419 map7  cwd    DIR              253,1    28672  12189697 /home/map7
  : gdb     31419 map7  rtd    DIR              253,0     4096         2 /
  : gdb     31419 map7  txt    REG              253,0  5797744   1322903 /usr/bin/gdb
  : gdb     31419 map7  mem    REG              253,0    78392   1841863 /usr/lib/debug/lib/x86_64-linux-gnu/libnss_dns-2.19.so
  : gdb     31419 map7  mem    REG              253,0   668568   1841847 /usr/lib/debug/lib/x86_64-linux-gnu/libpthread-2.19.so
  : gdb     31419 map7  mem    REG              253,0  1202056    916102 /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28.43.4
  : gdb     31419 map7  mem    REG              253,0   248824    915814 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0
  : gdb     31419 map7  mem    REG              253,0   696008    917107 /usr/lib/x86_64-linux-gnu/libfreetype.so.6.11.1
  : gdb     31419 map7  mem    REG              253,0  1465816    916615 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.1
  : gdb     31419 map7  mem    REG              253,0   294792    523534 /lib/x86_64-linux-gnu/libdbus-1.so.3.8.14
  : gdb     31419 map7  mem    REG              253,0  2747976    916834 /usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.2.0.0
  : gdb     31419 map7  mem    REG              253,0  1205824    916884 /usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.2.0.0
  : gdb     31419 map7  mem    REG              253,0  1051056    523348 /lib/x86_64-linux-gnu/libm-2.19.so
  : gdb     31419 map7  mem    REG              253,0   225992    916275 /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.5
  : gdb     31419 map7  mem    REG              253,0  1015952    926835 /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
  : gdb     31419 map7  mem    REG              253,0   138016    917854 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
  : gdb     31419 map7  mem    REG              253,0  1319088    916547 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
  : gdb     31419 map7  mem    REG              253,0  1107040    551691 /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1
  : gdb     31419 map7  mem    REG              253,0   339064    918017 /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.1
  : gdb     31419 map7  mem    REG              253,0  1541864    921939 /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4200.1
  : gdb     31419 map7  mem    REG              253,0  1131984    925746 /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.0
  : gdb     31419 map7  mem    REG              253,0   159352    925800 /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0.21409.1
  : gdb     31419 map7  mem    REG              253,0   319832    916164 /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3600.8
  : gdb     31419 map7  mem    REG              253,0   763224    925831 /usr/lib/x86_64-linux-gnu/libgdk-3.so.0.1400.5
  : gdb     31419 map7  mem    REG              253,0  7031592    925830 /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.1400.5
  : gdb     31419 map7  mem    REG              253,0   238848    933899 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.4.0
  : gdb     31419 map7  mem    REG              253,0   420408    917154 /usr/lib/x86_64-linux-gnu/libtiff.so.4.3.6
  : gdb     31419 map7  mem    REG              253,0   216024   1841864 /usr/lib/debug/lib/x86_64-linux-gnu/libnss_files-2.19.so
  : gdb     31419 map7  mem    REG              253,0   200560   1841866 /usr/lib/debug/lib/x86_64-linux-gnu/libnss_nis-2.19.so
  : gdb     31419 map7  mem    REG              253,0   486256   1841861 /usr/lib/debug/lib/x86_64-linux-gnu/libnsl-2.19.so
  : gdb     31419 map7  mem    REG              253,0   113072   1841862 /usr/lib/debug/lib/x86_64-linux-gnu/libnss_compat-2.19.so
  : gdb     31419 map7  mem    REG              253,0   304544   1841869 /usr/lib/debug/lib/x86_64-linux-gnu/libresolv-2.19.so
  : gdb     31419 map7  mem    REG              253,0  8371680   1841855 /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so
  : gdb     31419 map7  mem    REG              253,0    31544    523387 /lib/x86_64-linux-gnu/libthread_db-1.0.so
  : gdb     31419 map7  mem    REG              253,0    85232   1841858 /usr/lib/debug/lib/x86_64-linux-gnu/libdl-2.19.so
  : gdb     31419 map7  mem    REG              253,0    60256   1841853 /usr/lib/debug/lib/x86_64-linux-gnu/libanl-2.19.so
  : gdb     31419 map7  mem    REG              253,0   142624   1841870 /usr/lib/debug/lib/x86_64-linux-gnu/librt-2.19.so
  : gdb     31419 map7  mem    REG              253,0  2300072   1841859 /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.19.so
  : gdb     31419 map7  mem    REG              253,0 32643464   2519259 /opt/emacs-26.1.91/bin/emacs-26.1.91
  : gdb     31419 map7  mem    REG              253,0   681488   1841852 /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.19.so
  : gdb     31419 map7  mem    REG              253,0  1738176    523327 /lib/x86_64-linux-gnu/libc-2.19.so
  : gdb     31419 map7  mem    REG              253,0   141752    523933 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
  : gdb     31419 map7  mem    REG              253,0   165856    523939 /lib/x86_64-linux-gnu/libexpat.so.1.6.0
  : gdb     31419 map7  mem    REG              253,0    10680    523390 /lib/x86_64-linux-gnu/libutil-2.19.so
  : gdb     31419 map7  mem    REG              253,0   137384    523316 /lib/x86_64-linux-gnu/libpthread-2.19.so
  : gdb     31419 map7  mem    REG              253,0  3614896    916223 /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
  : gdb     31419 map7  mem    REG              253,0   109144    523602 /lib/x86_64-linux-gnu/libz.so.1.2.8
  : gdb     31419 map7  mem    REG              253,0   171800    523303 /lib/x86_64-linux-gnu/libtinfo.so.5.9
  : gdb     31419 map7  mem    REG              253,0   151120    523917 /lib/x86_64-linux-gnu/libncurses.so.5.9
  : gdb     31419 map7  mem    REG              253,0    14664    523339 /lib/x86_64-linux-gnu/libdl-2.19.so
  : gdb     31419 map7  mem    REG              253,0   297040    523411 /lib/x86_64-linux-gnu/libreadline.so.6.3
  : gdb     31419 map7  mem    REG              253,0   140928    523322 /lib/x86_64-linux-gnu/ld-2.19.so
  : gdb     31419 map7    0r   CHR                1,3      0t0      9218 /dev/null
  : gdb     31419 map7    1w   REG              253,1     1593  12189907 /home/map7/.xsession-x2go-ltsp-errors
  : gdb     31419 map7    2w   REG              253,1     1593  12189907 /home/map7/.xsession-x2go-ltsp-errors
  : gdb     31419 map7    3u  unix 0xffff970d36385800      0t0 139550038 socket
  : gdb     31419 map7    4u  unix 0xffff971cc2633800      0t0 139550039 socket
  : gdb     31419 map7    5r  FIFO               0,10      0t0 139550040 pipe
  : gdb     31419 map7    6w  FIFO               0,10      0t0 139550040 pipe

pstack output : pstack

  : crawl: Input/output error

strace output when I hit M-x in the frozen emacs. It still seems to be listening and produced the following output. : strace -s 99 -ffp 31419

  : Process 31419 attached
  : rt_sigsuspend([], 8)                    = ? ERESTARTNOHAND (To be restarted if no handler)
  : --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_TRAPPED, si_pid=31529, si_uid=1000, si_status=SIGIO, si_utime=155, si_stime=422} ---
  : rt_sigreturn()                          = -1 EINTR (Interrupted system call)
  : wait4(-1, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGIO}], WNOHANG|__WCLONE, NULL) = 31530
  : tkill(31530, SIG_0)                     = 0
  : ptrace(PTRACE_CONT, 31530, 0x1, SIGIO)  = 0
  : wait4(-1, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGIO}], WNOHANG|__WCLONE, NULL) = 31529
  : tkill(31529, SIG_0)                     = 0
  : ptrace(PTRACE_CONT, 31529, 0x1, SIGIO)  = 0
  : wait4(-1, 0x7ffe021966b4, WNOHANG|__WCLONE, NULL) = 0
  : wait4(-1, 0x7ffe021966b4, WNOHANG, NULL) = 0
  : open("/proc/31515/status", O_RDONLY|O_CLOEXEC) = 7
  : fstat(7, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
  : mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fce9b19a000
  : read(7, "Name:\temacs\nUmask:\t0002\nState:\tS (sleeping)\nTgid:\t31515\nNgid:\t0\nPid:\t31515\nPPid:\t31419\nTracerPid:\t3"..., 1024) = 1024
  : close(7)                                = 0
  : munmap(0x7fce9b19a000, 4096)            = 0
  : rt_sigsuspend([], 8)                    = ? ERESTARTNOHAND (To be restarted if no handler)
  : --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_TRAPPED, si_pid=31530, si_uid=1000, si_status=SIGIO, si_utime=145, si_stime=422} ---
  : rt_sigreturn()                          = -1 EINTR (Interrupted system call)
  : wait4(-1, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGIO}], WNOHANG|__WCLONE, NULL) = 31530
  : tkill(31530, SIG_0)                     = 0
  : ptrace(PTRACE_CONT, 31530, 0x1, SIGIO)  = 0
  : wait4(-1, 0x7ffe021966b4, WNOHANG|__WCLONE, NULL) = 0
  : wait4(-1, 0x7ffe021966b4, WNOHANG, NULL) = 0
  : open("/proc/31515/status", O_RDONLY|O_CLOEXEC) = 7
  : fstat(7, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
  : mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fce9b19a000
  : read(7, "Name:\temacs\nUmask:\t0002\nState:\tS (sleeping)\nTgid:\t31515\nNgid:\t0\nPid:\t31515\nPPid:\t31419\nTracerPid:\t3"..., 1024) = 1024
  : close(7)                                = 0
  : munmap(0x7fce9b19a000, 4096)            = 0
  : rt_sigsuspend([], 8)                    = ? ERESTARTNOHAND (To be restarted if no handler)
  : --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_TRAPPED, si_pid=31530, si_uid=1000, si_status=SIGIO, si_utime=145, si_stime=422} ---
  : rt_sigreturn()                          = -1 EINTR (Interrupted system call)
  : wait4(-1, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGIO}], WNOHANG|__WCLONE, NULL) = 31530
  : tkill(31530, SIG_0)                     = 0
  : ptrace(PTRACE_CONT, 31530, 0x1, SIGIO)  = 0
  : wait4(-1, 0x7ffe021966b4, WNOHANG|__WCLONE, NULL) = 0
  : wait4(-1, 0x7ffe021966b4, WNOHANG, NULL) = 0
  : open("/proc/31515/status", O_RDONLY|O_CLOEXEC) = 7
  : fstat(7, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
  : mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fce9b19a000
  : read(7, "Name:\temacs\nUmask:\t0002\nState:\tS (sleeping)\nTgid:\t31515\nNgid:\t0\nPid:\t31515\nPPid:\t31419\nTracerPid:\t3"..., 1024) = 1024
  : close(7)                                = 0
  : munmap(0x7fce9b19a000, 4096)            = 0
  : rt_sigsuspend([], 8)                    = ? ERESTARTNOHAND (To be restarted if no handler)
  : --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_TRAPPED, si_pid=31530, si_uid=1000, si_status=SIGIO, si_utime=145, si_stime=422} ---
  : rt_sigreturn()                          = -1 EINTR (Interrupted system call)
  : wait4(-1, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGIO}], WNOHANG|__WCLONE, NULL) = 31530
  : tkill(31530, SIG_0)                     = 0
  : ptrace(PTRACE_CONT, 31530, 0x1, SIGIO)  = 0
  : wait4(-1, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGIO}], WNOHANG|__WCLONE, NULL) = 31529
  : tkill(31529, SIG_0)                     = 0
  : ptrace(PTRACE_CONT, 31529, 0x1, SIGIO)  = 0
  : wait4(-1, 0x7ffe021966b4, WNOHANG|__WCLONE, NULL) = 0
  : wait4(-1, 0x7ffe021966b4, WNOHANG, NULL) = 0
  : open("/proc/31515/status", O_RDONLY|O_CLOEXEC) = 7
  : fstat(7, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
  : mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fce9b19a000
  : read(7, "Name:\temacs\nUmask:\t0002\nState:\tS (sleeping)\nTgid:\t31515\nNgid:\t0\nPid:\t31515\nPPid:\t31419\nTracerPid:\t3"..., 1024) = 1024
  : close(7)                                = 0
  : munmap(0x7fce9b19a000, 4096)            = 0
  : rt_sigsuspend([], 8)                    = ? ERESTARTNOHAND (To be restarted if no handler)
  : --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_TRAPPED, si_pid=31529, si_uid=1000, si_status=SIGIO, si_utime=155, si_stime=422} ---
  : rt_sigreturn()                          = -1 EINTR (Interrupted system call)
  : wait4(-1, 0x7ffe021966b4, WNOHANG|__WCLONE, NULL) = 0
  : wait4(-1, 0x7ffe021966b4, WNOHANG, NULL) = 0
  : open("/proc/31515/status", O_RDONLY|O_CLOEXEC) = 7
  : fstat(7, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
  : mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fce9b19a000
  : read(7, "Name:\temacs\nUmask:\t0002\nState:\tS (sleeping)\nTgid:\t31515\nNgid:\t0\nPid:\t31515\nPPid:\t31419\nTracerPid:\t3"..., 1024) = 1024
  : close(7)                                = 0
  : munmap(0x7fce9b19a000, 4096)            = 0
  : rt_sigsuspend([], 8Process 31419 detached
  :  <detached ...>

Update

Updated to Emacs 26.2 RC1 from 26.1.91 and it is still crashing (09/04/2019 @ 12:59pm). This time I was trying to open up a remote file. I hit C-g a number of times but it wouldn't unfreeze my display. All the buffers went black except for the vertical and horizontal splits between the buffers. I could still strace to the PID for emacs and if I hit C-g then this would display;

https://pastebin.com/vs4ae9mE

Update

Upgraded from EXWM 0.20 to EXWM 0.22 and I'm testing it out over the next 24hrs to see if it crashes. I'll be working remote tomorrow which is the real test.

Update

Crashed whilst using EXWM 0.22 remotely through x2go. Now testing without EXWM, but still through x2go. Now testing X2go -> XFCE -> with emacs (no exwm installed). Let's see if this crashes.

  • 1
    Hopefully someone will be able to offer some help here. But I suggest you use M-x report-emacs-bug, providing the same information. – Drew Apr 4 at 1:59
  • If you are able to build Emacs from source and run it under gdb, then you may be able to better assist the Emacs team to debug your particular issue. Be sure to cd into the src directory before launching Emacs so you get the .gdbinit goodies that come with the source code .... – lawlist Apr 4 at 2:13
  • 4
    When Emacs freezes try signaling it from a shell with pkill -SIGUSR2 emacs (or similar). Maybe try that three times. – Tobias Apr 9 at 7:19
  • 1
    How long does it freeze? Is it recovering after a certain time (wait some minutes)? If so, maybe this is a network timeout while opening remote files. – jue Apr 9 at 10:43
  • 1
    Have you tried the lucid, gtk or terminal versions of Emacs? Are there differences in freezing behavior? – jue Apr 9 at 10:46

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.