Kernel Panic on login and when mounting for write access (Catalina, Late 2014 iMac)

kernel-panic

I'm absolutely stumped on this one.

Background

  1. This is a late-2014 iMac 5K with 3TB fusion drive, using Apple mouse and Apple keyboard, no third-party hardware attached. The camera has been broken for years. FileVault encryption is enabled.

  2. Current macOS version is 10.15.7 (Catalina, Darwin 19.6.8, build version 19H2).

  3. Also Windows 10 is installed on a Bootcamp partition.

Access Modes

  1. I have no issues booting into Windows.

  2. I can boot up the iMac up to the login screen as normal.

  3. When logging in, the progress bar reaches about 55% before the kernel panic screen appears.

  4. I can login using Single User Mode (Command-S) just fine and view the user account files.

  5. I can access the Local Recovery Mode.

  6. I can also access the Internet Recovery Mode.

  7. I cannot access Safe Mode; Holding down the Shift key upon booting does not seem to activate it. The login screen menu bar does not display the Safe Mode text.

Disks and Mounting Partitions

  1. When booting into local Recovery Mode, I can view the 4 listed Devices:
  • Macintosh HD (Not Mounted) disk3s5 (2.12 TB, Zero KB available).
  • Macintosh HD – Data (Not Mounted) disk3s1 (2.12 TB, Zero KB available).
  • BOOTCAMP (Mounted) disk1s3 (1TB, 671 GB available).
  • macOS Base System (Mounted).
  1. In Single User Mode, df reports:
                         Used      Available  Capacity  Mounted On
/dev/disk2s5       22 289 504    227 239 704        9%  /
devfs                     373              0      100%  /dev
/dev/disk2s1    3 869 883 088    227 239 704       95%  /System/Volumes/Data
/dev/disk2s4        1 063 288    227 239 704        1%  /private/var/vm
  1. Any attempt to mount the unmounted macOS drives in Recovery Mode will trigger the Panic.

  2. Any attempt to repair the macOS drives in local or internet Recovery Modes will trigger the Panic.

  3. Any attempt to mount the macOS drive in Single User Mode (mount -uw /System/Volumes/Data) will trigger the Panic.

  4. Therefore I have no write access and cannot run fsck.

Ruled-out

  1. Resetting SMC and PRAM has already been done.

  2. I had expanded the RAM from 8GB to 24GB recently. I have since removed the extra RAM but the problem persists.

Possible causes

  1. Norton Internet Security is installed and it is possible the kernel extension is interfering with the login process. However this doesn't explain being unable to mount the drive for write access in Single User mode. I cannot uninstall it for the same reason.

  2. The macOS disk is probably full. Problem is, if this is the case, I'm not sure how to delete files since I'm unable to mount the drive for write access in Single User mode.

The Panic Error

  1. When logging in with Verbose Mode enabled, the output contains:
  • Kernel extensions in backtrace:
    • com.apple.filesystem.apfs
    • com.apple.kec.corecrypto
    • com.apple.driver.AppleEffaceableStorage
    • com.apple.iokit.IOStorageFamily
  • panic(cpu 0 caller 0xfff...) /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/apfs/apfs-1412.141.1/nx/fusion_mt.c:651 Assertion failed: length.
  • The are more lines printed with the final ones being:
@kec.pthread 1
@kec.corecrypto 1.0
@kec.libm 1

** In Memory Panic Snapshot Succeeded ** Bytes traced 39400 **
Recorded panic snapshot in corefile at offset 0x7000, compressed to 18557 bytes
[Attempting system restart...]

So, what are my options?

Best Answer

panic(cpu 0 caller 0xfff...) /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/apfs/apfs-1412.141.1/nx/fusion_mt.c:651 Assertion failed: length

Your filesystem is corrupted (probably from continued operation while full). Because there is not yet any third-party tool for repairing APFS volumes, you need to:

  1. Already have, or make, a backup of your essential files. Continue reading below for details.
  2. Erase the disk and reinstall macOS.

There is, unfortunately, no other way out of this. APFS is wonderful when it works, and a complete clusterfuck when it does not.

If you do not already have all of your essential files backed up, you can attempt to salvage them. In decreasing order of convenience, your options for this are:

  1. Target Disk Mode.
  2. Low-level imaging of the drive while booted into an external (non-Mac) OS.
  3. Physically removing the drive from the computer, which requires separating the LCD from the chassis.

TDM is easiest (assuming you have a second Mac available). However, given the problems you had with merely mounting the drive, this may fail in the same way. There's a slight chance that using a newer macOS (i.e., Big Sur) on your lifeboat Mac could possibly work better than trying Catalina, as there's a chance that it contains a newer APFS driver implementation which could handle corruption more gracefully.

If you do install Big Sur on your lifeboat and are able to mount the iMac's TDM'd drive, copy your most essential files off of it first, then attempt to repair with Disk Utility. Do not, under any circumstance, attempt to delete or modify anything on the drive. Otherwise you risk corrupting it beyond repair.