I've run into this as well. It has something to do with concurrent msys processes. I've reported my findings to the msys and msysgit mailing lists. I haven't had time to really dig into it and figure out what's going on.

I've done a few things to try and work around the issue:

  1. Minimized concurrent jobs on each node. Matrix jobs in particular tend to cause more issues.
  2. Replaced all shell scripts in jobs with Python scripts. Windows batch scripts were also an option, but Windows batch scripting is absolutely terrible.
  3. Jobs often need to run additional git commands to properly clean the repository, deal with deleted submodules, etc. I run all of these through the following Python function that checks for a corrupt environment and aborts instead of just hanging.
    def print_exec_corrupt_check(args):
        """Prints a command to be executed and then executes it
        """
        cmdline = " ".join(args)
    
        print "============================================================"
        print "Exec:", cmdline
        print
        sys.stdout.flush()
    
        # Add an environment check before the command
        cmdline = r'if [ ! -r "$HOME" ]; then echo "Corrupt environment detected, aborting..."; exit 1; fi; ' + cmdline
    
        subprocess.check_call([r'C:\Program Files (x86)\Git\bin\bash.exe', r'-c', cmdline], bufsize=-1)
        print
        sys.stdout.flush()

Possible future workarounds:

  1. Split matrix jobs out into individual jobs using the DSL plugin.
  2. Switch Jenkins to jgit. If jgit isn't mature enough yet, then maybe try Dulwich/Gittle.
  3. Fix the issue in msys.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to