Open liuguangwei opened 2 years ago
+1
我运行这个加了延迟的代码。会有这个报错 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
该例子中存在线程问题,如果执行 stress命令早于创建文件夹,会导致创建的任务pid不写入testmemorylimit/tasks中,而是写入user.slice/tasks中,内存限制失效,需要添加延迟操作,确保testmemorylimit先创建