(address . bug-guix@gnu.org)
Hi!
As mentioned on IRC, running a daemon from a guix relocatable pack on a
foreign distro using the user namespace feature is troublesome: it looks
as if the daemon "loses" (its view of) the file-system once the parent
process that creates the daemon exits.
I'm attatching a package description for a test package "vork". It
builds a program "test" that forks the program "daemon".
The daemon program reads a character from /dev/urandom, prints it,
and sleeps for a second; 10 times.
The "test" parent program exits after 5 seconds. When the parent
program exits, the daemon crashes.
To reproduce, put "vork.scm" in a fresh directory and do something like:
Toggle snippet (9 lines)
fakeroot tar xf $(GUIX_PACKAGE_PATH=. guix pack --relocatable\
--symlink=/gnu/bin=bin guile shepherd vork --no-offload)
guix gc -D $(guix build -f vork.scm)
touch /tmp/daemon.log
tail -f /tmp/daemon.log &
GUILE_LOAD_COMPILED_PATH=$PWD/$(ls -1d gnu/store/*profile)/lib/guile/3.0/ccache\
:$PWD/$(ls -1d gnu/store/*profile)/lib/guile/3.0/site-ccache gnu/bin/test
this gives something like
Toggle snippet (15 lines)
.daemon-start
daemon: 10 ?
.daemon: 9 ?
.daemon: 8 T
.daemon: 7 ^O
.daemon: 6 O
exit
20:42:38 janneke@dundal:~/src/guix/master/vork [env]
$ 20:42:38 janneke@dundal:~/src/guix/master/vork [env]
$ Backtrace:
Exception thrown while printing backtrace:
In procedure public-lookup: Module named (system repl debug) does not exist
Greetings,
Janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com