DBUS Issues on ARM
Shilpa Sheoran
sheoran.shilpa at gmail.com
Fri Mar 16 10:52:29 PDT 2007
1) Is the system.conf file correct? given below.
2) What env variables are needed to be set for system bus?
3) why is the dbus-daemon disconnecting the client?
4) when I cross compiled dbus-1.0.2.tar.gz for ARM I had to add the
following lines in the config.cache file.
{ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes/no}
("yes/no" depends on you target system)
and configured as follows
./configure -C CC=arm-linux-gcc --prefix=/usr/local -target=arm-linux
-host=arm-linux --with-x=no
Thanks for your help.
Shilpa
-------------------------------------------------------------------------------------------
The Server verbose mode output is as follows - using ./arm-linux-dbus-launch
-----------------------------------------------------------------------------------------------------------
cdma-linux # ./arm-linux-dbus-launch
--config-file=/usr/local/etc/dbus-1/system.conf
109: === Parent dbus-launch continues
109: Waiting for babysitter's intermediate parent
110: === Babysitter's intermediate parent created
111: === Bus exec process created
110: === Babysitter's intermediate parent continues
110: babysitting, exit_with_session = 0, child_pid = 111, read_bus_pid_fd = 7
111: Calling exec()
111: Allocated slot 0 on allocator 0x5d0b8 total 1 slots allocated 1 used
111: listening on unix socket
/usr/local/var/run/dbus/system_bus_socket abstract=0
111: Read 12 bytes from /dev/urandom
111: Initialized server on address
unix:path=/usr/local/var/run/dbus/system_bus_socket,guid=2dd8a6d3cfeb1f09f67c780012d53fbd
111: Adding a read watch on fd 3 using newly-set add watch function
111: Allocated slot 0 on allocator 0x5d05c total 1 slots allocated 1 used
111: Becoming a daemon...
111: chdir to /
111: forking...
111: parent writing pid file
113: in child, closing std file descriptors
111: parent exiting
109: Reading address from bus
109: Reading PID from daemon
DBUS_SESSION_BUS_ADDRESS=unix:path=/usr/local/var/run/dbus/system_bus_socket,guid=2dd8a6d3cfeb1f09f67c780012d53fbd
DBUS_SESSION_BUS_PID=113
109: dbus-launch exiting
--------------------------------------------------------------------------------------------------------------------------------
A ps shows me the daemon running....
113 root 1056 S /usr/local/bin/dbus-daemon --fork --print-pid 4 --pri
------------------------------------------------------------------------------------------------------------
ENV Variables
--------------------------
cdma-linux # export
DBUS_SESSION_BUS_ADDRESS=unix:path=/usr/local/var/run/dbus/system_bus_socket,guid=2dd8a6d3cfeb1f09f67c780012
d53fbd
cdma-linux # export DBUS_SESSION_BUS_PID=113
cdma-linux # export
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/usr/local/var/run/dbus/system_bus_socket,guid=2dd8a6d3cfeb1f09f67c780012d
------------------------------------------------------------------------------------------------------------------------------------------
VERBOSE mode from dbus-send.
------------------------------------------------
cdma-linux # ./arm-linux-dbus-send --print-reply --system
--dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus
.ListNames
117: Filling in system bus address...
117: used env var system bus
"unix:path=/usr/local/var/run/dbus/system_bus_socket,guid=2dd8a6d3cfeb1f09f67c780012d53fbd"
117: Filling in session bus address...
117: "unix:path=/usr/local/var/run/dbus/system_bus_socket,guid=2dd8a6d3cfeb1f09f67c780012d53fbd"
117: Filling in activation bus address...
117: "none set"
117: opening shared connection to:
unix:path=/usr/local/var/run/dbus/system_bus_socket,guid=2dd8a6d3cfeb1f09f67c780012d53fbd
117: checking for existing connection
117: creating shared_connections hash table
117: successfully created shared_connections
117: connecting to unix socket
/usr/local/var/run/dbus/system_bus_socket abstract=0
117: Successfully connected to unix socket
/usr/local/var/run/dbus/system_bus_socket
117: client: going from state NeedSendAuth to state WaitingForData
117: Initialized transport on address
unix:path=/usr/local/var/run/dbus/system_bus_socket
117: LOCK: _dbus_connection_new_for_transport
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: check_read_watch: fd = 3
117: setting read watch enabled = 0
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: check_write_watch(): needed = 1 on connection 0x138c8 watch
0x13560 fd = 3 outgoing messages exist 0
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: UNLOCK: _dbus_connection_new_for_transport
117: LOCK: _dbus_connection_open_internal
117: stored connection to 2dd8a6d3cfeb1f09f67c780012d53fbd to be shared
117: UNLOCK: _dbus_connection_open_internal
117: LOCK: dbus_connection_set_exit_on_disconnect
117: UNLOCK: dbus_connection_set_exit_on_disconnect
117: Allocated slot 0 on allocator 0x3005abf4 total 1 slots allocated 1 used
117: LOCK: dbus_connection_get_data
117: UNLOCK: dbus_connection_get_data
117: LOCK: dbus_connection_set_data
117: UNLOCK: dbus_connection_set_data
117: LOCK: dbus_connection_send_with_reply
117: Allocated slot 0 on allocator 0x3005ac3c total 1 slots allocated 1 used
117: UNLOCK: protected_change_timeout
117: LOCK: protected_change_timeout
117: Message 0x13bf0 (1 /org/freedesktop/DBus org.freedesktop.DBus
Hello '') for org.freedesktop.DBus added to outgoing queue 0x
138c8, 1 pending to send
117: Message 0x13bf0 serial is 1
117: _dbus_connection_do_iteration_unlocked start
117: UNLOCK: _dbus_connection_acquire_io_path
117: _dbus_connection_acquire_io_path locking io_path_mutex
117: _dbus_connection_acquire_io_path start
connection->io_path_acquired = 0 timeout = 0
117: _dbus_connection_acquire_io_path end connection->io_path_acquired
= 1 we_acquired = 1
117: _dbus_connection_acquire_io_path unlocking io_path_mutex
117: LOCK: _dbus_connection_acquire_io_path
117: Transport iteration flags 0x1 timeout -1 connected = 1
117: iteration flags = write timeout = -1 read_watch = 0x13588
write_watch = 0x13560 fd = 3
117: in iteration, need_read=0 need_write=1
117: exchange_credentials: do_reading = 0, do_writing = 1
117: wrote credentials byte
117: client auth state: bytes to send
117: client: Sent 18 bytes of: AUTH EXTERNAL 30
117: exchange_credentials: do_reading = 0, do_writing = 1
117: client auth state: waiting for input
117: check_read_watch: fd = 3
117: setting read watch enabled = 1
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: check_write_watch(): needed = 0 on connection 0x138c8 watch
0x13560 fd = 3 outgoing messages exist 1
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: Not authenticated, not writing anything
117: check_write_watch(): needed = 0 on connection 0x138c8 watch
0x13560 fd = 3 outgoing messages exist 1
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: ... leaving do_iteration()
117: _dbus_transport_do_iteration end
117: _dbus_connection_release_io_path locking io_path_mutex
117: _dbus_connection_release_io_path start connection->io_path_acquired = 1
117: _dbus_connection_release_io_path unlocking io_path_mutex
117: _dbus_connection_do_iteration_unlocked end
117: dispatch status = complete is_connected = 1
117: UNLOCK: _dbus_connection_update_dispatch_status_and_unlock
117: LOCK: dbus_connection_unref
117: UNLOCK: dbus_connection_unref
117: LOCK: _dbus_connection_lock
117: UNLOCK: _dbus_connection_unlock
117: LOCK: _dbus_connection_lock
117: UNLOCK: _dbus_connection_unlock
117: LOCK: _dbus_connection_lock
117: doing iteration in _dbus_connection_flush_unlocked
117: _dbus_connection_do_iteration_unlocked start
117: UNLOCK: _dbus_connection_acquire_io_path
117: _dbus_connection_acquire_io_path locking io_path_mutex
117: _dbus_connection_acquire_io_path start
connection->io_path_acquired = 0 timeout = -1
117: _dbus_connection_acquire_io_path end connection->io_path_acquired
= 1 we_acquired = 1
117: _dbus_connection_acquire_io_path unlocking io_path_mutex
117: LOCK: _dbus_connection_acquire_io_path
117: Transport iteration flags 0x7 timeout -1 connected = 1
117: iteration flags = readwrite timeout = -1 read_watch = 0x13588
write_watch = 0x13560 fd = 3
117: unlock socket_do_iteration pre poll
117: UNLOCK: _dbus_connection_unlock
117: lock socket_do_iteration post poll
117: LOCK: _dbus_connection_lock
117: in iteration, need_read=1 need_write=0
117: exchange_credentials: do_reading = 1, do_writing = 0
117: client auth state: waiting for input
117: read 37 bytes in auth phase
117: client: got command "OK 2dd8a6d3cfeb1f09f67c780012d53fbd"
117: Got GUID '2dd8a6d3cfeb1f09f67c780012d53fbd' from the server
117: client: going from state WaitingForData to state Authenticated
117: exchange_credentials: do_reading = 1, do_writing = 0
117: client auth state: bytes to send
117: check_read_watch: fd = 3
117: setting read watch enabled = 0
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: check_write_watch(): needed = 1 on connection 0x138c8 watch
0x13560 fd = 3 outgoing messages exist 1
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: do_reading: fd = 3
117: check_write_watch(): needed = 1 on connection 0x138c8 watch
0x13560 fd = 3 outgoing messages exist 1
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: ... leaving do_iteration()
117: _dbus_transport_do_iteration end
117: _dbus_connection_release_io_path locking io_path_mutex
117: _dbus_connection_release_io_path start connection->io_path_acquired = 1
117: _dbus_connection_release_io_path unlocking io_path_mutex
117: _dbus_connection_do_iteration_unlocked end
117: doing iteration in _dbus_connection_flush_unlocked
117: _dbus_connection_do_iteration_unlocked start
117: UNLOCK: _dbus_connection_acquire_io_path
117: _dbus_connection_acquire_io_path locking io_path_mutex
117: _dbus_connection_acquire_io_path start
connection->io_path_acquired = 0 timeout = -1
117: _dbus_connection_acquire_io_path end connection->io_path_acquired
= 1 we_acquired = 1
117: _dbus_connection_acquire_io_path unlocking io_path_mutex
117: LOCK: _dbus_connection_acquire_io_path
117: Transport iteration flags 0x7 timeout -1 connected = 1
117: iteration flags = readwrite timeout = -1 read_watch = 0x13588
write_watch = 0x13560 fd = 3
117: unlock socket_do_iteration pre poll
117: UNLOCK: _dbus_connection_unlock
117: lock socket_do_iteration post poll
117: LOCK: _dbus_connection_lock
117: in iteration, need_read=0 need_write=1
117: exchange_credentials: do_reading = 0, do_writing = 1
117: client auth state: bytes to send
117: client: Sent 7 bytes of: BEGIN
117: check_read_watch: fd = 3
117: setting read watch enabled = 1
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: check_write_watch(): needed = 1 on connection 0x138c8 watch
0x13560 fd = 3 outgoing messages exist 1
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: check_write_watch(): needed = 1 on connection 0x138c8 watch
0x13560 fd = 3 outgoing messages exist 1
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: ... leaving do_iteration()
117: _dbus_transport_do_iteration end
117: _dbus_connection_release_io_path locking io_path_mutex
117: _dbus_connection_release_io_path start connection->io_path_acquired = 1
117: _dbus_connection_release_io_path unlocking io_path_mutex
117: _dbus_connection_do_iteration_unlocked end
117: doing iteration in _dbus_connection_flush_unlocked
117: _dbus_connection_do_iteration_unlocked start
117: UNLOCK: _dbus_connection_acquire_io_path
117: _dbus_connection_acquire_io_path locking io_path_mutex
117: _dbus_connection_acquire_io_path start
connection->io_path_acquired = 0 timeout = -1
117: _dbus_connection_acquire_io_path end connection->io_path_acquired
= 1 we_acquired = 1
117: _dbus_connection_acquire_io_path unlocking io_path_mutex
117: LOCK: _dbus_connection_acquire_io_path
117: Transport iteration flags 0x7 timeout -1 connected = 1
117: iteration flags = readwrite timeout = -1 read_watch = 0x13588
write_watch = 0x13560 fd = 3
117: unlock socket_do_iteration pre poll
117: UNLOCK: _dbus_connection_unlock
117: lock socket_do_iteration post poll
117: LOCK: _dbus_connection_lock
117: in iteration, need_read=1 need_write=1
117: do_reading: fd = 3
117: check_read_watch: fd = 3
117: setting read watch enabled = 1
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: Disconnected from remote app
117: _dbus_transport_disconnect start
117: socket_disconnect
117: free_watches start
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: Setting watch fd -1 data to data = (nil) function = (nil) from
data = (nil) function = (nil)
117: UNLOCK: protected_change_watch
117: LOCK: protected_change_watch
117: Setting watch fd -1 data to data = (nil) function = (nil) from
data = (nil) function = (nil)
117: free_watches end
117: _dbus_transport_disconnect end
117: Not connected, not writing anything
117: ... leaving do_iteration()
117: _dbus_transport_do_iteration end
117: _dbus_connection_release_io_path locking io_path_mutex
117: _dbus_connection_release_io_path start connection->io_path_acquired = 1
117: _dbus_connection_release_io_path unlocking io_path_mutex
117: _dbus_connection_do_iteration_unlocked end
117: _dbus_connection_flush_unlocked middle
117: 0 unused bytes sent to message loader
117: dispatch status = complete is_connected = 0
117: Dropping 1 outgoing messages since we're disconnected
117: Message 0x13bf0 (1 /org/freedesktop/DBus org.freedesktop.DBus
Hello '') removed from outgoing queue 0x138c8, 0 left to send
117: Sending disconnect message from
notify_disconnected_and_dispatch_complete_unlocked
117: Synthesized message 0x13d78 added to incoming queue 0x138c8, 1 incoming
117: UNLOCK: protected_change_timeout
117: LOCK: protected_change_timeout
117: UNLOCK: _dbus_connection_unlock
117: LOCK: free_pending_call_on_hash_removal
117: UNLOCK: _dbus_connection_unlock
117: LOCK: connection_timeout_and_complete_all_pending_calls_unlocked
117: Synthesized message 0x13950 added to incoming queue 0x138c8, 2 incoming
117: dbus_connection_send_with_reply_and_block(): will block 25000
milliseconds for reply serial 1 from 315966259 sec 753153 use
c to 315966284 sec 753153 usec
117: check_for_reply_and_update_dispatch_unlocked checked for reply
117: dbus_connection_send_with_reply_and_block(): got reply
117: handing message 0x13d78 (error) to pending call serial 1
117: UNLOCK: _dbus_connection_unlock
117: LOCK: _dbus_connection_lock
117: UNLOCK: _dbus_connection_unlock
117: LOCK: check_for_reply_and_update_dispatch_unlocked
117: UNLOCK: _dbus_connection_update_dispatch_status_and_unlock
117: LOCK: dbus_connection_unref
117: UNLOCK: dbus_connection_unref
117: LOCK: _dbus_connection_lock
117: UNLOCK: _dbus_connection_unlock
117: LOCK: _dbus_connection_lock
117: UNLOCK: _dbus_connection_unlock
117: LOCK: _dbus_connection_lock
117: UNLOCK: _dbus_connection_unlock
117: Freeing slot 0 on allocator 0x3005ac3c total 1 allocated 1 used
117: LOCK: dbus_connection_unref
117: UNLOCK: dbus_connection_unref
117: LOCK: _dbus_connection_close_possibly_shared
117: Disconnecting 0x138c8
117: _dbus_transport_disconnect start
117: UNLOCK: _dbus_connection_update_dispatch_status_and_unlock
117: LOCK: dbus_connection_unref
117: UNLOCK: dbus_connection_unref
117: LOCK: dbus_connection_unref
117: UNLOCK: dbus_connection_unref
117: LOCK: dbus_connection_unref
117: UNLOCK: dbus_connection_unref
Failed to open connection to system message bus: Did not receive a
reply. Possible causes include: the remote application did no
t send a reply, the message bus security policy blocked the reply, the
reply timeout expired, or the network connection was brok
en.
------------SYSTEM.CONF------------
<!-- This configuration file controls the systemwide message bus.
Add a system-local.conf and edit that rather than changing this
file directly. -->
<!-- Note that there are any number of ways you can hose yourself
security-wise by screwing up this file; in particular, you
probably don't want to listen on any more addresses, add any more
auth mechanisms, run as a different user, etc. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Our well-known bus type, do not change this -->
<type>system</type>
<!-- Fork into daemon mode -->
<fork/>
<!-- Write a pid file -->
<pidfile>/usr/local/var/run/dbus/pid</pidfile>
<!-- Write a pid file -->
<pidfile>/usr/local/var/run/dbus/pid</pidfile>
<!-- Only allow socket-credentials-based authentication -->
<!-- Only listen on a local socket. (abstract=/path/to/socket
means use abstract namespace, don't really create filesystem
file; only Linux supports this. Use path=/whatever on other
systems.) -->
<listen>unix:path=/usr/local/var/run/dbus/system_bus_socket</listen>
<!-- Config files are placed here that among other things, punch
holes in the above policy for specific services. -->
<includedir>system.d</includedir>
<!-- This is included last so local configuration can override what's
in this standard file -->
<include ignore_missing="yes">system-local.conf</include>
<include if_selinux_enabled="yes"
selinux_root_relative="yes">contexts/dbus_contexts</include>
On 3/16/07, Thiago Macieira <thiago at kde.org> wrote:
> Shilpa Sheoran wrote:
> >cdma-linux # ./arm-linux-dbus-send --print-reply --system
> >--dest=org.freedesktop.DBus /org/freedesktop/DBus
> >org.freedesktop.DBus.ListNames
> >Failed to open connection to system message bus: Did not receive a
> >reply. Possible causes include: the remote application did not se
> >nd a reply, the message bus security policy blocked the reply, the
> >reply timeout expired, or the network connection was broken.
>
> The server (dbus-daemon) disconnected you.
>
> Can you get the verbose-mode output from the server?
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
>
More information about the dbus
mailing list