cgrulesengd exit at code=dumped, status=11/SEGV.

Bug #2021575 reported by Kazuhiko Tanaka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libcgroup (Ubuntu)
New
Undecided
Unassigned

Bug Description

I use cgrulesengd as a service with the following settings.

###
[Unit]
Description=CGroups Rules Engine Daemon
DefaultDependencies=no
After=syslog.target network.target cgconfig.service multi-user.target

[Service]
Type=forking
EnvironmentFile=-/etc/default/cgred.conf
ExecStart=/usr/sbin/cgrulesengd $OPTIONS

[Install]
WantedBy=multi-user.target
###

This server has about 80 users logged in using xrdp and uses cgrulesengd to distribute processes to cgroups.
cgconfig.conf has 7 cgroups and cgrules.conf has 19 rules.
Also, once every few seconds, programs using "/proc/self/exe" cannot determine their cgroup correctly, so once every few seconds we use cgclassify to change the cgroup of those programs.
In this environment, "code=dumped, status=11/SEGV" occurs several times a day and the service stops.
A short interval is 2 minutes and a long interval is several hours. The time is not constant, but it seems to occur during times when logins and browser launches are concentrated.

The error logged in syslog when this issue occurs is:

###
 kernel: [35268.735926] cgrulesengd[252361]: segfault at 3530 ip 00007fd4013fb98c sp 00007ffc17c55818 error 4 in libc.so.6[7fd401272000+195000]
 kernel: [35268.735937] Code: 1e fa 89 f8 31 d2 62 a1 fd 00 ef c0 09 f0 25 ff 0f 00 00 3d 80 0f 00 00 0f 8f 70 03 00 00 62 e1 fe 28 6f 0f 62 b2 75 20 26 d1 <62> f3 75 22 3f 0e 00 c5 fb 93 c9 ff c1 74 45 f3 0f bc d1 0f b6 04
 systemd[1]: cgred.service: Main process exited, code=dumped, status=11/SEGV
 systemd[1]: cgred.service: Failed with result 'core-dump'.
###

Below is the backtrace of the dump file extracted from ".crash" (I don't have gdb in production, so I took the backtrace in another environment):

###
#0 0x00007fd4013fb98c in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fd401482e6b in cgroup_config_create_template_group ()
   from /lib/x86_64-linux-gnu/libcgroup.so.1
#2 0x00007fd401483bd9 in cgroup_change_cgroup_flags ()
   from /lib/x86_64-linux-gnu/libcgroup.so.1
#3 0x000055c8e8a4f481 in ?? ()
#4 0x000055c8e8a4e819 in ?? ()
#5 0x00007fd401273d90 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x00007fd401273e40 in __libc_start_main ()
   from /lib/x86_64-linux-gnu/libc.so.6
#7 0x000055c8e8a4ed15 in ?? ()
###

OS is Ubuntu 22.04.2, libcgroup version is 2.0-2 amd64.

description: updated
description: updated
description: updated
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.