You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2010/05/24 04:30:25 UTC
[jira] Created: (CASSANDRA-1119) detect incomplete commitlogheader
detect incomplete commitlogheader
---------------------------------
Key: CASSANDRA-1119
URL: https://issues.apache.org/jira/browse/CASSANDRA-1119
Project: Cassandra
Issue Type: Bug
Components: Core
Reporter: Jonathan Ellis
Assignee: Kelvin Kakugawa
Priority: Minor
Fix For: 0.6.3
Kelvin reported:
I just came across a corrupted CL file. Here's the stacktrace when starting the server:
Listening for transport dt_socket at address: 8888
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
Caused by: java.io.EOFException
at java.io.RandomAccessFile.readInt(RandomAccessFile.java:725)
at java.io.RandomAccessFile.readLong(RandomAccessFile.java:758)
at org.apache.cassandra.db.commitlog.CommitLogHeader.readCommitLogHeader(CommitLogHeader.java:145)
at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:181)
at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:167)
at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:95)
at org.apache.cassandra.thrift.CassandraDaemon.init(CassandraDaemon.java:142)
... 5 more
He added that the segment is only 6 bytes long, indicating that the header was never completely written. CLH should catch that EOF and skip the segment when replay is attempted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1119) detect incomplete
commitlogheader
Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877496#action_12877496 ]
Gary Dusbabek commented on CASSANDRA-1119:
------------------------------------------
Yes, it is possible that the header could be corrupted while writing mutations to the CL (existing CL mutations would be intact).
> detect incomplete commitlogheader
> ---------------------------------
>
> Key: CASSANDRA-1119
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1119
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Matthew F. Dennis
> Priority: Minor
> Fix For: 0.6.3, 0.7
>
> Attachments: 0001-cassandra-0.6-1119.patch, 0001-trunk-1119.patch, 0002-cassandra-0.6-1119.patch, 0002-trunk-1119.patch
>
>
> Kelvin reported:
> I just came across a corrupted CL file. Here's the stacktrace when starting the server:
> Listening for transport dt_socket at address: 8888
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
> Caused by: java.io.EOFException
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:725)
> at java.io.RandomAccessFile.readLong(RandomAccessFile.java:758)
> at org.apache.cassandra.db.commitlog.CommitLogHeader.readCommitLogHeader(CommitLogHeader.java:145)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:181)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:167)
> at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:95)
> at org.apache.cassandra.thrift.CassandraDaemon.init(CassandraDaemon.java:142)
> ... 5 more
> He added that the segment is only 6 bytes long, indicating that the header was never completely written. CLH should catch that EOF and skip the segment when replay is attempted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1119) detect incomplete
commitlogheader
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877474#action_12877474 ]
Jonathan Ellis commented on CASSANDRA-1119:
-------------------------------------------
Is it possible that we could end up with garbage in the commitlog header, if we lose power during the header update post flush? (i.e., not a brand new segment?)
if so we should probably split the header out into a separate file, and if we can't read the header, start replay of the mutations file from the beginning. (This could be a new ticket.)
> detect incomplete commitlogheader
> ---------------------------------
>
> Key: CASSANDRA-1119
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1119
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Matthew F. Dennis
> Priority: Minor
> Fix For: 0.6.3
>
> Attachments: 0001-cassandra-0.6-1119.patch, 0001-trunk-1119.patch, 0002-cassandra-0.6-1119.patch, 0002-trunk-1119.patch
>
>
> Kelvin reported:
> I just came across a corrupted CL file. Here's the stacktrace when starting the server:
> Listening for transport dt_socket at address: 8888
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
> Caused by: java.io.EOFException
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:725)
> at java.io.RandomAccessFile.readLong(RandomAccessFile.java:758)
> at org.apache.cassandra.db.commitlog.CommitLogHeader.readCommitLogHeader(CommitLogHeader.java:145)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:181)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:167)
> at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:95)
> at org.apache.cassandra.thrift.CassandraDaemon.init(CassandraDaemon.java:142)
> ... 5 more
> He added that the segment is only 6 bytes long, indicating that the header was never completely written. CLH should catch that EOF and skip the segment when replay is attempted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1119) detect incomplete commitlogheader
Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthew F. Dennis updated CASSANDRA-1119:
-----------------------------------------
Attachment: 0002-cassandra-0.6-1119.patch
0002-trunk-1119.patch
I had not logged anything since it is expected behavior
> detect incomplete commitlogheader
> ---------------------------------
>
> Key: CASSANDRA-1119
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1119
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Matthew F. Dennis
> Priority: Minor
> Fix For: 0.6.3
>
> Attachments: 0001-cassandra-0.6-1119.patch, 0001-trunk-1119.patch, 0002-cassandra-0.6-1119.patch, 0002-trunk-1119.patch
>
>
> Kelvin reported:
> I just came across a corrupted CL file. Here's the stacktrace when starting the server:
> Listening for transport dt_socket at address: 8888
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
> Caused by: java.io.EOFException
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:725)
> at java.io.RandomAccessFile.readLong(RandomAccessFile.java:758)
> at org.apache.cassandra.db.commitlog.CommitLogHeader.readCommitLogHeader(CommitLogHeader.java:145)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:181)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:167)
> at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:95)
> at org.apache.cassandra.thrift.CassandraDaemon.init(CassandraDaemon.java:142)
> ... 5 more
> He added that the segment is only 6 bytes long, indicating that the header was never completely written. CLH should catch that EOF and skip the segment when replay is attempted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1119) detect incomplete commitlogheader
Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthew F. Dennis updated CASSANDRA-1119:
-----------------------------------------
Attachment: 0001-cassandra-0.6-1119.patch
0001-trunk-1119.patch
> detect incomplete commitlogheader
> ---------------------------------
>
> Key: CASSANDRA-1119
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1119
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Matthew F. Dennis
> Priority: Minor
> Fix For: 0.6.3
>
> Attachments: 0001-cassandra-0.6-1119.patch, 0001-trunk-1119.patch
>
>
> Kelvin reported:
> I just came across a corrupted CL file. Here's the stacktrace when starting the server:
> Listening for transport dt_socket at address: 8888
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
> Caused by: java.io.EOFException
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:725)
> at java.io.RandomAccessFile.readLong(RandomAccessFile.java:758)
> at org.apache.cassandra.db.commitlog.CommitLogHeader.readCommitLogHeader(CommitLogHeader.java:145)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:181)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:167)
> at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:95)
> at org.apache.cassandra.thrift.CassandraDaemon.init(CassandraDaemon.java:142)
> ... 5 more
> He added that the segment is only 6 bytes long, indicating that the header was never completely written. CLH should catch that EOF and skip the segment when replay is attempted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1119) detect incomplete
commitlogheader
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877420#action_12877420 ]
Jonathan Ellis commented on CASSANDRA-1119:
-------------------------------------------
well, it's expected behavior if you happen to kill the server at the right time. maybe INFO.
> detect incomplete commitlogheader
> ---------------------------------
>
> Key: CASSANDRA-1119
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1119
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Matthew F. Dennis
> Priority: Minor
> Fix For: 0.6.3
>
> Attachments: 0001-cassandra-0.6-1119.patch, 0001-trunk-1119.patch
>
>
> Kelvin reported:
> I just came across a corrupted CL file. Here's the stacktrace when starting the server:
> Listening for transport dt_socket at address: 8888
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
> Caused by: java.io.EOFException
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:725)
> at java.io.RandomAccessFile.readLong(RandomAccessFile.java:758)
> at org.apache.cassandra.db.commitlog.CommitLogHeader.readCommitLogHeader(CommitLogHeader.java:145)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:181)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:167)
> at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:95)
> at org.apache.cassandra.thrift.CassandraDaemon.init(CassandraDaemon.java:142)
> ... 5 more
> He added that the segment is only 6 bytes long, indicating that the header was never completely written. CLH should catch that EOF and skip the segment when replay is attempted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1119) detect incomplete
commitlogheader
Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877459#action_12877459 ]
Matthew F. Dennis commented on CASSANDRA-1119:
----------------------------------------------
0002 patches log at INFO
> detect incomplete commitlogheader
> ---------------------------------
>
> Key: CASSANDRA-1119
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1119
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Matthew F. Dennis
> Priority: Minor
> Fix For: 0.6.3
>
> Attachments: 0001-cassandra-0.6-1119.patch, 0001-trunk-1119.patch, 0002-cassandra-0.6-1119.patch, 0002-trunk-1119.patch
>
>
> Kelvin reported:
> I just came across a corrupted CL file. Here's the stacktrace when starting the server:
> Listening for transport dt_socket at address: 8888
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
> Caused by: java.io.EOFException
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:725)
> at java.io.RandomAccessFile.readLong(RandomAccessFile.java:758)
> at org.apache.cassandra.db.commitlog.CommitLogHeader.readCommitLogHeader(CommitLogHeader.java:145)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:181)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:167)
> at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:95)
> at org.apache.cassandra.thrift.CassandraDaemon.init(CassandraDaemon.java:142)
> ... 5 more
> He added that the segment is only 6 bytes long, indicating that the header was never completely written. CLH should catch that EOF and skip the segment when replay is attempted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1119) detect incomplete
commitlogheader
Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877414#action_12877414 ]
Gary Dusbabek commented on CASSANDRA-1119:
------------------------------------------
Let's log a WARN when this happens so there is some kind of indication that Bad Stuff exists.
> detect incomplete commitlogheader
> ---------------------------------
>
> Key: CASSANDRA-1119
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1119
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Matthew F. Dennis
> Priority: Minor
> Fix For: 0.6.3
>
> Attachments: 0001-cassandra-0.6-1119.patch, 0001-trunk-1119.patch
>
>
> Kelvin reported:
> I just came across a corrupted CL file. Here's the stacktrace when starting the server:
> Listening for transport dt_socket at address: 8888
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
> Caused by: java.io.EOFException
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:725)
> at java.io.RandomAccessFile.readLong(RandomAccessFile.java:758)
> at org.apache.cassandra.db.commitlog.CommitLogHeader.readCommitLogHeader(CommitLogHeader.java:145)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:181)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:167)
> at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:95)
> at org.apache.cassandra.thrift.CassandraDaemon.init(CassandraDaemon.java:142)
> ... 5 more
> He added that the segment is only 6 bytes long, indicating that the header was never completely written. CLH should catch that EOF and skip the segment when replay is attempted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1119) detect incomplete commitlogheader
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-1119:
--------------------------------------
Assignee: Matthew F. Dennis (was: Kelvin Kakugawa)
> detect incomplete commitlogheader
> ---------------------------------
>
> Key: CASSANDRA-1119
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1119
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Matthew F. Dennis
> Priority: Minor
> Fix For: 0.6.3
>
>
> Kelvin reported:
> I just came across a corrupted CL file. Here's the stacktrace when starting the server:
> Listening for transport dt_socket at address: 8888
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
> Caused by: java.io.EOFException
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:725)
> at java.io.RandomAccessFile.readLong(RandomAccessFile.java:758)
> at org.apache.cassandra.db.commitlog.CommitLogHeader.readCommitLogHeader(CommitLogHeader.java:145)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:181)
> at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:167)
> at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:95)
> at org.apache.cassandra.thrift.CassandraDaemon.init(CassandraDaemon.java:142)
> ... 5 more
> He added that the segment is only 6 bytes long, indicating that the header was never completely written. CLH should catch that EOF and skip the segment when replay is attempted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.