google / tcmalloc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibly crash with kernel disabling CONFIG_PROC_PID_CPUSET

yuuzi41 opened this issue · comments

It assumes that /proc/self/cpuset exists here,

int fd = signal_safe_open("/proc/self/cpuset", O_RDONLY);

but actually this file doesn't exist if kernel has been built with CONFIG_PROC_PID_CPUSET=n.

when /proc/self/cpuset doesn't exist, open() must be failed and variable fd become negative, then it will crash here.

CHECK_CONDITION(fd >= 0);

Does your kernel have support for membarrier with torvalds/linux@2a36ab7 (5.10 or later)?

It should be fairly rare to need to use SlowFence (the procedure where the assertion is failing), but at the point it is needed, it's important for correctness that it complete successfully.

Thank you for your response.

Does your kernel have support for membarrier with torvalds/linux@2a36ab7 (5.10 or later)?

Yes, It is v5.19.2.
Actually I'm about to use https://github.com/envoyproxy/envoy on https://github.com/kata-containers/kata-containers/tree/3.1.3