Skip to content

Instantly share code, notes, and snippets.

@jlevon
Last active July 17, 2019 15:22
Show Gist options
  • Save jlevon/79aa97c09f46754ca3a10abe2fd0a90e to your computer and use it in GitHub Desktop.
Save jlevon/79aa97c09f46754ca3a10abe2fd0a90e to your computer and use it in GitHub Desktop.
debugging SmartOS boot hang

In the loader menu, drop into:

    2. [Esc]ape to loader prompt

then

boot -kv -m verbose -B nmi=kmdb

When it hangs, trigger an NMI. (For example, virsh inject-nmi smartos). Back on the console, you should have dropped into KMDB, and can get a backtrace:

[0]> $C
fffffffffbc13e70 kmdb_enter+0xb()
fffffffffbc13ea0 debug_enter+0x59(fffffffff794d6d3)
fffffffffbc13ed0 apix`apic_nmi_intr+0x9e(0, fffffffffbc13f10)
fffffffffbc13f00 av_dispatch_nmivect+0x34(fffffffffbc13f10)
fffffffffbc13f10 nmiint+0x152()
...

Other commands such as ::stacks and ::walk cpu | ::cpustack might be useful at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment