From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IJEOIiC2Tl9kVAAA0tVLHw (envelope-from ) for ; Tue, 01 Sep 2020 20:59:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id IBHoHSC2Tl8faQAA1q6Kng (envelope-from ) for ; Tue, 01 Sep 2020 20:59:12 +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 076859403CB for ; Tue, 1 Sep 2020 20:59:11 +0000 (UTC) Received: from localhost ([::1]:54522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDDMz-0004Vr-Am for larch@yhetil.org; Tue, 01 Sep 2020 16:59:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDDMs-0004VW-22 for bug-guix@gnu.org; Tue, 01 Sep 2020 16:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45970) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDDMr-0008TX-Q2 for bug-guix@gnu.org; Tue, 01 Sep 2020 16:59:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kDDMr-00038C-PD; Tue, 01 Sep 2020 16:59:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42740: Segfault in libssh during =?UTF-8?Q?=E2=80=98guix_?= =?UTF-8?Q?copy=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 01 Sep 2020 20:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42740 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Received: via spool by 42740-submit@debbugs.gnu.org id=B42740.159899388811977 (code B ref 42740); Tue, 01 Sep 2020 20:59:01 +0000 Received: (at 42740) by debbugs.gnu.org; 1 Sep 2020 20:58:08 +0000 Received: from localhost ([127.0.0.1]:57516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDDM0-000377-Dt for submit@debbugs.gnu.org; Tue, 01 Sep 2020 16:58:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDDLz-00036u-4m for 42740@debbugs.gnu.org; Tue, 01 Sep 2020 16:58:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59003) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDDLt-0008PC-Pz; Tue, 01 Sep 2020 16:58:01 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=51622 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kDDLs-00030c-QV; Tue, 01 Sep 2020 16:58:01 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <871rkin6zi.fsf@inria.fr> <874kollgst.fsf@gnu.org> <87h7sljzgn.fsf@gnu.org> <87eenlzjkn.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Fructidor an 228 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: Tue, 01 Sep 2020 22:57:58 +0200 In-Reply-To: <87eenlzjkn.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 01 Sep 2020 09:56:56 -0400") Message-ID: <87y2lt6wq1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Artyom Poptsov , 42740@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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-Spam-Score: -1.01 X-TUID: 6mvh1SWKUNMH Hello! Maxim Cournoyer skribis: > Ludovic Court=C3=A8s writes: [...] >> I=E2=80=99ve pushed this change on our side to explicitly close channels= and >> sessions: >> >> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D61fe9ced7da7ee= fceb931af0cb7363b721f5bdd6 >> >> This workaround is similar to that of 2017: >> >> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D8e469b67f95cfe= 5b95405b503b8ee315fdf8ce66 >> >> It=E2=80=99s really just a workaround so I think we should fix the core = issue in >> Guile-SSH (or libssh) so it doesn=E2=80=99t pop up again next month=E2= =80=94it=E2=80=99s hard to >> ensure code that opens a channel explicitly closes it. > > Do you think the issue lies in guile-ssh or in libssh itself? Sorry for > not having caught these problems earlier; it seemed to work reliably > when I last tested it. No worries; these issues are non-deterministic and we can spend months without noticing. Perhaps libssh is documented as not being thread-safe, in which case it=E2=80=99s up to its users to do the right thing. In that case, the prob= lem would be in Guile-SSH, since in Guile 2.2/3.0 finalizers can be called from a separate thread. It=E2=80=99s also probably easier to fix in Guile-SSH (technically & social= ly). >> Anyway, I would welcome tests using =E2=80=98guix copy=E2=80=99, =E2=80= =98guix deploy=E2=80=99, and >> offloading. (For offloading, make sure to run the daemon from your >> build tree.) > > While attempting to use offload on the core-updates branch, I > encountered stalls and file errors, but with your patch it seems to work > reliable (it's been offloading builds for the last 15 minutes or so > without interruption). > > So your workaround fixes seem to work as intended. Good, thanks for testing. We should update the =E2=80=98guix=E2=80=99 pack= age again soonish. Ludo=E2=80=99.