You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Robert Stupp (JIRA)" <ji...@apache.org> on 2015/01/18 20:06:34 UTC

[jira] [Comment Edited] (CASSANDRA-8308) Windows: Commitlog access violations on unit tests

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

Robert Stupp edited comment on CASSANDRA-8308 at 1/18/15 7:05 PM:
------------------------------------------------------------------

The commit breaks a lot of unit tests - at least on my machine ({{14.0.0 Darwin Kernel Version 14.0.0}}) - with Java 7.

ant test run with Java 7 is affected (tried some 7u65, 7u71)
-ant test run with Java 8 works-.

{{ant test}} fails with a lot of timeout exceptions. The first one is constantly this one:
{noformat}
    [junit] Testcase: org.apache.cassandra.config.DatabaseDescriptorTest:testTransKsMigration:	Caused an ERROR
    [junit] Timeout occurred. Please note the time in the report does not reflect the time until the timeout.
    [junit] junit.framework.AssertionFailedError: Timeout occurred. Please note the time in the report does not reflect the time until the timeout.
    [junit] 	at java.lang.Thread.run(Thread.java:745)
{noformat}

{{system.log}} contains messages like this - which seems to be the reason for the unit test timeout:
{noformat}
DEBUG [main] 2015-01-18 16:30:39,349 Syncing log with a batch window of 1.0
INFO  [main] 2015-01-18 16:30:39,349 DiskAccessMode is mmap, indexAccessMode is mmap
INFO  [main] 2015-01-18 16:30:39,360 Global memtable on-heap threshold is enabled at 227MB
INFO  [main] 2015-01-18 16:30:39,360 Global memtable off-heap threshold is enabled at 227MB
INFO  [main] 2015-01-18 16:30:39,372 Started the RoundRobin Request Scheduler
INFO  [main] 2015-01-18 16:30:39,373 Loading settings from file:/Users/snazy/devel/cassandra/trunk/test/conf/cassandra.yaml
INFO  [main] 2015-01-18 16:30:39,378 Node configuration:[cluster_name=Test Cluster; column_index_size_in_kb=4; commitlog_directory=build/test/cassandra/commitlog; commitlog_segment_size_in_mb=5; commitlog_sync=batch; commitlog_sync_batch_window_in_ms=1.0; compaction_throughput_mb_per_sec=0; concurrent_compactors=4; data_file_directories=[build/test/cassandra/data]; disk_access_mode=mmap; dynamic_snitch=true; endpoint_snitch=org.apache.cassandra.locator.SimpleSnitch; incremental_backups=true; listen_address=127.0.0.1; memtable_allocation_type=offheap_objects; native_transport_port=9042; partitioner=org.apache.cassandra.dht.ByteOrderedPartitioner; request_scheduler=org.apache.cassandra.scheduler.RoundRobinScheduler; request_scheduler_id=keyspace; rpc_port=9170; saved_caches_directory=build/test/cassandra/saved_caches; seed_provider=[{class_name=org.apache.cassandra.locator.SimpleSeedProvider, parameters=[{seeds=127.0.0.1}]}]; server_encryption_options=<REDACTED>; start_native_transport=true; storage_port=7010]
DEBUG [COMMIT-LOG-ALLOCATOR] 2015-01-18 16:30:39,388 No segments in reserve; creating a fresh one
DEBUG [main] 2015-01-18 16:30:39,400 Closing and clearing existing commit log segments...
DEBUG [main] 2015-01-18 16:30:39,403 Deleting CommitLog-5-1421595039390.log
DEBUG [main] 2015-01-18 16:30:39,417 Deleting backups
DEBUG [main] 2015-01-18 16:30:39,418 Deleting schema_triggers-0359bc7171233ee19a4ab9dfb11fc125
DEBUG [main] 2015-01-18 16:30:39,418 Deleting system
DEBUG [main] 2015-01-18 16:30:39,418 Closing and clearing existing commit log segments...
INFO  [COMMIT-LOG-ALLOCATOR] 2015-01-18 16:30:39,426 Overriding RING_DELAY to 1000ms
ERROR [COMMIT-LOG-ALLOCATOR] 2015-01-18 16:30:39,517 Failed managing commit log segments. Commit disk failure policy is stop; terminating thread
org.apache.cassandra.io.FSWriteError: java.nio.file.NoSuchFileException: build/test/cassandra/commitlog:0/CommitLog-5-1421595039390.log
        at org.apache.cassandra.db.commitlog.CommitLogSegment.<init>(CommitLogSegment.java:189) ~[main/:na]
        at org.apache.cassandra.db.commitlog.CommitLogSegment.freshSegment(CommitLogSegment.java:120) ~[main/:na]
        at org.apache.cassandra.db.commitlog.CommitLogSegmentManager$1.runMayThrow(CommitLogSegmentManager.java:119) ~[main/:na]
        at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) [main/:na]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
Caused by: java.nio.file.NoSuchFileException: build/test/cassandra/commitlog:0/CommitLog-5-1421595039390.log
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[na:1.7.0_71]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.7.0_71]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.7.0_71]
        at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177) ~[na:1.7.0_71]
        at java.nio.channels.FileChannel.open(FileChannel.java:287) ~[na:1.7.0_71]
        at java.nio.channels.FileChannel.open(FileChannel.java:334) ~[na:1.7.0_71]
        at org.apache.cassandra.db.commitlog.CommitLogSegment.<init>(CommitLogSegment.java:174) ~[main/:na]
        ... 4 common frames omitted
{noformat}

EDIT: unit tests also fail with 8u25 (same exception in {{system.log}}) - just other tests


was (Author: snazy):
The commit breaks a lot of unit tests - at least on my machine ({{14.0.0 Darwin Kernel Version 14.0.0}}) - with Java 7.

ant test run with Java 7 is affected (tried some 7u65, 7u71)
ant test run with Java 8 works.

{{ant test}} fails with a lot of timeout exceptions. The first one is constantly this one:
{noformat}
    [junit] Testcase: org.apache.cassandra.config.DatabaseDescriptorTest:testTransKsMigration:	Caused an ERROR
    [junit] Timeout occurred. Please note the time in the report does not reflect the time until the timeout.
    [junit] junit.framework.AssertionFailedError: Timeout occurred. Please note the time in the report does not reflect the time until the timeout.
    [junit] 	at java.lang.Thread.run(Thread.java:745)
{noformat}

