Jens Vagelpohl wrote:
there is a known bug in python for (at least) FreeBSD that leads to sudden restarts. it has to do with the stack size for threads being too small. see this message::
http://groups.yahoo.com/group/zope/message/91934
jens
Apologies for the attachment, but this is a tiny patch you can apply to Python 2.1.3 to double the stack size for threads up to 128K. -- Matt Kromer Zope Corporation http://www.zope.com/ --- ../Python-2.1.3/Python/thread_pthread.h Thu Jan 10 06:12:20 2002 +++ Python/thread_pthread.h Thu Jan 17 11:54:21 2002 @@ -128,6 +128,10 @@ { pthread_t th; int success; + pthread_attr_t pta; + pthread_attr_init(&pta); + pthread_attr_setstacksize(&pta, (1<<17)); + #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED pthread_attr_t attrs; #endif @@ -156,7 +160,7 @@ #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED &attrs, #else - (pthread_attr_t*)NULL, + (pthread_attr_t*)&pta, #endif (void* (*)(void *))func, (void *)arg