Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run pacman -Syu today, fcitx5 broken (core dumped) #1052

Closed
zw963 opened this issue May 14, 2024 · 39 comments
Closed

run pacman -Syu today, fcitx5 broken (core dumped) #1052

zw963 opened this issue May 14, 2024 · 39 comments

Comments

@zw963
Copy link

zw963 commented May 14, 2024

Summary

When start into the gnome wayland, i can see the little tray appear 0.5 second, then disappear.

I try run fcitx5 on my terminal get following error message: (please check screenshot)

 ╰─ $ fcitx5
I2024-05-14 11:27:15.889949 instance.cpp:1373] Override Enabled Addons: {}
I2024-05-14 11:27:15.889979 instance.cpp:1374] Override Disabled Addons: {}
I2024-05-14 11:27:15.892001 addonmanager.cpp:193] Loaded addon wayland
I2024-05-14 11:27:15.906406 xcbconnection.cpp:189] Connecting to X11 display, display name::0.
I2024-05-14 11:27:15.906491 xcbconnection.cpp:194] X11 display: :0 is xwayland.
I2024-05-14 11:27:15.906576 addonmanager.cpp:193] Loaded addon xcb
I2024-05-14 11:27:15.907364 addonmanager.cpp:193] Loaded addon quickphrase
I2024-05-14 11:27:15.907649 addonmanager.cpp:193] Loaded addon clipboard
I2024-05-14 11:27:15.907750 addonmanager.cpp:193] Loaded addon imselector
I2024-05-14 11:27:15.910679 addonmanager.cpp:193] Loaded addon keyboard
I2024-05-14 11:27:15.910839 addonmanager.cpp:193] Loaded addon waylandim
I2024-05-14 11:27:15.910957 addonmanager.cpp:193] Loaded addon unicode
I2024-05-14 11:27:15.911370 addonmanager.cpp:193] Loaded addon pinyinhelper
I2024-05-14 11:27:15.912030 addonmanager.cpp:193] Loaded addon dbus
I2024-05-14 11:27:15.916679 addonmanager.cpp:193] Loaded addon fcitx4frontend
I2024-05-14 11:27:15.917468 addonmanager.cpp:193] Loaded addon ibusfrontend
I2024-05-14 11:27:15.917970 addonmanager.cpp:193] Loaded addon xim
I2024-05-14 11:27:15.918233 addonmanager.cpp:193] Loaded addon dbusfrontend
I2024-05-14 11:27:15.938796 inputmethodmanager.cpp:189] Found 734 input method(s) in addon keyboard
I2024-05-14 11:27:15.952158 addonmanager.cpp:193] Loaded addon kimpanel
I2024-05-14 11:27:15.952393 addonmanager.cpp:193] Loaded addon virtualkeyboard
I2024-05-14 11:27:15.966871 classicui.cpp:64] Created classicui for x11 display::0
I2024-05-14 11:27:15.966917 classicui.cpp:85] Created classicui for wayland display:
I2024-05-14 11:27:15.966981 addonmanager.cpp:193] Loaded addon classicui
I2024-05-14 11:27:15.967507 addonmanager.cpp:193] Loaded addon notificationitem
I2024-05-14 11:27:15.967751 addonmanager.cpp:193] Loaded addon notifications
I2024-05-14 11:27:15.970407 dbusmodule.cpp:790] Service name change: org.fcitx.Fcitx5  :1.128
I2024-05-14 11:27:15.970514 kimpanel.cpp:116] Kimpanel new owner: :1.12
I2024-05-14 11:27:15.975012 virtualkeyboard.cpp:216] VirtualKeyboard new owner:
I2024-05-14 11:27:15.975056 portalsettingmonitor.cpp:91] A new portal show up, start a new query.
I2024-05-14 11:27:15.975218 portalsettingmonitor.cpp:91] A new portal show up, start a new query.
E2024-05-14 11:27:15.975831 portalsettingmonitor.cpp:115] DBus call error: org.freedesktop.portal.Error.NotFound Requested setting not found
Will write new themes to:  "/home/zw963/.local/share/fcitx5/themes/plasma"
Notify theme reloading.
I2024-05-14 11:27:16.988614 addonmanager.cpp:193] Loaded addon punctuation
I2024-05-14 11:27:17.286314 addonmanager.cpp:193] Loaded addon pinyin
I2024-05-14 11:27:17.290477 addonmanager.cpp:193] Loaded addon cloudpinyin
terminate called after throwing an instance of 'std::runtime_error'
  what():  Create sd_event failed.
=========================
Fcitx 5.1.9 -- Get Signal No.: 6
Date: try "date -d @1715657237" if you are using GNU date ***
ProcessID: 3095
fcitx5(+0xe0de)[0x6487408f30de]
/usr/lib/libc.so.6(+0x3cae0)[0x72d600450ae0]
/usr/lib/libc.so.6(+0x94e44)[0x72d6004a8e44]
/usr/lib/libc.so.6(gsignal+0x20)[0x72d600450a30]
/usr/lib/libc.so.6(abort+0xdf)[0x72d6004384c3]
/usr/lib/libstdc++.so.6(+0x97b0c)[0x72d600697b0c]
/usr/lib/libstdc++.so.6(+0xadf1a)[0x72d6006adf1a]
/usr/lib/libstdc++.so.6(_ZSt10unexpectedv+0x0)[0x72d60069750a]
/usr/lib/libstdc++.so.6(+0xae1d6)[0x72d6006ae1d6]
/usr/lib/libFcitx5Utils.so.2(+0x17911)[0x72d600aa0911]
/usr/lib/fcitx5/libcloudpinyin.so(+0xca44)[0x72d5f7f42a44]
/usr/lib/libstdc++.so.6(+0xe0c84)[0x72d6006e0c84]
/usr/lib/libc.so.6(+0x92ded)[0x72d6004a6ded]
/usr/lib/libc.so.6(+0x1160dc)[0x72d60052a0dc]
Aborted (core dumped)

I install fcitx5 use following command.

pacman -S fcitx5-chinese-addons fcitx5-gtk fcitx5-pinyin-zhwiki fcitx5-configtool gnome-shell-extension-kimpanel-git

Steps to Reproduce

check above.

Expected Behavior

it should work, as before today update.

Output of fcitx5-diagnose command

https://dpaste.com/D959B4ALH

@zw963
Copy link
Author

zw963 commented May 14, 2024

哦, 抱歉, 这个问题又好了, 我唯一做的事情就是, 启动了一下 Emacs, 然后在 Emacs 下面尝试激活了一下输入法.

Emacs 下面激活之后, 再回到 wezterm, 就可以了.

这可能还是 wezterm 相关的问题? 也许对解决我提的另外那个 issue 有些帮助?

@wengxt
Copy link
Member

wengxt commented May 14, 2024

@zw963 我还是认为是gnome的bug,你可以用WAYLAND_DEBUG=1 启动 wezterm观察看看

@zw963
Copy link
Author

zw963 commented May 14, 2024

@zw963 我还是认为是gnome的bug,你可以用WAYLAND_DEBUG=1 启动 wezterm观察看看

输出很多日志哦, 请问有什么特别的关键字可以过滤吗?

@zw963
Copy link
Author

zw963 commented May 14, 2024

非常奇怪的一点是, 在最近的升级之后, 待机唤醒后, 除了 wezterm 无法中文输入, 火狐也无法中文输入. (MOZ_ENABLE_WAYLAND=1 方式运行), 唯独只能进入 Emacs 尝试切换, 成功后, Firefox 和 wezterm 也一起好了.

Emacs 使用 --with-pgtk 方式编译.

在今天升级之前, 火狐唤醒后总是可以用的.

@wengxt
Copy link
Member

wengxt commented May 14, 2024

WAYLAND_DEBUG=1 wezterm 2>&1 |  grep 'wl_keyboard\|text_input'

@wengxt wengxt closed this as completed May 14, 2024
@wengxt
Copy link
Member

wengxt commented May 14, 2024

我自己测试了一下,十分肯定是 gnome-shell 的 bug

@zw963
Copy link
Author

zw963 commented May 14, 2024

我自己测试了一下,十分肯定是 gnome-shell 的 bug

因为 gnome-shell 的各种 bug, 已经困扰好久了, 感觉没完没了啊

@zw963
Copy link
Author

zw963 commented May 23, 2024

自动滚了最新的 Arch 之后. GNOME 46 + Wayland, 这个问题越来越严重了 ...

  1. 系统正常重启后(注意是重启, 而不是休眠唤醒), fcitx 输入法根本用不了(无论火狐还是 terminal 或电报). 如果手动运行 fcitx-config 工具, 会提示无法连接 server.
  2. 你会看到 tray 的输入法的小图标一闪一闪的, 仿佛在不断的重启.
  3. 好在一点, 有个办法可以修复, 就是启动 Emacs 的 daemon, 然后, 新开一个 Emacs frame (窗口), Ctrl + Space 尝试切换输入法, 然后一切都好了, 所有情况下都正常工作了.

@wengxt
Copy link
Member

wengxt commented May 23, 2024 via email

@zw963
Copy link
Author

zw963 commented May 23, 2024

我怀疑, 仅仅怀疑, 要不是我的 Emacs 编译时增加了 --with-pgtk, 可能这个唯一的修复办法也无效了.

@wengxt
Copy link
Member

wengxt commented May 23, 2024

@zw963 你super切到activity界面打字再切回来呢

@zw963
Copy link
Author

zw963 commented May 23, 2024

@zw963 你super切到activity界面打字再切回来呢

I tried reboot my arch again, i have to typing English, because i can't typing Chinese. @wengxt

What is you means of activity? in GNOME, when pressing super, the occur is upon the Type to search, which can be used to start apps, search things etc, if this is what you said, not work.

In fact, there is even no icon appear in the tray after boot into my GNOME. (checking following screenshot)

image

Following is the backtrace when i try to run fcitx5 in wezterm manually.

 ╰─ $ fcitx5
