Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#36323 - Problem shutting down system with bcache+LUKS+btrfs

Attached to Project: Arch Linux
Opened by Eduardo Menezes de Morais (Bolche) - Monday, 29 July 2013, 18:29 GMT
Last edited by Dave Reisner (falconindy) - Friday, 23 August 2013, 01:27 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
A have a fresh Arch Install fully upgraded on a Dell Inpiron 15R SE 7520. In this setup, my root partition uses bcache (from kernel 3.10.3-1, not from the AUR package) for SSD caching. On top of bcache I use LUKS and finally on top of all that, btrfs.
The setup boots, runs and works, but there is a problem: it won't shutdown.
When I try to shutdown with "halt" or "shutdown -h now" I get:

Detaching DM devices.
Detaching DM 253:0.
Could not detach DM /dev/dm-0: Device or resource busy
Cannot finalize remaining file systems and devices, giving up.
...
[ 1309.417073] mei_me 0000:00:16.0: stop
[ 1341.773926] ata3.00: exception Emask 0x0 SErr 0x0 action 0x6 frozen
[ 1341.773978] ata3.00: cmd a0/00:00:00:08:00/00:00:00:00:00/a0 tag 0 pio 16392 in
[ 1341.773978] res 40/00:03:00:00:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
[ 1341.774038] ata3.00: status: { DRDY }
[ 1341.811061] ata3: COMRESET failed (errno=-16)
[ 1341.848244] ata3: COMRESET failed (errno=-16)
[ 1341.924857] ata3: COMRESET failed (errno=-16)
[ 1341.943453] ata3: COMRESET failed (errno=-16)
[ 1341.943498] ata3: reset failed, giving up

After that it just stays there, complaining from time to time that "poweroff:857" is blocked for more than 120 seconds and never shutdown if i don't hold the power button.
I'm using the shutdown hook on mkinitcpio. To debug the issue I put "/bin/ash" on /run/initramfs/shutdown and dropped into a shell. In the shell I can't "umount" or "crypsetup luksClose" the root partition, all of them accusing "Device or resource busy", even though lsof says there is nothing using it.
It does not appear to cause any form of file system corruption.
The problem persists in kernel 3.10.4-1 (testing).

Please ask if you need any additional info.

Additional info:
* linux package 3.10.3-1 and 3.10.4-1
* the led light indicating hard drive activity stays on after the freeze


Steps to reproduce:
Type "halt", "shutdown -h now", "poweroff" or "reboot"
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 23 August 2013, 01:27 GMT
Reason for closing:  Upstream
Additional comments about closing:  No bug here. Working as intended.
Comment by Eduardo Menezes de Morais (Bolche) - Wednesday, 31 July 2013, 17:24 GMT
I found a workaround. Running:
# echo 0 > /sys/block/bcache0/bcache/writeback_running
before umounting solves the issue (forgot to say I was using bcache in writeback mode).
Comment by shanmu thiagaraja (shanmu) - Thursday, 08 August 2013, 21:37 GMT
Hi,
I have the same problem - I have btrfs + bcache only and I am unable to implement the workaround.

Thanks,
Shanmu.

Loading...