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

Publish over CIFS fails with Out of memory error

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • None

    Description

      When attempting to deploy to a windows share, I consistently get the following exception:

      CIFS: Connecting from host [xxxxxxxx]
      CIFS: Connecting with configuration [GiveupDevShare] ...
      CIFS: Disconnecting configuration [GiveupDevShare] ...
      FATAL: unable to create new native thread
      java.lang.OutOfMemoryError: unable to create new native thread
      at java.lang.Thread.start0(Native Method)
      at java.lang.Thread.start(Thread.java:640)
      at jcifs.UniAddress.lookupServerOrWorkgroup(UniAddress.java:173)
      at jcifs.UniAddress.getAllByName(UniAddress.java:290)
      at jcifs.UniAddress.getByName(UniAddress.java:245)
      at jcifs.smb.Dfs.getTrustedDomains(Dfs.java:62)
      at jcifs.smb.Dfs.resolve(Dfs.java:167)
      at jcifs.smb.SmbFile.resolveDfs(SmbFile.java:666)
      at jcifs.smb.SmbFile.send(SmbFile.java:768)
      at jcifs.smb.SmbFile.close(SmbFile.java:1016)
      at jcifs.smb.SmbFile.close(SmbFile.java:1022)
      at jcifs.smb.SmbFile.close(SmbFile.java:1026)
      at jcifs.smb.SmbFileOutputStream.close(SmbFileOutputStream.java:164)
      at jenkins.plugins.publish_over_cifs.CifsClient.transferFile(CifsClient.java:107)
      at jenkins.plugins.publish_over_cifs.CifsClient.transferFile(CifsClient.java:39)
      at jenkins.plugins.publish_over.BPTransfer.transferFile(BPTransfer.java:172)
      at jenkins.plugins.publish_over.BPTransfer.transfer(BPTransfer.java:162)
      at jenkins.plugins.publish_over.BapPublisher.perform(BapPublisher.java:146)
      at jenkins.plugins.publish_over_cifs.CifsPublisher.perform(CifsPublisher.java:60)
      at jenkins.plugins.publish_over.BPCallablePublisher.invoke(BPCallablePublisher.java:64)
      at jenkins.plugins.publish_over.BPCallablePublisher.invoke(BPCallablePublisher.java:37)
      at hudson.FilePath.act(FilePath.java:905)
      at hudson.FilePath.act(FilePath.java:878)
      at jenkins.plugins.publish_over.BPInstanceConfig.perform(BPInstanceConfig.java:124)
      at jenkins.plugins.publish_over.BPPlugin.perform(BPPlugin.java:109)
      at jenkins.plugins.publish_over_cifs.CifsBuilderPlugin.perform(CifsBuilderPlugin.java:60)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
      at hudson.model.Build$BuildExecution.build(Build.java:199)
      at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
      at hudson.model.Run.execute(Run.java:1593)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:247)

      Attachments

        Activity

          smr88 Steve Robbins added a comment -

          This issue bit me this week (Jenkins 1.596.3) and it took a bit of struggle to solve it because I was missing two pieces of information.

          1. Even though the failing build was on a slave, the java settings changes (adding -Djcifs...) must be done on the master node.

          2. When running as a windows service, the java command line arguments are contained within file jenkins.xml. This is the file to modify.

          smr88 Steve Robbins added a comment - This issue bit me this week (Jenkins 1.596.3) and it took a bit of struggle to solve it because I was missing two pieces of information. 1. Even though the failing build was on a slave, the java settings changes (adding -Djcifs...) must be done on the master node. 2. When running as a windows service, the java command line arguments are contained within file jenkins.xml. This is the file to modify.

          We've just been getting this error since we upgraded Jenkins to the latest version 2.107.2 and updated the CIFS plugin to 0.9. I have tried adding those arguments but it didn't make any difference, and we can't downgrade to 0.3 as the job configurations have been updated so are no longer compatible.

          This is a major issue and hasn't been resolved. Can we re-open it?

          mviargues Maxime Viargues added a comment - We've just been getting this error since we upgraded Jenkins to the latest version 2.107.2 and updated the CIFS plugin to 0.9. I have tried adding those arguments but it didn't make any difference, and we can't downgrade to 0.3 as the job configurations have been updated so are no longer compatible. This is a major issue and hasn't been resolved. Can we re-open it?
          mviargues Maxime Viargues added a comment - - edited

          More info: I was running a "top" command on the slave which was building and saw a spike of more than 2500 threads being running during the CIFS copy (from 800 originally).

          Also this issue only happens on MacOS machines, ElCapitan or Sierra.

          mviargues Maxime Viargues added a comment - - edited More info: I was running a "top" command on the slave which was building and saw a spike of more than 2500 threads being running during the CIFS copy (from 800 originally). Also this issue only happens on MacOS machines, ElCapitan or Sierra.

          Well upgrading to the latest "Publish Over CIFS" plug-in v0.10 fixed the issue. They have changed the underlying library to use a new jcfis library which is a lot different and removed/changed the failing code.

          They've just release v0.10 like 3 days after our upgrade... Bad luck on the timing.

          mviargues Maxime Viargues added a comment - Well upgrading to the latest "Publish Over CIFS" plug-in v0.10 fixed the issue. They have changed the underlying library to use a new jcfis library which is a lot different and removed/changed the failing code. They've just release v0.10 like 3 days after our upgrade... Bad luck on the timing.

          For your information, all publish-over-cifs component type JENKINS issues related to the Publish Over CIFS plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues

          Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues/48
          And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-cifs-plugin/issues?q=%22JENKINS-19075%22

          (Note: this is an automated bulk comment)

          gmcdonald Gavin McDonald added a comment - For your information, all publish-over-cifs component type JENKINS issues related to the Publish Over CIFS plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues/48 And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-cifs-plugin/issues?q=%22JENKINS-19075%22 (Note: this is an automated bulk comment)

          People

            bap bap
            imavroukakis Ioannis Mavroukakis
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: