Subject: bug#39081: 26.3; Emacs hangs if external SCIM input method is killed

From: Vladimir Nikishkin <[email-masked]>
Date: Sat, 11 Jan 2020 16:29:46 +0800

Here you are:

lockywolf@delllaptop:~/DevLinux/chibi-sicp$ gdb -p $(pgrep emacs)
/usr/share/gdb/python/gdb/command/prompt.py:48: SyntaxWarning: "is
not" with a literal. Did you mean "!="?
  if self.value is not '':
/usr/share/gdb/python/gdb/command/prompt.py:60: SyntaxWarning: "is
not" with a literal. Did you mean "!="?
  if self.value is not '':
GNU gdb (GDB) 8.3.1
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-slackware-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 3351
[New LWP 3352]
[New LWP 3353]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007fd647209966 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
(gdb) thread apply all bt

Thread 3 (Thread 0x7fd63f86a700 (LWP 3353)):
#0  0x00007fd646c6ae9f in poll () at /lib64/libc.so.6
#1  0x00007fd648d27cee in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007fd648d28053 in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#3  0x00007fd648f5d666 in  () at /usr/lib64/libgio-2.0.so.0
#4  0x00007fd648d4f98d in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007fd64720306b in start_thread () at /lib64/libpthread.so.0
#6  0x00007fd646c7672f in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7fd644952700 (LWP 3352)):
#0  0x00007fd646c6ae9f in poll () at /lib64/libc.so.6
#1  0x00007fd648d27cee in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007fd648d27e0f in g_main_context_iteration () at
/usr/lib64/libglib-2.0.so.0
#3  0x00007fd648d27e61 in  () at /usr/lib64/libglib-2.0.so.0
#4  0x00007fd648d4f98d in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007fd64720306b in start_thread () at /lib64/libpthread.so.0
#6  0x00007fd646c7672f in clone () at /lib64/libc.so.6

