NetBSD Problem Report #56763
From martin@aprisoft.de Sat Mar 19 15:25:30 2022
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id AB8091A9239
for <gnats-bugs@gnats.NetBSD.org>; Sat, 19 Mar 2022 15:25:30 +0000 (UTC)
Message-Id: <20220319152522.0F9215CC860@emmas.aprisoft.de>
Date: Sat, 19 Mar 2022 16:25:22 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: dbus related (?) crash in xfce4-session
X-Send-Pr-Version: 3.95
>Number: 56763
>Category: pkg
>Synopsis: dbus related (?) crash in xfce4-session
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 19 15:30:01 +0000 2022
>Closed-Date: Sun Mar 20 18:46:31 +0000 2022
>Last-Modified: Sun Mar 20 18:46:31 +0000 2022
>Originator: Martin Husemann
>Release: NetBSD 9.99.94
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD martins.aprisoft.de 9.99.94 NetBSD 9.99.94 (GENERIC) #113: Fri Mar 18 18:40:25 CET 2022 martin@martins.aprisoft.de:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
I start xfce4 from xdm (from base/xsrc) with .xsession looking like this:
--8<--
#! /bin/sh
eval `dbus-launch --sh-syntax --exit-with-session`
exec startxfce4
-->8--
Since the latest pkgsrc update this makes xfce4-session crash:
Core was generated by `xfce4-session'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 xfsm_manager_get_shutdown_type (manager=manager@entry=0x0) at xfsm-manager.c:1934
1934 return manager->shutdown_type;
[Current thread is 1 (process 536)]
(gdb) bt
#0 xfsm_manager_get_shutdown_type (manager=manager@entry=0x0) at xfsm-manager.c:1934
#1 0x000000018be1ae90 in name_lost (connection=<optimized out>, name=<optimized out>, user_data=<optimized out>) at main.c:219
#2 0x0000764b8890d735 in call_lost_handler () from /usr/pkg/lib/libgio-2.0.so.0
#3 0x0000764b8890db2c in connection_get_cb () from /usr/pkg/lib/libgio-2.0.so.0
#4 0x0000764b888ac589 in g_task_return_now () from /usr/pkg/lib/libgio-2.0.so.0
#5 0x0000764b888ad122 in g_task_return.part () from /usr/pkg/lib/libgio-2.0.so.0
#6 0x0000764b888fe7db in bus_get_async_initable_cb () from /usr/pkg/lib/libgio-2.0.so.0
#7 0x0000764b888ac589 in g_task_return_now () from /usr/pkg/lib/libgio-2.0.so.0
#8 0x0000764b888ac5d1 in complete_in_idle_cb () from /usr/pkg/lib/libgio-2.0.so.0
#9 0x0000764b8804eb01 in g_main_context_dispatch () from /usr/pkg/lib/libglib-2.0.so.0
#10 0x0000764b8804ee39 in g_main_context_iterate.constprop () from /usr/pkg/lib/libglib-2.0.so.0
#11 0x0000764b8804f107 in g_main_loop_run () from /usr/pkg/lib/libglib-2.0.so.0
#12 0x0000764b8aa3d459 in gtk_main () from /usr/pkg/lib/libgtk-3.so.0
#13 0x000000018be2e0c7 in main (argc=<optimized out>, argv=<optimized out>) at main.c:358
(gdb) list
1929
1930
1931 XfsmShutdownType
1932 xfsm_manager_get_shutdown_type (XfsmManager *manager)
1933 {
1934 return manager->shutdown_type;
1935 }
and manager is NULL. It should have come from
203 static void
204 name_lost (GDBusConnection *connection,
205 const gchar *name,
206 gpointer user_data)
207 {
208 XfsmManager *manager = XFSM_MANAGER (user_data);
209 GError *error = NULL;
210 XfsmShutdownType shutdown_type;
211 XfsmShutdown *shutdown_helper;
212 gboolean succeed = TRUE;
(but unfortunately all details are optimized out)
>How-To-Repeat:
s/a
>Fix:
n/a
>Release-Note:
>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/56763: dbus related (?) crash in xfce4-session
Date: Sat, 19 Mar 2022 16:33:46 +0100
Further debugging shows:
(gdb) p user_data
$1 = (gpointer) 0x0
(gdb) p connection
$2 = (GDBusConnection *) 0x0
(gdb) p name
$3 = (const gchar *) 0x72afbaee91e0 "org.xfce.SessionManager"
... so it seems it can't contact dbus at all.
Martin
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/56763: dbus related (?) crash in xfce4-session
Date: Sat, 19 Mar 2022 16:44:34 +0100
And it is quite simple to work around: the --exit-with-session
option of dbus-launch does not work any more.
Dropping that option from the command line makes the xdm started xfce4
work again.
Martin
From: "David H. Gutteridge" <david@gutteridge.ca>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/56763: dbus related (?) crash in xfce4-session
Date: Sat, 19 Mar 2022 12:56:06 -0400
On Sat, 19 Mar 2022 at 15:45:02 +0000 (UTC), Martin Husemann wrote:
> And it is quite simple to work around: the --exit-with-session
> option of dbus-launch does not work any more.
>
> Dropping that option from the command line makes the xdm started
> xfce4
> work again.
I'm guessing this is fallout from the dbus update to 1.14 last week.
I'll take a look. I hadn't got around to rebuilding all the DEs that
could be affected (that I use), I'd just got as far as looking through
packages to see which ones would need adjustment of policy file
placement.
Dave
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/56763: dbus related (?) crash in xfce4-session
Date: Sat, 19 Mar 2022 20:28:37 +0100
It turns out this option(s) fail because:
7710 7710 dbus-launch GIO fd 2 wrote 94 bytes
"No terminal on standard input and no X display; cannot attach message \
bus to session lifetime\n"
... and the "No terminal on standard input" is expected in this setup.
But not being able to connect to the X server clearly is not.
The code is in dbus-1.14.0/tools/dbus-launch.c:kill_bus_when_session_ends
and has this:
#ifdef DBUS_BUILD_X11
x11_init();
if (xdisplay != NULL)
{
x_fd = ConnectionNumber (xdisplay);
}
else
x_fd = -1;
#else
x_fd = -1;
#endif
and it seems that DBUS_BUILD_X11 is not defined when compiling this.
I think the configure script is buggy, does everyone else use the cmake
build instead? Haven't traced this lossage during configure, but it also
fails to properly obey --enable-verbose-mode=yes (which would have helped
during debugging).
Martin
State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 20 Mar 2022 13:37:38 +0000
State-Changed-Why:
I've just committed a candidate fix - please test!
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56763 CVS commit: pkgsrc/sysutils/dbus
Date: Sun, 20 Mar 2022 13:37:13 +0000
Module Name: pkgsrc
Committed By: wiz
Date: Sun Mar 20 13:37:13 UTC 2022
Modified Files:
pkgsrc/sysutils/dbus: Makefile options.mk
Log Message:
dbus: candidate fix for PR 56763
To fix interaction between dbus and xfce4.
Debugging by martin@
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 pkgsrc/sysutils/dbus/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/sysutils/dbus/options.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 20 Mar 2022 18:46:31 +0000
State-Changed-Why:
martin confirmed that (the second version) of my fix did fix the problem.
Thanks for debugging & testing!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.