Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

External hard-drive causes MacOS to panic and reboot

I have an external hard-drive with lots of important documents and photos on it. The hard-drive is HFS formatted and is encrypted.


When I plug the drive into my computer, it reboots with a kernel panic.


The kernel panic is jnl: do_jnl_io: curlen == 0, offset 0x4a5000 len 0\n" @hfs_journal.c:354


The hard-drive in question had been working fine until recently and was not plugged into other computers other than my main MacBook. It has not been damaged in any way.


MacOS version: 13.5.2 (22G91)

Hardware: MacBook Pro 16-inch, 2021, M1 Max, 64GB Memory


Things that I've already tried to do to resolve the problem:


  1. Update to latest macos updates. This has not helped.
  2. Rebooted and tried again. This has not helped.
  3. Booting in safe mode: same problem
  4. Booting in recovery mode: same problem
  5. Plugged the laptop into another computer: my old 2017 Macbook Pro: same problem - the machine reboots with the same kernel panic with the same message.


A quick search finds the panic defined in `do_journal_io()` in hfs_journal.c.


Other people have reported the same problem, but without resolution:


  1. Macbook Pro and Mac studio shut down automatically after plugged in Sand Disk SSD extreme


I'm guessing that the HFS journal on the risk is corrupt in some way. Is there any other way of recovering the data from this disk?


Stack trace below (full stack trace in additional text)...


panic(cpu 2 caller 0xfffffe001bdf3f78): "jnl: do_jnl_io: curlen == 0, offset 0x4a5000 len 0\n" @hfs_journal.c:354
Debugger message: panic
Memory ID: 0x6
OS release type: User
OS version: 22G90
Kernel version: Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000
Fileset Kernelcache UUID: F3639CABBB2D86D749C378C454E15B7B
Kernel UUID: E88B0B04-7B4D-3E52-8980-A19ED82304F7
Boot session UUID: 23F7F657-C439-45C4-B40E-BAA737BC69C7

MacBook Pro 15″

Posted on Sep 10, 2023 3:08 AM

Reply
Question marked as Best reply

Posted on Sep 10, 2023 4:01 AM

In case anyone every experiences the same problem, I'm documenting the workaround that I managed to use to get readonly access to the corrupt disk:


  1. Install https://github.com/aburgh/Disk-Arbitrator and activate it so that no new volumes are automatically mounted
  2. Open terminal and mount the disk readonly, and without journaling (-j)


mount_hfs -j -o rdonly /dev/disk2s2 /Volumes/Photos

Similar questions

5 replies
Question marked as Best reply

Sep 10, 2023 4:01 AM in response to suprememoocow

In case anyone every experiences the same problem, I'm documenting the workaround that I managed to use to get readonly access to the corrupt disk:


  1. Install https://github.com/aburgh/Disk-Arbitrator and activate it so that no new volumes are automatically mounted
  2. Open terminal and mount the disk readonly, and without journaling (-j)


mount_hfs -j -o rdonly /dev/disk2s2 /Volumes/Photos

Sep 10, 2023 6:41 AM in response to suprememoocow

Thanks for all the helpful responses, the workaround that I posted in External hard-drive causes MacOS to panic… - Apple Community has allowed me to recover the data from the drives.


Against my better experience, I did not have a full backup of all the data on the drive. I'm using this experience as a lesson to make sure I have redundant backups in place in future.


Regarding the journaling: my suspicion is that the drive is absolutely fine at a hardware level, but the HFS journal is corrupt and causing the kernel panic. This is slightly ironic since the journal is there as a recovery mechanism.


Once I've copied all the data off the drive, and verified it, I'll format the drive and try to figure out if the problem is the drive, or just a corrupt journal on the filesystem.


Sep 10, 2023 4:17 AM in response to suprememoocow

suprememoocow wrote:

I have an external hard-drive with lots of important documents and photos on it. The hard-drive is HFS formatted and is encrypted.

When I plug the drive into my computer, it reboots with a kernel panic.

The kernel panic is jnl: do_jnl_io: curlen == 0, offset 0x4a5000 len 0\n" @hfs_journal.c:354


It looks to me like there was an internal assertion failure within the HFS+ journaling code. Some routine with the name of "do_jnl_io" (do journalling I/O?) was expecting some block of data to have a non-zero length, and when presented with a length of zero ("should never happen"), it intentionally crashed the system.


I don't know why "curlen" was 0 – if this was the result of some operating system bug that only is triggered very, very infrequently (and you just happened to hit the conditions that triggered it), or if there was a hardware failure which led to this result.


But it looks as if journaling (which normally helps to protect against bad things happening as a result of improper volume dismounts, power failure, etc.) may have backfired here.


The fact that the crash happens on multiple Macs suggests that

  • There is something wrong with (or unusual about) the state of the journaling data on the drive, that consistently tickles a bug in the journaling code in macOS; or
  • There is something wrong with the hardware of the drive, that consistently interferes with reads and leads to the kernel panic


If the crash was due to, say, the first Mac having a failing/glitchy port, you'd expect that moving the drive to another Mac would have produced a different result.


I'm not sure what to tell you about trying to recover data from the drive.


Do you have backups?


Sep 10, 2023 3:28 AM in response to suprememoocow

Performing the same actions on more than one Apple Computer and getting the same results ?


This kind of looks like the drive has failed or failing to the point that it is causing this issue.


Would suggest keeping the problematic drive disconnect from any computer


The more read / writes to the drive will hamper and possible data recovery from any Professional Apple Data Recovery Company.


Notation : their services are expansive and they would probably tell you they can recovery some data but not ALL Data



External hard-drive causes MacOS to panic and reboot

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.