swapoff failed: Cannot allocate memory

Bug #1819076 reported by efa
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Confirmed
Undecided
Unassigned

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)

Revision history for this message
efa (efa) wrote :
Revision history for this message
efa (efa) wrote :
Revision history for this message
efa (efa) wrote :

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

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in util-linux (Ubuntu):
status: New → Confirmed
Revision history for this message
efa (efa) wrote :

happen on 18.04.3 LTS bionic too

Revision history for this message
efa (efa) wrote :

$ uname -a
Linux 02cor2130 5.0.0-32-generic #34~18.04.2-Ubuntu SMP Thu Oct 10 10:36:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

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.