RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 858790 - Thread limit hit less than that defined by ulimit -u
Summary: Thread limit hit less than that defined by ulimit -u
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.3
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jerome Marchand
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-19 17:13 UTC by Everett Bennett
Modified: 2014-10-03 11:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-02 14:28:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
thread_limit.c (730 bytes, application/octet-stream)
2012-09-19 17:13 UTC, Everett Bennett
no flags Details

Description Everett Bennett 2012-09-19 17:13:47 UTC
Created attachment 614484 [details]
thread_limit.c

Description of problem:

I see this errno when testing limits of thread creation:

Thread creation failed after 31490 threads, errno=11 

I have the following settings:

- ulimit -u = 65536
- spanned pages =  4382719

cat /proc/zoneinfo|grep spanned|awk '{a=a+$2 } END {print a}'
4382719

- MemTotal:       16211752 kB

- kernel.threads-max = 1048576

- Defined in /etc/pam.d/login:  session    required   pam_limits.so


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


How reproducible:


Steps to Reproduce:
1.  Use /tmp/thread_limit.c
2.
3.
  
Actual results:

 - 31490

Expected results:

 - 41000

Additional info:  See attached test program.

Comment 2 RHEL Program Management 2012-12-14 08:28:39 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 3 Jerome Marchand 2014-01-16 16:50:20 UTC
(In reply to Everett Bennett from comment #0)
> - ulimit -u = 65536
[...]
> - kernel.threads-max = 1048576
[...]
> Actual results:
> 
>  - 31490
> 
> Expected results:
> 
>  - 41000

Why do you expect 41000? I don't see where that number comes from.

pthread_create() could also fail for the lack of a limited ressource or because an other limit is exceeded. 
For instance the max number of mapping (/proc/sys/vm/max_map_count) could be exceeded.

Could you also run strace on your program to see what syscall (clone, mmap...) fails and how (EAGAIN, ENOMEM)?

Comment 5 Everett Bennett 2014-09-15 14:29:26 UTC
Please close this ticket.  I provided all the info I had at the time.

Comment 6 Everett Bennett, Jr. 2014-10-03 11:30:00 UTC
I have nothing to add to this ticket.


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