When session A starts to eat up 99% of your CPU, instead of killing it, have you tried to highlight the window (even if it doesn't responds), and hitting CTRL+BREAK ?
Because this typically happens when your script is looping indefinitely...
(But even, I agree, this is not supposed to screw up your whole system, for sure...
)