You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mark Thomas <ma...@apache.org> on 2010/10/03 15:02:51 UTC

Need a new tc native release?

I've seen the shut down issues reported in [1] with the 1.1.20 native
connector on Windows, Linux and OSX. Has a bug crept in here or do the
changes to the shut down code mean we need to release 1.1.21?

Cheers,

Mark

[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=49923

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Need a new tc native release?

Posted by Mladen Turk <mt...@apache.org>.
On 10/04/2010 10:34 AM, Mark Thomas wrote:
> On 04/10/2010 08:27, Mladen Turk wrote:
>> On 10/03/2010 03:02 PM, Mark Thomas wrote:
>>> I've seen the shut down issues reported in [1] with the 1.1.20 native
>>> connector on Windows, Linux and OSX. Has a bug crept in here or do the
>>> changes to the shut down code mean we need to release 1.1.21?
>>>
>>
>> Nope.
>> The fix in Java side (I did with 992211 and on) ensures all
>> poller and acceptor threads  exits on shutdown before we
>> call native destroy. Without that JVM could core.
>> It worked when I did it, but didn't check with
>> the recent bunch of changes made for connectors, so might
>> be that broke something.
>>
>> The easiest debug would be to get the thread dump
>> in case the shutdown doesn't work, cause it's
>> obviously locked in some thread.join() and the thread
>> that suppose to exit on Connector.stop() didn't get
>> notified, or something.
>
> That's likely my bad then. I'll take a look. Thanks for the confirmation.
>

It fails in unlockAccept()
However it hard closes the socket in 60 seconds, so shutdown works, only
you have to wait 60 seconds.
Added log.warn for that case


Cheers
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Need a new tc native release?

Posted by Mark Thomas <ma...@apache.org>.
On 04/10/2010 10:27, Mladen Turk wrote:
> On 10/04/2010 10:34 AM, Mark Thomas wrote:
>>
>> That's likely my bad then. I'll take a look. Thanks for the confirmation.
>>
> 
> Fixed. It was getSocketProperties().getSoTimeout() returning -1
> causing exception
> Now it defaults to 2 seconds, which means that in the
> worse case it'll be called 30 times for each acceptor.

Thanks for that.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Need a new tc native release?

Posted by Mladen Turk <mt...@apache.org>.
On 10/04/2010 10:34 AM, Mark Thomas wrote:
>
> That's likely my bad then. I'll take a look. Thanks for the confirmation.
>

Fixed. It was getSocketProperties().getSoTimeout() returning -1
causing exception
Now it defaults to 2 seconds, which means that in the
worse case it'll be called 30 times for each acceptor.

Think I'll change the simple counter ( 0 .. 60)
in AprEndpoint to use the real time spend in unlockAcept
call instead.

Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Need a new tc native release?

Posted by Mladen Turk <mt...@apache.org>.
On 10/04/2010 10:34 AM, Mark Thomas wrote:
> On 04/10/2010 08:27, Mladen Turk wrote:
>> On 10/03/2010 03:02 PM, Mark Thomas wrote:
>>> I've seen the shut down issues reported in [1] with the 1.1.20 native
>>> connector on Windows, Linux and OSX. Has a bug crept in here or do the
>>> changes to the shut down code mean we need to release 1.1.21?
>>>
>>
>> Nope.
>> The fix in Java side (I did with 992211 and on) ensures all
>> poller and acceptor threads  exits on shutdown before we
>> call native destroy. Without that JVM could core.
>> It worked when I did it, but didn't check with
>> the recent bunch of changes made for connectors, so might
>> be that broke something.
>>
>> The easiest debug would be to get the thread dump
>> in case the shutdown doesn't work, cause it's
>> obviously locked in some thread.join() and the thread
>> that suppose to exit on Connector.stop() didn't get
>> notified, or something.
>
> That's likely my bad then. I'll take a look. Thanks for the confirmation.
>

INFO: Caught exception trying to unlock accept on port ajp-8009
java.lang.IllegalArgumentException: timeout can't be negative

I'm sure I fixed that earlier ;)

Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Need a new tc native release?

Posted by Mark Thomas <ma...@apache.org>.
On 04/10/2010 08:27, Mladen Turk wrote:
> On 10/03/2010 03:02 PM, Mark Thomas wrote:
>> I've seen the shut down issues reported in [1] with the 1.1.20 native
>> connector on Windows, Linux and OSX. Has a bug crept in here or do the
>> changes to the shut down code mean we need to release 1.1.21?
>>
> 
> Nope.
> The fix in Java side (I did with 992211 and on) ensures all
> poller and acceptor threads  exits on shutdown before we
> call native destroy. Without that JVM could core.
> It worked when I did it, but didn't check with
> the recent bunch of changes made for connectors, so might
> be that broke something.
> 
> The easiest debug would be to get the thread dump
> in case the shutdown doesn't work, cause it's
> obviously locked in some thread.join() and the thread
> that suppose to exit on Connector.stop() didn't get
> notified, or something.

That's likely my bad then. I'll take a look. Thanks for the confirmation.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Need a new tc native release?

Posted by Mladen Turk <mt...@apache.org>.
On 10/03/2010 03:02 PM, Mark Thomas wrote:
> I've seen the shut down issues reported in [1] with the 1.1.20 native
> connector on Windows, Linux and OSX. Has a bug crept in here or do the
> changes to the shut down code mean we need to release 1.1.21?
>

Nope.
The fix in Java side (I did with 992211 and on) ensures all
poller and acceptor threads  exits on shutdown before we
call native destroy. Without that JVM could core.
It worked when I did it, but didn't check with
the recent bunch of changes made for connectors, so might
be that broke something.

The easiest debug would be to get the thread dump
in case the shutdown doesn't work, cause it's
obviously locked in some thread.join() and the thread
that suppose to exit on Connector.stop() didn't get
notified, or something.


Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org