lowmemorykiller killing processes when swap still available

Bug #1235161 reported by Paul Gauret
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Tim Gardner
Saucy
Fix Released
Undecided
Tim Gardner

Bug Description

Hi there,

I've upgraded a number of test systems to the latest Saucy beta. I've seen quite a few cases of processes being killed by lowmemorykiller with the following entries being logged:

[ 291.565121] lowmemorykiller: send sigkill to 4476 (python), adj 0, size 8864
[23515.006794] lowmemorykiller: send sigkill to 944 (update-apt-xapi), adj 0, size 44175

The systems where this happens are kvm virtual machines with relatively modest amounts of RAM allocated (256 or 512 MB) with 2 GB swap. The swap is mostly unused when the kills occur.

I searched around and could only find references to Android for lowmemorykiller and nothing on how to disable it. I tried the following without success:

echo '9999,9999' > /sys/module/lowmemorykiller/parameters/adj

Any ideas on how to disable lowmemorykiller or at least prevent processes to be killed rather than swapped?

---
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Oct 3 18:30 seq
 crw-rw---- 1 root audio 116, 33 Oct 3 18:30 timer
AplayDevices: Error: [Errno 2] No such file or directory
ApportVersion: 2.12.5-0ubuntu1
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: [Errno 2] No such file or directory
DistroRelease: Ubuntu 13.10
HibernationDevice: RESUME=UUID=9d9d5ee8-6637-494c-a445-175def866e68
IwConfig: Error: [Errno 2] No such file or directory
Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: Bochs Bochs
MarkForUpload: True
Package: linux (not installed)
PciMultimedia:

ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.11.0-11-generic root=UUID=a693cab7-d536-4f4c-8f9e-02d84b2ad614 ro nosplash noplymouth console=tty0 console=ttyS0,115200n8
ProcVersionSignature: Ubuntu 3.11.0-11.17-generic 3.11.3
RelatedPackageVersions:
 linux-restricted-modules-3.11.0-11-generic N/A
 linux-backports-modules-3.11.0-11-generic N/A
 linux-firmware 1.116
RfKill: Error: [Errno 2] No such file or directory
Tags: saucy
Uname: Linux 3.11.0-11-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

WifiSyslog:
 Oct 4 07:10:46 vm2 kernel: [45649.533724] perf samples too long (2568 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
 Oct 4 14:18:47 vm2 kernel: [71330.618497] perf samples too long (5018 > 5000), lowering kernel.perf_event_max_sample_rate to 25000
dmi.bios.date: 01/01/2011
dmi.bios.vendor: Bochs
dmi.bios.version: Bochs
dmi.chassis.type: 1
dmi.chassis.vendor: Bochs
dmi.modalias: dmi:bvnBochs:bvrBochs:bd01/01/2011:svnBochs:pnBochs:pvr:cvnBochs:ct1:cvr:
dmi.product.name: Bochs
dmi.sys.vendor: Bochs

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1235161/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Paul Gauret (pgauret)
affects: ubuntu → linux-meta (Ubuntu)
Brad Figg (brad-figg)
affects: linux-meta (Ubuntu) → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1235161

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Paul Gauret (pgauret) wrote : BootDmesg.txt

apport information

tags: added: apport-collected saucy
description: updated
Revision history for this message
Paul Gauret (pgauret) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Paul Gauret (pgauret) wrote : Lspci.txt

apport information

Revision history for this message
Paul Gauret (pgauret) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Paul Gauret (pgauret) wrote : ProcEnviron.txt

apport information

Revision history for this message
Paul Gauret (pgauret) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Paul Gauret (pgauret) wrote : ProcModules.txt

apport information

Revision history for this message
Paul Gauret (pgauret) wrote : UdevDb.txt

apport information

Revision history for this message
Paul Gauret (pgauret) wrote : UdevLog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → New
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
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Saucy):
assignee: nobody → Tim Gardner (timg-tpi)
status: Confirmed → In Progress
Revision history for this message
Tim Gardner (timg-tpi) wrote :

SRU Justification

Impact - low memory killer is too aggressive

Patch description - turn off Android staging drivers
Several of the Android staging drivers can only be built-in to the kernel. As such their use is not voluntary. The list of drivers includes the low memory killer, ashmem, binder, sw_sync, alarm-dev, etc. The _only_ Android drivers that can be built as modules are timed_gpio and logger. Setting CONFIG_ANDROID=n disables all of these drivers.

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Saucy):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.11.0-12.18

---------------
linux (3.11.0-12.18) saucy; urgency=low

  [ Andy Whitcroft ]

  * [Packing] tools -- when tools are off they are off
  * [config] tools -- linux-tools-common really is common
  * [Packaging] tools -- make cpupower optional
  * [Packaging] tools -- fix crosscompilation
  * [config] tools -- enable cpupower
  * SAUCE: storvsc -- host takes MAINTENANCE_IN commands badly elide them
    - LP: #1234417

  [ John Johansen ]

  * SAUCE: apparmor: fix unix domain sockets to be mediated on connection
    - LP: #1208988
  * SAUCE: apparmor: allocate path lookup buffers during init
    - LP: #1208988
  * SAUCE: apparmor: fix memleak of the profile hash
    - LP: #1235523
  * SAUCE: apparmor: fix memleak of replacedby struct
    - LP: #1235973
  * SAUCE: apparmor: fix bad lock balance when introspecting policy
    - LP: #1235977

  [ Paolo Pisati ]

  * [Config] arm: VIRTIO_[BLK|NET|MMIO]=y

  [ Rob Herring ]

  * SAUCE: (no-up) net: calxedaxgmac: fix clearing of old filter addresses
    - LP: #1235272
  * SAUCE: (no-up) net: calxedaxgmac: add uc and mc filter addresses in
    promiscuous mode
    - LP: #1235272
  * SAUCE: (no-up) net: calxedaxgmac: determine number of address filters
    at runtime
    - LP: #1235272

  [ Tim Gardner ]

  * [Config] CONFIG_ANDROID=n
    - LP: #1235161
  * [Config] CONFIG_L2TP_V3=y
    - LP: #1235914
  * Release tracker
    - LP: #1236999

  [ Upstream Kernel Changes ]

  * Revert "HID: core: fix reporting of raw events"
    - LP: #1218004
 -- Andy Whitcroft <email address hidden> Fri, 04 Oct 2013 13:08:59 +0100

Changed in linux (Ubuntu Saucy):
status: Fix Committed → Fix Released
Revision history for this message
Doug Fultz (dougfultz) wrote :

I'm sorry if this is not the right place, but I'm also experiencing this problem on Precise (12.04) using the linux-image-3.8.0-35-generic kernel. Could someone please relate this to Precise or tell me how?

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.