Performing a long-running build with a detached step will return a “Task failed with exit code -1” while running shell commands such as
sleep on a FreeBSD builder agent.
Building remotely on freebsd83 in workspace /tmp/workspace/long-running-freebsd [long-running-freebsd] Running shell script Notifying upstream projects of job completion Finished: SUCCESS + which sleep /bin/sleep + date Mon Nov 2 07:20:48 PST 2015 + sleep 60 Task failed with exit code -1
- CloudBees Jenkins Enterprise
- CloudBees Jenkins Operations Center
During the installation of a JDK. The FreeBSD package system tells you to add these lines to the system ``/etc/fstab` file:
fdesc /dev/fd fdescfs rw 0 0 proc /proc procfs rw 0 0
This above step was more than likely skipped during initial JDK installation. To fix the problem, add the above lines to the fstab and then mount them with:
mount -a -v
Rerun a build to confirm that the problem is solved.
This problem is not noticed on other operating systems because there is no need to mimic
/dev/fd on systems that run on a linux based kernel.