Subject: bug#145: ASCII: System fails to shutdown/reboot with encrypted filesystems

From: Alessandro Selli <[email-masked]>
Date: Tue, 19 Sep 2017 00:10:21 +0200

Package: cryptsetup-bin
Version: 2:1.7.3-4

When shutting down Devuan ASCII on two PC, a laptop and a mini-PC, system
hangs when it tries to stop the root filesystem's dm device. As both systems
do not poweroff or reboot, they have to be shutdown by hardware (power
button kept depressed).
The problem did not manifest itself when running Jessie.
The problem occures when running both the distro's kernel and when running a
custom, plain-vanilla 4.9|12|13 one.
Both systems have a dmcrypt partition for /, another one for /usr, another one
for swap and a fourth one for /home.

Full screen log
from one of the systems that was shutdown from a separate ssh session:

Devuan GNU/Linux ascii/ceres wkstn06 tty1

Hint: Caps Lock on

wkstn06 login: [ 6054.123294] usb 7-1: device not accepting address 15, error
-62 INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signal
[info] Using makefile-style concurrent boot in runlevel 6.
[ ok ] Stopping RPC port mapper daemon: rpcbind.
[FAIL] Stopping X display manager: slim failed!
[ ok ] Stopping SMP IRQ balancer: irqbalance.
[ ok ] Stopping deferred execution scheduler: atd.
[ ok ] Stopping mouse interface server: gdm.
[ ok ] Stopping NFS common utilities: idmapd statd.
[ ok ] Stopping internet superserver: xinetd.
[ ok ] Shutting down ALSA...done.
[ ok ] Asking all remaining processes to terminate...done.
[ ok ] All processes ended within 2 seconds...done.
[ ok ] Stopping enhanced syslogd: rsyslogd.
[....] Deconfiguring network interfaces...Removed stale PID file
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:60:46:48:c4:2d
Sending on   LPF/wlan0/00:60:46:48:c4:2d
Sending on   Socket/fallback
DHCPRELEASE on wlan0 to 192.168.1.13 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
dhclient.c:2733: Failed to send 300 byte long packet over fallback interface.
done.
[info] Saving the system clock.
[info] Hardware Clock updated to Wed Sep 13 09:55:44 WEST 2017.
[ ok ] Unmounting local filesystems...done.
Stopping remaining crypto disks...sda2_crypt (busy)...sda2_crypt
busy......sda2_crypt (busy)...sda2_crypt busy......sda2_crypt
(busy)...sda2_crypt busy......sda2_crypt (busy)...sda2_crypt
busy......sda2_crypt (busy)...sda2_crypt busy......sda2_crypt (busy)...failed.