"ulimit -s" has no effect?

Maciej Kalisiak mac at dgp.toronto.edu
Thu Feb 5 21:55:37 EST 2004


Andrew MacIntyre <andymac at bullseye.apana.org.au> writes:
> I have no idea whether this affects Linux, but some pthreads
> implementations hard code the stack size for the "primary" or
> "initial" thread.
> 
> Python is built with thread support if possible (incl on Linux), but
> without explicit use of the thread support Python code runs in the context
> of the "primary" thread.
> 
> ISTR that RedHat, amongst others, changed thread implementations
> relatively recently.
> 
> I know that there is/was a bug in the Python bug tracker on SF related
> to this issue on Linux (symptom is test_sre dumping core) with Python
> 2.3.3.  This particular issue is sensitive to the version of gcc and
> optimisation settings (& on Linux, whether the Python core is in a SO),
> as newer releases/higher optimisation settings result in larger stack
> frames.

Interesting.

1. Is there a test or code snippet that I can run to confirm that this is what
   ails my system?

2. If this *is* the problem, what would be a good workaround?


For the record I am using Debian's sid/unstable distribution.
debs used:
  python        2.3.2.91-1
  libc6         2.3.2.ds1-8

"ldd" shows python uses libpthreads, and it comes from the above libc6
package.

Upgraded Python to debian package 2.3.3-5;  no change.



More information about the Python-list mailing list