You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Marc Guillemot <mg...@yahoo.fr> on 2010/07/01 09:28:43 UTC

Re: Proposal: Some todo's at AsyncContext detected...

Hi Mark,

nice to see some activity on this thread.

> If you were following the dev list you would have seen that 
> Jean-Frederic has already vetoed the change Peter made on the basis that 
> it breaks the TCK. That suggests that Peter's analysis of the current 
> situation is not 100% correct.

I do follow it and therefore I'm interested to read more about the 
problems. Jean-Frederic wasn't really generous with comments :-( and 
Peter's email addresses many points.

For me there is a point that is particularly interesting in Peter's email:
 > It seams that we better start a open test suite implementation at the
 > new Servlet 3.0 API.

Tomcat's test suite is quite minimal even if I recognize that promising 
progress has been made in the last months (starting from a desolate 
situation). TCK is opaque and not complete. What about an open source 
Servlet 3.0 compatibility test suite. Other projects would surely be 
interested too.

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com


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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by Mark Thomas <ma...@apache.org>.
On 01/07/2010 09:28, Marc Guillemot wrote:
> For me there is a point that is particularly interesting in Peter's email:
>  > It seams that we better start a open test suite implementation at the
>  > new Servlet 3.0 API.
>
> Tomcat's test suite is quite minimal even if I recognize that promising
> progress has been made in the last months (starting from a desolate
> situation). TCK is opaque and not complete. What about an open source
> Servlet 3.0 compatibility test suite. Other projects would surely be
> interested too.

Not an itch I feel the need to scratch. I'm more interested in extending 
Tomcat's unit tests. Of course, that doesn't stop anyone else working on 
such a test suite if they feel so inclined.

Mark

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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by Rainer Jung <ra...@kippdata.de>.
On 04.07.2010 22:11, Peter Roßbach wrote:
> Hmm,
>
> Spec says:
>
> public boolean isAsyncStarted() - Returns true if async processing
> has started on this request, and false otherwise. If this request has been
> dispatched using one of the AsyncContext.dispatch methods since it was
> put in asynchronous mode, or a call to AsynContext.complete is made, this
> method returns false.
>
> ===
> But the example with Bug 49528 don't call directly dispatch, it calls
> AsyncContext.start().
> At Tomcat we start doesn't start a Container Thread. We internally call
> a doInternalDispatch at StandardWrapperValve
> with the callee thread.
> ...
> } else {
> if (request.isAsyncDispatching()) {
> //TODO SERVLET3 - async
> ((AsyncContextImpl)request.getAsyncContext()).doInternalDispatch();
> ...
>
> I revert the fix, and correct the testcase.

I wasn't commenting a specific BZ issue or your test case. I was 
commenting the TCK failure JFC noticed. It simply checks the cited 
requirement on isAsyncStarted() and fails after your change that starts 
the AsyncTimeout thread. Without your change it works.

Regards,

Rainer

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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by Peter Roßbach <pr...@objektpark.de>.
Hmm,

Spec says:

public boolean isAsyncStarted() - Returns true if async processing
has started on this request, and false otherwise. If this request has  
been
dispatched using one of the AsyncContext.dispatch methods since it was
put in asynchronous mode, or a call to AsynContext.complete is made,  
this
method returns false.

===
But the example with Bug 49528 don't call directly dispatch, it calls  
AsyncContext.start().
At Tomcat we start doesn't start a Container Thread. We internally  
call a doInternalDispatch at StandardWrapperValve
with the callee thread.
...
                } else {
                     if (request.isAsyncDispatching()) {
                         //TODO SERVLET3 - async
                          
((AsyncContextImpl)request.getAsyncContext()).doInternalDispatch();
...

I revert the fix, and correct the testcase.

Peter

Am 04.07.2010 um 21:23 schrieb Rainer Jung:

> On 01.07.2010 18:42, Rainer Jung wrote:
>> On 01.07.2010 17:20, Marc Guillemot wrote:
>>> jean-frederic clere wrote:
>>>> ...
>>>> I run a daily test and just looked to what breaks it and complain.
>>>>
>>>> Now I am looking to Peter's application to find what is broken.
>>>
>>> so you're the continuous integration server ;-)
>>>
>>> Can you publish break information or is it forbidden by the TCK
>>> license/agreement?
>>
>> Exact details are forbidden, but I'm sure there'll be some  
>> information
>
> The symptom is: it breaks
>
> "If this request has been dispatched using one of the  
> AsyncContext.dispatch methods since it was put in asynchronous mode,  
> this method returns false."
>
> which is part of the spec description of "public boolean  
> isAsyncStarted()".
>
> Regards,
>
> Rainer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>


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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by Rainer Jung <ra...@kippdata.de>.
On 01.07.2010 18:42, Rainer Jung wrote:
> On 01.07.2010 17:20, Marc Guillemot wrote:
>> jean-frederic clere wrote:
>>> ...
>>> I run a daily test and just looked to what breaks it and complain.
>>>
>>> Now I am looking to Peter's application to find what is broken.
>>
>> so you're the continuous integration server ;-)
>>
>> Can you publish break information or is it forbidden by the TCK
>> license/agreement?
>
> Exact details are forbidden, but I'm sure there'll be some information

The symptom is: it breaks

"If this request has been dispatched using one of the 
AsyncContext.dispatch methods since it was put in asynchronous mode, 
this method returns false."

which is part of the spec description of "public boolean isAsyncStarted()".

Regards,

Rainer


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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by Peter Roßbach <pr...@objektpark.de>.
I am very sure the NIO and APR Connector affected, but I don't have  
find a fix.

Peter

Am 02.07.2010 um 19:48 schrieb Mark Thomas:

> On 02/07/2010 15:15, jean-frederic clere wrote:
>> On 07/02/2010 03:08 PM, Marc Guillemot wrote:
>>> Rainer Jung wrote:
>>>> ...
>>>> Exact details are forbidden, but I'm sure there'll be some  
>>>> information
>>>> as soon as someone had time to dig into it.
>>>
>>> this was exactly what I feared. This is an additional argument for  
>>> an
>>> open source test suite.
>>
>> I think that patch is wrong... According to my tests the thread is
>> created but the timeout doesn't happen... I need more time to come  
>> with
>> another patch.
>
> Some random comments having glanced very briefly at this.
>
> I'm tempted to revert the whole of r958362 but since it might only  
> need a tweak to work correctly I'll leave it for now. Note that if  
> we get to the next 7.0.x release and it still breaks the TCK it will  
> have to be reverted.
>
> Why only the BIO connector? Are NIO and APR/native not affected?
>
> The threads are not daemon threads so Tomcat no longer shuts down  
> correctly - I'll fix this in a sec.
>
> Mark
>
>>
>> Cheers
>>
>> Jean-Frederic
>>
>>>
>>> Cheers,
>>> Marc.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>


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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by Mark Thomas <ma...@apache.org>.
On 02/07/2010 15:15, jean-frederic clere wrote:
> On 07/02/2010 03:08 PM, Marc Guillemot wrote:
>> Rainer Jung wrote:
>>> ...
>>> Exact details are forbidden, but I'm sure there'll be some information
>>> as soon as someone had time to dig into it.
>>
>> this was exactly what I feared. This is an additional argument for an
>> open source test suite.
>
> I think that patch is wrong... According to my tests the thread is
> created but the timeout doesn't happen... I need more time to come with
> another patch.

Some random comments having glanced very briefly at this.

I'm tempted to revert the whole of r958362 but since it might only need 
a tweak to work correctly I'll leave it for now. Note that if we get to 
the next 7.0.x release and it still breaks the TCK it will have to be 
reverted.

Why only the BIO connector? Are NIO and APR/native not affected?

The threads are not daemon threads so Tomcat no longer shuts down 
correctly - I'll fix this in a sec.

Mark

>
> Cheers
>
> Jean-Frederic
>
>>
>> Cheers,
>> Marc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>




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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by Peter Roßbach <pr...@objektpark.de>.
Hi Jean Frederic,

I also detect this strange behaviour. Then I fix it at JioEndpoint.
I check the async timeout feature today and it also works at  
NioEndpoint.

Can I check the APR Connector with a normal TomcatTestCase?

Peter




Am 02.07.2010 um 16:49 schrieb jean-frederic clere:

> On 07/02/2010 04:11 PM, Peter Roßbach wrote:
>> Hi Jean-Frederic,
>>
>> had you check my test case TestAsyncListener?
>>
>> Can you checkin or send me your test case.
>
> Normally the setTimeout will call the connector
> (ACTION_ASYNC_SETTIMEOUT). Which I think it does but the timeout  
> doesn't
> occur, at least with the code I am testing.
> ...

> Cheers
>
> Jean-Frederic
>
>>
>> Peter
>>
>> Am 02.07.2010 um 15:15 schrieb jean-frederic clere:
>>
>>> On 07/02/2010 03:08 PM, Marc Guillemot wrote:
>>>> Rainer Jung wrote:
>>>>> ...
>>>>> Exact details are forbidden, but I'm sure there'll be some  
>>>>> information
>>>>> as soon as someone had time to dig into it.
>>>>
>>>> this was exactly what I feared. This is an additional argument  
>>>> for an
>>>> open source test suite.
>>>
>>> I think that patch is wrong... According to my tests the thread is
>>> created but the timeout doesn't happen... I need more time to come  
>>> with
>>> another patch.
>>>
>>> Cheers
>>>
>>> Jean-Frederic
>>>
>>>>
>>>> Cheers,
>>>> Marc.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>
> <TestAsyncServlet.java>


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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by Peter Roßbach <pr...@objektpark.de>.
Hi Jean-Frederic,

had you check my test case TestAsyncListener?

Can you checkin or send me your test case.

Peter

Am 02.07.2010 um 15:15 schrieb jean-frederic clere:

> On 07/02/2010 03:08 PM, Marc Guillemot wrote:
>> Rainer Jung wrote:
>>> ...
>>> Exact details are forbidden, but I'm sure there'll be some  
>>> information
>>> as soon as someone had time to dig into it.
>>
>> this was exactly what I feared. This is an additional argument for an
>> open source test suite.
>
> I think that patch is wrong... According to my tests the thread is
> created but the timeout doesn't happen... I need more time to come  
> with
> another patch.
>
> Cheers
>
> Jean-Frederic
>
>>
>> Cheers,
>> Marc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>


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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by jean-frederic clere <jf...@gmail.com>.
On 07/02/2010 03:08 PM, Marc Guillemot wrote:
> Rainer Jung wrote:
>> ...
>> Exact details are forbidden, but I'm sure there'll be some information
>> as soon as someone had time to dig into it.
> 
> this was exactly what I feared. This is an additional argument for an
> open source test suite.

I think that patch is wrong... According to my tests the thread is
created but the timeout doesn't happen... I need more time to come with
another patch.

Cheers

Jean-Frederic

> 
> Cheers,
> Marc.


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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by Marc Guillemot <mg...@yahoo.fr>.
Rainer Jung wrote:
> ...
> Exact details are forbidden, but I'm sure there'll be some information 
> as soon as someone had time to dig into it.

this was exactly what I feared. This is an additional argument for an 
open source test suite.

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com


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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by Rainer Jung <ra...@kippdata.de>.
On 01.07.2010 17:20, Marc Guillemot wrote:
> jean-frederic clere wrote:
>> ...
>> I run a daily test and just looked to what breaks it and complain.
>>
>> Now I am looking to Peter's application to find what is broken.
>
> so you're the continuous integration server ;-)
>
> Can you publish break information or is it forbidden by the TCK
> license/agreement?

Exact details are forbidden, but I'm sure there'll be some information 
as soon as someone had time to dig into it.

Regards,

Rainer

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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by Marc Guillemot <mg...@yahoo.fr>.
jean-frederic clere wrote:
> ...
> I run a daily test and just looked to what breaks it and complain.
> 
> Now I am looking to Peter's application to find what is broken.

so you're the continuous integration server ;-)

Can you publish break information or is it forbidden by the TCK 
license/agreement?

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com


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


Re: Proposal: Some todo's at AsyncContext detected...

Posted by jean-frederic clere <jf...@gmail.com>.
On 07/01/2010 09:28 AM, Marc Guillemot wrote:
> Hi Mark,
> 
> nice to see some activity on this thread.
> 
>> If you were following the dev list you would have seen that
>> Jean-Frederic has already vetoed the change Peter made on the basis
>> that it breaks the TCK. That suggests that Peter's analysis of the
>> current situation is not 100% correct.
> 
> I do follow it and therefore I'm interested to read more about the
> problems. Jean-Frederic wasn't really generous with comments :-( and
> Peter's email addresses many points.

I run a daily test and just looked to what breaks it and complain.

Now I am looking to Peter's application to find what is broken.

Cheers

Jean-Frederic

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