I2024-05-23 23:34:35.330699 instance.cpp:1373] Override Enabled Addons: {}
I2024-05-23 23:34:35.330753 instance.cpp:1374] Override Disabled Addons: {}
I2024-05-23 23:34:35.333794 addonmanager.cpp:193] Loaded addon wayland
I2024-05-23 23:34:35.349440 xcbconnection.cpp:189] Connecting to X11 display, display name::0.
I2024-05-23 23:34:35.349500 xcbconnection.cpp:194] X11 display: :0 is xwayland.
I2024-05-23 23:34:35.349730 addonmanager.cpp:193] Loaded addon xcb
I2024-05-23 23:34:35.351110 addonmanager.cpp:193] Loaded addon quickphrase
I2024-05-23 23:34:35.351695 addonmanager.cpp:193] Loaded addon clipboard
I2024-05-23 23:34:35.351874 addonmanager.cpp:193] Loaded addon imselector
I2024-05-23 23:34:35.355302 addonmanager.cpp:193] Loaded addon keyboard
I2024-05-23 23:34:35.355588 addonmanager.cpp:193] Loaded addon waylandim
I2024-05-23 23:34:35.355727 addonmanager.cpp:193] Loaded addon unicode
I2024-05-23 23:34:35.356193 addonmanager.cpp:193] Loaded addon pinyinhelper
I2024-05-23 23:34:35.357009 addonmanager.cpp:193] Loaded addon dbus
I2024-05-23 23:34:35.362351 addonmanager.cpp:193] Loaded addon fcitx4frontend
I2024-05-23 23:34:35.363467 addonmanager.cpp:193] Loaded addon ibusfrontend
I2024-05-23 23:34:35.364106 addonmanager.cpp:193] Loaded addon xim
I2024-05-23 23:34:35.364522 addonmanager.cpp:193] Loaded addon dbusfrontend
I2024-05-23 23:34:35.388054 inputmethodmanager.cpp:189] Found 734 input method(s) in addon keyboard
I2024-05-23 23:34:35.403053 addonmanager.cpp:193] Loaded addon kimpanel
I2024-05-23 23:34:35.403261 addonmanager.cpp:193] Loaded addon virtualkeyboard
I2024-05-23 23:34:35.415874 classicui.cpp:64] Created classicui for x11 display::0
I2024-05-23 23:34:35.415921 classicui.cpp:85] Created classicui for wayland display:
I2024-05-23 23:34:35.415939 addonmanager.cpp:193] Loaded addon classicui
I2024-05-23 23:34:35.416254 addonmanager.cpp:193] Loaded addon notificationitem
I2024-05-23 23:34:35.416501 addonmanager.cpp:193] Loaded addon notifications
I2024-05-23 23:34:35.420375 dbusmodule.cpp:790] Service name change: org.fcitx.Fcitx5  :1.282
I2024-05-23 23:34:35.420497 kimpanel.cpp:116] Kimpanel new owner: :1.12
I2024-05-23 23:34:35.426816 virtualkeyboard.cpp:216] VirtualKeyboard new owner:
I2024-05-23 23:34:35.426867 portalsettingmonitor.cpp:91] A new portal show up, start a new query.
I2024-05-23 23:34:35.426995 portalsettingmonitor.cpp:91] A new portal show up, start a new query.
E2024-05-23 23:34:35.427932 portalsettingmonitor.cpp:115] DBus call error: org.freedesktop.portal.Error.NotFound Requested setting not found
Will write new themes to:  "/home/zw963/.local/share/fcitx5/themes/plasma"
Notify theme reloading.
I2024-05-23 23:34:36.436477 addonmanager.cpp:193] Loaded addon punctuation
I2024-05-23 23:34:36.741801 addonmanager.cpp:193] Loaded addon pinyin
I2024-05-23 23:34:36.745220 addonmanager.cpp:193] Loaded addon cloudpinyin
terminate called after throwing an instance of 'std::runtime_error'
  what():  Create sd_event failed.
=========================
Fcitx 5.1.9 -- Get Signal No.: 6
Date: try "date -d @1716478476" if you are using GNU date ***
ProcessID: 6190
fcitx5(+0xe0de)[0x5691c5dda0de]
/usr/lib/libc.so.6(+0x3cae0)[0x7e6769e50ae0]
/usr/lib/libc.so.6(+0x94e44)[0x7e6769ea8e44]
/usr/lib/libc.so.6(gsignal+0x20)[0x7e6769e50a30]
/usr/lib/libc.so.6(abort+0xdf)[0x7e6769e384c3]
/usr/lib/libstdc++.so.6(+0x97b0c)[0x7e676a097b0c]
/usr/lib/libstdc++.so.6(+0xadf1a)[0x7e676a0adf1a]
/usr/lib/libstdc++.so.6(_ZSt10unexpectedv+0x0)[0x7e676a09750a]
/usr/lib/libstdc++.so.6(+0xae1d6)[0x7e676a0ae1d6]
/usr/lib/libFcitx5Utils.so.2(+0x17911)[0x7e676a3c7911]
/usr/lib/fcitx5/libcloudpinyin.so(+0xca44)[0x7e6762026a44]
/usr/lib/libstdc++.so.6(+0xe0c84)[0x7e676a0e0c84]
/usr/lib/libc.so.6(+0x92ded)[0x7e6769ea6ded]
/usr/lib/libc.so.6(+0x1160dc)[0x7e6769f2a0dc]
Aborted (core dumped)

Following screenshot is when i try to run fcitx5-config from activity.

image

Click on the above run fcitx5 button not work, you can see the tray icon appear, but disappear immediately.

@zw963
Copy link
Author

zw963 commented May 23, 2024

继续前一个回复 ...

我发现其实我甚至都不需要 进 Emacs, 然后尝试 Ctrl + Space 去切换输入法 来让 fcitx5 工作.

我只需要执行下面的命令, 来启动 Emacs daemon, 然后 tray 上, fcitx icon 开始闪烁, 然后, 我就可以 Ctrl + Space 然后输入中文了.

$: emacs --daemon=zw863

(再次说明, 我的 Emacs 是使用 --with-pgtk 手动编译的)

  --with-pgtk             use GTK to support window systems other than X

不幸中的万幸啊, 否则完全没办法输入中文, 我又得开启 emacs-rime 了.

@wengxt
Copy link
Member

wengxt commented May 23, 2024

说实话,你这里有一个我没见过的 cloudpinyin 在初始化阶段的 crash,但原因我猜不出来,要不你先把 cloudpinyin 关了看看?

@zw963
Copy link
Author

zw963 commented May 23, 2024

对了, 当使用 Emacs 恢复 fcitx5 输入法切换成功之后, 再次在 wezterm 下运行 fcitx5, core dumped 消失了.

 ╰─ $ fcitx5
