NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/54969 (Disk cache is no longer flushed on shutdown)



The following reply was made to PR kern/54969; it has been noted by GNATS.

From: "Greg A. Woods" <woods%planix.ca@localhost>
To: NetBSD GNATS <gnats-bugs%NetBSD.org@localhost>
Cc: "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost>
Subject: Re: kern/54969 (Disk cache is no longer flushed on shutdown)
Date: Thu, 06 May 2021 14:38:11 -0700

 --pgp-sign-Multipart_Thu_May__6_14:37:55_2021-1
 Content-Type: text/plain; charset=US-ASCII
 
 At Wed, 5 May 2021 15:51:08 +0200, "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost> wrote:
 Subject: Re: kern/54969 (Disk cache is no longer flushed on shutdown)
 >
 > The attached diffs should fix the problem with device-mapper
 > devices getting detached too early.
 
 Thank you very much!
 
 > Please report if this fix really works.
 
 I would say that they do work, though I wasn't brave enough to leave the
 filesystem really dirty -- I unmounted it manually, re-mounted it, then
 copied one new file to it before rebooting.  Perhaps I should have left
 my console login shell sitting with its CWD in that filesystem just to
 try to delay the umount from working further.
 
 Here are the verbose shutdown messages from the kernel showing that
 /build unmounted right away without complaint, and the dm(4) devices
 detach much later:
 
 [ 1295581.6679937] unmounted /dev/mapper/scratch-build from /build, type ffs
 [ 1295581.6679937] unmounted more.local:/vcs from /more/vcs, type nfs
 [ 1295581.6679937] unmounted more.local:/work from /more/work, type nfs
 [ 1295581.6779931] unmounted more.local:/home from /more/home, type nfs
 [ 1295581.6779931] unmounted more.local:/archive from /more/archive, type nfs
 [ 1295581.6779931] unmounted procfs from /proc, type procfs
 [ 1295581.6779931] unmounted ptyfs from /dev/pts, type ptyfs
 [ 1295581.6779931] unmounted kernfs from /kern, type kernfs
 [ 1295581.9880145] unmounted /dev/dk3 from /usr/pkg, type ffs
 [ 1295582.0080257] unmounted /dev/dk2 from /var, type ffs
 [ 1295582.1180252] unmount of / (/dev/dk0) failed with error 16
 [ 1295582.1180252] WARNING: some file systems would not unmount
 [ 1295582.1180252] unmount of / (/dev/dk0) failed with error 16
 [ 1295582.1180252] WARNING: some file systems would not unmount
 [ 1295583.8281335] brgphy1: detached
 [ 1295583.8481286] bnx1: detached
 [ 1295585.5582807] brgphy0: detached
 [ 1295585.5782645] bnx0: detached
 [ 1295585.5782645] pci6: detached
 [ 1295585.5782645] pci4: detached
 [ 1295585.5782645] sd2: detached
 [ 1295585.5782645] cd1: detached
 [ 1295585.5782645] ppb5: detached
 [ 1295585.5782645] ppb3: detached
 [ 1295585.5782645] scsibus2: detached
 [ 1295585.5782645] scsibus1: detached
 [ 1295585.5782645] pci5: detached
 [ 1295585.5782645] pci3: detached
 [ 1295585.7582583] brgphy2: detached
 [ 1295585.7882989] bnx2: detached
 [ 1295585.7882989] ppb4: detached
 [ 1295585.7882989] ppb2: detached
 [ 1295585.7882989] uhub6: detached
 [ 1295585.7882989] cd0: detached
 [ 1295585.7882989] pci14: detached
 [ 1295585.7882989] pci7: detached
 [ 1295585.7882989] pci2: detached
 [ 1295585.7882989] atapibus0: detached
 [ 1295585.7882989] uhub4: detached
 [ 1295585.7882989] uhub2: detached
 [ 1295585.7882989] uhub1: detached
 [ 1295585.7882989] uhub0: detached
 [ 1295585.7882989] com1: detached
 [ 1295585.7882989] ppb13: detached
 [ 1295585.7982582] ppb6: detached
 [ 1295585.7982582] ppb1: detached
 [ 1295585.7982582] atabus0: detached
 [ 1295585.7982582] usb3: detached
 [ 1295585.7982582] usb2: detached
 [ 1295585.7982582] usb1: detached
 [ 1295585.7982582] usb0: detached
 [ 1295585.7982582] pci13: detached
 [ 1295585.7982582] pci12: detached
 [ 1295585.7982582] pci11: detached
 [ 1295585.7982582] pci10: detached
 [ 1295585.7982582] pci9: detached
 [ 1295585.7982582] pci1: detached
 [ 1295585.7982582] uhci3: detached
 [ 1295585.7982582] uhci2: detached
 [ 1295585.7982582] uhci1: detached
 [ 1295585.7982582] uhci0: detached
 [ 1295585.7982582] ppb12: detached
 [ 1295585.7982582] pchb7: detached
 [ 1295585.7982582] pchb6: detached
 [ 1295585.7982582] pchb5: detached
 [ 1295585.7982582] pchb4: detached
 [ 1295585.7982582] pchb3: detached
 [ 1295585.7982582] pchb2: detached
 [ 1295585.7982582] pchb1: detached
 [ 1295585.7982582] ppb11: detached
 [ 1295585.7982582] ppb10: detached
 [ 1295585.7982582] ppb9: detached
 [ 1295585.7982582] ppb8: detached
 [ 1295585.7982582] ppb0: detached
 [ 1295585.7982582] pchb0: detached
 [ 1295585.7982582] ipmi_acpi0: detached
 [ 1295585.7982582] dm7: detached
 [ 1295585.7982582] dm6: detached
 [ 1295585.7982582] dm5: detached
 [ 1295585.7982582] dm4: detached
 [ 1295585.7982582] dm3: detached
 [ 1295585.7982582] dm2: detached
 [ 1295585.7982582] dm1: detached
 [ 1295585.7982582] dm0: detached
 [ 1295585.7982582] cgd3: detached
 [ 1295585.7982582] vnd3: detached
 [ 1295585.7982582] cgd2: detached
 [ 1295585.7982582] vnd2: detached
 [ 1295585.7982582] cgd1: detached
 [ 1295585.7982582] vnd1: detached
 [ 1295585.7982582] cgd0: detached
 [ 1295585.7982582] vnd0: detached
 [ 1295585.7982582] dk5 at sd1 (scratchdisk0) deleted
 [ 1295585.7982582] dk5: detached
 [ 1295585.7982582] dk4 at sd0 (LVM-vg0) deleted
 [ 1295585.7982582] dk4: detached
 [ 1295585.7982582] dk3 at sd0 (/usr/pkg) deleted
 [ 1295585.7982582] dk3: detached
 
 
 
 
 For the record here's a full log of a failed umount prior to applying
 any patches:
 
 [Mon Apr  5 11:35:12 2021][ 243874.4095581] syncing disks... done
 [Mon Apr  5 11:35:12 2021][ 243874.5395716] unmounted more.local:/vcs from /more/vcs, type nfs
 [Mon Apr  5 11:35:12 2021][ 243874.5395716] unmounted more.local:/work from /more/work, type nfs
 [Mon Apr  5 11:35:12 2021][ 243874.5495735] unmounted more.local:/home from /more/home, type nfs
 [Mon Apr  5 11:35:12 2021][ 243874.5495735] unmounted more.local:/archive from /more/archive, type nfs
 [Mon Apr  5 11:35:13 2021][ 243875.7096504] unmount of /build (/dev/mapper/scratch-build) failed with error 16
 [Mon Apr  5 11:35:13 2021][ 243875.7096504] unmounted procfs from /proc, type procfs
 [Mon Apr  5 11:35:13 2021][ 243875.7096504] unmounted ptyfs from /dev/pts, type ptyfs
 [Mon Apr  5 11:35:13 2021][ 243875.7096504] unmounted kernfs from /kern, type kernfs
 [Mon Apr  5 11:35:14 2021][ 243875.7497417] unmounted /dev/dk3 from /usr/pkg, type ffs
 [Mon Apr  5 11:35:14 2021][ 243875.7797304] unmounted /dev/dk2 from /var, type ffs
 [Mon Apr  5 11:35:14 2021][ 243875.8097252] unmount of / (/dev/dk0) failed with error 16
 [Mon Apr  5 11:35:14 2021][ 243875.8097252] WARNING: some file systems would not unmount
 [Mon Apr  5 11:35:14 2021][ 243875.8097252] unmount of /build (/dev/mapper/scratch-build) failed with error 16
 [Mon Apr  5 11:35:14 2021][ 243875.8097252] unmount of / (/dev/dk0) failed with error 16
 [Mon Apr  5 11:35:14 2021][ 243875.8097252] WARNING: some file systems would not unmount
 [Mon Apr  5 11:35:15 2021][ 243877.5197731] brgphy1: detached
 [Mon Apr  5 11:35:15 2021][ 243877.5398270] bnx1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.2498901] brgphy0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.2699359] bnx0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.2699359] pci6: detached
 [Mon Apr  5 11:35:17 2021][ 243879.2699359] pci4: detached
 [Mon Apr  5 11:35:17 2021][ 243879.2699359] ppb5: detached
 [Mon Apr  5 11:35:17 2021][ 243879.2699359] ppb3: detached
 [Mon Apr  5 11:35:17 2021][ 243879.2699359] pci5: detached
 [Mon Apr  5 11:35:17 2021][ 243879.2699359] pci3: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4599042] brgphy2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4899784] bnx2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4899784] ppb4: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] ppb2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] uhub6: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] uhub5: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] entropy: cd0 detached as an entropy source
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] cd0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] pci14: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] pci7: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] pci2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] atapibus0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] uhub4: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] uhub3: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] uhub2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] uhub1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] uhub0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] com1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] ppb13: detached
 [Mon Apr  5 11:35:17 2021][ 243879.4999078] ppb6: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] ppb1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] atabus0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] usb4: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] usb3: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] usb2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] usb1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] usb0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pci13: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pci12: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pci11: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pci10: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pci9: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pci1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] ehci0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] uhci3: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] uhci2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] uhci1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] uhci0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] ppb12: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pchb7: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pchb6: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pchb5: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pchb4: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pchb3: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pchb2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pchb1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] ppb11: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] ppb10: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] ppb9: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] ppb8: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] ppb0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] pchb0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] ipmi_acpi0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dm5: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dm4: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dm3: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dm2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dm1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dm0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] cgd3: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] vnd3: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] cgd2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] vnd2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] cgd1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] vnd1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] cgd0: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dk5 at sd1 (scratchdisk0) deleted
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dk5: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dk4 at sd0 (LVM-vg0) deleted
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dk4: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dk3 at sd0 (/usr/pkg) deleted
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dk3: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dk2 at sd0 (/var) deleted
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dk2: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dk1 at sd0 (swap) deleted
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] dk1: detached
 [Mon Apr  5 11:35:17 2021][ 243879.5099064] unmount of /build (/dev/mapper/scratch-build) failed with error 16
 [Mon Apr  5 11:35:18 2021][ 243879.5099064] unmount of / (/dev/dk0) failed with error 16
 [Mon Apr  5 11:35:18 2021][ 243879.5099064] WARNING: some file systems would not unmount
 [Mon Apr  5 11:35:18 2021][ 243879.5099064] entropy: sd1 detached as an entropy source
 [Mon Apr  5 11:35:18 2021][ 243879.5099064] sd1: detached
 [Mon Apr  5 11:35:18 2021][ 243879.5099064] unmount of /build (/dev/mapper/scratch-build) failed with error 16
 [Mon Apr  5 11:35:18 2021][ 243879.5099064] unmount of / (/dev/dk0) failed with error 16
 [Mon Apr  5 11:35:18 2021][ 243879.5099064] WARNING: some file systems would not unmount
 [Mon Apr  5 11:35:18 2021][ 243879.5099064] forcefully unmounting /dev/mapper/scratch-build from /build...
 [Mon Apr  5 11:35:18 2021][ 243879.5099064] forcefully unmounted /dev/mapper/scratch-build from /build, type ffs
 [Mon Apr  5 11:35:18 2021][ 243879.5099064] unmount of / (/dev/dk0) failed with error 16
 [Mon Apr  5 11:35:18 2021][ 243879.5199222] WARNING: some file systems would not unmount
 [Mon Apr  5 11:35:18 2021][ 243879.5199222] forcefully unmounting /dev/dk0 from /...
 [Mon Apr  5 11:35:18 2021][ 243879.5199222] forcefully unmounted /dev/dk0 from /, type ffs
 [Mon Apr  5 11:35:18 2021][ 243879.5199222] unmounting done
 [Mon Apr  5 11:35:18 2021][ 243879.5199222] turning off swap... done
 [Mon Apr  5 11:35:18 2021][ 243879.5199222] dk0 at sd0 (/) deleted
 [Mon Apr  5 11:35:18 2021][ 243879.5199222] entropy: sd0 detached as an entropy source
 [Mon Apr  5 11:35:18 2021][ 243879.5199222] sd0: detached
 [Mon Apr  5 11:35:18 2021][ 243879.5199222] scsibus0: detached
 [Mon Apr  5 11:35:18 2021][ 243879.7099877] mfi0: detached
 [Mon Apr  5 11:35:18 2021][ 243879.7099877] pci8: detached
 [Mon Apr  5 11:35:18 2021][ 243879.7099877] ppb7: detached
 [Mon Apr  5 11:35:18 2021][ 243879.7099877] unmounting done
 [Mon Apr  5 11:35:18 2021][ 243879.7099877] turning off swap... done
 [Mon Apr  5 11:35:18 2021][ 243879.7099877] rebooting...
 
 
 What's clear there is that the dm(4) devices do detach before /build is
 properly, or even forcefully, unmounted.
 
 What's not so clear is why it failed the initial umount -- I'm guessing
 though it was because some process was still sitting with its CWD on it.
 
 Perhaps I'll try that one more time just to trick it and before I get
 involved in doing other things that make me reluctant to reboot again.
 
 --
 					Greg A. Woods <gwoods%acm.org@localhost>
 
 Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
 Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>
 
 --pgp-sign-Multipart_Thu_May__6_14:37:55_2021-1
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 Content-Description: OpenPGP Digital Signature
 
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQRuK6dmwVAucmRxuh9mfXG3eL/0fwUCYJRhtgAKCRBmfXG3eL/0
 f4fhAJ4na4boIu/s3KUl/qNDKOlZH6A6zwCgt9g7LpdLZE4QGwfW/A34sfviX8Y=
 =b9Pf
 -----END PGP SIGNATURE-----
 
 --pgp-sign-Multipart_Thu_May__6_14:37:55_2021-1--
 


Home | Main Index | Thread Index | Old Index