In case of oom killer terminating some process, we'd rather not see
xenstored go. Xenstored has an in-memory database, and when starting the
process again, it would be empty, which is very inconvenient. Xenstored
should already score quite low and have a fairly low memory footprint,
but according to the user report, it happened.

Closes: #961511
Suggested-by: Samuel Thibault <sthiba...@debian.org>
Signed-off-by: Hans van Kranenburg <h...@knorrie.org>
---
Cc: Ian Jackson <ijack...@chiark.greenend.org.uk>
---
This is in my knorrie/4.14-extra branch now. I think we should do this.
---
 debian/xen-utils-common.xen.init | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/xen-utils-common.xen.init b/debian/xen-utils-common.xen.init
index 54aaba89d320..2a4c09fa3f71 100644
--- a/debian/xen-utils-common.xen.init
+++ b/debian/xen-utils-common.xen.init
@@ -226,7 +226,8 @@ xenstored_start()
                eval "try_xenstored=\$$try_xenstored_var"
                if [ -x $try_xenstored ]; then
                        if start-stop-daemon --start --quiet \
-                               --pidfile "$XENSTORED_PIDFILE" --exec 
"$try_xenstored" -- \
+                               --pidfile "$XENSTORED_PIDFILE" \
+                               --exec /usr/bin/choom -- -n -1000 
"$try_xenstored" -- \
                                $XENSTORED_ARGS --pid-file 
"$XENSTORED_PIDFILE"; then
                                        started_xenstored=$try_xenstored
                                        break
-- 
2.20.1

Reply via email to