Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903129 - gnome-base/gnome-control-center-44.0: Gtk "Invalid object type CcTzDialog" followed by SIGSEGV in panels/datetime/cc-datetime-panel.cc
Summary: gnome-base/gnome-control-center-44.0: Gtk "Invalid object type CcTzDialog" fo...
Status: RESOLVED TEST-REQUEST
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: PATCH
Depends on:
Blocks: 901805
  Show dependency tree
 
Reported: 2023-03-26 19:28 UTC by Alexandra Parker
Modified: 2023-10-26 15:48 UTC (History)
1 user (show)

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


Attachments
logs and sigsegv (file_903129.txt,22.70 KB, text/plain)
2023-03-26 19:31 UTC, Alexandra Parker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandra Parker 2023-03-26 19:28:50 UTC
gnome-control-center-44.0 on my system behaves strangely. The About page is empty and the Date/Time panel crashes with a SIGSEGV when activated.

Reproducible: Always

Steps to Reproduce:
1. Install gnome-control-center-44.0
2. Click on the Date/Time panel in the sidebar
Actual Results:  
The control center disappears, and a SIGSEGV is observable in the journal.

Expected Results:  
Display the Date/Time dialog.

Portage 3.0.45.3 (python 3.11.2-final-0, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-12, glibc-2.37-r1, 6.2.8-gentoo x86_64)
=================================================================
System uname: Linux-6.2.8-gentoo-x86_64-AMD_Ryzen_5_5600G_with_Radeon_Graphics-with-glibc2.37
KiB Mem:    16283356 total,    633196 free
KiB Swap:   16777212 total,  16776696 free
Timestamp of repository gentoo: Sun, 26 Mar 2023 06:47:07 +0000
Head commit of repository gentoo: 8ee8339054f456bb3f655a592f3550db0192a4ac

Head commit of repository xandris: 86e0e8d4a001ece40a6c8fdaa75fe49117f5a0ff

sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.40 p3) 2.40.0
ccache version 4.8 [enabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.11.2_p2::gentoo
dev-lang/rust:             1.68.1::gentoo
dev-util/ccache:           4.8::gentoo
dev-util/cmake:            3.26.1::gentoo
dev-util/meson:            1.0.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-apps/systemd:          253.1::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.40-r3::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo, 16.0.0::gentoo
sys-devel/gcc:             12.2.1_p20230304::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo
sys-devel/llvm:            15.0.7::gentoo, 16.0.0::gentoo
sys-devel/make:            4.4.1::gentoo
sys-kernel/linux-headers:  6.2::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    sync-user: portage:portage
    priority: -1000
    volatile: False
    sync-git-verify-commit-signature: true

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
AR="x86_64-pc-linux-gnu-gcc-ar"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe  -march=znver3 -mtune=znver3 -mshstk   -O3 -fgcse-sm -fgcse-las -fgraphite -fgraphite-identity -floop-nest-optimize -ftree-vectorize -fvariable-expansion-in-unroller -fstack-protector-strong "
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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=znver3 -mtune=znver3 -mshstk   -O3 -fgcse-sm -fgcse-las -fgraphite -fgraphite-identity -floop-nest-optimize -ftree-vectorize -fvariable-expansion-in-unroller -fstack-protector-strong "
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="     --jobs=3     --load-average=8.1     --keep-going     --quiet-fail y     --quiet-repo-display "
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live ccache cgroup clean-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict news parallel-fetch parallel-install preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://mirrors.aliyun.com/gentoo/ http://gentoo.osuosl.org/ https://mirrors.aliyun.com/gentoo/ http://mirror.rackspace.com/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-O2 -pipe  -march=znver3 -mtune=znver3 -mshstk   -O3 -fgcse-sm -fgcse-las -fgraphite -fgraphite-identity -floop-nest-optimize -ftree-vectorize -fvariable-expansion-in-unroller -fstack-protector-strong  -Wl,-O1,--sort-common,--hash-style=gnu,--as-needed,-z,now"
LEX="flex"
LINGUAS="en ja"
MAKEOPTS="-j10 -l11"
NM="x86_64-pc-linux-gnu-gcc-nm"
PKGDIR="/var/cache/binpkgs"
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"
RANLIB="x86_64-pc-linux-gnu-gcc-ranlib"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 ao archive bluetooth branding bzip2 cairo cdda cddb cdr cjk cli colord crypt cups curl dbus dc1394 dri dts dvd dvdr eds encode evo exif faad flac fortran fuse gdbm gif gnome gnome-keyring gnome-online-accounts gnutls gphoto2 gpm gstreamer gtk gui iconv icu ieee1394 introspection ipv6 jpeg jpeg2k lcms libglvnd libnotify libsamplerate libsecret libtirpc libv4l lto lzma mad matroska mikmod mmap mng modplug mp3 mp4 mpeg multilib musepack nautilus ncurses nls nptl offensive ogg opengl openmp pam pango pcre pdf png policykit postproc ppds pulseaudio qt5 readline samba sdl seccomp slang sndfile sound speex spell split-usr ssl startup-notification svg systemd test-rust theora threads tiff tpm tracker truetype udev udisks uefi unicode upnp upower usb v4l vaapi vdpau vorbis vpx wayland winbind x264 xattr xcb xcomposite xft xinerama xml xv xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2021" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en ja" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF NVPTX WebAssembly ARM" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Alexandra Parker 2023-03-26 19:29:42 UTC
Please note for gnome-control-center I'm using these settings:

CFLAGS="-O2 -pipe -ggdb"
CXXFLAGS="-O2 -pipe -ggdb"
LDFLAGS=""
FEATURES="compressdebug installsources preserve-libs sandbox splitdebug userpriv usersandbox" # according to build.log
Comment 2 Alexandra Parker 2023-03-26 19:31:31 UTC
Created attachment 859047 [details]
logs and sigsegv
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-26 19:55:14 UTC
(In reply to Alexandra Parker from comment #2)
> Created attachment 859047 [details]
> logs and sigsegv


Thread 1 "gnome-control-c" received signal SIGSEGV, Segmentation fault.                                                                                         
0x00005555555a66fb in translated_city_name (loc=0x0) at ../gnome-control-center-44.0/panels/datetime/cc-datetime-panel.c:388                                                                                                                                                                                                   
388       zone_translated = g_strdup (dgettext (GETTEXT_PACKAGE_TIMEZONES, loc->zone));                                                                                                                                                                                                                                        
(gdb) bt                                                                                                                                                        
#0  0x00005555555a66fb in translated_city_name (loc=0x0) at ../gnome-control-center-44.0/panels/datetime/cc-datetime-panel.c:388                                
#1  update_timezone (self=0x555555d6ebc0) at ../gnome-control-center-44.0/panels/datetime/cc-datetime-panel.c:411                 

loc is null already there. I assume your timezone is definitely set? (Obviously this is wrong even if it's not though.)
Comment 5 Alexandra Parker 2023-03-26 20:01:56 UTC
(In reply to Sam James from comment #4)
> (In reply to Alexandra Parker from comment #2)
> > Created attachment 859047 [details]
> > logs and sigsegv
> 
> 
> Thread 1 "gnome-control-c" received signal SIGSEGV, Segmentation fault.     
> 
> 0x00005555555a66fb in translated_city_name (loc=0x0) at
> ../gnome-control-center-44.0/panels/datetime/cc-datetime-panel.c:388        
> 
> 388       zone_translated = g_strdup (dgettext (GETTEXT_PACKAGE_TIMEZONES,
> loc->zone));                                                                
> 
> (gdb) bt                                                                    
> 
> #0  0x00005555555a66fb in translated_city_name (loc=0x0) at
> ../gnome-control-center-44.0/panels/datetime/cc-datetime-panel.c:388        
> 
> #1  update_timezone (self=0x555555d6ebc0) at
> ../gnome-control-center-44.0/panels/datetime/cc-datetime-panel.c:411        
> 
> 
> loc is null already there. I assume your timezone is definitely set?
> (Obviously this is wrong even if it's not though.)

I have an /etc/localtime, which gnome-control-center reads. You can see this function knows my current timezone because it prints it out. It then sets self->current_location to null but I don't understand why:

https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/44.0/panels/datetime/cc-datetime-panel.c#L422
Comment 6 Alexandra Parker 2023-03-26 20:06:30 UTC
Oh, it's because self->timezone_dialog is null, and this getter method on the timezone dialog returns null for a null "self":

https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/44.0/panels/datetime/cc-tz-dialog.c#L321
Comment 7 Alexandra Parker 2023-03-26 20:35:41 UTC
(In reply to Sam James from comment #3)
> https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1742
> maybe?

Yes! That fixes it. Is there something I can read that explains why upstream didn't notice this but Gentoo did?
Comment 8 Alexandra Parker 2023-03-26 20:49:17 UTC
Is it because Gnome is expecting to build with -Wl,--export-dynamic?

https://gitlab.gnome.org/GNOME/gtk/-/issues/2788

If I remove the patch and make an /etc/portage/env file that adds LDFLAGS="$LDFLAGS -Wl,--export-dynamic", gnome-control-center doesn't crash. However, this seems like a heavy-handed approach when there are macros specifically to ensure symbols end up exported.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-27 02:54:30 UTC
(In reply to Alexandra Parker from comment #7)
> (In reply to Sam James from comment #3)
> > https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1742
> > maybe?
> 
> Yes! That fixes it. Is there something I can read that explains why upstream
> didn't notice this but Gentoo did?

yay!

At first, I was wondering if this is to do with glib-2.76 becoming stricter, but that's gfileinfo only: https://gitlab.gnome.org/GNOME/glib/-/commit/4cad66580b698e01d196cddc3b9950940a41fee9.

So it's not that. Now I'm wondering if it's new Vala instead (>=0.56.4), or another change in glib-2.76?
Comment 10 Chris Mayo 2023-03-27 18:39:20 UTC
(In reply to Alexandra Parker from comment #8)
> Is it because Gnome is expecting to build with -Wl,--export-dynamic?
> 
> https://gitlab.gnome.org/GNOME/gtk/-/issues/2788
> 
> If I remove the patch and make an /etc/portage/env file that adds
> LDFLAGS="$LDFLAGS -Wl,--export-dynamic", gnome-control-center doesn't crash.
> However, this seems like a heavy-handed approach when there are macros
> specifically to ensure symbols end up exported.

Interesting...

I have added some more to the MR. The old README.glade link in the GTK issue makes it clear they are needed before gtk_container_init_template. There was already a mix of putting them in panel_class_init and panel_init in gnome-control-center which I haven't resolved. We'll see.
Comment 11 Mart Raudsepp gentoo-dev 2023-03-27 18:57:31 UTC
So I guess this is bug 695326 reincarnated?
Comment 12 Pacho Ramos gentoo-dev 2023-05-05 13:12:55 UTC
At least for me version 44.1 behaves normally
Comment 13 Pacho Ramos gentoo-dev 2023-10-26 15:48:37 UTC
I cannot reproduce with any of the current versions in the tree, can you check again? Thanks