Skip to content

Multiple persistent child-process-related test failures on Windows when running as a Service #19

Description

@rvagg

This sucks because I want to run the Jenkins client as a service but when I do I get 4 persistent failures:

=== release test-child-process-double-pipe ===
Path: simple/test-child-process-double-pipe
grep stdin write 18
echo exit
grep stdin write 7
Command: c:\workspace\iojs+v0.12+multi\nodes\node-forward-rackspace-iad-win2012r2-msvs2013\Release\node.exe c:\workspace\iojs+v0.12+multi\nodes\node-forward-rackspace-iad-win2012r2-msvs2013\test\simple\test-child-process-double-pipe.js
--- TIMEOUT ---
=== release test-child-process-exit-code ===
Path: simple/test-child-process-exit-code
Command: c:\workspace\iojs+v0.12+multi\nodes\node-forward-rackspace-iad-win2012r2-msvs2013\Release\node.exe c:\workspace\iojs+v0.12+multi\nodes\node-forward-rackspace-iad-win2012r2-msvs2013\test\simple\test-child-process-exit-code.js
--- TIMEOUT ---
=== release test-child-process-spawnsync ===
Path: simple/test-child-process-spawnsync
sleep started
sleep exited [ 50, 509779200 ]
assert.js:100
  throw new assert.AssertionError({
        ^
AssertionError: sleep should not take longer or less than 1 second
    at Object.<anonymous> (c:\workspace\iojs+v0.12+multi\nodes\node-forward-rackspace-iad-win2012r2-msvs2013\test\simple\test-child-process-spawnsync.js:44:8)
    at Module._compile (module.js:462:26)
    at Object.Module._extensions..js (module.js:480:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:503:10)
    at startup (node.js:135:16)
    at node.js:866:3
Command: c:\workspace\iojs+v0.12+multi\nodes\node-forward-rackspace-iad-win2012r2-msvs2013\Release\node.exe c:\workspace\iojs+v0.12+multi\nodes\node-forward-rackspace-iad-win2012r2-msvs2013\test\simple\test-child-process-spawnsync.js
=== release test-child-process-spawnsync-input ===
Path: simple/test-child-process-spawnsync-input
Command: c:\workspace\iojs+v0.12+multi\nodes\node-forward-rackspace-iad-win2012r2-msvs2013\Release\node.exe c:\workspace\iojs+v0.12+multi\nodes\node-forward-rackspace-iad-win2012r2-msvs2013\test\simple\test-child-process-spawnsync-input.js
--- TIMEOUT ---

Compare Jenkins running as a service to running manually from cmd.

I'm using nssm with fairly standard options, running Jenkins from a 1-line .bat file and redirecting stdout and stderr to files.

Anybody have any clues about this? The only service-related problems I'm aware of are obvious ones like permissions problems. The test-child-process-spawnsync failure is particularly interesting. The sleep 1 appears to be taking 50 seconds (look at builds 47 and 48 and you'll see the same number!)--what's the significance of 50 seconds? A longer-than-expected execution might explain all of these errors but it's still not acceptable since running Node from a service on Windows is fairly common for production deployments.

Activity

  1. ralphtheninja commented on Nov 30, 2014

    @ralphtheninja

    Since I don't have a clue about this I'm just gonna be the rubber duck instead.

    So the only difference here is how you launch Jenkins? Have you tried experimenting changing which user is running the service?

    One difference I see is which hudson .bat file is being run:

    Build 49

    [node-forward-rackspace-iad-win2012r2-msvs2013] $ cmd /c call C:\Windows\TEMP\hudson8301516808398704284.bat
    

    Build 50

    [node-forward-rackspace-iad-win2012r2-msvs2013] $ cmd /c call C:\Users\ADMINI~1\AppData\Local\Temp\2\hudson2421968505119472450.bat
    
  2. rvagg commented on Nov 30, 2014

    @rvagg
    MemberAuthor

    @ralphtheninja I did consider permissions as a possible cause here but dismissed it because "why would a permissions problem manifest only in a few child process cases like sleep 1 taking 50 seconds?".

    Shame on me for thinking that way, this is Windows after all! A bit of googling yielded this:

    I had this same exact problem executing a .bat file which in turn made a call to git.cmd using Process.Start from a windows service. The git command would execute immediately if the .bat file was ran directly from the command line, but would delay exactly 50 seconds any time it was called from the windows service.

    Again:

    So, here's Jenkins being run explicitly as Administrator: https://jenkins-node-forward.nodesource.com/job/iojs+v0.12+multi/nodes=node-forward-rackspace-iad-win2012r2-msvs2013/lastBuild/console

    And, also the first proper SUCCESS! #18 is still going to cause some problems but this is real progress!

  3. ralphtheninja commented on Nov 30, 2014

    @ralphtheninja

    🍻

  4. nodejs-github-bot commented on Jun 27, 2020

    @nodejs-github-bot
    Collaborator

    CI: https://ci.nodejs.org/job/node-test-pull-request/32117/

    (edit by @mmarchini: was testing something on nodejs/node-auto-test, but it seems like the bot always comments on this repository when a Jenkins PR Job starts. Sorry for the noise)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions