Thursday, November 11, 2010

GetDeb mirror pool status

I was able to identify and fix the python threading deadlocking problem, mirror-selector is fully functional now.

I have also added some statistics which allow us to check mirrors health and traffic distribution, you can check it at:
http://archive.getdeb.net/status/

Tuesday, November 9, 2010

Help with Python threading deadlock

Hello,
some months ago I have started developing the mirror-selector daemon.
The main work is done, it is capable to run for a few hours serving some thousand requests but it then get's into a thread deadlock scenario (the web server stops responding, gdb shows all the threads waiting on a semaphore lock).
This was my first project using multi-threading with Python and I am having a bad time finding the bug. I have recently introduced some debug code that I hope will print the stacktrace for every thread and give me an hint on the cause. It is most likely related Queue management.
The mirror-selector code is not that complex, it's available from bzr "bzr branch lp:mirror-selector", if you are experienced with Python threading and can spare a few minutes reviewing the code for the possible cause, it would be helpful.

Thanks