fails to start cryptswap

Bug #1467906 reported by Eric Phetteplace
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Background:
1. Fresh boot
2. Suspend, and computer appears to suspend.
3. Resume and computer resumes.
4. Try to shut down, and it will not.
4a. Message in /var/log/syslog: Failed to start poweroff.target: Transaction is destructive.

I am reporting this bug after a fresh boot, using ubuntu-bug

Perhaps this is the underlying issue. I have a relatively new install of Ubuntu 15.04. During install, I chose to encrypt my partitions. Upon booting, I enter my key for the primary partition and the swap partition. I don't think cryptswap is properly starting:

ericp@pucky:~$ systemctl list-jobs
JOB UNIT TYPE STATE
563 dev-mapper-cryptswap1.device start running
564 dev-mapper-cryptswap1.swap start waiting
549 <email address hidden> start running

Running top, I see swap is allocated, and I've seen it being used. I'm not sure what it never gets to a happy state.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: systemd 219-7ubuntu6
ProcVersionSignature: Ubuntu 3.19.0-21.21-generic 3.19.8
Uname: Linux 3.19.0-21-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Jun 23 07:26:31 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-06-09 (14 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
MachineType: TOSHIBA Satellite E55-A
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.19.0-21-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=7
SourcePackage: systemd
UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/02/2013
dmi.bios.vendor: TOSHIBA
dmi.bios.version: 1.50
dmi.board.asset.tag: *
dmi.board.name: ZEMAA
dmi.board.vendor: TOSHIBA
dmi.board.version: 1.00
dmi.chassis.asset.tag: *
dmi.chassis.type: 10
dmi.chassis.vendor: TOSHIBA
dmi.chassis.version: *
dmi.modalias: dmi:bvnTOSHIBA:bvr1.50:bd12/02/2013:svnTOSHIBA:pnSatelliteE55-A:pvrPSKPJU-01K023:rvnTOSHIBA:rnZEMAA:rvr1.00:cvnTOSHIBA:ct10:cvr*:
dmi.product.name: Satellite E55-A
dmi.product.version: PSKPJU-01K023
dmi.sys.vendor: TOSHIBA

Revision history for this message
Eric Phetteplace (ericp-l) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Indeed this sounds like one of the recent cryptswap bugs: bug 1447282, bug 953875 (which are both fixed in -updates) and perhaps bug 1453738 (but this only applies to LVM which you don't seem to use). Please copy&paste the output of

  sudo blkid
  ls -lR /dev/disk/by-uuid
  grep -v '^#' /etc/fstab
  cat /etc/crypttab

Thanks!

Changed in systemd (Ubuntu):
status: New → Incomplete
summary: - Suspend, resume, can't shut down (cryptswap is suspect)
+ fails to start cryptswap
Revision history for this message
Eric Phetteplace (ericp-l) wrote :

Indeed! After a little more investigating, I commented out two lines in my fstab. I've been manually mounting the encrypted swap partition since then.

ericp@pucky:~$ sudo blkid
[sudo] password for ericp:
/dev/mapper/sda5_crypt: UUID="uDe29v-IL2u-mHU0-GBjD-H9ji-DCNc-P29L5g" TYPE="LVM2_member"
/dev/sda1: UUID="b4203a7f-9fc4-42c6-bd9d-f5796fff0f80" TYPE="ext2" PARTUUID="5cc8b93f-01"
/dev/sda5: UUID="447ea4a7-b12a-4b3b-b7ec-bef21e754103" TYPE="crypto_LUKS" PARTUUID="5cc8b93f-05"
/dev/mapper/ubuntu--vg-root: UUID="3864ee8c-65e6-4608-89ef-4cb0fec13d6c" TYPE="ext4"
/dev/mapper/ubuntu--vg-swap_1: UUID="709c35fb-a74b-4c98-b341-246e0e65621d" TYPE="swap"
/dev/mapper/cryptswap1: UUID="7564b3fa-a22b-42ee-948a-be7104a5dbb1" TYPE="swap"

ericp@pucky:~$ ls -lR /dev/disk/by-uuid
/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 root root 10 Jun 30 08:09 3864ee8c-65e6-4608-89ef-4cb0fec13d6c -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 30 08:09 447ea4a7-b12a-4b3b-b7ec-bef21e754103 -> ../../sda5
lrwxrwxrwx 1 root root 10 Jun 30 08:09 709c35fb-a74b-4c98-b341-246e0e65621d -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 30 08:09 7564b3fa-a22b-42ee-948a-be7104a5dbb1 -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 30 08:09 b4203a7f-9fc4-42c6-bd9d-f5796fff0f80 -> ../../sda1

fstab - I'm including the lines I commented out:
/dev/mapper/ubuntu--vg-root / ext4 errors=remount-ro 0 1
UUID=b4203a7f-9fc4-42c6-bd9d-f5796fff0f80 /boot ext2 defaults 0 2
# ericp this is not the encrypted swap? /dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0
# ericp this doesn't exist /dev/mapper/cryptswap1 none swap sw 0 0

ericp@pucky:~$ cat /etc/crypttab
sda5_crypt UUID=447ea4a7-b12a-4b3b-b7ec-bef21e754103 none luks,discard
cryptswap1 UUID=709c35fb-a74b-4c98-b341-246e0e65621d /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

There it is. Interestingly enough, I've been using /dev/mapper to manually mount dm-3 as my crypt swap, and it's been working fine.

ericp@pucky:~$ ll /dev/mapper
total 0
drwxr-xr-x 2 root root 140 Jun 30 08:09 ./
drwxr-xr-x 22 root root 4680 Jun 30 08:30 ../
crw------- 1 root root 10, 236 Jun 30 08:09 control
lrwxrwxrwx 1 root root 7 Jun 30 08:09 cryptswap1 -> ../dm-3
lrwxrwxrwx 1 root root 7 Jun 30 08:09 sda5_crypt -> ../dm-0
lrwxrwxrwx 1 root root 7 Jun 30 08:09 ubuntu--vg-root -> ../dm-1
lrwxrwxrwx 1 root root 7 Jun 30 08:09 ubuntu--vg-swap_1 -> ../dm-2

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, so you do use LVM after all. So this is bug 1453738. So removing "cryptswap1" from /etc/crypttab and /etc/fstab is correct. You can/should leave sda5_crypt so that you retain some swap (that's the encrypted one).

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.