tomcat-dev mailing list archives

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

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
http://mail-archives.apache.org/mod_mbox/apr-dev/201105.mbox/browser).

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 AprEndpoint.Poller.run():

  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?

Eric

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