Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-2274 Avoid buffer copying in Codec
  3. HDDS-9454

TypedTable prefix iterator may leak CodecBuffer

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0
    • db

    Description

      Copied adoroszlai's comment below:

      Leak reported from `TestRootedOzoneFileSystem`:

      2023-10-13 19:29:21,163 [Finalizer] WARN  db.CodecBuffer (CodecBuffer.java:detectLeaks(278)) - LEAK 1: [0<=32<=96: 2F 76 6F 6C 75 6D 65 38 33 39 ...], refCnt=1, capacity=96 allocation:
      org.apache.hadoop.hdds.utils.db.CodecBuffer.<init>(CodecBuffer.java:53)
      org.apache.hadoop.hdds.utils.db.CodecBuffer$LeakDetector$1.<init>(CodecBuffer.java:77)
      org.apache.hadoop.hdds.utils.db.CodecBuffer$LeakDetector.newCodecBuffer(CodecBuffer.java:77)
      org.apache.hadoop.hdds.utils.db.CodecBuffer$Factory.newCodecBuffer(CodecBuffer.java:70)
      org.apache.hadoop.hdds.utils.db.CodecBuffer$Factory.newCodecBuffer(CodecBuffer.java:66)
      org.apache.hadoop.hdds.utils.db.CodecBuffer.allocate(CodecBuffer.java:195)
      org.apache.hadoop.hdds.utils.db.CodecBuffer$Allocator$1.apply(CodecBuffer.java:147)
      org.apache.hadoop.hdds.utils.db.CodecBuffer$Allocator$1.apply(CodecBuffer.java:144)
      org.apache.hadoop.hdds.utils.db.StringCodecBase.toCodecBuffer(StringCodecBase.java:174)
      org.apache.hadoop.hdds.utils.db.StringCodec.toCodecBuffer(StringCodec.java:28)
      org.apache.hadoop.hdds.utils.db.StringCodecBase.toCodecBuffer(StringCodecBase.java:42)
      org.apache.hadoop.hdds.utils.db.Codec.toDirectCodecBuffer(Codec.java:73)
      org.apache.hadoop.hdds.utils.db.TypedTable.encodeKeyCodecBuffer(TypedTable.java:132)
      org.apache.hadoop.hdds.utils.db.TypedTable.iterator(TypedTable.java:416)
      org.apache.hadoop.hdds.utils.db.TypedTable.iterator(TypedTable.java:55)
      org.apache.hadoop.ozone.om.KeyManagerImpl.createFakeDirIfShould(KeyManagerImpl.java:1273)
      org.apache.hadoop.ozone.om.KeyManagerImpl.getOzoneFileStatus(KeyManagerImpl.java:1183)
      org.apache.hadoop.ozone.om.KeyManagerImpl.getFileStatus(KeyManagerImpl.java:1145)
      org.apache.hadoop.ozone.om.KeyManagerImpl.getFileStatus(KeyManagerImpl.java:1120)
      org.apache.hadoop.ozone.om.TrashOzoneFileSystem.getFileStatus(TrashOzoneFileSystem.java:280)
      org.apache.hadoop.ozone.om.TrashOzoneFileSystem.exists(TrashOzoneFileSystem.java:336)
      org.apache.hadoop.ozone.om.TrashOzoneFileSystem.getTrashRoots(TrashOzoneFileSystem.java:316)
      org.apache.hadoop.ozone.om.TrashPolicyOzone$Emptier.run(TrashPolicyOzone.java:317)
      

      https://github.com/apache/ozone/actions/runs/6511750255/job/17688866092?pr=5420#step:5:3787

      Attachments

        1. it-filesystem.zip
          639 kB
          Attila Doroszlai

        Issue Links

          Activity

            People

              szetszwo Tsz-wo Sze
              szetszwo Tsz-wo Sze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: