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

ProcessTreeTest fails on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      [INFO] Maven Version: 3.0.1
      [INFO] JDK Version: 1.6.0_18 normalized as: 1.6.0-18
      [INFO] OS Info: Arch: x86 Family: windows Name: windows 7 Version: 6.1
    • Similar Issues:

      Description

      The ProcessTreeTest gets a list of all processes (on windows) and has the pid=0 as the base of it
      user has admin rights - tested with and without elevated privs)

      When getEnvironment() is called in the test it causes an exception to be thrown.

      Adding an explict check to ignore the Sytem Idle process can return yet another random process that the user may or may not have access to.

      In my case it is returning PID=820 which is svchost.exe running as "LOCAL SERVICE"
      in the non elevated admin case you see the following error

        org.jvnet.winp.WinpException: Failed to open process error=5 at .\envvar-cmdline.cpp:53
           at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
      

      for the elevated case you see the following:

        org.jvnet.winp.WinpException: Failed to read PEB error=299 at .\envvar-cmdline.cpp:68
      	at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
      

      in either case the unit test fails.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Limin Wang
            Path:
            core/src/main/java/hudson/util/ProcessTree.java
            http://jenkins-ci.org/commit/jenkins/97c28e0a516a1647c3621838fb0629368c7b5873
            Log:
            Fixed JENKINS-8614 ProcessTreeTest fails on Windows

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Limin Wang Path: core/src/main/java/hudson/util/ProcessTree.java http://jenkins-ci.org/commit/jenkins/97c28e0a516a1647c3621838fb0629368c7b5873 Log: Fixed JENKINS-8614 ProcessTreeTest fails on Windows
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: limin wang
            Path:
            core/src/main/java/hudson/util/ProcessTree.java
            http://jenkins-ci.org/commit/jenkins/4709490334c2affd6b82270449daff7a6cb1e5e1
            Log:
            [Fixed JENKINS-8614] ProcessTreeTest fails on Windows
            Add exception handler for getEnvironmentVariables().

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: limin wang Path: core/src/main/java/hudson/util/ProcessTree.java http://jenkins-ci.org/commit/jenkins/4709490334c2affd6b82270449daff7a6cb1e5e1 Log: [Fixed JENKINS-8614] ProcessTreeTest fails on Windows Add exception handler for getEnvironmentVariables().
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: limin wang
            Path:
            core/src/main/java/hudson/util/ProcessTree.java
            http://jenkins-ci.org/commit/jenkins/cdc18ec56987204535c9919ea385c555d3d66863
            Log:
            fixed JENKINS-8614 ProcessTreeTest fails on Windows

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: limin wang Path: core/src/main/java/hudson/util/ProcessTree.java http://jenkins-ci.org/commit/jenkins/cdc18ec56987204535c9919ea385c555d3d66863 Log: fixed JENKINS-8614 ProcessTreeTest fails on Windows
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/util/ProcessTree.java
            http://jenkins-ci.org/commit/jenkins/91000fa5699c5fc7b48fcb061be9ded980aa8639
            Log:
            Merge pull request #752 from lmwang/master

            [FIXED JENKINS-8614] ProcessTreeTest fails on Windows

            Compare: https://github.com/jenkinsci/jenkins/compare/b99a794c6ed2...91000fa5699c

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/util/ProcessTree.java http://jenkins-ci.org/commit/jenkins/91000fa5699c5fc7b48fcb061be9ded980aa8639 Log: Merge pull request #752 from lmwang/master [FIXED JENKINS-8614] ProcessTreeTest fails on Windows Compare: https://github.com/jenkinsci/jenkins/compare/b99a794c6ed2...91000fa5699c
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2444
            Fixed JENKINS-8614 ProcessTreeTest fails on Windows (Revision 97c28e0a516a1647c3621838fb0629368c7b5873)
            [Fixed JENKINS-8614] ProcessTreeTest fails on Windows (Revision 4709490334c2affd6b82270449daff7a6cb1e5e1)
            fixed JENKINS-8614 ProcessTreeTest fails on Windows (Revision cdc18ec56987204535c9919ea385c555d3d66863)

            Result = SUCCESS
            wang_limin : 97c28e0a516a1647c3621838fb0629368c7b5873
            Files :

            • core/src/main/java/hudson/util/ProcessTree.java

            wang_limin : 4709490334c2affd6b82270449daff7a6cb1e5e1
            Files :

            • core/src/main/java/hudson/util/ProcessTree.java

            wang_limin : cdc18ec56987204535c9919ea385c555d3d66863
            Files :

            • core/src/main/java/hudson/util/ProcessTree.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2444 Fixed JENKINS-8614 ProcessTreeTest fails on Windows (Revision 97c28e0a516a1647c3621838fb0629368c7b5873) [Fixed JENKINS-8614] ProcessTreeTest fails on Windows (Revision 4709490334c2affd6b82270449daff7a6cb1e5e1) fixed JENKINS-8614 ProcessTreeTest fails on Windows (Revision cdc18ec56987204535c9919ea385c555d3d66863) Result = SUCCESS wang_limin : 97c28e0a516a1647c3621838fb0629368c7b5873 Files : core/src/main/java/hudson/util/ProcessTree.java wang_limin : 4709490334c2affd6b82270449daff7a6cb1e5e1 Files : core/src/main/java/hudson/util/ProcessTree.java wang_limin : cdc18ec56987204535c9919ea385c555d3d66863 Files : core/src/main/java/hudson/util/ProcessTree.java

              People

              • Assignee:
                Unassigned
                Reporter:
                teilo James Nord
              • Votes:
                5 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: