Kernel Debugging difficulties

I have a crash in a kernel extension that I'm trying to debug with kernel debugging on El Capitan (10.11.3) via TCP/IP


The target machine has been setup to wait for the debugger (lldb) to attach on boot. Connecting from the host (caling kdp-remote) works as expected. However, after connecting and setting the target to continue, I'm often (90% of the time) presented with this message on the target machine: -


"Waiting for link to become available"


When this occurs, a 'link' is never made and I have to reboot the target machine.


On the odd occasion that I'm able to boot into the OS with a valid connection, the OS sometimes locks up as though it has entered an infinite loop and the debugger doesn't know any different - my kext is not being automatically loaded, so is not responsible for this.


Why is kernel debugging so bad, what's the cause of the above message and how can I ensure that kernel debugging works 100% of the time?

Replies

Hello, I meet the same problem. I think it is a net connection block, but I'm not sure. mabe it's because my net is a Local Area Network.

do you have fix it?

I got the same problem and "Waiting for link to become available" appears every time.

do you have fix it?

I have fix it. If you want to avoid this circumstance, you should satisfy these terms:


(1) a mac computer as host.


(2) install virtur machion on this host. don't use other computer!


(3) use parallels desktop, don't use vmware fusion!


(4) don't use bridge mode on you virtur network setting.



then, the success rate will increase to 90%.


the kernel debug uses udp as the connection between host and client. so it is not so stable. And I think it is the reason of this problem.