views:

80

answers:

1

Environment:

  • WinXP SP3
  • Git: 1.7.0.2.msysgit.0
  • Hudson 1.367
  • Git server on local network with Gitosis and GitWeb

We are preparing to migrate from SVN to Git and have lots of working builds using SVN. Initial attempt at a Hudson Git build used the Git plugin. I start the build and it would get to the git clone phase. Exactly 60k of disk space would be written to the .git directory and then Hudson/Git would freeze. Hudson just sits on the build waiting forever.

I disabled the Git plugin, instead I kick off a Python script through the Hudson Execute Windows Batch Command facility. It runs and freezes when the .git directory uses exactly 60k of disk space.

I captured the batch file that Hudson builds and run it on the command line and it runs to completion.

One idea I had was that the job was blocking on stdout or stderr, so I redirected both to NULL. Nope, still hit the 60k barrier. Then I tried to kick off git clone with the -q flag (quiet). Still no.

Hudson logs shows precious little. Here is a sample from one run:
Jul 28, 2010 5:07:56 PM hudson.model.Run run
INFO: 540UnitTesting-GitTest #32 aborted
java.lang.InterruptedException
at java.lang.ProcessImpl.waitFor(Native Method)
at hudson.Proc$LocalProc.join(Proc.java:222)
at hudson.Launcher$ProcStarter.join(Launcher.java:280)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:83)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
at hudson.model.Build$RunnerImpl.build(Build.java:174)
at hudson.model.Build$RunnerImpl.doRun(Build.java:138)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
at hudson.model.Run.run(Run.java:1257)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:129)

My next step is to move Hudson to Linux, although I would rather do that sometime in the future. Does anyone have any ideas on how to fix this (with or without the Git plug-in) on Windows?

A: 

Does Git uses some config files that are user specific? If so It might be a permissioning problem. Most people seem to run Hudson as a server using the local_system account. You have two options, first you can run hudson as a different user and create the necessary files by log in interactively and setup git or you can identify the missing files and copy them to the workspace of the local_system account. For the correct path to the local system workspace, you need to google a little bit. It is usually somewhere in the Windows folder.

EDIT: Did you check the Hudson logs?

Peter Schuetze
I don't think this is the issue. Looks like both Hudson and Git are running as the Windows admin. There is both C:\Documents and Settings\administrator\.hudson\ and C:\Documents and Settings\administrator\.gitconfig
StretchyBill
open the services tool (under `control panel -> administrative tools`) and check the user that it is running as. If it is local_system it will NOT use C:\Documents and Settings\administrator for the settings.
Peter Schuetze
You were right, Peter. Hudson was running as LocalSystem. I set it to the Administrator user but still hit that blasted 60k barrier. I think on Monday I will give this setup a try with Hudson on Linux.
StretchyBill
Log in with the Administrator account and run the steps manually. May be you need to accept some certificates.
Peter Schuetze
I did that a few days ago before I posted the question. I copied the exact command Hudson performs and ran it on the command line and it succeeded.
StretchyBill
Does git tries to open a window?
Peter Schuetze
No, whether run on Hudson or the command line, git does not open a window.
StretchyBill