unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45927: Emacs hangs every few week due to xim
@ 2021-01-17  2:18 Joey Green
  2021-01-17 14:33 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Joey Green @ 2021-01-17  2:18 UTC (permalink / raw)
  To: 45927

[-- Attachment #1: Type: text/plain, Size: 3982 bytes --]

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 <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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://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"...
    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 <RET> 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.

[-- Attachment #2: Type: text/html, Size: 6428 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#45927: Emacs hangs every few week due to xim
  2021-01-17  2:18 bug#45927: Emacs hangs every few week due to xim Joey Green
@ 2021-01-17 14:33 ` Eli Zaretskii
       [not found]   ` <CALktmaACAz-vfFrSmbfq-COR8R2cK+5W+qdSJH0DEMzAAt_Ntg@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2021-01-17 14:33 UTC (permalink / raw)
  To: Joey Green; +Cc: 45927

> From: Joey Green <mycityofsky@gmail.com>
> 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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#45927: Emacs hangs every few week due to xim
       [not found]   ` <CALktmaACAz-vfFrSmbfq-COR8R2cK+5W+qdSJH0DEMzAAt_Ntg@mail.gmail.com>
@ 2021-01-18 16:55     ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2021-01-18 16:55 UTC (permalink / raw)
  To: Joey Green; +Cc: 45927

Forwarding to the issue tracker (please use Reply All to keep the
issue tracker CC'ed):

> From: Joey Green <mycityofsky@gmail.com>
> 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-18 16:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-17  2:18 bug#45927: Emacs hangs every few week due to xim Joey Green
2021-01-17 14:33 ` Eli Zaretskii
     [not found]   ` <CALktmaACAz-vfFrSmbfq-COR8R2cK+5W+qdSJH0DEMzAAt_Ntg@mail.gmail.com>
2021-01-18 16:55     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).