You are not logged in.

#1 2025-06-23 16:20:15

android
Member
From: San Diego
Registered: 2003-04-18
Posts: 166

SOLVED: ibus-daemon core dump in libglib-2.0.so.0

After recent system update (after a long hiatus) ibus-daemon core dumps on start.

ibus 1.5.32-1
glib2 2.84.2-1

Startup is implemented in .fluxbox/startup, where env variables are set and ibus-daemon command executed.

Per IBus wiki page env variables and gsettings still seem correct:

export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
$ gsettings get org.freedesktop.ibus.general preload-engines
['xkb:us::eng', 'anthy']
$ gsettings get org.freedesktop.ibus.general engines-order
['xkb:us::eng', 'anthy', 'xkb:es::spa']

$ gsettings get org.freedesktop.ibus.general.hotkey triggers
['<Control>space']

The gdb backtrace of the core dump:

Core was generated by `ibus-daemon --xim --daemonize'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0  0x00007b42abc2714c in g_log_structured_array () from /usr/lib/libglib-2.0.so.0
[Current thread is 1 (Thread 0x7b42ab864740 (LWP 2438695))]
(gdb) bt
#0  0x00007b42abc2714c in g_log_structured_array () from /usr/lib/libglib-2.0.so.0
#1  0x00007b42abc27468 in g_log_default_handler () from /usr/lib/libglib-2.0.so.0
#2  0x00007b42abc276ea in g_logv () from /usr/lib/libglib-2.0.so.0
#3  0x00007b42abc27a84 in g_log () from /usr/lib/libglib-2.0.so.0
#4  0x00005a4551815852 in bus_server_init ()
    at /usr/src/debug/ibus/ibus-1.5.32/bus/server.c:311
#5  main (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/ibus/ibus-1.5.32/bus/main.c:251

Running ibus-daemon with debug flag from command line yields no output:

$ ibus-daemon -dxrv
$

I haven't found anything in web or forum search.

Thanks for any suggestions for discovering/resolving the root cause...

Last edited by android (2025-06-24 18:50:58)

Offline

#2 2025-06-23 17:11:22

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,732

Re: SOLVED: ibus-daemon core dump in libglib-2.0.so.0

Do you use startx/xinit ?
What does you xinitrc look like?

Online

#3 2025-06-23 17:36:22

android
Member
From: San Diego
Registered: 2003-04-18
Posts: 166

Re: SOLVED: ibus-daemon core dump in libglib-2.0.so.0

seth wrote:

Do you use startx/xinit ?
What does you xinitrc look like?

Thanks for reply Seth!

Yes, I use startx.

.xinitrc:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

# including default /etc/X11/xinit/xinitrc -jea 2022-08-13
# per: https://wiki.archlinux.org/title/Xinit#Configuration

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

xrandr --output DP-1 --mode 3840x2160 --right-of eDP-1 --primary

exec startfluxbox

Offline

#4 2025-06-23 22:16:35

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,732

Re: SOLVED: ibus-daemon core dump in libglib-2.0.so.0

Unfortunately

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

you're importing the environment into the session and there's no dbus-launch, so it's not a broken session bus?
Still, https://github.com/ibus/ibus/blob/21938 … ver.c#L311

echo  $DBUS_SESSION_BUS_ADDRESS
dbus-send --session --print-reply --dest=org.freedesktop.DBus  /org/freedesktop/DBus org.freedesktop.DBus.ListNames

Online

#5 2025-06-23 23:06:56

android
Member
From: San Diego
Registered: 2003-04-18
Posts: 166

Re: SOLVED: ibus-daemon core dump in libglib-2.0.so.0

Here's the output of:

echo  $DBUS_SESSION_BUS_ADDRESS
and
dbus-send --session --print-reply --dest=org.freedesktop.DBus  /org/freedesktop/DBus org.freedesktop.DBus.ListNames

$ echo  $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus
$ 
$ dbus-send --session --print-reply --dest=org.freedesktop.DBus  /org/freedesktop/DBus org.freedesktop.DBus.ListNames
method return time=1750719682.213030 sender=org.freedesktop.DBus -> destination=:1.388 serial=4294967295 reply_serial=2
   array [
      string "org.freedesktop.DBus"
      string ":1.1"
      string ":1.2"
      string ":1.3"
      string ":1.4"
      string ":1.5"
      string ":1.6"
      string ":1.8"
      string ":1.9"
      string ":1.10"
      string ":1.11"
      string ":1.12"
      string ":1.13"
      string ":1.14"
      string ":1.15"
      string ":1.16"
      string ":1.17"
      string ":1.18"
      string ":1.19"
      string ":1.22"
      string ":1.23"
      string ":1.24"
      string ":1.25"
      string ":1.28"
      string ":1.29"
      string ":1.47"
      string ":1.51"
      string ":1.52"
      string ":1.54"
      string ":1.56"
      string ":1.57"
      string ":1.58"
      string ":1.59"
      string ":1.77"
      string ":1.78"
      string ":1.105"
      string ":1.106"
      string ":1.119"
      string ":1.120"
      string ":1.147"
      string ":1.167"
      string ":1.275"
      string ":1.314"
      string ":1.385"
      string ":1.388"
      string "ca.desrt.dconf"
      string "org.PulseAudio1"
      string "org.a11y.Bus"
      string "org.eclipse.swt.STM32CubeIDE"
      string "org.flameshot.Flameshot"
      string "org.freedesktop.impl.portal.PermissionStore"
      string "org.freedesktop.impl.portal.desktop.gtk"
      string "org.freedesktop.network-manager-applet"
      string "org.freedesktop.portal.Desktop"
      string "org.freedesktop.portal.Documents"
      string "org.freedesktop.systemd1"
      string "org.gnome.Meld"
      string "org.gtk.vfs.Daemon"
      string "org.gtk.vfs.GPhoto2VolumeMonitor"
      string "org.gtk.vfs.Metadata"
      string "org.gtk.vfs.UDisks2VolumeMonitor"
      string "org.gtk.vfs.mountpoint_10270"
      string "org.gtk.vfs.mountpoint_10287"
      string "org.gtk.vfs.mountpoint_http"
      string "org.hexchat.service"
      string "org.mozilla.firefox.L2hvbWUvam9obmVhLy5tb3ppbGxhL2ZpcmVmb3gvcXF3YmMzMXUuZGVmYXVsdA__"
      string "org.mozilla.seamonkey.ZGVmYXVsdA__"
      string "org.mozilla.thunderbird.L2hvbWUvam9obmVhLy50aHVuZGVyYmlyZC91NDY5NHl3Yy5tYWlsZGlyLWpvaG5lYQ__"
      string "org.mpris.MediaPlayer2.chromium.instance1604"
      string "org.pulseaudio.Server"
   ]
$ 

This does show a bunch of what's running right now, but none of it looks particularly like a security breach.

Offline

#6 2025-06-24 01:29:51

android
Member
From: San Diego
Registered: 2003-04-18
Posts: 166

Re: SOLVED: ibus-daemon core dump in libglib-2.0.so.0

That link: https://github.com/ibus/ibus/blob/21938 … ver.c#L311

Points to this error code:

    if (server == NULL) {
        g_error ("g_dbus_server_new_sync() is failed with address %s "
                 "and guid %s: %s",
                 socket_address, guid, error->message);
    }

Would this g_error() output be logged into the journal?

# journalctl -r | grep -i g_dbus_server
#

I don't find a match there, and running ibus-daemon on the command line shows no output either.

Should I set some GLIB debug, or verbosity, env variable prior to running it on the CLI?

I tried to read the GLIB docs, but it seemed oriented towards debugging the libraries, not debugging an application using the libraries.

I do show dbus service starts in the journal for other applications:

Jun 22 12:11:24 workstation systemd[1125]: Started dbus-:1.2-org.gnome.evince.Daemon@6.service.

There is a dbus service running, but I don't have a service for ibus:

# systemctl list-units --type=service | grep dbus
  dbus-broker.service                                                                       loaded active running D-Bus System Message Bus
# 
# systemctl list-units --type=service | grep ibus
# 

The IBus wiki page mentions a service as a possible startup, but I thought my .fluxbox/startup entry would take care of that during startx execution.

Thanks for your support!

Offline

#7 2025-06-24 07:00:48

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,732

Re: SOLVED: ibus-daemon core dump in libglib-2.0.so.0

Your session buts is A-OK. "Unfortunately".
You're not getting an error message because that's actually where the backtrace ends, ie. g_error calls g_log what triggers the SIGTRAP
This is the coredump you found in the system? Not generated by "gdb ibus-daemon …"?

Running ibus-daemon with debug flag from command line yields no output:

Hold on, this is only when starting ibus from .fluxbox/startup ? You still can run it manually later in the session w/o and problems?
What if you move it out of the fb startup script and ahead of "exec startfluxbox" in your xinitrc?

Online

#8 2025-06-24 18:48:50

android
Member
From: San Diego
Registered: 2003-04-18
Posts: 166

Re: SOLVED: ibus-daemon core dump in libglib-2.0.so.0

So I had tried to run ibus-daemon directly from the command line several times, and no output was produced, and the daemon did not start.

Even when I added the -v, I still used the other command line args as:

ibus-daemon -dxrv

Today, just to reconfirm, I ran that command line again, but with only the -v, and I got the g_error() output indicating the failure!

(ibus-daemon:2507505): IBUS WARNING **: 06:38:14.727: 06:38:14.726936: cannot write /home/user/.cache/ibus/bus/registry: Failed to create file “/home/user/.cache/ibus/bus/registry.DAVA82”: Permission denied

(ibus-daemon:2507505): IBUS-ERROR **: 06:38:14.729: g_dbus_server_new_sync() is failed with address unix:tmpdir=/home/user/.cache/ibus and guid 284a8bd303cf7fe475935f04685aaa46: Error binding to address (GUnixSocketAddress): Permission denied
Trace/breakpoint trap (core dumped)

An ls -l .cache indicated that only this ibus subdirectory was owned by root 8-/

It had been working this way since 2011!

drwxr-xr-x   3 root   root       4096 Aug  7  2011  ibus/

chown -R to user ownership corrected the whole issue and allowed ibus-daemon to start.

I guess when the -dxr arguments are added to the ibus-daemon command line, the debug output is suppressed.

In any case, the issue is resolved, and I'm marking the subject SOLVED.

Thank you for your patient support in getting to the root of the issue Seth!

Offline

#9 2025-06-24 18:58:27

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,732

Re: SOLVED: ibus-daemon core dump in libglib-2.0.so.0

An ls -l .cache indicated that only this ibus subdirectory was owned by root 8-/

Did you at some point try to sudo-fix something?

find $HOME -user root

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

#10 2025-06-25 19:29:47

android
Member
From: San Diego
Registered: 2003-04-18
Posts: 166

Re: SOLVED: ibus-daemon core dump in libglib-2.0.so.0

Did you at some point try to sudo-fix something?

Since this was the only .cache subdir that was owned by root, I think I must have run this the first time as root? Or something like that. However the registry.xml file that was in the .cache/ibus/bus/ dir was user owned, and dated 2011.

find $HOME -user root

There are a number of root owned things in my $HOME, because of some special embedded project build needs, but I don't think any of that is what caused this .cache/ibus dir to be root owned. I think it had to be a root execution when I first started using ibus-anthy.

FWIW, it did work without issue for 14 years. It seems ibus never created any new files in that time? There are a number of new files now, so that's probably what caused it to fail this time.

In any case, all the subdirs of .cache are now user owned and ibus is working.

Thanks again for all your help Seth!

Offline

Board footer

Powered by FluxBB