You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2015/04/25 00:57:40 UTC

[jira] [Updated] (OAK-2811) Oak + data store: NPE in SegmentNodeStoreService.deactivate() leads to data store not shutting down properly

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

Alexander Klimetschek updated OAK-2811:
---------------------------------------
    Description: 
For some reason, on shutdown of a system, the {{observerTracker}} in the SegmentNodeStoreService became null before deactivate() was called, leading to this NPE on [line 404|https://github.com/apache/jackrabbit-oak/blob/1.2/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L404]:
{noformat}
24.04.2015 13:20:55.960 *ERROR* [FelixStartLevel] org.apache.jackrabbit.oak-core [org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService(87)] The deactivate method has thrown an exception (java.lang.NullPointerException)
java.lang.NullPointerException: null
	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.deactivate(SegmentNodeStoreService.java:404)
	... just reflection and apache felix code on shutdown
{noformat}

This in turn lead to the datastore not being closed ([4 lines later|https://github.com/apache/jackrabbit-oak/blob/1.2/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L408]). The CachingDataStore used here needs to stop some things and properly close a file ({{async-pending-uploads.ser}}), which didn't happen and left the file corrupted, which made that datastore not startup and thus preventing the repository from starting up again. Of course, this needs to be guarded more with a separate issue.

In any case, the NPE should be guarded.



  was:
For some reason, on shutdown of a system, the {{observerTracker}} in the SegmentNodeStoreService became null before deactivate() was called, leading to this NPE on [line 404|https://github.com/apache/jackrabbit-oak/blob/1.2/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L404]:
{noformat}
24.04.2015 13:20:55.960 *ERROR* [FelixStartLevel] org.apache.jackrabbit.oak-core [org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService(87)] The deactivate method has thrown an exception (java.lang.NullPointerException)
java.lang.NullPointerException: null
	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.deactivate(SegmentNodeStoreService.java:404)
	... just reflection and apache felix code on shutdown
{noformat}

This in turn lead to the datastore not being closed ([4 lines later|https://github.com/apache/jackrabbit-oak/blob/1.2/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L408]). The particular proprietary datastore used here needs to stop some things and properly close a file, which didn't happen and left the file corrupted, which made that datastore not startup and thus preventing the repository from starting up again. Of course, this needs to be guarded more.

In any case, the NPE should be guarded.




> Oak + data store: NPE in SegmentNodeStoreService.deactivate() leads to data store not shutting down properly
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: OAK-2811
>                 URL: https://issues.apache.org/jira/browse/OAK-2811
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segmentmk
>    Affects Versions: 1.2
>            Reporter: Alexander Klimetschek
>
> For some reason, on shutdown of a system, the {{observerTracker}} in the SegmentNodeStoreService became null before deactivate() was called, leading to this NPE on [line 404|https://github.com/apache/jackrabbit-oak/blob/1.2/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L404]:
> {noformat}
> 24.04.2015 13:20:55.960 *ERROR* [FelixStartLevel] org.apache.jackrabbit.oak-core [org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService(87)] The deactivate method has thrown an exception (java.lang.NullPointerException)
> java.lang.NullPointerException: null
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.deactivate(SegmentNodeStoreService.java:404)
> 	... just reflection and apache felix code on shutdown
> {noformat}
> This in turn lead to the datastore not being closed ([4 lines later|https://github.com/apache/jackrabbit-oak/blob/1.2/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L408]). The CachingDataStore used here needs to stop some things and properly close a file ({{async-pending-uploads.ser}}), which didn't happen and left the file corrupted, which made that datastore not startup and thus preventing the repository from starting up again. Of course, this needs to be guarded more with a separate issue.
> In any case, the NPE should be guarded.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)