I2024-05-23 23:46:01.307647 instance.cpp:1373] Override Enabled Addons: {}
I2024-05-23 23:46:01.307685 instance.cpp:1374] Override Disabled Addons: {}
I2024-05-23 23:46:01.309895 addonmanager.cpp:193] Loaded addon wayland
I2024-05-23 23:46:01.324416 xcbconnection.cpp:189] Connecting to X11 display, display name::0.
I2024-05-23 23:46:01.324645 xcbconnection.cpp:194] X11 display: :0 is xwayland.
I2024-05-23 23:46:01.324846 addonmanager.cpp:193] Loaded addon xcb
I2024-05-23 23:46:01.325985 addonmanager.cpp:193] Loaded addon quickphrase
I2024-05-23 23:46:01.326291 addonmanager.cpp:193] Loaded addon clipboard
I2024-05-23 23:46:01.326404 addonmanager.cpp:193] Loaded addon imselector
I2024-05-23 23:46:01.329274 addonmanager.cpp:193] Loaded addon keyboard
I2024-05-23 23:46:01.329441 addonmanager.cpp:193] Loaded addon waylandim
I2024-05-23 23:46:01.329556 addonmanager.cpp:193] Loaded addon unicode
I2024-05-23 23:46:01.329964 addonmanager.cpp:193] Loaded addon pinyinhelper
E2024-05-23 23:46:01.330418 addonloader.cpp:61] Failed to create addon: dbus Unable to request dbus name. Is there another fcitx already running?
I2024-05-23 23:46:01.330443 addonmanager.cpp:189] Could not load addon dbus
I2024-05-23 23:46:01.330510 addonmanager.cpp:296] Unloading addon pinyinhelper
I2024-05-23 23:46:01.330545 addonmanager.cpp:296] Unloading addon unicode
I2024-05-23 23:46:01.330571 addonmanager.cpp:296] Unloading addon waylandim
I2024-05-23 23:46:01.330612 addonmanager.cpp:296] Unloading addon keyboard
I2024-05-23 23:46:01.330682 addonmanager.cpp:296] Unloading addon imselector
I2024-05-23 23:46:01.330698 addonmanager.cpp:296] Unloading addon clipboard
I2024-05-23 23:46:01.330717 addonmanager.cpp:296] Unloading addon quickphrase
I2024-05-23 23:46:01.330806 addonmanager.cpp:296] Unloading addon xcb
I2024-05-23 23:46:01.330895 addonmanager.cpp:296] Unloading addon wayland

@zw963
Copy link
Author

zw963 commented May 23, 2024

说实话,你这里有一个我没见过的 cloudpinyin 在初始化阶段的 crash,但原因我猜不出来,要不你先把 cloudpinyin 关了看看?

蒙了, 打开 fcitx5-config 找了几遍, 没找到云拼音的设置, 以前明明见到过的. 您觉得, 如果我在新版本的 fcitx5 上, 重复用同一个老的配置(的符号链接), 会不会造成这个问题? 原因么, 自然是 #1010 里面提到的, 我要关闭一大堆和 Emacs 冲突的快捷键, 尤其是全局(英文状态下也能)触发的那些.

@zw963
Copy link
Author

zw963 commented May 23, 2024

说实话,你这里有一个我没见过的 cloudpinyin 在初始化阶段的 crash,但原因我猜不出来,要不你先把 cloudpinyin 关了看看?

蒙了, 打开 fcitx5-config 找了几遍, 没找到云拼音的设置, 以前明明见到过的. 您觉得, 如果我在新版本的 fcitx5 上, 重复用同一个老的配置(的符号链接), 会不会造成这个问题? 原因么, 自然是 #1010 里面提到的, 我要关闭一大堆和 Emacs 冲突的快捷键, 尤其是全局(英文状态下也能)触发的那些.

I logout my GNOME, then delete all my config in ~/.config/fcitx, ~/.config/fcitx5 and reboot my system, after boot, fcitx5 work, for english input method only. (i can saw the EN icon appear in the tray).

But, after i add the pinyin into IM from fcitx-config, reboot again, same issue happen again! so, i don't consider this is a config issue anyway.

@wengxt
Copy link
Member

wengxt commented May 23, 2024

说实话,你这里有一个我没见过的 cloudpinyin 在初始化阶段的 crash,但原因我猜不出来,要不你先把 cloudpinyin 关了看看?

蒙了, 打开 fcitx5-config 找了几遍, 没找到云拼音的设置, 以前明明见到过的. 您觉得, 如果我在新版本的 fcitx5 上, 重复用同一个老的配置(的符号链接), 会不会造成这个问题? 原因么, 自然是 #1010 里面提到的, 我要关闭一大堆和 Emacs 冲突的快捷键, 尤其是全局(英文状态下也能)触发的那些.

在 addon 里面禁用

Create sd_event failed 是个不太可能发生的错误

你能不能贴一个

pacman -Qs fcitx5
pacman -Qkk fcitx5 fcitx5-chinese-addons
fcitx5-diagnose 的输出

然后你是如何启动 fcitx5 的?

启动系统后立刻运行的输出是?

systemctl status --user `pidof /usr/bin/fcitx5`

@zw963
Copy link
Author

zw963 commented May 23, 2024

Following is the output after i delete all my fcitx config in ~/.config.

╰─ $ 128 pacman -Qs fcitx5
local/fcitx5 5.1.9-1 (fcitx5-im)
Next generation of fcitx
local/fcitx5-chinese-addons 5.1.5-1
Addons related to Chinese, including IME previous bundled inside fcitx4
local/fcitx5-configtool 5.1.5-1 (fcitx5-im)
Configuration Tool for Fcitx5
local/fcitx5-gtk 5.1.3-1 (fcitx5-im)
Fcitx5 gtk im module and glib based dbus client library
local/fcitx5-pinyin-zhwiki 1:0.2.5.20240509-1
Fcitx 5 Pinyin Dictionary from zh.wikipedia.org
local/fcitx5-qt 5.1.6-1 (fcitx5-im)
Fcitx5 Qt Library (Qt5 & Qt6 integrations)

pacman -Qkk fcitx5 fcitx5-chinese-addons

╰─ $ pacman -Qkk fcitx5 fcitx5-chinese-addons
fcitx5: 547 total files, 0 altered files
fcitx5-chinese-addons: 258 total files, 0 altered files

fcitx5-diagnose

http://dpaste.com/8C8F8DCYP

@zw963
Copy link
Author

zw963 commented May 23, 2024

systemctl status --user pidof /usr/bin/fcitx5

http://dpaste.com/6KR96RF3T

想起来一点, 和大多数人可能不一样, 就是, 我的电脑刚启动时是没网的。 (我使用手机 + USB 线连接电脑,电脑通过手机上的 USB 网络共享来上网),而刚刚重启时, 网络可能是没有连接的, 通常我需要在手机上把 USB网络共享, 关闭再重新打开一次, 来上网。 不知道是否跟此有关?

@zw963
Copy link
Author

zw963 commented May 23, 2024

在 addon 里面禁用

