Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-9815

0 Byte RPM Files are not detected/handled properly [Regressive]

    XMLWordPrintable

    Details

    • Severity:
      Critical

      Description

      The log entry below shows a 0 byte RPM file causing indexing to fail every time. We used to handle 0 byte files appropriately, but now it seems they are slipping by and causing indexing to fail, blocking production. In this particular case we were able to delete the RPM file to resolve the issue, but Artifactory should be handling 0 byte files before they fail as they do below. Additionally, this first failure causes a bad state on the machine resulting in several RPM files failing to serialize after the BufferUnderFlow.

      2016-04-11 08:47:38,534 [art-exec-6] [DEBUG] (o.j.m.e.RpmFormatReader:32) - Preparing to read the RPM format content from artifact 'cmake-gui-2.8.12.2-2.el7.x86_64.rpm' with size '0' and SHA-1 'da39a3ee5e6b4b0d3255bfef95601890afd80709'
      2016-04-11 08:47:38,535 [art-exec-6] [DEBUG] (o.a.a.y.i.ArtifactoryRpmArtifact:83) - Acquiring the content stream of 'pd-yum-3rdparty:rhel/7/x64/cmake-gui-2.8.12.2-2.el7.x86_64.rpm'
      2016-04-11 08:47:38,545 [art-exec-6] [ERROR] (o.a.a.y.YumServiceImpl:190) - Error occurred while extracting RPM metadata for pd-yum-3rdparty:rhel/7/x64/cmake-gui-2.8.12.2-2.el7.x86_64.rpm with sha1: da39a3ee5e6b4b0d3255bfef95601890afd80709: null
      2016-04-11 08:47:38,550 [art-exec-6] [DEBUG] (o.a.a.y.YumServiceImpl:191) - Error occurred while extracting RPM metadata for pd-yum-3rdparty:rhel/7/x64/cmake-gui-2.8.12.2-2.el7.x86_64.rpm with sha1: da39a3ee5e6b4b0d3255bfef95601890afd80709
      java.nio.BufferUnderflowException: null
      at org.freecompany.redline.Util.fill(Util.java:59) ~[redline-1.1.12.jar:na]
      at org.freecompany.redline.Util.fill(Util.java:44) ~[redline-1.1.12.jar:na]
      at org.freecompany.redline.header.Lead.read(Lead.java:58) ~[redline-1.1.12.jar:na]
      at org.jfrog.metadata.extractor.RpmFormatReader.getRpmFormat(RpmFormatReader.java:55) ~[rpm-extractor-4.2.8.jar:na]
      at org.jfrog.metadata.extractor.RpmFormatReader.read(RpmFormatReader.java:37) ~[rpm-extractor-4.2.8.jar:na]
      at org.jfrog.metadata.extractor.RpmFormatReader.read(RpmFormatReader.java:25) ~[rpm-extractor-4.2.8.jar:na]
      at org.jfrog.metadata.extractor.RpmMetadataExtractor.extract(RpmMetadataExtractor.java:34) ~[rpm-extractor-4.2.8.jar:na]
      at org.artifactory.addon.yum.YumServiceImpl.extractRpmMetadata(YumServiceImpl.java:186) [artifactory-addon-yum-4.7.1.jar:na]
      at org.artifactory.addon.yum.YumServiceImpl.getMetadataForRepoPath(YumServiceImpl.java:93) [artifactory-addon-yum-4.7.1.jar:na]
      at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source) ~[na:na]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at com.sun.proxy.$Proxy145.getMetadataForRepoPath(Unknown Source) [na:na]
      at org.artifactory.addon.yum.indexer.RpmFsCachedMetadataExtractor.extract(RpmFsCachedMetadataExtractor.java:41) [artifactory-addon-yum-4.7.1.jar:na]
      at org.artifactory.addon.yum.indexer.RpmFsCachedMetadataExtractor.extract(RpmFsCachedMetadataExtractor.java:1) [artifactory-addon-yum-4.7.1.jar:na]
      at org.jfrog.metadata.yum.writer.YumRepoMetadataWriter.serializeYumMetadata(YumRepoMetadataWriter.java:124) [rpm-writer-4.2.8.jar:na]
      at org.jfrog.metadata.yum.writer.YumRepoMetadataWriter.write(YumRepoMetadataWriter.java:69) [rpm-writer-4.2.8.jar:na]
      at org.artifactory.addon.yum.YumAddonImpl.writeMetadataAsSystem(YumAddonImpl.java:358) [artifactory-addon-yum-4.7.1.jar:na]
      at org.artifactory.addon.yum.YumAddonImpl.writeMetadata(YumAddonImpl.java:342) [artifactory-addon-yum-4.7.1.jar:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at com.sun.proxy.$Proxy144.writeMetadata(Unknown Source) [na:na]
      at org.artifactory.addon.yum.YumAddonImpl$RpmMetadataWriter.write(YumAddonImpl.java:310) [artifactory-addon-yum-4.7.1.jar:na]
      at org.jfrog.metadata.indexer.RpmRepoIndexer.indexUsingAdvancedWriter(RpmRepoIndexer.java:86) [rpm-indexer-4.2.8.jar:na]
      at org.jfrog.metadata.indexer.RpmRepoIndexer.index(RpmRepoIndexer.java:70) [rpm-indexer-4.2.8.jar:na]
      at org.artifactory.addon.yum.YumAddonImpl.calculateYumMetadataAsSystem(YumAddonImpl.java:279) [artifactory-addon-yum-4.7.1.jar:na]
      at org.artifactory.addon.yum.YumAddonImpl.calculateYumMetadata(YumAddonImpl.java:257) [artifactory-addon-yum-4.7.1.jar:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:74) [artifactory-storage-common-4.7.1.jar:na]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at com.sun.proxy.$Proxy144.calculateYumMetadata(Unknown Source) [na:na]
      at org.artifactory.addon.yum.YumAddonImpl.executeAsyncRepositoryYumMetadataCalculation(YumAddonImpl.java:121) [artifactory-addon-yum-4.7.1.jar:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.artifactory.schedule.aop.AsyncAdvice$TraceableMethodInvocation.proceed(AsyncAdvice.java:348) [artifactory-core-4.7.1.jar:na]
      at org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:213) [artifactory-core-4.7.1.jar:na]
      at org.artifactory.schedule.aop.AsyncAdvice$1.call(AsyncAdvice.java:146) [artifactory-core-4.7.1.jar:na]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_77]
      at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:102) [artifactory-storage-common-4.7.1.jar:na]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_77]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_77]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
      2016-04-11 08:47:38,562 [art-exec-6] [ERROR] (o.j.m.y.w.YumRepoMetadataWriter:127) - Failed to serialize RPM metadata of 'cmake-gui-2.8.12.2-2.el7.x86_64.rpm'
      java.lang.NullPointerException: null
      at org.jfrog.metadata.yum.serializer.YumFileListsSerializer.serializeInternal(YumFileListsSerializer.java:29) ~[rpm-writer-4.2.8.jar:na]
      at org.jfrog.metadata.yum.serializer.YumXmlSerializer.serialize(YumXmlSerializer.java:62) ~[rpm-writer-4.2.8.jar:na]
      at org.jfrog.metadata.yum.serializer.MultiYumEntrySerializer.writeEntry(MultiYumEntrySerializer.java:94) ~[rpm-writer-4.2.8.jar:na]
      at org.jfrog.metadata.yum.serializer.MultiYumEntrySerializer.write(MultiYumEntrySerializer.java:57) ~[rpm-writer-4.2.8.jar:na]
      at org.jfrog.metadata.yum.writer.YumRepoMetadataWriter.serializeYumMetadata(YumRepoMetadataWriter.java:125) [rpm-writer-4.2.8.jar:na]
      at org.jfrog.metadata.yum.writer.YumRepoMetadataWriter.write(YumRepoMetadataWriter.java:69) [rpm-writer-4.2.8.jar:na]
      at org.artifactory.addon.yum.YumAddonImpl.writeMetadataAsSystem(YumAddonImpl.java:358) [artifactory-addon-yum-4.7.1.jar:na]
      at org.artifactory.addon.yum.YumAddonImpl.writeMetadata(YumAddonImpl.java:342) [artifactory-addon-yum-4.7.1.jar:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at com.sun.proxy.$Proxy144.writeMetadata(Unknown Source) [na:na]
      at org.artifactory.addon.yum.YumAddonImpl$RpmMetadataWriter.write(YumAddonImpl.java:310) [artifactory-addon-yum-4.7.1.jar:na]
      at org.jfrog.metadata.indexer.RpmRepoIndexer.indexUsingAdvancedWriter(RpmRepoIndexer.java:86) [rpm-indexer-4.2.8.jar:na]
      at org.jfrog.metadata.indexer.RpmRepoIndexer.index(RpmRepoIndexer.java:70) [rpm-indexer-4.2.8.jar:na]
      at org.artifactory.addon.yum.YumAddonImpl.calculateYumMetadataAsSystem(YumAddonImpl.java:279) [artifactory-addon-yum-4.7.1.jar:na]
      at org.artifactory.addon.yum.YumAddonImpl.calculateYumMetadata(YumAddonImpl.java:257) [artifactory-addon-yum-4.7.1.jar:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:74) [artifactory-storage-common-4.7.1.jar:na]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at com.sun.proxy.$Proxy144.calculateYumMetadata(Unknown Source) [na:na]
      at org.artifactory.addon.yum.YumAddonImpl.executeAsyncRepositoryYumMetadataCalculation(YumAddonImpl.java:121) [artifactory-addon-yum-4.7.1.jar:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      at org.artifactory.schedule.aop.AsyncAdvice$TraceableMethodInvocation.proceed(AsyncAdvice.java:348) [artifactory-core-4.7.1.jar:na]
      at org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:213) [artifactory-core-4.7.1.jar:na]
      at org.artifactory.schedule.aop.AsyncAdvice$1.call(AsyncAdvice.java:146) [artifactory-core-4.7.1.jar:na]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_77]
      at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:102) [artifactory-storage-common-4.7.1.jar:na]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_77]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_77]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]

        Attachments

          Issue Links

            Activity

                People

                Assignee:
                aviz Avi Zaig (Inactive)
                Reporter:
                daniela Daniel Augustine
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Sync Status

                    Connection: RTFACT Sync
                    RTMID-9815 -
                    SYNCHRONIZED
                    • Last Sync Date: