jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg (JIRA)" <j...@apache.org>
Subject [jira] Closed: (JCR-161) NPE in CachingHierarchyManager (missing synchronization in LRUEntry.remove)
Date Thu, 10 Nov 2005 16:14:04 GMT
     [ http://issues.apache.org/jira/browse/JCR-161?page=all ]
     
Stefan Guggisberg closed JCR-161:
---------------------------------

    Resolution: Invalid

there's one CachingHierarchyManager instance per Session and since
Session is not thread safe by design CachingHierarchyManager doesn't
need to be thread safe either.

i've never seen NPE thrown by CachingHierarchyManager, even under load 
(100 concurrent writing sessions). i guess that the NPE is caused by 
incorrect use of Session, probably by sharing a session or a session-bound 
item or workspace among multiple threads.

> NPE in CachingHierarchyManager (missing synchronization in LRUEntry.remove)
> ---------------------------------------------------------------------------
>
>          Key: JCR-161
>          URL: http://issues.apache.org/jira/browse/JCR-161
>      Project: Jackrabbit
>         Type: Bug
>     Reporter: fabrizio giustina
>     Assignee: Dominique Pfister
>     Priority: Minor
>      Fix For: 1.0

>
> stacktrace from jackrabbit rev. 191499 http://svn.apache.org/viewcvs.cgi?rev=191499&view=rev
> java.lang.NullPointerException
> 	at org.apache.jackrabbit.core.CachingHierarchyManager$LRUEntry.remove(CachingHierarchyManager.java:638)
> 	at org.apache.jackrabbit.core.CachingHierarchyManager$LRUEntry.touch(CachingHierarchyManager.java:657)
> 	at org.apache.jackrabbit.core.CachingHierarchyManager.resolvePath(CachingHierarchyManager.java:180)
> 	at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:341)
> 	at org.apache.jackrabbit.core.ItemImpl.getAncestor(ItemImpl.java:1469)
> I found this error at least a couple of times in my logs, probably due to a missing synchronization
in the LRUEntry.remove method.
> Line 638 of cachingManager rev 191499:
> public void remove() {
>             if (previous != null) {
>                 previous.next = next;  // ----> NPE here
>             }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message