Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669572 - dev-libs/glib-2.52.3 gnome-shell segfault at 100000016 ip 00007f99c79beffd sp 00007ffe47fbeee0 error 4 in libgobject-2.0.so.0.5600.2
Summary: dev-libs/glib-2.52.3 gnome-shell segfault at 100000016 ip 00007f99c79beffd sp...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-25 11:03 UTC by Fabian Köster
Modified: 2019-07-26 09:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Köster 2018-10-25 11:03:37 UTC
I am not sure if this is actually a bug in glib or if I am just not debugging correctly.

I am currently testing gnome-shell-3.26 and some packages from the gnome-overlay so I am also not exactly sure if this problem is only in gnome-overlay.

However I noticed gnome-shell crashing sometimes and I wanted to get a backtrace using gdb, so I followed the instructions from GNOME [1] and this is the gdb output I get:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f6476e895f3 in __GI___poll (fds=0x555835e85250, nfds=16, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
29	../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
(gdb) bt
#0  0x00007f6476e895f3 in __GI___poll (fds=0x555835e85250, nfds=16, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f6478ed42d9 in g_main_context_poll (priority=<optimized out>, n_fds=16, fds=0x555835e85250, timeout=<optimized out>, context=0x555833bbfdb0)
    at /var/tmp/portage/dev-libs/glib-2.56.2/work/glib-2.56.2/glib/gmain.c:4203
#2  g_main_context_iterate (context=0x555833bbfdb0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.56.2/work/glib-2.56.2/glib/gmain.c:3897
#3  0x00007f6478ed4672 in g_main_loop_run (loop=0x555833f7cee0) at /var/tmp/portage/dev-libs/glib-2.56.2/work/glib-2.56.2/glib/gmain.c:4098
#4  0x00007f64774173cc in meta_run () at core/main.c:648
#5  0x000055583398c41c in main (argc=<optimized out>, argv=<optimized out>) at ../gnome-shell-3.26.2/src/main.c:530
(gdb)

Hope someone can help me figuring out what is wrong here.

[1] https://wiki.gnome.org/Projects/GnomeShell/Debugging
Comment 1 Fabian Köster 2018-10-25 11:03:59 UTC
Portage 2.3.49 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop/gnome/systemd, gcc-7.3.0, glibc-2.27-r6, 4.18.16-gentoo x86_64)
=================================================================
System uname: Linux-4.18.16-gentoo-x86_64-Intel-R-_Core-TM-_i7-4770_CPU_@_3.40GHz-with-gentoo-2.4.1
KiB Mem:    16350976 total,  13390020 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Mon, 22 Oct 2018 16:30:01 +0000
Head commit of repository gentoo: fe112223ceb8da5e1405e4f9ac0b10f424aa99dd
Head commit of repository fabians: dc9bbef27f94dac3c623c2562681482b50b5bf2f

Head commit of repository sogo-connector: 97b80d209bbb47f79a6c37d13ec55543649eadf3

Head commit of repository flatpak-overlay: 37145159c222a4e804c532e794933d9e68134103

Head commit of repository steam-overlay: 91dded677268add5c00383ff80a4e379a1bce653

sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 

fabians
    location: /usr/local/overlay/fabians
    sync-type: git
    sync-uri: git+ssh://git@gitlab.com/metabolite/fabians-gentoo-overlay.git
    masters: gentoo

sogo-connector
    location: /usr/local/overlay/sogo-connector
    sync-type: git
    sync-uri: git://anongit.gentoo.org/repo/user/sogo-connector.git
    masters: gentoo

flatpak-overlay
    location: /usr/local/portage/flatpak-overlay
    sync-type: git
    sync-uri: https://github.com/fosero/flatpak-overlay.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /usr/local/portage/steam-overlay
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE freedist as-is CC-Sampling-Plus-1.0"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv icu idn introspection ipv6 jpeg lcms ldap libnotify libsecret libtirpc mad mng mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp spell ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vaapi vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev" KERNEL="linux" L10N="de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_5 python3_6" RUBY_TARGETS="ruby23" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="intel i965 radeon radeonsi amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Mart Raudsepp gentoo-dev 2018-10-25 11:13:02 UTC
That doesn't mean anything (the "no such file"). If you want that part of backtrace to work, add installsources FEATURES (and I believe you need to install debugedit package too, for it to work) and re-emerge the relevant packages (glib in this case). If you want better backtrace, a debugging level in CFLAGS and co would be good too, combined with splitdebug in FEATURES, optionally also compressdebug (and again, re-emerged with those). Keep in mind that a debug level like -g or -ggdb can mean longer compile times and compile time memory usage (especially for something like webkit-gtk), so per-package for all this may be a good idea on more limited machines. -g1 or -ggdb1 would probably give good enough backtraces without too much overhead, too.

Such a glib version (2.52.3) doesn't exist in gnome overlay, also gnome-shell and co is in main tree, not overlay. Of the big things, nautilus is left in overlay and not yet in main tree, plus some smaller things (and tracker2, which is what's blocking nautilus main tree right now). Also I bet gnome-shell-3.26 and co might be pulling in newer glib, which is available in the main tree.

