Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933441 - kde-apps/kleopatra-24.05.0 crash on wlroots+sway(?)
Summary: kde-apps/kleopatra-24.05.0 crash on wlroots+sway(?)
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo KDE team
URL: https://bugs.kde.org/show_bug.cgi?id=...
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks: gear-24.08.3-stable
  Show dependency tree
 
Reported: 2024-06-02 23:05 UTC by Gino McCarty
Modified: 2024-11-09 15:37 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 Gino McCarty 2024-06-02 23:05:29 UTC
All other KDE apps work without issue

Not sure whats missing here, please let me know what you need

QT_LOGGING_RULES="org.kde.pim.kleopatra.debug=true" kleopatra
org.kde.pim.kleopatra: Startup timing: 33 ms: Application created
org.kde.pim.kleopatra: Startup timing: 34 ms: Service created
org.kde.pim.kleopatra: Application created
org.kde.pim.kleopatra: Startup timing: 63 ms: GPGME Initialized
org.kde.pim.kleopatra: Startup timing: 80 ms: Starting version info check
org.kde.pim.kleopatra: Startup timing: 80 ms: Version info checked
org.kde.pim.kleopatra: Startup timing: 80 ms: Checking backend versions
org.kde.pim.kleopatra: Startup timing: 94 ms: backend versions checked
org.kde.pim.kleopatra: ReaderStatus::Private: Using new DeviceInfoWatcher
org.kde.pim.kleopatra: Startup timing: 116 ms: Application initialized
org.kde.pim.kleopatra: Startup timing: 118 ms: UiServer created
org.kde.pim.kleopatra: Startup timing: 118 ms: UiServer started
org.kde.pim.kleopatra: Kleo::Command(0x7ffcea1ad280) ~Command
org.kde.pim.kleopatra: Kleo::Command(0x7ffcea1ad280) ~Private
org.kde.pim.kleopatra: Startup timing: 130 ms: SelfCheck completed
org.kde.pim.kleopatra: startMonitoring
org.kde.pim.kleopatra: startMonitoring waiting for key cache ...
org.kde.pim.kleopatra: openOrRaiseMainWindow
org.kde.pim.kleopatra: Hook into the help menu to show the About dialog ourselves
org.kde.pim.kleopatra: open_or_raise showing window
org.kde.pim.kleopatra: you need to register view Kleo::TreeView(0x55efa4537440, name="m_view") before trying to set it as the current view!
org.kde.pim.kleopatra: Startup timing: 214 ms: new instance created
zxdg_exporter_v2@32: error 0: surface must be an xdg_toplevel
The Wayland connection experienced a fatal error: Protocol error
 ✘  ~ 

----------------------
emerge --info
Portage 3.0.63 (python 3.12.3-final-0, default/linux/amd64/23.0/llvm, gcc-13, glibc-2.39-r6, 6.6.30-gentoo.custom x86_64)
=================================================================
System uname: Linux-6.6.30-gentoo.custom-x86_64-Intel-R-_Core-TM-_i7-8550U_CPU_@_1.80GHz-with-glibc2.39
KiB Mem:    16189996 total,   2668996 free
KiB Swap:   16777212 total,  15354064 free
Timestamp of repository gentoo: Sun, 02 Jun 2024 16:18:50 +0000
Head commit of repository gentoo: a9c7771f8e9f37898adc87d006673d7a95733e42

Head commit of repository local: f99e0aa10b45baef1aa4a8bd23acd9992bffd13e

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.5::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.0-r1::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r3::gentoo
dev-lang/python:           3.12.3::gentoo
dev-lang/rust:             1.77.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

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

local
    location: /var/db/repos/local
    sync-type: git
    sync-uri: ssh://git@github.com/Teknocrat/teknocrat-overlay.git
    masters: gentoo
    priority: 90
    volatile: True

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang -c"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-O2 -pipe -march=native -mtune=native -flto=thin"
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/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-O2 -pipe -march=native -mtune=native -flto=thin"
DISTDIR="/var/cache/distfiles"
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 buildpkg-live clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LD="ld.lld"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed -fuse-ld=lld -W1,-O2 -rtlib=compiler-rt -unwindlib=libunwind"
LEX="flex"
LINGUAS="en en_US"
MAKEOPTS="-j7"
NM="llvm-nm"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
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="llvm-ranlib"
READELF="llvm-readelf"
SHELL="/bin/bash"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="acl amd64 bash-completion bluetooth bzip2 caps cet clang crypt cups dbus egl elogind ffmpeg flac gdbm gif gmp gnome-keyring iconv icu ipv6 jpeg keyring libtirpc llvm-libunwind lzma mtp multilib ncurses netlink nls ogg opengl openmp pam pcre png policykit pulseaudio readline seccomp ssl svg test-rust threads tiff truetype udev unicode usb v4l vaapi vulkan wayland xattr zlib zstd" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2 sse4a avx avx2 aes fma 3dnowprefetch fma3 f16c pclmul popcnt" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="crocus intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RUSTFLAGS, SIZE, YACC, YFLAGS


---------------------
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-03 00:03:29 UTC
I wonder if this is the same as bug 933271 and rebuilding kwin will fix it.
Comment 2 Gino McCarty 2024-06-03 21:24:09 UTC
this looks similar
https://forum.endeavouros.com/t/kleopatra-not-working-any-more-after-pacman-update-on-gnome-wayland/55972/6

unclear on the appropriate way to debug this.
Comment 3 Gino McCarty 2024-06-04 04:38:41 UTC
I rolled back to 24.02.2 and the problem is resolved. Some kind of regression upstream?

