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 2021/01/29 08:06:14 UTC

8.5.x unit tests crashing

Heads up. When I ran my pre-tag tests for 8.5.x I started to see a bunch
of JVM crashes on Windows with both Java 7 and Java 8. The crashes were
always in a compilation thread which was unusual.

I am currently doing the binary search to figure out which commit
triggered the issue.

Mark

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


Re: 8.5.x unit tests crashing

Posted by Rémy Maucherat <re...@apache.org>.
On Fri, Jan 29, 2021 at 9:12 AM Mark Thomas <ma...@apache.org> wrote:

> On 29/01/2021 08:06, Mark Thomas wrote:
> > Heads up. When I ran my pre-tag tests for 8.5.x I started to see a bunch
> > of JVM crashes on Windows with both Java 7 and Java 8. The crashes were
> > always in a compilation thread which was unusual.
> >
> > I am currently doing the binary search to figure out which commit
> > triggered the issue.
>
> That was quicker than I expected. Running the HTTP/2 tests on their own
> is enough to trigger the issue.
>
> It was the fix for bug 65111 - freeing the direct buffers - that
> triggered this.
>

I think it's a good idea to take this out then, a little possible leak is
better than a crash ... I haven't seen any crash on CI or on my test run
with 10, so I did backport.

Rémy

Re: 8.5.x unit tests crashing

Posted by Mark Thomas <ma...@apache.org>.
On 29/01/2021 09:34, Mark Thomas wrote:
> On 29/01/2021 09:21, Rémy Maucherat wrote:
>> On Fri, Jan 29, 2021 at 10:08 AM Mark Thomas <ma...@apache.org> wrote:

<snip/>

>>> I was thinking about moving the cleaning of the direct buffers to
>>> destroySocket()
>>>
>>> I'll do some tests.
>>>
>>
>> Yes, ideally, waiting until after the socket is removed from the poller is
>> a good plan.
> 
> Initial testing looks good. I'm running the full test suite to make sure
> before committing the fix.

Not such a good plan after all. I still see crashes. They are less
frequent (~1 per run rather than ~4 per run) but still present.

Mark

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


Re: 8.5.x unit tests crashing

Posted by Mark Thomas <ma...@apache.org>.
On 29/01/2021 09:21, Rémy Maucherat wrote:
> On Fri, Jan 29, 2021 at 10:08 AM Mark Thomas <ma...@apache.org> wrote:
> 
>> On 29/01/2021 09:01, Rémy Maucherat wrote:
>>> On Fri, Jan 29, 2021 at 9:12 AM Mark Thomas <ma...@apache.org> wrote:
>>>
>>>> On 29/01/2021 08:06, Mark Thomas wrote:
>>>>> Heads up. When I ran my pre-tag tests for 8.5.x I started to see a
>> bunch
>>>>> of JVM crashes on Windows with both Java 7 and Java 8. The crashes were
>>>>> always in a compilation thread which was unusual.
>>>>>
>>>>> I am currently doing the binary search to figure out which commit
>>>>> triggered the issue.
>>>>
>>>> That was quicker than I expected. Running the HTTP/2 tests on their own
>>>> is enough to trigger the issue.
>>>>
>>>> It was the fix for bug 65111 - freeing the direct buffers - that
>>>> triggered this.
>>>>
>>>
>>> Almost certainly the swap with SocketBufferHandler.EMPTY saves 9 and 10
>>> from crashing. It's not certain this is 100% safe actually, but possibly
>>> good enough. I did reproduce a (rare) crash with 8.5, so no good option
>>> other than take it out for now.
>>
>> I was thinking about moving the cleaning of the direct buffers to
>> destroySocket()
>>
>> I'll do some tests.
>>
> 
> Yes, ideally, waiting until after the socket is removed from the poller is
> a good plan.

Initial testing looks good. I'm running the full test suite to make sure
before committing the fix.

Mark

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


Re: 8.5.x unit tests crashing

Posted by Rémy Maucherat <re...@apache.org>.
On Fri, Jan 29, 2021 at 10:08 AM Mark Thomas <ma...@apache.org> wrote:

