Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-15064

BufferUnderflowException after last Cell fetched from an HFile Block served from L2 offheap cache

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: io
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      While running the newer patches on our production system, I saw this error come couple of times

      ipc.RpcServer: Unexpected throwable object 
      2016-01-01 16:42:56,090 ERROR [B.defaultRpcServer.handler=20,queue=20,port=60020] ipc.RpcServer: Unexpected throwable object 
      java.nio.BufferUnderflowException
      at java.nio.Buffer.nextGetIndex(Buffer.java:500)
      at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:249)
      at org.apache.hadoop.hbase.nio.MultiByteBuff.get(MultiByteBuff.java:494)
      at org.apache.hadoop.hbase.io.encoding.FastDiffDeltaEncoder$1.decode(FastDiffDeltaEncoder.java:402) 
      at org.apache.hadoop.hbase.io.encoding.FastDiffDeltaEncoder$1.decodeNext(FastDiffDeltaEncoder.java:517) 
      at org.apache.hadoop.hbase.io.encoding.BufferedDataBlockEncoder$BufferedEncodedSeeker.next(BufferedDataBlockEncoder.java:815)
      at org.apache.hadoop.hbase.regionserver.StoreFileScanner.next(StoreFileScanner.java:138)
      

      Looking at the get code

      if (this.curItem.remaining() == 0) {
            if (items.length - 1 == this.curItemIndex) {
              // means cur item is the last one and we wont be able to read a long. Throw exception
              throw new BufferUnderflowException();
            }
            this.curItemIndex++;
            this.curItem = this.items[this.curItemIndex];
          }
      return this.curItem.get();
      

      Can the new currentItem have zero elements (position == limit), does it make sense to change the if to while ? while (this.curItem.remaining() == 0). This logic is repeated may make sense abstract to a new function if we plan to change to if to while

        Attachments

        1. MBB_hasRemaining.patch
          2 kB
          ramkrishna.s.vasudevan
        2. HBASE-15064-addendum.patch
          0.7 kB
          Anoop Sam John
        3. HBASE-15064-addendum.patch
          2 kB
          Anoop Sam John
        4. HBASE-15064.patch
          3 kB
          Anoop Sam John

          Issue Links

            Activity

              People

              • Assignee:
                anoop.hbase Anoop Sam John
                Reporter:
                dvdreddy deepankar
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: