You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Jos (Jira)" <ji...@apache.org> on 2020/07/28 10:30:00 UTC

[jira] [Commented] (CMIS-976) It occurs in several actions of the CMIS the error from writeUnlock (java.lang.IllegalMonitorStateException)

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

Jos commented on CMIS-976:
--------------------------

I can reproduce the bug using this simple code:

 
{code:java}
 
 List<String> docs = new ArrayList<>();

 for (int i = 0 ; i < 10000 ; i++) {
     docs.add("/any/valid/path");
 }
 
 
 List<Thread> threads = new ArrayList<>();
 for (int i = 0 ; i < 32 ; i++) {
     threads.add(new Thread(() -> docs.parallelStream().forEach(p -> session.getObjectByPath(p))));
 }
 
 threads.stream().forEach(Thread::run);
 threads.stream().forEach(t -> {
     try {
        t.join();
     } catch (InterruptedException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
     }
 });
{code}
 

It happens after a short time of execution

> It occurs in several actions of the CMIS the error from writeUnlock (java.lang.IllegalMonitorStateException)
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-976
>                 URL: https://issues.apache.org/jira/browse/CMIS-976
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.13.0
>         Environment: Application web Java run  in JBOSS EAP 6.4.2.GA.
> ECM Alfresco Enterprise v4.2.5
>            Reporter: Fagner Souza
>            Priority: Major
>
> It occurs in several actions of the CMIS the error below, I believe that occurs after creating folder on a cutomizado model and setted / changed value of an attribute.
> The error does not always happen, not yet identified the time that happens, it appears in various situations.
> ERROR [-] [...]) null: java.lang.IllegalMonitorStateException
> 	at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryRelease(ReentrantReadWriteLock.java:374) [rt.jar:1.7.0_97]
> 	at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1260) [rt.jar:1.7.0_97]
> 	at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.unlock(ReentrantReadWriteLock.java:1131) [rt.jar:1.7.0_97]
> 	at org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl.writeUnlock(CacheImpl.java:286)
> 	at org.apache.chemistry.opencmis.client.bindings.spi.atompub.LinkCache.unlockTypeLinks(LinkCache.java:234)
> 	at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.unlockTypeLinks(AbstractAtomPubService.java:358)
> 	at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getTypeDefinitionInternal(AbstractAtomPubService.java:934)
> 	at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:94)
> 	at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:148)
> 	at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:127)
> 	at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getTypeDefinition(SessionImpl.java:770)
> 	at org.apache.chemistry.opencmis.client.runtime.repository.ObjectFactoryImpl.getTypeFromObjectData(ObjectFactoryImpl.java:262)
> 	at org.apache.chemistry.opencmis.client.runtime.repository.ObjectFactoryImpl.convertObject(ObjectFactoryImpl.java:597)
> 	at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:523)
> 	at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:493)
> 	at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:485)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)