From unknown Sat Aug 16 10:50:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#45927 <45927@debbugs.gnu.org> To: bug#45927 <45927@debbugs.gnu.org> Subject: Status: Emacs hangs every few week due to xim Reply-To: bug#45927 <45927@debbugs.gnu.org> Date: Sat, 16 Aug 2025 17:50:20 +0000 retitle 45927 Emacs hangs every few week due to xim reassign 45927 emacs submitter 45927 Joey Green severity 45927 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 17 03:22:42 2021 Received: (at submit) by debbugs.gnu.org; 17 Jan 2021 08:22:42 +0000 Received: from localhost ([127.0.0.1]:44519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l13KY-0007fZ-Ly for submit@debbugs.gnu.org; Sun, 17 Jan 2021 03:22:42 -0500 Received: from lists.gnu.org ([209.51.188.17]:54398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0xdz-0007KF-Gn for submit@debbugs.gnu.org; Sat, 16 Jan 2021 21:18:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0xdz-00009i-5g for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 21:18:19 -0500 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:41273) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0xdw-000615-RR for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 21:18:18 -0500 Received: by mail-ed1-x532.google.com with SMTP id bm23so1540145edb.8 for ; Sat, 16 Jan 2021 18:18:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=MojgiKvwnFFe7XKFVH7uKLl3FIOe1O/Whn+0zjZIRgw=; b=jXsag1N47sJQwiI4LH8ofl0xXOvtKH/+5AChJf/FRHfsJ2PSxgdFRSxxWciLmiYRaZ XjKveIyoFxDT5pUM13/0rW1EUJUaIpYqadQB80sgeUZUN/V2TkDxnD2IpVlMkDsGnkHR /FXT8IfKTi98k04AhVXMb9nd6YLJwMzwK58pcqIcXdUWkDjFPxd0+dV5ydGs/z/WMSEw 8Etc9c28an1qwWZ2C0k9lEGwA56vAiHHppC+ZhyYeUnnpTYp/5hrKVfqEyB7oLuWHiGc RTBcFUG4+bJTGiOZeDP0PFiAVROUnD2LmUxaKP0tB/4xlINwnbUW/imCuNafBPRoqA8B rzHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=MojgiKvwnFFe7XKFVH7uKLl3FIOe1O/Whn+0zjZIRgw=; b=MZPyDpLkhk40U+HUFNUUVkex9inyNt9Z5uwrOZNxIC9yGCQpb1j4kuGfDvWRnwk4dV zlEtet0PsQCjpkmNgI9SeWsIXQGR32FcEJox5B1Bxj1T19rkfV6fou5rlSV/+leP4/Cl Hw8iuua3UjIVYJt/UoDwlSPa8PywvArylXu8ymCni2AHv0H4TAjxXfxa36YOiHFY5kFu t+T20jTPeOrMvKiZ59r1e2igoZCWgkxxWhzO2V2VNIkgP4HCLBt0iQ7eIL7GRZ28H4wO fJjL6jeqlr2O0TnVP9dq3IT285+YUA7+3K7hm+SuQu4qolC7O/AqNNcESRiYTq5Y9gcB Q5dQ== X-Gm-Message-State: AOAM531EC/g2yZHphsR2mrpKhfvAp0cnXK89h2kNK3ponogEBjpoXPil pu//ZH+9tUnt8OMH37BlwRzxvn7eJcd0MfV8eaSnNZdtLPzXAkOy X-Google-Smtp-Source: ABdhPJzoy8BdpcWKW7H03hvwszLmylcxCDrfqsCKZ/Z8HODg6kMwUVxAfqOPj7WMqQ+NEyNhc4/8xvFZZ5ShDStJUZY= X-Received: by 2002:a05:6402:4252:: with SMTP id g18mr15190591edb.231.1610849894285; Sat, 16 Jan 2021 18:18:14 -0800 (PST) MIME-Version: 1.0 From: Joey Green Date: Sun, 17 Jan 2021 10:18:01 +0800 Message-ID: Subject: Emacs hangs every few week due to xim To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000bc45e205b90f3764" Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=mycityofsky@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 17 Jan 2021 03:22:37 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --000000000000bc45e205b90f3764 Content-Type: text/plain; charset="UTF-8" Hi, My emacs hangs every few days, even with emacs -Q, I've attached gdb to it while crashing and got the following backtrace: searene@archlinux:~$ sudo gdb attach 14210 GNU gdb (GDB) 10.1 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... attach: No such file or directory. Attaching to process 14210 [New LWP 14212] [New LWP 14216] [New LWP 14217] [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". 0x00007f569cd2046f in poll () from /usr/lib/libc.so.6 (gdb) bt full #0 0x00007f569cd2046f in poll () at /usr/lib/libc.so.6 #1 0x00007f569dfd263b in () at /usr/lib/libxcb.so.1 #2 0x00007f569dfd437b in xcb_wait_for_event () at /usr/lib/libxcb.so.1 #3 0x00007f569e038209 in _XReadEvents () at /usr/lib/libX11.so.6 #4 0x00007f569e01f396 in XIfEvent () at /usr/lib/libX11.so.6 #5 0x00007f569e068ca0 in () at /usr/lib/libX11.so.6 #6 0x00007f569e0699d2 in () at /usr/lib/libX11.so.6 #7 0x00007f569e069c6c in _XimRead () at /usr/lib/libX11.so.6 #8 0x00007f569e0583ce in () at /usr/lib/libX11.so.6 #9 0x00007f569e045955 in XSetICValues () at /usr/lib/libX11.so.6 #10 0x0000561ace6df9b3 in () #11 0x0000561ace6627a7 in () #12 0x0000561ace61e5a5 in () #13 0x0000561ace61eb33 in () #14 0x0000561ace61ffdb in () #15 0x0000561ace6201fb in () #16 0x0000561ace659154 in () #17 0x0000561ace65a6b5 in () #18 0x0000561ace7054ff in () #19 0x0000561ace7bc9e0 in () #20 0x0000561ace6210d3 in () #21 0x0000561ace707efd in () #22 0x0000561ace708928 in () #23 0x0000561ace70a06f in () #24 0x0000561ace7779e7 in () #25 0x0000561ace6fae65 in () #26 0x0000561ace777942 in () #27 0x0000561ace6fadfd in () #28 0x0000561ace70040b in () #29 0x0000561ace700734 in () --Type for more, q to quit, c to continue without paging-- #30 0x0000561ace616de1 in () #31 0x00007f569cc53152 in __libc_start_main () at /usr/lib/libc.so.6 #32 0x0000561ace61753e in () Seems like it's due to xim. I tried to disable xim by adding the following line to ~/.Xresources emacs*useXIM: false The hanging doesn't occur again. But I cannot input with my input method(fcitx) as well, this is a huge problem for me. I want to see if there's a solution for it. Even a method to unblock it is helpful, otherwise I have to kill Emacs and recover-session each time, which sometimes can cause data loss. My related installed packages info: fcitx - fcitx 4.2.9.8-1 - fcitx-configtool 0.4.10-4 - fcitx-sogoupinyin 2.4.0.2732-1 ArchLinuxLinux - ArchLinux 5.10.6-arch1-1 #1 SMP PREEMPT Sat, 09 Jan 2021 18:22:35 +0000 x86_64 GNU/Linux Here are some related issues I found online about this, seems to be an old bug: - https://bugzilla.redhat.com/show_bug.cgi?id=452849 - https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-07/msg00520.html Other info carried by Emacs' report-emacs-bugs: In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, cairo version 1.17.3) of 2020-08-29 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 System Description: Arch Linux Recent messages: Restarting server (org-roam) total: Please tell me if you need more info. --000000000000bc45e205b90f3764 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, My emacs hangs every few days, even with emacs= -Q, I've attached gdb to it while crashing and got the following backt= race:

searene@archlinux:~$ sudo gdb attach 14210
GNU gd= b (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
Licens= e GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free softwar= e: you are free to change and redistribute it.
There is NO WARRANTY, to = the extent permitted by law.
Type "show copying" and "sho= w warranty" for details.
This GDB was configured as "x86_64-pc= -linux-gnu".
Type "show configuration" for configuration = details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bug= s/>.
Find the GDB manual and other documentation resources online= at:
=C2=A0 =C2=A0 <http://www.gnu.org/software/gdb/documentation/>.

= =C2=A0 =C2=A0 For help, type "help".
=C2=A0 =C2=A0 Type "= apropos word" to search for commands related to "word"...=C2=A0 =C2=A0 attach: No such file or directory.
=C2=A0 =C2=A0 Attachin= g to process 14210
=C2=A0 =C2=A0 [New LWP 14212]
=C2=A0 =C2=A0 [New L= WP 14216]
=C2=A0 =C2=A0 [New LWP 14217]
=C2=A0 =C2=A0 [Thread debuggi= ng using libthread_db enabled]
=C2=A0 =C2=A0 Using host libthread_db lib= rary "/usr/lib/libthread_db.so.1".
=C2=A0 =C2=A0 0x00007f569cd= 2046f in poll () from /usr/lib/libc.so.6
=C2=A0 =C2=A0 (gdb) bt full
= =C2=A0 =C2=A0 #0 =C2=A00x00007f569cd2046f in poll () at /usr/lib/libc.so.6<= br>=C2=A0 =C2=A0 #1 =C2=A00x00007f569dfd263b in =C2=A0() at /usr/lib/libxcb= .so.1
=C2=A0 =C2=A0 #2 =C2=A00x00007f569dfd437b in xcb_wait_for_event ()= at /usr/lib/libxcb.so.1
=C2=A0 =C2=A0 #3 =C2=A00x00007f569e038209 in _X= ReadEvents () at /usr/lib/libX11.so.6
=C2=A0 =C2=A0 #4 =C2=A00x00007f569= e01f396 in XIfEvent () at /usr/lib/libX11.so.6
=C2=A0 =C2=A0 #5 =C2=A00x= 00007f569e068ca0 in =C2=A0() at /usr/lib/libX11.so.6
=C2=A0 =C2=A0 #6 = =C2=A00x00007f569e0699d2 in =C2=A0() at /usr/lib/libX11.so.6
=C2=A0 =C2= =A0 #7 =C2=A00x00007f569e069c6c in _XimRead () at /usr/lib/libX11.so.6
= =C2=A0 =C2=A0 #8 =C2=A00x00007f569e0583ce in =C2=A0() at /usr/lib/libX11.so= .6
=C2=A0 =C2=A0 #9 =C2=A00x00007f569e045955 in XSetICValues () at /usr/= lib/libX11.so.6
=C2=A0 =C2=A0 #10 0x0000561ace6df9b3 in =C2=A0()
=C2= =A0 =C2=A0 #11 0x0000561ace6627a7 in =C2=A0()
=C2=A0 =C2=A0 #12 0x000056= 1ace61e5a5 in =C2=A0()
=C2=A0 =C2=A0 #13 0x0000561ace61eb33 in =C2=A0()<= br>=C2=A0 =C2=A0 #14 0x0000561ace61ffdb in =C2=A0()
=C2=A0 =C2=A0 #15 0x= 0000561ace6201fb in =C2=A0()
=C2=A0 =C2=A0 #16 0x0000561ace659154 in =C2= =A0()
=C2=A0 =C2=A0 #17 0x0000561ace65a6b5 in =C2=A0()
=C2=A0 =C2=A0 = #18 0x0000561ace7054ff in =C2=A0()
=C2=A0 =C2=A0 #19 0x0000561ace7bc9e0 = in =C2=A0()
=C2=A0 =C2=A0 #20 0x0000561ace6210d3 in =C2=A0()
=C2=A0 = =C2=A0 #21 0x0000561ace707efd in =C2=A0()
=C2=A0 =C2=A0 #22 0x0000561ace= 708928 in =C2=A0()
=C2=A0 =C2=A0 #23 0x0000561ace70a06f in =C2=A0()
= =C2=A0 =C2=A0 #24 0x0000561ace7779e7 in =C2=A0()
=C2=A0 =C2=A0 #25 0x000= 0561ace6fae65 in =C2=A0()
=C2=A0 =C2=A0 #26 0x0000561ace777942 in =C2=A0= ()
=C2=A0 =C2=A0 #27 0x0000561ace6fadfd in =C2=A0()
=C2=A0 =C2=A0 #28= 0x0000561ace70040b in =C2=A0()
=C2=A0 =C2=A0 #29 0x0000561ace700734 in = =C2=A0()
=C2=A0 =C2=A0 --Type <RET> for more, q to quit, c to cont= inue without paging--
=C2=A0 =C2=A0 #30 0x0000561ace616de1 in =C2=A0()=C2=A0 =C2=A0 #31 0x00007f569cc53152 in __libc_start_main () at /usr/lib/= libc.so.6
=C2=A0 =C2=A0 #32 0x0000561ace61753e in =C2=A0()

Seems = like it's due to xim. I tried to disable xim by adding the following li= ne to ~/.Xresources

emacs*useXIM: false

The hanging= doesn't occur again. But I cannot input with my input method(fcitx) as= well, this is a huge problem for me. I want to see if there's a soluti= on for it. Even a method to unblock it is helpful, otherwise I have to kill= Emacs and recover-session each time, which sometimes can cause data loss.<= /div>

My related installed packages info:

fcitx=
- fcitx 4.2.9.8-1
- fcitx-configtool 0.4.10-4
- fcitx-sogoupinyin 2.4.0.2732-1

= ArchLinuxLinux
- ArchLinux 5.10.6-arch1-1 #1 SMP PREEMPT Sat, = 09 Jan 2021 18:22:35 +0000 x86_64 GNU/Linux

Here are some related is= sues I found online about this, seems to be an old bug:
- ht= tps://lists.gnu.org/archive/html/bug-gnu-emacs/2017-07/msg00520.html

Other info carried by Emacs' report-emacs-= bugs:
In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Ve= rsion 3.24.22, cairo version 1.17.3)
=C2=A0of 2020-08-29 built on juerge= n
Windowing system distributor 'The X.Org Foundation', version 1= 1.0.12010000
System Description: Arch Linux

