D-Bus Activation Problem...
S.Çağlar Onur
caglar at pardus.org.tr
Thu Apr 24 17:34:49 PDT 2008
Hi;
We are writing a PolicyKit-KDE [1] interface for KDE3 using Qt3 backport of the Qt4 bindings [2]. If policykit-kde started directly from console everything works as expected without a problem, when it's started with dbus service activation __first call__ always ends up with "org.freedesktop.DBus.Error.NoReply" but subsequent calls works fine like following;
caglar at zangetsu ~ $ dbus-send --session --dest=org.freedesktop.PolicyKit.AuthenticationAgent --print-reply / org.freedesktop.DBus.Introspectable.Introspect
Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
caglar at zangetsu ~ $ dbus-send --session --dest=org.freedesktop.PolicyKit.AuthenticationAgent --print-reply / org.freedesktop.DBus.Introspectable.Introspect
method return sender=:1.98 -> dest=:1.99 reply_serial=2
string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="xml_data" type="s" direction="out" />
</method>
</interface>
<interface name="org.freedesktop.PolicyKit.AuthenticationAgent">
<method name="ObtainAuthorization" >
<!-- IN: PolicyKit action identifier; see PolKitAction -->
<arg direction="in" type="s" name="action_id" />
<!-- IN: X11 window ID for the top-level X11 window the dialog will be transient for. -->
<arg direction="in" type="u" name="xid" />
<!-- IN: Process ID to grant authorization to -->
<arg direction="in" type="u" name="pid" />
<!-- OUT: whether the user gained the authorization -->
<arg direction="out" type="b" name="gained_authorization" />
</method>
</interface>
</node>"
Neither debug enabled D-Bus daemon nor dbus-monitor shows nothing strange.
"dbus-monitor --session" for service activation shows;
caglar at zangetsu ~ $ dbus-monitor --session
signal sender=org.freedesktop.DBus -> dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.101"
string ""
string ":1.101"
method call sender=:1.101 -> dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
signal sender=org.freedesktop.DBus -> dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.102"
string ""
string ":1.102"
method call sender=:1.102 -> dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
method call sender=:1.102 -> dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "type='signal'"
method call sender=:1.102 -> dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "destination=':1.102'"
signal sender=org.freedesktop.DBus -> dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string "org.freedesktop.PolicyKit.AuthenticationAgent"
string ""
string ":1.102"
method call sender=:1.102 -> dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RequestName
string "org.freedesktop.PolicyKit.AuthenticationAgent"
uint32 0
---------- client waits here and timeouts ------------
signal sender=org.freedesktop.DBus -> dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.101"
string ":1.101"
string ""
"dbus-monitor --session" for manually started one shows;
caglar at zangetsu ~ $ dbus-monitor --session
signal sender=org.freedesktop.DBus -> dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.103"
string ""
string ":1.103"
method call sender=:1.103 -> dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
method call sender=:1.103 -> dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "type='signal'"
method call sender=:1.103 -> dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "destination=':1.103'"
signal sender=org.freedesktop.DBus -> dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string "org.freedesktop.PolicyKit.AuthenticationAgent"
string ""
string ":1.103"
method call sender=:1.103 -> dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RequestName
string "org.freedesktop.PolicyKit.AuthenticationAgent"
uint32 0
signal sender=org.freedesktop.DBus -> dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.104"
string ""
string ":1.104"
method call sender=:1.104 -> dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
method call sender=:1.104 -> dest=org.freedesktop.PolicyKit.AuthenticationAgent path=/; interface=org.freedesktop.DBus.Introspectable; member=Introspect
method return sender=:1.103 -> dest=:1.104 reply_serial=2
string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="xml_data" type="s" direction="out" />
</method>
</interface>
<interface name="org.freedesktop.PolicyKit.AuthenticationAgent">
<method name="ObtainAuthorization" >
<!-- IN: PolicyKit action identifier; see PolKitAction -->
<arg direction="in" type="s" name="action_id" />
<!-- IN: X11 window ID for the top-level X11 window the dialog will be transient for. -->
<arg direction="in" type="u" name="xid" />
<!-- IN: Process ID to grant authorization to -->
<arg direction="in" type="u" name="pid" />
<!-- OUT: whether the user gained the authorization -->
<arg direction="out" type="b" name="gained_authorization" />
</method>
</interface>
</node>"
signal sender=org.freedesktop.DBus -> dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.104"
string ":1.104"
string ""
What may be the cause of this, can server be slow to respond the method and lost it? Any debugging help or tips really appreciated...
[1] http://svn.pardus.org.tr/uludag/trunk/PolicyKit-kde/
[2] http://websvn.kde.org/branches/work/dbus-qt4-qt3backport/
Cheers
--
S.Çağlar Onur <caglar at pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/
Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080425/37ca8185/attachment.pgp
More information about the dbus
mailing list