dbus remaining windows port issues

Romain Pokrzywka romain at kdab.com
Fri Apr 30 10:16:03 PDT 2010


Hi Ralf,

Thanks a lot for those. I've had another look at the hanging issue and I've isolated it to be the call to select() in 
dbus-sysdeps-win.c :

  ready = select (max_fd + 1, &read_set, &write_set, &err_set,
                  timeout_milliseconds < 0 ? NULL : &tv);

Since there's no timeout the function hangs forever. However the no timeout isn't really the problem, as the socket 
should eventually have something but doesn't for some reason. And as you observed the hanging is random, and varies from 
one run of bus-test to another, but usually during the iteration tests, when connections are repeatedly created.

I'm wondering if that's a bug in Winsock or if we're exhausting a system resource, or something else. There's only one 
thread during the test so we can rule out race conditions at least. I'll try to google for similar issues with winsock 
and select() during the weekend, maybe somebody else hit that issue and hopefully has a workaround.

For the interested, here's a sample backtrace taken during one of the hangs :

 	bus-test.exe!_dbus_poll(DBusPollFD * fds=0x00f1fb74, int n_fds=4, int timeout_milliseconds=-1)  Line 1135 + 0x3c bytes	
C
 	bus-test.exe!_dbus_loop_iterate(DBusLoop * loop=0x000ea1d0, unsigned int block=1)  Line 708 + 0x17 bytes	C
 	bus-test.exe!bus_test_run_bus_loop(BusContext * context=0x000e4d50, unsigned int block_once=1)  Line 275 + 0x14 bytes	
C
 	bus-test.exe!block_connection_until_message_from_bus(BusContext * context=0x000e4d50, DBusConnection * 
connection=0x00f43070, const char * what_is_expected=0x004e8970)  Line 465 + 0xb bytes	C
 	bus-test.exe!check_add_match_all(BusContext * context=0x000e4d50, DBusConnection * connection=0x00f43070)  Line 1450 + 
0x12 bytes	C
 	bus-test.exe!check_hello_connection(BusContext * context=0x000e4d50)  Line 1564 + 0xd bytes	C
 	bus-test.exe!check_oom_check1_func(void * data=0x00f1febc)  Line 4035 + 0x10 bytes	C
 	bus-test.exe!run_failing_each_malloc(int n_mallocs=2, const char * description=0x004ed1bc, unsigned int (void *)* 
func=0x0041fdb0, void * data=0x00f1febc)  Line 958 + 0x9 bytes	C
 	bus-test.exe!_dbus_test_oom_handling(const char * description=0x004ed1bc, unsigned int (void *)* func=0x0041fdb0, void 
* data=0x00f1febc)  Line 1026 + 0x15 bytes	C
 	bus-test.exe!check1_try_iterations(BusContext * context=0x000e4d50, const char * description=0x004ed1bc, unsigned int 
(BusContext *)* func=0x0041c950)  Line 4058 + 0x12 bytes	C
 	bus-test.exe!bus_dispatch_sha1_test(const DBusString * test_data_dir=0x00f1ff14)  Line 4754 + 0x13 bytes	C
 	bus-test.exe!main(int argc=2, char * * argv=0x000e4cf8)  Line 128 + 0x9 bytes	C


Cheers
Romain

On Thursday 29 April 2010 16:23:08 Ralf Habacker wrote:
> with the appended patches I'm more able to run bus-test with msvc and
> mingw.
>
> Maybe they helps other to get more an idea what's the real cause(s) for
> the problems are.
>
> Regards
>  Ralf



-- 
Romain Pokrzywka | romain at kdab.com | Certified Qt Software Engineer & Trainer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100430/e2c91135/attachment.pgp>


More information about the dbus mailing list