-
Bug
-
Resolution: Unresolved
-
Blocker
-
None
-
jenkins-ci
I am trying to fix failing tests on jenkins-ci as I am working on the sonargraph-integration-plugin. I noticed some strange behavior there. For context, all the tests are green when I run them on Github and on my local machine. But on jenkins-ci tests that require tool installations often fail, but not always. Here is a typical stack trace:
180.774 [id=52] WARNING h.m.AbstractBuild$AbstractBuildExecution#reportError: Step ‘Sonargraph Integration Report Generation & Analysis’ aborted due to exception: java.nio.file.NoSuchFileException: /home/jenkins/agent/workspace/graph-integration-plugin_develop/target/Tools/SonargraphBuild/newest/SonargraphBuild-15.4.3.155_2025-10-02/plugins/org.apache.commons.commons-io_2.16.1.jar at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:277) at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:299) at java.base/java.nio.file.Files.setPosixFilePermissions(Files.java:2170) at hudson.FilePath._chmod(FilePath.java:2009) at hudson.FilePath$Chmod.invoke(FilePath.java:1995) at hudson.FilePath$Chmod.invoke(FilePath.java:1985) at hudson.FilePath.act(FilePath.java:1234) at hudson.FilePath.act(FilePath.java:1217) at hudson.FilePath.chmod(FilePath.java:1982) at hudson.FilePath.unzip(FilePath.java:737) at hudson.FilePath.unzip(FilePath.java:704) at hudson.FilePath$UnzipFrom.invoke(FilePath.java:692) at hudson.FilePath$UnzipFrom.invoke(FilePath.java:683) at hudson.FilePath.act(FilePath.java:1234) at hudson.FilePath.act(FilePath.java:1217) at hudson.FilePath.unzipFrom(FilePath.java:680) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:1060) Caused: java.io.IOException: Failed to unpack https://eclipse.hello2morrow.com/jenkins/sonargraphBuild/SonargraphBuild-15.4.3.155_2025-10-02.zip (270197928 bytes read of total 270197928) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:1064) Caused: java.io.IOException: Failed to install https://eclipse.hello2morrow.com/jenkins/sonargraphBuild/SonargraphBuild-15.4.3.155_2025-10-02.zip to /home/jenkins/agent/workspace/graph-integration-plugin_develop/target/Tools/SonargraphBuild/newest at hudson.FilePath.installIfNecessaryFrom(FilePath.java:1074) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:970) at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:67) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:221) at com.hello2morrow.sonargraph.integration.jenkins.tool.SonargraphBuild.forNode(SonargraphBuild.java:60) at com.hello2morrow.sonargraph.integration.jenkins.controller.SonargraphReportBuilder.callSonargraphBuild(SonargraphReportBuilder.java:435)
As you can see FilePath.chmod fails. The file it fails on is different every time, although we always unpack the same zip file. And the attached screenshot proves, that build 26 succeeded in the Build (linux-21) stage, while build 27 fails here. There were no changes that would explain that behavior. My assumption is that there might be issues with file system consistency caused by write-caches. Newly written files are not always visible to the chmod call. But I am purely speculating. I file this report, since I cannot do any changes in my plugin that would solve that, except for not using your tool installation mechanism and replace it with something fully controlled by me.