Reported by williamh@gentoo.org. dmeventd is exiting after 1 hour running during idle periods, when it's expected to still be online. Reading the source quickly, there is condition to exit on idle time exceeding 1 hour. 1. The idle timer should be reset on activity (_process_request after _client_read && cmd != DM_EVENT_CMD_DIE) 2. The idle timeout should be configurable. williamh: Can you please provide more detail about how your environment is using dmeventd, esp. if any plugins are loaded.
The idle timeout should also be able to be infinite, so that dmeventd never exits.
Well the idea was that if the daemon had no work to do, it would exit - what's the point in tying up system resources with a process that has nothing to do? If something needs it again, it should restart it transparently on demand.
@agk: I think williamh's enduser case might be doing something "creative" in querying dmeventd that doesn't end up resetting the idle timer presently.
(In reply to Robin Johnson from comment #3) > @agk: I think williamh's enduser case might be doing something "creative" in > querying dmeventd that doesn't end up resetting the idle timer presently. Nothing terribly creative; it's the default config that's installed by lvm2. The issue is that on some machines we have the dmeventd service set to default, but not all of them have lvm devices to monitor, so dmeventd fails. We don't really need the service to be supervised upstream, but the current initd doesn't support supervision. I simplified the script to: #!/sbin/openrc-run # Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Use variables instead: command=/sbin/dmeventd start_stop_daemon_args="--pidfile /run/${RC_SVCNAME}.pid" depend() { # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that # means dmeventd is NOT notified, as it cannot be safely running after lvm device-mapper } which allows us to supervise by putting the appropriate settings in /etc/conf.d/dmeventd. While supervising a crashed process may not make sense to some, it settles our use case (and allows others to supervise dmeventd without having to fork the init script).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04b17140f5801dc924927a418f43cfe765afc778 commit 04b17140f5801dc924927a418f43cfe765afc778 Author: Robin H. Johnson <robbat2@gentoo.org> AuthorDate: 2019-04-17 07:04:10 +0000 Commit: Robin H. Johnson <robbat2@gentoo.org> CommitDate: 2019-04-17 07:25:38 +0000 sys-fs/lvm2: improve dmeventd init Upstream dmeventd has an exit-on-idle behavior that leads openrc to decide that it has crashed, when it just exited "normally". Provide multiple ways around this: - supervisor support in the init script - patch the daemon to make the idle timeout configurable (submitted upstream) Co-authored-by: William Hubbs <williamh@gentoo.org> Fixes: https://bugs.gentoo.org/682556 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2 | 21 +++++++ .../lvm2-2.02.184-dmeventd-no-idle-exit.patch | 68 ++++++++++++++++++++++ sys-fs/lvm2/lvm2-2.02.184-r2.ebuild | 3 +- 3 files changed, 91 insertions(+), 1 deletion(-)