[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-02-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution|--- |INVALID

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-02-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

--- Comment #12 from william.crow...@roguewave.com ---
Please close this issue.  We cannot provide a valid test case.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-01-28 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

--- Comment #11 from william.crow...@roguewave.com ---
Bear with us for a moment as we are trying to get a viable test case together.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-01-27 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

--- Comment #10 from william.crow...@roguewave.com ---
Thanks for your reply.  I will post an update to this issue tomorrow.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-01-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

--- Comment #9 from Christopher Schultz  ---
(In reply to william.crowell from comment #8)
> > Are you also able to reliably reproduce the error without RECYCLE_FACADES 
> > enabled?
> 
> Yes, it happens on each test run.

Great.

> > Tomcat (usually) properly protects these objects from shared-use, but 
> > applications have minds of their own.
> 
> Are issues like this usually application related?

Almost always.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-01-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

--- Comment #8 from william.crow...@roguewave.com ---
> Are you also able to reliably reproduce the error without RECYCLE_FACADES 
> enabled?

Yes, it happens on each test run.

> Tomcat (usually) properly protects these objects from shared-use, but 
> applications have minds of their own.

Are issues like this usually application related?

> What kind of request-load are you expecting? 

Let me check on this.

> My guess is that correctness is more important than performance.

Yes, that is correct.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-01-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

--- Comment #7 from Christopher Schultz  ---
(In reply to william.crowell from comment #4)
> Setting org.apache.catalina.connector.RECYCLE_FACADES to true did work.

Excellent. Since it "works", are you also able to reliably reproduce the error
without RECYCLE_FACADES enabled?

> Do you know why that fixed the issue?

It prevented the sharing of response objects between requests. Tomcat (usually)
properly protects these objects from shared-use, but applications have minds of
their own.

> I am also concerned about the performance impact of setting that flag to true.

What kind of request-load are you expecting? The request objects are fairly
lightweight and, since they should be short-lived, shouldn't put too much
strain on the garbage collector (whose runtime is related to the number of live
objects, not dead ones).

My guess is that correctness is more important than performance.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-01-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

--- Comment #6 from william.crow...@roguewave.com ---
For a simple test case are you looking for application code?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-01-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

--- Comment #5 from Remy Maucherat  ---
I described the scenario in my comment, the application code is most likely not
aware that the async is done. To know where the problem comes from a simple
test case would be useful.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-01-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

--- Comment #4 from william.crow...@roguewave.com ---
Setting org.apache.catalina.connector.RECYCLE_FACADES to true did work.  Do you
know why that fixed the issue?  I am also concerned about the performance
impact of setting that flag to true.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-01-21 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

Remy Maucherat  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #3 from Remy Maucherat  ---
Please test with the system property
"org.apache.catalina.connector.RECYCLE_FACADES" set to "true".

The scenario in similar issues is:
- IO error occurs, gets more or less ignored or seen as not important (the
reason why is interesting and could be a bug depending on what happens)
- as a result, framework or Servlet thinks async is still going
- meanwhile the container recycles everything and reuses for another request
- the request facades still point to the same objects, so they see another
request from another user (the recycle facades setting prevents that)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-01-17 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

--- Comment #2 from Remy Maucherat  ---
You are presenting what could be an issue in a complex and confusing IMO. So
let's start over.

The changes to isClosed is likely not relevant and this will not be changed.
They ensure that the socket wrapper close occurs once and nothing more. This is
important. If the network layer becomes closed it still doesn't change this
need to close the wrapper or else you run into other problems (= all the bugs
you quote).

If you're encountering a recycling issue at the Servlet layer, the first step
to start working on it is going to be to set the system
propertyorg.apache.catalina.connector.RECYCLE_FACADES to true, or enable the
security manager.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)

2020-01-17 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082

--- Comment #1 from william.crow...@roguewave.com ---
For reference:

Tomcat 8.5.3 - 8.5.31 and 9.0.0 - 9.0.8:

...
@Override

public boolean isClosed()

{ return !getSocket().isOpen(); }
...

Tomcat 8.5.32 - 8.5.37 and 9.0.9 - 9.0.14

...
@Override

public boolean isClosed()

{ return closed || !getSocket().isOpen(); }
...

Tomcat 8.5.38 - 8.5.50 and 9.0.15 - 9.0.21:

...
@Override

public boolean isClosed()

{ return closed; }
...

This code has been rewritten from 9.0.22 and on.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org