Bug 1035922

Summary: emacs enters infinite loop and hogs CPU when typing
Product: [Fedora] Fedora Reporter: Jason Vas Dias <jason.vas.dias>
Component: emacsAssignee: Petr Hracek <phracek>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: jonathan.underwood, ovasik, phracek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 19:26:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
gdb stack trace of all threads showing infinite recursion in thread 3 none

Description Jason Vas Dias 2013-11-28 20:58:49 UTC
Created attachment 830386 [details]
gdb stack trace of all threads showing infinite recursion in thread 3

Description of problem:

I was typing '( int argc,', on a main() function, in a "C++" text file,
with 2 frames available, and just after I typed ',', emacs froze and the spinning fedora 'waiting' icon appears when the mouse is over any emacs frame
(I had 2) . It is still frozen half an hour later and is consuming 99.8% of
cpu time according to top:

 PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND   
 5383 jason     20   0 1507772 676824  20256 R  99.8  4.1  36:42.89 emacs

Here are some diagnostics :

$ pstack 5383 
Thread 3 (Thread 0x7fae60ab4700 (LWP 5384)):
#0  0x0000003d884eb7fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x0000003422c480e4 in g_main_context_iterate.isra.22 () from /lib64/libglib-2.0.so.0
#2  0x0000003422c4854a in g_main_loop_run () from /lib64/libglib-2.0.so.0
#3  0x0000003423cc6db6 in gdbus_shared_thread_func () from /lib64/libgio-2.0.so.0
#4  0x0000003422c6c165 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x0000003d88c07c53 in start_thread (arg=0x7fae60ab4700) at pthread_create.c:308
#6  0x0000003d884f5dbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
Thread 2 (Thread 0x7fae5bab6700 (LWP 5387)):
#0  0x0000003d884eb7fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x0000003422c480e4 in g_main_context_iterate.isra.22 () from /lib64/libglib-2.0.so.0
#2  0x0000003422c481ec in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007fae5babd9cd in dconf_gdbus_worker_thread () from /usr/lib64/gio/modules/libdconfsettings.so
#4  0x0000003422c6c165 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x0000003d88c07c53 in start_thread (arg=0x7fae5bab6700) at pthread_create.c:308
#6  0x0000003d884f5dbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
Thread 1 (Thread 0x7fae67ba4a80 (LWP 5383)):
#0  0x0000000000586825 in exec_byte_code ()
#1  0x000000000054f67f in funcall_lambda ()
#2  0x000000000054f98b in Ffuncall ()
#3  0x000000000058492b in exec_byte_code ()
#4  0x000000000054f67f in funcall_lambda ()
#5  0x000000000054f98b in Ffuncall ()
#6  0x000000000058492b in exec_byte_code ()
#7  0x000000000054f67f in funcall_lambda ()
#8  0x000000000054f98b in Ffuncall ()
#9  0x000000000058492b in exec_byte_code ()
#10 0x000000000054f67f in funcall_lambda ()
#11 0x000000000054f98b in Ffuncall ()
#12 0x000000000058492b in exec_byte_code ()
#13 0x000000000054f67f in funcall_lambda ()
#14 0x000000000054f98b in Ffuncall ()
#15 0x000000000054c118 in Fcall_interactively ()
#16 0x000000000054fafc in Ffuncall ()
#17 0x0000000000551454 in call3 ()
#18 0x00000000004eb489 in command_loop_1 ()
#19 0x000000000054e053 in internal_condition_case ()
#20 0x00000000004dcb9e in command_loop_2 ()
#21 0x000000000054df2e in internal_catch ()
#22 0x00000000004e1287 in recursive_edit_1 ()
#23 0x00000000004e1584 in Frecursive_edit ()
#24 0x0000000000417085 in main ()


$ echo 't a a where' > gdb.cmd; gdb /usr/bin/emacs -p 5383 -x gdb.cmd 2>&1 </dev/null | tee /tmp/emacs.crash.backtrace
Thread 3 (Thread 0x7fae60ab4700 (LWP 5384)):
#0  0x0000003d884eb7fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x0000003422c480e4 in g_main_context_poll (priority=2147483647, n_fds=3, 
    fds=0x7fae5c0010c0, timeout=-1, context=0xbf3a30) at gmain.c:3995
#2  g_main_context_iterate (context=0xbf3a30, block=block@entry=1, 
    dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3696
#3  0x0000003422c4854a in g_main_loop_run (loop=0xbf39c0) at gmain.c:3895
#4  0x0000003423cc6db6 in gdbus_shared_thread_func (user_data=0xbf3a00)
    at gdbusprivate.c:278
#5  0x0000003422c6c165 in g_thread_proxy (data=0xc6ecf0) at gthread.c:798
#6  0x0000003d88c07c53 in start_thread (arg=0x7fae60ab4700)
    at pthread_create.c:308
#7  0x0000003d884f5dbd in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7fae5bab6700 (LWP 5387)):
#0  0x0000003d884eb7fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x0000003422c480e4 in g_main_context_poll (priority=2147483647, n_fds=1, 
    fds=0x7fae540010c0, timeout=-1, context=0xe89fc0) at gmain.c:3995
#2  g_main_context_iterate (context=context@entry=0xe89fc0, 
    block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at gmain.c:3696
