system hang
Mar 25, 2010
Just a little pin prick for your ill pdb
Some packages can compromises the pdb interactive shell by redefining sys.stdout
Disclaimer: Tested only on linux and mac
Symptoms: python readline does not work at all in the pdb shell.
If you find out that inside a pdb after pressing some keys, e.g. the arrow keys, some escape symbols appear on the line...
(Pdb) test^[[D^[[D^[[D
...and you cannot move the cursor to the desired position, probably some package screwed up your pdb!
This is very annoying to me because some times I have to spend a lot of time in the pdb to heal my buggy code: a misfunctional readline makes me lose too much time!
This probably happened because somewhere in the code the standard output (sys.stdout) has been redefined and this screws up the pdb.
Check it out in the console:
(Pdb) import sys (Pdb) sys.stdout
If the output is not something like
<open file '<stdout>', mode 'w' at 0xb783d070>
than you can go on reading to find out how to fix it.
Don't ask me why pdb does not like it. If you are able to identify the nasty piece of code that modifies the standard output and replicate it in a python console, this problem does not appear.
Therapy: fix the stdout!
In most of the cases this will give you back a fully functional console:
>>> import sys;sys.stdout=file('/dev/stdout','w')
Sep 03, 2009
NSD, il tuo compagno di viaggio quando Domino va in crash
NSD (Notes System Diagnostic) è uno strumento Lotus per raccogliere informazioni a fronte di un crash o di un hang di sistema. Vediamo la sessione presentata durante DominoPoint Day 2008, l'evento italiano della comunità Lotus.
Tra qualche mese ci sarà il terzo appuntamento con il DominoPoint Day, ripartiamo da dove ci eravamo fermati: la sessione su NSD presentata nel 2008. Scarica la presentazione su Slide Share.


