Python Coredump on FreeBSD

Andrew MacIntyre andymac at bullseye.apana.org.au
Wed Jun 11 07:25:27 EDT 2003


On Tue, 10 Jun 2003, Harald Schneider wrote:

> Sorry for the huge delay ... if I compile with this option, my app fails
> with a missing 'import thread' in line 5 of threading.py ....

> "Andrew MacIntyre" <andymac at bullseye.apana.org.au> schrieb im Newsbeitrag

{...}

> > ./configure --without-threads

Ok, so you're using threads...

I have verified that:
- FreeBSD's pthreads implementation (libc_r) has a hard coded 1MB stack
  for the "initial" thread (the one that starts all other threads), that
  cannot be changed without rebuilding the library;
- the Linuxthreads port doesn't have the same limitation, and appears to
  function sufficiently similarly to libc_r that the regression test
  doesn't fail.

You should be able to try the linuxthreads build out by:
- install the linuxthreads port
- configure Python as normal
- modify the Makefile as follows:
  + remove any "-pthread" from the CC variable;
  + remove any "-lc_r" from the LIBS variable;
  + add "-I/usr/local/include/pthread/linuxthreads" to the CPPFLAGS
    variable;
  + add "-L/usr/local/lib -llthread" to the LIBC variable.
- make
- make test

I've just checked this recipe with a 2.2.3 build; it should also work with
a recent CVS sourcebase.

The sre recursion limits have been tweaked again in the current CVS tree
for FreeBSD, to reduce the risk of hitting the stack size limit.

Regards,
Andrew.

--
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au  (pref) | Snail: PO Box 370
        andymac at pcug.org.au             (alt) |        Belconnen  ACT  2616
Web:    http://www.andymac.org/               |        Australia





More information about the Python-list mailing list