Confluence locked up for a customer, and the thread dump showed all the threads either waiting for a database connection, or sitting like this:

      "http-80-Processor14" daemon prio=5 tid=0x068f78b0 nid=0x904 in Object.wait() [7bfe000..7bffdb8]
      at java.lang.Object.wait(Native Method)

      • waiting on <0x1fad0d60> (a java.awt.MediaTracker)
        at java.awt.MediaTracker.waitForID(MediaTracker.java:631)
      • locked <0x1fad0d60> (a java.awt.MediaTracker)
        at java.awt.MediaTracker.waitForID(MediaTracker.java:586)
        at com.atlassian.core.util.thumbnail.Thumber.getImage(Thumber.java:237)
        at com.atlassian.core.util.thumbnail.Thumber.createThumbnail(Thumber.java:168)
        at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:131)
        at com.atlassian.confluence.pages.thumbnail.AbstractThumbnailManager.getThumbnail(AbstractThumbnailManager.java:79)
        at com.atlassian.confluence.pages.thumbnail.DelegatorThumbnailManager.getThumbnail(DelegatorThumbnailManager.java:54)
        at com.atlassian.confluence.servlet.download.ThumbnailDownload.getAttachmentStream(ThumbnailDownload.java:25)
        at com.atlassian.confluence.servlet.download.AttachmentDownload.getStreamForDownload(AttachmentDownload.java:83)
        at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload$StreamResultCallback.doInTransaction(ServeAfterTransactionDownload.java:128)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:114)
        at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload.getStreamInTransaction(ServeAfterTransactionDownload.java:40)
        at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload.serveFile(ServeAfterTransactionDownload.java:46)
        at com.atlassian.plugin.servlet.BaseFileServerServlet.doGet(BaseFileServerServlet.java:77)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:46)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:159)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:35)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:122)
        at com.atlassian.core.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:27)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:25)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at com.atlassian.core.filters.gzip.GzipFilter.doFilter(GzipFilter.java:53)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:37)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:534)

      The full thread dump is attached.

      I couldn't reproduce this with his images, but its happens frequently for him.

        1. stack8.txt
          246 kB
        2. Thumber_ImageIO.patch
          4 kB

          Form Name

            [CONFSERVER-9047] Confluence hangs while generating thumbnail

            Confluence now depends on atlassian-core 3.13 which resolves this issue

            Chris Kiehl added a comment - Confluence now depends on atlassian-core 3.13 which resolves this issue

            Not in 2.9 that's for sure

            Christopher Owen [Atlassian] added a comment - Not in 2.9 that's for sure

            I would be really surprised if this made it into 2.9. I believe we should remove the version number altogether...?

            Per Fragemann [Atlassian] added a comment - I would be really surprised if this made it into 2.9. I believe we should remove the version number altogether...?

            This fix did not make it into 2.7.1. It will be addressed in a later release.

            Paul Curren added a comment - This fix did not make it into 2.7.1. It will be addressed in a later release.

            Based on that first bug, a potential workaround might be upgrading to the latest release of Sun's 1.4 JDK. Otherwise, we'll need to modify the thumbnail generation to use the synchronous API, as Chris mentioned.

            Matt Ryall added a comment - Based on that first bug, a potential workaround might be upgrading to the latest release of Sun's 1.4 JDK. Otherwise, we'll need to modify the thumbnail generation to use the synchronous API, as Chris mentioned.

            Seems to be a few issues about the media tracker:

            I think this method of loading images is ill suited to our purposes. We should try switching to a synchronous API.

            Christopher Owen [Atlassian] added a comment - Seems to be a few issues about the media tracker: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6419354 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4102164 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4480705 I think this method of loading images is ill suited to our purposes. We should try switching to a synchronous API.

            Matt Ryall added a comment -

            Windows 2003, Tomcat 5.5, Sun JDK 1.4.2_05, attachments stored on the filesystem.

            Matt Ryall added a comment - Windows 2003, Tomcat 5.5, Sun JDK 1.4.2_05, attachments stored on the filesystem.

            What OS?

              ckiehl Chris Kiehl
              matt@atlassian.com Matt Ryall
              Affected customers:
              1 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: