Double swapon message

Bug #1742934 reported by Cristian Aravena Romero
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux
Unknown
Unknown
linux (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Hello,

dmesg:
[ 4.086945] swapon: swapfile has holes
[ 5.507148] swapon: swapfile has holes

Regards,
--
Cristian

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.13.0-25-generic 4.13.0-25.29
ProcVersionSignature: Ubuntu 4.13.0-25.29-generic 4.13.13
Uname: Linux 4.13.0-25-generic x86_64
ApportVersion: 2.20.8-0ubuntu6
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/pcmC0D0p: caravena 1664 F...m pulseaudio
 /dev/snd/controlC0: caravena 1664 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
Date: Fri Jan 12 09:50:39 2018
InstallationDate: Installed on 2017-10-13 (90 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170926)
MachineType: SAMSUNG ELECTRONICS CO., LTD. 530U3C/530U4C
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-4.13.0-25-generic root=UUID=707d0f89-4b1d-4432-9d50-6058dc4c1ee9 ro rootflags=subvol=@ quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-4.13.0-25-generic N/A
 linux-backports-modules-4.13.0-25-generic N/A
 linux-firmware 1.170
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/15/2013
dmi.bios.vendor: Phoenix Technologies Ltd.
dmi.bios.version: P14AAJ
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: SAMSUNG_NP1234567890
dmi.board.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.board.version: FAB1
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 9
dmi.chassis.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnPhoenixTechnologiesLtd.:bvrP14AAJ:bd04/15/2013:svnSAMSUNGELECTRONICSCO.,LTD.:pn530U3C/530U4C:pvr0.1:rvnSAMSUNGELECTRONICSCO.,LTD.:rnSAMSUNG_NP1234567890:rvrFAB1:cvnSAMSUNGELECTRONICSCO.,LTD.:ct9:cvr0.1:
dmi.product.family: ChiefRiver System
dmi.product.name: 530U3C/530U4C
dmi.product.version: 0.1
dmi.sys.vendor: SAMSUNG ELECTRONICS CO., LTD.

Revision history for this message
Cristian Aravena Romero (caravena) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Colin Ian King (colin-king) wrote :

systemd is reporting:

systemd[1]: swapfile.swap: Failed with result 'exit-code'.

so you are using a non-raw device swapfile called swapfile.swap that is not a contiguous swap file (that is, has no file holes), hence it can't be used as swap. Linux will create files with holes to save space (this is a sparse file) but swap files must not have holes.

The location of the swap file can be found using:

grep swap /etc/fstab

A good way to generate a swapfile without holes is to use dd, e.g.

sudo dd if=/dev/zero of=/path/swapfile.swap bs=1024 count=1048576
sudo chmod 0600 /path/swap.swp
sudo chown root:root /path/swap.swp

..where path is the path to the swapfile.

This is not a kernel bug, but a mis-configuration of the swap file.

Changed in linux (Ubuntu):
status: Triaged → Invalid
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.