Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Hudson jobs lose working directory sporadically
Hudson jobs lose working directory sporadically [message #1503193] Mon, 08 December 2014 08:38 Go to next message
Christoph Schmitz is currently offline Christoph SchmitzFriend
Messages: 2
Registered: December 2014
Junior Member
Hi,

I'm currently having problems with Hudson jobs losing their working directory from time to time - it seems that something is removing the working directory of the job while it is running. Since I cannot entirely be sure that it's a Hudson problem, I wanted to ask beforehand if anyone has seen a problem like that before.

The jobs in question contain "Execute shell" steps that run a Python script which in turn forks other processes (something wrapped in shell scripts). There are no special settings regarding working directories in the "Advanced Job Options" section.

Occasionally - very rarely and in different jobs - the script fails when forking other commands with an error message indicating that the working directory of the shell just forked is gone, i.e.:

Hudson -> Execute shell -> Python -> shell wrapper -> fails because $PWD is gone.

sh: 0: getcwd() failed: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

This error message seems to indicate that a shell was started from a directory that had already been deleted at the time. Since none of the steps changes its working directory, I assume that there is some sort of race condition going on regarding the working directory of the Hudson job. No other build of that job was running at the same time. The problem is not reproducible: on re-executing the failed jobs, they worked ok.

We're running Hudson 3.1.2 on several nodes with build slaves being attached through ssh and slave.jar. The build slaves use local directories (i.e., no NFS or anything) as their file system base.

Does this behavior ring a bell with anyone?

Thanks and best regards,
Christoph
Re: Hudson jobs lose working directory sporadically [message #1506588 is a reply to message #1503193] Thu, 11 December 2014 00:24 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
If this is a not a concurrently running job (some kind of race condition could happen in concurrent build) and unless the job build process itself is mistakenly removing the working directory, I'm not sure how it can happen otherwise.

Winston Prakash
Eclipse Hudson team
Re: Hudson jobs lose working directory sporadically [message #1506965 is a reply to message #1506588] Thu, 11 December 2014 07:47 Go to previous message
Christoph Schmitz is currently offline Christoph SchmitzFriend
Messages: 2
Registered: December 2014
Junior Member
Thanks Winston,

I'll have another long hard look at the jobs themselves to figure out who accidentally deletes the CWD. Just wanted to make sure and check if any problem of this kind was known in the Hudson community.

Regards,
Christoph
Previous Topic:Node priority
Next Topic:What is Latest Maven Build Information page?
Goto Forum:
  


Current Time: Tue Mar 19 10:33:13 GMT 2024

Powered by FUDForum. Page generated in 0.03663 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top