#3  0x0000003422c481ec in g_main_context_iteration (context=0xe89fc0, 
    may_block=1) at gmain.c:3762
#4  0x00007fae5babd9cd in dconf_gdbus_worker_thread ()
   from /usr/lib64/gio/modules/libdconfsettings.so
#5  0x0000003422c6c165 in g_thread_proxy (data=0xc7f320) at gthread.c:798
#6  0x0000003d88c07c53 in start_thread (arg=0x7fae5bab6700)
    at pthread_create.c:308
#7  0x0000003d884f5dbd in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7fae67ba4a80 (LWP 5383)):
#0  mark_object (arg=<optimized out>)
    at /usr/src/debug/emacs-24.3/src/alloc.c:5906
#1  0x0000000000537898 in mark_object (arg=<optimized out>)
    at /usr/src/debug/emacs-24.3/src/alloc.c:5812
#2  0x0000000000537cf6 in mark_vectorlike (ptr=0xd78d00)
    at /usr/src/debug/emacs-24.3/src/alloc.c:5501
#3  0x000000000053782a in mark_object (arg=<optimized out>)
    at /usr/src/debug/emacs-24.3/src/alloc.c:5794
#4  0x0000000000537854 in mark_object (arg=<optimized out>)
    at /usr/src/debug/emacs-24.3/src/alloc.c:5808
....
$ tail -16 /tmp/emacs.crash.backtrace 
    at /usr/src/debug/emacs-24.3/src/eval.c:1060
#8397 0x00000000004e1287 in command_loop ()
    at /usr/src/debug/emacs-24.3/src/keyboard.c:1147
#8398 recursive_edit_1 () at /usr/src/debug/emacs-24.3/src/keyboard.c:779
#8399 0x00000000004e1584 in Frecursive_edit ()
    at /usr/src/debug/emacs-24.3/src/keyboard.c:843
#8400 0x0000000000417085 in main (argc=<optimized out>, argv=0x7fff547caee8)
    at /usr/src/debug/emacs-24.3/src/emacs.c:1528
Missing separate debuginfos, use: debuginfo-install at-spi2-atk-2.8.1-1.fc19.x86_64 at-spi2-core-2.8.0-3.fc19.x86_64 bzip2-libs-1.0.6-8.fc19.x86_64 dbus-glib-0.100-5.fc19.x86_64 dconf-0.16.0-2.fc19.x86_64 expat-2.1.0-5.fc19.x86_64 gmp-5.1.1-2.fc19.x86_64 gvfs-1.16.3-2.fc19.x86_64 harfbuzz-0.9.19-1.fc19.x86_64 jbigkit-libs-2.0-8.fc19.x86_64 lcms-libs-1.19-9.fc19.x86_64 libXau-1.0.8-1.fc19.x86_64 libXcomposite-0.4.4-3.fc19.x86_64 libXcursor-1.1.14-1.fc19.x86_64 libXdamage-1.1.4-3.fc19.x86_64 libXext-1.3.2-1.fc19.x86_64 libXfixes-5.0.1-1.fc19.x86_64 libXi-1.7.2-1.fc19.x86_64 libXinerama-1.1.3-1.fc19.x86_64 libXrandr-1.4.1-1.fc19.x86_64 libXt-1.1.4-5.fc19.x86_64 libXxf86vm-1.1.3-1.fc19.x86_64 libbluray-0.4.0-1.fc19.x86_64 libcroco-0.6.8-2.fc19.x86_64 libdrm-2.4.47-1.fc19.x86_64 libffi-3.0.13-4.fc19.x86_64 libtasn1-3.3-1.fc19.x86_64 libtool-ltdl-2.4.2-21.fc19.x86_64 libuuid-2.23.2-4.fc19.x86_64 libwayland-client-1.2.0-1.fc19.x86_64 libwayland-cursor-1.2.0-1.fc19.x86_64 libwayland-server-1.2.0-1.fc19.x86_64 libxcb-1.9-3.fc19.x86_64 libxkbcommon-0.3.0-1.fc19.x86_64 mesa-libEGL-9.2.3-1.20131114.fc19.x86_64 mesa-libGL-9.2.3-1.20131114.fc19.x86_64 mesa-libgbm-9.2.3-1.20131114.fc19.x86_64 mesa-libglapi-9.2.3-1.20131114.fc19.x86_64 nettle-2.6-2.fc19.x86_64 oxygen-gtk3-1.2.0-1.fc19.x86_64 p11-kit-0.18.7-1.fc19.x86_64 pixman-0.30.0-1.fc19.x86_64 systemd-libs-204-17.fc19.x86_64 xz-libs-5.1.2-4alpha.fc19.x86_64
(gdb) quit
A debugging session is active.

        Inferior 1 [process 5383] will be detached.

Quit anyway? (y or n) [answered Y; input not from terminal]
Detaching from program: /usr/bin/emacs, process 5383

(complete backtrace attached).


Version-Release number of selected component (if applicable):

emacs-24.3-11.fc19.x86_64

How reproducible:

?

Steps to Reproduce:
See above.

Actual results:
Emacs entered infinite recursive loop and stopped interacting when I typed ','.

Expected results:
Nothing I type should make emacs do this.

Additional info:

Comment 1 Fedora End Of Life 2015-01-09 20:43:24 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2015-02-17 19:26:39 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.