jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Commented] (OAK-5296) MutableRoot.refresh does not correctly refresh tree permissions
Date Tue, 13 Dec 2016 14:20:58 GMT

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

Michael Dürig commented on OAK-5296:
------------------------------------

The reason I'm filing this as a blocker is that if said refresh is caused by the garbage collector
the underlying node state of the "not yet refreshed" permissions provider might have been
collected (given it is past its retention time). Below is the full stack trace where this
has been observed:

{noformat}
07.12.2016 04:00:39.044 *ERROR* [qtp770073596-111] org.apache.jackrabbit.oak.segment.SegmentNotFoundExceptionListener
Segment not found: 11a349f9-adab-48d5-afb1-e42d01925004. SegmentId age=71297398ms,segment-generation=1
org.apache.jackrabbit.oak.segment.SegmentNotFoundException: Segment 11a349f9-adab-48d5-afb1-e42d01925004
not found
	at org.apache.jackrabbit.oak.segment.file.FileStore$8.call(FileStore.java:584)
	at org.apache.jackrabbit.oak.segment.file.FileStore$8.call(FileStore.java:524)
	at org.apache.jackrabbit.oak.segment.SegmentCache.getSegment(SegmentCache.java:98)
	at org.apache.jackrabbit.oak.segment.file.FileStore.readSegment(FileStore.java:524)
	at org.apache.jackrabbit.oak.segment.SegmentId.getSegment(SegmentId.java:123)
	at org.apache.jackrabbit.oak.segment.Record.getSegment(Record.java:70)
	at org.apache.jackrabbit.oak.segment.SegmentNodeState.getTemplateId(SegmentNodeState.java:93)
	at org.apache.jackrabbit.oak.segment.SegmentNodeState.getTemplate(SegmentNodeState.java:102)
	at org.apache.jackrabbit.oak.segment.SegmentNodeState.hasChildNode(SegmentNodeState.java:397)
	at org.apache.jackrabbit.oak.spi.state.ReadOnlyBuilder.hasChildNode(ReadOnlyBuilder.java:95)
	at org.apache.jackrabbit.oak.plugins.tree.impl.AbstractTree.hasChild(AbstractTree.java:293)
	at org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeBitsProvider.getBits(PrivilegeBitsProvider.java:107)
	at org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeBitsProvider.getBits(PrivilegeBitsProvider.java:82)
	at org.apache.jackrabbit.oak.security.authorization.permission.PermissionStoreImpl.reset(PermissionStoreImpl.java:73)
	at org.apache.jackrabbit.oak.security.authorization.permission.PermissionStoreImpl.<init>(PermissionStoreImpl.java:63)
	at org.apache.jackrabbit.oak.security.authorization.permission.CompiledPermissionImpl.<init>(CompiledPermissionImpl.java:99)
	at org.apache.jackrabbit.oak.security.authorization.permission.CompiledPermissionImpl.create(CompiledPermissionImpl.java:126)
	at org.apache.jackrabbit.oak.security.authorization.permission.PermissionProviderImpl.getCompiledPermissions(PermissionProviderImpl.java:162)
	at org.apache.jackrabbit.oak.security.authorization.permission.PermissionProviderImpl.getTreePermission(PermissionProviderImpl.java:104)
	at org.apache.jackrabbit.oak.core.SecureNodeBuilder.getTreePermission(SecureNodeBuilder.java:356)
	at org.apache.jackrabbit.oak.core.SecureNodeBuilder.baseChanged(SecureNodeBuilder.java:166)
	at org.apache.jackrabbit.oak.core.MutableRoot.refresh(MutableRoot.java:236)
	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.refresh(SessionDelegate.java:508)
	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:611)
	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performNullable(SessionDelegate.java:240)
	at org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
{noformat}


> MutableRoot.refresh does not correctly refresh tree permissions
> ---------------------------------------------------------------
>
>                 Key: OAK-5296
>                 URL: https://issues.apache.org/jira/browse/OAK-5296
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>            Priority: Blocker
>             Fix For: 1.6
>
>
> Consider the following excerpt of a stack trace:
> {noformat}
> at org.apache.jackrabbit.oak.security.authorization.permission.PermissionProviderImpl.getCompiledPermissions(PermissionProviderImpl.java:162)
> at org.apache.jackrabbit.oak.security.authorization.permission.PermissionProviderImpl.getTreePermission(PermissionProviderImpl.java:104)
> at org.apache.jackrabbit.oak.core.SecureNodeBuilder.getTreePermission(SecureNodeBuilder.java:356)
> at org.apache.jackrabbit.oak.core.SecureNodeBuilder.baseChanged(SecureNodeBuilder.java:166)
> at org.apache.jackrabbit.oak.core.MutableRoot.refresh(MutableRoot.java:236)
> {noformat}
> {{MutableRoot.refresh()}} [ends up calling | https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableRoot.java#L236]
{{PermissionProviderImpl.getCompiledPermissions}}, which in turn uses the current (not yet
fully refreshed) root for compiling the permissions. The permissions provider (and its root)
are [refreshed|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableRoot.java#L239]
only afterwards. 



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

Mime
View raw message