Hudson Woes

Yesterday, we managed to break our Hudson build in a way that we hadn’t broken it before. During the course of several check-ins, we’d removed one Maven module and added another. And then Hudson told us this:

Discovered a new module com.example.project:my-project-module my-project-module
ERROR: Processing failed due to a bug in the code. Please report this to users@hudson.dev.java.net
java.lang.NullPointerException
	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:433)
	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:383)
	at hudson.model.Run.run(Run.java:1174)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:123)

Which, hm, was not a happy thing to see. I tried to rerun the build. Same result.

I’d been wrestling with the build for several minutes before that failure because the build machine hadn’t fully deleted a folder associated with the removed module. But that, itself, didn’t cause this NullPointerException. It was only several minutes later, when the new module got added that the NullPointerException manifested. We’d added modules before, so that wasn’t untried behaviour.

Google searches didn’t really turn up anything. So we scratched our heads for a while.

So I made a guess: something about adding a module was getting confused with having deleted a module. I didn’t have any clear indication that that’s what was wrong, but that was my best guess. So I SSHed over to the build machine, manually deleted the folder from Hudson’s workspace and kicked off a new build. Success. I’m not sure I could fully articulate where that idea came from, but it appears to have been the right idea.

Some time ago, I heard that these kinds of intuitive flashes really are based on deductive processes — just that those processes are often fairly opaque. Gladwell’s Blink certainly covers this topic well. For my part, I’m fascinated by intuition and often just run with any intuitive flashes that I have. But it’s a hard skill to share with other people.

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply