惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
腾讯CDC
Y
Y Combinator Blog
L
LangChain Blog
B
Blog
U
Unit 42
P
Proofpoint News Feed
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
WordPress大学
WordPress大学
月光博客
月光博客
Vercel News
Vercel News
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 叶小钗

Peter Steinberger

OpenClaw, OpenAI and the future | Peter Steinberger Shipping at Inference-Speed | Peter Steinberger The Signature Flicker | Peter Steinberger Just Talk To It - the no-bs Way of Agentic Engineering | Peter Steinberger Claude Code Anonymous | Peter Steinberger Live Coding Session: Building Arena | Peter Steinberger My Current AI Dev Workflow | Peter Steinberger Essential Reading for Agentic Engineers - August 2025 | Peter Steinberger Just One More Prompt | Peter Steinberger Poltergeist: The Ghost That Keeps Your Builds Fresh | Peter Steinberger Don't read this Startup Slop | Peter Steinberger Essential Reading for Agentic Engineers - July 2025 | Peter Steinberger Self-Hosting AI Models After Claude's Usage Limits | Peter Steinberger Logging Privacy Shenanigans | Peter Steinberger VibeTunnel's first AI-anniversary | Peter Steinberger Making AppleScript Work in macOS CLI Tools: The Undocumented Parts | Peter Steinberger Peekaboo 2.0 – Free the CLI from its MCP shackles | Peter Steinberger Command your Claude Code Army, Reloaded | Peter Steinberger Essential Reading for Agentic Engineers | Peter Steinberger Slot Machines for Programmers: How Peter Builds Apps 20x Faster with AI | Peter Steinberger My AI Workflow for Understanding Any Codebase | Peter Steinberger stats.store: Privacy-First Sparkle Analytics | Peter Steinberger Showing Settings from macOS Menu Bar Items: A 5-Hour Journey | Peter Steinberger VibeTunnel: Turn Any Browser into Your Mac's Terminal | Peter Steinberger Vibe Meter 2.0: Calculating Claude Code Usage with Token Counting | Peter Steinberger llm.codes: Make Apple Docs AI-Readable | Peter Steinberger Automatic Observation Tracking in UIKit and AppKit: The Feature Apple Forgot to Mention | Peter Steinberger Peekaboo MCP – lightning-fast macOS screenshots for AI agents | Peter Steinberger Migrating 700+ Tests to Swift Testing: A Real-World Experience | Peter Steinberger Commanding Your Claude Code Army | Peter Steinberger
How to macOS Core Dump | Peter Steinberger
Peter Steinberger · 2020-05-21 · via Peter Steinberger

A few weeks after kernel panics started showing up on my MacBook Pro (and after many comments were left, in which I kept pinging Apple and reporting on this issue, and after trying a Supplemental Update but still suffering from this bug), somebody recommended to me that I should disable the “Power Nap” feature. I was skeptical, but sure enough, ever since I disabled it, the kernel panics stopped.

If you just started reading now, check out the backstory: Kernel Panics and Surprise boot-args.

The problem seemingly fixed, I brushed it off and almost forgot about it, but two months after I reported my issue via Feedback Assistant, Apple replied!

I mean, it’s something. But it’s also somewhat of a joke. After my initial reaction of getting mad at how bad Apple’s communication is here, I started seeing this as a challenge and began my search to determine what they could have possibly meant with “Core Dump.”

The Great Core Dump Mystery

If you google “macOS core dump” you will eventually end up on StackOverflow, as is the case with so many things.

The article I found recommends setting ulimit -c unlimited, but this didn’t seem right — how is that related to a kernel panic?

Next up, I looked into Apple’s Technical Note TN2151: Understanding and Analyzing Application Crash Reports, which has a section about Core Dumps, and it also mentioned ulimit:

You can enable core dumps on a system-wide basis by adding the line limit core unlimited to your /etc/launchd.conf file

Problem: This file doesn’t even exist on macOS Catalina. But the above document was last updated in 2010, so that might explain why.

Via Quinn “The Eskimo!”, I also learned about the use case for application core dumps to debug crashers.

Kernel Core Dump(lings)

I’ve asked around on Twitter and learned that a kernel core dump is something else entirely. Thanks to Sarah for helping me here!

Welcome to two easy steps to create your kernel core dump!

1 — Change the boot-args to enable kernel debugging. This needs to be run with csrutil disabled or in recovery mode. keepsyms=1 is used to symbolicate the panic log:

sudo nvram boot-args="debug=0x104c44 keepsyms=1"

2 — Once you get a panic with the debug= boot-args set, just dd the Apple_KernelCoreDump volume on your APFS container to a file:

dd of=“~/IntelFramebufferFun.img” if="/Volumes/Apple_KernelCoreDump"

Deciphering 0x104c44

Of course, my curiosity was sparked when reading debug=0x104c44, which led to just one search result for a crash with VirtualBox.

Wisdom of the Ancients, XKCD 979

All the flags below are related to macOS kernel debugging. It’s easier to look at them one by one when we move to a binary representation. Thankfully, XNU is open source, so we can just look up the source code of /osfmk/kern/debug.h.

0x104c44 = 1 0000 0100 1100 0100 0100

DB_NMI 0x4 changes the power button to create a non-maskable interrupt? (These days, NMI is ⌃+⌘+⌥+⇧+power; the old behavior is via 0x8000.)

DB_ARP 0x40 allows debugging across subnets via ARP (usual flag).

DB_KERN_DUMP_ON_PANIC 0x400 Trigger core dump on panic.

DB_KERN_DUMP_ON_NMI 0x800 Trigger core dump on NMI.

DB_REBOOT_POST_CORE 0x4000 Attempt to reboot after post-panic crashdump/paniclog dump.

DB_REBOOT_ALWAYS 0x100000 Don’t wait for debugger connection.

Let’s check if we got everything: 0x100000 + 0x4000 + 0x800 + 0x400 + 0x40 + 0x4 = 0x104c44.

Articles That Helped

Conclusion

After writing up my story here, I found an article on Mr. Macintosh that documents the very same wake-from-sleep kernel panic. It seems it is fixed in macOS 10.15.5 Beta 4, so there’s no need for me to actually send a macOS Core Dump anymore.

Still, it was an interesting learning experience.

Update: Apple followed up again on FB7642937, this time with detailed instructions: see Network Kernel Core Dump for more on this.