jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Favaro, Luciano (Brazil R&D-EPL)" <luciano.fav...@hp.com>
Subject Jackrabbit 2.6.1 locking issue
Date Tue, 28 May 2013 12:09:36 GMT
Hi,

I'm using jackrabbit with a custom login module, the authentication is done by sprint security
and after authentication succeed,  the user/groups are created in jackrabbit in case they
do not exist.

As the login module runs operation against jackrabbit using the systemsession that belongs
to the workspace, when I have users running in parallel, jackrabbit just freezes, and if I
turn on cluster tag in repository.xml, things get worst.

In my research I saw fixes that rewrites some of the jackrabbit classes in order to use different
sessions in the login module, but I'm not sure if it's the only way to go.
Any help will be appretiated.

I pasted 3 threads dump as a lock example:

State: WAITING on java.util.concurrent.locks.ReentrantLock$NonfairSync@208cb33c<mailto:java.util.concurrent.locks.ReentrantLock$NonfairSync@208cb33c>
owned by: http-bio-8080-exec-7
Total blocked: 787  Total waited: 1.460

Stack trace:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(Unknown Source)
java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(Unknown Source)
java.util.concurrent.locks.ReentrantLock.lock(Unknown Source)
org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:194)


State: BLOCKED on org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider@49d88fc<mailto:org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider@49d88fc>
owned by: http-bio-8080-exec-1
Total blocked: 1.117  Total waited: 1.805

Stack trace:
org.apache.jackrabbit.core.security.principal.AbstractPrincipalProvider.clearCache(AbstractPrincipalProvider.java:74)
org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider.onEvent(DefaultPrincipalProvider.java:244)
org.apache.jackrabbit.core.observation.EventConsumer.consumeEvents(EventConsumer.java:249)
org.apache.jackrabbit.core.observation.ObservationDispatcher.dispatchEvents(ObservationDispatcher.java:225)
org.apache.jackrabbit.core.observation.EventStateCollection.dispatch(EventStateCollection.java:475)
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:856)
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1537)
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:400)
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:375)
org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:275)
org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:258)
org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329)
org.apache.jackrabbit.core.session.SessionSaveOperation.perform(SessionSaveOperation.java:65)
org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:361)
org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:812)
org.apache.jackrabbit.core.security.user.UserManagerImpl.createUser(UserManagerImpl.java:584)
org.apache.jackrabbit.core.security.user.UserManagerImpl.createUser(UserManagerImpl.java:562)
com.hp.ccp.jackrabbit.user.UserStoreSync.createUser(UserStoreSync.java:46)



State: WAITING on java.util.concurrent.locks.ReentrantLock$NonfairSync@208cb33c<mailto:java.util.concurrent.locks.ReentrantLock$NonfairSync@208cb33c>
owned by: http-bio-8080-exec-7
Total blocked: 473  Total waited: 903

Stack trace:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(Unknown Source)
java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(Unknown Source)
java.util.concurrent.locks.ReentrantLock.lock(Unknown Source)
org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:194)
org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
org.apache.jackrabbit.core.ItemImpl.getPath(ItemImpl.java:376)
org.apache.jackrabbit.core.security.user.UserManagerImpl.createGroup(UserManagerImpl.java:966)
org.apache.jackrabbit.core.security.user.AuthorizableImpl.collectMembership(AuthorizableImpl.java:368)
org.apache.jackrabbit.core.security.user.AuthorizableImpl.memberOf(AuthorizableImpl.java:96)
org.apache.jackrabbit.core.security.user.UserImpl.memberOf(UserImpl.java:37)
org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider.collectGroupMembership(DefaultPrincipalProvider.java:268)
org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider.getGroupMembership(DefaultPrincipalProvider.java:199)
org.apache.jackrabbit.core.security.authentication.AbstractLoginModule.getPrincipals(AbstractLoginModule.java:683)
org.apache.jackrabbit.core.security.authentication.AbstractLoginModule.commit(AbstractLoginModule.java:381)
org.apache.jackrabbit.core.security.authentication.LocalAuthContext.login(LocalAuthContext.java:86)
org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1465)

Thanks,
Luciano

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message