Message326674
I think pperry nailed it above:
> Pdb fails because it is attempting to import the readline module every time its `trace_dispatch` is called, and the import implementation is not reentrant in that way.
More precisely, _ModuleLock.acquire() in https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap.py#L101 is not reentrant. If pdb steps into that function and tries to call it again by making an "import" call, `_blocking_on[tid]` will be overwritten and then deleted inside the nested call, so `del _blocking_on` in the enclosing call will raise a KeyError.
I think the solution would be either one of:
1) pdb avoids doing anything import-related as part of its step function
2) pdb avoids stepping inside importlib internals (e.g. by blacklisting importlib modules) |
|
Date |
User |
Action |
Args |
2018-09-29 10:24:57 | pitrou | set | recipients:
+ pitrou, brett.cannon, terry.reedy, ncoghlan, taleinat, eric.snow, ppperry, cheryl.sabella, xtreak, piscvau@yahoo.fr |
2018-09-29 10:24:57 | pitrou | set | messageid: <1538216697.95.0.545547206417.issue34609@psf.upfronthosting.co.za> |
2018-09-29 10:24:57 | pitrou | link | issue34609 messages |
2018-09-29 10:24:57 | pitrou | create | |
|