Control: retitle -1 pinentry-qt: immediate exit with a core dump if $DISPLAY is 
unset or set but unavailable

On 2026-03-06 13:41:14 +0100, Andreas Metzler wrote:
> Control: retitle -1 pinentry-qt: immediate exit if $DISPLAY set but 
> unavailable

Note that this is more than a "normal" exit: it generates
a core dump.

> this works as expected (fallback to tty) if DISPLAY is unset

On my machine, it does *not* fall back to tty (contrary to
pinentry-fltk in this case):

qaa:~> unset DISPLAY
qaa:~> pinentry-qt
qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the 
Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it 
was found.
This application failed to start because no Qt platform plugin could be 
initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, wayland, linuxfb, offscreen, minimal, 
vkkhrdisplay, vnc, wayland-egl, eglfs, minimalegl.

zsh: IOT instruction (core dumped)  pinentry-qt

Here's the backtrace:

(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, 
    signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007f7ae38a147f in __pthread_kill_internal (threadid=<optimized out>, 
    signo=6) at ./nptl/pthread_kill.c:89
#2  0x00007f7ae384a942 in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/posix/raise.c:26
#3  0x00007f7ae38324ac in __GI_abort () at ./stdlib/abort.c:77
#4  0x00007f7ae46dc53b in ?? () from /usr/lib/x86_64-linux-gnu/libQt6Core.so.6
#5  0x00007f7ae46dd34f in QMessageLogger::fatal(char const*, ...) const ()
   from /usr/lib/x86_64-linux-gnu/libQt6Core.so.6
#6  0x00007f7ae4d51144 in ?? () from /usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#7  0x00007f7ae4ded828 in QGuiApplicationPrivate::createEventDispatcher() ()
   from /usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#8  0x00007f7ae47a90df in QCoreApplicationPrivate::init() ()
   from /usr/lib/x86_64-linux-gnu/libQt6Core.so.6
#9  0x00007f7ae4ded8ce in QGuiApplicationPrivate::init() ()
   from /usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#10 0x00007f7ae3fb2b8d in QApplicationPrivate::init() ()
   from /usr/lib/x86_64-linux-gnu/libQt6Widgets.so.6
#11 0x0000564ee14196da in ?? ()
#12 0x00007f7ae3833f75 in __libc_start_call_main (
    main=main@entry=0x564ee1419430, argc=argc@entry=1, 
    argv=argv@entry=0x7fff60fd70f8)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#13 0x00007f7ae3834027 in __libc_start_main_impl (main=0x564ee1419430, argc=1, 
    argv=0x7fff60fd70f8, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fff60fd70e8)
    at ../csu/libc-start.c:360
#14 0x0000564ee1419af1 in ?? ()

Perhaps some additional package is needed for this to work, which
would mean a missing dependency.

But I don't understand the error messages:

qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the 
Qt xcb platform plugin.

The libxcb-cursor0 package is installed on my machine. In there a
reason for the above message?

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it 
was found.

Note: I do not use any desktop environment, just plain X11 with
FVWM2 as my window manager.

> but pinentry-qt (and -fltk) exit with an error if DISPLAY points to
> an invalid or inacessible display.

If DISPLAY points to an inaccessible display, pinentry-fltk exits
with an error, but not immediately (I mean, it first interacts
with GnuPG before exiting) and not with a core dump, contrary to
pinentry-qt, for which it looks like an initialization issue.

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

Reply via email to