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

--- Comment #3 from Yu Lin <yu.lin...@gmail.com> ---
Hello,

(In reply to comment #2)
> Many thanks for the analysis and patch.
>=
You are welcome. 


> Regardless,
> these three are fixed in trunk and 7.0.x and will be included in 7.0.30
> onwards. I used the provided patch as a starting point although I did make
> some changes to make the code a little cleaner.
> 
Great.

> The fourth issue is definitely not valid since a Host will never permit
> multiple children with the same name. This change was not included in the
> fix.

I'm not an expert on the domain of Host. Is there some code that creates unique
keys "contextName" every single time when a thread executes "manageApp" method?
If not, there could be still an atomicity violation: suppose thread T1 finds
that map "deployed" doesn't contain key "contextName", so it moves to calculate
the value "deployedApp". Before T1 puts "deployedApp" into the map, another
thread T2 checks if "deployed" map doesn't contain key "contextName" and so it
moves to create the value "deployedApp" and put it into the map. Now thread T1
resumes execution and overwrites what T2 previously put.

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