tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: svn commit: r528524 - /tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
Date Fri, 13 Apr 2007 16:51:01 GMT
Remy Maucherat wrote:
> fhanik@apache.org wrote:
>> Author: fhanik
>> Date: Fri Apr 13 08:32:19 2007
>> New Revision: 528524
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=528524
>> Log:
>> This write has to be synchronized since comet can write to the buffer 
>> and cause a buffer overflow if more than one thread is writing
>
> That's reverting 467065. I still don't see how concurrent writing in 
> the servlet is going to work (nothing is synced, and everything is 
> buffered to some extent).

Lets say you have two threads writing to the response (async write from 
comet)
both of them could end up on the line:
socket.getBufHandler().getWriteBuffer().put(buf, offset, length);

assuming nothing is synced in the path down to here, hence causing a 
buffer overflow,
Does that makes sense or am I smoking crack?

Filip

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


Mime
View raw message