Your message dated Sun, 06 Aug 2017 12:32:08 +0000
with message-id <e1dekj2-0001qc...@fasolo.debian.org>
and subject line Bug#858134: fixed in haveged 1.9.1-5+deb9u1
has caused the Debian Bug report #858134,
regarding haveged.service should depend on systemd-tmpfiles-setup.service
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
858134: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858134
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: haveged
Version: 1.9.1-5
Severity: important

Dear maintainer,

Haveged fails to start often (but not always) during boot. Manually starting
it later with "systemctl start haveged" is successful. Systemd version is
232-19. Journalctl showed the following error message:

  systemd[557]: haveged.service: Failed at step NAMESPACE spawning 
/usr/sbin/haveged: No such file or directory

Searching for more information on this issue led to the PrivateTmp option in
the service configration file. Setting PrivateTmp=no in haveged.service did
avoid the problem on my system.

Additionally, I was able to find the likely cause by enabling systemd debug
messages with systemd.log_level=debug on the kernel command line. The log is
quite long. I've tried to extract the relevant parts:

Mar 18 14:29:05 notebook systemd[1]: Reached target Local File Systems.
Mar 18 14:29:05 notebook systemd[1]: systemd-tmpfiles-setup.service: Passing 0 
fds to service
Mar 18 14:29:05 notebook systemd[1]: systemd-tmpfiles-setup.service: About to 
execute: /bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev
Mar 18 14:29:05 notebook systemd[1]: systemd-tmpfiles-setup.service: Forked 
/bin/systemd-tmpfiles as 554
Mar 18 14:29:05 notebook systemd[1]: systemd-tmpfiles-setup.service: Changed 
dead -> start
Mar 18 14:29:05 notebook systemd[1]: Starting Create Volatile Files and 
Directories...
[...]
Mar 18 14:29:05 notebook systemd[1]: haveged.service: 
ConditionVirtualization=!container succeeded.
Mar 18 14:29:05 notebook systemd[555]: nfs-config.service: Executing: 
/usr/lib/systemd/scripts/nfs-utils_env.sh
Mar 18 14:29:05 notebook systemd[1]: haveged.service: Passing 0 fds to service
Mar 18 14:29:05 notebook systemd[1]: haveged.service: About to execute: 
/usr/sbin/haveged --Foreground --verbose=1 $DAEMON_ARGS
Mar 18 14:29:05 notebook systemd[1]: haveged.service: Forked /usr/sbin/haveged 
as 557
Mar 18 14:29:05 notebook systemd[1]: haveged.service: Changed dead -> running
Mar 18 14:29:05 notebook systemd[1]: haveged.service: Job haveged.service/start 
finished, result=done
Mar 18 14:29:05 notebook systemd[1]: Started Entropy daemon using the HAVEGE 
algorithm.
[...]
Mar 18 14:29:05 notebook systemd[554]: systemd-tmpfiles-setup.service: 
Executing: /bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev
[...]
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: Running create action for entry 
D /tmp
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: Found existing directory "/tmp".
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: "/tmp" has right mode 41777
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: Running remove action for entry 
D /tmp
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: rm -rf "/tmp"
[...]
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: Running create action for entry 
x /tmp/systemd-private-585850ad3e454158ae8ab3f9afe67cd9-*
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: Running remove action for entry 
x /tmp/systemd-private-585850ad3e454158ae8ab3f9afe67cd9-*
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: Running create action for entry 
X /tmp/systemd-private-585850ad3e454158ae8ab3f9afe67cd9-*/tmp
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: Running remove action for entry 
X /tmp/systemd-private-585850ad3e454158ae8ab3f9afe67cd9-*/tmp
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: Running create action for entry 
x /var/tmp/systemd-private-585850ad3e454158ae8ab3f9afe67cd9-*
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: Running remove action for entry 
x /var/tmp/systemd-private-585850ad3e454158ae8ab3f9afe67cd9-*
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: Running create action for entry 
X /var/tmp/systemd-private-585850ad3e454158ae8ab3f9afe67cd9-*/tmp
Mar 18 14:29:05 notebook systemd-tmpfiles[554]: Running remove action for entry 
X /var/tmp/systemd-private-585850ad3e454158ae8ab3f9afe67cd9-*/tmp
[...]
Mar 18 14:29:05 notebook systemd[1]: Received SIGCHLD from PID 554 
(systemd-tmpfile).
Mar 18 14:29:05 notebook systemd[1]: Child 554 (systemd-tmpfile) died 
(code=exited, status=0/SUCCESS)
Mar 18 14:29:05 notebook systemd[1]: systemd-tmpfiles-setup.service: Child 554 
belongs to systemd-tmpfiles-setup.service
Mar 18 14:29:05 notebook systemd[1]: systemd-tmpfiles-setup.service: Main 
process exited, code=exited, status=0/SUCCESS
Mar 18 14:29:05 notebook systemd[1]: systemd-tmpfiles-setup.service: Changed 
start -> exited
Mar 18 14:29:05 notebook systemd[1]: systemd-tmpfiles-setup.service: Job 
systemd-tmpfiles-setup.service/start finished, result=done
Mar 18 14:29:05 notebook systemd[1]: Started Create Volatile Files and 
Directories.
Mar 18 14:29:05 notebook systemd[1]: systemd-tmpfiles-setup.service: cgroup is 
empty
[...]
Mar 18 14:29:05 notebook systemd[557]: haveged.service: Failed at step 
NAMESPACE spawning /usr/sbin/haveged: No such file or directory
Mar 18 14:29:05 notebook systemd[1]: systemd-journald.service: Received 
EPOLLHUP on stored fd 54 (stored), closing.
Mar 18 14:29:05 notebook systemd[1]: Received SIGCHLD from PID 557 ((haveged)).
Mar 18 14:29:05 notebook systemd[1]: Child 557 ((haveged)) died (code=exited, 
status=226/NAMESPACE)
Mar 18 14:29:05 notebook systemd[1]: haveged.service: Child 557 belongs to 
haveged.service
Mar 18 14:29:05 notebook systemd[1]: haveged.service: Main process exited, 
code=exited, status=226/NAMESPACE
Mar 18 14:29:05 notebook systemd[1]: haveged.service: Changed running -> failed
Mar 18 14:29:05 notebook systemd[1]: haveged.service: Unit entered failed state.
Mar 18 14:29:05 notebook systemd[1]: haveged.service: Failed with result 
'exit-code'.
Mar 18 14:29:05 notebook systemd[1]: Spawning thread to nuke 
/tmp/systemd-private-585850ad3e454158ae8ab3f9afe67cd9-haveged.service-CF3b36
Mar 18 14:29:05 notebook systemd[1]: Spawning thread to nuke 
/var/tmp/systemd-private-585850ad3e454158ae8ab3f9afe67cd9-haveged.service-yFgE9p
Mar 18 14:29:05 notebook systemd[1]: haveged.service: cgroup is empty

