Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-19881

CLONE - Multi-threaded check-in and check-out throwing exception using CMIS API

    Details

      Description

      Description:
      Multi-threaded check-in and check-out throwing exception using CMIS API; which is potentially killing the threads and leading to data loss for the customer.

      Exception:

      org.apache.chemistry.opencmis.commons.exceptions.CmisStorageException: Expected 89 bytes but retrieved 0 bytes! 
      at org.alfresco.opencmis.AlfrescoCmisServiceImpl.copyToTempFile(AlfrescoCmisServiceImpl.java:3122) 
      at org.alfresco.opencmis.AlfrescoCmisServiceImpl.checkIn(AlfrescoCmisServiceImpl.java:2279) 
      at sun.reflect.GeneratedMethodAccessor867.invoke(Unknown Source) 
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
      at java.lang.reflect.Method.invoke(Method.java:497) 
      

      Supporting evidence
      Following is reproducible on 5.1.3 (.4 r60cbf186-b31) schema 9,056 and Alfresco version: 5.2.2 (r73ead3c7-b41)
      Steps to reproduce

      • Install Alfresco version: 5.2.2 (r73ead3c7-b41) in AWS environment with Aurora database
      • Download the Java project attached in the JIRA CMISCheckoutTest.zip
        --With in the Java project add dependencies of CMIS 1.1 library (attached in the JIRA as chemistry-opencmis-client-impl-1.zip)
        --At the moment Java project is pointing to our internal AWS environment which we have build for the customer. You can use this environment for your testing or create your own. If you need help on the environment you can reach out to me directly.
        --Run the Java project you will see following exception in the console
        org.apache.chemistry.opencmis.commons.exceptions.CmisStorageException: Expected 89 bytes but retrieved 0 bytes! 
        

        --And following exception in the alfresco.logs (complete logs files are attached in the JIRA as alfresco_internal_env_logs.zip)

        2018-05-11 18:30:25,202 DEBUG [org.alfresco.opencmis.AlfrescoCmisServiceInterceptor] [http-apr-8080-exec-1] 
        CMIS invocation: 
        Method: checkIn 
        Arguments: 
        -default- 
        Holder(bf509db2-9b2a-43a2-96d4-30ff4e45fbab;pwc) 
        true 
        Properties Data [properties=[Property [id=cmis:name, display Name=null, local name=null, query name=null, values=[TestFile_733158]][extensions=null]]][extensions=null] 
        ContentStream [filename=TestFile_73315, length=89, MIME type=text/plain; charset=UTF-8, has stream=true][extensions=null] 
        null 
        null 
        null 
        null 
        null 
        Pre-call authentication: 
        Full auth: admin 
        Effective auth: admin 
        In-call authentication: 
        Full auth: admin 
        Effective auth: admin 
        Post-call authentication: 
        Full auth: admin 
        Effective auth: admin 
        Throwing: Expected 89 bytes but retrieved 0 bytes! 
        org.apache.chemistry.opencmis.commons.exceptions.CmisStorageException: Expected 89 bytes but retrieved 0 bytes! 
        at org.alfresco.opencmis.AlfrescoCmisServiceImpl.copyToTempFile(AlfrescoCmisServiceImpl.java:3122) 
        at org.alfresco.opencmis.AlfrescoCmisServiceImpl.checkIn(AlfrescoCmisServiceImpl.java:2279) 
        at sun.reflect.GeneratedMethodAccessor867.invoke(Unknown Source) 
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
        at java.lang.reflect.Method.invoke(Method.java:497) 
        

      Expected Behaviour
      Customer should be allowed to run multi-threaded CMIS check-in/check-out with out any thread termination or data loss.
      Observed Behaviour
      Sporadically threads are getting killed and customer is experiencing data loss.

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs (Inactive)
                  Reporter:
                  astrachan Alex Strachan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel