Error on shutdown: Failed deactivating swap /dev/disk/by-id/dm-name-cryptswap1.

Bug #1673379 reported by Laurent Bonnaud
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cryptsetup (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hi,

I am using encrypted swap on this system for years, it works well, but I recently noticed the following error messages on shutdown:

Mar 16 08:22:31 xeelee systemd[1]: Failed deactivating swap /dev/disk/by-id/dm-name-cryptswap1.
Mar 16 08:22:31 xeelee systemd[1]: Stopped (with error) /dev/dm-0.
Mar 16 08:22:31 xeelee systemd[1]: Stopped (with error) /sys/devices/virtual/block/dm-0.
Mar 16 08:22:31 xeelee systemd[1]: Stopped (with error) /dev/disk/by-id/dm-name-cryptswap1.
Mar 16 08:22:31 xeelee systemd[1]: Stopped (with error) /dev/disk/by-id/dm-uuid-CRYPT-PLAIN-cryptswap1.
Mar 16 08:22:31 xeelee systemd[1]: Failed deactivating swap /dev/disk/by-uuid/f2c65884-af53-45b7-8568-788e8e6b93fd.
Mar 16 08:22:31 xeelee systemd[1]: Failed deactivating swap /dev/dm-0.
Mar 16 08:22:31 xeelee systemd[1]: Stopped (with error) /dev/disk/by-uuid/f2c65884-af53-45b7-8568-788e8e6b93fd.
Mar 16 08:22:31 xeelee systemd[1]: Failed deactivating swap /dev/disk/by-id/dm-uuid-CRYPT-PLAIN-cryptswap1.

Here is a summary of my setup (more details added by apport elsewhere):

# cat /etc/fstab
[...]
/dev/mapper/cryptswap1 none swap sw 0 0

# cat /etc/crypttab
cryptswap1 /dev/sda2 /dev/urandom swap,cipher=aes-cbc-essiv:sha256

# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238.5G 0 disk
├─sda1 8:1 0 236.5G 0 part /
└─sda2 8:2 0 2G 0 part
  └─cryptswap1 253:0 0 2G 0 crypt [SWAP]

# blkid
[...]
/dev/sda2: PARTUUID="000d0b0a-02"

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: cryptsetup 2:1.7.2-0ubuntu1
Uname: Linux 4.10.3-041003-lowlatency x86_64
ApportVersion: 2.20.4-0ubuntu2
Architecture: amd64
CurrentDesktop: MATE
Date: Thu Mar 16 09:51:39 2017
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cryptsetup
UpgradeStatus: Upgraded to zesty on 2017-03-12 (3 days ago)
cmdline: BOOT_IMAGE=/boot/vmlinuz-4.10.3-041003-lowlatency root=UUID=7a79b99d-112e-4a6c-9808-ad8da1b2edcd ro quiet splash nomdmonddf nomdmonisw vt.handoff=7
crypttab: cryptswap1 /dev/sda2 /dev/urandom swap,cipher=aes-cbc-essiv:sha256

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :
Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

On another system upgraded to zesty I get different error messages:

avril 10 13:28:05 vougeot systemd[1]: dev-disk-by\x2duuid-4c6b212c\x2d8801\x2d42a6\x2dbdc3\x2d422a9d2cfedd.device: Job dev-disk-by\x2duuid-4c6b212c\x2d8801\x2d42a6\x2dbdc3\x2d422a9d2cfedd.device/stop timed out.
avril 10 13:28:05 vougeot systemd[1]: Timed out stopping /dev/disk/by-uuid/4c6b212c-8801-42a6-bdc3-422a9d2cfedd.
avril 10 13:28:05 vougeot systemd[1]: dev-disk-by\x2duuid-4c6b212c\x2d8801\x2d42a6\x2dbdc3\x2d422a9d2cfedd.device: Job dev-disk-by\x2duuid-4c6b212c\x2d8801\x2d42a6\x2dbdc3\x2d422a9d2cfedd.device/stop failed with result 'timeout'.
avril 10 13:28:05 vougeot systemd[1]: dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dPLAIN\x2dcryptswap1.device: Job dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dPLAIN\x2dcryptswap1.device/stop timed out.
avril 10 13:28:05 vougeot systemd[1]: Timed out stopping /dev/disk/by-id/dm-uuid-CRYPT-PLAIN-cryptswap1.
avril 10 13:28:05 vougeot systemd[1]: dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dPLAIN\x2dcryptswap1.device: Job dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dPLAIN\x2dcryptswap1.device/stop failed with result 'timeout'.
avril 10 13:28:05 vougeot systemd[1]: dev-dm\x2d0.device: Job dev-dm\x2d0.device/stop timed out.
avril 10 13:28:05 vougeot systemd[1]: Timed out stopping /dev/dm-0.
avril 10 13:28:05 vougeot systemd[1]: dev-dm\x2d0.device: Job dev-dm\x2d0.device/stop failed with result 'timeout'.
avril 10 13:28:05 vougeot systemd[1]: dev-disk-by\x2did-dm\x2dname\x2dcryptswap1.device: Job dev-disk-by\x2did-dm\x2dname\x2dcryptswap1.device/stop timed out.
avril 10 13:28:05 vougeot systemd[1]: Timed out stopping /dev/disk/by-id/dm-name-cryptswap1.
avril 10 13:28:05 vougeot systemd[1]: dev-disk-by\x2did-dm\x2dname\x2dcryptswap1.device: Job dev-disk-by\x2did-dm\x2dname\x2dcryptswap1.device/stop failed with result 'timeout'.
avril 10 13:28:05 vougeot systemd[1]: sys-devices-virtual-block-dm\x2d0.device: Job sys-devices-virtual-block-dm\x2d0.device/stop timed out.
avril 10 13:28:05 vougeot systemd[1]: Timed out stopping /sys/devices/virtual/block/dm-0.
avril 10 13:28:05 vougeot systemd[1]: sys-devices-virtual-block-dm\x2d0.device: Job sys-devices-virtual-block-dm\x2d0.device/stop failed with result 'timeout'.

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

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

Changed in cryptsetup (Ubuntu):
status: New → Confirmed
Revision history for this message
dino99 (9d9) wrote :

For the record, this is also ramdomly happening with swap partition not encrypted.
Kind of race i suppose, but cant determine what exactly.
So cryptsetup seems not the main reason of that problem.
Note that cryptsetup is installed due to some packages's dependency.

Revision history for this message
Steve Langasek (vorlon) wrote :

Dino99, this bug report clearly references a device which has "cryptswap" in its name. Saying that it happens on systems without crypted swap enabled, without defining what "it" is, is not helpful. Please file a separate bug report for your issue.

Norbert (nrbrtx)
tags: removed: zesty
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.