Losing Connection to Debug Kernel

Hi all,

I want to do remote debugging with a new HW platform via serial interface, but I lose the connection to the remote machine during (or after?) the boot sequence.

Initially, I have connection to the target from within WinDBG. This is true for any of the following:

  1. If I request initial brakpoint at boot or on first module load (Ctrl-Alt-K options).
  2. If I load a PNP driver with KdBreakPoint() in DriverEntry
  3. Ctrl-Break in during the “early” stages

However, once the system startup is nearly complete (~~ at the time Windows switches from the Windows Logo screen (black background) to the colored login screen) I lose the KD:

  1. I cannot Ctrl-Break in the KD anymore
  2. If I had set a breakpoint on a IOCTL handler in my driver before and it is hit, the system hangs
  3. No DbgPrint() is sent to WinDbg

I first thought this might be due to Windows 7 and/or the dual-core/HT CPU, however, I can also reproduce this on XP and with only one CPU core enabled and Hyperthreading disabled.

I know from an earlier thread here that the KD uses a polled communication (when debugging over serial) triggered by the update of the system timer.

I tested both COM1 and COM2 against my debugging host with Hyperterminal and found they are working fine.

I tried to dig into the nt!KdPollBreakIn procedure called by nt!KeUpdateSystemTime but debugging the KD debugging routines is not a very good idea and not of much success.

So the question is: what is changing at the time Windows switches to the colored login screen that damages communication?

While I am writing this, it came to my mind that it might be worth mentioning that the OS installations (XP,W7) I am testing with are 32-bit images on 64-bit HW, but I will give 64-bit installations a try.

Any help appreciated!
Thanks in advance!
Gernot

Does using the sysreq key on the target cause it to break in?

  • S

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Gernot.Buselmeier@ge.com
Sent: Monday, April 19, 2010 7:36 AM
To: Kernel Debugging Interest List
Subject: [windbg] Losing Connection to Debug Kernel

Hi all,

I want to do remote debugging with a new HW platform via serial interface, but I lose the connection to the remote machine during (or after?) the boot sequence.

Initially, I have connection to the target from within WinDBG. This is true for any of the following:

  1. If I request initial brakpoint at boot or on first module load (Ctrl-Alt-K options).
  2. If I load a PNP driver with KdBreakPoint() in DriverEntry
  3. Ctrl-Break in during the “early” stages

However, once the system startup is nearly complete (~~ at the time Windows switches from the Windows Logo screen (black background) to the colored login screen) I lose the KD:

  1. I cannot Ctrl-Break in the KD anymore
  2. If I had set a breakpoint on a IOCTL handler in my driver before and it is hit, the system hangs
  3. No DbgPrint() is sent to WinDbg

I first thought this might be due to Windows 7 and/or the dual-core/HT CPU, however, I can also reproduce this on XP and with only one CPU core enabled and Hyperthreading disabled.

I know from an earlier thread here that the KD uses a polled communication (when debugging over serial) triggered by the update of the system timer.

I tested both COM1 and COM2 against my debugging host with Hyperterminal and found they are working fine.

I tried to dig into the nt!KdPollBreakIn procedure called by nt!KeUpdateSystemTime but debugging the KD debugging routines is not a very good idea and not of much success.

So the question is: what is changing at the time Windows switches to the colored login screen that damages communication?

While I am writing this, it came to my mind that it might be worth mentioning that the OS installations (XP,W7) I am testing with are 32-bit images on 64-bit HW, but I will give 64-bit installations a try.

Any help appreciated!
Thanks in advance!
Gernot


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Do you have the 'plug and play os ’ option in your bios set?

mm

Ken and MM,

thanks for your replies.

@Ken:
Pressing the SysReq key on the target leads to system hang, as if a had a breakpoint set in a driver and it is hit. I think the “hang” is because the KD is activated on the target and no connection to/communication with the debug host can be established.

@MM:
I do not have a ‘plug and play os’ option in the setup pages. However, I tried playing with some of the setup options that might correlate to my problem.
Maybe someone (the MS KD guys?) have an idea if I tell that my target machine is EFI-based.

In the meantime I’ve tried several other OS installation options (XP x64 and W7 x64), but no success so far, no matter if 1 or 2 CPU cores enabled, HT disabled or not.

Thanks for all your help!
Gernot

Do you use the latest version, 6.12?
My feeling is that it has some new exciting problems with serial connection.
Try v. 6.11.

Regards,
– pa

<gernot.buselmeier> wrote in message news:xxxxx@windbg…
> Ken and MM,
>
> thanks for your replies.
>
> @Ken:
> Pressing the SysReq key on the target leads to system hang, as if a had a
> breakpoint set in a driver and it is hit. I think the “hang” is because
> the KD is activated on the target and no connection to/communication with
> the debug host can be established.
>
> @MM:
> I do not have a ‘plug and play os’ option in the setup pages. However, I
> tried playing with some of the setup options that might correlate to my
> problem.
> Maybe someone (the MS KD guys?) have an idea if I tell that my target
> machine is EFI-based.
>
> In the meantime I’ve tried several other OS installation options (XP x64
> and W7 x64), but no success so far, no matter if 1 or 2 CPU cores enabled,
> HT disabled or not.
>
> Thanks for all your help!
> Gernot
></gernot.buselmeier>

Are you using something pre 6.11 & are you connecting with the ‘-d’ and/or ‘-d’ command line options?

That combination would cause what you’re observing - target hangs, but windbg doesn’t break in.

I reported it a while back (not 100% sure of the version), but I’m not sure if the problem ever got fixed or not.

Good luck,

mm

I forgot: I only documented the problem over the 1394 kd transport; I don’t know if it ever affected the serial transport.

Good luck,

mm

Noticed your comment in the older thread.

  • pa

“Pavel A.” wrote in message news:xxxxx@windbg…
> Do you use the latest version, 6.12?
> My feeling is that it has some new exciting problems with serial
> connection.
> Try v. 6.11.
>
> Regards,
> – pa
>
> <gernot.buselmeier> wrote in message news:xxxxx@windbg…
>> Ken and MM,
>>
>> thanks for your replies.
>>
>> @Ken:
>> Pressing the SysReq key on the target leads to system hang, as if a had a
>> breakpoint set in a driver and it is hit. I think the “hang” is because
>> the KD is activated on the target and no connection to/communication with
>> the debug host can be established.
>>
>> @MM:
>> I do not have a ‘plug and play os’ option in the setup pages. However, I
>> tried playing with some of the setup options that might correlate to my
>> problem.
>> Maybe someone (the MS KD guys?) have an idea if I tell that my target
>> machine is EFI-based.
>>
>> In the meantime I’ve tried several other OS installation options (XP x64
>> and W7 x64), but no success so far, no matter if 1 or 2 CPU cores
>> enabled, HT disabled or not.
>>
>> Thanks for all your help!
>> Gernot
>>
></gernot.buselmeier>