Patch Name: PHKL_25813 Patch Description: s700_800 11.00 Cumulative mmap fixes Creation Date: 01/11/30 Post Date: 01/12/03 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_25813: PANIC PHKL_22807: HANG Category Tags: defect_repair general_release critical panic halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHKL_25813 Symptoms: PHKL_25813: ( SR:8606222909 CR:JAGad92015 ) Any program that does a private mmap of an executable that is running across an NFS mount point and has the sticky bit set may trigger a system panic with a data page fault. One example of a private mmap would be running chatr(1) on the running executable. The panic stack may be similar to the following example: panic+0x14 report_trap_or_int_and_panic+0x80 trap+0xdb8 nokgdb+0x8 pdd_large_page2_0+0xfc pddpage+0x2d4 hdl_deletetrans+0xbc do_deltransc+0x170 for_val2+0x2d0 foreach_chunk+0x3c hdl_detach+0x210 detachreg+0x80 dispreg+0x128 exit+0x109c psig+0x440 trap+0x1344 nokgdb+0x8 PHKL_22807: ( SR:8606165948 CR:JAGad35235 ) fork() of processes with large PT_MMAP pregions takes excessively long. This can cause one processor to appear hung or if the system is a ServiceGuard node, it can result in a node TOC by cmcld with a stack trace similar to the one below: crash event was a TOC Send_Monarch_TOC+0x24 safety_time_check+0x150 per_spu_hardclock+0x350 clock_int+0x5f4 inttr_emulate_save_fpu+0x100 pdv_refget2_0+0x1d4 pdrefget2_0+0xa0 hdl_getbits+0x190 do_dupc+0x1e4 for_val2+0x2c0 for_val2+0x150 for_val2+0x150 foreach_chunk+0x3c dupreg+0x11c private_copy+0x60 dupvas+0x210 procdup+0x4c newproc+0x238 fork1+0x1dc fork+0x10 syscall+0x1c8 $syscallrtn+0x0 Defect Description: PHKL_25813: ( SR:8606222909 CR:JAGad92015 ) If the remote executable uses large pages and has the sticky bit set, indicating use of local swap, a private mmap of the remote text will result in misaligned pages and the subsequent panic. chatr(1) does a private mmap of the remote text, so exhibits the problem, although any private mmap of the remote text will result in the same misalignment and panic. The code that duplicates the region for the private mmap fails to demote large pages in this specific case. Resolution: When doing a private mmap of a text region, we now check if the text is running remotely and has the sticky bit set (RF_LOCAL flag is set). If so, we demote any large pages before doing the private mmap. PHKL_22807: ( SR:8606165948 CR:JAGad35235 ) The function do_dupc(), that is called during a fork() system call, attempts to determine if a page has been modified. Each superpage that exists in a process with large PT_MMAP pregions must have each of the 4K subpages it contains checked to determine the modified status of the entire superpage. This process of checking the status of each subpage of a superpage is time consuming. Resolution: The value of the modified status of the base page frame number of the superpage is saved and used as the modified status of the entire superpage. This eliminates the need to check the status of each subpage. SR: 8606165948 8606222909 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(vm_region.o) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/lib/libhp-ux.a(vm_region.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(vm_region.o): vm_region.c $Date: 2001/11/27 06:55:47 $Revision: r1 1ros/5 PATCH_11.00 (PHKL_25813) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/lib/libhp-ux.a(vm_region.o): vm_region.c $Date: 2001/11/27 06:55:47 $Revision: r1 1ros/5 PATCH_11.00 (PHKL_25813) cksum(1) Output: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: 2061814410 9532 /usr/conf/lib/libhp-ux.a(vm_region.o) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: 2110770723 16528 /usr/conf/lib/libhp-ux.a(vm_region.o) Patch Conflicts: None Patch Dependencies: s700: 11.00: PHKL_18543 s800: 11.00: PHKL_18543 Hardware Dependencies: None Other Dependencies: None Supersedes: PHKL_22807 Equivalent Patches: None Patch Package Size: 50 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_25813 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_25813.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_25813. 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_25813.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_25813.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_25813.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.