Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-58870

io.netty.util.IllegalReferenceCountException due to duplicate buffer release on flush error

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown
    • Analytics Sprint 27

    Description

      As observed in linked issue MB-58867, on a ChunkedNettyOutputStream.flush() failure, we will erroneously release the output buffer twice. There is a simple fix to ensure we don't process duplicate close(), even on a flush() failure.

      2023-09-28T13:42:18.120+00:00 ERRO CBAS.server.HttpRequestHandler [HighPriorityHttpExecutor(port:8095)-5] Failure handling HTTP Request org.apache.hyracks.api.exceptions.HyracksDataException:
      ...
      Caused by: io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
          at io.netty.util.internal.ReferenceCountUpdater.toLiveRealRefCnt(ReferenceCountUpdater.java:83) ~[netty-common-4.1.94.Final.jar:4.1.94.Final]
          at io.netty.util.internal.ReferenceCountUpdater.release(ReferenceCountUpdater.java:148) ~[netty-common-4.1.94.Final.jar:4.1.94.Final]
          at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:101) ~[netty-buffer-4.1.94.Final.jar:4.1.94.Final]
          at org.apache.hyracks.http.server.ChunkedNettyOutputStream.close(ChunkedNettyOutputStream.java:89) ~[hyracks-http-7.2.2-6401.jar:7.2.2-6401]
          at org.apache.hyracks.api.util.InvokeUtil.tryIoWithCleanups(InvokeUtil.java:262) ~[hyracks-api-7.2.2-6401.jar:7.2.2-6401]
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              michael.blow Michael Blow
              michael.blow Michael Blow
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty