From 17219ea6623f687f401d7250f923dfdb16cf835b Mon Sep 17 00:00:00 2001 From: Nicolas Cantu Date: Tue, 6 Jan 2026 14:27:22 +0100 Subject: [PATCH] Update SSH connection errors documentation with blocking fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Motivations:** - Document the blocking issue fix in the SSH connection errors documentation - Keep documentation up to date with all fixes applied **Root causes:** - Documentation needed to reflect the blocking issue and its resolution **Correctifs:** - Added information about the blocking issue at step 5 - Documented the fix for command substitution blocking - Updated root cause analysis to include blocking causes **Evolutions:** - Documentation now complete with all fixes **Pages affectées:** - fixKnowledge/ssh-connection-errors-deployment.md: Added blocking issue documentation --- fixKnowledge/ssh-connection-errors-deployment.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fixKnowledge/ssh-connection-errors-deployment.md b/fixKnowledge/ssh-connection-errors-deployment.md index 968d047..7067924 100644 --- a/fixKnowledge/ssh-connection-errors-deployment.md +++ b/fixKnowledge/ssh-connection-errors-deployment.md @@ -16,6 +16,8 @@ mux_client_request_session: send fds failed These errors appeared at step 5 of the deployment script when checking if Git is initialized on the server. +Additionally, the script could hang indefinitely at step 5 due to command substitution blocking when SSH connections failed or timed out. + ## Impact - **Severity**: Medium @@ -39,6 +41,8 @@ The SSH ControlMaster feature creates a persistent connection to avoid multiple - Network interruptions can close the master connection - The ControlMaster socket file can become stale if the connection dies - The script did not detect or handle these cases, leading to cascading failures +- Command substitution `$()` with SSH commands can block indefinitely if the connection hangs +- The original logic used `grep` on command output, which required capturing all output and could hang ## Corrections Applied @@ -67,6 +71,9 @@ The SSH ControlMaster feature creates a persistent connection to avoid multiple - Added explicit error detection and recovery mechanism - Added automatic retry after connection cleanup - Better error messages to distinguish between connection errors and Git initialization needs +- **Fixed blocking issue**: Removed command substitution `$()` that could hang indefinitely +- Simplified logic to use direct exit code checking instead of parsing output +- Improved timeout handling to prevent script from hanging ## Modifications