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

配套书籍2.2.3章节的例子cgroup随机不生效 #86

Open
liuguangwei opened this issue Jan 2, 2022 · 2 comments
Open

配套书籍2.2.3章节的例子cgroup随机不生效 #86

liuguangwei opened this issue Jan 2, 2022 · 2 comments

Comments

@liuguangwei
Copy link

该例子中存在线程问题,如果执行 stress命令早于创建文件夹,会导致创建的任务pid不写入testmemorylimit/tasks中,而是写入user.slice/tasks中,内存限制失效,需要添加延迟操作,确保testmemorylimit先创建
image

@123liuziming
Copy link

+1

@xjhonly
Copy link

xjhonly commented Aug 18, 2023

我运行这个加了延迟的代码。会有这个报错
current pid 1
stress: info: [5] dispatching hogs: 0 cpu, 0 io, 1 vm, 0 hdd
stress: FAIL: [5] (415) <-- worker 6 got signal 9
stress: WARN: [5] (417) now reaping child worker processes
stress: FAIL: [5] (421) kill error: No such process
stress: FAIL: [5] (451) failed run completed in 0s
exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants