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

Freestyle job fails with java.lang.OutOfMemoryError after last build step

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • None
    • Jenkins version 2.289.1 on Windows 10

      Build of a Freestyle job fails after the last build step with the following error:

      FATAL: Java heap space
      java.lang.OutOfMemoryError: Java heap space
      at java.lang.String.<init>(String.java:841)
      at java.lang.String.substring(String.java:2692)
      at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:177)
      at org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:146)
      at hudson.util.ProcessTree$WindowsOSProcess.getEnvironmentVariables2(ProcessTree.java:624)
      at hudson.util.ProcessTree$WindowsOSProcess.hasMatchingEnvVars2(ProcessTree.java:636)
      at hudson.util.ProcessTree$WindowsOSProcess.access$700(ProcessTree.java:525)
      at hudson.util.ProcessTree$Windows.hasMatchingEnvVars(ProcessTree.java:713)
      at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:688)
      at hudson.Launcher$LocalLauncher.kill(Launcher.java:1015)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:525)
      at hudson.model.Run.execute(Run.java:1906)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE

      This happens even with -Xmx1024m in jenkins.xml and simple Execute Windows batch command build steps with just some echo command

            Unassigned Unassigned
            muilwyk Benno
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: