diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-06-13 23:20:25 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-06-13 23:22:19 +0200 |
commit | 8e469b67f95cfe5b95405b503b8ee315fdf8ce66 (patch) | |
tree | 851fef8a3231b0dec9cbb40a8e8e7b7876764cfb /gnu/packages/patches | |
parent | 4e863eb35fd8337eab48928e7733b7f6b7b2c242 (diff) | |
download | guix-8e469b67f95cfe5b95405b503b8ee315fdf8ce66.tar guix-8e469b67f95cfe5b95405b503b8ee315fdf8ce66.tar.gz |
gnu: guile-ssh: Close RREPL channel ports before they are finalized.
Partly fixes <https://bugs.gnu.org/26976>.
* gnu/packages/patches/guile-ssh-channel-finalization.patch: New file.
* gnu/packages/ssh.scm (guile-ssh)[source](patches): Use it.
* gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/guile-ssh-channel-finalization.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/patches/guile-ssh-channel-finalization.patch b/gnu/packages/patches/guile-ssh-channel-finalization.patch new file mode 100644 index 0000000000..54b5055a20 --- /dev/null +++ b/gnu/packages/patches/guile-ssh-channel-finalization.patch @@ -0,0 +1,28 @@ +Avoid asynchronous channel finalization, which could lead to segfaults due to +libssh not being thread-safe: <https://bugs.gnu.org/26976>. + +--- guile-ssh-0.11.0/modules/ssh/dist/node.scm 2017-06-13 14:37:44.861671297 +0200 ++++ guile-ssh-0.11.0/modules/ssh/dist/node.scm 2017-06-13 14:38:02.841580565 +0200 +@@ -391,11 +391,18 @@ listens on an expected port, return #f o + "Evaluate QUOTED-EXP on the node and return the evaluated result." + (let ((repl-channel (node-open-rrepl node))) + (rrepl-skip-to-prompt repl-channel) +- (call-with-values (lambda () (rrepl-eval repl-channel quoted-exp)) +- (lambda vals +- (and (node-stop-repl-server? node) ++ (dynamic-wind ++ (const #t) ++ (lambda () ++ (rrepl-eval repl-channel quoted-exp)) ++ (lambda () ++ (when (node-stop-repl-server? node) + (node-stop-server node)) +- (apply values vals))))) ++ ++ ;; Close REPL-CHANNEL right away to prevent finalization from ++ ;; happening in another thread at the wrong time (see ++ ;; <https://bugs.gnu.org/26976>.) ++ (close-port repl-channel))))) + + (define (node-eval-1 node quoted-exp) + "Evaluate QUOTED-EXP on the node and return the evaluated result. The |