- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: pthread cleanup not happening?
Operating System - HP-UX
1753597
Members
6560
Online
108796
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2004 12:08 PM
12-17-2004 12:08 PM
pthread cleanup not happening?
Hi, I am using pthreads on HP-UX 11i PA-RISC with the latest (I believe) pthreads-related patch PHCO_30544 installed, compiling with gcc 3.4.3 and -lpthread. I am running exactly into the limit established by the max_thread_proc kernel parameter, but this is acting as a cumulative limit, even though most of the threads have terminated.
What I mean is this. Say max_thread_proc is 200. The first 200 calls to pthread_create succeed. Meanwhile, suppose 190 of the threads have finished and exited cleanly by returning normally from their thread main function over the course of a couple of minutes. Nevertheless, the 201st call to pthread_create will return an error, even if I only have 10 threads still running, and the most I ever had running at one time was 15.
It feels as though it is not "cleaning up" the finished threads, hence reaching the configured limit of threads per process. But my experience with pthreads on other platforms is that if the thread returns cleanly from the thread main function, that is the correct way for the thread to end cleanly. So I ought to be far below the limit, because I only have a handful of threads running at any moment.
Thanks for any help,
Trygve
What I mean is this. Say max_thread_proc is 200. The first 200 calls to pthread_create succeed. Meanwhile, suppose 190 of the threads have finished and exited cleanly by returning normally from their thread main function over the course of a couple of minutes. Nevertheless, the 201st call to pthread_create will return an error, even if I only have 10 threads still running, and the most I ever had running at one time was 15.
It feels as though it is not "cleaning up" the finished threads, hence reaching the configured limit of threads per process. But my experience with pthreads on other platforms is that if the thread returns cleanly from the thread main function, that is the correct way for the thread to end cleanly. So I ought to be far below the limit, because I only have a handful of threads running at any moment.
Thanks for any help,
Trygve
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2004 12:57 PM
12-17-2004 12:57 PM
Re: pthread cleanup not happening?
The problem was that the code was not detaching the non-joined threads. So, these threads were "leaking" their implementation storage.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP