MickeyRandall4
MickeyRandall4

Reputation: 25

importing numpy via pykd in WinDbg Preview freezes the debugger

When using WinDbg Preview 1.2210.3001.0 along with pykd 0.3.4.15, I am finding that importing numpy freezes the debugger, i.e. the status bar displays *BUSY* for a long time (probably forever).

Isolation:

A small working example showing system config and how to reproduce the problem follows:

0: kd> version
Microsoft (R) Windows Debugger Version 10.0.25200.1003 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

Extension DLL chain:
    pykd.dll: image 2.0.0.25, API 0.0.0, built Wed Jan  6 04:35:42 2021

0: kd> !pykd.info
pykd bootstrapper version: 2.0.0.25

Installed python:

Version:        Status:     Image:
------------------------------------------------------------------------------
* 3.9 x86-64    Loaded      C:\Users\redacted\AppData\Local\Programs\Python\Python39\python39.dll

0: kd> !py
Python 3.9.12 (tags/v3.9.12:b28265d, Mar 23 2022, 23:52:46) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import numpy

In the example above, I was expecting the import to succeed and for the debugger to return from *BUSY* in a finite and short amount of time.

Upvotes: 0

Views: 116

Answers (1)

ussrhero
ussrhero

Reputation: 606

I'm affraid you need to stop using numpy within windbg. No one guaranteed that all python modules would work with windbg right. Pykd is a module to automize debugging, not a full functional python enviroment

But you can use pykd without windbg, within the original python.exe. In this case pykd will work as a normal python module

Upvotes: 0

Related Questions