[JIRA] (JENKINS-58211) ArtifactDeployer fails with java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat

213 views
Skip to first unread message

marius@gedmin.as (JIRA)

unread,
Jun 26, 2019, 10:10:04 AM6/26/19
to jenkinsc...@googlegroups.com
Marius Gedminas created an issue
 
Jenkins / Bug JENKINS-58211
ArtifactDeployer fails with java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat
Issue Type: Bug Bug
Assignee: Sean Turner
Components: artifactdeployer-plugin
Created: 2019-06-26 14:09
Environment: Jenkins 2.182
ArtifactDeployer 1.2
Ubuntu 16.04 LTS
OpenJDK 1.8.0_212-8u212-b03-0ubuntu1.16.04.1-b03
Priority: Minor Minor
Reporter: Marius Gedminas

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)

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

christian@cmolabs.org (JIRA)

unread,
Jul 3, 2019, 1:01:02 PM7/3/19
to jenkinsc...@googlegroups.com
Christian Molson commented on Bug JENKINS-58211
 
Re: ArtifactDeployer fails with java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat

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 caused this for us based on this commit: 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.

christian@cmolabs.org (JIRA)

unread,
Jul 3, 2019, 1:02:02 PM7/3/19
to jenkinsc...@googlegroups.com
Christian Molson edited a comment on Bug JENKINS-58211
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.

kai.sieben@softwareag.com (JIRA)

unread,
Jul 8, 2019, 10:36:02 AM7/8/19
to jenkinsc...@googlegroups.com

kai.sieben@softwareag.com (JIRA)

unread,
Jul 8, 2019, 10:52:02 AM7/8/19
to jenkinsc...@googlegroups.com

kai.sieben@softwareag.com (JIRA)

unread,
Jul 8, 2019, 10:55:02 AM7/8/19
to jenkinsc...@googlegroups.com
Kai Sieben commented on Bug JENKINS-58211
 
Re: ArtifactDeployer fails with java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat

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)

raphael.bergeret@easycom-aura.com (JIRA)

unread,
Jul 19, 2019, 11:50:02 AM7/19/19
to jenkinsc...@googlegroups.com

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 ?

jmihalich@ubermedia.com (JIRA)

unread,
Jul 20, 2019, 2:21:02 PM7/20/19
to jenkinsc...@googlegroups.com

jmihalich@ubermedia.com (JIRA)

unread,
Jul 20, 2019, 2:21:03 PM7/20/19
to jenkinsc...@googlegroups.com
Joe Mihalich edited a comment on Bug JENKINS-58211
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)

xani666@gmail.com (JIRA)

unread,
Aug 7, 2019, 10:11:03 AM8/7/19
to jenkinsc...@googlegroups.com

jmihalich@ubermedia.com (JIRA)

unread,
Aug 27, 2019, 12:47:02 PM8/27/19
to jenkinsc...@googlegroups.com

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

jmihalich@ubermedia.com (JIRA)

unread,
Aug 27, 2019, 12:47:03 PM8/27/19
to jenkinsc...@googlegroups.com
Joe Mihalich edited a comment on Bug JENKINS-58211
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.

jmihalich@ubermedia.com (JIRA)

unread,
Aug 27, 2019, 12:48:04 PM8/27/19
to jenkinsc...@googlegroups.com

m.winter@sap.com (JIRA)

unread,
Sep 25, 2019, 7:08:02 AM9/25/19
to jenkinsc...@googlegroups.com
Markus Winter commented on Bug JENKINS-58211
 
Re: ArtifactDeployer fails with java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat

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.

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

 

 

 

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

m.winter@sap.com (JIRA)

unread,
Sep 25, 2019, 7:12:03 AM9/25/19
to jenkinsc...@googlegroups.com
Markus Winter edited a comment on Bug JENKINS-58211
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)

 

 

 


 

Matthias.Kraft@softwareag.com (JIRA)

unread,
Oct 25, 2019, 3:02:03 AM10/25/19
to jenkinsc...@googlegroups.com

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

 

Matthias.Kraft@softwareag.com (JIRA)

unread,
Nov 4, 2019, 8:51:04 AM11/4/19
to jenkinsc...@googlegroups.com
Matthias Kraft edited a comment on Bug JENKINS-58211
I am on the LTS versions of Jenkins. Upgrading to 2.290.1 now gives me the same stack trace [~cmolson] 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".

dar.amit@gmail.com (JIRA)

unread,
Nov 5, 2019, 2:00:06 AM11/5/19
to jenkinsc...@googlegroups.com
Amit Dar commented on Bug JENKINS-58211

I am about to upgrade my server to 2.190.2, does anyone know if this issue still present? (also using ArtifactDeployer...)

 

dar.amit@gmail.com (JIRA)

unread,
Nov 5, 2019, 2:06:03 AM11/5/19
to jenkinsc...@googlegroups.com
Amit Dar edited a comment on Bug JENKINS-58211
I am about to upgrade my server to 2.190.2, does anyone know if this issue still present? (also using ArtifactDeployer...)

 


*UPDATE:*

