This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Starting many threads causes core dump
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jhylton, thazel
Priority: low Keywords:

Created on 2001-05-02 14:09 by anonymous, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
threadKill3.py nobody, 2001-05-02 14:09 Creates a large number of threads, to cause a seg fault
Messages (4)
msg4619 - (view) Author: Nobody/Anonymous (nobody) Date: 2001-05-02 14:09
If I start more than 1020 threads simultaneously, using
the threading module, Python 2.1 causes segmentation
faults, or will not exit, under Linux. I have not
tested this on Windows.

I don't know whether the problems are caused by the
threads themselves, or the threading.Event for which
they are waiting.

I have attached a program threadKill3.py which
demonstrates this (including sample runs and output).
msg4620 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2001-05-09 15:53
Logged In: YES 
user_id=31392

We need two things in order to offer any useful help:
1. A stack trace from the core file.
2. Evidence that a C program that starts 1024 threads
   won't do the same thing.
msg4621 - (view) Author: Thomas Hazel (thazel) Date: 2001-06-04 21:29
Logged In: YES 
user_id=127523

Python Support/Developers,

I believe the fault is in Pthreads and not in the python 
interpreter. Pthreads under Linux has a few issues. Running 
this python test under Windows should not have this problem.

I have run similar tests in python with txObject ATK's 
abstraction layer to native(pthreads/Windows) threads. I 
have run these python tests on Linux, Windows and Solaris. 
Only Linux has this problem.

If folks are interested, the project txObject ATK 
(txobject.sourceforge.net) has home grown threads that can 
scale to many thousand of threads (or as much memory as you 
have). txObject ATK also provides python wrappers to these 
features. However these threads are non-preemptive.

Hope this helps

Tom

msg4622 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2001-08-30 20:34
Logged In: YES 
user_id=31392

Unlikely that this is Python's fault.
History
Date User Action Args
2022-04-10 16:04:01adminsetgithub: 34447
2001-05-02 14:09:15anonymouscreate