Intermittent test failures: Address already in use: AH00072: make_sock: could not bind to address 127.0.0.1:47524
In some Debian builds of libsoup (the libsoup2.4
package), we see failing tests like this:
32/40 auth-test FAIL 0.12 s (exit status 1) --- command --- G_DEBUG='gc-friendly' MALLOC_PERTURB_='' MALLOC_CHECK_='2' G_TEST_BUILDDIR='/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/tests' G_TEST_SRCDIR='/<<PKGBUILDDIR>>/tests' LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/libsoup' /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/tests/auth-test --- stdout --- # random seed: R02S0158ad89deea8400205f6a75259b2448 # GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation gnutls (GTlsBackendGnutls) for ‘gio-tls-backend’ # GLib-DEBUG: posix_spawn avoided (workdir specified) (fd close requested) --- stderr --- (98)Address already in use: AH00072: make_sock: could not bind to address 127.0.0.1:47524 no listening sockets available, shutting down AH00015: Unable to open logs Could not start apache -------
It might be as simple as port 47524 already being in use (to test some other package, or even an unrelated build of libsoup2.4 in a different chroot on the same machine), or it might be a sign that an earlier test started a server on the hard-coded port and has not relinquished it.
Ideally the tests would all bind to 127.0.0.1:0 (unspecified port) and let the kernel allocate a port for us, like the xmlrpc-server tests do; but I don't know whether Apache can be configured to do that, or, if it can, how it would communicate to us which port had been chosen.