Recent messages:
R= estarting server
(org-roam) total:=C2=A0

Please tell me if you need more info.
--000000000000bc45e205b90f3764-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 17 09:33:17 2021 Received: (at 45927) by debbugs.gnu.org; 17 Jan 2021 14:33:17 +0000 Received: from localhost ([127.0.0.1]:44685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l197F-0001pz-0Y for submit@debbugs.gnu.org; Sun, 17 Jan 2021 09:33:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1979-0001ph-Ap for 45927@debbugs.gnu.org; Sun, 17 Jan 2021 09:33:15 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37674) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1974-0002QK-5M; Sun, 17 Jan 2021 09:33:06 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1446 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l1973-0005lN-Bw; Sun, 17 Jan 2021 09:33:05 -0500 Date: Sun, 17 Jan 2021 16:33:10 +0200 Message-Id: <83mtx78wgp.fsf@gnu.org> From: Eli Zaretskii To: Joey Green In-Reply-To: (message from Joey Green on Sun, 17 Jan 2021 10:18:01 +0800) Subject: Re: bug#45927: Emacs hangs every few week due to xim References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45927 Cc: 45927@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Joey Green > Date: Sun, 17 Jan 2021 10:18:01 +0800 > > Seems like it's due to xim. I tried to disable xim by adding the following line to ~/.Xresources > > emacs*useXIM: false > > The hanging doesn't occur again. But I cannot input with my input method(fcitx) as well, this is a huge > problem for me. I want to see if there's a solution for it. Even a method to unblock it is helpful, otherwise I > have to kill Emacs and recover-session each time, which sometimes can cause data loss. > > My related installed packages info: > > fcitx > - fcitx 4.2.9.8-1 > - fcitx-configtool 0.4.10-4 > - fcitx-sogoupinyin 2.4.0.2732-1 > > ArchLinuxLinux > - ArchLinux 5.10.6-arch1-1 #1 SMP PREEMPT Sat, 09 Jan 2021 18:22:35 +0000 x86_64 GNU/Linux > > Here are some related issues I found online about this, seems to be an old bug: > - https://bugzilla.redhat.com/show_bug.cgi?id=452849 > - https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-07/msg00520.html The bugzilla report has some details regarding the reasons for the hang. Can you verify that what it describes is indeed what happens, i.e. both Emacs and XIM are waiting for each other? And if so, can you suggest how to modify the logic on our side to avoid this deadlock? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 11:55:01 2021 Received: (at 45927) by debbugs.gnu.org; 18 Jan 2021 16:55:01 +0000 Received: from localhost ([127.0.0.1]:48172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1Xnw-0000rJ-Oi for submit@debbugs.gnu.org; Mon, 18 Jan 2021 11:55:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1Xnu-0000r4-LW for 45927@debbugs.gnu.org; Mon, 18 Jan 2021 11:54:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59358) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1Xnp-0006Ea-6U; Mon, 18 Jan 2021 11:54:53 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4033 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l1Xno-0006UP-6P; Mon, 18 Jan 2021 11:54:52 -0500 Date: Mon, 18 Jan 2021 18:55:00 +0200 Message-Id: <83czy289sr.fsf@gnu.org> From: Eli Zaretskii To: Joey Green In-Reply-To: (message from Joey Green on Mon, 18 Jan 2021 22:18:28 +0800) Subject: Re: bug#45927: Emacs hangs every few week due to xim References: <83mtx78wgp.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45927 Cc: 45927@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Forwarding to the issue tracker (please use Reply All to keep the issue tracker CC'ed): > From: Joey Green > Date: Mon, 18 Jan 2021 22:18:28 +0800 > > Thanks for the quick reply, but sorry I cannot verify the bugzilla post because the imseetings-xim package > described in that post is a fedora/redhat specific package and cannot be installed on my OS(ArchLinux). I > said it was related because I suspected this issue was related to xim(Everything went to normal after I > disabled xim in Emacs), just like that post, I want to give you guys as much information as I can. > > Currently I don't have any suggestions about how to fix this. After a long time of trying and testing, what I've > figured out for now is: this issue is related to some behavior between Emacs and XIM. But I haven't figured > out the exact reason and a possible solution. I want to see if you have some suggestions. :) > > Thanks, > Joey