bug#58631: [Shepherd] Indefinite heap growth (memory leak)

2022-10-29 Thread Ludovic Courtès
The attached Fibers program illustrates the problem: heap grows even
though it’s not supposed to.

Ludo’.

;; https://issues.guix.gnu.org/58631

(use-modules (fibers)
 (fibers channels)
 (ice-9 rdelim)
 (statprof))

(run-fibers
 (lambda ()
   (define channel
 (make-channel))
   (define leave-channel
 (make-channel))

   (spawn-fiber
(lambda ()
  (sleep 10)
  (put-message leave-channel 'leave)))
   (spawn-fiber
(lambda ()
  (let loop ()
(put-message channel 'hi!)
(get-message channel)
(loop
   (spawn-fiber
(lambda ()
  (let loop ()
(get-message channel)
(put-message channel 'hey!)
(loop
   (spawn-fiber
(lambda ()
  (let loop ()
(pk 'heap-size (assoc-ref (gc-stats) 'heap-size))
(sleep 2)
(loop
   (get-message leave-channel))
 ;; #:drain? #t
 #:parallelism 1  ;don't create POSIX threads
 #:hz 0)


bug#58858: Installation script fails on distributions that use busybox

2022-10-29 Thread conses
Hi,

Following the instructions in the manual, I attempted to install the
package manager in Alpine Linux via the official installation
script. However, after completing the first prompts I got the error
"mktemp: (null): Invalid argument". Upon closer inspection of the script
and busybox's `mktemp' help page, which states the following:

TEMPLATE must end with XX (e.g. [/dir/]nameXX)

It's clear that the script should be modified to account for this with
at least 6 "X" characters in the template, and this wouldn't pose a
problem with GNU's `mktemp' because it takes "at least" 3 of them.

-- 
Best regards,
conses





bug#47949: Failed to produce output path for guix-package-cache

2022-10-29 Thread Maxime Devos



On 28-10-2022 22:23, Vagrant Cascadian wrote:

[...]

Maybe that's a clue pointing to the crufty .cache directories?


Well, after removing ~/.cache/guix/checkouts/ I haven't had the problem
again, with several successful pulls.

This suggests to me that guix should make sure to not use a dirty
checkout to prevent this in the future ... either exporting the guix
tree it's working with to a temporary location, or something like
running "git clean -dfx" before using the checkout...



A (similar) problem was reported previously but I couldn't find it 
anymore.  A proposed solution was to use temporary git worktrees ("git 
clean -dfx" wouldn't be sufficient in context of concurrent "guix 
time-machine").


Greetings,
Maxime.


OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


bug#58631: [Shepherd] Indefinite heap growth (memory leak)

2022-10-29 Thread Maxime Devos



On 29-10-2022 12:01, Ludovic Courtès wrote:

The attached Fibers program illustrates the problem: heap grows even
though it’s not supposed to.


If I add (gc) before the (pk 'heap-size ...), I can't reproduce:

;;; (heap-size 12742656)

;;; (heap-size 12808192)

;;; (heap-size 12808192)

;;; (heap-size 12808192)

;;; (heap-size 12808192)

(another run)

;;; (heap-size 4976640)

;;; (heap-size 882)

;;; (heap-size 12029952)

;;; (heap-size 12029952)

;;; (heap-size 12029952)

However, if I increase the number of seconds waited, I can eventually 
reproduce some heap growth:


;;; (heap-size 12742656)

;;; (heap-size 12742656)

;;; (heap-size 12808192)

;;; (heap-size 12808192)

;;; (heap-size 12808192)

;;; (heap-size 12808192)

;;; (heap-size 12808192)

;;; (heap-size 12808192)

;;; (heap-size 12808192)

;;; (heap-size 12808192)

;;; (heap-size 12808192)
;; <--- here's the jump
;;; (heap-size 23359488)

;;; (heap-size 23359488)

;;; (heap-size 23359488)

;;; (heap-size 23359488)

;;; (heap-size 23359488)

;;; (heap-size 23359488)

;;; (heap-size 23359488)

;;; (heap-size 23359488)

;;; (heap-size 23359488)

(This is in a "guix shell guile guile-fibers" environment)

Greetings,
Maxime.


OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


bug#58859: profile contents depends on package order

2022-10-29 Thread Maxime Devos
Looks sort-of but not quite a duplicate of 
 (‘guix shell’ skips profile 
collisions checks) to me.


Greetings,
Maxime.


OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


bug#35875: Guix won't boot after installation with fully encrypted disk

2022-10-29 Thread david larsson

Hi,
Im having this exact same issue: I can enter the password once to unlock 
the disk, then after selecting the grub entry I am stuck at the Guix 
grub screen.


I have used terminal based "manual" install, graphical guided install 
for full disk - all on one partition - and graphical guided install with 
manually created separate /boot partition.


Only non-encrypted disk works to boot install. Also, btrfs fails, ext4 
works.


This is using the current 1.3 installer image.

The reason I attempted this installation is because my 
full-disk-encryption installation that's a couple years old or so failed 
to boot upon reboot, and I did not have any previous generation that I 
could select from the grub menu that would boot either - i.e. my Guix 
system broke.


I'm considering using an old 1.2 installer image, but Im not sure 
whether I should just wait for a 1.4 release, or if there are other 
suggestions?


And, I can't ping or ssh to the machine, after Im stuck at the Guix grub 
boot screen.


If this is just me and Reg - it's weird. I mean I suppose the full disk 
encryption option has been tested by someone before releasing the 
installer?


What should I try next?

Best regards,
David





bug#58859: profile contents depends on package order

2022-10-29 Thread Attila Lendvai
this is also somewhat related to:

https://issues.guix.gnu.org/50878

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“In your journey to healing, you will learn to appreciate the many faceted 
qualities of others. Your early impressions will grow more accurate and you 
will use your trust more wisely. As your boundaries become more clearly 
defined, you will detect more quickly when others violate them. When the wounds 
are healed, the sharks will no longer circle.”
— Richard Moskovitz, 'Lost in the Mirror'






bug#58878: build log filter broken by odd characters in build output

2022-10-29 Thread Ricardo Wurmus
Here I am, minding my own business, building GHC 6.10.4 with GHC 6.6 and
I see this in the build output:

--8<---cut here---start->8---
/gnu/store/km47738v7q4qgym9zkggngqxr05q165h-ghc-6.6/bin/ghc -#include cutils.h 
-DSTAGE=1 -package-name ghc-6.10.4 -hide-all-packages -no-user-package-conf 
-package-conf 
/tmp/guix-build-ghc-6.10.4.drv-0/ghc-6.10.4/libraries/bootstrapping.conf -i 
-idist-stage1/build -inativeGen -ibasicTypes -icmm -icodeGen -icoreSyn 
-icprAnalysis -ideSugar -ighci -ihsSyn -iiface -imain -iparser -iprelude 
-iprofiling -irename -isimplCore -isimplStg -ispecialise -istgSyn -istranal 
-itypecheck -itypes -iutils -ivectorise -idist-stage1/build/autogen 
-Idist-stage1/build/autogen -Idist-stage1/build -Istage1 
-I../libraries/base/cbits -I../libraries/base/include -I. -Iparser -Iutils 
-optP-include -optPdist-stage1/build/autogen/cabal_macros.h -odir 
dist-stage1/build -hidir dist-stage1/build -package Cabal-1.6.0.3 -package 
base-2.0 -package extensible-exceptions-0.1.1.0 -package filepath-1.1.0.2 
-package haskell98-1.0 -package hpc-0.5.0.3 -package unix-1.0 -O -Wall 
-fno-warn-name-shadowing -fno-warn-orphans -fglasgow-exts -cpp -fffi 
-fscoped-type-variables -idist-stage1/build  -H32m -O -Rghc-timing   -c 
nativeGen/MachCodeGen.hs -o dist-stage1/build/MachCodeGen.o  -ohi 
dist-stage1/build/MachCodeGen.hi
/tmp/guix-build-ghc-6.10.4.drv-0/ghc7957_0/ghc7957_0.hc: In function ���@ 
build-log 17895 2
��@ build-log 17895 2
sb@ build-log 17895 3
ZI_@ build-log 17895 2
0_@ build-log 17895 2
al@ build-log 17895 2
t�@ build-log 17895 2
��@ build-log 17895 2
:

/tmp/guix-build-ghc-6.10.4.drv-0/ghc7957_0/ghc7957_0.hc:2881:1:
 warning: implicit declaration of function ‘stg_intToInt64’ 
[-Wimplicit-function-declaration]
 _s9Fa = (StgWord64)stg_intToInt64((I_)_cc02);
 ^

/tmp/guix-build-ghc-6.10.4.drv-0/ghc7957_0/ghc7957_0.hc:2884:1:
 warning: implicit declaration of function ‘stg_negateInt64’ 
[-Wimplicit-function-declaration]
 _s9Ff = (StgWord64)stg_negateInt64((StgInt64)_s9Fa);
 ^
/tmp/guix-build-ghc-6.10.4.drv-0/ghc7957_0/ghc7957_0.hc: In function 
‘sbZI_1_alt’:

/tmp/guix-build-ghc-6.10.4.drv-0/ghc7957_0/ghc7957_0.hc:2910:1:
 warning: implicit declaration of function ���@ build-log 17895 1
�@ build-log 17895 1
�@ build-log 17895 1
s@ build-log 17895 1
t@ build-log 17895 1
g@ build-log 17895 1
_@ build-log 17895 1
i@ build-log 17895 1
n@ build-log 17895 1
t@ build-log 17895 1
e@ build-log 17895 1
g@ build-log 17895 1
e@ build-log 17895 1
r@ build-log 17895 1
T@ build-log 17895 1
o@ build-log 17895 1
I@ build-log 17895 1
n@ build-log 17895 1
t@ build-log 17895 1
6@ build-log 17895 1
4@ build-log 17895 1
�@ build-log 17895 1
�@ build-log 17895 1
�@ build-log 17895 1
 @ build-log 17895 1
[@ build-log 17895 1
-@ build-log 17895 1
W@ build-log 17895 1
i@ build-log 17895 1
m@ build-log 17895 1
p@ build-log 17895 1
l@ build-log 17895 1
i@ build-log 17895 1
c@ build-log 17895 1
i@ build-log 17895 1
t@ build-log 17895 1
-@ build-log 17895 1
f@ build-log 17895 1
u@ build-log 17895 1
n@ build-log 17895 1
c@ build-log 17895 1
t@ build-log 17895 1
i@ build-log 17895 1
o@ build-log 17895 1
n@ build-log 17895 1
-@ build-log 17895 1
d@ build-log 17895 1
e@ build-log 17895 1
c@ build-log 17895 1
l@ build-log 17895 1
a@ build-log 17895 1
r@ build-log 17895 1
a@ build-log 17895 1
t@ build-log 17895 1
i@ build-log 17895 1
o@ build-log 17895 1
n@ build-log 17895 1
]@ build-log 17895 1

 _s9Fq = (StgWord64)stg_integerToInt64((I_)_cc0a, (void *)_cc09);
 ^
--8<---cut here---end--->8---

Whatever this “���” is, it seems to have escaped the build log filter.

-- 
Ricardo





bug#58880: guix gc notation broken

2022-10-29 Thread Christian Miller via Bug reports for GNU Guix
It returns something like: guix gc: freed 7,294.56603 MiBsfinding garbage collector roots...
deleting garbage...
[0 MiB] deleting '/gnu/store/kw86a0szi73ylxri1q168hrrhi2sb2v4-profile.drv'
[0 MiB] deleting '/gnu/store/10ixn1y0kpy0yzmqf9hrm2jmbvpp48dk-xdg-desktop-database.drv'
[0 MiB] deleting '/gnu/store/1lz9hppiqwv2ivnzp4zl7c2kjrp7n6yk-gtk-icon-themes.drv'
[0 MiB] deleting '/gnu/store/6gdpznx5pvffd12qwyfa8y2nbv9zaqmy-emacs-subdirs.drv'
[0 MiB] deleting '/gnu/store/9c7j06a2px1fxz6rjlsw2hms4x5qazl5-gdk-pixbuf-loaders-cache-file.drv'
[0 MiB] deleting '/gnu/store/g69jdyd99q6h7zgagnmfdpjllkzjais7-gtk-im-modules.drv'
[0 MiB] deleting '/gnu/store/n694kvhlqqn8qs7bwdkjdjmm5z18izqg-info-dir.drv'
[0 MiB] deleting '/gnu/store/paj2jc1i39psjr5618nm3b9440wzsz06-fonts-dir.drv'
[0 MiB] deleting '/gnu/store/sy9l46h4fp45w5slbln10smg2vllalka-ca-certificate-bundle.drv'
[0 MiB] deleting '/gnu/store/w7sa9gmrrh4jwqjxqjsxjmxwwmb0kig8-xdg-mime-database.drv'
[0 MiB] deleting '/gnu/store/wh4mgbj712r970la7cm66y3n9nrk9xmq-glib-schemas.drv'
[0 MiB] deleting '/gnu/store/03jml0bn7gbphnnn6b1bl9kz8y5xgjlm-node-14.19.3.drv'
[0 MiB] deleting '/gnu/store/bn50lq0s0nmp1l458q9k890jgyzyp7z8-ungoogled-chromium-106.0.5249.119-1.drv'
[0 MiB] deleting '/gnu/store/p3w6yxjqd8fb5ngl6ymkld3mrb75dkb4-ungoogled-chromium-106.0.5249.119-1.drv'
[0 MiB] deleting '/gnu/store/60wivi6jyf553r95zpy1qdzzzrnh321y-node-14.19.3.drv'
[0 MiB] deleting '/gnu/store/89p0bz7lx6cz1mqsns5iw7bymkkq9sam-llhttp-2.1.4.drv'
[0 MiB] deleting '/gnu/store/pwndrmmbrh0lagfgpp3jhvqh1r87k7in-node-llparse-7.1.0.drv'
[0 MiB] deleting '/gnu/store/blhvdsqqjs4snrxgiwngkcgq50ry2b8h-node-llparse-frontend-3.0.0.drv'
[0 MiB] deleting '/gnu/store/q442mfmbwv2mdz7dda0551hyasm2b8q1-node-llparse-builder-1.5.2.drv'
[0 MiB] deleting '/gnu/store/4wybmh4hx2xc3z51ynw96mlzgxs3qr63-esbuild-0.14.0.drv'
[0 MiB] deleting '/gnu/store/8q15rm421rk490kqqzlgdxi2j088cqj9-go-github-com-kylelemons-godebug-1.1.0.drv'
[0 MiB] deleting '/gnu/store/hjf943wnsmdzy56lnpb3z6zmpc3mfi1w-go-golang-org-x-sys-0.0.0-8.ed5796b.drv'
[0 MiB] deleting '/gnu/store/mi4fqm234vaj9bd706hywz2gv03ns45r-go-std-1.17.11.drv'
[0 MiB] deleting '/gnu/store/6c1q3lsjl7dwgqy70zjyvviycamfd88n-chromium-106.0.5249.119.tar.xz.drv'
[0 MiB] deleting '/gnu/store/7vgrv7hnd91kw5nprgrcszlzs895sj51-jsoncpp.patch.drv'
[0 MiB] deleting '/gnu/store/av6g1bismigw7lfgrs7p63h27vhgaw26-zlib.patch.drv'
[0 MiB] deleting '/gnu/store/k4fk81jk5cg3nrhvg59wcdm0n4y68adx-openjpeg.patch.drv'
[0 MiB] deleting '/gnu/store/cgfb7zxb2z18clays57vv4c97cqi9ngx-debian-chromium-patches-102.0.5005.61-1-checkout.drv'
[0 MiB] deleting '/gnu/store/lqw1axlfzh8f3jnmai9ba69pgjbvlx1a-orca-42.3'
[16 MiB] deleting '/gnu/store/iffaxh1y899wdh62f14wbmrnvvcq169j-python-pygobject-3.40.1'
[17 MiB] deleting '/gnu/store/7yd0xsjfxh9cax56qjqxzj4qspdk2nbp-ffmpeg-4.4.2.drv'
[17 MiB] deleting '/gnu/store/h1jnw63sfhx3nxs1pn0f8mrshdh7nkr7-openal-1.20.1.drv'
[17 MiB] deleting '/gnu/store/vnmm7ssgcdh26nm0sxcx7r0m59i01r47-profile'
[20 MiB] deleting '/gnu/store/yzxrp7xc4zii6wsly8fbkbcv1k3yfb9g-clang-14.0.6'
[236 MiB] deleting '/gnu/store/4mrszv59vn7d40rrbh5hvn3bd5p8m1pm-clang-runtime-14.0.6'
[268 MiB] deleting '/gnu/store/hcypy6mb3v19a58hvaf265283jgd37mm-clang-14.0.6'
[483 MiB] deleting '/gnu/store/bckl8q1wra5k0cgwfiyb2syay556gwjr-clang-runtime-14.0.6'
[515 MiB] deleting '/gnu/store/2iavgf3br0ryvqn4aghr3l6wxw7qjm1m-gcc-11.3.0-lib'
[550 MiB] deleting '/gnu/store/7v1f594na0f0x96xjb2c1zbp31yaxwzx-fp16-0.0-1.0a92994.drv'
[550 MiB] deleting '/gnu/store/s9b854lzrbwpxpx7s8z8m7ksp06mi8b4-fp16-0.0-1.0a92994-checkout.drv'
[550 MiB] deleting '/gnu/store/lc9rnwz9v4ygsq30g3cbg38r18fpjla0-fp16-0.0-1.0a92994-checkout-builder'
[550 MiB] deleting '/gnu/store/z72v3vq15kddsq651g22ivfgpcwm2pk0-pipewire-0.3.56.drv'
[550 MiB] deleting '/gnu/store/p4dk5jhkkbcy5c3bvryr8wjcx5iw7gsb-pipewire-0.3.56.drv'
[550 MiB] deleting '/gnu/store/bzckrji7lhxswyalgalvj23d73c2vlky-ffmpeg-4.4.2.drv'
[550 MiB] deleting '/gnu/store/1cp3hdwk3jshnj9n8fq4jlainw8n43vh-rav1e-0.5.1.drv'
[550 MiB] deleting '/gnu/store/jgqixdjza21na5mzm8l7wkkyavhryjxz-rust-cargo-c-0.8.1+cargo-0.53.drv'
[550 MiB] deleting '/gnu/store/2b33vb019lyamr33a6niwafgac7fk87b-rust-shell-escape-0.1.4.tar.gz.drv'
[550 MiB] deleting '/gnu/store/zs99g4lqsp11wq5j9rgfv9cihsaxzzif-eudev-3.2.11.drv'
[550 MiB] deleting '/gnu/store/hlw1a97a71xm51vgw04hcfm0ib5pwg3f-eudev-3.2.11-builder'
[550 MiB] deleting '/gnu/store/3dg3jzm4r2qbgs46c10pyx76y8xzwk6n-re2-2022-02-01.drv'
[550 MiB] deleting '/gnu/store/sm20pxwnlpmaf5mrgkrb3z2myvhv3dry-rust-libgit2-sys-0.12.25+1.3.0.tar.xz.drv'
[550 MiB] deleting '/gnu/store/h0dq7jyr6zx4ahk67qg2xsiygxlds2kn-python-beautifulsoup4-4.11.1.drv'
[550 MiB] deleting '/gnu/store/r25iywij895z43n14kj9zn3dx4s80qwf-python-beautifulsoup4-4.11.1-builder'
[550 MiB] deleting '/gnu/store/qng04mx8li8z7ak9lfik3xbrkpwgnka7-nss-certs-3.81.drv'
[550 MiB] deleting '/gnu/store/ii8xphayf5g7fbfy5an9zlzdaxqrcqs9-certdata2pem-0.0.0.drv'
[550 MiB] deleting '/gnu/store/nx2sg7ryp5bzxzkqvc3fs0hfkskpxc8j-certdata

bug#58880: guix gc notation broken

2022-10-29 Thread Christian Miller via Bug reports for GNU Guix
Correct notation would be: 7,294.57 MiBs

bug#57844: Shepherd fails to start in user session ~50% of the time

2022-10-29 Thread Tom Willemse
Hey!

Thanks for getting back to me on this! :)

Andrew Tropin  writes:

> On 2022-10-19 18:21, Ludovic Courtès wrote:
>
>>> It looks like it starts twice and then exits both, but I'm not sure why.
>>> I'm guessing it's the ~/.guix-home/activate and
>>> ~/.guix-home/on-first-login that are trying to start it.
>
> ~/.guix-home/activate should be launched only by guix home reconfigure,
> so it shouldn't be touched during startup of the session at all, also
> they both have a condition, which must prevent the start of shepherd if
> socket exists.

Yeah I know that they both have a check for the pid file, I remember
finding your bug report and patch earlier and hoping that it would fix
my issues, although now I understand that this would never have helped.
I thought that they might still both try to start shepherd, since
neither check nor execution of shepherd is atomic, so I figured they
might end up both starting shepherd, one creating the pid and starting,
the other failing to create it and crashing, but I couldn't think of why
the first one would stop as well then. Anyway, I guess that is
completely wrong if they don't actually ever get run at the same time :)

> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/home/services/shepherd.scm?h=883fb8f41b08a8455f16c736a83fb1ae8a3df0a1#n105
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/home/services/shepherd.scm?h=883fb8f41b08a8455f16c736a83fb1ae8a3df0a1#n131
>
> Tom, can you show your startup scripts, please (like xsession or
> whatever you use for starting graphical environment)?  Sharing home
> environment config can be useful as well.  Do you use some display/login
> manager?

My ~/.xinitrc is literally just:

exec 
/gnu/store/rl6f55i52lldzmbgg6z0ywr41ni4kbjg-herbstluftwm-0.9.4/bin/herbstluftwm 
--autostart /gnu/store/lqif0y90y7ipvf9aakdjisygnffk4999-autostart

I use the lightdm display manager installed with the Archlinux package
manager.

My home configuration on my laptop should be based on this:

https://git.sr.ht/~ryuslash/dotfiles/tree/7771b3e1fd16a30bee09b11ecbaf2b1b69b3921b/item/oni/home/data/config.scm

It's spread across a few files, so if there's anything specific you want
to know please tell me, or if you need it in a different format I can
provide that too, I figured this would be the easiest way.

Thanks for your help!


Cheers,

Tom