If you look over https://invent.kde.org/pim/kleopatra/-/compare/v24.05.0...v24.02.2?from_project_id=2666&straight=false
Comment 4 Gino McCarty 2024-06-05 19:23:23 UTC
Filed upstream
https://invent.kde.org/pim/kleopatra/-/issues/5
Comment 5 Andreas Sturmlechner gentoo-dev 2024-06-05 19:51:55 UTC
Doesn't crash here.
Comment 6 Gino McCarty 2024-06-05 20:03:44 UTC
(In reply to Andreas Sturmlechner from comment #5)
> Doesn't crash here.

That's helpful..


Do you know if any other more verbose debugging exists? I've recompiled with debug flag and attempted the debug argument above but a full stack trace might be more helpful
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-06 04:15:32 UTC
(In reply to Gino McCarty from comment #6)
> (In reply to Andreas Sturmlechner from comment #5)
> > Doesn't crash here.
> 
> That's helpful..
> 

It's not being dismissive, it's a report that it's not broken universally, which implies something else is going on.

The changes in the list you gave make no sense (translation only) so it's likely that Wayland ABI issue I mentioned...
Comment 8 Gino McCarty 2024-06-06 15:30:23 UTC
(In reply to Sam James from comment #7)
> (In reply to Gino McCarty from comment #6)
> > (In reply to Andreas Sturmlechner from comment #5)
> > > Doesn't crash here.
> > 
> > That's helpful..
> > 
> 
> It's not being dismissive, it's a report that it's not broken universally,
> which implies something else is going on.
> 

"Doesn't crash here" doesn't offer much insights does it? The assertion in the ticket is pretty narrowly scoped. Under wayland using the wayland backend not xcb. Since they couldn't be bothered to give context as to how they ran the app the comment offers really nothing.  I think you are all aware of this, I'm thankful that the issue is one unique to my system.


> The changes in the list you gave make no sense (translation only) so it's
> likely that Wayland ABI issue I mentioned...

please help me understand how a single KDE app and no other wayland app or KDE app could crash due to the ABI in wayland itself being broken?

As stated 24.02.2 runs without issue.

Again, I apologize that I don't know how to stack track or offer more debugging than the
QT_LOGGING_RULES="org.kde.pim.kleopatra.debug=true"
argument.

If additional debugging or guidance is available it would be appreciated.

Thanks so much for taking the time to review my ticket.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-06 15:34:48 UTC
asturm is the main person who does any KDE work in Gentoo, and I am like 50% or 25% of a helper for KDE packaging too. If anyone is going to fix a bug, it's most probably him, and sometimes me. Notes like that should really be taken as a note to self, or communication between us, or as a note in general for anyone who wants to investigate more rather than a directive to you. 

Anyway, yes, I believe it fails for you, I just don't yet get why. As I said, the chances are literally just i18n, and I bet if you reverted them all, it'd still crash.

ABI issues can result in all sorts of ridiculous runtime behaviour and we're lucky that they're _often_ crashes.

Useful things for you to try are:
* Attach gdb and try get a backtrace when it crashes (maybe set a breakpoint on abort first), but it may not be that helpful if it is an ABI issue
* Downgrading dev-libs/wayland
* Rebuilding kwin
* Rebuilding anything linked against dev-libs/wayland to see if it helps
(probably in that order)
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-06 15:35:27 UTC
It might also be interesting to run abidiff against the libwayland versions but that's probably a bit much to ask if not experienced with it so I plan on doing that for bug 933271 when I get a chance (changing machines atm...)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-06 15:48:07 UTC
(In reply to Sam James from comment #10)
> It might also be interesting to run abidiff against the libwayland versions
> but that's probably a bit much to ask if not experienced with it so I plan
> on doing that for bug 933271 when I get a chance (changing machines atm...)

(done)
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-06 15:52:26 UTC
What compositor / DE is this? wlroots?
Comment 13 Gino McCarty 2024-06-06 16:41:13 UTC
(In reply to Sam James from comment #12)
> What compositor / DE is this? wlroots?

yes its under wlroots (swaywm) I didn't try kwin yet since thats not my primary DE
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-06 16:42:46 UTC
Can you try rebuild wlroots+sway? (I suspect just wlroots will be enough).
Comment 15 Andreas Sturmlechner gentoo-dev 2024-06-13 17:46:14 UTC
We are still waiting on your input since the below post.

(In reply to Sam James from comment #1)
> I wonder if this is the same as bug 933271 and rebuilding kwin will fix it.
Comment 16 Andreas Sturmlechner gentoo-dev 2024-06-16 20:06:22 UTC
(In reply to Sam James from comment #14)
> Can you try rebuild wlroots+sway? (I suspect just wlroots will be enough).
Comment 17 Gino McCarty 2024-07-24 19:49:31 UTC
(In reply to Andreas Sturmlechner from comment #16)
> (In reply to Sam James from comment #14)
> > Can you try rebuild wlroots+sway? (I suspect just wlroots will be enough).

rebuild does not fix this issue

flatpak  3.2.0.240502   has the same issue
also fixed with QT_QPA_PLATFORM=xcb

https://bbs.archlinux.org/viewtopic.php?id=296219
https://bugs.kde.org/show_bug.cgi?id=488090

perhaps its just a wlroots thing, wlroot 0.18 is stable once the new release of sway lands maybe we will see some improvement
Comment 18 Andreas Sturmlechner gentoo-dev 2024-08-11 16:06:26 UTC
Please rebuild kleopatra *after* upgrade to KF 6.5.0 and retry.
Comment 19 Gino McCarty 2024-08-19 19:22:42 UTC
same error on 6.5.0 platform

zxdg_exporter_v2#38: error 0: surface must be an xdg_toplevel
The Wayland connection experienced a fatal error: Protocol error

kleopatra --config works though and you get a config dialog and tray icon without issue. error only occurs with main window
Comment 20 Andreas Sturmlechner gentoo-dev 2024-08-20 15:30:45 UTC
So it is not related to the dev-libs/wayland trouble. Since someone else confirmed your problem on another distro without Plasma in the upstream bug, please continue working with upstream on the issue, and try harder in giving them relevant information like the environment you have been reproducing this with.