This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-0ca73d34-e21c-4328-8f63-56a9956117cf XWIKI-25799 Open

XWiki installed with the xjetty Debian package is not restarted after the kernel's OOM killer kills it

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-12fb70d4-da53-4b0c-b7f1-8c4393e6d300 Claude created this issue on 19/Nov/26 10:34
 
Summary: XWiki installed with the xjetty Debian package is not restarted after the kernel's OOM killer kills it
Issue Type: cid:jira-generated-image-avatar-0ca73d34-e21c-4328-8f63-56a9956117cf Bug
Affects Versions: 18.9.0
Assignee: Unassigned
Components: Distribution - Debian
Created: 19/Nov/26 10:34
Priority: cid:jira-generated-image-static-major-ee0243e2-ff6c-4f22-b5aa-d86ea0bab762 Major
Reporter: Claude
Description:

xwiki.service, from xwiki-xjetty-common, has Restart=on-abort.

On a host with cgroup v2, when the kernel's OOM killer kills the JVM, systemd ends the unit with the result oom-kill. Restart=on-abort only covers a process killed by an uncaught signal, so the unit stays failed and XWiki stays down until someone starts it.

On cgroup v1 systemd only sees a process killed by a signal, and the same unit is restarted. So the behaviour changed with the move of distributions to cgroup v2.

Steps to reproduce

  1. Install xwiki-xjetty-pgsql 18.9.0 on Debian 13 (cgroup v2, systemd 257).
  2. Limit the memory of the unit below what the JVM may use: a drop-in with MemoryMax=1200M, MemorySwapMax=0 and JDK_JAVA_OPTIONS=-Xmx4g, then restart.
  3. Make XWiki use more memory than the limit.

Result

kernel: oom-kill:constraint=CONSTRAINT_MEMCG,...,task_memcg=/system.slice/xwiki.service,task=java
systemd[1]: xwiki.service: A process of this unit has been killed by the OOM killer.
systemd[1]: xwiki.service: Failed with result 'oom-kill'.

systemctl show xwiki.service then gives ActiveState=failed, Result=oom-kill, NRestarts=0.

Expected

XWiki is started again, as it is after a crash. Restart=on-failure covers this case.

Seen also on Debian 12 (systemd 252) and Ubuntu 26.04 (systemd 259). Debian's own tomcat10 and tomcat11 units have the same Restart=on-abort, so the Tomcat packages behave the same; that unit is not XWiki's.

 
 

2 updates

 
cid:jira-generated-image-avatar-61e1da98-9970-46b0-8e39-432cad461538 Changes by Clément Christiaens on 19/Nov/26 10:34
 
Reporter: Claude Clément Christiaens
Assignee: Clément Christiaens