From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#30993: OpenSSH sshd killed by Shepherd 0.4.0 Date: Fri, 06 Apr 2018 10:21:09 +0200 Message-ID: <877epk3fuy.fsf@gnu.org> References: <20180329200803.GA15842@jasmine.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f4MdM-0008NH-5H for bug-guix@gnu.org; Fri, 06 Apr 2018 04:22:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f4MdG-0002c1-4b for bug-guix@gnu.org; Fri, 06 Apr 2018 04:22:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60171) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f4MdG-0002bS-1Q for bug-guix@gnu.org; Fri, 06 Apr 2018 04:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f4MdF-0005La-Oh for bug-guix@gnu.org; Fri, 06 Apr 2018 04:22:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20180329200803.GA15842@jasmine.lan> (Leo Famulari's message of "Thu, 29 Mar 2018 16:08:03 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Leo Famulari Cc: 30993@debbugs.gnu.org Hi Leo, Leo Famulari skribis: > Since the update to Shepherd 0.4.0, I've found that OpenSSH's sshd is > killed almost immediately after it starts with signal 15. I confirmed > the issue started with the Shepherd upgrade by bisecting our Git > history. > > I can reproduce the issue from commit > b6beda1d6b9093a8493b5c3cde33ed522242c451 (gnu: Add botan.). > > One interesting tidbit is that the PID file '/var/run/sshd.pid' is not > created anymore. And if I create an empty PID file by hand, it is > removed after trying to start the ssh-daemon service. Also, the sshd > user's home '/var/run/sshd' does not exist, and is similarly removed if > it does exist. Weird. On my laptop /var/run/sshd.pid exists and contains the right PID. /var/run/sshd does not exist, though. When I run the config you posted in =E2=80=98guix system vm=E2=80=99, =E2= =80=98ssh-daemon=E2=80=99 is correctly started and I see a correct ssh.pid and /var/run/sshd exists as well. > I ran the OpenSSH system test `make check-system TESTS=3Dopenssh` and it > failed when it could not find the PID file. It passed on another > non-GuixSD machine. The failing machine is relatively slow and lacks > KVM: a ThinkPad x200s. FWIW on my x86_64 laptop, I=E2=80=99ve run it several times in a row (using =E2=80=9Cguix build /gnu/store/=E2=80=A6-openssh.drv --check=E2=80=9D), and= it always succeeds. > I modified the sshd invocation to print some debug output ('-d -E > /tmp/sshd.log') and this is what it shows: > > ------ > debug1: sshd version OpenSSH_7.6, OpenSSL 1.0.2o 27 Mar 2018 > debug1: private host key #0: ssh-rsa SHA256:REDACTED > debug1: private host key #1: ssh-dss SHA256:REDACTED > debug1: private host key #2: ecdsa-sha2-nistp256 SHA256:REDACTED > debug1: private host key #3: ssh-ed25519 SHA256:REDACTED > debug1: rexec_argv[0]=3D'/gnu/store/az7vib8gk16fybhshh5xpkljmgxyrs4k-open= ssh-7.6p1/sbin/sshd' > debug1: rexec_argv[1]=3D'-D' > debug1: rexec_argv[2]=3D'-d' > debug1: rexec_argv[3]=3D'-E' > debug1: rexec_argv[4]=3D'/tmp/sshd.log' > debug1: rexec_argv[5]=3D'-f' > debug1: rexec_argv[6]=3D'/gnu/store/miy7xg5j4fg3mn04mcl27awmcl6s97ss-sshd= _config' > debug1: Set /proc/self/oom_score_adj from 0 to -1000 > debug1: Bind to port 22 on 0.0.0.0. > Server listening on 0.0.0.0 port 22. > debug1: Bind to port 22 on ::. > Server listening on :: port 22. > Received signal 15; terminating. > ------ Hmm, where could that SIGTERM come from? =E2=80=98make-kill-destructor=E2= =80=99 uses it when a service is stopped, and otherwise it=E2=80=99s sent when we=E2=80=99= re shutting the system down. But here?=E2=80=A6 Thanks, Ludo=E2=80=99.