Patch Name: PHKL_30059 Patch Description: s700_800 11.04 (VVOS) Timers disabling, early SIGXCPU Creation Date: 03/11/17 Post Date: 03/11/25 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_30059: OTHER Based on HP-UX Patch PHKL_23956: OTHER Sluggish DCE threads performance Category Tags: defect_repair general_release critical Path Name: /hp-ux_patches/s700_800/11.X/PHKL_30059 Symptoms: PHKL_30059: Ported HP-UX patch PHKL_26404 to VVOS Based on HP-UX patch PHKL_26404: ( SR:8606231866 CR:JAGae01102 ) An application may receive a SIGXCPU signal prematurely when the RLIMIT_CPU for the application is changed through the setrlimit(2) system call. Based on HP-UX patch PHKL_23956: ( SR:8606183485 CR:JAGad52698 ) Virtual timers are randomly disabled causing CMA thread applications to stop context switching unexpectedly, resulting in a huge performance degradation. Based on HP-UX patch PHKL_19179: Sometimes SIGVTALRM or SIGPROF is delivered to a process before the timers actually have expired. Defect Description: PHKL_30059: Ported HP-UX patch PHKL_26404 to VVOS Based on HP-UX patch PHKL_26404: ( SR:8606231866 CR:JAGae01102 ) When a process sets its CPU limit timer using the setrlimit(2) system call, the threads in the process may have accumulated some processor time since the last time the process was updated in the clock interrupt path. This accumulated time would then be applied to the CPU limit timer the next time the process is updated in the clock interrupt path, causing the timer to expire prematurely. Resolution: Before setting the CPU limit timer for a process, extract the processor time accumulated by its threads since the last clock interrupt, and apply the time to all existing virtual and profile timers in the process. This resets the CPU usage time for the process when enabling the CPU limit timer. Based on HP-UX patch PHKL_23956: ( SR:8606183485 CR:JAGad52698 ) SIGVTALRM (which CMA threads use for context switching) was being disabled because the value it_value in the struct itimerval was being zeroed thus disabling the timer. Any long lived CMA threads program (including all the DCE daemons) is susceptable to having their SIGVTALRM context switching disabled. This silent failure results in a huge CMA thread performance degradation since the programs would continue to context switch at yield points but would no longer switch at reliable time quantas intended by CMA thread scheduling. This impacts threads performance. Resolution: Add an extra interval timer if it_value becomes (0,0) to ensure SIGVTALRM is not randomly disabled causing applications to stop context switching inadvertently. Based on HP-UX patch PHKL_19179: HP-UX handles CLOCK_VIRTUAL and CLOCK_PROFILE timers when a thread is "caught" by a clock interrupt and decrements the timers value by the time a process spent executing in user and/or system-space. When a thread is "caught" in a clock interrupt, HP-UX calculates thread's accumulated user and system time since last clock interrupt in which this this thread was "caught." This calculation is done by subtracting user and system baselines from the current user and system times. Under certain circumstances, HP-UX does not reset the baselines, and as user and system times accumulates, baselines do not get updated. And when a thread is "caught" in a clock interrupt, the interval between current user and system times and respective baselines can be arbitrarily large. And since we decerement this interval value from the armed timers, HP-UX can expire CLOCK_VIRTUAL and CLOCK_PROFILE timers prematurely. Resolution: When calling setitimer() or timer_setitime(), for all threads reset the user and system baselines. Enhancement: No SR: 1653277970 8606183485 8606231866 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_timers.o) /usr/conf/lib/libhp-ux.a(subr_timers.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_timers.o) /usr/conf/lib/libhp-ux.a(subr_timers.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_timers.o): pm_timers.c $Date: 1999/07/12 14:54:07 $Revision: r1 1ros/7 PATCH_11.00 (PHKL_19179) /usr/conf/lib/libhp-ux.a(subr_timers.o): subr_timers.c $Date: 2002/05/05 01:10:34 $Revision: r11ros/9 PATCH_11.00 (PHKL_26404) OS-Core.CORE2-KRN,fr=B.11.04,fa=HP-UX_B.11.04_64,v=HP: /usr/conf/lib/libhp-ux.a(pm_timers.o): pm_timers.c $Date: 1999/07/12 14:54:07 $Revision: r1 1ros/7 PATCH_11.00 (PHKL_19179) /usr/conf/lib/libhp-ux.a(subr_timers.o): subr_timers.c $Date: 2002/05/05 01:10:34 $Revision: r11ros/9 PATCH_11.00 (PHKL_26404) cksum(1) Output: OS-Core.CORE2-KRN,fr=B.11.04,fa=HP-UX_B.11.04_32,v=HP: 380333693 8860 /usr/conf/lib/libhp-ux.a(pm_timers.o) 3780549699 15848 /usr/conf/lib/libhp-ux.a(subr_timers.o) OS-Core.CORE2-KRN,fr=B.11.04,fa=HP-UX_B.11.04_64,v=HP: 3792645503 20456 /usr/conf/lib/libhp-ux.a(pm_timers.o) 523875401 37008 /usr/conf/lib/libhp-ux.a(subr_timers.o) Patch Conflicts: None Patch Dependencies: s700: 11.04: PHKL_19142 s800: 11.04: PHKL_19142 Hardware Dependencies: None Other Dependencies: None Supersedes: None Equivalent Patches: PHKL_26404: 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_30059 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_30059.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_30059. 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_30059.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_30059.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_30059.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None