Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-9879

Memory leak handling block/container token in OM/SCM

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 1.4.0
    • None

    Description

      OOM is observed for FIXED_BYTESTRING_CACHE consuming approx 22GB of memory. 

       
      This is called for token converting to proto for: Kind (fixed) and service (its either container id and blockId), so service part calling below just adding to map consuming memory.
       
      setKindBytes(getFixedByteString(tok.getKind())).
      setServiceBytes(getFixedByteString(tok.getService()));
       
      org.apache.hadoop.ozone.protocolPB.OzonePBHelper#getFixedByteString
      public static ByteString getFixedByteString(Text key) {
      ByteString value = FIXED_BYTESTRING_CACHE.get(key);
      if (value == null)

      { value = ByteString.copyFromUtf8(key.toString()); ByteString oldValue = FIXED_BYTESTRING_CACHE.putIfAbsent(key, value); return oldValue != null ? oldValue : value; }

      return value;
      }
       
       Token service is either containerId or blockId, so no need maintain cache for this as most of time, this will be unique.

      Attachments

        1. image-2023-12-08-10-49-39-717.png
          197 kB
          Sumit Agrawal

        Issue Links

          Activity

            People

              sumitagrawl Sumit Agrawal
              george_huang_us@yahoo.com George Huang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: