unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: Artyom Poptsov <poptsov.artyom@gmail.com>, 42740@debbugs.gnu.org
Subject: bug#42740: Segfault in libssh during ‘guix copy’
Date: Tue, 01 Sep 2020 22:57:58 +0200	[thread overview]
Message-ID: <87y2lt6wq1.fsf@gnu.org> (raw)
In-Reply-To: <87eenlzjkn.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 01 Sep 2020 09:56:56 -0400")

Hello!

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:

[...]

>> I’ve pushed this change on our side to explicitly close channels and
>> sessions:
>>
>>   https://git.savannah.gnu.org/cgit/guix.git/commit/?id=61fe9ced7da7eefceb931af0cb7363b721f5bdd6
>>
>> This workaround is similar to that of 2017:
>>
>>   https://git.savannah.gnu.org/cgit/guix.git/commit/?id=8e469b67f95cfe5b95405b503b8ee315fdf8ce66
>>
>> It’s really just a workaround so I think we should fix the core issue in
>> Guile-SSH (or libssh) so it doesn’t pop up again next month—it’s 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’s up to its users to do the right thing.  In that case, the problem
would be in Guile-SSH, since in Guile 2.2/3.0 finalizers can be called
from a separate thread.

It’s also probably easier to fix in Guile-SSH (technically & socially).

>> Anyway, I would welcome tests using ‘guix copy’, ‘guix deploy’, 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 ‘guix’ package again
soonish.

Ludo’.




  reply	other threads:[~2020-09-01 20:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07  9:24 bug#42740: Segfault in libssh during ‘guix copy’ Ludovic Courtès
2020-08-07 18:36 ` Artyom V. Poptsov
2020-08-09  8:48 ` Artyom Poptsov
2020-08-17  3:31   ` Maxim Cournoyer
2020-08-23 16:31     ` Ludovic Courtès
2020-09-15  2:05       ` Maxim Cournoyer
2020-09-15  8:14         ` Ludovic Courtès
2020-09-15 13:48           ` Maxim Cournoyer
2020-08-29 13:31   ` Ludovic Courtès
2020-08-29 14:31     ` Ludovic Courtès
2020-09-01 13:56       ` Maxim Cournoyer
2020-09-01 20:57         ` Ludovic Courtès [this message]
2020-09-02 21:19           ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2lt6wq1.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=42740@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    --cc=poptsov.artyom@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).