难道我眼花了? 以前的确有, 但现在的确没有啊, 我给你截图:

image

image

image

@wengxt
Copy link
Member

wengxt commented May 23, 2024

@zw963 应该没关系,那只是在创建event loop

@wengxt
Copy link
Member

wengxt commented May 24, 2024

在 addon 里面禁用

难道我眼花了? 以前的确有, 但现在的确没有啊, 我给你截图:

image

image

image

这个情况可能是没有加载导致的

我觉得你的 cloudpinyin 很奇怪,又是 crash 又是找不到

你能不能找一下你系统上所有 cloudpinyin 的文件

find /usr/ -name '*cloudpinyin*'
ls /usr/lib/libFcitx5* -l
ldd /usr/lib/fcitx5/libcloudpinyin.so

另外你能不能装一下 fcitx5-git 我加了一些输出我想看看 sd_event_new 为什么会 failed 的,按道理它也就是创建一个 epoll 没有什么别的功能

@zw963
Copy link
Author

zw963 commented May 24, 2024

下面这些输出, 是没有安装 fcitx-git 之前的。

find /usr/ -name 'cloudpinyin'

╰─ $ 130 sudo find /usr/ -name 'cloudpinyin'
/usr/share/fcitx5/addon/cloudpinyin.conf
/usr/lib/fcitx5/libcloudpinyin.so
/usr/include/Fcitx5/Module/fcitx-module/cloudpinyin
/usr/include/Fcitx5/Module/fcitx-module/cloudpinyin/cloudpinyin_public.h

ls /usr/lib/libFcitx5* -l

 ╰─ $ ls /usr/lib/libFcitx5* -l
lrwxrwxrwx    - root 4 weeks /usr/lib/libFcitx5Config.so -> libFcitx5Config.so.6*
.rwxr-xr-x 133k root 4 weeks /usr/lib/libFcitx5Config.so.5.1.9*
lrwxrwxrwx    - root 4 weeks /usr/lib/libFcitx5Config.so.6 -> libFcitx5Config.so.5.1.9*
lrwxrwxrwx    - root 4 weeks /usr/lib/libFcitx5Core.so -> libFcitx5Core.so.7*
.rwxr-xr-x 950k root 4 weeks /usr/lib/libFcitx5Core.so.5.1.9*
lrwxrwxrwx    - root 4 weeks /usr/lib/libFcitx5Core.so.7 -> libFcitx5Core.so.5.1.9*
lrwxrwxrwx    - root 3 weeks /usr/lib/libFcitx5GClient.so -> libFcitx5GClient.so.2*
lrwxrwxrwx    - root 3 weeks /usr/lib/libFcitx5GClient.so.2 -> libFcitx5GClient.so.5.1.3*
.rwxr-xr-x  47k root 3 weeks /usr/lib/libFcitx5GClient.so.5.1.3*
lrwxrwxrwx    - root 1 week  /usr/lib/libFcitx5Migrator.so -> libFcitx5Migrator.so.1*
lrwxrwxrwx    - root 1 week  /usr/lib/libFcitx5Migrator.so.1 -> libFcitx5Migrator.so.5.1.5*
.rwxr-xr-x 164k root 1 week  /usr/lib/libFcitx5Migrator.so.5.1.5*
lrwxrwxrwx    - root 3 weeks /usr/lib/libFcitx5Qt5DBusAddons.so -> libFcitx5Qt5DBusAddons.so.1*
lrwxrwxrwx    - root 3 weeks /usr/lib/libFcitx5Qt5DBusAddons.so.1 -> libFcitx5Qt5DBusAddons.so.5.1.6*
.rwxr-xr-x 244k root 3 weeks /usr/lib/libFcitx5Qt5DBusAddons.so.5.1.6*
lrwxrwxrwx    - root 3 weeks /usr/lib/libFcitx5Qt5WidgetsAddons.so -> libFcitx5Qt5WidgetsAddons.so.2*
lrwxrwxrwx    - root 3 weeks /usr/lib/libFcitx5Qt5WidgetsAddons.so.2 -> libFcitx5Qt5WidgetsAddons.so.5.1.6*
.rwxr-xr-x 106k root 3 weeks /usr/lib/libFcitx5Qt5WidgetsAddons.so.5.1.6*
lrwxrwxrwx    - root 3 weeks /usr/lib/libFcitx5Qt6DBusAddons.so -> libFcitx5Qt6DBusAddons.so.1*
lrwxrwxrwx    - root 3 weeks /usr/lib/libFcitx5Qt6DBusAddons.so.1 -> libFcitx5Qt6DBusAddons.so.5.1.6*
.rwxr-xr-x 385k root 3 weeks /usr/lib/libFcitx5Qt6DBusAddons.so.5.1.6*
lrwxrwxrwx    - root 3 weeks /usr/lib/libFcitx5Qt6WidgetsAddons.so -> libFcitx5Qt6WidgetsAddons.so.2*
lrwxrwxrwx    - root 3 weeks /usr/lib/libFcitx5Qt6WidgetsAddons.so.2 -> libFcitx5Qt6WidgetsAddons.so.5.1.6*
.rwxr-xr-x  77k root 3 weeks /usr/lib/libFcitx5Qt6WidgetsAddons.so.5.1.6*
lrwxrwxrwx    - root 4 weeks /usr/lib/libFcitx5Utils.so -> libFcitx5Utils.so.2*
lrwxrwxrwx    - root 4 weeks /usr/lib/libFcitx5Utils.so.2 -> libFcitx5Utils.so.5.1.9*
.rwxr-xr-x 629k root 4 weeks /usr/lib/libFcitx5Utils.so.5.1.9*

