Some questions about dbus.Please help me

飞天猪 wjs-198209 at 163.com
Thu Jun 14 18:48:48 PDT 2007


Hello.
 I have some quesion about dbus.Can you help me? Please.
1.     Does dbus have to use cache in file system? where is it ?Does it use default user's home directory for cache? Does it have to be writable in the home directory. I embedded dbus in arm linux, where there is no user( only root) and no root directory and files is read only.
2.     How is dbus secure policy? Does it have to use users file such as /etc/group and  /etc/passwd to work safely? Which files have something to do with dbus at least if yes?
Now I get stuck  on a dbus failure when I ran hcid .Please help me.
I have compliled dbus with verbose enabled.When I ran daemon,the following message apparred
[root@(none) /]# DBUS_VERBOSE=1 dbus-daemon --system
433: Allocated slot 0 on allocator 0x5cd58 total 1 slots allocated 1 used
433: No cache for UID 0
433: Using cache for UID 0 information
433: listening on unix socket /var/run/dbus/system_bus_socket abstract=0
433: Read 12 bytes from /dev/urandom
433:Initialized server on address unix:path=/var/run/dbus/system_bus_socket,guid=692b534d9b592b6ede4e0d0000000152
433: Adding a read watch on fd 3 using newly-set add watch function
433: Allocated slot 0 on allocator 0x5ccfc total 1 slots allocated 1 used
433: No cache for user "messagebus"
433: Becoming a daemon...
433: chdir to /
433: forking...
434: in child, closing std file descriptors
433: parent writing pid file
433: parent exiting
When I ran dbus-monitor,it failed.
[root@(none) /]# dbus-monitor --system
436: Filling in system bus address...
436:   used default system bus "unix:path=/var/run/dbus/system_bus_socket"
436: Filling in session bus address...
436:   "autolaunch:"
436: Filling in activation bus address...
436:   "none set"
436: opening shared connection to: unix:path=/var/run/dbus/system_bus_socket
436: checking for existing connection
436: creating shared_connections hash table
436:   successfully created shared_connections
436: connecting to unix socket /var/run/dbus/system_bus_socket abstract=0
436: Successfully connected to unix socket /var/run/dbus/system_bus_socket
436: client: going from state NeedSendAuth to state WaitingForData
436: Initialized transport on address unix:path=/var/run/dbus/system_bus_socket
436:   LOCK: _dbus_connection_new_for_transport
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436: check_read_watch: fd = 3
436:   setting read watch enabled = 0
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436: check_write_watch(): needed = 1 on connection 0x136e8 watch 0x13388 fd = 3 outgoing messages exist 0
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436:   UNLOCK: _dbus_connection_new_for_transport
436:   LOCK: _dbus_connection_open_internal
436:   UNLOCK: _dbus_connection_open_internal
436:   LOCK: dbus_connection_set_exit_on_disconnect
436:   UNLOCK: dbus_connection_set_exit_on_disconnect
436: Allocated slot 0 on allocator 0x4005a450 total 1 slots allocated 1 used
436:   LOCK: dbus_connection_get_data
436:   UNLOCK: dbus_connection_get_data
436:   LOCK: dbus_connection_set_data
436:   UNLOCK: dbus_connection_set_data
436:   LOCK: dbus_connection_send_with_reply
436: Allocated slot 0 on allocator 0x4005a498 total 1 slots allocated 1 used
436:   UNLOCK: protected_change_timeout
436:   LOCK: protected_change_timeout
436: Message 0x13918 (1 /org/freedesktop/DBus org.freedesktop.DBus Hello '') for org.freedesktop.DBus added to outgoing queue 0x136e8, 1 pending to send
436: Message 0x13918 serial is 1
436: _dbus_connection_do_iteration_unlocked start
436:   UNLOCK: _dbus_connection_acquire_io_path
436: _dbus_connection_acquire_io_path locking io_path_mutex
436: _dbus_connection_acquire_io_path start connection->io_path_acquired = 0 timeout = 0
436: _dbus_connection_acquire_io_path end connection->io_path_acquired = 1 we_acquired = 1
436: _dbus_connection_acquire_io_path unlocking io_path_mutex
436:   LOCK: _dbus_connection_acquire_io_path
436: Transport iteration flags 0x1 timeout -1 connected = 1
436:  iteration flags = write timeout = -1 read_watch = 0x133b0 write_watch = 0x13388 fd = 3
436: in iteration, need_read=0 need_write=1
436: exchange_credentials: do_reading = 0, do_writing = 1
436: wrote credentials byte
436:  client auth state: bytes to send
436: client: Sent 18 bytes of: AUTH EXTERNAL 30
436: exchange_credentials: do_reading = 0, do_writing = 1
436:  client auth state: waiting for input
436: check_read_watch: fd = 3
436:   setting read watch enabled = 1
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436: check_write_watch(): needed = 0 on connection 0x136e8 watch 0x13388 fd = 3 outgoing messages exist 1
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436: Not authenticated, not writing anything
436: check_write_watch(): needed = 0 on connection 0x136e8 watch 0x13388 fd = 3 outgoing messages exist 1
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436:  ... leaving do_iteration()
436: _dbus_transport_do_iteration end
436: _dbus_connection_release_io_path locking io_path_mutex
436: _dbus_connection_release_io_path start connection->io_path_acquired = 1
436: _dbus_connection_release_io_path unlocking io_path_mutex
436: _dbus_connection_do_iteration_unlocked end
436: dispatch status = complete is_connected = 1
436:   UNLOCK: _dbus_connection_update_dispatch_status_and_unlock
436:   LOCK: dbus_connection_unref
436:   UNLOCK: dbus_connection_unref
436:   LOCK: _dbus_connection_lock
436:   UNLOCK: _dbus_connection_unlock
436:   LOCK: _dbus_connection_lock
436:   UNLOCK: _dbus_connection_unlock
436:   LOCK: _dbus_connection_lock
436: doing iteration in _dbus_connection_flush_unlocked
436: _dbus_connection_do_iteration_unlocked start
436:   UNLOCK: _dbus_connection_acquire_io_path
436: _dbus_connection_acquire_io_path locking io_path_mutex
436: _dbus_connection_acquire_io_path start connection->io_path_acquired = 0 timeout = -1
436: _dbus_connection_acquire_io_path end connection->io_path_acquired = 1 we_acquired = 1
436: _dbus_connection_acquire_io_path unlocking io_path_mutex
436:   LOCK: _dbus_connection_acquire_io_path
436: Transport iteration flags 0x7 timeout -1 connected = 1
436:  iteration flags = readwrite timeout = -1 read_watch = 0x133b0 write_watch = 0x13388 fd = 3
436: unlock socket_do_iteration pre poll
436:   UNLOCK: _dbus_connection_unlock
436: lock socket_do_iteration post poll
436:   LOCK: _dbus_connection_lock
436: in iteration, need_read=1 need_write=0
436: exchange_credentials: do_reading = 1, do_writing = 0
436:  client auth state: waiting for input
436:  read 37 bytes in auth phase
436: client: got command "OK 692b534d9b592b6ede4e0d0000000152"
436: Got GUID '692b534d9b592b6ede4e0d0000000152' from the server
436: client: going from state WaitingForData to state Authenticated
436: exchange_credentials: do_reading = 1, do_writing = 0
436:  client auth state: bytes to send
436: check_read_watch: fd = 3
436:   setting read watch enabled = 0
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436: check_write_watch(): needed = 1 on connection 0x136e8 watch 0x13388 fd = 3 outgoing messages exist 1
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436: do_reading: fd = 3
436: check_write_watch(): needed = 1 on connection 0x136e8 watch 0x13388 fd = 3 outgoing messages exist 1
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436:  ... leaving do_iteration()
436: _dbus_transport_do_iteration end
436: _dbus_connection_release_io_path locking io_path_mutex
436: _dbus_connection_release_io_path start connection->io_path_acquired = 1
436: _dbus_connection_release_io_path unlocking io_path_mutex
436: _dbus_connection_do_iteration_unlocked end
436: doing iteration in _dbus_connection_flush_unlocked
436: _dbus_connection_do_iteration_unlocked start
436:   UNLOCK: _dbus_connection_acquire_io_path
436: _dbus_connection_acquire_io_path locking io_path_mutex
436: _dbus_connection_acquire_io_path start connection->io_path_acquired = 0 timeout = -1
436: _dbus_connection_acquire_io_path end connection->io_path_acquired = 1 we_acquired = 1
436: _dbus_connection_acquire_io_path unlocking io_path_mutex
436:   LOCK: _dbus_connection_acquire_io_path
436: Transport iteration flags 0x7 timeout -1 connected = 1
436:  iteration flags = readwrite timeout = -1 read_watch = 0x133b0 write_watch = 0x13388 fd = 3
436: unlock socket_do_iteration pre poll
436:   UNLOCK: _dbus_connection_unlock
436: lock socket_do_iteration post poll
436:   LOCK: _dbus_connection_lock
436: in iteration, need_read=0 need_write=1
436: exchange_credentials: do_reading = 0, do_writing = 1
436:  client auth state: bytes to send
436: client: Sent 7 bytes of: BEGIN
436: check_read_watch: fd = 3
436:   setting read watch enabled = 1
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436: check_write_watch(): needed = 1 on connection 0x136e8 watch 0x13388 fd = 3 outgoing messages exist 1
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436: check_write_watch(): needed = 1 on connection 0x136e8 watch 0x13388 fd = 3 outgoing messages exist 1
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436:  ... leaving do_iteration()
436: _dbus_transport_do_iteration end
436: _dbus_connection_release_io_path locking io_path_mutex
436: _dbus_connection_release_io_path start connection->io_path_acquired = 1
436: _dbus_connection_release_io_path unlocking io_path_mutex
436: _dbus_connection_do_iteration_unlocked end
436: doing iteration in _dbus_connection_flush_unlocked
436: _dbus_connection_do_iteration_unlocked start
436:   UNLOCK: _dbus_connection_acquire_io_path
436: _dbus_connection_acquire_io_path locking io_path_mutex
436: _dbus_connection_acquire_io_path start connection->io_path_acquired = 0 timeout = -1
436: _dbus_connection_acquire_io_path end connection->io_path_acquired = 1 we_acquired = 1
436: _dbus_connection_acquire_io_path unlocking io_path_mutex
436:   LOCK: _dbus_connection_acquire_io_path
436: Transport iteration flags 0x7 timeout -1 connected = 1
436:  iteration flags = readwrite timeout = -1 read_watch = 0x133b0 write_watch = 0x13388 fd = 3
436: unlock socket_do_iteration pre poll
436:   UNLOCK: _dbus_connection_unlock
436: lock socket_do_iteration post poll
436:   LOCK: _dbus_connection_lock
436: in iteration, need_read=0 need_write=1
436: do_writing(), have_messages = 1, fd = 3
436:  wrote 128 bytes of 128
436: Message 0x13918 (1 /org/freedesktop/DBus org.freedesktop.DBus Hello '') removed from outgoing queue 0x136e8, 0 left to send
436: check_write_watch(): needed = 0 on connection 0x136e8 watch 0x13388 fd = 3 outgoing messages exist 0
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436:  ... leaving do_iteration()
436: _dbus_transport_do_iteration end
436: _dbus_connection_release_io_path locking io_path_mutex
436: _dbus_connection_release_io_path start connection->io_path_acquired = 1
436: _dbus_connection_release_io_path unlocking io_path_mutex
436: _dbus_connection_do_iteration_unlocked end
436: _dbus_connection_flush_unlocked middle
436:  0 unused bytes sent to message loader
436: dispatch status = complete is_connected = 1
436: dbus_connection_send_with_reply_and_block(): will block 25000 milliseconds for reply serial 1 from 377 sec 251411 usec to 402 sec 251411 usec
436: _dbus_connection_do_iteration_unlocked start
436:   UNLOCK: _dbus_connection_acquire_io_path
436: _dbus_connection_acquire_io_path locking io_path_mutex
436: _dbus_connection_acquire_io_path start connection->io_path_acquired = 0 timeout = 25000
436: _dbus_connection_acquire_io_path end connection->io_path_acquired = 1 we_acquired = 1
436: _dbus_connection_acquire_io_path unlocking io_path_mutex
436:   LOCK: _dbus_connection_acquire_io_path
436: Transport iteration flags 0x6 timeout 25000 connected = 1
436:  iteration flags = read timeout = 25000 read_watch = 0x133b0 write_watch = 0x13388 fd = 3
436: unlock socket_do_iteration pre poll
436:   UNLOCK: _dbus_connection_unlock
436: lock socket_do_iteration post poll
436:   LOCK: _dbus_connection_lock
436: in iteration, need_read=1 need_write=0
436: do_reading: fd = 3
436: check_read_watch: fd = 3
436:   setting read watch enabled = 1
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436: Disconnected from remote app
436: _dbus_transport_disconnect start
436: socket_disconnect
436: free_watches start
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436: Setting watch fd -1 data to data = (nil) function = (nil) from data = (nil) function = (nil)
436:   UNLOCK: protected_change_watch
436:   LOCK: protected_change_watch
436: Setting watch fd -1 data to data = (nil) function = (nil) from data = (nil) function = (nil)
436: free_watches end
436: _dbus_transport_disconnect end
436:  ... leaving do_iteration()
436: _dbus_transport_do_iteration end
436: _dbus_connection_release_io_path locking io_path_mutex
436: _dbus_connection_release_io_path start connection->io_path_acquired = 1
436: _dbus_connection_release_io_path unlocking io_path_mutex
436: _dbus_connection_do_iteration_unlocked end
436: _dbus_connection_block_pending_call top of recheck
436: dispatch status = complete is_connected = 0
436: Sending disconnect message from notify_disconnected_and_dispatch_complete_unlocked
436: Synthesized message 0x13a78 added to incoming queue 0x136e8, 1 incoming
436:   UNLOCK: protected_change_timeout
436:   LOCK: protected_change_timeout
436:   UNLOCK: _dbus_connection_unlock
436:   LOCK: free_pending_call_on_hash_removal
436:   UNLOCK: _dbus_connection_unlock
436:   LOCK: connection_timeout_and_complete_all_pending_calls_unlocked
436: Synthesized message 0x13770 added to incoming queue 0x136e8, 2 incoming
436: check_for_reply_and_update_dispatch_unlocked checked for reply
436: dbus_connection_send_with_reply_and_block(): got reply
436:   handing message 0x13a78 (error) to pending call serial 1
436:   UNLOCK: _dbus_connection_unlock
436:   LOCK: _dbus_connection_lock
436:   UNLOCK: _dbus_connection_unlock
436:   LOCK: check_for_reply_and_update_dispatch_unlocked
436:   UNLOCK: _dbus_connection_update_dispatch_status_and_unlock
436:   LOCK: dbus_connection_unref
436:   UNLOCK: dbus_connection_unref
436:   LOCK: _dbus_connection_lock
436:   UNLOCK: _dbus_connection_unlock
436:   LOCK: _dbus_connection_lock
436:   UNLOCK: _dbus_connection_unlock
436:   LOCK: _dbus_connection_lock
436:   UNLOCK: _dbus_connection_unlock
436: Freeing slot 0 on allocator 0x4005a498 total 1 allocated 1 used
436:   LOCK: dbus_connection_unref
436:   UNLOCK: dbus_connection_unref
436:   LOCK: _dbus_connection_close_possibly_shared
436: Disconnecting 0x136e8
436: _dbus_transport_disconnect start
436:   UNLOCK: _dbus_connection_update_dispatch_status_and_unlock
436:   LOCK: dbus_connection_unref
436:   UNLOCK: dbus_connection_unref
436:   LOCK: dbus_connection_unref
436:   UNLOCK: dbus_connection_unref
436:   LOCK: dbus_connection_unref
436:   UNLOCK: dbus_connection_unref
Failed to open connection to system message bus: 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.
                                             
                                                           Wang Jimscen
                                                           Jun 15,2007    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20070615/208baeb3/attachment.html 


More information about the dbus mailing list