Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-6878

Impossible to download attachment stored on fs after accessing it with the zipexplorer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.3-milestone-1
    • 3.1
    • Storage
    • None
    • Unknown

    Description

      To reproduce:

      • create a zip archive with a picture in it
      • attach it to a document in the wiki
      • in the content of the page, add an html image with the src to the image in the attachment (/xwiki/bin/download/space/page/attachment.zip/image.png)
      • display the page, you should see the image displayed
      • try to download the attachment, it will not be possible (go to the download action for the attachment, from wiki UI or not /xwiki/bin/download/space/page/attachment.zip). Namely it will keep on saying "connecting..." and in the end return a 503.

      Also, you can import the .xar attached to this issue.

      A kill -QUIT on the java process shows that there is at least a thread in waiting as follows:

      "http://localhost:8080/xwiki/bin/download/space/page/attachment.zip" daemon prio=10 tid=0x0a6f7400 nid=0x26dc in Object.wait() [0x9d2fe000]
         java.lang.Thread.State: TIMED_WAITING (on object monitor)
      	at java.lang.Object.wait(Native Method)
      	- waiting on <0xa2c367d8> (a org.xwiki.store.locks.preemptive.internal.PreemptiveLockProvider$2)
      	at org.xwiki.store.locks.preemptive.internal.PreemptiveLock.lock(PreemptiveLock.java:111)
      	- locked <0xa2c367d8> (a org.xwiki.store.locks.preemptive.internal.PreemptiveLockProvider$2)
      	at com.xpn.xwiki.doc.FilesystemAttachmentContent$1LockingFileInputStream.<init>(FilesystemAttachmentContent.java:123)
      	at com.xpn.xwiki.doc.FilesystemAttachmentContent.getContentInputStream(FilesystemAttachmentContent.java:139)
      	at com.xpn.xwiki.doc.XWikiAttachment.getContentInputStream(XWikiAttachment.java:548)
      	at com.xpn.xwiki.web.DownloadAction.sendContent(DownloadAction.java:149)
      	at com.xpn.xwiki.web.DownloadAction.render(DownloadAction.java:127)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
      	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
      	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      	at java.lang.Thread.run(Thread.java:662)
      

      Attachments

        Activity

          People

            calebjamesdelisle CalebJamesDeLisle
            lucaa Anca Luca
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: