Tuesday, August 22, 2006

End of SoC

Well that's it now. Summer of Code is over for another year. I've had a great time working on it and managed to get some nice stuff into pdb/pydb. Whilst I didn't complete all of the goals I'd set myself there's definately been some progress. One new thing that pydb has is gdb-like signal handling.

* gdb-like signal handling

Also yet to be merged but working is the ability to debug a process from another process and the ability to debug a process remotely. These will be neat features when they go in.

The thing that I didn't complete though, that the ability to debug threaded applications. This proved to be much more involved than either I or my mentor had first thought. However, we're still working on this and hope to get it into pydb soon.

If anyone's thinking about taking part next year, I whole-heartedly recommend it! Having a mentor to guide you is great, and you get to take advantage of that fountain of experience. A big thanks to my mentor, Rocky!

Matt

Tuesday, August 01, 2006

Deadlock in the Python Lib

I spent most of today debugging a deadlock case in the Python Standard Library. I'm not sure if anyone's ever tried, but if you write a tracing function and pass it to threading.settrace, and within this function call 'threading.currentThread()', when the trace functions traces the thread code through threading.Thread.__delete, if will try to call threading.currentThread() *AFTER* _active[_get_ident()] has been deleted (threading.currentThread() just returns _active[_get_ident()]). Now the Python developers thought of the possibilty of asking for the currentThread() when it had been removed from _active, so they decided to create a _DummyThread object. Only this object tries to acquire a lock held in the threading.Thread.__delete method. *BOOM* deadlock.

Anywho, I'm tired, it's nearly 2am...

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]