Skip to content

Commit

Permalink
Remove wrong cgroups assert (#72372)
Browse files Browse the repository at this point in the history
* Remove wrong cgroups assert

When detecting the current cgroup version on Linux, checked and
debug builds assert when the filesystem type of /sys/fs/cgroup is
neither TMPFS_MAGIC nor CGROUP2_SUPER_MAGIC. This change removes
the assert and considers it as "no cgroup support".
Release builds already have this behavior.

Close #62960

* Update the nativeaot version too
  • Loading branch information
janvorli committed Jul 22, 2022
1 parent 434fe75 commit a969c53
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/coreclr/gc/unix/cgroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ class CGroup
case TMPFS_MAGIC: return 1;
case CGROUP2_SUPER_MAGIC: return 2;
default:
assert(!"Unexpected file system type for /sys/fs/cgroup");
return 0;
}
#endif
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/nativeaot/Runtime/unix/cgroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ class CGroup
case TMPFS_MAGIC: return 1;
case CGROUP2_SUPER_MAGIC: return 2;
default:
assert(!"Unexpected file system type for /sys/fs/cgroup");
return 0;
}
#endif
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/pal/src/misc/cgroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ class CGroup
case TMPFS_MAGIC: return 1;
case CGROUP2_SUPER_MAGIC: return 2;
default:
_ASSERTE(!"Unexpected file system type for /sys/fs/cgroup");
return 0;
}
#endif
Expand Down

0 comments on commit a969c53

Please sign in to comment.