all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#52975] [PATCH] gnu: guile-ssh: Update to 0.15.0
@ 2022-01-03 11:06 Artyom V. Poptsov
  2022-01-06 11:37 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Artyom V. Poptsov @ 2022-01-03 11:06 UTC (permalink / raw)
  To: 52975


[-- Attachment #1.1: Type: text/plain, Size: 643 bytes --]

Hello,

this patch updates Guile-SSH[1] to version 0.15.0.

In Guile-SSH 0.15.0 I fixed libguile-ssh library version that I forgot
to bump before the 0.14.0. Now the library version is properly bumped to
"0:14:0" according to libtool rules.

Also I removed a hidden build-time dependency on 'whereis' program from
'util-linux' package.

Note that I haven't properly tested GNU Guix with the new release of
Guile-SSH.

As Guix itself uses Guile-SSH and my update may break something, please
check if it works as expected before merging the update and report any
bugs to me.

- Artyom

References:
1: https://github.com/artyom-poptsov/guile-ssh

[-- Attachment #1.2: 0001-gnu-guile-ssh-Update-to-0.15.0.patch --]
[-- Type: text/x-diff, Size: 11628 bytes --]

From 9417b4755dec780d851cefac858b99438958e7b4 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Wed, 22 Dec 2021 22:03:24 +0300
Subject: [PATCH] gnu: guile-ssh: Update to 0.15.0

* gnu/packages/ssh.scm (guile-ssh): Update to 0.15.0.
  (guile2.0-ssh, guile2.2-ssh): Likewise.
* gnu/packages/patches/guile-ssh-fix-test-suite.patch,
  gnu/packages/patches/guile-ssh-read-error.patch: Remove.
* gnu/local.mk: Update.
---
 gnu/local.mk                                  |   3 +-
 .../patches/guile-ssh-fix-test-suite.patch    | 217 ------------------
 .../patches/guile-ssh-read-error.patch        |  18 --
 gnu/packages/ssh.scm                          |  13 +-
 4 files changed, 6 insertions(+), 245 deletions(-)
 delete mode 100644 gnu/packages/patches/guile-ssh-fix-test-suite.patch
 delete mode 100644 gnu/packages/patches/guile-ssh-read-error.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index d63978f705..77590560b0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -47,6 +47,7 @@
 # Copyright © 2021 Dmitry Polyakov <polyakov@liltechdude.xyz>
 # Copyright © 2021 Andrew Tropin <andrew@trop.in>
 # Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+# Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 #
 # This file is part of GNU Guix.
 #
@@ -1230,8 +1231,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/guile-rsvg-pkgconfig.patch		\
   %D%/packages/patches/guile-emacs-fix-configure.patch		\
   %D%/packages/patches/guile-email-fix-tests.patch		\
-  %D%/packages/patches/guile-ssh-fix-test-suite.patch		\
-  %D%/packages/patches/guile-ssh-read-error.patch		\
   %D%/packages/patches/gtk2-fix-builder-test.patch		\
   %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch	\
   %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
diff --git a/gnu/packages/patches/guile-ssh-fix-test-suite.patch b/gnu/packages/patches/guile-ssh-fix-test-suite.patch
deleted file mode 100644
index dc10e08b0f..0000000000
--- a/gnu/packages/patches/guile-ssh-fix-test-suite.patch
+++ /dev/null
@@ -1,217 +0,0 @@
-From f7942cded8b65341916a555186e2219efe174cd0 Mon Sep 17 00:00:00 2001
-From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
-Date: Thu, 4 Feb 2021 14:38:25 -0500
-Subject: [PATCH] tests: Fix test suite for Guile 3.0.5.
-
-The test-runner object is now reset to #f when calling the 'test-end'
-procedure.  See the commit de5d1a7f99b8e952b115237ebc29633062f99bb9 in
-Guile (srfi-64: Reset test-runner-current if done) which introduced this
-change.
-
-* tests/client-server.scm (exit-status): New variable.  Use it when calling
-exit.
-* tests/dist.scm: Likewise.
-* tests/key.scm: Likewise.
-* tests/log.scm: Likewise.
-* tests/popen.scm: Likewise.
-* tests/server-client.scm: Likewise.
-* tests/server.scm: Likewise.
-* tests/session.scm: Likewise.
-* tests/shell.scm: Likewise.
-* tests/sssh-ssshd.scm: Likewise.
-* tests/tunnel.scm: Likewise.
----
- tests/client-server.scm | 4 +++-
- tests/dist.scm          | 4 +++-
- tests/key.scm           | 3 ++-
- tests/log.scm           | 5 ++++-
- tests/popen.scm         | 4 +++-
- tests/server-client.scm | 4 +++-
- tests/server.scm        | 4 +++-
- tests/session.scm       | 4 +++-
- tests/shell.scm         | 3 ++-
- tests/sssh-ssshd.scm    | 4 +++-
- tests/tunnel.scm        | 4 +++-
- 11 files changed, 32 insertions(+), 11 deletions(-)
-
-diff --git a/tests/client-server.scm b/tests/client-server.scm
-index 432a48c..fc46140 100644
---- a/tests/client-server.scm
-+++ b/tests/client-server.scm
-@@ -743,8 +743,10 @@
- \f
- ;;;
- 
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "client-server")
- 
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
- 
- ;;; client-server.scm ends here.
-diff --git a/tests/dist.scm b/tests/dist.scm
-index 2a3a75f..79f9e23 100644
---- a/tests/dist.scm
-+++ b/tests/dist.scm
-@@ -269,8 +269,10 @@ $4 = #<session #<undefined>@#<undefined>:22 (disconnected) 453fff>"
- ;;;
- 
- \f
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "dist")
- 
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
- 
- ;;; dist.scm ends here.
-diff --git a/tests/key.scm b/tests/key.scm
-index be31378..e1678f4 100644
---- a/tests/key.scm
-+++ b/tests/key.scm
-@@ -170,9 +170,10 @@
-                    (eq? (get-key-type key) 'ecdsa-p256)))))))
- 
- ;;;
-+(define exit-status (test-runner-fail-count (test-runner-current)))
- 
- (test-end "key")
- 
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
- 
- ;;; key.scm ends here.
-diff --git a/tests/log.scm b/tests/log.scm
-index f547202..d528251 100644
---- a/tests/log.scm
-+++ b/tests/log.scm
-@@ -64,8 +64,11 @@
-   (get-log-verbosity))
- 
- \f
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "log")
- 
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
-+
- 
- ;;; log.scm ends here
-diff --git a/tests/popen.scm b/tests/popen.scm
-index e063e0b..fe77108 100644
---- a/tests/popen.scm
-+++ b/tests/popen.scm
-@@ -129,8 +129,10 @@
-           (format-log/scm 'nolog "open-remote-output-pipe"  "channel: ~A" channel)
-           (output-only? channel)))))))
- 
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "popen")
- 
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
- 
- ;;; popen.scm ends here.
-diff --git a/tests/server-client.scm b/tests/server-client.scm
-index 920aa22..b6ed3eb 100644
---- a/tests/server-client.scm
-+++ b/tests/server-client.scm
-@@ -148,8 +148,10 @@
-          (equal? x session))))))
- 
- \f
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "server-client")
- 
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
- 
- ;;; server-client.scm ends here.
-diff --git a/tests/server.scm b/tests/server.scm
-index c7f8b6c..1a6daea 100644
---- a/tests/server.scm
-+++ b/tests/server.scm
-@@ -157,9 +157,11 @@
-     (server-listen server)
-     #t))
- 
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "server")
- 
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
- 
- ;;; server.scm ends here.
- 
-diff --git a/tests/session.scm b/tests/session.scm
-index 8caa039..7310647 100644
---- a/tests/session.scm
-+++ b/tests/session.scm
-@@ -210,8 +210,10 @@
-   (let ((session (%make-session)))
-     (not (connected? session))))
- 
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "session")
- 
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
- 
- ;;; session.scm ends here.
-diff --git a/tests/shell.scm b/tests/shell.scm
-index 7d613fb..e36e661 100644
---- a/tests/shell.scm
-+++ b/tests/shell.scm
-@@ -113,9 +113,10 @@
- 
- \f
- ;;;
-+(define exit-status (test-runner-fail-count (test-runner-current)))
- 
- (test-end "shell")
- 
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
- 
- ;;; shell.scm ends here.
-diff --git a/tests/sssh-ssshd.scm b/tests/sssh-ssshd.scm
-index 2fe23db..edb53fc 100644
---- a/tests/sssh-ssshd.scm
-+++ b/tests/sssh-ssshd.scm
-@@ -118,8 +118,10 @@
-       result)))
- 
- \f
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "sssh-ssshd")
- 
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
- 
- ;;; sssh-ssshd.scm ends here.
-diff --git a/tests/tunnel.scm b/tests/tunnel.scm
-index ef5a568..d6453b7 100644
---- a/tests/tunnel.scm
-+++ b/tests/tunnel.scm
-@@ -191,8 +191,10 @@
-                   (= pnum portnum)))
-            (eq? (channel-cancel-forward session "localhost" portnum) 'ok))))))))
- 
-+(define exit-status (test-runner-fail-count (test-runner-current)))
-+
- (test-end "tunnel")
- 
--(exit (= (test-runner-fail-count (test-runner-current)) 0))
-+(exit (= 0 exit-status))
- 
- ;;; tunnel.scm ends here.
--- 
-2.30.0
-
diff --git a/gnu/packages/patches/guile-ssh-read-error.patch b/gnu/packages/patches/guile-ssh-read-error.patch
deleted file mode 100644
index 9cc6b048a0..0000000000
--- a/gnu/packages/patches/guile-ssh-read-error.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-This patch adjusts to slightly different 'read-error' in Guile 3.0.6
-compared to earlier versions:
-
-  https://github.com/artyom-poptsov/guile-ssh/issues/28
-
---- a/tests/dist.scm
-+++ b/tests/dist.scm
-@@ -183,8 +183,8 @@ Unbound variable: e"
-    rrepl-get-result))
- 
- (test-error-with-log/= "rrepl-get-result, unknown # object error"
--  'node-repl-error "Reader error: scm_lreadr: #<unknown port>:1:3: \
--Unknown # object: (#\\<): scheme@(guile-user)> \
-+  'node-repl-error "Reader error: #f: #<unknown port>:1:3: \
-+Unknown # object: (\"#<\"): scheme@(guile-user)> \
- $4 = #<session #<undefined>@#<undefined>:22 (disconnected) 453fff>"
-   (call-with-input-string
-    (string-append  "scheme@(guile-user)> $4 = "
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index ae64e99948..5d22d8ba1e 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -308,7 +309,7 @@ Additionally, various channel-specific options can be negotiated.")
 (define-public guile-ssh
   (package
     (name "guile-ssh")
-    (version "0.13.1")
+    (version "0.15.0")
     (home-page "https://github.com/artyom-poptsov/guile-ssh")
     (source (origin
               (method git-fetch)
@@ -318,9 +319,7 @@ Additionally, various channel-specific options can be negotiated.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1xpxkvgj7wgcl450djkcrmrf957mcy2f36hfs5g6kpla1gax2d1g"))
-              (patches (search-patches "guile-ssh-fix-test-suite.patch"
-                                       "guile-ssh-read-error.patch"))))
+                "179l6nl25r28w5h2g5qsxc0ppvj2fwk5j57165mjrz5ma91vghbm"))))
     (build-system gnu-build-system)
     (outputs '("out" "debug"))
     (arguments
@@ -385,8 +384,7 @@ libssh library.")
     (inherit guile-ssh)
     (name "guile2.0-ssh")
     (source (origin
-              (inherit (package-source guile-ssh))
-              (patches (search-patches "guile-ssh-fix-test-suite.patch"))))
+              (inherit (package-source guile-ssh))))
     (native-inputs
      (modify-inputs (package-native-inputs guile-ssh)
        (delete "guile")
@@ -400,8 +398,7 @@ libssh library.")
     (inherit guile-ssh)
     (name "guile2.2-ssh")
     (source (origin
-              (inherit (package-source guile-ssh))
-              (patches (search-patches "guile-ssh-fix-test-suite.patch"))))
+              (inherit (package-source guile-ssh))))
     (native-inputs
      (modify-inputs (package-native-inputs guile-ssh)
        (delete "guile")
-- 
2.25.1


[-- Attachment #1.3: Type: text/plain, Size: 207 bytes --]


-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#52975] [PATCH] gnu: guile-ssh: Update to 0.15.0
  2022-01-03 11:06 [bug#52975] [PATCH] gnu: guile-ssh: Update to 0.15.0 Artyom V. Poptsov
@ 2022-01-06 11:37 ` Ludovic Courtès
  2022-01-26 14:44   ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2022-01-06 11:37 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 52975

Hi Artyom,

poptsov.artyom@gmail.com (Artyom V. Poptsov) skribis:

> Note that I haven't properly tested GNU Guix with the new release of
> Guile-SSH.
>
> As Guix itself uses Guile-SSH and my update may break something, please
> check if it works as expected before merging the update and report any
> bugs to me.

I tested it on x86_64-linux and quickly got a segfault:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix offload test
guix offload: testing 3 build machines defined in '/etc/guix/machines.scm'...
guix offload: Guix is usable on 'overdrive1.guix.gnu.org' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
guix offload: Guix is usable on 'localhost' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")

[...]

Backtrace:
In ice-9/boot-9.scm:
    724:2 19 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
    619:8 18 (_ #(#(#<directory (guile-user) 7f439cd99c80>)))
In guix/ui.scm:
   2206:7 17 (run-guix . _)
  2169:10 16 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1752:10 15 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/scripts/offload.scm:
    724:6 14 (check-machine-availability _ _)
In srfi/srfi-1.scm:
   669:15 13 (for-each #<procedure assert-node-can-import (session node name daemon-socket)> (#<session hydra@o…> …) …)
In ice-9/boot-9.scm:
  1752:10 12 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/store.scm:
   658:37 11 (thunk)
In guix/scripts/offload.scm:
    683:6 10 (_ _)
In ice-9/boot-9.scm:
  1752:10  9 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/store.scm:
   658:37  8 (thunk)
In guix/ssh.scm:
    370:2  7 (send-files #<store-connection 256.99 7f4398a324b0> _ #<store-connection 256.99 7f4398a32500> # _ # _)
    219:2  6 (remote-run (begin (use-modules (guix) (srfi srfi-34) (rnrs io ports) (rnrs bytevectors)) (define …) …) …)
In ice-9/read.scm:
   850:12  5 (%read #<input-output: channel (open) 7f4398a599a0> #<procedure 7f4398a49640 at ice-9/read.scm:859:8 …> …)
   118:17  4 (next-non-whitespace)
In unknown file:
           3 (read-char #<input-output: channel (open) 7f4398a599a0>)
In ice-9/boot-9.scm:
  1685:16  2 (raise-exception _ #:continuable? _)
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Adres-eraro(nekropsio elŝutita)
$ gdb ./guile core
GNU gdb (GDB) 10.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./guile...

warning: Can't open file /var/db/nscd/hosts during file-backed mapping note processing

warning: core file may not match specified executable file.
[New LWP 27814]
[New LWP 27818]
[New LWP 27821]
[New LWP 27820]
[New LWP 27819]
[New LWP 27822]
Warning: couldn't activate thread debugging using libthread_db: Cannot find new threads: generic error

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/gnu/store/2fk1gz2s7ppdicynscra9b19byrrr866-glibc-2.33/lib/libthread_db.so.1".
Core was generated by `/home/ludo/src/guix/guile \ /home/ludo/src/guix/scripts/guix offload test'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  scm_ipruk (hdr=0x7f439f4b4132 "immediate", ptr=0x7000700070007, port=0x7f4397cf9c80) at print.c:969
969	print.c: Dosiero aŭ dosierujo ne ekzistas.
[Current thread is 1 (Thread 0x7f439ee26740 (LWP 27814))]
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm
;;; /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm:293:20: warning: possibly unbound variable `program-debug-info-name'
;;; /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm:326:9: warning: possibly unbound variable `find-source-for-addr'
;;; /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm:326:31: warning: possibly unbound variable `program-debug-info-addr'
;;; /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm:327:31: warning: possibly unbound variable `program-debug-info-context'
;;; compiled /home/ludo/.cache/guile/ccache/3.0-LE-8-4.2/gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm.go
;;; compiling /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/share/guile/3.0/system/base/types.scm
;;; compiled /home/ludo/.cache/guile/ccache/3.0-LE-8-4.2/gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/share/guile/3.0/system/base/types.scm.go
(gdb) bt
#0  scm_ipruk (hdr=0x7f439f4b4132 "immediate", ptr=unmatched-scm, 
    port=#<port #<port-type string 7f439cc8bab0> 7f4397cf9c80>) at print.c:969
#1  0x00007f439f46f617 in scm_i_variable_print (exp=#<variable 201b010>, 
    port=#<port #<port-type string 7f439cc8bab0> 7f4397cf9c80>, pstate=0x7f439793d938) at variable.c:46
#2  0x00007f439f4447dc in scm_prin1 (exp=exp@entry=#<variable 201b010>, 
    port=port@entry=#<port #<port-type string 7f439cc8bab0> 7f4397cf9c80>, writingp=writingp@entry=1) at print.c:840
#3  0x00007f439f4456d2 in scm_write (obj=obj@entry=#<variable 201b010>, 
    port=port@entry=#<port #<port-type string 7f439cc8bab0> 7f4397cf9c80>) at print.c:1099
#4  0x00007f439f469b99 in scm_object_to_string (obj=#<variable 201b010>, printer=<optimized out>) at strports.c:249
#5  0x00007f439f476915 in vm_regular_engine (thread=0x7f439eb00d80) at vm-engine.c:972
#6  0x00007f439f479029 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7ffc66910a30, nargs=nargs@entry=4)
    at vm.c:1608
#7  0x00007f439f3f2e54 in scm_call_4 (proc=<optimized out>, 
    arg1=arg1@entry=#<port #<port-type file 7f439cc8bb40> 7f439ccdab40>, arg2=arg2@entry=#<unmatched-tag 12f>, 
    arg3=arg3@entry=wrong-type-arg, 
    arg4=arg4@entry=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>))) at eval.c:517
#8  0x00007f439f3e569f in scm_print_exception (port=port@entry=#<port #<port-type file 7f439cc8bb40> 7f439ccdab40>, 
    frame=frame@entry=#<unmatched-tag 12f>, key=key@entry=wrong-type-arg, 
    args=args@entry=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>))) at backtrace.c:121
