B8: ATTEMPTED_SWITCH_FROM_DPC

Hi–

I have two closely-coupled drivers that communicate
via function calls. Driver ‘A’ loads at boot time, Driver ‘B’
shortly thereafter.

Driver ‘A’ periodically checks for readiness from Driver ‘B’
and when found “ready” executes a simple function call (A –> B)
through an arranged address. The function in ‘B’ is benign; it simply
DbgPrints and returns to ‘A’ (no waits, etc.). The context of the call
is a timer DPC invoked by:

KeInitializeTimer ( &timefoo ) ;

KeInitializeDpc ( &kdpcfoo,
Dispatcher,
pdo) ;

KeSetTimerEx ( &timerfoo,
,
,
&kdpcfoo) ;

Single-stepping into Dispatcher through the function call (‘A’ -> ‘B’)
OR breaking
before the call (and then running) works just fine. But when its running
freely without
interruption ( I demand load ‘B’ after bootup) I get a B8:
ATTEMPTED_SWITCH_FROM_DPC
bugcheck as the function call from ‘A’ to ‘B’ is (apparently) executed.

Setting embedded int 3s or using SoftICE doesn’t help much–the bugcheck
context
appears with no stack, all 4 bugcheck args = 0. Haven’t found much
chatter on this bugcheck in the literature.

Feels like I’m violating a fundamental when halting in the debugger
seems to set things
straight. Perhaps a more experienced kernel developer can provide a
pointer. Thanks.

Bob Loewer

Any waiters on the timer object at DPC level with a non null timeout
interval ? This is illegal and fatal. This bughck usually signifies your
doing someting illegal in a DPC, for example blocking .

Dan

----- Original Message -----
From: “Bob Loewer”
To: “NT Developers Interest List”
Sent: Tuesday, August 27, 2002 10:37 PM
Subject: [ntdev] B8: ATTEMPTED_SWITCH_FROM_DPC

>
> Hi–
>
> I have two closely-coupled drivers that communicate
> via function calls. Driver ‘A’ loads at boot time, Driver ‘B’
> shortly thereafter.
>
> Driver ‘A’ periodically checks for readiness from Driver ‘B’
> and when found “ready” executes a simple function call (A –> B)
> through an arranged address. The function in ‘B’ is benign; it simply
> DbgPrints and returns to ‘A’ (no waits, etc.). The context of the call
> is a timer DPC invoked by:
>
> KeInitializeTimer ( &timefoo ) ;
>
> KeInitializeDpc ( &kdpcfoo,
> Dispatcher,
> pdo) ;
>
> KeSetTimerEx ( &timerfoo,
> ,
> ,
> &kdpcfoo) ;
>
> Single-stepping into Dispatcher through the function call (‘A’ -> ‘B’)
> OR breaking
> before the call (and then running) works just fine. But when its running
> freely without
> interruption ( I demand load ‘B’ after bootup) I get a B8:
> ATTEMPTED_SWITCH_FROM_DPC
> bugcheck as the function call from ‘A’ to ‘B’ is (apparently) executed.
>
> Setting embedded int 3s or using SoftICE doesn’t help much–the bugcheck
> context
> appears with no stack, all 4 bugcheck args = 0. Haven’t found much
> chatter on this bugcheck in the literature.
>
> Feels like I’m violating a fundamental when halting in the debugger
> seems to set things
> straight. Perhaps a more experienced kernel developer can provide a
> pointer. Thanks.
>
>
> Bob Loewer
>
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>