It looks like systemd-tmpfiles-setup.service deleted all temporary files
and directories while haveged.service tried to start using private temporary
subdirectories in /tmp and /var/tmp.

I have found one other service that runs early (i.e. DefaultDependencies=no)
and uses PrivateTmp=yes: systemd-timesyncd.service. It has the following
dependencies in its service file:

  After=systemd-remount-fs.service systemd-tmpfiles-setup.service 
systemd-sysusers.service

I think haveged should at least specify After=systemd-tmpfiles-setup.service.
Adding it on my system has so far avoided all boot problems with
PrivateTmp=yes. I'm not sure about the other dependencies. Maybe a systemd
expert could comment on those.


-- System Information:
Debian Release: 8.7
  APT prefers stable
  APT policy: (713, 'stable'), (712, 'oldstable'), (560, 'unstable-debug'), 
(560, 'unstable'), (550, 'testing-debug'), (550, 'testing'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 4.9.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages haveged depends on:
ii  init-system-helpers  1.47
ii  libc6                2.24-9
ii  libhavege1           1.9.1-5
ii  lsb-base             4.1+Debian13+nmu1

haveged recommends no packages.

Versions of packages haveged suggests:
pn  apparmor  <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: haveged
Source-Version: 1.9.1-5+deb9u1

We believe that the bug you reported is fixed in the latest version of
haveged, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 858...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jérémy Bobbio <lu...@debian.org> (supplier of updated haveged package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 17 Jul 2017 15:31:32 +0200
Source: haveged
Binary: haveged libhavege1 libhavege1-dbg libhavege-dev
Architecture: source
Version: 1.9.1-5+deb9u1
Distribution: stretch
Urgency: medium
Maintainer: Jérémy Bobbio <lu...@debian.org>
Changed-By: Jérémy Bobbio <lu...@debian.org>
Description:
 haveged    - Linux entropy source using the HAVEGE algorithm
 libhavege-dev - entropy source using the HAVEGE algorithm - development files
 libhavege1 - entropy source using the HAVEGE algorithm - shared library
 libhavege1-dbg - entropy source using the HAVEGE algorithm - debug symbols
Closes: 858134
Changes:
 haveged (1.9.1-5+deb9u1) stretch; urgency=medium
 .
   * Start haveged.service after systemd-tmpfiles-setup.service has been run.
     Many thanks to Jan Echternach for reporting the problem and suggesting
     a fix. (Closes: #858134)
Checksums-Sha1:
 cdfdec19954edf90dc3f087e75f95f6f6e576a7d 2179 haveged_1.9.1-5+deb9u1.dsc
 8a2e46789d949ba7b035cd571046104af67392f9 11892 
haveged_1.9.1-5+deb9u1.debian.tar.xz
 ebc6bfe1a963cb4fda72a377f8e966a32a89327e 6417 
haveged_1.9.1-5+deb9u1_amd64.buildinfo
Checksums-Sha256:
 184fff57b6aaf3b4bc185df7dbb743af5225751ded2b609da48f8d49e9ae3392 2179 
haveged_1.9.1-5+deb9u1.dsc
 45a2276f9d7c18f5c6d6f7f373bb8240d134822fa61b84f49f3fd40a6307ba55 11892 
haveged_1.9.1-5+deb9u1.debian.tar.xz
 b8912f3120d61394605332ab528ebdc52d5f0e1f471428d475d647d1a316601c 6417 
haveged_1.9.1-5+deb9u1_amd64.buildinfo
Files:
 52de9fffeee5f95f3f70c8680517d6e4 2179 misc extra haveged_1.9.1-5+deb9u1.dsc
 b37615c91def896bdf9f7e2e13f53d50 11892 misc extra 
haveged_1.9.1-5+deb9u1.debian.tar.xz
 f51eb6413724754154438e014d8c9ed9 6417 misc extra 
haveged_1.9.1-5+deb9u1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCAAvFiEEQ0QtpE3u0ARZ8m7oQCwiUD026TYFAllswX0RHGx1bmFyQGRl
Ymlhbi5vcmcACgkQQCwiUD026TbVwA//ZcIT+R1Qga7B5QuA0hmUS6tcMOM++Htz
77Nq17hj3em/VGCul7wZWptfUsqUQ7WNAq3AQZnagej4GMLCWfaTJJvukG3BDA+A
kb/69l6NgH3j5rbUdeZfizisJbDMPaqg/qI5xzJKO9Qsc4mIpz1zFCeeO1Fs1stc
5gUglYH3TSGwN6HydcVqTiR82UZDh20eDcRMDEs39LoHwbB7hYGEjrU+0AIdjLDa
7VAtQocJv/1Qia6CSiDno7Aj4CEayq0VHJiOxYJvKJ2dcvfSSbGVbCV5A6+x3nNa
/H5TyIlzpQT6SUXqBwpbVNcVFQX0s+ibPY6fL2X3SFGyYMEChmvroA3Cxc67QG3H
ujgsywuc1OV4inMKoOwsvgMEep7Lx54bjBmzI3NPzAHZYtLFfkC2N2eQZQUiAhiQ
9PTXFQLKCe55PTwBPhirnO1/ktAdKbOKS90mMkLGX2PjVC9uqNjSL7iiL51XiLRN
ywFwMXHUEOyn354/oY92Mv+dI5iglhor9FHLzwjv+gl7KBWNr2JuEpwGItKK215y
uHwskG33x3fukeR+24lv8k+xGR9PrFAJeVGKzNTPzeDq+RX+4psK1sikKkUC+v3O
nEu6J1qj/CAUvXNSRS+4CzGcRa7qg9E3jBY/P1VD8X2MZoEeL+eXQXWa1DPjVUcO
PWVbycHmlWU=
=zH5v
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to