#9  0x00007f439f3edd86 in print_exception_and_backtrace (
    args=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>)), tag=wrong-type-arg, port=#<port #<port-type file 7f439cc8bb40> 7f439ccdab40>)
    at continuations.c:415
#10 pre_unwind_handler (error_port=0x7f439ccdab40, tag=wrong-type-arg, 
    args=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>))) at continuations.c:453
#11 0x00007f439f46e80a in catch_pre_unwind_handler (data=0x7ffc669128f0, exn="#<struct &compound-exception>" = {...})
    at throw.c:135
#12 0x00007f439f476915 in vm_regular_engine (thread=0x7f439eb00d80) at vm-engine.c:972
#13 0x00007f439f479029 in scm_call_n (proc=proc@entry=#<program 7f439cd0b620>, argv=<optimized out>, nargs=5)
    at vm.c:1608
#14 0x00007f439f3f3151 in scm_apply_0 (proc=#<program 7f439cd0b620>, args=()) at eval.c:603
#15 0x00007f439f3f3d3d in scm_apply_1 (proc=<optimized out>, arg1=arg1@entry=wrong-type-arg, 
    args=args@entry=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>))) at eval.c:609
#16 0x00007f439f46eca7 in scm_throw (key=key@entry=wrong-type-arg, 
    args=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>))) at throw.c:262
#17 0x00007f439f46edf9 in scm_ithrow (key=key@entry=wrong-type-arg, args=<optimized out>, 
    no_return=no_return@entry=1) at throw.c:457
#18 0x00007f439f3f12e5 in scm_error_scm (key=key@entry=wrong-type-arg, subr=<optimized out>, 
    message=message@entry="Wrong type argument in position ~A (expecting ~A): ~S", 
    args=args@entry=(1 "channel-port" #<variable 201b010>), data=data@entry=(#<variable 201b010>)) at error.c:90
#19 0x00007f439f3f1380 in scm_error (key=wrong-type-arg, subr=subr@entry=0x7f4399385700 "gssh_channel_from_scm", 
    message=message@entry=0x7f439f4afc90 "Wrong type argument in position ~A (expecting ~A): ~S", 
    args=(1 "channel-port" #<variable 201b010>), rest=rest@entry=(#<variable 201b010>)) at error.c:62
#20 0x00007f439f3f1740 in scm_wrong_type_arg_msg (subr=0x7f4399385700 "gssh_channel_from_scm", pos=1, 
    bad_value=#<variable 201b010>, szMessage=<optimized out>) at error.c:282
#21 0x00007f439937fe0f in gssh_channel_from_scm ()
   from /gnu/store/3ckynw84w4lgx5ys9v8pkhdxh6b1cx5n-guile-ssh-0.15.0/lib/libguile-ssh.so
#22 0x00007f439937fe1c in ?? () from /gnu/store/3ckynw84w4lgx5ys9v8pkhdxh6b1cx5n-guile-ssh-0.15.0/lib/libguile-ssh.so
#23 0x00007f43992fae5e in channel_rcv_close (session=0x20d6600, type=<optimized out>, packet=<optimized out>, 
    user=<optimized out>) at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/channels.c:689
#24 0x00007f43993100f1 in ssh_packet_process (session=session@entry=0x20d6600, type=97 'a')
    at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/packet.c:1494
#25 0x00007f4399310897 in ssh_packet_socket_callback (data=data@entry=0x20db2c4, receivedlen=receivedlen@entry=36, 
    user=user@entry=0x20d6600) at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/packet.c:1336
