You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2006/03/08 22:04:04 UTC
DO NOT REPLY [Bug 38899] New: - Problem with TagHandlerPool.reuse(Tag) method
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38899>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38899
Summary: Problem with TagHandlerPool.reuse(Tag) method
Product: Tomcat 5
Version: 5.5.15
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P4
Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: fassev@gmx.de
Currently the method org.apache.jasper.runtime.TagHandlerPool.reuse(Tag
handler) - subproject jasper - has the following implementation:
public void reuse(Tag handler) {
synchronized( this ) {
if (current < (handlers.length - 1)) {
handlers[++current] = handler;
return;
}
}
// There is no need for other threads to wait for us to release
handler.release();
}
Where the handler.release() method of the returned TAG is called after the tag
is returned to the pool and outside of the synchronization block. This is
obviously wrong, because another thread can obtain the same tag from the pool
and start use it, where at the same time the TagHandlerPool will release the
tag (i.e. the tag will free its internal properties)! On a highly frequented
site, this is very likely to happen simutaniously and the state of the tag will
be inconsistent.
The solution is very simple: Call the handler.release() Method before the tag
is returned to the pool, or synchronize it.
Regards
Peter
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38899] - Problem with TagHandlerPool.reuse(Tag) method
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38899>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38899
fassev@gmx.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |enhancement
Status|NEW |RESOLVED
Resolution| |INVALID
------- Additional Comments From fassev@gmx.de 2006-03-08 21:12 -------
Sorry, I am blind and I jumped the gut too fast! The tag is released, ony when
it is not added to the pool. So this bug is invalid.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38899] - Problem with TagHandlerPool.reuse(Tag) method
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38899>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38899
fassev@gmx.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Priority|P4 |P3
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org