tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric van der Maarel <>
Subject Re: question on AprEndpoint.Poller used on XP
Date Fri, 06 May 2011 22:28:00 GMT
On Fri, May 6, 2011 at 4:18 PM, Mladen Turk <> wrote:

> On 05/06/2011 04:02 PM, Eric van der Maarel wrote:
>> 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
> I followed the discussion and the ideal solution would be to make sure
> that the correct flags are returned.
>> 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?
> I suppose the problem is that inside Tomcat we don't check the data
> processed. Here the solution would be that if the socket comes out
> from the Poller with POLLIN and the subsequent read returns 0 we
> should close that socket instead putting it back to Poller.
> I presume this is what's going on, right?

Yes, I guess that is where I was going; suggested also by Jeff Trawick of
APR. Isn't it what should be going on in  processSocket(desc[n*2+1],
SocketStatus.OPEN) already (e.g., because the event handler returns with a
Handler.SocketState.CLOSED or another more appropriate state to be


> Regards
> --
> ^TM
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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