{{system.log}} contains messages like this - which seems to be the reason for the unit test timeout:
{noformat}
DEBUG [main] 2015-01-18 16:30:39,349 Syncing log with a batch window of 1.0
INFO  [main] 2015-01-18 16:30:39,349 DiskAccessMode is mmap, indexAccessMode is mmap
INFO  [main] 2015-01-18 16:30:39,360 Global memtable on-heap threshold is enabled at 227MB
INFO  [main] 2015-01-18 16:30:39,360 Global memtable off-heap threshold is enabled at 227MB
INFO  [main] 2015-01-18 16:30:39,372 Started the RoundRobin Request Scheduler
INFO  [main] 2015-01-18 16:30:39,373 Loading settings from file:/Users/snazy/devel/cassandra/trunk/test/conf/cassandra.yaml
INFO  [main] 2015-01-18 16:30:39,378 Node configuration:[cluster_name=Test Cluster; column_index_size_in_kb=4; commitlog_directory=build/test/cassandra/commitlog; commitlog_segment_size_in_mb=5; commitlog_sync=batch; commitlog_sync_batch_window_in_ms=1.0; compaction_throughput_mb_per_sec=0; concurrent_compactors=4; data_file_directories=[build/test/cassandra/data]; disk_access_mode=mmap; dynamic_snitch=true; endpoint_snitch=org.apache.cassandra.locator.SimpleSnitch; incremental_backups=true; listen_address=127.0.0.1; memtable_allocation_type=offheap_objects; native_transport_port=9042; partitioner=org.apache.cassandra.dht.ByteOrderedPartitioner; request_scheduler=org.apache.cassandra.scheduler.RoundRobinScheduler; request_scheduler_id=keyspace; rpc_port=9170; saved_caches_directory=build/test/cassandra/saved_caches; seed_provider=[{class_name=org.apache.cassandra.locator.SimpleSeedProvider, parameters=[{seeds=127.0.0.1}]}]; server_encryption_options=<REDACTED>; start_native_transport=true; storage_port=7010]
DEBUG [COMMIT-LOG-ALLOCATOR] 2015-01-18 16:30:39,388 No segments in reserve; creating a fresh one
DEBUG [main] 2015-01-18 16:30:39,400 Closing and clearing existing commit log segments...
DEBUG [main] 2015-01-18 16:30:39,403 Deleting CommitLog-5-1421595039390.log
DEBUG [main] 2015-01-18 16:30:39,417 Deleting backups
DEBUG [main] 2015-01-18 16:30:39,418 Deleting schema_triggers-0359bc7171233ee19a4ab9dfb11fc125
DEBUG [main] 2015-01-18 16:30:39,418 Deleting system
DEBUG [main] 2015-01-18 16:30:39,418 Closing and clearing existing commit log segments...
INFO  [COMMIT-LOG-ALLOCATOR] 2015-01-18 16:30:39,426 Overriding RING_DELAY to 1000ms
ERROR [COMMIT-LOG-ALLOCATOR] 2015-01-18 16:30:39,517 Failed managing commit log segments. Commit disk failure policy is stop; terminating thread
org.apache.cassandra.io.FSWriteError: java.nio.file.NoSuchFileException: build/test/cassandra/commitlog:0/CommitLog-5-1421595039390.log
        at org.apache.cassandra.db.commitlog.CommitLogSegment.<init>(CommitLogSegment.java:189) ~[main/:na]
        at org.apache.cassandra.db.commitlog.CommitLogSegment.freshSegment(CommitLogSegment.java:120) ~[main/:na]
        at org.apache.cassandra.db.commitlog.CommitLogSegmentManager$1.runMayThrow(CommitLogSegmentManager.java:119) ~[main/:na]
        at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) [main/:na]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
Caused by: java.nio.file.NoSuchFileException: build/test/cassandra/commitlog:0/CommitLog-5-1421595039390.log
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[na:1.7.0_71]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.7.0_71]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.7.0_71]
        at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177) ~[na:1.7.0_71]
        at java.nio.channels.FileChannel.open(FileChannel.java:287) ~[na:1.7.0_71]
        at java.nio.channels.FileChannel.open(FileChannel.java:334) ~[na:1.7.0_71]
        at org.apache.cassandra.db.commitlog.CommitLogSegment.<init>(CommitLogSegment.java:174) ~[main/:na]
        ... 4 common frames omitted
{noformat}

> Windows: Commitlog access violations on unit tests
> --------------------------------------------------
>
>                 Key: CASSANDRA-8308
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8308
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Joshua McKenzie
>            Assignee: Joshua McKenzie
>            Priority: Minor
>              Labels: Windows
>             Fix For: 3.0
>
>         Attachments: 8308_v1.txt, 8308_v2.txt, 8308_v3.txt
>
>
> We have four unit tests failing on trunk on Windows, all with FileSystemException's related to the SchemaLoader:
> {noformat}
> [junit] Test org.apache.cassandra.db.compaction.DateTieredCompactionStrategyTest FAILED
> [junit] Test org.apache.cassandra.cql3.ThriftCompatibilityTest FAILED
> [junit] Test org.apache.cassandra.io.sstable.SSTableRewriterTest FAILED
> [junit] Test org.apache.cassandra.repair.LocalSyncTaskTest FAILED
> {noformat}
> Example error:
> {noformat}
>     [junit] Caused by: java.nio.file.FileSystemException: build\test\cassandra\commitlog;0\CommitLog-5-1415908745965.log: The process cannot access the file because it is being used by another process.
>     [junit]
>     [junit]     at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
>     [junit]     at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
>     [junit]     at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
>     [junit]     at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
>     [junit]     at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
>     [junit]     at java.nio.file.Files.delete(Files.java:1079)
>     [junit]     at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:125)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)