Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58211

ArtifactDeployer fails with java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins 2.182
      ArtifactDeployer 1.2
      Ubuntu 16.04 LTS
      OpenJDK 1.8.0_212-8u212-b03-0ubuntu1.16.04.1-b03
    • Similar Issues:

      Description

      All of my jobs that use ArtifactDeployer have started failing with the following error since June 18 (which is probably when I updated all the plugin versions before leaving for a nice vacation):

      Archiving artifacts
      [ArtifactDeployer] - Starting deployment from the post-action ...
      ERROR: Step ‘[ArtifactDeployer] - Deploy the artifacts from build workspace to remote locations’ aborted due to exception:
      java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat
      at org.jruby.ext.posix.LinuxPOSIX.allocateStat(LinuxPOSIX.java:44)
      at org.jruby.ext.posix.LinuxPOSIX.stat(LinuxPOSIX.java:87)
      at com.atlassian.ant.tasks.PermissionsUtils.getPermissions(PermissionsUtils.java:21)
      at com.atlassian.ant.tasks.CopyWithPerms.doFileOperations(CopyWithPerms.java:75)
      at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy$1CopyImpl.doFileOperations(LocalCopy.java:60)
      at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:568)
      at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy.copyAndGetNumbers(LocalCopy.java:83)
      at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:71)
      at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:41)
      at hudson.FilePath.act(FilePath.java:1078)
      at hudson.FilePath.act(FilePath.java:1061)
      at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher.processDeployment(ArtifactDeployerPublisher.java:204)
      at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher._perform(ArtifactDeployerPublisher.java:130)
      at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher.perform(ArtifactDeployerPublisher.java:99)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      at hudson.model.Build$BuildExecution.post2(Build.java:186)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      at hudson.model.Run.execute(Run.java:1843)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)

       

        Attachments

          Issue Links

            Activity

            Hide
            cmolson Christian Molson added a comment - - edited

            I have a very similar issue, updated all plugins and Jenkins on July 2nd 2019. Here is the stack trace:

             

            java.lang.NoSuchFieldError: SIZE at org.jruby.ext.posix.HeapStruct.<clinit>(HeapStruct.java:52) at org.jruby.ext.posix.LinuxPOSIX.allocateStat(LinuxPOSIX.java:44) at org.jruby.ext.posix.LinuxPOSIX.stat(LinuxPOSIX.java:87) at com.atlassian.ant.tasks.PermissionsUtils.getPermissions(PermissionsUtils.java:21) at com.atlassian.ant.tasks.CopyWithPerms.doFileOperations(CopyWithPerms.java:75) at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy$1CopyImpl.doFileOperations(LocalCopy.java:60) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:568) at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy.copyAndGetNumbers(LocalCopy.java:83) at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:71) at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:41) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3052) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

             

            It seems that the update of JNA in 2.181 may have caused this for us based on this commit changing SIZE to NATIVE.POINTER_SIZE: https://github.com/java-native-access/jna/commit/869bb33984a2cf701f9343ea40cca27ffec4be88#diff-d5b04c438e96aeec3c0fdad0596087ee

             To get it back up right away I've rolled back to 2.180 for now.

            Show
            cmolson Christian Molson added a comment - - edited I have a very similar issue, updated all plugins and Jenkins on July 2nd 2019. Here is the stack trace:   java.lang.NoSuchFieldError: SIZE at org.jruby.ext.posix.HeapStruct.<clinit>(HeapStruct.java:52) at org.jruby.ext.posix.LinuxPOSIX.allocateStat(LinuxPOSIX.java:44) at org.jruby.ext.posix.LinuxPOSIX.stat(LinuxPOSIX.java:87) at com.atlassian.ant.tasks.PermissionsUtils.getPermissions(PermissionsUtils.java:21) at com.atlassian.ant.tasks.CopyWithPerms.doFileOperations(CopyWithPerms.java:75) at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy$1CopyImpl.doFileOperations(LocalCopy.java:60) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:568) at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy.copyAndGetNumbers(LocalCopy.java:83) at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:71) at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:41) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3052) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)   It seems that the update of JNA in 2.181 may have caused this for us based on this commit changing SIZE to NATIVE.POINTER_SIZE:  https://github.com/java-native-access/jna/commit/869bb33984a2cf701f9343ea40cca27ffec4be88#diff-d5b04c438e96aeec3c0fdad0596087ee  To get it back up right away I've rolled back to 2.180 for now.
            Hide
            ksbn Kai Sieben added a comment -

            I am having the same issue as Christian Molson. Also rolling back Jenkins from 2.184 to 2.180 solved it for now.

            Stack trace:

            ERROR: Step ‘[ArtifactDeployer] - Deploy the artifacts from build workspace to remote locations’ aborted due to exception:
            java.lang.NoSuchFieldError: SIZE
            at org.jruby.ext.posix.HeapStruct.<clinit>(HeapStruct.java:52)
            at org.jruby.ext.posix.LinuxPOSIX.allocateStat(LinuxPOSIX.java:44)
            at org.jruby.ext.posix.LinuxPOSIX.stat(LinuxPOSIX.java:87)
            at com.atlassian.ant.tasks.PermissionsUtils.getPermissions(PermissionsUtils.java:21)
            at com.atlassian.ant.tasks.CopyWithPerms.doFileOperations(CopyWithPerms.java:75)
            at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy$1CopyImpl.doFileOperations(LocalCopy.java:60)
            at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:568)
            at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy.copyAndGetNumbers(LocalCopy.java:83)
            at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:71)
            at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:41)
            at hudson.FilePath.act(FilePath.java:1078)
            at hudson.FilePath.act(FilePath.java:1061)
            at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher.processDeployment(ArtifactDeployerPublisher.java:204)
            at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher._perform(ArtifactDeployerPublisher.java:130)
            at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher.perform(ArtifactDeployerPublisher.java:99)
            at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
            at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
            at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
            at hudson.model.Build$BuildExecution.post2(Build.java:186)
            at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
            at hudson.model.Run.execute(Run.java:1843)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:429)

            Show
            ksbn Kai Sieben added a comment - I am having the same issue as Christian Molson . Also rolling back Jenkins from 2.184 to 2.180 solved it for now. Stack trace: ERROR: Step ‘ [ArtifactDeployer] - Deploy the artifacts from build workspace to remote locations’ aborted due to exception: java.lang.NoSuchFieldError: SIZE at org.jruby.ext.posix.HeapStruct.<clinit>(HeapStruct.java:52) at org.jruby.ext.posix.LinuxPOSIX.allocateStat(LinuxPOSIX.java:44) at org.jruby.ext.posix.LinuxPOSIX.stat(LinuxPOSIX.java:87) at com.atlassian.ant.tasks.PermissionsUtils.getPermissions(PermissionsUtils.java:21) at com.atlassian.ant.tasks.CopyWithPerms.doFileOperations(CopyWithPerms.java:75) at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy$1CopyImpl.doFileOperations(LocalCopy.java:60) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:568) at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy.copyAndGetNumbers(LocalCopy.java:83) at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:71) at org.jenkinsci.plugins.artifactdeployer.service.ArtifactDeployerCopy.invoke(ArtifactDeployerCopy.java:41) at hudson.FilePath.act(FilePath.java:1078) at hudson.FilePath.act(FilePath.java:1061) at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher.processDeployment(ArtifactDeployerPublisher.java:204) at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher._perform(ArtifactDeployerPublisher.java:130) at org.jenkinsci.plugins.artifactdeployer.ArtifactDeployerPublisher.perform(ArtifactDeployerPublisher.java:99) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1843) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)
            Hide
            d4fr3nch Raphaël BERGERET added a comment -

            Same issue

            Same stack trace as OP (java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat)

            Same rollback to 2.180 here.

            No fix or workaround yet ?

            Show
            d4fr3nch Raphaël BERGERET added a comment - Same issue Same stack trace as OP (java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat) Same rollback to 2.180 here. No fix or workaround yet ?
            Hide
            mihalich Joe Mihalich added a comment - - edited

            Same error on 2.186.  Rolled back to 2.180 as others did, and problem went away.

             

            ERROR: Step ‘[ArtifactDeployer] - Deploy the artifacts from build workspace to remote locations’ aborted due to exception: 
            java.lang.NoSuchFieldError: SIZE
            at org.jruby.ext.posix.HeapStruct.<clinit>(HeapStruct.java:52)
            at org.jruby.ext.posix.LinuxPOSIX.allocateStat(LinuxPOSIX.java:44)
            at org.jruby.ext.posix.LinuxPOSIX.stat(LinuxPOSIX.java:87)
            at com.atlassian.ant.tasks.PermissionsUtils.getPermissions(PermissionsUtils.java:21)
            at com.atlassian.ant.tasks.CopyWithPerms.doFileOperations(CopyWithPerms.java:75)
            at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy$1CopyImpl.doFileOperations(LocalCopy.java:60)

            Show
            mihalich Joe Mihalich added a comment - - edited Same error on 2.186.  Rolled back to 2.180 as others did, and problem went away.   ERROR: Step ‘ [ArtifactDeployer]  - Deploy the artifacts from build workspace to remote locations’ aborted due to exception:  java.lang.NoSuchFieldError: SIZE at org.jruby.ext.posix.HeapStruct.<clinit>(HeapStruct.java:52) at org.jruby.ext.posix.LinuxPOSIX.allocateStat(LinuxPOSIX.java:44) at org.jruby.ext.posix.LinuxPOSIX.stat(LinuxPOSIX.java:87) at com.atlassian.ant.tasks.PermissionsUtils.getPermissions(PermissionsUtils.java:21) at com.atlassian.ant.tasks.CopyWithPerms.doFileOperations(CopyWithPerms.java:75) at org.jenkinsci.plugins.artifactdeployer.service.LocalCopy$1CopyImpl.doFileOperations(LocalCopy.java:60)
            Hide
            xani Mariusz Gronczewski added a comment -

            Still present in 2.187/1.2

            Show
            xani Mariusz Gronczewski added a comment - Still present in 2.187/1.2
            Hide
            mihalich Joe Mihalich added a comment - - edited

            Is someone going to look into this issue?  We're blocked from upgrading until this is fixed.  

            Also if anyone has a workaround, please post it here.

            Show
            mihalich Joe Mihalich added a comment - - edited Is someone going to look into this issue?  We're blocked from upgrading until this is fixed.   Also if anyone has a workaround, please post it here.
            Hide
            mawinter69 Markus Winter added a comment - - edited

            The plugin has a dependecy to

            <groupId>com.atlassian</groupId>
            <artifactId>ant-filesystem-tasks</artifactId>

            which has a dependency to a very old jna and org.jruby.ext.posix.jna-posix

            I guess the LocalCopy class needs to be reimplemented without the Atlassian stuff to be able to fix it. Or shade the dependency to jna as proposed in JENKINS-58207

            Staying on old jna in Jenkins core is causing issues when trying to connect AIX machines with certain JDKs (see JENKINS-57515)

             

             

             

             

            Show
            mawinter69 Markus Winter added a comment - - edited The plugin has a dependecy to <groupId>com.atlassian</groupId> <artifactId>ant-filesystem-tasks</artifactId> which has a dependency to a very old jna and org.jruby.ext.posix.jna-posix I guess the LocalCopy class needs to be reimplemented without the Atlassian stuff to be able to fix it. Or shade the dependency to jna as proposed in JENKINS-58207 Staying on old jna in Jenkins core is causing issues when trying to connect AIX machines with certain JDKs (see JENKINS-57515 )        
            Hide
            makr Matthias Kraft added a comment - - edited

            I am on the LTS versions of Jenkins. Upgrading to 2.290.1 now gives me the same stack trace Christian Molson mentioned.

            Update:
            After installing the Build Symlink plugin the "NoSuchFieldError: SIZE" changed into the OP's "NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat".

            Show
            makr Matthias Kraft added a comment - - edited I am on the LTS versions of Jenkins. Upgrading to 2.290.1 now gives me the same stack trace Christian Molson mentioned. Update: After installing the Build Symlink plugin the "NoSuchFieldError: SIZE" changed into the OP's "NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat".

              People

              • Assignee:
                seanturner83 Sean Turner
                Reporter:
                mgedmin Marius Gedminas
              • Votes:
                9 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated: