tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36541] - session getAttribute/setAttribute and removeAttribute are NOT Thread safe.
Date Fri, 09 Sep 2005 12:49:32 GMT
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=36541>.
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=36541





------- Additional Comments From struts_user@anotheria.net  2005-09-09 14:49 -------
(In reply to comment #65)
> Leon,
> 
> Can you publish your TC+HashMap finding you based your comment #55 ?

It's a simple program, which actually shows the bug (on synchronized put/remove
and unsychronized get). I am to stupid to program the writers to stop as soon as
the loop occurs, so they fix the problem some time after it occurs (thats why a
long loop instead of infinite loop). 

After each execution the reader measures how long the execution lasted. If the
execution lasted longer then 5 seconds it cries. The mid time of the execution
is 0.05 milliseconds. So we can safely assume, that executions which last 5
seconds or more aren't normal. In fact I had it all night running with 714 "too
long executions", longest of them being 70 seconds. If I add synchronized(map)
in the getAttribute method of the Storage class it doesn't occure anymore.






-- 
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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message