Patch Name: PHKL_27315 Patch Description: s700_800 11.11 Shared mutex hang; Shared synch perf support Creation Date: 02/11/27 Post Date: 03/01/29 Repost: 03/02/24 The Symptoms information in the patch documentation was modified to list the correct patches that can cause applications using PTHREAD_PROCESS_SHARED mutexes to hang. The HP-UX 11.00 patches were incorrectly listed instead of the HP-UX 11.11 patches. Hardware Platforms - OS Releases: s700: 11.11 s800: 11.11 Products: N/A Filesets: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP Automatic Reboot?: Yes Status: General Release Critical: Yes PHKL_27315: HANG Category Tags: defect_repair enhancement general_release critical halts_system manual_dependencies Path Name: /hp-ux_patches/s700_800/11.X/PHKL_27315 Symptoms: PHKL_27315: ( SR:8606286189 CR:JAGae50132 ) Applications using PTHREAD_PROCESS_SHARED mutexes hang on systems having installed all of PHCO_26466, PHKL_26467, PHKL_26468, and PHKL_26469 (or superseding patches). The application stack traces may be similar to: __lwp_mutex_lock_sys+0010 (C0054B18) __lwp_mutex_lock+003c (C0054624) __pthread_mutex_lock+0270 (C004E08C) ( SR:8606266056 CR:JAGae30309 ) This product update is a member of a set needed to enable the optional HP-UX Shared Synchronization Primitives Performance enhancement. Upon installation, the HP-UX Shared Synchronization Primitives Performance bundle (SSPP11i) will install the full set of product updates (including this one) to enable this performance enhancement. If the HP-UX Shared Synchronization Primitives Performance product is not installed, this product update will have not impact on your system. PHKL_26469: ( SR:8606231620 CR:JAGae00858 ) Enhancement: This product update is a member of a set needed to enable "Release mode" functionality for PTHREAD_PROCESS_SHARED mutexes. The full list of product updates required for this feature are: PHKL_26467, PHKL_26468, PHKL_26469 and PHCO_26466. If any member of this set of product updates is not installed, this product update will have no impact on your system. PHKL_26316: ( SR:8606232147 CR:JAGae01383 ) Software providers may observe performance deficiencies in applications which heavily use shared mutexes. Performance of a PTHREAD_PROCESS_SHARED mutex unlock operation is slower than that of a PTHREAD_PROCESS_PRIVATE mutex, even in the non-contended (i.e., no waiters) case. The full list of product updates required for this feature are: PHKL_26316, PHKL_26240, and PHCO_25751. If any member of this set of product updates is not installed, this product update will have no impact on your system. Defect Description: PHKL_27315: ( SR:8606286189 CR:JAGae50132 ) A race between the heavyweight and new lightweight shared mutex unlock system calls causes the mutex to be left in the locked state, even though the unlock function has completed. The waiters-update phase of the heavyweight path, if delayed due to an interrupts occurring within a multi-word write sequence, can undo the work of a simultaneously occuring lightweight unlock. When this occurs, any further attempts by the application to lock the lock will wait indefinitely, causing the application to hang. Resolution: Corrected waiters-update phase of heavyweight unlock system call to write a single word which does not interfere with the lightweight system call. This closes the race, ensuring that the work of a simultaneous lightweight unlock system call is not undone. ( SR:8606266056 CR:JAGae30309 ) This product update contains enhancements that improve the performance of shared synchronization primitives such as LWP semaphores, pthread condition variables and pthread RW locks. Resolution: The solution provided with this product update will mitigate the contention for kernel internal synchronization by increasing the granularity. PHKL_26469: ( SR:8606231620 CR:JAGae00858 ) This product update contains minor enhancements required to enable the "Release mode" functionality for PTHREAD_PROCESS_SHARED mutexes. Resolution: This product update provides the implementation of the system call necessary for enabling release mode for PTHREAD_PROCESS_SHARED mutex. It also provides new locking mechanism for improved granularity of mutex synchronization primitives. PHKL_26316: ( SR:8606232147 CR:JAGae01383 ) In the PTHREAD_PROCESS_SHARED mutex case, the unlock operation always makes a system call to synchronize with threads in other processes which may be waiting for the mutex. This makes the code path significantly longer. Resolution: Adapt the existing system call which handles waiters of shared mutexes to coordinate with a new light weight system call which handles shared mutex unlock. (PHKL_26240, also required for this enhancement, provides the new light weight system call for shared mutex unlock. PHCO_25751, also required for this enhancement, adapts the libpthread library to use the new light weight system call.) Enhancement: Yes PHKL_27315: Enhancements added to improve performance of shared synchronization primitives. Additional enhancements were delivered in a patch this one has superseded. Please review the Defect Description text for more information. SR: 8606231620 8606232147 8606266056 8606286189 Patch Files: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: /usr/conf/lib/libpm.a(lwp_synch.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libpm.a(lwp_synch.o) what(1) Output: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: /usr/conf/lib/libpm.a(lwp_synch.o): lwp_synch.c $Date: 2002/11/27 14:44:31 $Revision: r1 1.11/4 PATCH_11.11 (PHKL_27315) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libpm.a(lwp_synch.o): lwp_synch.c $Date: 2002/11/27 14:44:31 $Revision: r1 1.11/4 PATCH_11.11 (PHKL_27315) cksum(1) Output: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: 1232676102 29712 /usr/conf/lib/libpm.a(lwp_synch.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: 3782991006 84416 /usr/conf/lib/libpm.a(lwp_synch.o) Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: PHKL_26469: To enable the process shared mutex performance, the following must be installed: PHKL_26467, PHKL_26468, PHKL_26469 and PHCO_26466. These product updates may be installed in any order. If any of these product updates are not installed, this product update will have no impact on your system. PHKL_26316: To enable the pthread shared mutex performance enhancement related to JAGae01383, the following must be installed: PHKL_26240, PHKL_26316, and PHCO_25751 Supersedes: PHKL_26469 PHKL_26316 Equivalent Patches: None Patch Package Size: 140 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_27315 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_27315.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_27315. 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_27315.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_27315.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_27315.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None