Device or resource busy error when deleting a Jenkins item

Issue

  • Jenkins crashes when trying to delete an item and a similar trace like the one below is seen on logs:
WARNING: Unable to delete ...
java.io.IOException: Unable to delete ...

...

Caused by: java.nio.file.FileSystemException: ... nfs00000000043e6b1f0000016e: Device or resource busy

...

Environment

  • Jenkins
  • CloudBees Jenkins Enterprise (CJE)
  • CloudBees Jenkins Enterprise (CJOC)
  • HA: NFS server
  • (optional) EnvInject Plugin version 1.91.2 or earlier 

Resolution

Case A: your CJE instance makes use of the have EnvInject Plugin

Upgrade to EnvInject Plugin version >= 1.91.3+.  

Case B: your instance does not makes use of the have EnvInject Plugin

If EnvInject is not in use, there are a few things you can do to try to narrow down the culprit: run lsof +D <FULL_PATH_TO_ITEM> for the offending item.  Verify that Jenkins is indeed the <PID> that is returned and holding the .nfs files.

  • If it is not Jenkins, and is another process, kill it by running kill <PID>.  Verify that the .nfs are gone after the process is killed and attempt to delete the job again.
  • If it is Jenkins, check to make sure that all plugins correctly close loggers and propagate the close to upper loggers.  Refer as an example to to https://issues.jenkins-ci.org/browse/JENKINS-28409 for more information.

Note: Proposed above commands work on Linux OS.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.