How to debug failed service activation?
Martin Vidner
mvidner at suse.cz
Mon Aug 11 07:59:58 PDT 2014
On Tue, Aug 05, 2014 at 10:20:40AM -0700, Jon Watte wrote:
> Thanks for the assurance of zoeticity!
>
> Now, as for the question:
> In activation-helper.c, function switch_user, there are four cases
> where the function may fail.
> They all fail with the same error code, but each of them has a
> separate extra error information string.
> How can I see which specific error information string was used to
> generate the error I'm seeing when attempting dbus activation of my
> service?
> I presume there's a dbus activation server (perhaps this is the
> message bus daemon itself.) Is there a standard way to increase
> verbosity of logging of this, perhaps?
Hi Jon,
try strace on the dbus daemon and its children:
as root:
strace -s999 -f -o strace.log `pgrep dbus-daemon | head -n1`
In my case, the relevant part corresponding to a successful run of
switch_user is
18144 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
18144 connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = 0
18144 sendto(3, "\2\0\0\0\17\0\0\0\5\0\0\0root\0", 17, MSG_NOSIGNAL, NULL, 0) = 17
18144 poll([{fd=3, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=3, revents=POLLIN}])
18144 read(3, "\2\0\0\0\0\0\0\0\0\0\0\0", 12) = 12
18144 close(3) = 0
18144 setgroups(1, [0]) = 0
18144 setgid(0) = 0
18144 setuid(0) = 0
18144 execve("/usr/sbin/snapperd", ["/usr/sbin/snapperd"], [/* 2 vars */]) = 0
--
Martin Vidner, Cloud & Systems Management Team
http://en.opensuse.org/User:Mvidner
Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20140811/6e157a41/attachment.sig>
More information about the dbus
mailing list