cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Schnitzerling (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-6283) Windows 7 data files keept open / can't be deleted after compaction.
Date Mon, 13 Jan 2014 12:51:59 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-6283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13869458#comment-13869458
] 

Andreas Schnitzerling edited comment on CASSANDRA-6283 at 1/13/14 12:50 PM:
----------------------------------------------------------------------------

Hello,
with 2.0.4 and leak detect patch I got expected errors
{panel:title=system.log}
ERROR [Finalizer] 2014-01-13 13:13:15,033 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-3418-Data.db
allocated
	at org.apache.cassandra.io.util.RandomAccessReader.<init>(RandomAccessReader.java:66)
	at org.apache.cassandra.io.compress.CompressedRandomAccessReader.<init>(CompressedRandomAccessReader.java:76)
	at org.apache.cassandra.io.compress.CompressedThrottledReader.<init>(CompressedThrottledReader.java:34)
	at org.apache.cassandra.io.compress.CompressedThrottledReader.open(CompressedThrottledReader.java:48)
	at org.apache.cassandra.io.sstable.SSTableReader.openDataReader(SSTableReader.java:1355)
	at org.apache.cassandra.io.sstable.SSTableScanner.<init>(SSTableScanner.java:67)
	at org.apache.cassandra.io.sstable.SSTableReader.getScanner(SSTableReader.java:1161)
	at org.apache.cassandra.io.sstable.SSTableReader.getScanner(SSTableReader.java:1173)
	at org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:244)
	at org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:250)
	at org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:126)
	at org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
	at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:60)
	at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
	at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:197)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
ERROR [Finalizer] 2014-01-13 13:13:15,053 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4984-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,073 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4984-Index.db
allocated
...
ERROR [CompactionExecutor:2] 2014-01-13 13:13:15,073 CassandraDaemon.java (line 187) Exception
in thread Thread[CompactionExecutor:2,1,main]
java.lang.IllegalArgumentException: bufferSize must be positive
...
ERROR [Finalizer] 2014-01-13 13:13:15,083 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5067-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,123 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5067-Index.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,133 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4302-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,153 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4302-Index.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,163 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4981-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,173 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4981-Index.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,183 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5068-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,193 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5068-Index.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,193 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4959-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,203 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4959-Index.db
allocated
...
ERROR [CompactionExecutor:1] 2014-01-13 13:13:15,223 CassandraDaemon.java (line 187) Exception
in thread Thread[CompactionExecutor:1,1,main]
java.lang.IllegalArgumentException: bufferSize must be positive
...
ERROR [Finalizer] 2014-01-13 13:13:15,243 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4991-Index.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:13:15,243 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5064-Data.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:13:15,253 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5064-Index.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:13:15,263 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5062-Data.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:13:15,263 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5062-Index.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:13:15,273 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5066-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:14:24,334 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\KSlogdata\CFlogdata\KSlogdata-CFlogdata-jb-26894-Data.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:14:54,544 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\evrangesncom\events-evrangesncom-jb-349-Data.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:14:54,554 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\evrangesdevice\events-evrangesdevice-jb-939-Data.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:14:54,574 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbyplant\events-eventsbyplant-jb-795-Data.db
allocated

and more...
{panel}


was (Author: andie78):
Hello,
with 2.0.4 and leak detect patch I got expected errors
{panel title=system.log}
ERROR [Finalizer] 2014-01-13 13:13:15,033 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-3418-Data.db
allocated
	at org.apache.cassandra.io.util.RandomAccessReader.<init>(RandomAccessReader.java:66)
	at org.apache.cassandra.io.compress.CompressedRandomAccessReader.<init>(CompressedRandomAccessReader.java:76)
	at org.apache.cassandra.io.compress.CompressedThrottledReader.<init>(CompressedThrottledReader.java:34)
	at org.apache.cassandra.io.compress.CompressedThrottledReader.open(CompressedThrottledReader.java:48)
	at org.apache.cassandra.io.sstable.SSTableReader.openDataReader(SSTableReader.java:1355)
	at org.apache.cassandra.io.sstable.SSTableScanner.<init>(SSTableScanner.java:67)
	at org.apache.cassandra.io.sstable.SSTableReader.getScanner(SSTableReader.java:1161)
	at org.apache.cassandra.io.sstable.SSTableReader.getScanner(SSTableReader.java:1173)
	at org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:244)
	at org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:250)
	at org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:126)
	at org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
	at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:60)
	at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
	at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:197)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
