From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#26976: On Hydra, offload crashes while trying to build linux-libre source Date: Tue, 13 Jun 2017 23:32:06 +0200 Message-ID: <87shj3tvzd.fsf@gnu.org> References: <87h90japz0.fsf@netris.org> <87h90h966f.fsf@gnu.org> <87pof5dnja.fsf@gnu.org> <87mva88oe9.fsf@gnu.org> <87k24q86hk.fsf@gnu.org> 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]:55658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKtQv-0001tc-58 for bug-guix@gnu.org; Tue, 13 Jun 2017 17:33:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKtQs-0007OB-2x for bug-guix@gnu.org; Tue, 13 Jun 2017 17:33:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43627) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dKtQs-0007O4-0F for bug-guix@gnu.org; Tue, 13 Jun 2017 17:33:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87k24q86hk.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 05 Jun 2017 23:33:27 +0200") 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: Mark H Weaver Cc: Artyom Poptsov , 26976@debbugs.gnu.org Hello, ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > AIUI, that means there=E2=80=99s one output compression buffer per sessio= n, and > it=E2=80=99s not thread-safe (in Guile 2.2 finalizers are called from a s= eparate > thread.) > > I think the fix, in Guile-SSH, is to associate each libssh object > (session, channel, etc.) with a mutex, and to protect all uses of the > libssh object by that mutex. I=E2=80=99ve pushed a workaround that seems to work (=E2=80=98guix copy=E2= =80=99 commands that previously segfaulted on hydra.gnu.org no longer do): https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D8e469b67f95cfe5b9= 5405b503b8ee315fdf8ce66 The idea is simply to explicitly close all the channel ports. That way, when their finalizer gets called, it doesn=E2=80=99t invoke libssh code. (guix build offload) and (guix ssh) already explicitly close all the channel ports they open, so I found that the culprit is =E2=80=98node-eval= =E2=80=99 in Guile-SSH. The patch changes =E2=80=98node-eval=E2=80=99 to explicitly clo= se the RREPL channel upon completion. (BTW, performance-wise, it may be best to avoid opening a new channel every time =E2=80=98node-eval=E2=80=99 is calle= d.) That may be good enough for Guix, but of course that=E2=80=99s a workaround= and not a proper fix. I=E2=80=99ll do some more testing and then maybe try switching hydra.gnu.or= g to Guile 2.2 again. Thanks, Ludo=E2=80=99.