[Bug 1819076] Re: swapoff failed: Cannot allocate memory

efa 1819076 at bugs.launchpad.net
Fri Mar 8 07:41:34 UTC 2019


to disable overcommit:
echo 2 > /proc/sys/vm/overcommit_memory
echo 100 > /proc/sys/vm/overcommit_ratio

Or better for persistence, put values in /etc/sysctl.conf
vm.overcommit_memory=X and run sysctl -p. No need to reboot

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1819076

Title:
  swapoff failed: Cannot allocate memory

Status in util-linux package in Ubuntu:
  New

Bug description:
  my memory situation is this:
  4 GB ram total
  2 GB used
  8 GB swap partition in sda5
  about 0 GB swap used

  running command swapoff I got always the error below:

  $ sudo swapoff -a
  swapoff: /dev/sda5: swapoff failed: Cannot allocate memory

  Seems swapoff always failed, when 'overcommit' is disabled (in my case
  for deterministic behave reasons)

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: mount 2.31.1-0.4ubuntu3.3
  ProcVersionSignature: Ubuntu 4.18.0-16.17~18.04.1-generic 4.18.20
  Uname: Linux 4.18.0-16-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.5
  Architecture: amd64
  CurrentDesktop: MATE
  Date: Thu Mar  7 23:38:20 2019
  InstallationDate: Installed on 2016-12-01 (826 days ago)
  InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
  SourcePackage: util-linux
  UpgradeStatus: Upgraded to bionic on 2018-09-23 (165 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1819076/+subscriptions



More information about the foundations-bugs mailing list