tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric van der Maarel <>
Subject question on AprEndpoint.Poller used on XP
Date Fri, 06 May 2011 14:02:46 GMT

We're in a discussion on the APR dev mailing list regarding a problem
with tcnative on XP. On XP the poller implemented in APR with select()
is being used. According to Jeff Trawick of APR, select can never give
an APR_POLLHUP return event (see

Should this situation be handled by the AprEndpoint.Poller thread when
the poll return value rv > 0 and obviously the first test in de next
snippet from

  if (((desc[n*2] & Poll.APR_POLLHUP) == Poll.APR_POLLHUP)
      || ((desc[n*2] & Poll.APR_POLLERR) == Poll.APR_POLLERR)
      || (comet && (!processSocket(desc[n*2+1], SocketStatus.OPEN)))
      || (!comet && (!processSocket(desc[n*2+1])))) {

fails? Is this the reason for the
   (!processSocket(desc[n*2+1], SocketStatus.OPEN))
test on the third line above?

In the case where we encounter 100% cpu usage when the client connection
has gone, processSocket() returns true (as almost always). Is this
intended or wopuld this be a place where a fix could be introduced
following the line of Jeff Trwick's message mentioned above?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message