#26 0x00007f4399310d04 in ssh_packet_socket_callback (data=0x20db290, receivedlen=88, user=0x20d6600)
    at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/packet.c:1358
#27 0x00007f439931aaf8 in ssh_socket_pollcallback (p=<optimized out>, fd=<optimized out>, revents=<optimized out>, 
    v_s=0x20d6fb0) at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/socket.c:314
#28 0x00007f4399316e43 in ssh_poll_ctx_dopoll (ctx=ctx@entry=0x20d84f0, timeout=timeout@entry=-1)
    at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/poll.c:702
#29 0x00007f4399317f0c in ssh_handle_packets (session=session@entry=0x20d6600, timeout=timeout@entry=-1)
    at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/session.c:661
#30 0x00007f4399317fdb in ssh_handle_packets_termination (session=session@entry=0x20d6600, timeout=timeout@entry=-1, 
    fct=fct@entry=0x7f43992f8f10 <ssh_channel_read_termination>, user=user@entry=0x7ffc66912040)
    at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/session.c:730
#31 0x00007f43992fc421 in ssh_channel_read_timeout (channel=0x22d49e0, dest=0x7f4398a65d10, count=1, 
    is_stderr=<optimized out>, timeout_ms=<optimized out>)
    at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/channels.c:2931
#32 0x00007f4399380147 in ?? () from /gnu/store/3ckynw84w4lgx5ys9v8pkhdxh6b1cx5n-guile-ssh-0.15.0/lib/libguile-ssh.so
#33 0x00007f439f43d7d2 in scm_i_read_bytes (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
    dst="#<vu8vector>" = {...}, start=start@entry=0, count=1) at ports.c:1566
#34 0x00007f439f4419f7 in scm_fill_input (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
    minimum_size=1, minimum_size@entry=0, cur_out=cur_out@entry=0x7ffc66912170, 
    avail_out=avail_out@entry=0x7ffc66912178) at ports.c:2693
#35 0x00007f439f441d14 in peek_byte_or_eof (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
    buf_out=buf_out@entry=0x7ffc669121c8, cur_out=cur_out@entry=0x7ffc669121d0) at ports.c:1526
#36 0x00007f439f441da5 in maybe_consume_bom (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
    bom=bom@entry=0x7f439f4b8776 <scm_utf8_bom> "", bom_len=bom_len@entry=3) at ports.c:2468
#37 0x00007f439f441b54 in port_clear_stream_start_for_bom_read (io_mode=BOM_IO_TEXT, 
    port=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>) at ports.c:2504
#38 scm_fill_input (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, minimum_size=1, 
    minimum_size@entry=0, cur_out=cur_out@entry=0x7ffc66912270, avail_out=avail_out@entry=0x7ffc66912278)
    at ports.c:2648
#39 0x00007f439f441d14 in peek_byte_or_eof (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
    buf_out=buf_out@entry=0x7ffc669122c8, cur_out=cur_out@entry=0x7ffc669122d0) at ports.c:1526
#40 0x00007f439f441e4c in peek_utf8_codepoint (port=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
    buf_out=buf_out@entry=0x7ffc66912338, cur_out=cur_out@entry=0x7ffc66912330, len_out=len_out@entry=0x7ffc66912328)
    at ports.c:1790
#41 0x00007f439f442594 in peek_codepoint (len=0x7ffc66912328, cur=0x7ffc66912330, buf=0x7ffc66912338, 
    port=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>) at ports.c:1984
#42 scm_getc (port=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>) at ports.c:2001
#43 0x00007f439f4425e8 in scm_read_char (port=<optimized out>) at ports.c:2026
#44 0x00007f439caa5b7b in ?? ()
#45 0x00007f439cb7d724 in ?? ()
#46 0x00007f43993d3320 in ?? ()
#47 0x00000000020e4ed8 in ?? ()
#48 0x00007f439f41cb1c in scm_jit_enter_mcode (thread=thread@entry=0x7f439eb00d80, mcode=0x205b8b8 "\034\232\003")
    at jit.c:6038
#49 0x00007f439f476512 in vm_regular_engine (thread=0x7f439eb00d80) at vm-engine.c:360
#50 0x00007f439f479029 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7ffc66912558, nargs=nargs@entry=1)
    at vm.c:1608
#51 0x00007f439f3f3ea7 in scm_primitive_eval (exp=<optimized out>, 
    exp@entry=((@ (ice-9 control) %) (begin ((@@ (ice-9 command-line) load/lang) "/home/ludo/src/guix/scripts/guix") (main (command-line)) (quit)))) at eval.c:671
#52 0x00007f439f3f3f06 in scm_eval (
    exp=((@ (ice-9 control) %) (begin ((@@ (ice-9 command-line) load/lang) "/home/ludo/src/guix/scripts/guix") (main (command-line)) (quit))), module_or_state=module_or_state@entry="#<struct module>" = {...}) at eval.c:705
#53 0x00007f439f44ee76 in scm_shell (argc=8, argv=0x206aca0) at script.c:357
#54 0x00007f439f40c36d in invoke_main_func (body_data=0x7ffc66912a80) at init.c:313
#55 0x00007f439f3edbea in c_body (d=0x7ffc669129c0) at continuations.c:430
#56 0x00007f439f476915 in vm_regular_engine (thread=0x7f439eb00d80) at vm-engine.c:972
#57 0x00007f439f479029 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7ffc66912780, nargs=nargs@entry=2)
    at vm.c:1608
