Disconnected on every attempt to reply
P. Durante
shackan at gmail.com
Tue Aug 9 03:44:31 EST 2005
Hi,
trying to figure out the problem, I enabled debug output (at last!),
here's what I see when I send the reply (sorry for the length)
27025: LOCK: dbus_connection_send
27025: Message 0x806b998 (2 (null) no interface no member 's') for
:1.21 added to outgoing queue 0x8065ae8, 1 pending to send
from the docs, only method_call and signal messages are supposed to
have the path/interface/member fields set, right ? so since this is a
method_return (type = 2) everything's fine
27025: Message 0x806b998 serial is 6
....
27025: wrote 81 bytes of 81
27025: Message 0x806b998 (2 (null) no interface no member 's') removed
from outgoing queue 0x8065ae8, 0 left to send
....
27025: Notifying of change to dispatch status of 0x8065ae8 now 1 (complete)
the message is actually written!!!!
but then
....
27025: Disconnected from remote app
setting the daemon to verbose, after some crawling I saw (this is
output from the daemon, not my program)
27141: have 81 bytes, need body 9 + header 72 = 81
27141: validating body from pos 0 len 81 sig 'yyyyuua(yv)'
27141: p = 0x80b46bf end = 0x80b46e1 claimed_len 1
27141: initially caching field 6
27141: initially caching field 5
27141: Field 5 was invalid
27141: Failed to load header for new message code 16
27141: 0 0x80b4690: 'l' 0x02 0x01 0x01 BE: 1812070657 LE: 16843372
27141: 4 0x80b4694: 0x09 0x00 0x00 0x00 BE: 150994944 LE: 9
u64: 0x90101026c dbl: 1.91063e-313
27141: 8 0x80b4698: 0x06 0x00 0x00 0x00 BE: 100663296 LE: 6
27141: 12 0x80b469c: '7' 0x00 0x00 0x00 BE: 922746880 LE: 55
u64: 0x3700000006 dbl: 1.1671e-312
27141: 16 0x80b46a0: 0x06 0x01 's' 0x00 BE: 100758272 LE: 7536902
27141: 20 0x80b46a4: 0x04 0x00 0x00 0x00 BE: 67108864 LE: 4 u64:
0x400730106 dbl: 8.49171e-314
27141: 24 0x80b46a8: ':' '1' '.' '1' BE: 976301617 LE: 825110842
27141: 28 0x80b46ac: 0x00 0x00 0x00 0x00 BE: 0 LE: 0 u64:
0x312e313a dbl: 4.07659e-315
27141: 32 0x80b46b0: 0x05 0x01 'u' 0x00 BE: 83981568 LE: 7667973
27141: 36 0x80b46b4: 0x00 0x00 0x00 0x00 BE: 0 LE: 0 u64:
0x750105 dbl: 3.78848e-317
27141: 40 0x80b46b8: 0x08 0x01 'g' 0x00 BE: 134309632 LE: 6750472
27141: 44 0x80b46bc: 0x01 's' 0x00 0x00 BE: 24313856 LE: 29441
u64: 0x730100670108 dbl: 6.24737e-310
27141: 48 0x80b46c0: 0x07 0x01 's' 0x00 BE: 117535488 LE: 7536903
27141: 52 0x80b46c4: 0x0e 0x00 0x00 0x00 BE: 234881024 LE: 14
u64: 0xe00730107 dbl: 2.97117e-313
27141: 56 0x80b46c8: 'o' 'r' 'g' '.' BE: 1869768494 LE: 778531439
27141: 60 0x80b46cc: 'e' 'm' 'p' 't' BE: 1701671028 LE:
1953525093 u64: 0x74706d652e67726f dbl: 7.52737e+252
27141: 64 0x80b46d0: 'y' 's' 'p' 'a' BE: 2037608545 LE: 1634759545
27141: 68 0x80b46d4: 'c' 'e' 0x00 0x00 BE: 1667563520 LE:
25955 u64: 0x656361707379 dbl: 5.50772e-310
27141: 72 0x80b46d8: 0x04 0x00 0x00 0x00 BE: 67108864 LE: 4
27141: 76 0x80b46dc: 'S' 'U' 'X' '!' BE: 1398102049 LE:
559437139 u64: 0x2158555300000004 dbl: 4.75755e-148
27141: 80 0x80b46e0: 0x00
27141: Corrupted message stream, disconnecting
so, how do I decipher this output to find the real problem ?
thanks in advance,
Paul
On 8/8/05, Havoc Pennington <hp at redhat.com> wrote:
> On Mon, 2005-08-08 at 16:24 +0200, P. Durante wrote:
> >
> > here you see, I get the message, craft a reply ( using nothing more
> > than dbus_message_new_return_message(original_message); ) and send it
> > back over the same connection I read it from, and after
> > dbus_connection_send, BANG! I'm out..
> > I can't recompile dbus with more verbosity since, if I do, neither
> > HAL, nor the dbus-utils won't work anymore (don't know why, seems the
> > ubuntu version was built with some arcane settings I can't figure
> > out), so my question is, what are the possible reasons for getting
> > disconnected ?
> >
>
> Normally disconnection is done when the bus decides you are looking
> "malicious" by sending things that are not well-formed.
>
> We try to instead have libdbus print a warning when you do this, so it's
> easier to debug, but the warning-printing code isn't as rigorous as the
> bus's validation code.
>
> Typical ways to send a not-well-formed message are to break the naming
> rules for methods/interfaces/paths/etc. or to omit a required message
> field. Another possibility is a bug in libdbus.
>
> You get kicked off rather than an error for security paranoia reasons.
>
> If you figure out what the problem is we can add a warning on the client
> side to help future programmers.
>
> Havoc
>
>
>
More information about the dbus
mailing list