Tapestry 5
  1. Tapestry 5
  2. TAP5-1116

Live lock when using compressed and virtual assets due to ByteArrayOutputStream being synchronized

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.0, 5.1.0.8
    • Fix Version/s: 5.2.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      VirtualAssetStreamer in 5.1 and StackAssetRequestHandler in 5.2 are both affected by this bug. The scenario is many concurrent threads but slow connections; one thread starts to write buffered content (buffered inside a ByteArrayOutputStream) to a client; BAOS.writeTo(OutputStream) is synchronized: while that is occuring, no other thread can write that buffered content to any client.

      Solution is to not use ByteArrayOutputStream is a content buffer; instead create a class that tracks the content inside a byte array.

        Activity

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development