#58 0x00007f439f3f2dfa in scm_call_2 (proc=<optimized out>, arg1=<optimized out>, arg2=<optimized out>) at eval.c:503
#59 0x00007f439f3f4529 in scm_c_with_exception_handler (type=type@entry=#t, 
    handler=handler@entry=0x7f439f46e750 <catch_post_unwind_handler>, 
    handler_data=handler_data@entry=0x7ffc669128f0, thunk=thunk@entry=0x7f439f46e890 <catch_body>, 
    thunk_data=thunk_data@entry=0x7ffc669128f0) at exceptions.c:170
#60 0x00007f439f46ea8d in scm_c_catch (tag=tag@entry=#t, body=body@entry=0x7f439f3edbe0 <c_body>, 
    body_data=body_data@entry=0x7ffc669129c0, handler=handler@entry=0x7f439f3ede80 <c_handler>, 
    handler_data=handler_data@entry=0x7ffc669129c0, 
    pre_unwind_handler=pre_unwind_handler@entry=0x7f439f3edcd0 <pre_unwind_handler>, 
    pre_unwind_handler_data=0x7f439ccdab40) at throw.c:168
#61 0x00007f439f3ee238 in scm_i_with_continuation_barrier (body=0x7f439f3edbe0 <c_body>, body_data=0x7ffc669129c0, 
    handler=0x7f439f3ede80 <c_handler>, handler_data=0x7ffc669129c0, 
    pre_unwind_handler=0x7f439f3edcd0 <pre_unwind_handler>, pre_unwind_handler_data=0x7f439ccdab40)
    at continuations.c:368
#62 0x00007f439f3ee295 in scm_c_with_continuation_barrier (func=<optimized out>, data=<optimized out>)
    at continuations.c:464
#63 0x00007f439f46d549 in with_guile (base=base@entry=0x7ffc66912a28, data=data@entry=0x7ffc66912a50)
    at threads.c:645
#64 0x00007f439f34a0ba in GC_call_with_stack_base (fn=fn@entry=0x7f439f46d470 <with_guile>, 
    arg=arg@entry=0x7ffc66912a50) at extra/../misc.c:2106
#65 0x00007f439f46d848 in scm_i_with_guile (dynamic_state=<optimized out>, data=data@entry=0x7ffc66912a30, 
    func=func@entry=0x7f439f40c350 <invoke_main_func>) at threads.c:688
#66 scm_with_guile (func=func@entry=0x7f439f40c350 <invoke_main_func>, data=data@entry=0x7ffc66912a80)
    at threads.c:694
#67 0x00007f439f40c4e2 in scm_boot_guile (argc=argc@entry=5, argv=argv@entry=0x7ffc66912bd8, 
    main_func=main_func@entry=0x401290 <inner_main>, closure=closure@entry=0x0) at init.c:296
#68 0x0000000000401191 in main (argc=5, argv=0x7ffc66912bd8) at gnu/packages/aux-files/guile-launcher.c:93
--8<---------------cut here---------------end--------------->8---

The segfault itself might be a Guile bug showing up while printing the
backtrace.  It would seem that the core issue is the SSH channel being
closed unexpected, leading to a wrong-type-arg error in Guile-SSH
(frames 19 to 23).

Does that ring a bell?