ldd /usr/lib/fcitx5/libcloudpinyin.so

 ╰─ $ ldd /usr/lib/fcitx5/libcloudpinyin.so
        linux-vdso.so.1 (0x00007f305dbeb000)
        libFcitx5Core.so.7 => /usr/lib/libFcitx5Core.so.7 (0x00007f305dab8000)
        libFcitx5Config.so.6 => /usr/lib/libFcitx5Config.so.6 (0x00007f305da97000)
        libFcitx5Utils.so.2 => /usr/lib/libFcitx5Utils.so.2 (0x00007f305d9fd000)
        libcurl.so.4 => /usr/lib/libcurl.so.4 (0x00007f305d936000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f305d600000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f305d909000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f305d414000)
        libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x00007f305d8bf000)
        libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f305d8b5000)
        libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f305d326000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f305d23b000)
        libnghttp3.so.9 => /usr/lib/libnghttp3.so.9 (0x00007f305d890000)
        libnghttp2.so.14 => /usr/lib/libnghttp2.so.14 (0x00007f305d211000)
        libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007f305d1ef000)
        libssh2.so.1 => /usr/lib/libssh2.so.1 (0x00007f305d1a6000)
        libpsl.so.5 => /usr/lib/libpsl.so.5 (0x00007f305d192000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x00007f305d0b9000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007f305ca00000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007f305d065000)
        libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007f305cf92000)
        libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007f305cf83000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f305cf6a000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f305dbed000)
        libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f305cf5e000)
        libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f305c8b7000)
        liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f305cf39000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f305cf06000)
        libunistring.so.5 => /usr/lib/libunistring.so.5 (0x00007f305c707000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007f305c62f000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007f305ced8000)
        libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007f305ced2000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007f305c621000)
        libkeyutils.so.1 => /usr/lib/libkeyutils.so.1 (0x00007f305cecb000)
        libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f305c60f000)
        libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007f305c5ec000)
        libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f305c5c6000)

安装后, 我等下重启下贴错误给你看。

@zw963
Copy link
Author

zw963 commented May 24, 2024

Following is the output of fictx5-git which installed from pacman -S fcitx5-git before i run emacs daemon.

 ╰─ $ fcitx5
I2024-05-24 18:19:45.125830 instance.cpp:1378] Override Enabled Addons: {}
I2024-05-24 18:19:45.125863 instance.cpp:1379] Override Disabled Addons: {}
I2024-05-24 18:19:45.129138 addonmanager.cpp:193] Loaded addon wayland
I2024-05-24 18:19:45.146405 xcbconnection.cpp:189] Connecting to X11 display, display name::0.
I2024-05-24 18:19:45.146789 xcbconnection.cpp:194] X11 display: :0 is xwayland.
I2024-05-24 18:19:45.146994 addonmanager.cpp:193] Loaded addon xcb
I2024-05-24 18:19:45.148720 addonmanager.cpp:193] Loaded addon quickphrase
I2024-05-24 18:19:45.149353 addonmanager.cpp:193] Loaded addon clipboard
I2024-05-24 18:19:45.149541 addonmanager.cpp:193] Loaded addon imselector
I2024-05-24 18:19:45.152987 addonmanager.cpp:193] Loaded addon keyboard
I2024-05-24 18:19:45.153272 addonmanager.cpp:193] Loaded addon waylandim
I2024-05-24 18:19:45.153396 addonmanager.cpp:193] Loaded addon unicode
I2024-05-24 18:19:45.153847 addonmanager.cpp:193] Loaded addon pinyinhelper
I2024-05-24 18:19:45.154607 addonmanager.cpp:193] Loaded addon dbus
I2024-05-24 18:19:45.160799 addonmanager.cpp:193] Loaded addon fcitx4frontend
I2024-05-24 18:19:45.161590 addonmanager.cpp:193] Loaded addon ibusfrontend
I2024-05-24 18:19:45.162122 addonmanager.cpp:193] Loaded addon xim
I2024-05-24 18:19:45.162382 addonmanager.cpp:193] Loaded addon dbusfrontend
I2024-05-24 18:19:45.185673 inputmethodmanager.cpp:192] Found 734 input method(s) in addon keyboard
I2024-05-24 18:19:45.200943 addonmanager.cpp:193] Loaded addon kimpanel
I2024-05-24 18:19:45.201273 addonmanager.cpp:193] Loaded addon virtualkeyboard
I2024-05-24 18:19:45.214760 classicui.cpp:64] Created classicui for x11 display::0
I2024-05-24 18:19:45.214821 classicui.cpp:85] Created classicui for wayland display:
I2024-05-24 18:19:45.214845 addonmanager.cpp:193] Loaded addon classicui
I2024-05-24 18:19:45.215478 addonmanager.cpp:193] Loaded addon notificationitem
I2024-05-24 18:19:45.215830 addonmanager.cpp:193] Loaded addon notifications
I2024-05-24 18:19:45.218974 dbusmodule.cpp:790] Service name change: org.fcitx.Fcitx5  :1.137
I2024-05-24 18:19:45.219078 kimpanel.cpp:116] Kimpanel new owner: :1.13
I2024-05-24 18:19:45.224220 virtualkeyboard.cpp:216] VirtualKeyboard new owner:
I2024-05-24 18:19:45.224269 portalsettingmonitor.cpp:91] A new portal show up, start a new query.
I2024-05-24 18:19:45.224378 portalsettingmonitor.cpp:91] A new portal show up, start a new query.
E2024-05-24 18:19:45.225202 portalsettingmonitor.cpp:115] DBus call error: org.freedesktop.portal.Error.NotFound Requested setting not found
Will write new themes to:  "/home/zw963/.local/share/fcitx5/themes/plasma"
Notify theme reloading.
I2024-05-24 18:19:46.240959 addonmanager.cpp:193] Loaded addon punctuation
I2024-05-24 18:19:46.519214 addonmanager.cpp:193] Loaded addon pinyin
I2024-05-24 18:19:46.524696 addonmanager.cpp:193] Loaded addon cloudpinyin
terminate called after throwing an instance of 'std::runtime_error'
  what():  Create sd_event failed.
=========================
Fcitx 5.1.10 -- Get Signal No.: 6
Date: try "date -d @1716545986" if you are using GNU date ***
ProcessID: 5643
fcitx5(+0xf0a0)[0x5bb5041ee0a0]
/usr/lib/libc.so.6(+0x3cae0)[0x798c79c50ae0]
/usr/lib/libc.so.6(+0x94e44)[0x798c79ca8e44]
/usr/lib/libc.so.6(gsignal+0x20)[0x798c79c50a30]
/usr/lib/libc.so.6(abort+0xdf)[0x798c79c384c3]
/usr/lib/libstdc++.so.6(+0x97b0c)[0x798c79e97b0c]
/usr/lib/libstdc++.so.6(+0xadf1a)[0x798c79eadf1a]
/usr/lib/libstdc++.so.6(_ZSt10unexpectedv+0x0)[0x798c79e9750a]
/usr/lib/libstdc++.so.6(+0xae1d6)[0x798c79eae1d6]
/usr/lib/libFcitx5Utils.so.2(+0x17c51)[0x798c7a25cc51]
/usr/lib/fcitx5/libcloudpinyin.so(+0xca44)[0x798c71634a44]
/usr/lib/libstdc++.so.6(+0xe0c84)[0x798c79ee0c84]
/usr/lib/libc.so.6(+0x92ded)[0x798c79ca6ded]
/usr/lib/libc.so.6(+0x1160dc)[0x798c79d2a0dc]
Aborted (core dumped)
[2024-05-24T18:16:25+0800] [ALPM] installed fcitx5-git (5.1.9.r20.g1ff448f-1)
[2024-05-24T18:16:25+0800] [ALPM] installed xcb-imdkit-git (1.0.8.r1.g5a7b29f-1)
[2024-05-24T18:16:25+0800] [ALPM] removed xcb-imdkit (1.0.8-1)
[2024-05-24T18:16:25+0800] [ALPM] removed fcitx5 (5.1.9-1)

@wengxt
Copy link
Member

wengxt commented May 24, 2024 via email

@zw963
Copy link
Author

zw963 commented May 24, 2024

fcitx5-git-5.1.9.r24.g25d7c5c-1

 ╰─ $ fcitx5
I2024-05-25 00:36:07.792241 instance.cpp:1384] Override Enabled Addons: {}
I2024-05-25 00:36:07.792312 instance.cpp:1385] Override Disabled Addons: {}
I2024-05-25 00:36:07.795232 addonmanager.cpp:193] Loaded addon wayland
I2024-05-25 00:36:07.814829 xcbconnection.cpp:189] Connecting to X11 display, display name::0.
I2024-05-25 00:36:07.815391 xcbconnection.cpp:194] X11 display: :0 is xwayland.
I2024-05-25 00:36:07.815521 addonmanager.cpp:193] Loaded addon xcb
I2024-05-25 00:36:07.816394 addonmanager.cpp:193] Loaded addon quickphrase
I2024-05-25 00:36:07.816928 addonmanager.cpp:193] Loaded addon clipboard
I2024-05-25 00:36:07.817121 addonmanager.cpp:193] Loaded addon imselector
I2024-05-25 00:36:07.821201 addonmanager.cpp:193] Loaded addon keyboard
I2024-05-25 00:36:07.821453 addonmanager.cpp:193] Loaded addon waylandim
I2024-05-25 00:36:07.821589 addonmanager.cpp:193] Loaded addon unicode
I2024-05-25 00:36:07.822101 addonmanager.cpp:193] Loaded addon pinyinhelper
I2024-05-25 00:36:07.823184 addonmanager.cpp:193] Loaded addon dbus
I2024-05-25 00:36:07.828542 addonmanager.cpp:193] Loaded addon fcitx4frontend
I2024-05-25 00:36:07.829576 addonmanager.cpp:193] Loaded addon ibusfrontend
I2024-05-25 00:36:07.830292 addonmanager.cpp:193] Loaded addon xim
I2024-05-25 00:36:07.830580 addonmanager.cpp:193] Loaded addon dbusfrontend
I2024-05-25 00:36:07.856114 inputmethodmanager.cpp:192] Found 734 input method(s) in addon keyboard
I2024-05-25 00:36:07.873699 addonmanager.cpp:193] Loaded addon kimpanel
I2024-05-25 00:36:07.874063 addonmanager.cpp:193] Loaded addon virtualkeyboard
I2024-05-25 00:36:07.890089 classicui.cpp:64] Created classicui for x11 display::0
I2024-05-25 00:36:07.890123 classicui.cpp:85] Created classicui for wayland display:
I2024-05-25 00:36:07.890141 addonmanager.cpp:193] Loaded addon classicui
I2024-05-25 00:36:07.890494 addonmanager.cpp:193] Loaded addon notificationitem
I2024-05-25 00:36:07.890802 addonmanager.cpp:193] Loaded addon notifications
I2024-05-25 00:36:07.894214 dbusmodule.cpp:790] Service name change: org.fcitx.Fcitx5  :1.127
I2024-05-25 00:36:07.894331 kimpanel.cpp:116] Kimpanel new owner: :1.13
I2024-05-25 00:36:07.900013 virtualkeyboard.cpp:216] VirtualKeyboard new owner:
I2024-05-25 00:36:07.900060 portalsettingmonitor.cpp:91] A new portal show up, start a new query.
I2024-05-25 00:36:07.900221 portalsettingmonitor.cpp:91] A new portal show up, start a new query.
E2024-05-25 00:36:07.901054 portalsettingmonitor.cpp:115] DBus call error: org.freedesktop.portal.Error.NotFound Requested setting not found
Will write new themes to:  "/home/zw963/.local/share/fcitx5/themes/plasma"
Notify theme reloading.
I2024-05-25 00:36:08.986129 addonmanager.cpp:193] Loaded addon punctuation
I2024-05-25 00:36:09.288229 addonmanager.cpp:193] Loaded addon pinyin
I2024-05-25 00:36:09.291750 addonmanager.cpp:193] Loaded addon cloudpinyin
terminate called after throwing an instance of 'std::runtime_error'
  what():  Create sd_event failed. error code: -24
