Patch Name: PHKL_23902 Patch Description: s700_800 11.00 pthread_detach race condition thread leak Creation Date: 01/04/11 Post Date: 01/04/23 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: N/A Filesets: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP Automatic Reboot?: Yes Status: General Release Critical: No Category Tags: defect_repair general_release Path Name: /hp-ux_patches/s700_800/11.X/PHKL_23902 Symptoms: PHKL_23902: ( SR:8606182038 CR:JAGad5124 ) Multiple threaded applications may reach a state where pthread_create() will not be able to create more threads and will return the EAGAIN error even though there should be more threads available for the process to create. Defect Description: PHKL_23902: ( SR:8606182038 CR:JAGad5124 ) A race condition exists which may prevent pthread_detach() from setting the TSDETACHED flag for that thread. This race condition is created by sched_yield() modifying the same flag without holding the proper locks. The result of the TSDETACHED flag not being set is that the thread will stay a ZOMBIE thread when thread_exit is called and will not become available for use as a new thread. If this race condition occurrs often enough, all unused threads on the system can become ZOMBIE threads and calls to pthread_create() will result in EAGAIN errors. Resolution: sched_yield() was changed to obtain the proper locks to prevent the race condition from occurring. SR: 8606182038 Patch Files: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: /usr/conf/lib/libhp-ux.a(pm_rtsched.o) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/lib/libhp-ux.a(pm_rtsched.o) what(1) Output: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: /usr/conf/lib/libhp-ux.a(pm_rtsched.o): pm_rtsched.c $Date: 2001/04/09 17:41:38 $Revision: r 11ros/14 PATCH_11.00 (PHKL_23902) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/lib/libhp-ux.a(pm_rtsched.o): pm_rtsched.c $Date: 2001/04/09 17:41:38 $Revision: r 11ros/14 PATCH_11.00 (PHKL_23902) cksum(1) Output: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: 1197942058 10576 /usr/conf/lib/libhp-ux.a(pm_rtsched.o) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: 1824437872 28888 /usr/conf/lib/libhp-ux.a(pm_rtsched.o) Patch Conflicts: None Patch Dependencies: s700: 11.00: PHKL_18543 s800: 11.00: PHKL_18543 Hardware Dependencies: None Other Dependencies: None Supersedes: None Equivalent Patches: None Patch Package Size: 70 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHKL_23902 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_23902.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_23902. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above: -x patch_save_files=false WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHKL_23902.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_23902.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_23902.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: This patch depends on base patch PHKL_18543. For successful installation please insure that PHKL_18543 is already installed, or that PHKL_18543 is included in the same depot with this patch and PHKL_18543 is selected for installation.