Thanks in advance,
Ludo’.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#52975] [PATCH] gnu: guile-ssh: Update to 0.15.0
  2022-01-06 11:37 ` Ludovic Courtès
@ 2022-01-26 14:44   ` Ludovic Courtès
  2022-02-12 16:37     ` Artyom V. Poptsov
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2022-01-26 14:44 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 52975

Hi Artyom,

Did you have a chance to look into it?  Would be nice to make sure Guix
can use the latest and greatest Guile-SSH!

Ludo’.

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

> Hi Artyom,
>
> poptsov.artyom@gmail.com (Artyom V. Poptsov) skribis:
>
>> Note that I haven't properly tested GNU Guix with the new release of
>> Guile-SSH.
>>
>> As Guix itself uses Guile-SSH and my update may break something, please
>> check if it works as expected before merging the update and report any
>> bugs to me.
>
> I tested it on x86_64-linux and quickly got a segfault:
>
> $ ./pre-inst-env guix offload test
> guix offload: testing 3 build machines defined in '/etc/guix/machines.scm'...
> guix offload: Guix is usable on 'overdrive1.guix.gnu.org' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
> guix offload: Guix is usable on 'localhost' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
>
> [...]
>
> Backtrace:
> In ice-9/boot-9.scm:
>     724:2 19 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
> In ice-9/eval.scm:
>     619:8 18 (_ #(#(#<directory (guile-user) 7f439cd99c80>)))
> In guix/ui.scm:
>    2206:7 17 (run-guix . _)
>   2169:10 16 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
>   1752:10 15 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
> In guix/scripts/offload.scm:
>     724:6 14 (check-machine-availability _ _)
> In srfi/srfi-1.scm:
>    669:15 13 (for-each #<procedure assert-node-can-import (session node name daemon-socket)> (#<session hydra@o…> …) …)
> In ice-9/boot-9.scm:
>   1752:10 12 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
> In guix/store.scm:
>    658:37 11 (thunk)
> In guix/scripts/offload.scm:
>     683:6 10 (_ _)
> In ice-9/boot-9.scm:
>   1752:10  9 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
> In guix/store.scm:
>    658:37  8 (thunk)
> In guix/ssh.scm:
>     370:2  7 (send-files #<store-connection 256.99 7f4398a324b0> _ #<store-connection 256.99 7f4398a32500> # _ # _)
>     219:2  6 (remote-run (begin (use-modules (guix) (srfi srfi-34) (rnrs io ports) (rnrs bytevectors)) (define …) …) …)
> In ice-9/read.scm:
>    850:12  5 (%read #<input-output: channel (open) 7f4398a599a0> #<procedure 7f4398a49640 at ice-9/read.scm:859:8 …> …)
>    118:17  4 (next-non-whitespace)
> In unknown file:
>            3 (read-char #<input-output: channel (open) 7f4398a599a0>)
> In ice-9/boot-9.scm:
>   1685:16  2 (raise-exception _ #:continuable? _)
>   1685:16  1 (raise-exception _ #:continuable? _)
>   1685:16  0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> Adres-eraro(nekropsio elŝutita)
> $ gdb ./guile core
> GNU gdb (GDB) 10.2
> Copyright (C) 2021 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Type "show copying" and "show warranty" for details.
> This GDB was configured as "x86_64-unknown-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <https://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
>     <http://www.gnu.org/software/gdb/documentation/>.
>
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from ./guile...
>
> warning: Can't open file /var/db/nscd/hosts during file-backed mapping note processing
>
> warning: core file may not match specified executable file.
> [New LWP 27814]
> [New LWP 27818]
> [New LWP 27821]
> [New LWP 27820]
> [New LWP 27819]
> [New LWP 27822]
> Warning: couldn't activate thread debugging using libthread_db: Cannot find new threads: generic error
>
> warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/gnu/store/2fk1gz2s7ppdicynscra9b19byrrr866-glibc-2.33/lib/libthread_db.so.1".
> Core was generated by `/home/ludo/src/guix/guile \ /home/ludo/src/guix/scripts/guix offload test'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  scm_ipruk (hdr=0x7f439f4b4132 "immediate", ptr=0x7000700070007, port=0x7f4397cf9c80) at print.c:969
> 969	print.c: Dosiero aŭ dosierujo ne ekzistas.
> [Current thread is 1 (Thread 0x7f439ee26740 (LWP 27814))]
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;;       or pass the --no-auto-compile argument to disable.
> ;;; compiling /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm
> ;;; /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm:293:20: warning: possibly unbound variable `program-debug-info-name'
> ;;; /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm:326:9: warning: possibly unbound variable `find-source-for-addr'
> ;;; /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm:326:31: warning: possibly unbound variable `program-debug-info-addr'
> ;;; /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm:327:31: warning: possibly unbound variable `program-debug-info-context'
> ;;; compiled /home/ludo/.cache/guile/ccache/3.0-LE-8-4.2/gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/lib/libguile-3.0.so.1.4.0-gdb.scm.go
> ;;; compiling /gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/share/guile/3.0/system/base/types.scm
> ;;; compiled /home/ludo/.cache/guile/ccache/3.0-LE-8-4.2/gnu/store/3h3jn0745ngd87zp83k5smwhykxvdfgf-guile-3.0.7/share/guile/3.0/system/base/types.scm.go
> (gdb) bt
> #0  scm_ipruk (hdr=0x7f439f4b4132 "immediate", ptr=unmatched-scm, 
>     port=#<port #<port-type string 7f439cc8bab0> 7f4397cf9c80>) at print.c:969
> #1  0x00007f439f46f617 in scm_i_variable_print (exp=#<variable 201b010>, 
>     port=#<port #<port-type string 7f439cc8bab0> 7f4397cf9c80>, pstate=0x7f439793d938) at variable.c:46
> #2  0x00007f439f4447dc in scm_prin1 (exp=exp@entry=#<variable 201b010>, 
>     port=port@entry=#<port #<port-type string 7f439cc8bab0> 7f4397cf9c80>, writingp=writingp@entry=1) at print.c:840
> #3  0x00007f439f4456d2 in scm_write (obj=obj@entry=#<variable 201b010>, 
>     port=port@entry=#<port #<port-type string 7f439cc8bab0> 7f4397cf9c80>) at print.c:1099
> #4  0x00007f439f469b99 in scm_object_to_string (obj=#<variable 201b010>, printer=<optimized out>) at strports.c:249
> #5  0x00007f439f476915 in vm_regular_engine (thread=0x7f439eb00d80) at vm-engine.c:972
> #6  0x00007f439f479029 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7ffc66910a30, nargs=nargs@entry=4)
>     at vm.c:1608
> #7  0x00007f439f3f2e54 in scm_call_4 (proc=<optimized out>, 
>     arg1=arg1@entry=#<port #<port-type file 7f439cc8bb40> 7f439ccdab40>, arg2=arg2@entry=#<unmatched-tag 12f>, 
>     arg3=arg3@entry=wrong-type-arg, 
>     arg4=arg4@entry=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>))) at eval.c:517
> #8  0x00007f439f3e569f in scm_print_exception (port=port@entry=#<port #<port-type file 7f439cc8bb40> 7f439ccdab40>, 
>     frame=frame@entry=#<unmatched-tag 12f>, key=key@entry=wrong-type-arg, 
>     args=args@entry=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>))) at backtrace.c:121
> #9  0x00007f439f3edd86 in print_exception_and_backtrace (
>     args=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>)), tag=wrong-type-arg, port=#<port #<port-type file 7f439cc8bb40> 7f439ccdab40>)
>     at continuations.c:415
> #10 pre_unwind_handler (error_port=0x7f439ccdab40, tag=wrong-type-arg, 
>     args=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>))) at continuations.c:453
> #11 0x00007f439f46e80a in catch_pre_unwind_handler (data=0x7ffc669128f0, exn="#<struct &compound-exception>" = {...})
>     at throw.c:135
> #12 0x00007f439f476915 in vm_regular_engine (thread=0x7f439eb00d80) at vm-engine.c:972
> #13 0x00007f439f479029 in scm_call_n (proc=proc@entry=#<program 7f439cd0b620>, argv=<optimized out>, nargs=5)
>     at vm.c:1608
> #14 0x00007f439f3f3151 in scm_apply_0 (proc=#<program 7f439cd0b620>, args=()) at eval.c:603
> #15 0x00007f439f3f3d3d in scm_apply_1 (proc=<optimized out>, arg1=arg1@entry=wrong-type-arg, 
>     args=args@entry=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>))) at eval.c:609
> #16 0x00007f439f46eca7 in scm_throw (key=key@entry=wrong-type-arg, 
>     args=("gssh_channel_from_scm" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "channel-port" #<variable 201b010>) (#<variable 201b010>))) at throw.c:262
> #17 0x00007f439f46edf9 in scm_ithrow (key=key@entry=wrong-type-arg, args=<optimized out>, 
>     no_return=no_return@entry=1) at throw.c:457
> #18 0x00007f439f3f12e5 in scm_error_scm (key=key@entry=wrong-type-arg, subr=<optimized out>, 
>     message=message@entry="Wrong type argument in position ~A (expecting ~A): ~S", 
>     args=args@entry=(1 "channel-port" #<variable 201b010>), data=data@entry=(#<variable 201b010>)) at error.c:90
> #19 0x00007f439f3f1380 in scm_error (key=wrong-type-arg, subr=subr@entry=0x7f4399385700 "gssh_channel_from_scm", 
>     message=message@entry=0x7f439f4afc90 "Wrong type argument in position ~A (expecting ~A): ~S", 
>     args=(1 "channel-port" #<variable 201b010>), rest=rest@entry=(#<variable 201b010>)) at error.c:62
> #20 0x00007f439f3f1740 in scm_wrong_type_arg_msg (subr=0x7f4399385700 "gssh_channel_from_scm", pos=1, 
>     bad_value=#<variable 201b010>, szMessage=<optimized out>) at error.c:282
> #21 0x00007f439937fe0f in gssh_channel_from_scm ()
>    from /gnu/store/3ckynw84w4lgx5ys9v8pkhdxh6b1cx5n-guile-ssh-0.15.0/lib/libguile-ssh.so
> #22 0x00007f439937fe1c in ?? () from /gnu/store/3ckynw84w4lgx5ys9v8pkhdxh6b1cx5n-guile-ssh-0.15.0/lib/libguile-ssh.so
> #23 0x00007f43992fae5e in channel_rcv_close (session=0x20d6600, type=<optimized out>, packet=<optimized out>, 
>     user=<optimized out>) at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/channels.c:689
> #24 0x00007f43993100f1 in ssh_packet_process (session=session@entry=0x20d6600, type=97 'a')
>     at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/packet.c:1494
> #25 0x00007f4399310897 in ssh_packet_socket_callback (data=data@entry=0x20db2c4, receivedlen=receivedlen@entry=36, 
>     user=user@entry=0x20d6600) at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/packet.c:1336
> #26 0x00007f4399310d04 in ssh_packet_socket_callback (data=0x20db290, receivedlen=88, user=0x20d6600)
>     at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/packet.c:1358
> #27 0x00007f439931aaf8 in ssh_socket_pollcallback (p=<optimized out>, fd=<optimized out>, revents=<optimized out>, 
>     v_s=0x20d6fb0) at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/socket.c:314
> #28 0x00007f4399316e43 in ssh_poll_ctx_dopoll (ctx=ctx@entry=0x20d84f0, timeout=timeout@entry=-1)
>     at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/poll.c:702
> #29 0x00007f4399317f0c in ssh_handle_packets (session=session@entry=0x20d6600, timeout=timeout@entry=-1)
>     at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/session.c:661
> #30 0x00007f4399317fdb in ssh_handle_packets_termination (session=session@entry=0x20d6600, timeout=timeout@entry=-1, 
>     fct=fct@entry=0x7f43992f8f10 <ssh_channel_read_termination>, user=user@entry=0x7ffc66912040)
>     at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/session.c:730
> #31 0x00007f43992fc421 in ssh_channel_read_timeout (channel=0x22d49e0, dest=0x7f4398a65d10, count=1, 
>     is_stderr=<optimized out>, timeout_ms=<optimized out>)
>     at /tmp/guix-build-libssh-0.9.6.drv-0/libssh-0.9.6/src/channels.c:2931
> #32 0x00007f4399380147 in ?? () from /gnu/store/3ckynw84w4lgx5ys9v8pkhdxh6b1cx5n-guile-ssh-0.15.0/lib/libguile-ssh.so
> #33 0x00007f439f43d7d2 in scm_i_read_bytes (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
>     dst="#<vu8vector>" = {...}, start=start@entry=0, count=1) at ports.c:1566
> #34 0x00007f439f4419f7 in scm_fill_input (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
>     minimum_size=1, minimum_size@entry=0, cur_out=cur_out@entry=0x7ffc66912170, 
>     avail_out=avail_out@entry=0x7ffc66912178) at ports.c:2693
> #35 0x00007f439f441d14 in peek_byte_or_eof (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
>     buf_out=buf_out@entry=0x7ffc669121c8, cur_out=cur_out@entry=0x7ffc669121d0) at ports.c:1526
> #36 0x00007f439f441da5 in maybe_consume_bom (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
>     bom=bom@entry=0x7f439f4b8776 <scm_utf8_bom> "", bom_len=bom_len@entry=3) at ports.c:2468
> #37 0x00007f439f441b54 in port_clear_stream_start_for_bom_read (io_mode=BOM_IO_TEXT, 
>     port=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>) at ports.c:2504
> #38 scm_fill_input (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, minimum_size=1, 
>     minimum_size@entry=0, cur_out=cur_out@entry=0x7ffc66912270, avail_out=avail_out@entry=0x7ffc66912278)
>     at ports.c:2648
> #39 0x00007f439f441d14 in peek_byte_or_eof (port=port@entry=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
>     buf_out=buf_out@entry=0x7ffc669122c8, cur_out=cur_out@entry=0x7ffc669122d0) at ports.c:1526
> #40 0x00007f439f441e4c in peek_utf8_codepoint (port=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>, 
>     buf_out=buf_out@entry=0x7ffc66912338, cur_out=cur_out@entry=0x7ffc66912330, len_out=len_out@entry=0x7ffc66912328)
>     at ports.c:1790
> #41 0x00007f439f442594 in peek_codepoint (len=0x7ffc66912328, cur=0x7ffc66912330, buf=0x7ffc66912338, 
>     port=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>) at ports.c:1984
> #42 scm_getc (port=#<port #<port-type channel 7f439cc8b2d0> 7f4398a599a0>) at ports.c:2001
> #43 0x00007f439f4425e8 in scm_read_char (port=<optimized out>) at ports.c:2026
> #44 0x00007f439caa5b7b in ?? ()
> #45 0x00007f439cb7d724 in ?? ()
> #46 0x00007f43993d3320 in ?? ()
> #47 0x00000000020e4ed8 in ?? ()
> #48 0x00007f439f41cb1c in scm_jit_enter_mcode (thread=thread@entry=0x7f439eb00d80, mcode=0x205b8b8 "\034\232\003")
>     at jit.c:6038
> #49 0x00007f439f476512 in vm_regular_engine (thread=0x7f439eb00d80) at vm-engine.c:360
> #50 0x00007f439f479029 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7ffc66912558, nargs=nargs@entry=1)
>     at vm.c:1608
> #51 0x00007f439f3f3ea7 in scm_primitive_eval (exp=<optimized out>, 
>     exp@entry=((@ (ice-9 control) %) (begin ((@@ (ice-9 command-line) load/lang) "/home/ludo/src/guix/scripts/guix") (main (command-line)) (quit)))) at eval.c:671
> #52 0x00007f439f3f3f06 in scm_eval (
>     exp=((@ (ice-9 control) %) (begin ((@@ (ice-9 command-line) load/lang) "/home/ludo/src/guix/scripts/guix") (main (command-line)) (quit))), module_or_state=module_or_state@entry="#<struct module>" = {...}) at eval.c:705
> #53 0x00007f439f44ee76 in scm_shell (argc=8, argv=0x206aca0) at script.c:357
> #54 0x00007f439f40c36d in invoke_main_func (body_data=0x7ffc66912a80) at init.c:313
> #55 0x00007f439f3edbea in c_body (d=0x7ffc669129c0) at continuations.c:430
> #56 0x00007f439f476915 in vm_regular_engine (thread=0x7f439eb00d80) at vm-engine.c:972
> #57 0x00007f439f479029 in scm_call_n (proc=<optimized out>, argv=argv@entry=0x7ffc66912780, nargs=nargs@entry=2)
>     at vm.c:1608
> #58 0x00007f439f3f2dfa in scm_call_2 (proc=<optimized out>, arg1=<optimized out>, arg2=<optimized out>) at eval.c:503
> #59 0x00007f439f3f4529 in scm_c_with_exception_handler (type=type@entry=#t, 
>     handler=handler@entry=0x7f439f46e750 <catch_post_unwind_handler>, 
>     handler_data=handler_data@entry=0x7ffc669128f0, thunk=thunk@entry=0x7f439f46e890 <catch_body>, 
>     thunk_data=thunk_data@entry=0x7ffc669128f0) at exceptions.c:170
> #60 0x00007f439f46ea8d in scm_c_catch (tag=tag@entry=#t, body=body@entry=0x7f439f3edbe0 <c_body>, 
>     body_data=body_data@entry=0x7ffc669129c0, handler=handler@entry=0x7f439f3ede80 <c_handler>, 
>     handler_data=handler_data@entry=0x7ffc669129c0, 
>     pre_unwind_handler=pre_unwind_handler@entry=0x7f439f3edcd0 <pre_unwind_handler>, 
>     pre_unwind_handler_data=0x7f439ccdab40) at throw.c:168
> #61 0x00007f439f3ee238 in scm_i_with_continuation_barrier (body=0x7f439f3edbe0 <c_body>, body_data=0x7ffc669129c0, 
>     handler=0x7f439f3ede80 <c_handler>, handler_data=0x7ffc669129c0, 
>     pre_unwind_handler=0x7f439f3edcd0 <pre_unwind_handler>, pre_unwind_handler_data=0x7f439ccdab40)
>     at continuations.c:368
> #62 0x00007f439f3ee295 in scm_c_with_continuation_barrier (func=<optimized out>, data=<optimized out>)
>     at continuations.c:464
> #63 0x00007f439f46d549 in with_guile (base=base@entry=0x7ffc66912a28, data=data@entry=0x7ffc66912a50)
>     at threads.c:645
> #64 0x00007f439f34a0ba in GC_call_with_stack_base (fn=fn@entry=0x7f439f46d470 <with_guile>, 
>     arg=arg@entry=0x7ffc66912a50) at extra/../misc.c:2106
> #65 0x00007f439f46d848 in scm_i_with_guile (dynamic_state=<optimized out>, data=data@entry=0x7ffc66912a30, 
>     func=func@entry=0x7f439f40c350 <invoke_main_func>) at threads.c:688
> #66 scm_with_guile (func=func@entry=0x7f439f40c350 <invoke_main_func>, data=data@entry=0x7ffc66912a80)
>     at threads.c:694
> #67 0x00007f439f40c4e2 in scm_boot_guile (argc=argc@entry=5, argv=argv@entry=0x7ffc66912bd8, 
>     main_func=main_func@entry=0x401290 <inner_main>, closure=closure@entry=0x0) at init.c:296
> #68 0x0000000000401191 in main (argc=5, argv=0x7ffc66912bd8) at gnu/packages/aux-files/guile-launcher.c:93
>
> The segfault itself might be a Guile bug showing up while printing the
> backtrace.  It would seem that the core issue is the SSH channel being
> closed unexpected, leading to a wrong-type-arg error in Guile-SSH
> (frames 19 to 23).
>
> Does that ring a bell?
>
> Thanks in advance,
> Ludo’.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#52975] [PATCH] gnu: guile-ssh: Update to 0.15.0
  2022-01-26 14:44   ` Ludovic Courtès
@ 2022-02-12 16:37     ` Artyom V. Poptsov
  2022-02-28 10:45       ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Artyom V. Poptsov @ 2022-02-12 16:37 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 52975

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

