mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
fix: avoid crashing dragonfly on parsing error of cgroups config (#1503)
Fixes #1502 Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
52192e0596
commit
e71fae7eea
1 changed files with 4 additions and 1 deletions
|
@ -512,7 +512,10 @@ error_code GetCGroupPath(string* memory_path, string* cpu_path) {
|
||||||
// in v1 the format is
|
// in v1 the format is
|
||||||
// N:s1:2 where N is an integer, s1, s2 strings with s1 maybe empty.
|
// N:s1:2 where N is an integer, s1, s2 strings with s1 maybe empty.
|
||||||
vector<string_view> entry = absl::StrSplit(sv, ':');
|
vector<string_view> entry = absl::StrSplit(sv, ':');
|
||||||
CHECK_EQ(entry.size(), 3u);
|
if (entry.size() != 3u) {
|
||||||
|
LOG(ERROR) << "Unsupported group " << sv;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// in v1 there are several 'canonical' cgroups
|
// in v1 there are several 'canonical' cgroups
|
||||||
// we are interested in the 'memory' and the 'cpu,cpuacct' ones
|
// we are interested in the 'memory' and the 'cpu,cpuacct' ones
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue