Kernel fails to execute code for killing OOM task if oom_kill_allocating_task = 0

Bug #1359766 reported by Serhiy Zahoriya
44
This bug affects 9 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned

Bug Description

The problem is thoroughly described in this question: http://askubuntu.com/q/398236/20275

Steps to reproduce:
Make sure oom_kill_allocating_task = 0 (it's the default configuration)
cat /proc/sys/vm/oom_kill_allocating_task
echo 0 | sudo tee /proc/sys/vm/oom_kill_allocating_task
Disable your swap to make the test faster.
Fill your RAM.
After that the machine will freeze completely forever spinning HDD for some reason and thus slowly degrading it.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-3.13.0-34-generic 3.13.0-34.60
ProcVersionSignature: Ubuntu 3.13.0-34.60-generic 3.13.11.4
Uname: Linux 3.13.0-34-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.3
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: int 2114 F.... pulseaudio
CurrentDesktop: KDE
Date: Thu Aug 21 16:40:15 2014
HibernationDevice: RESUME=UUID=52f0a457-e6ab-4711-a129-83170285523b
MachineType: ASUSTeK COMPUTER INC. X502CA
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.13.0-34-generic root=/dev/mapper/kubuntu--vg-root ro quiet
RelatedPackageVersions:
 linux-restricted-modules-3.13.0-34-generic N/A
 linux-backports-modules-3.13.0-34-generic N/A
 linux-firmware 1.127.5
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/21/2013
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: X502CA.207
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: X502CA
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrX502CA.207:bd02/21/2013:svnASUSTeKCOMPUTERINC.:pnX502CA:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnX502CA:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
dmi.product.name: X502CA
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.

Revision history for this message
Serhiy Zahoriya (xintx-ua) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Did the issue of "the machine will freeze completely forever spinning HDD for some reason and thus slowly degrading it." just start happening in a recent kernel update, or has this always been the case?

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.17 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-rc1-utopic/

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I was unable to reproduce this issue on my machine, which has an SSD drive.

I'm using the eatmemory program found at:
https://github.com/julman99/eatmemory

I run eatmemory and pass it an argument of 10G. I can see the program start to consume memory by using vmstat and top. However, an oomkill happened right when all them memory was exhausted and the eatmemory process was killed.

I didn't notice any effect on interactive performance once the OOM kill happened.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I should mention I am using the default sysctl parameters, so oom_kill_allocating_task was set to 0.

Revision history for this message
Serhiy Zahoriya (xintx-ua) wrote :

Fixed with v3.17-rc1-utopic

tags: added: kernel-fixed-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

The 3.13.0-35 kernel is now available in the -proposed repository. Would it be possible for you to test this latest kernel and post back if it resolves this bug?
See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed.

We can perform a "Reverse" kernel bisect to find the commit that fixes this, if the bug still exists in -proposed.

Thank you in advance!

Revision history for this message
Serhiy Zahoriya (xintx-ua) wrote :

-35 fixed this bug bug killed USB and WiFi completely.

Revision history for this message
Serhiy Zahoriya (xintx-ua) wrote :

s/bug bug/bug but/

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to open a new bug for the issue that now happens with USB and WiFi?

Changed in linux (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Can you apply the latest updates and confirm if this bug is fixed or not?

Changed in linux (Ubuntu):
status: Fix Committed → Incomplete
Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
gatopeich (gatoguan-os) wrote :

Just happened to me on Ubuntu 18.04.4 LTS with kernel v5.

FFS, Ubuntu should just set oom_kill_allocating_task = 1 by default.

Revision history for this message
Suor (suor-web) wrote :

Have this bug on Ubuntu 20.04.1 LTS with 5.4.0-58-generic kernel. This doesn't hang indefenitely though, sometimes the system is able to recover after a couple of minutes.

Revision history for this message
Francesco Baciu (france1) wrote :

This bug also happens with Ubuntu 21.04
Maybe the kernel-oom script is unloaded and on hdds it takes too long to load the script As there is no free RAM. I do not know how Bad the developers of ubuntu are but I think I quit Ubuntu. It is useless, not optimized...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers