Bug in _dbus_poll() without HAVE_POLL?

Havoc Pennington hp@redhat.com
Wed Jan 19 08:47:57 PST 2005


On Wed, 2005-01-19 at 10:23 +0000, Tor Lillqvist wrote:
> One reason for the hang might be a deadlock. A process talking with
> itself through a pipe (or socket pair) as bus-test does is always
> risky. In my Win32 port, uids are in fact strings (string
> representation of SID, like "S-1-5-21-1220945662-769437303-893522151-1000"). 
> I.e. clearly longer that the 32-bit-int uids used on Unix. If WinSock
> uses unusually small buffers by default or something, couldn't it be
> possible that the stuff bus-test tries to write to itself through the
> debug-pipe (socketpair) is just a bit too long, so that it hasn't been
> able to write everything before it tries to read it all, or
> something. Does this sound like a possible scenario?

Yeah, the dispatch.c test is pretty easy to break by creating deadlocks.
I thought I'd wedged it into working more reliably by just busy looping
until the desired data arrived...

But in any case essentially what you have to do is turn on
DBUS_VERBOSE=1 and dump the full trace to a file, then walk through
exactly what happens in the deadlock and fix it to have each "half" of
every exchange fully complete before handing over to the other half.

Havoc




More information about the dbus mailing list