--Type <RET> for more, q to quit, c to continue without paging--
Thread 1 (Thread 0x7fd6449fcd00 (LWP 3351)):
#0  0x00007fd647209966 in pthread_cond_wait@@GLIBC_2.3.2 () at
/lib64/libpthread.so.0
#1  0x00007fd648bb22ef in _XReadEvents () at /usr/lib64/libX11.so.6
#2  0x00007fd648b9a7f5 in XIfEvent () at /usr/lib64/libX11.so.6
#3  0x00007fd648be021f in  () at /usr/lib64/libX11.so.6
#4  0x00007fd648be0bc2 in  () at /usr/lib64/libX11.so.6
#5  0x00007fd648be0e5c in _XimRead () at /usr/lib64/libX11.so.6
#6  0x00007fd648bd02f8 in  () at /usr/lib64/libX11.so.6
#7  0x00007fd648bbeca2 in XDestroyIC () at /usr/lib64/libX11.so.6
#8  0x00000000004d8a8c in  ()
#9  0x00000000004d0fb7 in  ()
#10 0x00000000004d16ab in  ()
#11 0x000000000042a76b in  ()
#12 0x00000000004c732b in  ()
#13 0x00000000004c757a in  ()
#14 0x00000000004c7606 in  ()
#15 0x00007fd648bb4827 in _XError () at /usr/lib64/libX11.so.6
#16 0x00007fd648bb1797 in  () at /usr/lib64/libX11.so.6
#17 0x00007fd648bb1825 in  () at /usr/lib64/libX11.so.6
--Type <RET> for more, q to quit, c to continue without paging--
#18 0x00007fd648bb26ed in _XReply () at /usr/lib64/libX11.so.6
#19 0x00007fd648ba8e56 in XQueryPointer () at /usr/lib64/libX11.so.6
#20 0x00007fd649254a5a in  () at /usr/lib64/libgdk-3.so.0
#21 0x00007fd6492726f7 in  () at /usr/lib64/libgdk-3.so.0
#22 0x00007fd6492461d8 in gdk_window_get_device_position_double () at
/usr/lib64/libgdk-3.so.0
#23 0x00007fd649254b81 in  () at /usr/lib64/libgdk-3.so.0
#24 0x00007fd6496581f9 in  () at /usr/lib64/libgtk-3.so.0
#25 0x00007fd64968597b in  () at /usr/lib64/libgtk-3.so.0
#26 0x00007fd648e0fc32 in g_closure_invoke () at /usr/lib64/libgobject-2.0.so.0
#27 0x00007fd648e218b6 in  () at /usr/lib64/libgobject-2.0.so.0
#28 0x00007fd648e2a277 in g_signal_emit_valist () at
/usr/lib64/libgobject-2.0.so.0
#29 0x00007fd648e2b232 in g_signal_emit () at /usr/lib64/libgobject-2.0.so.0
#30 0x00007fd649633b8a in  () at /usr/lib64/libgtk-3.so.0
#31 0x00007fd6494fedc2 in gtk_main_do_event () at /usr/lib64/libgtk-3.so.0
#32 0x00007fd649232a75 in  () at /usr/lib64/libgdk-3.so.0
#33 0x00007fd649263a42 in  () at /usr/lib64/libgdk-3.so.0
#34 0x00007fd648d27b2d in g_main_context_dispatch () at
/usr/lib64/libglib-2.0.so.0
#35 0x00007fd648d27d80 in  () at /usr/lib64/libglib-2.0.so.0
#36 0x00007fd648d27e0f in g_main_context_iteration () at
/usr/lib64/libglib-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#37 0x00007fd6494fe105 in gtk_main_iteration () at /usr/lib64/libgtk-3.so.0
#38 0x00000000004c7453 in  ()
#39 0x00000000004fe532 in  ()
#40 0x00000000004fe935 in  ()
#41 0x0000000000573242 in  ()
#42 0x0000000000573b11 in  ()
#43 0x0000000000574a86 in  ()
#44 0x00000000004faa03 in  ()
#45 0x00000000004faf8d in  ()
#46 0x00000000004fe6c7 in  ()
#47 0x00000000004fe83f in  ()
#48 0x00000000005b273f in  ()
#49 0x0000000000425d14 in  ()
#50 0x0000000000501998 in  ()
#51 0x00000000005030f8 in  ()
#52 0x000000000050479e in  ()
#53 0x0000000000569d7f in  ()
#54 0x00000000004f5bb8 in  ()
#55 0x0000000000569ce3 in  ()
--Type <RET> for more, q to quit, c to continue without paging--
#56 0x00000000004f5b46 in  ()
#57 0x00000000004f8bfc in  ()
#58 0x00000000004f8f30 in  ()
#59 0x000000000041c426 in  ()
#60 0x00007fd646b83e5b in __libc_start_main () at /lib64/libc.so.6
#61 0x000000000041d18a in  ()
(gdb)

сб, 11 янв. 2020 г. в 16:03, Eli Zaretskii <[email-masked]>:
>
> > From: Vladimir Nikishkin <[email-masked]>
> > Date: Sat, 11 Jan 2020 13:52:56 +0800
> >
> >
> > I am using Slackware-current (post 14.2), with SCIM input method enabled
> > in order to provide Chinese input method into other applications.
> > (I am aware about Emacs' build-in input method, and do not use SCIM
> > in Emacs itself. Still, Emacs is capable of receiving input from SCIM.)
> > If SCIM's process dies unexpectedly (such as if I issue sudo pkill -9
> > scim),
> > with probablility of about 1/2, Emacs hangs and stops responding to
> > input. I am using a GTK Emacs.
>
> Next time Emacs hangs, please attach GDB to it and show the backtrace
> for all the threads ("thread apply all bt" at GDB prompt).
>
> Thanks.

-- 
Yours sincerely, Vladimir Nikishkin