=========================
Fcitx 5.1.10 -- Get Signal No.: 6
Date: try "date -d @1716568569" if you are using GNU date ***
ProcessID: 7701
fcitx5(+0xf040)[0x62957df83040]
/usr/lib/libc.so.6(+0x3cae0)[0x733a78c50ae0]
/usr/lib/libc.so.6(+0x94e44)[0x733a78ca8e44]
/usr/lib/libc.so.6(gsignal+0x20)[0x733a78c50a30]
/usr/lib/libc.so.6(abort+0xdf)[0x733a78c384c3]
/usr/lib/libstdc++.so.6(+0x97b0c)[0x733a78e97b0c]
/usr/lib/libstdc++.so.6(+0xadf1a)[0x733a78eadf1a]
/usr/lib/libstdc++.so.6(_ZSt10unexpectedv+0x0)[0x733a78e9750a]
/usr/lib/libstdc++.so.6(+0xae1d6)[0x733a78eae1d6]
/usr/lib/libFcitx5Utils.so.2(+0x17d0c)[0x733a79187d0c]
/usr/lib/fcitx5/libcloudpinyin.so(+0xca44)[0x733a74542a44]
/usr/lib/libstdc++.so.6(+0xe0c84)[0x733a78ee0c84]
/usr/lib/libc.so.6(+0x92ded)[0x733a78ca6ded]
/usr/lib/libc.so.6(+0x1160dc)[0x733a78d2a0dc]
Aborted (core dumped)

@zw963
Copy link
Author

zw963 commented May 24, 2024

最近有另一个问题几乎和 fcitx5 的问题同一时期发生, 那就是, 当系统启动后,经常键盘不可用,按任何键都没反应。log out 再 login 好几次,才会好, 还没时间仔细查是什么造成的,怀疑有可能跟 fcitx5 崩掉有关?

@wengxt
Copy link
Member

wengxt commented May 24, 2024

-24 是 EMFILE

sd_event_new 里可能产生的看起来只有 epoll_create1

EMFILE The per-process limit on the number of open file descriptors has been reached.

你有搞过类似的选项吗?把他限制的很小吗?

以及我也很好奇,fcitx 按道理来说并不需要打开多少个 file descriptor

你能不能 strace -f fcitx5 我想研究一下为什么

@zw963
Copy link
Author

zw963 commented May 25, 2024

你能不能 strace -f fcitx5 我想研究一下为什么

File to large, i upload as attachment.

strace.txt.gz

你有搞过类似的选项吗?把他限制的很小吗?

Don't remember changed it.

 ╰─ $ ulimit -n
2048

@wengxt
Copy link
Member

wengxt commented May 25, 2024

破案了.local/share/fcitx5/pinyin/dictionaries 你这里面放了多少个词库啊 ´_>`……

我写了个异步读取一口气打开所有的文件没想到被你这里给爆了

@wengxt
Copy link
Member

wengxt commented May 25, 2024

虽然,实质上,在过去的版本也会一口气遍历并打开所有文件,但是读取是同步的,所以在这里结束之后 fd 至少已经都释放了。

……你这个词库文件数量也是有点离谱了,我统计了一下 7602 个,你这是爬虫爬的吗 ´_>` ……

@zw963
Copy link
Author

zw963 commented May 25, 2024

 ╭─ 12:00  zw963 ⮀ ~/.local/share/fcitx5/pinyin/dictionaries ⮀ ⭠ (ebf945428) master *$%  ➦ ruby-3.3.0
 ╰─ $ ls -1 |wc -l
7760

……你这个词库文件数量也是有点离谱了,我统计了一下 7602 个,你这是爬虫爬的吗 ´_>` ……

我自己也有点懵逼, 我甚至不记得什么时候手动拷贝过这些文件到这个文件夹下面。

有可能是在某个时候,我从网上下载了什么压缩包, 直接解压缩了? 记不清了。

@zw963
Copy link
Author

zw963 commented May 25, 2024

已确认的确是因为字典过多造成的。 我将 ~/.local/share/fcitx5/pinyin/dictionaries 重命名后,问题解决。

奇怪,为啥启动 Emacs 词库又能用了呢?

@wengxt
Copy link
Member

wengxt commented May 25, 2024

@zw963 和 emacs 应该基本上没关系,我觉得最多是冷热启动的关系。当你热启动之后磁盘缓存加速了词库的加载,异步多线程读取完毕及时将 fd 都释放了。

@wengxt
Copy link
Member

wengxt commented May 25, 2024

@wengxt 想用那些词库问题也不大,你用libime_pinyindict 转换文本合并再转换就行了

wengxt added a commit that referenced this issue May 25, 2024
There is a risk that multiOpen open too many files at the same time and
use all the fd. Should prefer the new locate over multiOpen. (#1052)
wengxt added a commit that referenced this issue May 25, 2024
There is a risk that multiOpen open too many files at the same time and
use all the fd. Should prefer the new locate over multiOpen. (#1052)
@zw963
Copy link
Author

zw963 commented May 25, 2024

@wengxt 想用那些词库问题也不大,你用libime_pinyindict 转换文本合并再转换就行了

哦哦,好像的确是我之前试用 rime 的时候,在哪里找的一个包,里面带很多词库,然后转化成了 fcitx5 的辞典。

wengxt added a commit to fcitx/fcitx5-chinese-addons that referenced this issue May 25, 2024
@zw963
Copy link
Author

zw963 commented May 28, 2024

嘿, @wengxt , 我不知道有没有关系,但是在安装了 fcitx5-git 5.1.9.r26.gfab6bbd-1 之后,之前我一直反馈的一个老毛病又犯了. #1030 , 即,唤醒后,wezterm 无法输入中文,之前每次只要重启 Emacs 就可以解决,但是现在必须点击 Reload configuration 重新加载 fcitx5 配置才可以在 wezterm 下输入中文。

@wengxt
Copy link
Member

wengxt commented May 28, 2024

@zw963 我之前帮你开了一个, https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7679

和 fcitx 没什么关系

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants