send_with_block_and_reply fail

Johan FISCHER johan.fischer at fischaz.com
Tue Jun 15 18:54:31 PDT 2004


hi,

I'm developping a client connecting a server using the dbus lib with the server
function using the Glib binding.
The client is using only dbus_send_with_reply_and_block function but sometimes,
It seems the server send the reply too fast and the client miss it and timeout.

Anyway, this is the output with DBUS_VERBOSE:

...
set_string_field() field 8 prealloc 19
delete_one_and_re_align: Deleting one field at offset 77
iterate_one_field: name_offset=77, append to (nil)
iterate_one_field: name 8, type 's' 115 at 78 len 1, array type 's' 115
iterate_one_field: alignment 4 value at pos 80
iterate_one_field: value_pos 80 value_len 5 value_end 85
set_string_field() field 8 prealloc 20
delete_one_and_re_align: Deleting one field at offset 77
iterate_one_field: name_offset=77, append to (nil)
iterate_one_field: name 8, type 's' 115 at 78 len 1, array type 's' 115
iterate_one_field: alignment 4 value at pos 80
iterate_one_field: value_pos 80 value_len 6 value_end 86
set_string_field() field 8 prealloc 21
delete_one_and_re_align: Deleting one field at offset 77
iterate_one_field: name_offset=77, append to (nil)
iterate_one_field: name 8, type 's' 115 at 78 len 1, array type 's' 115
iterate_one_field: alignment 4 value at pos 80
iterate_one_field: value_pos 80 value_len 7 value_end 87
set_string_field() field 8 prealloc 22
delete_one_and_re_align: Deleting one field at offset 77
iterate_one_field: name_offset=77, append to (nil)
iterate_one_field: name 8, type 's' 115 at 78 len 1, array type 's' 115
iterate_one_field: alignment 4 value at pos 80
iterate_one_field: value_pos 80 value_len 8 value_end 88
set_string_field() field 8 prealloc 23
delete_one_and_re_align: Deleting one field at offset 77
iterate_one_field: name_offset=77, append to (nil)
iterate_one_field: name 8, type 's' 115 at 78 len 1, array type 's' 115
iterate_one_field: alignment 4 value at pos 80
iterate_one_field: value_pos 80 value_len 9 value_end 89
set_string_field() field 8 prealloc 24
delete_one_and_re_align: Deleting one field at offset 77
iterate_one_field: name_offset=77, append to (nil)
iterate_one_field: name 8, type 's' 115 at 78 len 1, array type 's' 115
iterate_one_field: alignment 4 value at pos 80
iterate_one_field: value_pos 80 value_len 10 value_end 90
Message 0x8099dd8 (1 com.fischaz 'ususus') added to outgoing queue 0x808d0d0, 1
pending to send
Toggling watch on fd 4 to 1
Setting watch fd 4 data to data = 0x8099e78 function = 0x400303b0 from data =
(nil) function = (nil)
 wrote 160 bytes of 160
Message 0x8099dd8 (1 com.fischaz 'ususus') removed from outgoing queue
0x808d0d0, 0 left to send
Toggling watch on fd 4 to 0
Setting watch fd 4 data to data = (nil) function = (nil) from data = 0x8099e78
function = 0x400303b0
handling read watch
 read 160 bytes
Found reply serial 32 at offset 20
  -2    0x809a568:         0x00 0x00
   2    0x809a56c: 0x00 0x00 0x00 0x00 BE: 0 LE: 0
   6    0x809a570: 0x00 0x00 0x00 0x00 BE: 0 LE: 0
  10    0x809a574: 0x00 0x00 0x04  '@' BE: 1088 LE: 1074003968 dbl: 2.5

Loaded message 0x8099a30
queueing received message 0x8099a30
Message 0x8099a30 (2 no interface 'uuuussduubuuu') added to incoming queue
0x808d0d0, 1 incoming
Message 0x8099a30 (2 no interface 'uuuussduubuuu') removed from incoming queue
0x808d0d0, 0 incoming
  running object path dispatch on message 0x8099a30 (2 no interface
'uuuussduubuuu')
No path field in message
  done dispatching 0x8099a30 (2 no interface 'uuuussduubuuu') on connection
0x808d0d0
Done with message in dbus_connection_dispatch
dbus_connection_send_with_reply_and_block(): will block 15000 milliseconds for
reply serial 32 from 1087349552 sec 426858 usec to 1087349567 sec 426858 usec
Transport iteration flags 0x6 timeout 15000 connected = 1
 iteration flags = read timeout = 15000 read_watch = 0x808d2b8 write_watch =
0x808d290
in iteration, need_read=0 need_write=0
dbus_connection_send_with_reply_and_block(): 1 milliseconds remain
Transport iteration flags 0x6 timeout 1 connected = 1
 iteration flags = read timeout = 1 read_watch = 0x808d2b8 write_watch =
0x808d290
in iteration, need_read=0 need_write=0
dbus_connection_send_with_reply_and_block(): Waited 15000 milliseconds and got
no reply
[getOrderBook] An error occured when sending the DBusMessage
[getOrderBook] No Reply...

So, it seems the client receive a reply message serial 32, insert it in the
incoming queue, delete it (no filter installed) and then the
dbus_send_with_rpely_and_block start listening for the reply.

Any idea ?

Thx.

--
Johan FISCHER






----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 1018 bytes
Desc: PGP Public Key
Url : http://freedesktop.org/pipermail/dbus/attachments/20040616/4dd36339/attachment-0001.bin


More information about the dbus mailing list