tags 899060 +patch
thanks

Hello,

The attached patch seems to fix the problem.

It appears that if a socket that socat wants to listen on exists, socat
fails (socat(1)). When socat finishes by itself, ssh-socket will be
unlinked but if it is killed for some reason than socket file is not
unlinked. The attached patch tells socat to remove the socket before
starting its normal activity.

I got the hint towards this when I stopped cleaning the temp home
directory and read the sshd.log after a failure. I was to reproduce the
problem with high success rate before the patch and after the applying
the patch, I can't reproduce it building 10 times. All of the logs on
this bug report (that are not related to OpenSSL pem2openpgp, fixed in
#909700) are similar and should get fixed with this patch. I didn't
investigate why this behavior was not seen earlier (socat changes?
something else?).

I believe this is the last of the unfixed serious issues. I think this
package is set to cause removal issues for other packages in testing.
Please consider uploading this fix, along with other unreleased fixes, soon.

Thank you,

-- 
Sunil
From fcd96673225bc488494cf6c2979b21e6e1778299 Mon Sep 17 00:00:00 2001
From: Sunil Mohan Adapa <su...@medhas.org>
Date: Fri, 12 Oct 2018 13:01:24 -0700
Subject: [PATCH] tests: Ensure that stale sockets don't fail socat (Closes:
 #899060)

---
 tests/basic | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/basic b/tests/basic
index 9102bb9..3afe008 100755
--- a/tests/basic
+++ b/tests/basic
@@ -63,7 +63,7 @@ ssh_test() {
 
     # start the ssh daemon on the socket
     echo "##### starting ssh server..."
-    socat EXEC:"/usr/sbin/sshd -f ${SSHD_CONFIG} -i -D -e" "UNIX-LISTEN:${SOCKET}" 2> "$TEMPDIR"/sshd.log &
+    socat EXEC:"/usr/sbin/sshd -f ${SSHD_CONFIG} -i -D -e" "UNIX-LISTEN:${SOCKET},unlink-early" 2> "$TEMPDIR"/sshd.log &
     SSHD_PID="$!"
 
     # wait until the socket is created before continuing
-- 
2.19.1

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to