Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 236779 - sys-apps/dbus-1.2.3 does not start on g/FreeBSD-7
Summary: sys-apps/dbus-1.2.3 does not start on g/FreeBSD-7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-05 07:31 UTC by Alexis Ballier
Modified: 2009-02-05 19:03 UTC (History)
3 users (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 Alexis Ballier gentoo-dev 2008-09-05 07:31:25 UTC
When starting dbus, I get this:
 # /etc/init.d/dbus restart
 * Starting D-BUS system messagebus ...
Unknown username "root" in message bus configuration file
Unknown username "haldaemon" in message bus configuration file
Unknown username "root" in message bus configuration file
Unknown group "plugdev" in message bus configuration file
Unknown group "plugdev" in message bus configuration file
Failed to start message bus: Could not get UID and GID for username "messagebus"
 * start-stop-daemon: failed to start `/usr/bin/dbus-daemon'                                                [ !! ]
 * ERROR: dbus failed to start


I don't know what's wrong there as I don't know dbus enough :/ Help is very welcome.
1.2.1 was fine; for now I'm tempted to unkeyword 1.2.3 until this is fixed.
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2008-11-25 14:23:06 UTC
It's basically trying to look up the user accounts listed in the configuration file. It would appear that getpwnam() and friends are not returning what it's expecting.

There's probably a patch in FreeBSD's ports.

I don't have a Gentoo/FreeBSD box to test or debug this on so you're going to have to do a little leg work yourself. The first step would be to check FreeBSD's ports to see if they have a patch for this and try it. If not, run D-Bus through strace and provide that output so we can see exactly what call its failing on.
Comment 2 Alexis Ballier gentoo-dev 2008-11-25 20:32:59 UTC
(In reply to comment #1)
> There's probably a patch in FreeBSD's ports.

There is none: they're still at 1.2.1 afaik

> I don't have a Gentoo/FreeBSD box to test or debug this on so you're going to
> have to do a little leg work yourself. The first step would be to check
> FreeBSD's ports to see if they have a patch for this and try it. If not, run
> D-Bus through strace and provide that output so we can see exactly what call
> its failing on.

There is no strace available but I can play with ktrace/kdump.

Doing some debugging showed that code in dbus/dbus-sysdeps-unix.c:1489 (and bus/dbus-sysdeps-util-unix.c:831 for the groups)
size_t buflen;
buflen = sysconf (_SC_GETPW_R_SIZE_MAX);
if (buflen <= 0)
      buflen = 1024;

fun: sysconf (_SC_GETPW_R_SIZE_MAX) returns -1 here and the if(buflen<=0) check is useless since buflen is unsigned. Changing both buflen types to ssize_t fixes the issue here...
Comment 3 Javier Villavicencio (RETIRED) gentoo-dev 2008-11-25 20:46:58 UTC
(In reply to comment #2)
> There is no strace available but I can play with ktrace/kdump.
> 

truss is your friend :+P
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2008-12-23 22:35:30 UTC
Looks like bug #224745 and this are related.
Comment 5 Alexis Ballier gentoo-dev 2009-01-02 15:59:55 UTC
(In reply to comment #4)
> Looks like bug #224745 and this are related.

iirc #224745 is due to fbsd 6 not supporting well pie executables; this one is a coding mistake with signed/unsigned integer types in dbus.

Comment 6 Alexis Ballier gentoo-dev 2009-02-05 19:03:27 UTC
I backported upstream fix in 1.2.3-r1 and rekeyworded it -> fixed