You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Er...@wellsfargo.com on 2003/07/09 18:23:10 UTC
sockets lingering in unit tests on some platforms
I've noticed, when running the all-tests target on OS X with java 1.4.1,
that the sockets acquired (and supposedly released) for the purposes of
running the test.wsdl.multithread test case remains bound for a period of
time after the test is complete. This causes the test suite to fail if you
run it again.
I spent some time hacking around with this last night and confess to being
stumped. Here's what I've learned:
* It's definitely repeatable on OS X, but not always;
* It's seriously annoying;
* The problem occurs when the *client* tries to connect to the port in
question. I added some debugging hooks and found that in some cases the
server code (SimpleAxisServer) was unable to bind to the socket.
* FWIW, I wrote some perl code to bind to the same socket and can reproduce
the problem there too -- the java process for the server is dead and gone,
but the socket's not released for a while after.
* I tried putting finalizers and try {} finally { /* really close everything
*/ } hooks in place, but no dice.
* You can't connect to the socket in question, but you also can't bind() it,
at least not always.
A log of the failed test is attached. I'd appreciate knowing if anyone has
the same issue and would be grateful if someone with access to an OS X
machine could attempt to reproduce the problem. You don't have to run all
of the tests -- just build axis from source and then execute "ant run" from
test/wsdl/multithread a few times in rapid succession - i.e ant run && ant
run && ant run or some such.
Thanks,
Eric
<<run.log.txt>>