How to interpret this kernel message: cgroup out of memory: Kill process 1234 … score 1974 or sacrifice child?

拥有回忆 提交于 2019-12-24 15:03:17

问题


So, I'm running a docker container that's getting killed.

Memory cgroup out of memory: Kill process 1014588 (my-process) score 1974 or sacrifice child

The pid doesn't really help since the instance will be restarted. I'm not sure what to make of the score 1974 portion. Is that some kind of rating? Is that the number of bytes it needs to drop to?

Could the kill be issued because of other things on the system that are squeezing this container, or can this only this container is topped out?

And the sacrifice child part, I think that would be in regards to some kind of subprocess?


回答1:


I believe this is actually answered here

If you check the Linux kernel code here. You'll see:

/*
 * If any of p's children has a different mm and is eligible for kill,
 * the one with the highest oom_badness() score is sacrificed for its
 * parent.  This attempts to lose the minimal amount of work done while
 * still freeing memory.
 */

mm means 'Memory Management'.

The only difference here is that this kill is getting triggered by cgroups because you have probably run into memory limits.



来源:https://stackoverflow.com/questions/52654979/how-to-interpret-this-kernel-message-cgroup-out-of-memory-kill-process-1234

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!