--- Begin Message ---
Subject: |
'guix publish' leaks memory |
Date: |
Wed, 11 Oct 2017 13:45:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
On the build farms, memory usage of the ‘guix publish’ process increases
slowly but indefinitely, it seems.
This can be reproduced by starting ‘guix publish --cache /tmp/cache -C’
and launching ‘guix weather’, which queries many narinfos, thereby
triggering the compression of many store items to /tmp/cache.
Ludo’.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#28784: 'guix publish' leaks memory |
Date: |
Wed, 11 Oct 2017 15:22:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
address@hidden (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’.
--- End Message ---