Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 223792 - pthread_create() fails with segmentation fault
Summary: pthread_create() fails with segmentation fault
Status: CLOSED DUPLICATE of bug 223788
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc
Version: 3.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2007-01-22 14:44 UTC by Jani Tolonen
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-01-22 16:48:28 UTC
Target Upstream Version:

Attachments (Terms of Use)
Test program for reproducing the problem (deleted)
2007-01-22 14:44 UTC, Jani Tolonen
no flags Details

Description Jani Tolonen 2007-01-22 14:44:44 UTC
Description of problem:

System function pthread_create() fails with segmentation fault.

Originally detected problem with MySQL-4.x and MySQL-5.x series. Program
dies early in the startup always in pthread_create() function call. I have
included here a small test program that demonstrates the problem, using
only system libraries.

By switching to Linuxthreads the problem goes away. Switing back to NPTL
(version 0.60) the problem appears again. Also gdb (provided with the OS as well as new one compiled from source) does not work when NPTL is enabled, but it works with LT enabled. The symptom with gdb is that it always throws error:

"Error while reading shared library symbols:
Cannot find new threads: generic error
Cannot find user-level thread for LWP 31611: generic error"

Version-Release number of selected component (if applicable):

gdb version GNU gdb Red Hat Linux (
kernel version

How reproducible:


Steps to Reproduce:

# First ensure NPTL is in use
shell> export LD_ASSUME_KERNEL=

# Check
NPTL 0.60

# Compile the test program (attached)
shell> gcc thr_test_min.c -lpthread

# Run
shell> ./a.out
Init ok. Creating 100000 threads
Segmentation fault

Expected results:

# Using LinuxThreads the program creates threads successfully
shell> export LD_ASSUME_KERNEL=2.4.1

# Check

shell> ./a.out
Init ok. Creating 100000 threads
     100     200     300     400     500     600     700     800     900    1000    1100    1200    1300    1400    1500    1600    1700    1800    1900    2000    2100    2200    2300    2400    2500    2600    2700    2800    2900    3000    3100    3200    3300    3400    3500    3600    3700    3800    3900    4000

Additional info:

Problem originally detected with MySQL database engine.

Comment 1 Jani Tolonen 2007-01-22 14:44:44 UTC
Created attachment 146185 [details]
Test program for reproducing the problem

Comment 2 Jakub Jelinek 2007-01-22 16:48:28 UTC

*** This bug has been marked as a duplicate of 223788 ***

Note You need to log in before you can comment on or make changes to this bug.