[email protected] (Ludovic Courtès) skribis:

> On the build farms, memory usage of the ‘guix publish’ process increases
> slowly but indefinitely, it seems.

This program reproduced the problem:

--8<---------------cut here---------------start------------->8---
(use-modules (guix zlib)
             (ice-9 format)
             (rnrs io ports))

(define (display-heap-size)
  (format #t "heap size: ~,2h MiB~%"
          (/ (assoc-ref (gc-stats) 'heap-size) (expt 2. 20))))

(let loop ((i 0))
  (when (zero? (modulo i 1000))
    (display-heap-size))
  (let ((port (open-file "/dev/null" "w0")))
    (call-with-gzip-output-port port
      (lambda (port)
        (display (make-string 1000 #\a) port))))
  (loop (+ 1 i)))
--8<---------------cut here---------------end--------------->8---

This is fixed in 85a2b58987bc32e33e63bea86c1a94496b796ae9.

Ludo’.



Reply via email to