From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id v3yJDxqVsmDaNAEAgWs5BA (envelope-from ) for ; Sat, 29 May 2021 21:25:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0EM3ChqVsmCjFgAAB5/wlQ (envelope-from ) for ; Sat, 29 May 2021 19:25:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4E3D51DF19 for ; Sat, 29 May 2021 21:25:13 +0200 (CEST) Received: from localhost ([::1]:38450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln4a6-0006qI-2e for larch@yhetil.org; Sat, 29 May 2021 15:25:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln4Zy-0006q9-UK for bug-guix@gnu.org; Sat, 29 May 2021 15:25:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46187) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ln4Zy-0007GH-Lv for bug-guix@gnu.org; Sat, 29 May 2021 15:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ln4Zy-0007ET-HI for bug-guix@gnu.org; Sat, 29 May 2021 15:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41625: [PATCH v2] offload: Handle a possible EOF response from read-repl-response. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 May 2021 19:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41625 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Received: via spool by 41625-submit@debbugs.gnu.org id=B41625.162231628627773 (code B ref 41625); Sat, 29 May 2021 19:25:02 +0000 Received: (at 41625) by debbugs.gnu.org; 29 May 2021 19:24:46 +0000 Received: from localhost ([127.0.0.1]:57733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln4Zh-0007Dt-Oh for submit@debbugs.gnu.org; Sat, 29 May 2021 15:24:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln4Zf-0007De-Dq for 41625@debbugs.gnu.org; Sat, 29 May 2021 15:24:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51454) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln4Za-0006zq-8C; Sat, 29 May 2021 15:24:38 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41074 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln4ZZ-0000Xs-UR; Sat, 29 May 2021 15:24:38 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87mtsky9um.fsf@gmail.com> <20210525155003.27590-1-maxim.cournoyer@gmail.com> <875yz61rvt.fsf@gnu.org> <87mtsikwsm.fsf_-_@gmail.com> <87fsy9x3ev.fsf@gnu.org> <87mtsgjdoz.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 Prairial an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 29 May 2021 21:24:36 +0200 In-Reply-To: <87mtsgjdoz.fsf@gmail.com> (Maxim Cournoyer's message of "Thu, 27 May 2021 13:20:44 -0400") Message-ID: <87tuml5onf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 41625@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622316313; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=bHMk8HpPSdaqJPvL7Jj4eXXPRpR9nAmEP/0d6VnY4xQ=; b=MQ0m+GlMwqDoN1M9GMwTJdutSRTfliIziQ81pYkvtyn5ylWMolQjsNXUJu/SriO6Es9u6d npPct41NGaUmyBwYMxmLyPEA/FLENxggO5Bwb1cFT7yKbyEHkx4WUO+VITVywDQNKJAKl4 mJ+rq1CS6Zd8vXYB6uM11t7b7Is65yrTVE0Hr9d+plkO1tYQkKzYBQlYRrJiAO1XkHRlWg Awji7ViRpQAoccJKxJY8XmqcMg6fT/2jjV2xTeVxYdQ7x+KJ5dcx4cvxFASo4oh79PL5vi CWQ/FfUV2RupRACay7KEePovCVH83NT3f7Y/XJcoFh+1k80M5bDxieY/5TTAhg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622316314; a=rsa-sha256; cv=none; b=XY6R3+1kYjIbWjHbzCNw4JiX0Fg7FsDZD/CgoBXmxvyMIR4O3oK0t9COneYMx/moSa/d1V WFSF5RKflHvkJ2K6ulJTneTHKMCdSZk+fmD2TXQJJZVH67b2eFPnVwX8tqXM1WmPKLLkyS O4+oau7f/90Zsy59f8ic8kozU+jvQhSGbso0RSVqJvCIbqRAacqx2faNt+hgEyW4UEqqWB LlAn9BrcHfWo/EAePhKXedg9p80SZPJ7z+iSttAR22Yi+s2kISbs/O9QpktP0NtBkFaTmF cfMBtwtzuiBkgNKJ23rK954Lm0rY0Rt7Ke8djyZw8N4H5RuvcKaWuiMsZt40XA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.93 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 4E3D51DF19 X-Spam-Score: -2.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8Puod1y8h8xq Hi Maxim, Maxim Cournoyer skribis: > My previous strace output didn't follow the 'clone' syscall; the one > attached does. It's compressed with lzip. --8<---------------cut here---------------start------------->8--- 11457 sendto(3, "<86>May 27 19:03:45 sshd[11457]: pam_unix(sshd:session): s= ession opened for user maxim by (uid=3D0)", 97, MSG_NOSIGNAL, NULL, 0) =3D = 97 11457 socketpair(AF_UNIX, SOCK_STREAM, 0, [5, 7]) =3D 0 11457 fcntl(5, F_SETFD, FD_CLOEXEC) =3D 0 11457 fcntl(7, F_SETFD, FD_CLOEXEC) =3D 0 11457 clone(child_stack=3DNULL, flags=3DCLONE_CHILD_CLEARTID|CLONE_CHILD_SE= TTID|SIGCHLD 11459 set_robust_list(0xffff9d2e10f0, 24 11457 <... clone resumed>, child_tidptr=3D0xffff9d2e10e0) =3D 11459 [=E2=80=A6] 11459 clone(child_stack=3DNULL, flags=3DCLONE_CHILD_CLEARTID|CLONE_CHILD_SE= TTID|SIGCHLD 11460 set_robust_list(0xffff9d2e10f0, 24 11459 <... clone resumed>, child_tidptr=3D0xffff9d2e10e0) =3D 11460 [=E2=80=A6] 11460 execve("/gnu/store/6b5gnpnbi73l0pasan0fip4w3f1afizi-bash-5.0.16/bin/b= ash", ["bash", "-c", "guix repl -t machine"], 0xaaaacfb78470 /* 16 vars */)= =3D 0 [=E2=80=A6] 11460 <... read resumed>"(use-modules (gnu))\n", 4096) =3D 20 [=E2=80=A6] 11459 read(4, "", 16384) =3D 0 11459 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) =3D 0 11459 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) =3D 0 11459 close(11) =3D 0 11459 close(10) =3D 0 11459 close(13) =3D 0 11459 close(4) =3D 0 11459 brk(0xaaaacfba7000) =3D 0xaaaacfba7000 11459 write(5, "\0\0\0\0012", 5) =3D 5 11457 <... ppoll resumed>) =3D 1 ([{fd=3D7, revents=3DPOLLIN}]) 11459 exit_group(0 [=E2=80=A6] 11457 sendto(3, "<86>May 27 19:04:08 sshd[11457]: pam_unix(sshd:session): s= ession closed for user maxim", 86, MSG_NOSIGNAL, NULL, 0) =3D 86 [=E2=80=A6] 11460 openat(AT_FDCWD, "/gnu/store/83vzpl9pl5v86ncb8jy2gbfgsac0amjv-guix-mo= dule-union/lib/guile/3.0/site-ccache/gnu/packages/mtools.go", O_RDONLY|O_CL= OEXEC) =3D 14 11460 lseek(14, 0, SEEK_END) =3D 72707 11460 mmap(NULL, 72707, PROT_READ, MAP_PRIVATE, 14, 0) =3D 0xffff90194000 11460 close(14) =3D 0 11460 mprotect(0xffff901a4000, 3432, PROT_READ|PROT_WRITE) =3D 0 11460 newfstatat(AT_FDCWD, "/gnu/store/83vzpl9pl5v86ncb8jy2gbfgsac0amjv-gui= x-module-union/share/guile/site/3.0/gnu/packages/patches/u-boot-rockchip-in= no-usb.patch", {st_mode=3DS_IFREG|0444, st_size=3D10450, ...}, 0) =3D 0 11460 write(1, "(values (non-self-quoting 2052 \"#\"))\n", 50)= =3D -1 EPIPE (Broken pipe) 11460 --- SIGPIPE {si_signo=3DSIGPIPE, si_code=3DSI_USER, si_pid=3D11460, s= i_uid=3D30013} --- --8<---------------cut here---------------end--------------->8--- (=E2=80=98guix repl=E2=80=99 is PID 11460.) It looks like the SSH session gets closed while =E2=80=98guix repl=E2=80=99= is still running, and thus the client never sees the reply from =E2=80=98guix repl= =E2=80=99 (=E2=80=98guix repl=E2=80=99 itself eventually gets EPIPE because its paren= t process terminated and there=E2=80=99s no one listening to it.) So the bug may be on the client side, in =E2=80=98guix offload=E2=80=99, wh= ich for some reason drops the session too early. Can you enable libssh debugging there, reproduce the problem, and share the libssh debug info from that run? Do enable libssh debugging, you can drop something like this in (guix scripts offload) for instance: (use-modules (ssh log)) (set-log-verbosity! 'protocol) The available logging levels, from Guile-SSH=E2=80=99s log.c, are: --8<---------------cut here---------------start------------->8--- struct symbol_mapping log_verbosity[] =3D { /* 0, No logging at all */ { "nolog", SSH_LOG_NOLOG }, /* 1, Only rare and noteworthy events */ { "rare", SSH_LOG_RARE }, /* 2, High level protocol information */ { "protocol", SSH_LOG_PROTOCOL }, /* 3, Lower level protocol infomations, packet level */ { "packet", SSH_LOG_PACKET }, /* 4, Every function path */ { "functions", SSH_LOG_FUNCTIONS }, { NULL, -1 } }; --8<---------------cut here---------------end--------------->8--- HTH! Ludo=E2=80=99.