VMware Communities
troybowman2000
Contributor
Contributor
Jump to solution

Using GDB stub for macOS 11.0 guest causes a panic with VMware Fusion 12

If I enable the GDB stub for a macOS 11 (Big Sur) guest VM:

   debugStub.listen.guest64 = "TRUE"

Then connect to it with lldb, and set a breakpoint:

  (lldb) gdb-remote localhost:8864

  Process 1 stopped

  * thread #1, stop reason = signal SIGTRAP

      frame #0: 0x00007fff20298d1a

  (lldb) c

  Process 1 resuming

  Process 1 stopped

  * thread #1, stop reason = signal SIGINT

      frame #0: 0xffffff80003f0566

  ->  0xffffff80003f0566: cli

      0xffffff80003f0567: movq   %gs:0x0, %rax

      0xffffff80003f0570: andq   $-0x2, 0x100(%rax)

      0xffffff80003f0578: callq  0xffffff80002611b0

  (lldb) b 0xffffff80003f0567

  Breakpoint 1: address = 0xffffff80003f0567

The guest OS crashes immediately, and I get the following in vmware.log:

  vmx| W003: Debug stub: Remote connection accepted from 192.168.1.112

  vmx| I005: SOCKET 9 (188) AsyncTCPSocketSetOption: Option layer/level [6], option/name [1]: successfully set OS option for TCP socket.

  vcpu-0| I005: Vix: [vmxCommands.c:4557]: VMAutomation_Pause: pause = TRUE

  vcpu-0| I005: Not informing DCL we are stopping.

  vcpu-1| E001: PANIC: NOT_IMPLEMENTED bora/vmcore/monitor/common/main/vmm/debugReg.c:287

  vcpu-1| I005: Panic: can't get userlevel lock.

  vcpu-0| E001: PANIC: NOT_IMPLEMENTED bora/vmcore/monitor/common/main/vmm/debugReg.c:287

  vcpu-0| E001: Panic loop

  vcpu-0| I005: Backtrace:

  vcpu-0| I005: Backtrace[0] rip=000000010d090d5f

  vcpu-0| I005: Backtrace[1] rip=000000010cacec9b

  vcpu-0| I005: Backtrace[2] rip=000000010d325fbb

  vcpu-0| I005: SymBacktrace[0] rip=000000010d090d5f in function (null) in object /Applications/VMware Fusion.app/Contents/Library/vmware-vmx loaded at 000000010ca8e000

  vcpu-0| I005: SymBacktrace[1] rip=000000010cacec9b in function (null) in object /Applications/VMware Fusion.app/Contents/Library/vmware-vmx loaded at 000000010ca8e000

  vcpu-0| I005: SymBacktrace[2] rip=000000010d325fbb in function (null) in object /Applications/VMware Fusion.app/Contents/Library/vmware-vmx loaded at 000000010ca8e000

This line is the problem I guess:

  vcpu-1| E001: PANIC: NOT_IMPLEMENTED bora/vmcore/monitor/common/main/vmm/debugReg.c:287

According to the release notes macOS 11 is supported with VMware Fusion 12. Why isn't debugging supported? Can this be fixed?

1 Solution

Accepted Solutions
covelli
VMware Employee
VMware Employee
Jump to solution

We are working with Apple to resolve some issues involving debug registers on BigSur and will enable support for the GDB stub on BigSur once that has been done.  Sorry for the trouble.

View solution in original post

3 Replies
covelli
VMware Employee
VMware Employee
Jump to solution

We are working with Apple to resolve some issues involving debug registers on BigSur and will enable support for the GDB stub on BigSur once that has been done.  Sorry for the trouble.

troybowman2000
Contributor
Contributor
Jump to solution

Understandable. It seems Big Sur is still very much in a state of flux. Thank you for the reply!

Reply
0 Kudos
troybowman2000
Contributor
Contributor
Jump to solution

A follow-up on this: If I set the following option in the vmx file:

  debugStub.hideBreakpoints = "FALSE"

Then breakpoints work as expected, without the guest crashing.

This option allows Fusion to avoid using debug registers entirely in favor of pure software breakpoints. This is a perfectly acceptable workaround for now.