You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2015/02/19 14:52:02 UTC

async and complete on 7.0.59

Hi guys,

just saw there are few issues with async servlets on 7.0.59.

Issue pops up with such a code (not real world one but same kind of
sync issue can happen in real life):


{
  AsyncContext ac = request.startAsync();
  ac.complete();
// checking here the returned value of request.isAsyncStarted() shows
the bug explicitely if you want to write a unit test
}

since org.apache.coyote.Processor#asyncPostProcess is not called in
between the 2 calls when arriving in
org.apache.coyote.AsyncStateMachine#asyncComplete state is STARTING
and not STARTED so state doesnt move to COMPLETING but MUST_COMPLETE
and method returns false instead of true so complete doesn't do what
is expected.

Was working in previous versions (7.0.57 IIRC)

Is the bug identified? Will it be fixed?


Thanks!


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau

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


Re: async and complete on 7.0.59

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Just to terminate this thread and with the help of Rémy (thanks again)
we identified my test was no more valid after an update of the spec.

Sorry for the noise


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-02-19 17:03 GMT+01:00 Rémy Maucherat <re...@apache.org>:
> 2015-02-19 16:17 GMT+01:00 Rémy Maucherat <re...@apache.org>:
>
>> 2015-02-19 16:10 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>>
>>> @Rémy: is there a typo on the version? 7.0.57 was all green, I used
>>> 7.0.59 to get the failing tests
>>>
>>> I will work on verifying there is no regression with Tomcat 8 and the
>> async context tests.
>>
>> Tomcat 8 seems fine to me against Servlet 3.1. I will not test Tomcat 7
> and Servlet 3.0 though. If you think something is not fine, please send me
> privately the name of the tests which would have an issue.
>
> Rémy

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


Re: async and complete on 7.0.59

Posted by Rémy Maucherat <re...@apache.org>.
2015-02-19 16:17 GMT+01:00 Rémy Maucherat <re...@apache.org>:

> 2015-02-19 16:10 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> @Rémy: is there a typo on the version? 7.0.57 was all green, I used
>> 7.0.59 to get the failing tests
>>
>> I will work on verifying there is no regression with Tomcat 8 and the
> async context tests.
>
> Tomcat 8 seems fine to me against Servlet 3.1. I will not test Tomcat 7
and Servlet 3.0 though. If you think something is not fine, please send me
privately the name of the tests which would have an issue.

Rémy

Re: async and complete on 7.0.59

Posted by Rémy Maucherat <re...@apache.org>.
2015-02-19 16:10 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:

> @Rémy: is there a typo on the version? 7.0.57 was all green, I used
> 7.0.59 to get the failing tests
>
> I will work on verifying there is no regression with Tomcat 8 and the
async context tests.

Rémy

Re: async and complete on 7.0.59

Posted by Romain Manni-Bucau <rm...@gmail.com>.
@Rémy: is there a typo on the version? 7.0.57 was all green, I used
7.0.59 to get the failing tests


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-02-19 16:06 GMT+01:00 Rémy Maucherat <re...@apache.org>:
> 2015-02-19 15:44 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> And current one doesnt pass TCKs cause of it too
>>
>
> The relevant fixes are in 7.0.57, so did you really test everything right ?
> The problem is that all your statements in your email are wrong (the async
> context is started until onComplete, etc), all of which were fixed at that
> time.
>
> Rémy

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


Re: async and complete on 7.0.59

Posted by Rémy Maucherat <re...@apache.org>.
2015-02-19 15:44 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:

> And current one doesnt pass TCKs cause of it too
>

The relevant fixes are in 7.0.57, so did you really test everything right ?
The problem is that all your statements in your email are wrong (the async
context is started until onComplete, etc), all of which were fixed at that
time.

Rémy

Re: async and complete on 7.0.59

Posted by Romain Manni-Bucau <rm...@gmail.com>.
And current one doesnt pass TCKs cause of it too


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-02-19 15:15 GMT+01:00 Rémy Maucherat <re...@apache.org>:
> 2015-02-19 14:52 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> Was working in previous versions (7.0.57 IIRC)
>>
>
> The previous behavior was incorrect and did not pass the compliance tests.
>
> Rémy

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


Re: async and complete on 7.0.59

Posted by Rémy Maucherat <re...@apache.org>.
2015-02-19 14:52 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:

> Was working in previous versions (7.0.57 IIRC)
>

The previous behavior was incorrect and did not pass the compliance tests.

Rémy