Argh! Python 2.2 + threading + sockets = trouble

Freddie freddie at madcowdisease.org
Fri Sep 13 20:00:49 EDT 2002


Hi,

I'm a fairly new Python programmer, but I've written a decent sized 
project (threaded IRC offer bot), and I wrote a threaded IPv6 capable 
IRC bouncer yesterday. Of course, it doesn't work quite as I expected.

MadCowOffer (offerbot) has rarely works properly with Python 2.2. It 
will sometimes manage to start all the threads, then it's fine, but it 
will usually just stop working after the IRC connection thread is started.

cowbounce (bouncer!) is almost the same. It will load fine, start the 
daemon sockets, wait for connections, etc etc. After a while (1 
connection, 3, it varies), the main thread also just stops doing 
anything. Some of the already connected BounceClient() threads will keep 
working, and some won't.

I have absolutely no idea what's causing this, or how to find out what 
exactly is making it unhappy :\


Using Python 2.2.1, from the Debian 'testing' packs python-2.2 2.2.1-6. 
Using 2.1.x isn't an option, as it doesn't seem to have working IPv6 
support.


Links to code:
   cowbounce   - http://www.madcowdisease.org/Files/cowbounce-broken.tar.gz

   MadCowOffer - http://www.madcowdisease.org/Files/MadCowOffer-0.1.2.tar.gz


Any help would be GREATLY appreciated :)

Freddie




More information about the Python-list mailing list