Patch Name: PHKL_28314 Patch Description: s700_800 11.00 PTHREAD_PROCESS_SHARED mutexes enhancement Creation Date: 02/11/27 Post Date: 03/01/29 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: Yes PHKL_28314: HANG Category Tags: defect_repair enhancement general_release critical halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHKL_28314 Symptoms: PHKL_28314: ( SR:8606286053 CR:JAGae49995 ) Applications using PTHREAD_PROCESS_SHARED mutexes hang on systems having installed all of PHKL_25998, PHKL_25999, and PHCO_26000 (or superceeding) 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) PHKL_25998: ( SR:8606186056 CR:JAGad55261 ) 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. Defect Description: PHKL_28314: ( SR:8606286053 CR:JAGae49995 ) 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 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 mutex 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 work of a simultaneous lightweight unlock system call is not undone. PHKL_25998: ( SR:8606186056 CR:JAGad55261 ) 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. (Patch PHKL_25999, also required for this enhancement, provides the new light weight system call for shared mutex unlock. Patch PHCO_26000, also required for this enhancement, adapts the libpthread library to use the new light weight system call.) Enhancement: No (superseded patches contained enhancements) PHKL_28314: Enhancements were delivered in a patch this one has superseded. Please review the Defect Description text for more information. SR: 8606186056 8606286053 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(lwp_synch.o) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/lib/libhp-ux.a(lwp_synch.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(lwp_synch.o): lwp_synch.c $Date: 2002/11/27 11:27:58 $Revision: r1 1ros/4 PATCH_11.00 (PHKL_28314) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/lib/libhp-ux.a(lwp_synch.o): lwp_synch.c $Date: 2002/11/27 11:27:58 $Revision: r1 1ros/4 PATCH_11.00 (PHKL_28314) cksum(1) Output: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: 2584622034 18376 /usr/conf/lib/libhp-ux.a(lwp_synch.o) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: 2766731422 53008 /usr/conf/lib/libhp-ux.a(lwp_synch.o) Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: PHKL_25998: To enable the pthread shared mutex performance enhancement, three patches (PHKL_25998, PHKL_25999, and PHCO_26000) are required. Supersedes: PHKL_25998 Equivalent Patches: PHKL_27315: s700: 11.11 s800: 11.11 Patch Package Size: 100 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_28314 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_28314.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_28314. 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_28314.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_28314.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_28314.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None