You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benedict (JIRA)" <ji...@apache.org> on 2014/02/07 03:06:19 UTC
[jira] [Updated] (CASSANDRA-6671) NoSuchElementException in trunk
[ https://issues.apache.org/jira/browse/CASSANDRA-6671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benedict updated CASSANDRA-6671:
--------------------------------
Attachment: tmp.patch
[~jbellis] I knew it was dangerous to replace NBQ with CLQ :-)
I will be dropping a major patch that would fix this within the next couple of days, however this may take some time to get merged. In the mean time I'm attaching a trivial fix: getLast() apparently isn't remotely concurrency safe, and will throw a NPE if the queue is empty. peekLast() is the correct method to use.
> NoSuchElementException in trunk
> -------------------------------
>
> Key: CASSANDRA-6671
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6671
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Tyler Hobbs
> Attachments: tmp.patch
>
>
> When running {{cassandra-stress -o 10000000}} from {{cassandra-1.2}} against the latest trunk, I noticed this error in the system log:
> {noformat}
> ERROR 01:13:11 Exception in thread Thread[MutationStage:68,5,main]
> java.lang.RuntimeException: java.util.NoSuchElementException
> at org.apache.cassandra.service.StorageProxy$LocalMutationRunnable.run(StorageProxy.java:2063) ~[main/:na]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_40]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_40]
> at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_40]
> Caused by: java.util.NoSuchElementException: null
> at java.util.concurrent.ConcurrentLinkedDeque.screenNullResult(ConcurrentLinkedDeque.java:812) ~[na:1.7.0_40]
> at java.util.concurrent.ConcurrentLinkedDeque.getLast(ConcurrentLinkedDeque.java:963) ~[na:1.7.0_40]
> at org.apache.cassandra.utils.concurrent.WaitQueue.signalAll(WaitQueue.java:122) ~[main/:na]
> at org.apache.cassandra.utils.concurrent.OpOrder$Group.unlink(OpOrder.java:254) ~[main/:na]
> at org.apache.cassandra.utils.concurrent.OpOrder$Group.finishOne(OpOrder.java:209) ~[main/:na]
> at org.apache.cassandra.db.commitlog.CommitLogSegment$Allocation.markWritten(CommitLogSegment.java:581) ~[main/:na]
> at org.apache.cassandra.db.commitlog.CommitLog.add(CommitLog.java:231) ~[main/:na]
> at org.apache.cassandra.db.commitlog.CommitLog.add(CommitLog.java:193) ~[main/:na]
> at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:349) ~[main/:na]
> at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:328) ~[main/:na]
> at org.apache.cassandra.db.Mutation.apply(Mutation.java:205) ~[main/:na]
> at org.apache.cassandra.service.StorageProxy$7.runMayThrow(StorageProxy.java:997) ~[main/:na]
> at org.apache.cassandra.service.StorageProxy$LocalMutationRunnable.run(StorageProxy.java:2059) ~[main/:na]
> ... 3 common frames omitted
> {noformat}
> I'm not sure what the implications are.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)