looks like there is already a [PR|[https://github.com/jenkinsci/artifactdeployer-plugin/pull/13]] with the solution waiting for approval... 

 

dar.amit@gmail.com (JIRA)

unread,
Nov 5, 2019, 2:07:03 AM11/5/19
to jenkinsc...@googlegroups.com
Amit Dar edited a comment on Bug JENKINS-58211
I am about to upgrade my server to 2.190.2, does anyone know if this issue still present? (also using ArtifactDeployer...)

 

*UPDATE:*

looks like there is already a [PR|[https://github.com/jenkinsci/artifactdeployer-plugin/pull/13]] with the solution waiting for approval... 

  [~seanturner83], can you handle this?

dar.amit@gmail.com (JIRA)

unread,
Nov 5, 2019, 5:38:04 AM11/5/19
to jenkinsc...@googlegroups.com
Amit Dar edited a comment on Bug JENKINS-58211
I am about to upgrade my server to 2.190.2, does anyone know if this issue still present? (also using ArtifactDeployer...)

 

*UPDATE:*

looks like there is already a [PR|[https://github.com/jenkinsci/artifactdeployer-plugin/pull/13]] with the solution waiting for approval... 

[~seanturner83], can you handle this?


 

*UPDATE 2*

we are currently working with Jenkins 2.190 (weekly), this problem does not happen here...

dar.amit@gmail.com (JIRA)

unread,
Nov 5, 2019, 1:44:06 PM11/5/19
to jenkinsc...@googlegroups.com
Amit Dar updated an issue
 
Change By: Amit Dar
Comment:
I am about to upgrade my server to 2.190.2, does anyone know if this issue still present? (also using ArtifactDeployer...)

 

*UPDATE:*

looks like there is already a [PR|[https://github.com/jenkinsci/artifactdeployer-plugin/pull/13]] with the solution waiting for approval... 

[~seanturner83], can you handle this?

 

*UPDATE 2*

we are currently working with Jenkins 2.190 (weekly), this problem does not happen here...

me@shd.de (JIRA)

unread,
Dec 18, 2019, 7:57:04 AM12/18/19
to jenkinsc...@googlegroups.com
Marco Menzel commented on Bug JENKINS-58211
 
Re: ArtifactDeployer fails with java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.posix.Linux64HeapFileStat

I've reproduced this bug on 2.190.3 and 2.209. 
Every time I want to use the plugin [ArtifactDeployer] on a centOs build-slave.

Is this something the developers of the plugin have to fix?

m.winter@sap.com (JIRA)

unread,
Dec 18, 2019, 9:17:03 AM12/18/19
to jenkinsc...@googlegroups.com

jmihalich@ubermedia.com (JIRA)

unread,
Dec 18, 2019, 1:47:03 PM12/18/19
to jenkinsc...@googlegroups.com

libor.ukropec@nxp.com (JIRA)

unread,
Dec 25, 2019, 6:53:05 PM12/25/19
to jenkinsc...@googlegroups.com

I also use LTS version, I postponed upgrade just because of this issue  - I'm also curious when the fix will be included.

mdorotich@sierrawireless.com (JIRA)

unread,
Feb 18, 2020, 5:05:02 PM2/18/20
to jenkinsc...@googlegroups.com

Can someone please comment whether ArtifactDeployer 1.2 works with LTS versions later than 2.180? I've delayed upgrading because of this issue.

christian@cmolabs.org (JIRA)

unread,
Feb 18, 2020, 5:13:03 PM2/18/20
to jenkinsc...@googlegroups.com

It is still broken in 2.220 if you update. 

There is another ticket here that references a pull-request exits: JENKINS-60756

My co-worker got our version working following these steps, but it involves manually building a new plugin:

(Copied from what he told me)
I've checked out this repo and built the plugin locally, following this guide roughly: https://dzone.com/articles/implementing-a-jenkins-plugin-from-scratch-in-5-st
 
Then I uploaded the plugin .hpi file to Jenkins and installed it manually in the "Advanced" tab under "Manage Plugins".
 __ 
It now seems to work
 
 
 

 

 

 

mdorotich@sierrawireless.com (JIRA)

unread,
Feb 18, 2020, 5:41:02 PM2/18/20
to jenkinsc...@googlegroups.com

jmihalich@ubermedia.com (JIRA)

unread,
Feb 18, 2020, 6:03:03 PM2/18/20
to jenkinsc...@googlegroups.com

  I think the pull request is out of Jenkin's hands at this point.  The owner of the plugin repo has to approve the pull and merge in the changes and release a new version.  Since there's been no response to the pull request we have to assume the plugin/github repo is abandoned.  The only options at this point are to build the latest manually, or use another newer plugin that gives similar functionality.  There are some others out there.  

raphael.bergeret@easycom-aura.com (JIRA)

unread,
Feb 26, 2020, 8:56:07 AM2/26/20
to jenkinsc...@googlegroups.com

As you can see on github this PR triggered an automatic build available here :
https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fartifactdeployer-plugin/detail/PR-13/2/artifacts/

I tested with this one and everything seems to work as intended with the new versions of Jenkins.

Thank you Christian Molson to have brought to my attention this pull request.

 

Reply all
Reply to author
Forward
0 new messages