https://issues.apache.org/bugzilla/show_bug.cgi?id=57521

--- Comment #7 from Konstantin Kolinko <knst.koli...@gmail.com> ---
(In reply to Mark Thomas from comment #1)
> You need to upgrade both Tomcat and your version of tc-native to the latest
> versions and re-test. There have been multiple fixes in this area since the
> versions you are using.

>From Tomcat side there have been the following fixes in the "Coyote"
(connector) category:

7.0.46:
55602: Ensure that sockets removed from the Poller and then closed in the
APR/native connector are removed and then closed in a thread-safe manner.

7.0.54:
56399: Assert that both Coyote and Catalina request objects have been properly
recycled.

Maybe there are other changes as well.

It would be better to test with an up-to-date version rather than with 7.0.40. 
(7.0.59 is currently being voted on and is likely to be released in a few
days).

But with comet the cause may actually be in your own web application. Are you
sure that you aren't trying to write to a response that have already been
completed and recycled?

> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
> J  org.apache.tomcat.jni.Socket.sendbb(JII)I
> J  org.apache.coyote.http11.InternalAprOutputBuffer.flushBuffer()V
> J 
> org.apache.coyote.http11.AbstractHttp11Processor.action(Lorg/apache/coyote/
> ActionCode;Ljava/lang/Object;)V
> J  org.apache.catalina.connector.OutputBuffer.doFlush(Z)V
> J  org.apache.catalina.connector.Response.flushBuffer()V
> J 
> jp.co.xxxxxxx.raise.app.fw.socketio.transport.XHRStreaming.flushResponse()Z
> J  scala.concurrent.impl.Future$PromiseCompletingRunnable.run()V
> J  akka.dispatch.TaskInvocation.run()V
> J 
> java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/
> ThreadPoolExecutor$Worker;)V
> j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5
> j  java.lang.Thread.run()V+11
> v  ~StubRoutines::call_stub

In the above stack trace - how does it happen that you are directly calling
org.apache.catalina.connector.Response method flushBuffer()?

A web application shall not access that connector Response class directly. A
application shall use CometEvent.getHttpServletResponse() which returns a
facade, not the internal object.


If you set the following system property, the facades are recycled when request
processing cycle finishes, protecting Tomcat internals. Using this property
will not help you if you are accessing the internals directly.

org.apache.catalina.connector.RECYCLE_FACADES=true

System properties reference:
http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html#Security

-- 
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

Reply via email to