Hello Ludovic,

sorry for being slow to respond.

It seems that I fixed the error.

--8<---------------cut here---------------start------------->8---
$ cd guix
$ guix shell -D guix
$ ./pre-inst-env guix package --no-offload -f ../../projects/guile-ssh/guix.scm
$ ./pre-inst-env guix offload test
[...]
guix offload: successfully imported '/gnu/store/bf73m6ns9d2v6m4173y0ls5jz9fcxfhv-import-test' [...]
--8<---------------cut here---------------end--------------->8---

Please check this branch:
  https://github.com/artyom-poptsov/guile-ssh/tree/fix-segfault-on-remote-close

and let me know if it works for you.

Thanks,

- Artyom

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#52975] [PATCH] gnu: guile-ssh: Update to 0.15.0
  2022-02-12 16:37     ` Artyom V. Poptsov
@ 2022-02-28 10:45       ` Ludovic Courtès
  2022-02-28 20:00         ` Artyom V. Poptsov
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2022-02-28 10:45 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 52975

Hi Artyom,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> skribis:

> It seems that I fixed the error.
>
> $ cd guix
> $ guix shell -D guix
> $ ./pre-inst-env guix package --no-offload -f ../../projects/guile-ssh/guix.scm
> $ ./pre-inst-env guix offload test
> [...]
> guix offload: successfully imported '/gnu/store/bf73m6ns9d2v6m4173y0ls5jz9fcxfhv-import-test' [...]
>
> Please check this branch:
>   https://github.com/artyom-poptsov/guile-ssh/tree/fix-segfault-on-remote-close
>
> and let me know if it works for you.

It does!  I tested a few things manually and everything is working as
expected AFAICS (I built Guix with ‘guix build guix
--with-branch=guile-ssh=fix-segfault-on-remote-close’ and then used
‘guix offload test’ and ‘guix copy’ from there.)

Let me know when the new release is out and we can upgrade at that
point.

Thank you!

Ludo’.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#52975] [PATCH] gnu: guile-ssh: Update to 0.15.0
  2022-02-28 10:45       ` Ludovic Courtès
@ 2022-02-28 20:00         ` Artyom V. Poptsov
  2022-03-01 17:27           ` bug#52975: " Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Artyom V. Poptsov @ 2022-02-28 20:00 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 52975

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

Hello!

I released Guile-SSH 0.15.1:
  https://lists.gnu.org/archive/html/guile-user/2022-02/msg00169.html

- Artyom

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#52975: [PATCH] gnu: guile-ssh: Update to 0.15.0
  2022-02-28 20:00         ` Artyom V. Poptsov
@ 2022-03-01 17:27           ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2022-03-01 17:27 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 52975-done

Hi Artyom,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> skribis:

> I released Guile-SSH 0.15.1:
>   https://lists.gnu.org/archive/html/guile-user/2022-02/msg00169.html

Awesome.  I pushed an update earlier today, similar to what you had
proposed:

  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=eabc6af9b8b14bd629544e54bc9c9afa2d0dcd85

I confirmed that it builds on the main architectures with:

  guix build guile-ssh -s x86_64-linux -s i686-linux \
    -s armhf-linux -s aarch64-linux

Thank you!

Ludo’.




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-03-01 17:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-03 11:06 [bug#52975] [PATCH] gnu: guile-ssh: Update to 0.15.0 Artyom V. Poptsov
2022-01-06 11:37 ` Ludovic Courtès
2022-01-26 14:44   ` Ludovic Courtès
2022-02-12 16:37     ` Artyom V. Poptsov
2022-02-28 10:45       ` Ludovic Courtès
2022-02-28 20:00         ` Artyom V. Poptsov
2022-03-01 17:27           ` bug#52975: " Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.