Patch Name: PHKL_25506 Patch Description: s700_800 11.11 asyncio driver patch Creation Date: 01/10/22 Post Date: 01/10/23 Hardware Platforms - OS Releases: s700: 11.11 s800: 11.11 Products: N/A Filesets: OS-Core.CORE-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP ProgSupport.C-INC,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP 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_25506: PANIC HANG Category Tags: defect_repair enhancement general_release critical panic halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHKL_25506 Symptoms: PHKL_25506: ( SR:8606205392 CR:JAGad74567 ) 1. When using the asyncio driver, applications that use large shared memory segments may exhibit slow startup time. 2. A system panic occurs on process termination, if the process had registered private memory segment with asyncio driver. The stack trace will appear as follows: crash event was a panic panic+0x14 report_trap_or_int_and_panic+0x84 trap+0xd9c nokgdb+0x8 asyncdsk_close+0x94 call_open_close+0x1f8 closed+0xb0 spec_close+0x54 vn_close+0x48 vno_close+0x20 closef+0x64 exit+0x1108 psig+0x244 syscall+0x810 $syscallrtn+0x0 3. General slow application startup when using asyncio driver. 4. On systems experiencing low memory conditions, applications registering memory segments with asyncio driver may get "Not owner" (EPERM) error ( SR:8606180923 CR:JAGad50144 ) Slow performance for I/O's greater than 256KB. ( SR:8606214271 CR:JAGad83462 ) System hang while using asyncio driver under low memory conditions. Defect Description: PHKL_25506: ( SR:8606205392 CR:JAGad74567 ) 1. Before starting I/O's through the asyncio driver, applications must register shared memory segments with the driver. As part of the registration, the driver locks the memory. If this operation needs to be done for a very large memory segment, the locking may take a significant amount of time, resulting in slow application startup. 2. When process that registered private memory with asyncio driver terminates, the memory management subsystem cleans the associated data structure. The asyncio driver tries to dereference a pointer to one of these data structures that has already been freed causing the system to panic. 3. The asyncio driver checks for the user access rights twice. This duplication of access rights check contributes to slow application startup. 4. The asyncio driver propagates the wrong error code to the application when a memory locking function fails due to low memory conditions. Resolution: 1. The asyncio driver now supports a new device file minor number 256. If an application uses the async device file with this new minor number, the driver will defer locking the memory until I/O's are issued. This avoids the overhead of memory setup time and thus reduces the application startup time. Note: This minor number should only be used on systems that have enough physical memory so that paging is avoided. Paging can cause serious performance degradation with this new enhancement. On systems where paging is an issue, this minor number should not be used. 2. The driver returns bad address (EFAULT) if any application tries to register a private memory segment. 3. The redundant access rights check is removed. 4. The appropriate error code is returned to the application. ( SR:8606180923 CR:JAGad50144 ) I/O requests larger than 256KB are split into multiple I/O requests by the asyncio driver. The split I/O may not be aligned to 256KB boundary, such an I/O may be serialized by LVM resulting in increasing the disk response time. Resolution: I/O request larger than 256KB is aligned to 256KB boundary. ( SR:8606214271 CR:JAGad83462 ) Due to an uninitialized variable, a bad stack was being restored on the processor. Resolution: The variable is appropriately initialized. SR: 8606180923 8606205392 8606214271 Patch Files: OS-Core.CORE-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/conf/sio/async.h ProgSupport.C-INC,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/include/sio/async.h OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: /usr/conf/lib/libsio.a(async.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libsio.a(async.o) what(1) Output: OS-Core.CORE-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/conf/sio/async.h: async.h $Date: 2001/10/12 13:50:57 $Revision: r11.11 /1 PATCH_11.11 (PHKL_25506) ProgSupport.C-INC,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/include/sio/async.h: async.h $Date: 2001/10/12 13:50:57 $Revision: r11.11 /1 PATCH_11.11 (PHKL_25506) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: /usr/conf/lib/libsio.a(async.o): async.c $Date: 2001/10/12 13:50:57 $Revision: r11.11 /1 PATCH_11.11 (PHKL_25506) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libsio.a(async.o): async.c $Date: 2001/10/12 13:50:57 $Revision: r11.11 /1 PATCH_11.11 (PHKL_25506) cksum(1) Output: OS-Core.CORE-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: 1939084924 12368 /usr/conf/sio/async.h ProgSupport.C-INC,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: 1939084924 12368 /usr/include/sio/async.h OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: 2802574506 23152 /usr/conf/lib/libsio.a(async.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: 3079454631 46080 /usr/conf/lib/libsio.a(async.o) Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: None Equivalent Patches: None Patch Package Size: 130 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_25506 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_25506.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_25506. 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_25506.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_25506.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_25506.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: PHKL_25506: To enable the asyncio enhancement that defers memory locking to improve application startup times, create the async device file with minor number 256 using the following commands. The user must have super-user rights to execute these commands. Delete the old device file. # rmsf -v /dev/async Create the new device file # mknod /dev/async c 101 256 Note: This minor number should only be used on systems that have enough physical memory so that paging is avoided. Paging can cause serious performance degradation with this new enhancement. On systems where paging is an issue, this minor number should not be used.