Hello, l...@gnu.org (Ludovic Courtès) skribis:
> AIUI, that means there’s one output compression buffer per session, and > it’s not thread-safe (in Guile 2.2 finalizers are called from a separate > 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’ve pushed a workaround that seems to work (‘guix copy’ commands that previously segfaulted on hydra.gnu.org no longer do): https://git.savannah.gnu.org/cgit/guix.git/commit/?id=8e469b67f95cfe5b95405b503b8ee315fdf8ce66 The idea is simply to explicitly close all the channel ports. That way, when their finalizer gets called, it doesn’t 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 ‘node-eval’ in Guile-SSH. The patch changes ‘node-eval’ to explicitly close the RREPL channel upon completion. (BTW, performance-wise, it may be best to avoid opening a new channel every time ‘node-eval’ is called.) That may be good enough for Guix, but of course that’s a workaround and not a proper fix. I’ll do some more testing and then maybe try switching hydra.gnu.org to Guile 2.2 again. Thanks, Ludo’.