Skip to content

Commit 5a9e20c

Browse files
committed
Error when missing cgroup value memory.peak
This replaces the `memory.memsw.max_usage_in_bytes` value from cgroup v1. We always assume it's there so we should fail if it is not. Otherwise things silently degrade as they would not have before. Addresses #2763
1 parent 8f8f4c0 commit 5a9e20c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

judge/runguard.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ void output_cgroup_stats_v2(double *cputime)
501501
int64_t max_usage = 0;
502502
ret = cgroup_get_value_int64(cg_controller, "memory.peak", &max_usage);
503503
if ( ret == ECGROUPVALUENOTEXIST ) {
504-
write_meta("internal-warning", "Kernel too old and does not support memory.peak");
504+
error(ret, "kernel too old and does not support memory.peak");
505505
} else if ( ret!=0 ) {
506506
error(ret,"get cgroup value memory.peak");
507507
}

0 commit comments

Comments
 (0)