Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-9285

LEAK DETECTED in sstwriter

    XMLWordPrintableJSON

Details

    • Normal

    Description

      reproduce bug :

          public static void main(String[] args) throws Exception {
              System.setProperty("cassandra.debugrefcount","true");
              
              String ks = "ks1";
              String table = "t1";
              
              String schema = "CREATE TABLE " + ks + "." + table + "(a1 INT, PRIMARY KEY (a1));";
              String insert = "INSERT INTO "+ ks + "." + table + "(a1) VALUES(?);";
              
              File dir = new File("/var/tmp/" + ks + "/" + table);
              dir.mkdirs();
              
              CQLSSTableWriter writer = CQLSSTableWriter.builder().forTable(schema).using(insert).inDirectory(dir).build();
              
              writer.addRow(1);
              writer.close();
              writer = null;
              
              Thread.sleep(1000);System.gc();
              Thread.sleep(1000);System.gc();
          }
      

      [2015-05-01 16:09:59,139] [Reference-Reaper:1] ERROR org.apache.cassandra.utils.concurrent.Ref - LEAK DETECTED: a reference (org.apache.cassandra.utils.concurrent.Ref$State@79fa9da9) to class org.apache.cassandra.io.util.SafeMemory$MemoryTidy@2053866990:Memory@[7f87f8043b20..7f87f8043b48) was not released before the reference was garbage collected
      [2015-05-01 16:09:59,143] [Reference-Reaper:1] ERROR org.apache.cassandra.utils.concurrent.Ref - Allocate trace org.apache.cassandra.utils.concurrent.Ref$State@79fa9da9:
      Thread[Thread-2,5,main]
      at java.lang.Thread.getStackTrace(Thread.java:1552)
      at org.apache.cassandra.utils.concurrent.Ref$Debug.<init>(Ref.java:200)
      at org.apache.cassandra.utils.concurrent.Ref$State.<init>(Ref.java:133)
      at org.apache.cassandra.utils.concurrent.Ref.<init>(Ref.java:60)
      at org.apache.cassandra.io.util.SafeMemory.<init>(SafeMemory.java:32)
      at org.apache.cassandra.io.util.SafeMemoryWriter.<init>(SafeMemoryWriter.java:33)
      at org.apache.cassandra.io.sstable.IndexSummaryBuilder.<init>(IndexSummaryBuilder.java:111)
      at org.apache.cassandra.io.sstable.SSTableWriter$IndexWriter.<init>(SSTableWriter.java:576)
      at org.apache.cassandra.io.sstable.SSTableWriter.<init>(SSTableWriter.java:140)
      at org.apache.cassandra.io.sstable.AbstractSSTableSimpleWriter.getWriter(AbstractSSTableSimpleWriter.java:58)
      at org.apache.cassandra.io.sstable.SSTableSimpleUnsortedWriter$DiskWriter.run(SSTableSimpleUnsortedWriter.java:227)

      [2015-05-01 16:09:59,144] [Reference-Reaper:1] ERROR org.apache.cassandra.utils.concurrent.Ref - LEAK DETECTED: a reference (org.apache.cassandra.utils.concurrent.Ref$State@664382e3) to class org.apache.cassandra.io.util.SafeMemory$MemoryTidy@899100784:Memory@[7f87f8043990..7f87f8043994) was not released before the reference was garbage collected
      [2015-05-01 16:09:59,144] [Reference-Reaper:1] ERROR org.apache.cassandra.utils.concurrent.Ref - Allocate trace org.apache.cassandra.utils.concurrent.Ref$State@664382e3:
      Thread[Thread-2,5,main]
      at java.lang.Thread.getStackTrace(Thread.java:1552)
      at org.apache.cassandra.utils.concurrent.Ref$Debug.<init>(Ref.java:200)
      at org.apache.cassandra.utils.concurrent.Ref$State.<init>(Ref.java:133)
      at org.apache.cassandra.utils.concurrent.Ref.<init>(Ref.java:60)
      at org.apache.cassandra.io.util.SafeMemory.<init>(SafeMemory.java:32)
      at org.apache.cassandra.io.util.SafeMemoryWriter.<init>(SafeMemoryWriter.java:33)
      at org.apache.cassandra.io.sstable.IndexSummaryBuilder.<init>(IndexSummaryBuilder.java:110)
      at org.apache.cassandra.io.sstable.SSTableWriter$IndexWriter.<init>(SSTableWriter.java:576)
      at org.apache.cassandra.io.sstable.SSTableWriter.<init>(SSTableWriter.java:140)
      at org.apache.cassandra.io.sstable.AbstractSSTableSimpleWriter.getWriter(AbstractSSTableSimpleWriter.java:58)
      at org.apache.cassandra.io.sstable.SSTableSimpleUnsortedWriter$DiskWriter.run(SSTableSimpleUnsortedWriter.java:227)

      [2015-05-01 16:09:59,144] [Reference-Reaper:1] ERROR org.apache.cassandra.utils.concurrent.Ref - LEAK DETECTED: a reference (org.apache.cassandra.utils.concurrent.Ref$State@3cca0ac2) to class org.apache.cassandra.io.util.SafeMemory$MemoryTidy@499043670:Memory@[7f87f8039940..7f87f8039c60) was not released before the reference was garbage collected
      [2015-05-01 16:09:59,144] [Reference-Reaper:1] ERROR org.apache.cassandra.utils.concurrent.Ref - Allocate trace org.apache.cassandra.utils.concurrent.Ref$State@3cca0ac2:
      Thread[Thread-2,5,main]
      at java.lang.Thread.getStackTrace(Thread.java:1552)
      at org.apache.cassandra.utils.concurrent.Ref$Debug.<init>(Ref.java:200)
      at org.apache.cassandra.utils.concurrent.Ref$State.<init>(Ref.java:133)
      at org.apache.cassandra.utils.concurrent.Ref.<init>(Ref.java:60)
      at org.apache.cassandra.io.util.SafeMemory.<init>(SafeMemory.java:32)
      at org.apache.cassandra.io.compress.CompressionMetadata$Writer.<init>(CompressionMetadata.java:274)
      at org.apache.cassandra.io.compress.CompressionMetadata$Writer.open(CompressionMetadata.java:285)
      at org.apache.cassandra.io.compress.CompressedSequentialWriter.<init>(CompressedSequentialWriter.java:74)
      at org.apache.cassandra.io.util.SequentialWriter.open(SequentialWriter.java:124)
      at org.apache.cassandra.io.sstable.SSTableWriter.<init>(SSTableWriter.java:129)
      at org.apache.cassandra.io.sstable.AbstractSSTableSimpleWriter.getWriter(AbstractSSTableSimpleWriter.java:58)
      at org.apache.cassandra.io.sstable.SSTableSimpleUnsortedWriter$DiskWriter.run(SSTableSimpleUnsortedWriter.java:227)

      Attachments

        Activity

          People

            Unassigned Unassigned
            pierz Pierre N.
            Yuki Morishita
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: