On 22.09.2013 15:39, Rainer Jung wrote: > On 22.09.2013 13:17, Rainer Jung wrote: >> I debugged around my occasional failures for TestCoyoteAdapter when >> using APR. >> >> Error is: >> >> SEVERE [http-apr-127.0.0.1-auto-13-Poller] >> org.apache.tomcat.util.net.AprEndpoint$Poller.run Poller failed with >> error [81] : [File descriptor in bad state] > > ... > > The following patch seems to fix it for me, at least 150 test runs for > TestCoyoteAdapter were successful: > > Index: ../native/branches/1.1.x/native/src/poll.c > =================================================================== > --- ../native/branches/1.1.x/native/src/poll.c (revision 1525348) > +++ ../native/branches/1.1.x/native/src/poll.c (working copy) > @@ -259,7 +259,7 @@ > > if (s->pe == NULL) { > /* Already removed */ > - return APR_SUCCESS; > + return APR_NOTFOUND; > } > fd.desc_type = APR_POLL_SOCKET; > fd.desc.s = s->sock; > > > I'll let the full test suite for APR run a couple of times as a more > thorough check. I hope the change doesn't break the correctnes of the > connection counting which is only done after succesful return of remove.
I see only failures in TestCoyoteOutputStream when running the full test suite for APR, all other tests look OK. When running TestCoyoteOutputStream alone in a loop it also occasionally (2/10) fails for bio and nio, for apr somewhat more often (4/10), so the failure seems unrelated to the poll.c change. Actually there's two types of failures for TestCoyoteOutputStream, mostly a 300 seconds read timeout in testNonBlockingWriteNoneBlockingWriteOnce and once for nio "java.io.IOException: Bogus chunk size" in testNonBlockingWriteOnceBlockingWriteOnce Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org