-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins 2.289.2
-
-
612.v84da_9c54906d
A global Jenkins Shared Library is configured. Caching for this library is enabled for 10min.
There are a lot of jobs in parallel running on Jenkins.
Sporadically and rarely the jobs fail with
10:39:23 Library my-jsl@rel-1 is cached. Copying from home. 10:39:23 ERROR: Library my-jsl expected to contain at least one of src or vars directories
My assumption is this is happening right when another job deletes the JSL. I could find another job that run at the same time:
10:39:22 Library my-jsl@rel-1 is due for a refresh after 10 minutes, clearing.
10:39:23 Caching library my-jsl@rel-1
10:39:23 Attempting to resolve rel-1 from remote references...
Looking into the source code LibraryAdder.java I'm wondering:
Is it really ensured the library is not deleted when currently being copied?
I understand it is ensured the library is not beeing cached when already beeing cached by another job, but if I understand the code correctly the library can be deleted even when it is beeing copied?
- links to
I encountered the same issue. Looking at the code the cache dir is deleted before the lock file is created which can already lead to problems and when another job is just copying it would be also affected.