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

Workspace fails to update when Replace missing/modified files is checked

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • p4-plugin
    • None
    • Windows 7, java 1.7, version 1.1.2, p4 server version: P4D/NTX86/2012.2/585708 (2013/02/01), jenkins 1.596

      When Auto cleanup and sync option is selected WITH REPLACE missing/modified files option checked, the following error happens always:

      ERROR: Unable to update workspace: com.perforce.p4java.exception.ConnectionException: Java heap space

          [JENKINS-26486] Workspace fails to update when Replace missing/modified files is checked

          dan tran added a comment -

          I also see random false positive scm updates, ie the update does not pull in the new changes

          dan tran added a comment - I also see random false positive scm updates, ie the update does not pull in the new changes

          Paul Allen added a comment -

          Please could you include the full stack trace.

          Do you know if the error is limited to only to Windows?

          Thanks,
          Paul

          Paul Allen added a comment - Please could you include the full stack trace. Do you know if the error is limited to only to Windows? Thanks, Paul

          I have only a windows intallation. The output doesn't show more lines of stack trace, unless there is something I am missing. I will try it again to see if there is more.

          Sebastiano Mandala added a comment - I have only a windows intallation. The output doesn't show more lines of stack trace, unless there is something I am missing. I will try it again to see if there is more.

          Paul Allen added a comment -

          There might be more clues in the Jenkins System log.
          'Manage Jenkins' -> 'System Log' -> ' All Jenkins Logs'

          Paul Allen added a comment - There might be more clues in the Jenkins System log. 'Manage Jenkins' -> 'System Log' -> ' All Jenkins Logs'

          amit yedidia added a comment -

          Hi,

          Any progress on this issue?
          I run into it myself. was able to fix it on WIN7 machine by installing java1.7r80. now I got it on my linux slave as well

          Thanks.
          Amit

          amit yedidia added a comment - Hi, Any progress on this issue? I run into it myself. was able to fix it on WIN7 machine by installing java1.7r80. now I got it on my linux slave as well Thanks. Amit

          Paul Allen added a comment -

          The latest release uses the 2014.1 p4 clean feature (reconcile -w). It might resolve this for users on 2014.1 or above, but I will leave this issue open as it still needs fixing for older versions.

          Paul Allen added a comment - The latest release uses the 2014.1 p4 clean feature (reconcile -w). It might resolve this for users on 2014.1 or above, but I will leave this issue open as it still needs fixing for older versions.

          Paul Allen added a comment -

          Unable to reproduce 1.3.1 version

          Paul Allen added a comment - Unable to reproduce 1.3.1 version

          yury nedelin added a comment - - edited

          This is still an issue in 2.19.4,

          This is Java memory allocation issue,

          Look for file jenkins.xml or Jenkins-slave.xml if its a slave machine in your Jenkins install directory.
          look for -Xmx parameter mine was set to -Xmx256m, change it to higher number. If number is too high it Jenkins might fail to start service on 32 bit java. -Xmx1024m worked for me.

          If you have 64 bit java installed on your machine but you still can not start Service with -Xmx bigger then 1024m you might have to update jre inside Jenkins. So if you run
          >java -version
          and it shows Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
          but Jenkins still would not start, you can replace everything inside Jenkins/jre with contents of 64 bit installation from something like "C:\Program Files\Java\jre1.8.0_111".
          A bit hacky but seem to work.

          <arguments>-Xrs -Xmx1024m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8080 --webroot="%BASE%\war"</arguments>

          look here for reference on the syntax for memory amount
          http://www.wikihow.com/Increase-Java-Memory-in-Windows-7

          yury nedelin added a comment - - edited This is still an issue in 2.19.4, This is Java memory allocation issue, Look for file jenkins.xml or Jenkins-slave.xml if its a slave machine in your Jenkins install directory. look for -Xmx parameter mine was set to -Xmx256m, change it to higher number. If number is too high it Jenkins might fail to start service on 32 bit java. -Xmx1024m worked for me. If you have 64 bit java installed on your machine but you still can not start Service with -Xmx bigger then 1024m you might have to update jre inside Jenkins. So if you run >java -version and it shows Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode) but Jenkins still would not start, you can replace everything inside Jenkins/jre with contents of 64 bit installation from something like "C:\Program Files\Java\jre1.8.0_111". A bit hacky but seem to work. <arguments>-Xrs -Xmx1024m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8080 --webroot="%BASE%\war"</arguments> look here for reference on the syntax for memory amount http://www.wikihow.com/Increase-Java-Memory-in-Windows-7

          Paul Allen added a comment -

          Yes, growing the slave's Java Heap (as you have describe) will solve the problem for some large code bases.

          There are two open issues regarding memory usage:
          JENKINS-34946
          JENKINS-31683

          If you are experiencing a new issue, unrelated to the above, please raise a new issue.

          I presume you are referring to the Jenkins core version? The latest P4 plugin version is 1.4.10?

          Paul Allen added a comment - Yes, growing the slave's Java Heap (as you have describe) will solve the problem for some large code bases. There are two open issues regarding memory usage: JENKINS-34946 JENKINS-31683 If you are experiencing a new issue, unrelated to the above, please raise a new issue. I presume you are referring to the Jenkins core version? The latest P4 plugin version is 1.4.10?

            Unassigned Unassigned
            sebas77 Sebastiano Mandala
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: