Big Sur hang and crash upon shutdown

A few weeks after upgrading to Big Sur I started having problems shutting down:

Roughly two out of three times the Mac hangs with an empty screen and spinning cursor for several minutes. Then it crashes with a kernel panic message and finally reboots taking me back to the login screen. It happens on both our Macs.

Quite a few others are seeing the same behaviour:

It seems that it’s caused by external drives – perhaps in particular those used by Time Machine – and some people have had success by formatting their drives as APFS.

I can confirm this. We have a Time Capsule that is formatted as HFS+. When we are away from the TC, the Macs shut down quickly without problems. I’m reluctant to reformat the TC as I would lose the backups, but it seems I have no other choice, or have I?

Just another data point: I was experiencing a version of this (my Mac would report the crash at next startup, but not reboot itself) for a long time. I narrowed it down to an external HFS+ drive causing a timeout at shut down. I ran Disk Repair on the drive and not only did it find a lot of file links that needed to be repaired, it took nearly 12 hours to complete. The problem went away for about a week, then returned. At that point I converted the drive from HFS+ to APFS, which also took many hours but didn’t lose any data, and that resolved the problem.

Problems like that shouldn’t spontaneously recur. I would consider replacing the drive (or consider a warranty replacement, if that’s applicable).

If you can get SMART data from the drive, that would also be useful information.