Bad Jenkins Slave?

Luke Deller luke at deller.id.au
Tue Feb 24 05:08:19 PST 2015


On 22 Feb 2015, at 4:50 pm, Norbert Thiebaud <nthiebaud at gmail.com> wrote:
> PS: Windows 2012 somehow ended-up with a 'ghost' directory that no-one
> could delete not even Admin ( Windows these days is so secure than
> even Administrator does not have the permission to delete files....
> yeah that is the symptom: 'Permission denied' whatever you try to do
> with that Directory...)
> Solution: Standard Microsoft Support Technique: Reboot. Hard to
> imagine that some people are running this crap on 'production' system

The situation on Windows is not quite that bad.  I’ve had to run Jenkins on Windows before, and it was a reoccurring problem that a failed or aborted build could leave some process running which held a file open within the Jenkins workspace preventing cleanup of the workspace.  Our solution was to use SysInternals "Process Explorer" to locate which process had a file open within that directory, then kill that process.

http://technet.microsoft.com/en-au/sysinternals/bb896653.aspx

I wonder if we should script this at the start or end of the Jenkins build.  The corresponding command-line tool for locating which process has a file open is called “handle”:

https://technet.microsoft.com/en-au/sysinternals/bb896655.aspx

For some precedent there is a TeamCity plugin which uses this approach: https://confluence.jetbrains.com/display/TCD9/Build+Files+Cleaner+%28Swabra%29

Regards,
Luke.


More information about the LibreOffice mailing list