https://bz.apache.org/bugzilla/show_bug.cgi?id=58522

            Bug ID: 58522
           Summary: concurrency problem corrupts WARDirContext.Entry
                    children
           Product: Tomcat 7
           Version: 7.0.52
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: ryan.f...@workday.com

We discovered a problem where calling ServletContext.getResourcePaths from a
jsp may corrupt WARDirContext.Entry.children. The WARDirContext.list(Entry)
method performs an Arrays.sort(children) call which is not thread-safe. Calling
this from multiple request threads may result in the children array losing some
entries and duplicating others.

When entries representing directories in the war are lost, Tomcat cannot load
resources from there. Static resource requests result in http error code 404
and jsp compliation can throw JasperException when included files are not
found.

We have seen this on CentOS 6.5 (and newer versions) with Tomcat 7.0.52 and
Java 1.7.0_51.

The following are attached in the zip:
* Test case project which demonstrates this corruption. It usually requires
multiple runs.
* A stack trace illustrating the problematic flow.
* A patch file for WARDirContext.java.

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