You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (Updated) (JIRA)" <ji...@apache.org> on 2011/10/10 13:08:30 UTC

[jira] [Updated] (CASSANDRA-2863) NPE when writing SSTable generated via repair

     [ https://issues.apache.org/jira/browse/CASSANDRA-2863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-2863:
----------------------------------------

    Attachment: 2863.patch

Alright, I've tried boostrapping nodes a few times and I'm still not able to reproduce, so  it's likely a race of something.

That being said, I still have no clue how the iwriter field in SSTableWriter.RowIndexer can be null where the stack indicates it to be null. The assignment happens before the access, there is no other assignment of that field and the assignment/access are in the same thread.

Anyway, what we can easily do is to make iwrite being final and assign it in the constructor. If that doesn't make that field being non-null, I don't know what will. Patch attached to make that change.
                
> NPE when writing SSTable generated via repair
> ---------------------------------------------
>
>                 Key: CASSANDRA-2863
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2863
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.1
>            Reporter: Héctor Izquierdo
>            Assignee: Sylvain Lebresne
>             Fix For: 0.8.8
>
>         Attachments: 2863.patch
>
>
> A NPE is generated during repair when closing an sstable generated via SSTable build. It doesn't happen always. The node had been scrubbed and compacted before calling repair.
>  INFO [CompactionExecutor:2] 2011-07-06 11:11:32,640 SSTableReader.java (line 158) Opening /d2/cassandra/data/sbs/walf-g-730
> ERROR [CompactionExecutor:2] 2011-07-06 11:11:34,327 AbstractCassandraDaemon.java (line 113) Fatal exception in thread Thread[CompactionExecutor:2,1,main] 
> java.lang.NullPointerException
> 	at org.apache.cassandra.io.sstable.SSTableWriter$RowIndexer.close(SSTableWriter.java:382)
> 	at org.apache.cassandra.io.sstable.SSTableWriter$RowIndexer.index(SSTableWriter.java:370)
> 	at org.apache.cassandra.io.sstable.SSTableWriter$Builder.build(SSTableWriter.java:315)
> 	at org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:1103)
> 	at org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:1094)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira