Patch Name: PHKL_28552 Patch Description: s700_800 11.00 Fix VxFS DMAPI DPFs and Memory Leak Creation Date: 03/06/18 Post Date: 03/09/08 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: HP OnLineJFS (Advanced VxFS) B.11.00 Filesets: AdvJournalFS.VXFS-ADV-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP AdvJournalFS.VXFS-ADV-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP Automatic Reboot?: Yes Status: General Release Critical: Yes PHKL_28552: PANIC PHKL_22208: MEMORY_LEAK PHKL_20410: PANIC PHKL_19135: PANIC CORRUPTION Category Tags: defect_repair general_release critical panic corruption memory_leak Path Name: /hp-ux_patches/s700_800/11.X/PHKL_28552 Symptoms: PHKL_28552: ( SR:8606264081 CR:JAGae28406 ) System panic appears as a DPF or spinlock timeout in kdm_k_get_nextevent(), with a stack trace similar to the one shown below. panic+0x14 report_trap_or_int_and_panic+0x80 trap+0xdb8 nokgdb+0x8 kdm_k_get_nextevent+0x4b8 kdm_dmapi_ioctl+0x1b8 vxportal_ioctl+0x110 spubind_cdev_ioctl+0x94 spec_ioctl+0xac vno_ioctl+0x90 ioctl+0x1f4 syscall+0x480 $syscallrtn+0x0 PHKL_22208: ( SR: 8606155311 DTS: JAGad24628 ) Memory leak in DMAPI code, while using OmniStorage. This may cause serious system performance degradation. The system may hang later, if the problematic code path is invoked many times. This problem is introduced by PHKL_17869. PHKL_20410: (SR: 8606106892 DTS: JAGab76354) system crash due to Data Page Fault in delay(), invoked from kdm_k_get_nextevent(). The top of panic stack looks like: panic+0x10 report_trap_or_int_and_panic+0xe8 trap+0xa48 $RDB_trap_patch+0x20 delay+0x44 kdm_k_get_nextevent+0x110 ......... PHKL_19135: ( SR: 8606100877 DTS: JAGab39657 ) 64-bit kernels return invalid event structures to 32-bit DMAPI applications. ( SR: 8606100878 DTS: JAGab39658 ) 64-bit kernels using DMAPI can panic due to corruption of the vx_fset structure. Defect Description: PHKL_28552: ( SR:8606264081 CR:JAGae28406 ) The events in hsms_outq may be freed in kdm_eventprocess() while these addresses are being traversed in kdm_k_get_nextevent(). This causes corruption of templist when these free addresses are reused. It leads either to an infinite loop that causes spinlock timeout or DPF due to invalid pointer in kdm_k_get_nextevent(). Resolution: Now we have modified the code to take care of this race condition problem. PHKL_22208: ( SR: 8606155311 DTS: JAGad24628 ) Memory used for a kernel data structure was not freed in kernel. Resolution: Free the memory after its use. PHKL_20410: (SR: 8606106892 DTS: JAGab76354) kdm_k_get_nextevent invokes delay() by mistake, instead of KDM_DELAY(). Resolution: Invoke KDM_DELAY from kdm_k_get_nextevent() instead of delay(). PHKL_19135: ( SR: 8606100877 DTS: JAGab39657 ) There are problems in DMAPI with how events are copied from a session queue to user supplied buffers. With a 64-bit kernel, events are managed and stored in 64-bit format in the kernel buffers, meaning that the offset and the length fields take 64 bits each in every event structure. The problem is that the length of field is 32 or 64 bits depending on the compilation mode. The result is an incorrect offset written in the offset field for a 32-bit event structure because the offset value is relative to the structure in 64-bit format and not modified for the 32-bit structure. Resolution: The code was changed so that the value returned in the offset field corresponds to the 32-bit structure format for a 32-bit application. ( SR: 8606100878 DTS: JAGab39658 ) A section of the vx_fset structure was corrupted in vx_get_bulk_attr() because of using a 64-bit typed pointer in a 32-bit application environment. Resolution: The code was changed to be 32-bit aware in an 64-bit environment. Enhancement: No SR: 8606100877 8606100878 8606106892 8606155311 8606264081 Patch Files: AdvJournalFS.VXFS-ADV-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32, v=HP: /usr/conf/lib/libdmapi.a(kdm_core.o) /usr/conf/lib/libvxfs_adv.a(vx_kdmi.o) AdvJournalFS.VXFS-ADV-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64, v=HP: /usr/conf/lib/libdmapi.a(kdm_core.o) /usr/conf/lib/libvxfs_adv.a(vx_kdmi.o) what(1) Output: AdvJournalFS.VXFS-ADV-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32, v=HP: /usr/conf/lib/libdmapi.a(kdm_core.o): kdm_core.c $Date: 2003/06/16 04:08:27 $Revision: r11 ros/9 PATCH_11.00 (PHKL_28552) /usr/conf/lib/libvxfs_adv.a(vx_kdmi.o): vx_kdmi.c $Date: 1999/07/07 11:09:06 $Revision: r11r os/7 PATCH_11.00 (PHKL_19135) AdvJournalFS.VXFS-ADV-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64, v=HP: /usr/conf/lib/libdmapi.a(kdm_core.o): kdm_core.c $Date: 2003/06/16 04:08:27 $Revision: r11 ros/9 PATCH_11.00 (PHKL_28552) /usr/conf/lib/libvxfs_adv.a(vx_kdmi.o): vx_kdmi.c $Date: 1999/07/07 11:09:06 $Revision: r11r os/7 PATCH_11.00 (PHKL_19135) cksum(1) Output: AdvJournalFS.VXFS-ADV-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32, v=HP: 3114447712 56792 /usr/conf/lib/libdmapi.a(kdm_core.o) 3723959906 25324 /usr/conf/lib/libvxfs_adv.a(vx_kdmi.o) AdvJournalFS.VXFS-ADV-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64, v=HP: 2453123101 146712 /usr/conf/lib/libdmapi.a(kdm_core.o) 3135133924 55904 /usr/conf/lib/libvxfs_adv.a(vx_kdmi.o) Patch Conflicts: None Patch Dependencies: s700: 11.00: PHKL_18543 s800: 11.00: PHKL_18543 Hardware Dependencies: None Other Dependencies: None Supersedes: PHKL_22208 PHKL_20410 PHKL_19135 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_28552 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_28552.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_28552. 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_28552.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_28552.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_28552.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None