Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the contents of /proc/stat be reset #643

Open
qwjhq opened this issue May 22, 2024 · 3 comments
Open

the contents of /proc/stat be reset #643

qwjhq opened this issue May 22, 2024 · 3 comments
Labels
Incomplete Waiting on more information from reporter

Comments

@qwjhq
Copy link

qwjhq commented May 22, 2024

lxcfs in 5.0.4 version, in container exec command

1 、will get /proc/stat be reset after 3 minutes,
exec command: while true; do sleep 1; date >>/tmp/2; grep 'cpu' /proc/stat>>/tmp/2; done
2、in the same time get cpu from host cgroup file is normal,the value of the CPU is cumulative.
exec command: while true; do sleep; date >> /tmp/1; cat /sys/fs/cgroup/cpu,cpuacct/xxx(对应cgroup目录)/cpuacct.usage_all >>/tmp/1; done
3、change lxcfs version to 4.0.5 /proc/stat value is correct
image

lxcfs 4.0.5 5.0.4 run command :
/usr/local/bin/lxcfs --enable-cfs -l --enable-pidfd -u /var/lib/lxc/lxcfs

lxcfs 4.0.5 use fuse-2.9.9

lxcfs 5.0.4 use fuse3-3.9.2

container mount:
image

@qwjhq
Copy link
Author

qwjhq commented May 22, 2024

linux kernel 4.19.90
lxcfs 4.0.11 use fuse3 contents of /proc/stat be reset after 3 minutes, it seems that the problem is caused by fuse3
image
image

if lxcfs 4.0.11 change use fuse contents of /proc/stat is corret

@qwjhq
Copy link
Author

qwjhq commented Jun 14, 2024

lxcfs 4.0.5 4.0.11 also have this problem, occurrence time will be a bit longer

@qwjhq qwjhq changed the title the contents of /proc/stat be reset in version 5.0.4, but it works normally in version 4.0.5 the contents of /proc/stat be reset Jun 14, 2024
@stgraber
Copy link
Member

Can you test with LXCFS 6.0.1?

This sounds a lot like some early caching issues we've had with FUSE3.

@stgraber stgraber added the Incomplete Waiting on more information from reporter label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Incomplete Waiting on more information from reporter
Development

No branches or pull requests

2 participants