If you get a fuller backtrace with debug symbols, maybe we can figure something out further, otherwise I'm not sure what to think of the trace.
Comment 3 Fabian Köster 2018-10-25 11:40:08 UTC
Thank you Mart for your quick response and explanation!

I will setup a proper debug environment later today and will get back to you with hopefully more helpful information.
Comment 4 Fabian Köster 2018-10-30 10:17:32 UTC
So, I configured my system as you described and a few minutes ago the crash happened again. I can see the following message in dmesg:

[10204.692389] gnome-shell[2554]: segfault at 100000016 ip 00007f99c79beffd sp 00007ffe47fbeee0 error 4 in libgobject-2.0.so.0.5600.2[7f99c7989000+53000]

This of course is not very helpful. That is why I ran gdb beforehand to get a backtrace but unfortunately it did not work. This is what I have done, following the official GNOME shell debugging instructions mentioned previously:

1. Create a file /home/fabian/xenv.sh with the following content:

gnome_session=$(pgrep -u $USER gnome-session)
eval export $(sed 's/\o000/\n/g;' < /proc/$gnome_session/environ | grep DISPLAY)
eval export $(sed 's/\o000/\n/g;' < /proc/$gnome_session/environ | grep XAUTHORITY)
eval export $(sed 's/\o000/\n/g;' < /proc/$gnome_session/environ | grep DBUS_SESSION_BUS_ADDRESS)

2. Start a gnome-shell session for the user "fabian" as usual
3. From another machine I connected via ssh as the same user "fabian", created a "screen" session and executed "source xenv.sh"
4. Run gdb like that:

gdb --args /usr/bin/gnome-shell --replace
GNU gdb (Gentoo 8.1 p1) 8.1
Copyright (C) 2018 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://bugs.gentoo.org/>.
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"...
Reading symbols from /usr/bin/gnome-shell...Reading symbols from /usr/lib64/debug//usr/bin/gnome-shell.debug...done.                                                                                              
done.
(gdb)
(gdb) run
Starting program: /usr/bin/gnome-shell --replace
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe0d94700 (LWP 7038)]
Window manager warning: Unsupported session type
[Thread 0x7ffff7f85500 (LWP 6940) exited]
[Inferior 1 (process 6940) exited with code 01]
(gdb)
(gdb) bt
No stack.
(gdb)

So, it seems as if the gnome-shell process was not replaced with a new one connected to gdb, right? What am I missing here?
Comment 5 Fabian Köster 2018-10-30 10:22:32 UTC
And when I use the other described method the process immediately crashes with the backtrace initially posted: 

fabian@gauss ~ $ gdb -p 1179
GNU gdb (Gentoo 8.1 p1) 8.1
Copyright (C) 2018 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://bugs.gentoo.org/>.
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 1179
[New LWP 1180]
[New LWP 1181]
[New LWP 1183]
[New LWP 1184]
[New LWP 1249]
[New LWP 1250]
[New LWP 1251]
[New LWP 1252]
[New LWP 1253]
[New LWP 1254]
[New LWP 1255]
[New LWP 1256]
[New LWP 1257]
[New LWP 1258]
[New LWP 1259]
[New LWP 1260]
[New LWP 1261]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f0b2c0705f3 in __GI___poll (fds=0x55c1cddde8b0, nfds=16, timeout=147) at ../sysdeps/unix/sysv/linux/poll.c:29
29      ../sysdeps/unix/sysv/linux/poll.c: Datei oder Verzeichnis nicht gefunden.
(gdb) 
(gdb) bt
#0  0x00007f0b2c0705f3 in __GI___poll (fds=0x55c1cddde8b0, nfds=16, timeout=147) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f0b2e0bb029 in g_main_context_poll (priority=<optimized out>, n_fds=16, fds=0x55c1cddde8b0, timeout=<optimized out>, context=0x55c1cbb685e0)
    at /usr/src/debug/dev-libs/glib-2.56.2/glib-2.56.2/glib/gmain.c:4203
#2  g_main_context_iterate (context=0x55c1cbb685e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /usr/src/debug/dev-libs/glib-2.56.2/glib-2.56.2/glib/gmain.c:3897
#3  0x00007f0b2e0bb3c2 in g_main_loop_run (loop=0x55c1cbf2dcc0) at /usr/src/debug/dev-libs/glib-2.56.2/glib-2.56.2/glib/gmain.c:4098
#4  0x00007f0b2c5fe3cc in meta_run () at core/main.c:648
#5  0x000055c1cb93541c in main (argc=<optimized out>, argv=<optimized out>) at ../gnome-shell-3.26.2/src/main.c:530
(gdb)
Comment 6 Mart Raudsepp gentoo-dev 2019-07-26 05:24:07 UTC
Sorry I didn't really get to look at this again in detail. But is this still a problem with current versions?
Comment 7 Fabian Köster 2019-07-26 09:01:28 UTC
I guess this issue can be closed now. I am running stable gnome-shell from main tree for a while now and it runs quite smooth. Very rarely I see gnome-shell crashes, but I think this is rather a upstream problem probably related to wayland issues than a Gentoo specific problem.