ERROR [Finalizer] 2014-01-13 13:13:15,053 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4984-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,073 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4984-Index.db
allocated
...
ERROR [CompactionExecutor:2] 2014-01-13 13:13:15,073 CassandraDaemon.java (line 187) Exception
in thread Thread[CompactionExecutor:2,1,main]
java.lang.IllegalArgumentException: bufferSize must be positive
...
ERROR [Finalizer] 2014-01-13 13:13:15,083 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5067-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,123 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5067-Index.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,133 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4302-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,153 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4302-Index.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,163 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4981-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,173 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4981-Index.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,183 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5068-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,193 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5068-Index.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,193 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4959-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:13:15,203 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4959-Index.db
allocated
...
ERROR [CompactionExecutor:1] 2014-01-13 13:13:15,223 CassandraDaemon.java (line 187) Exception
in thread Thread[CompactionExecutor:1,1,main]
java.lang.IllegalArgumentException: bufferSize must be positive
...
ERROR [Finalizer] 2014-01-13 13:13:15,243 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-4991-Index.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:13:15,243 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5064-Data.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:13:15,253 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5064-Index.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:13:15,263 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5062-Data.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:13:15,263 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5062-Index.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:13:15,273 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbydevice\events-eventsbydevice-jb-5066-Data.db
allocated
...
ERROR [Finalizer] 2014-01-13 13:14:24,334 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\KSlogdata\CFlogdata\KSlogdata-CFlogdata-jb-26894-Data.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:14:54,544 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\evrangesncom\events-evrangesncom-jb-349-Data.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:14:54,554 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\evrangesdevice\events-evrangesdevice-jb-939-Data.db
allocated
	...
ERROR [Finalizer] 2014-01-13 13:14:54,574 RandomAccessReader.java (line 398) LEAK finalizer
had to clean up 
java.lang.Exception: RAR for D:\Programme\cassandra\data\events\eventsbyplant\events-eventsbyplant-jb-795-Data.db
allocated

and more...
{panel}

> Windows 7 data files keept open / can't be deleted after compaction.
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-6283
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6283
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: Windows 7 (32) / Java 1.7.0.45
>            Reporter: Andreas Schnitzerling
>              Labels: compaction
>             Fix For: 2.0.5
>
>         Attachments: leakdetect.patch, screenshot-1.jpg, system.log
>
>
> Files cannot be deleted, patch CASSANDRA-5383 (Win7 deleting problem) doesn't help on
Win-7 on Cassandra 2.0.2. Even 2.1 Snapshot is not running. The cause is: Opened file handles
seem to be lost and not closed properly. Win 7 blames, that another process is still using
the file (but its obviously cassandra). Only restart of the server makes the files deleted.
But after heavy using (changes) of tables, there are about 24K files in the data folder (instead
of 35 after every restart) and Cassandra crashes. I experiminted and I found out, that a finalizer
fixes the problem. So after GC the files will be deleted (not optimal, but working fine).
It runs now 2 days continously without problem. Possible fix/test:
> I wrote the following finalizer at the end of class org.apache.cassandra.io.util.RandomAccessReader:
> {code:title=RandomAccessReader.java|borderStyle=solid}
> @Override
> protected void finalize() throws Throwable {
> 	deallocate();
> 	super.finalize();
> }
> {code}
> Can somebody test / develop / patch it? Thx.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message