This happens when only NN restarts and an incremental block report is received after the node registration, but before adding the storage. I.e. queued incremental block report coming first before the first heartbeat. In this case, BlockInfoUnderConstruction#addReplicaIfNotPresent() is called from addStoredBlockUnderConstruction(), but the StorageInfo is null. Since the storage is not added yet, node.getStorageInfo(storageID) is null. As a result, the BlockInfoUnderConstruction will have one ReplicaUnderConstruction with its expectedLocation set to null. This is apparent from the log message from the processing of such an incremental block report.
WARN BlockStateChange: BLOCK* addStoredBlock: Redundant addStoredBlock request received for
replicas=[ReplicaUnderConstruction[null|FINALIZED]]} on 188.8.131.52:1004 size 0
After this, fsck will fail with a NPE and the LeaseManager will also crash with a NPE.