Bug 8361 - D-Bus configuration file handling (present in .62 to .93) issues
Summary: D-Bus configuration file handling (present in .62 to .93) issues
Status: RESOLVED NOTABUG
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: x86 (IA32) FreeBSD
: high normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-19 16:38 UTC by Steev Klimaszewski
Modified: 2006-10-11 08:25 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Steev Klimaszewski 2006-09-19 16:38:19 UTC
If there is an empty configuration file, D-Bus will fail to start.

On Gentoo, I do as such...
sudo touch /etc/dbus-1/system.d/foo.conf
sudo /etc/init.d/dbus restart
And the output I get is
Failed to start message bus: Not enough memory.

This also happens with Gentoo/FreeBSD.  

Versions tested were .62, .91, .92, .93

Attempting to start with dbus-daemon --system --nofork also reports the same
error immediately.

CFLAGS used were
(0.62) - -march=pentium2 -O2 -fomit-frame-pointer -pipe -fforce-addr
(0.9x) - -march=pentium3 -O2 -pipe -fforce addr
         -march=i686 -O2 -pipe

Not sure what all else info is required, simply ask and I am more than willing
to provide.
Comment 1 John (J5) Palmieri 2006-09-24 10:35:20 UTC
I get

Failed to start message bus: Error in file /etc/dbus-1/system.d/test.conf, line
1, column 0: no element found

which is correct, though we should most likely ignore this and send a warning
instead.
Comment 2 Havoc Pennington 2006-09-24 14:59:38 UTC
Unless I'm missing something I'd say NOTABUG - a config file is necessary to 
define a bus daemon, there is no sensible default behavior. And the minimum 
valid config file will have the root xml element, an empty file is not a valid 
xml document.
Comment 3 Steev Klimaszewski 2006-09-24 21:22:27 UTC
I would think a warning would be better than erroring.  I don't know why Gentoo
reports it as Not enough memory - but I have had quite a few people test it, all
with the same results.  It could be that checks are disabled in the ebuild, I
will look into that as well tomorrow, when my internet access is a bit more reliable
Comment 4 Havoc Pennington 2006-09-25 05:31:04 UTC
An error is required because there's no way to continue; the daemon doesn't 
know what to do without a config file. It would not behave in any sensible way 
(would not even know whether to fork or not)
Comment 5 John (J5) Palmieri 2006-09-26 10:09:15 UTC
I am leaning towards not a bug other than the fact that the gentoo guys are
getting out of memory errors which is not helpful in debugging the issue if it
were to come up.  My reasoning for keeping the abort is we can not fix user or
packaging errors (would you propose we still run if someone overwrote
system.conf?). A malformed policy file could indicate larger problems and would
put the bus in an unkown state if the file itself should have had content in it.
Comment 6 John (J5) Palmieri 2006-10-11 08:25:11 UTC
committing as not a bug.  Above states why.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.