dbus-daemon on Windows: Failed to bind socket "localhost:59367": Address already in use

Thomas Sondergaard ts at medical-insight.com
Fri Jan 2 14:17:06 PST 2015


When I run the attached test programs I get a handful or so of cases 
where the dbus-daemon fails to start with a message like

Failed to bind socket "localhost:59367": Address already in use

This surprises me. First I thought it was some kind of race condition 
when starting multiple buses at the same time (dbus-test.cc), but it 
also fails a handful of times out of a thousand when only one process is 
started at a time (dbus-test-nothreads.cc).

This is using D-Bus Message Bus Daemon 1.8.10 on Windows.

Steps to reproduce:

1. Compile the small test program on Windows
2. Make sure dbus-daemon is in the path
3. Run the test program

The nothreads version takes about 4 minutes to run.

Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-test.cc
Type: text/x-c++src
Size: 1330 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20150102/b69c5a74/attachment.cc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-test-nothreads.cc
Type: text/x-c++src
Size: 804 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20150102/b69c5a74/attachment-0001.cc>


More information about the dbus mailing list