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

ProcessTreeTest fails on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • None
    • [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

      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.

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

              Created:
              Updated:
              Resolved: