branch: main commit 59010a5ba32a5f0802d28900908ee9c75f473a66 Author: Ludovic Courtès <l...@gnu.org> AuthorDate: Fri Aug 23 19:48:42 2024 +0200
remote: ‘send-log’ uses suspendable ‘make-zlib-output-port’. Fixes <https://issues.guix.gnu.org/72722>. Previously, the file descriptor beneath SOCK was passed to zlib’s ‘gzwrite’ C function via ‘make-gzip-output-port’. However, SOCK is O_NONBLOCK and ‘gzwrite’ errors out upon EAGAIN. This would lead ‘send-log’ to fail, then causing EPIPE in ‘build-derivations&’, which in turn would lead the build to be marked as failing. * src/cuirass/remote.scm (send-log): Use ‘make-zlib-output-port’ instead of ‘make-gzip-output-port’. --- src/cuirass/remote.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cuirass/remote.scm b/src/cuirass/remote.scm index 52efbd9..cf918c4 100644 --- a/src/cuirass/remote.scm +++ b/src/cuirass/remote.scm @@ -364,8 +364,11 @@ PRIVATE-KEY to sign narinfos." ;; Note: Don't use 'call-with-gzip-output-port' since it's ;; implemented in terms of 'dynamic-wind' as of Guile-Zlib 0.1.0, - ;; making it unsuitable in a fiberized program. - (let ((compressed (make-gzip-output-port sock))) + ;; making it unsuitable in a fiberized program. Also, do not use + ;; 'make-gzip-output-port' since that passes the O_NONBLOCK file + ;; descriptor to 'gzwrite', which does not know how to deal with + ;; EAGAIN. + (let ((compressed (make-zlib-output-port sock #:format 'gzip))) (catch #t (lambda () (dump-port log compressed)