> On 29/01/2021 09:01, Rémy Maucherat wrote:
> > On Fri, Jan 29, 2021 at 9:12 AM Mark Thomas <ma...@apache.org> wrote:
> >
> >> On 29/01/2021 08:06, Mark Thomas wrote:
> >>> Heads up. When I ran my pre-tag tests for 8.5.x I started to see a
> bunch
> >>> of JVM crashes on Windows with both Java 7 and Java 8. The crashes were
> >>> always in a compilation thread which was unusual.
> >>>
> >>> I am currently doing the binary search to figure out which commit
> >>> triggered the issue.
> >>
> >> That was quicker than I expected. Running the HTTP/2 tests on their own
> >> is enough to trigger the issue.
> >>
> >> It was the fix for bug 65111 - freeing the direct buffers - that
> >> triggered this.
> >>
> >
> > Almost certainly the swap with SocketBufferHandler.EMPTY saves 9 and 10
> > from crashing. It's not certain this is 100% safe actually, but possibly
> > good enough. I did reproduce a (rare) crash with 8.5, so no good option
> > other than take it out for now.
>
> I was thinking about moving the cleaning of the direct buffers to
> destroySocket()
>
> I'll do some tests.
>

Yes, ideally, waiting until after the socket is removed from the poller is
a good plan.

Rémy

Re: 8.5.x unit tests crashing

Posted by Mark Thomas <ma...@apache.org>.
On 29/01/2021 09:01, Rémy Maucherat wrote:
> On Fri, Jan 29, 2021 at 9:12 AM Mark Thomas <ma...@apache.org> wrote:
> 
>> On 29/01/2021 08:06, Mark Thomas wrote:
>>> Heads up. When I ran my pre-tag tests for 8.5.x I started to see a bunch
>>> of JVM crashes on Windows with both Java 7 and Java 8. The crashes were
>>> always in a compilation thread which was unusual.
>>>
>>> I am currently doing the binary search to figure out which commit
>>> triggered the issue.
>>
>> That was quicker than I expected. Running the HTTP/2 tests on their own
>> is enough to trigger the issue.
>>
>> It was the fix for bug 65111 - freeing the direct buffers - that
>> triggered this.
>>
> 
> Almost certainly the swap with SocketBufferHandler.EMPTY saves 9 and 10
> from crashing. It's not certain this is 100% safe actually, but possibly
> good enough. I did reproduce a (rare) crash with 8.5, so no good option
> other than take it out for now.

I was thinking about moving the cleaning of the direct buffers to
destroySocket()

I'll do some tests.

Mark

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


Re: 8.5.x unit tests crashing

Posted by Rémy Maucherat <re...@apache.org>.
On Fri, Jan 29, 2021 at 9:12 AM Mark Thomas <ma...@apache.org> wrote:

> On 29/01/2021 08:06, Mark Thomas wrote:
> > Heads up. When I ran my pre-tag tests for 8.5.x I started to see a bunch
> > of JVM crashes on Windows with both Java 7 and Java 8. The crashes were
> > always in a compilation thread which was unusual.
> >
> > I am currently doing the binary search to figure out which commit
> > triggered the issue.
>
> That was quicker than I expected. Running the HTTP/2 tests on their own
> is enough to trigger the issue.
>
> It was the fix for bug 65111 - freeing the direct buffers - that
> triggered this.
>

Almost certainly the swap with SocketBufferHandler.EMPTY saves 9 and 10
from crashing. It's not certain this is 100% safe actually, but possibly
good enough. I did reproduce a (rare) crash with 8.5, so no good option
other than take it out for now.

Rémy


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

Re: 8.5.x unit tests crashing

Posted by Mark Thomas <ma...@apache.org>.
On 29/01/2021 08:06, Mark Thomas wrote:
> Heads up. When I ran my pre-tag tests for 8.5.x I started to see a bunch
> of JVM crashes on Windows with both Java 7 and Java 8. The crashes were
> always in a compilation thread which was unusual.
> 
> I am currently doing the binary search to figure out which commit
> triggered the issue.

That was quicker than I expected. Running the HTTP/2 tests on their own
is enough to trigger the issue.

It was the fix for bug 65111 - freeing the direct buffers - that
triggered this.

Mark

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