Patch Name: PHKL_29497 Patch Description: s700_800 11.04 (VVOS) Large Data Space,kernel memory leak Creation Date: 03/07/25 Post Date: 03/08/06 Hardware Platforms - OS Releases: s700: 11.04 s800: 11.04 Products: N/A Filesets: OS-Core.CORE2-KRN,fr=B.11.04,fa=HP-UX_B.11.04_32,v=HP OS-Core.CORE2-KRN,fr=B.11.04,fa=HP-UX_B.11.04_64,v=HP Automatic Reboot?: Yes Status: General Release Critical: Yes PHKL_29497: OTHER Based on HP-UX Patch PHKL_23409: OTHER Hung, unkillable process PHKL_22865: MEMORY_LEAK Based on HP-UX Patch PHKL_21610: MEMORY_LEAK Category Tags: defect_repair enhancement general_release critical memory_leak Path Name: /hp-ux_patches/s700_800/11.X/PHKL_29497 Symptoms: PHKL_29497: Ported HP-UX patch PHKL_23409 to VVOS Note: NFS functionality is not supported on VVOS. Based on HP-UX patch PHKL_23409: (SR: 8606103740 CR: JAGab70789) (SR: 8606159451 CR: JAGad28779) A multi-threaded process being executed over NFS can become hung and unkillable while performing either a fork, core, setrlimit, SIGSTOP, or debugger operations. PHKL_22865: Ported HP-UX patch PHKL_21610 to VVOS Based on HP-UX patch PHKL_21610: ( SR: 8606128576 CR: JAGac85551 ) Kernel memory leak when using setrlimit(2) RLIMIT_NOFILE to decrease the maximum number of open files. Based on HP-UX patch PHKL_20225: ( SR: 8606107525 DTS: JAGab77768 ) This patch is one of 8 patches necessary to add support for the 3 Gb private address space feature. Defect Description: PHKL_29497: Ported HP-UX patch PHKL_23409 to VVOS Note: NFS functionality is not supported on VVOS. Based on HP-UX patch PHKL_23409: (SR: 8606103740 CR: JAGab70789) (SR: 8606159451 CR: JAGad28779) A thread acquires a lock and then sleeps interruptibly. The interruptible sleep permits the thread to be stopped. Any other thread attempting to acquire this lock will sleep uninterruptably until the lock is available. This uninterruptable thread is also unkillable. This introduces a deadlock potential in multi-threaded processes: when a thread holding the lock, a thread desiring the lock, and a third thread doing one of fork, setrlimit, core, SIGSTOP, or debugger optionations, all occur at the same time in the same process, the deadlock is reached. The only way to resolve the deadlock is to reboot the system. This patch is part of a set of four patches (PHKL_23406, PHKL_23407,PHKL_23408,PHKL_23409) that enable P_NOSTOP, a new feature that prevents a process from being unkillable. Each patch is independantly installable. Without all four installed, P_NOSTOP will be unavailable. In order to prevent the process executed over NFS from becoming unkillable, NFS must use the P_NOSTOP feature. An NFS patch using P_NOSTOP, PHNE_23249, will be released in Spring of 2001. Resolution: If a thread acquires a lock and then sleeps interruptably, it is not permitted to be stopped if P_NOSTOP is set. This prevents this thread from becoming unkillable and prevents the deadlock. PHKL_22865: Ported HP-UX patch PHKL_21610 to VVOS Based on HP-UX patch PHKL_21610: ( SR: 8606128576 CR: JAGac85551 ) The setrlimit(2) handling routine failed to free previously allocated file descriptor chunks when a process forks and calls setrlimit(2) RLIMIT_NOFILE to decrease the maximum number of open files Resolution: The setrlimit(2) handling routine now correctly frees the unused file descriptor chunks across a fork Based on HP-UX patch PHKL_20225: ( SR: 8606107525 DTS: JAGab77768 ) This is one of 8 patches necessary to add support for the 3 Gb private address space feature. This feature allows a process to have a private 3rd quadrant (normally the 3rd quadrant, which is a 1 Gb range of address space from 0x80000000 to 0xC0000000, is used for shared objects). The chatr command must be used to enable this feature for an executable (chatr +q3p enable ). Note that this feature is only enabled for 32 bit processes running on the 64 bit version of HP-UX. The other 7 patches necessary to enable this feature are PHKL_20222, PHKL_20223, PHKL_20224, PHKL_20226, PHKL_20227, PHKL_20228 and PHKL_20229. Each patch may be installed independently of the others - if enabling the 3 Gb private address space feature is not desired. If fewer than all 8 patches are installed, the 3 Gb private address space feature will not be enabled. The code in this patch that is part of this feature will not have any impact on the system until all 8 patches are installed. Resolution: A subset of the code to support the 3 Gb private address space feature was added. When all 8 patches are installed the following code changes to support this feature will have been added: 1) Code to recognize the request for a private 3rd quadrant (Q3) during exec() of an executable. An executable that requests a private 3rd quadrant will be referred to as a q3p process below. 2) Code to prevent allocation of shared objects in q3p processes. 3) Code to allow data to extend over the 2nd/3rd quadrant boundary for q3p processes. 4) Code to put the stack for the primary thread in the 3rd quadrant for q3p processes. 5) Code to map a shared library into the private address space if there is no more room in the 4th shared quadrant for q3p processes. Enhancement: Yes PHKL_29497: Ported HP-UX patch PHKL_23409 to VVOS Based on HP-UX patch PHKL_23409: This patch is part of a set of three patches PHKL_27710, PHKL_29192,PHKL_29497 that enable P_NOSTOP, a new feature that prevents a process from being unkillable. Each patch is independantly installable. Without all three installed, P_NOSTOP will be unavailable. PHKL_22865: Ported HP-UX patch PHKL_21610 to VVOS Based on HP-UX patch PHKL_21610: Kernel memory leak when using setrlimit(2) RLIMIT_NOFILE to decrease the maximum number of open files. Based on HP-UX patch PHKL_20225: This patch is one of 8 patches necessary to add support for the 3 Gb private address space feature. SR: 8606103740 8606107525 8606128576 8606159451 Patch Files: OS-Core.CORE2-KRN,fr=B.11.04,fa=HP-UX_B.11.04_32,v=HP: /usr/conf/lib/libhp-ux.a(pm_context.o) /usr/conf/lib/libhp-ux.a(pm_resource.o) /usr/conf/lib/libhp-ux.a(pm_som.o) OS-Core.CORE2-KRN,fr=B.11.04,fa=HP-UX_B.11.04_64,v=HP: /usr/conf/lib/libhp-ux.a(pm_context.o) /usr/conf/lib/libhp-ux.a(pm_resource.o) /usr/conf/lib/libhp-ux.a(pm_som.o) what(1) Output: OS-Core.CORE2-KRN,fr=B.11.04,fa=HP-UX_B.11.04_32,v=HP: /usr/conf/lib/libhp-ux.a(pm_context.o): pm_context.c $Date: 1999/10/31 21:51:15 $Revision: r 11ros/4 PATCH_11.00 (PHKL_20225) /usr/conf/lib/libhp-ux.a(pm_resource.o): $Source: kern/sys/pm_resource.c, hpuxsysproc, vvos_r ose, rose0315 $ $Date: 03/07/25 08:21:01 $ $ Revision: 1.9.1.12 PATCH_11.04 (PHKL_29497) /usr/conf/lib/libhp-ux.a(pm_som.o): pm_som.c $Date: 1999/10/31 21:51:15 $Revision: r11ro s/1 PATCH_11.00 (PHKL_20225) OS-Core.CORE2-KRN,fr=B.11.04,fa=HP-UX_B.11.04_64,v=HP: /usr/conf/lib/libhp-ux.a(pm_context.o): pm_context.c $Date: 1999/10/31 21:51:15 $Revision: r 11ros/4 PATCH_11.00 (PHKL_20225) /usr/conf/lib/libhp-ux.a(pm_resource.o): $Source: kern/sys/pm_resource.c, hpuxsysproc, vvos_r ose, rose0315 $ $Date: 03/07/25 08:21:01 $ $ Revision: 1.9.1.12 PATCH_11.04 (PHKL_29497) /usr/conf/lib/libhp-ux.a(pm_som.o): pm_som.c $Date: 1999/10/31 21:51:15 $Revision: r11ro s/1 PATCH_11.00 (PHKL_20225) cksum(1) Output: OS-Core.CORE2-KRN,fr=B.11.04,fa=HP-UX_B.11.04_32,v=HP: 3590482774 3084 /usr/conf/lib/libhp-ux.a(pm_context.o) 4200028403 12420 /usr/conf/lib/libhp-ux.a(pm_resource.o) 4216851578 2880 /usr/conf/lib/libhp-ux.a(pm_som.o) OS-Core.CORE2-KRN,fr=B.11.04,fa=HP-UX_B.11.04_64,v=HP: 2369511042 6264 /usr/conf/lib/libhp-ux.a(pm_context.o) 282862094 24352 /usr/conf/lib/libhp-ux.a(pm_resource.o) 1844860037 7200 /usr/conf/lib/libhp-ux.a(pm_som.o) Patch Conflicts: None Patch Dependencies: s700: 11.04: PHKL_19142 s800: 11.04: PHKL_19142 Hardware Dependencies: None Other Dependencies: PHKL_29497: This patch is part of a set of three patches PHKL_27710, PHKL_29192,PHKL_29497 that enable P_NOSTOP, a new feature that prevents a process from being unkillable. Each patch is independantly installable. Without all three installed, P_NOSTOP will be unavailable. Supersedes: PHKL_22865 Equivalent Patches: PHKL_23409: s700: 11.00 s800: 11.00 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_29497 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_29497.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_29497. 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_29497.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_29497.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_29497.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: This patch depends on base patch PHKL_19142. For successful installation please insure that PHKL_19142 is already installed, or that PHKL_19142 is included in the same depot with this patch and PHKL_19142 is selected for installation. PHKL_29497: This patch contains part of the enhancement to enable the 3 Gb private address space feature. It is one of 4 patches. The other 3 patches necessary to enable this feature are PHKL_27710,PHKL_22786 and PHKL_22798. Each patch may be installed independently of the others- if enabling the 3 Gb private address space feature is not desired. If fewer than all 4 patches are installed, the 3 Gb private address space feature will not be enabled. The code in this patch that is part of this feature will not have any impact on the system until all 4 patches are installed. In order to be able to use this feature you will need to reconfigure the kernel with a larger value for the kernel configurable variable "maxdsiz". In order to do this with SAM, you will also need to install patch PHKL_23741. Without PHKL_23741 installed SAM will not allow maxdsiz to exceed ~1.9 Gb. Note that if PHKL_23741 is not installed it is still possible to manually configure a kernel with a larger value of maxdsiz (up to 3 Gb) using config(1M). This patch is part of a set of three patches PHKL_27710, PHKL_29192,PHKL_29497 that enable P_NOSTOP, a new feature that prevents a process from being unkillable. Each patch is independantly installable. Without all three installed, P_NOSTOP will be unavailable.