Public bug reported:
Binary package hint: emacs21
I have experienced occasional hangs in Emacs for some time now. This has
prompted me to compile Emacs with debug symbols to be able to track it
down, and just now I managed to capture a hang shortly after startup in
gdb. The backtrace shows a deadlock in a malloc mutex due to mallopt()
being called from a signal handler that has interrupted an earlier
mallopt() call:
(gdb) bt
#0 0x00007fcb51e1c24e in __lll_lock_wait_private () from /lib/libc.so.6
#1 0x00007fcb51db0500 in _L_lock_3213 () from /lib/libc.so.6
#2 0x00007fcb51daadd5 in mallopt () from /lib/libc.so.6
#3 0x00000000005579ab in emacs_blocked_malloc (size=36)
at /usr/local/debs/hardy-local/emacs21-21.4a+1/src/alloc.c:732
#4 0x00007fcb517245a9 in ?? () from /usr/lib/libxcb.so.1
#5 0x00007fcb51724aa7 in xcb_poll_for_event () from /usr/lib/libxcb.so.1
#6 0x00007fcb5231cd75 in ?? () from /usr/lib/libX11.so.6
#7 0x00007fcb5231d426 in _XEventsQueued () from /usr/lib/libX11.so.6
#8 0x00007fcb52306fcd in XPending () from /usr/lib/libX11.so.6
#9 0x00000000004b5bbf in XTread_socket (sd=1376344544, bufp=0x7fff5c4158a0,
numchars=4096, expected=1)
at /usr/local/debs/hardy-local/emacs21-21.4a+1/src/xterm.c:9960
#10 0x00000000004f10ca in read_avail_input (expected=1)
at /usr/local/debs/hardy-local/emacs21-21.4a+1/src/keyboard.c:6169
#11 0x00000000004f13ee in input_available_signal (signo=29)
at /usr/local/debs/hardy-local/emacs21-21.4a+1/src/keyboard.c:6327
#12 <signal handler called>
#13 0x00007fcb51daa2b6 in malloc_consolidate () from /lib/libc.so.6
#14 0x00007fcb51daade1 in mallopt () from /lib/libc.so.6
#15 0x000000000055962e in allocate_vectorlike (len=5, type=MEM_TYPE_VECTOR)
at /usr/local/debs/hardy-local/emacs21-21.4a+1/src/alloc.c:2234
#16 0x00000000005596f1 in allocate_vector (nslots=5)
at /usr/local/debs/hardy-local/emacs21-21.4a+1/src/alloc.c:2254
I have verified that __lll_lock_wait_private never returns.
Judging from the libc documentation regarding Signal Handling and
Nonreentrant Functions (24.4.6), I believe the bug is that Emacs does
rather too much work from within a signal handler.
I'm using hardy and emacs21 21.4a+1-5.3ubuntu1.1. The complete gdb
backtrace is attached.
** Affects: emacs21 (Ubuntu)
Importance: Undecided
Status: New
--
Emacs hangs occasionally due to malloc calls in signal handler
https://bugs.launchpad.net/bugs/291871
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs