"kill -9 -$pid" timeout cleanup masks the real TimeoutException when no PID is found #4219
-
Deployer Versionv7.5.12 (bug code is also present unchanged in master / v8) Target OStarget OS is irrelevant Which PHP version are you using?PHP 8.5 Content of deploy.php or deploy.yaml<?php
namespace Deployer;
host('example')
->set('hostname', 'example.com')
->set('remote_user', 'deploy')
->set('deploy_path', '~/site');
// Any remote command that exceeds the timeout AND whose process is no
// longer matched by `ps x | grep $shellId` when Deployer attempts cleanup
// will surface this bug. A real-world trigger I hit was
// `deploy:writable` running `chown -L` over a shared/symlinked storage
// tree on shared hosting — `chown` was slow enough to exceed
// default_timeout, and by the time cleanup ran the shell had exited so
// the PID lookup returned empty.
set('default_timeout', 60);
task('repro', function () {
run('sleep 120 && exit');
});Steps to reproduce
Observed output (real example from a [production] bash: line 1: kill: -: arguments must be process or job IDs Expected: a This bug was already reported as issue #3782 (auto-closed via the stale |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Fixed in 00072f9 Please try https://github.com/deployphp/deployer/releases/tag/v8.0.5 |
Beta Was this translation helpful? Give feedback.
Fixed in 00072f9
Please try https://github.com/deployphp/deployer/releases/tag/v8.0.5