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

Anoop Sam John commented on HBASE-24713:
----------------------------------------

Yes. This happens. Now by the time we call very first rollWriter as part of WAL 
create, 'ringBufferEventHandler ' is created and SyncRunner threads are 
started. Because of that the above code path create a Sync with seqId = 1 and 
publish and this causes SyncRunner to try  a sync call on a null writer. This 
makes the NPE.  This patches the null check. What I was suggesting is in the 
above code  where we try create zigzagLatch there itself writer null check can 
be added so that we can fully avoid this wait for safe point code paths.

> RS startup with FSHLog throws NPE after HBASE-21751
> ---------------------------------------------------
>
>                 Key: HBASE-24713
>                 URL: https://issues.apache.org/jira/browse/HBASE-24713
>             Project: HBase
>          Issue Type: Bug
>          Components: wal
>    Affects Versions: 2.1.6
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: Gaurav Kanade
>            Priority: Minor
>
> Every RS startup creates this NPE
> {code}
> [sync.1] wal.FSHLog: UNEXPECTED
> java.lang.NullPointerException
>         at 
> org.apache.hadoop.hbase.regionserver.wal.FSHLog$SyncRunner.run(FSHLog.java:582)
>         at java.lang.Thread.run(Thread.java:748)
> 2020-07-07 10:51:23,208 WARN  [regionserver/xxxxx:16020] wal.FSHLog: Failed 
> sync-before-close but no outstanding appends; closing 
> WALjava.lang.NullPointerException
> {code}
> the reason is that the Disruptor frameworks starts the Syncrunner thread but 
> the init of the writer happens after that. A simple null check in the 
> Syncrunner will help here .
> No major damage happens though since we handle Throwable Exception. It will 
> good to solve this. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to