oom killer and its superior braindamage in 2.4
Marc, Rik,
Quoted 8 lines
- Feb 21 10:04:57 codeman kernel: Out of Memory: Killed process 2657 (apache).
The above log entry (apache) appeared for about 4 hours every some seconds (same PID) until I thought about sysrq-b to get out of this braindead behaviour. The machine was somewhat dead for me because I was not able to do anything but sysrq. The system itself was _not_ dead, there was massive disk i/o. This is 2.4.20 vanilla.
This exact thing happened to me as well, on a 2.4.20-pre that hasn't been upgraded to 2.4.20 yet. The thing that concerns me most is:
Why won't the system kill the process it claims to be killing?
If, in Marc's case, the system wants to kill PID 2657, a lowly sleeping apache process, why can't it? This is a bug for sure.
For me, there was some python process chosen as the one for killing and it repeated the 'Out of Memory: Killed process xxxxx (python)' for hours while making no progress. The machine was still routing packets but I couldn't log in. Sys-rq was disabled, so I was forced to use the big red button.
Rik, any ideas?
David
Signature · 4 lines
/==============================\ | David Mansfield | | [email protected] | \==============================/
Quoted 8 lines
This exact thing happened to me as well, on a 2.4.20-pre that hasn't been upgraded to 2.4.20 yet. The thing that concerns me most is:
Why won't the system kill the process it claims to be killing?
If, in Marc's case, the system wants to kill PID 2657, a lowly sleeping apache process, why can't it? This is a bug for sure.
Quoted 7 lines
For me, there was some python process chosen as the one for killing and it repeated the 'Out of Memory: Killed process xxxxx (python)' for hours while making no progress. The machine was still routing packets but I couldn't log in. Sys-rq was disabled, so I was forced to use the big red button.
Rik, any ideas?
But, did you follow that thread? Rik van Riel, already suggested a solution for the problem.
http://marc.theaimsgroup.com/?l=linux-kernel&m=104594301523518&w=2
Quoted 1 line · David Mansfield
Rik, any ideas?
You could try the patch I sent to Marc and linux-kernel yesterday afternoon ;)
Rik
Signature · 2 lines
Engineers don't grow up, they grow sideways. http://www.surriel.com/ http://kernelnewbies.org/
Quoted 9 lines · David Mansfield
Quoted 2 lines
Rik, any ideas?
You could try the patch I sent to Marc and linux-kernel yesterday afternoon ;)
You miss my point completely. The kernel has ALREADY chosen a task to kill. I don't care to adjust the 'badness' function. The kernel has already chosen a bad task.
If you read my post, the bug is that the kernel CANNOT kill that process? Why? If it's really a bad process, shouldn't it be the one that gets killed?
With you patch we have:
1) Kernel goes OOM
2) Kernel picks the worst task to kill using badness()
3) Kernel attempts to kill this task but fails due to some {reason|bug}.
4) Kernel now picks some other task to kill even though the 'baddest' one is allowed to hang out.
This is my question, and I don't see how the patch addresses it.
David
Signature · 4 lines
/==============================\ | David Mansfield | | [email protected] | \==============================/
Quoted 5 lines · David Mansfield
If you read my post, the bug is that the kernel CANNOT kill that process? Why? If it's really a bad process, shouldn't it be the one that gets killed?
This is my question, and I don't see how the patch addresses it.
And you won't see one, either. You cannot change the semantics of uninterruptible sleep, nor can the OOM killer change other device driver things.
This means the OOM killer has little choice but to "hope for the best" and pick another process if the first process chosen can't exit.
If you think you can fix all drivers to work fine when tasks suddenly disappear, I guess you might wnat to create such a patch ...
regards,
Rik
Signature · 2 lines
Engineers don't grow up, they grow sideways. http://www.surriel.com/ http://kernelnewbies.org/
Quoted 10 lines
Quoted 6 lines
If you read my post, the bug is that the kernel CANNOT kill that process? Why? If it's really a bad process, shouldn't it be the one that gets killed?
This is my question, and I don't see how the patch addresses it.
And you won't see one, either. You cannot change the semantics of uninterruptible sleep, nor can the OOM killer change other device driver things.
So you're saying that a process can stay in the D state, without ever getting enough resources to complete a single Uninteruptible wait, for hours at a time?
Ok. Now I understand your patch. Thanks for the info.
You should push your patch to Marcelo.
Thanks,
David
Signature · 4 lines
/==============================\ | David Mansfield | | [email protected] | \==============================/
Quoted 3 lines · David Mansfield
So you're saying that a process can stay in the D state, without ever getting enough resources to complete a single Uninteruptible wait, for hours at a time?
Or even in the R state, but that would only happen when there is a kernel bug. The OOM killer can do nothing but hope for the best and try another process if the first one doesn't want to exit.
Quoted 3 lines
Ok. Now I understand your patch. Thanks for the info.
You should push your patch to Marcelo.
Will do.
cheers,
Rik
Signature · 2 lines
Engineers don't grow up, they grow sideways. http://www.surriel.com/ http://kernelnewbies.org/