Source: libssh
Version: 0.8.6-2
Severity: important
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu disco

Dear maintainers,

The libssh 'libssh-server' autopkgtest is badly racy; while it doesn't
appear to have ever failed on the Debian autopkgtest infrastructure, it
fails with high frequency on Ubuntu's infrastructure:

[...]
autopkgtest [01:03:08]: test libssh-server: [-----------------------
====== password authentication ======
[2019/02/11 01:03:10.031281, 2] ssh_pki_import_privkey_base64:ssh: connect to 
host localhost port 1234: Connection refused
  Trying to decode privkey passphrase=false
autopkgtest [01:03:09]: test libssh-server: -----------------------]
autopkgtest [01:03:09]: test libssh-server:  - - - - - - - - - - results - - - 
- - - - - - -
libssh-server        FAIL non-zero exit status 253
[...]

  (http://autopkgtest.ubuntu.com/packages/libs/libssh/disco/amd64)

The issue is that the autopkgtest works by running a test server which runs
in the foreground, then backgrounds the process using the shell ('&'), which
means there is no synchronization point to ensure the server is listening
for connections before trying to run the test against it.

This makes the autopkgtest less than useful for CI in Ubuntu.

A low-effort workaround to make the test substantially more reliable would
be to add a sleep after backgrounding the server process.  A more correct
fix would be to run the server in the foreground, let it background itself
once it's listening to the socket, and include support for killing the
process via control socket (or use pgrep to find the process, or have it
write a pidfile) rather than waitpid.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org

Attachment: signature.asc
Description: PGP signature

Reply via email to