After debugging this some more I narrowed it down to an encryption function in pycrypto that is triggering the segfault. I posted a bug report. Don't really know enough about threading to know whether it's a python bug or a pycrypto bug, but I'll let someone else sort that out now..
If you get bus errors, there's a possibility that you are running out of stack.
AFAIR, the default thread stack size for Posix builds is dependant on the threading implementation. This can be overridden when building Python.
With each gcc version since 2.9, the size of stack frames for generated calls has increased. If lowering the optimisation to -O or -Os when building Python improves the situation, I'd suggest pursuing this possibility further.
------------------------------------------------------------------------- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: [EMAIL PROTECTED] (pref) | Snail: PO Box 370 [EMAIL PROTECTED] (alt) | Belconnen ACT 2616 Web: http://www.andymac.org/ | Australia -- http://mail.python.org/mailman/listinfo/python-list