Patch Name: PHKL_26755 Patch Description: s700_800 11.11 callout race, disabled timer, early SIGXCPU Creation Date: 02/05/08 Post Date: 02/05/14 Hardware Platforms - OS Releases: s700: 11.11 s800: 11.11 Products: N/A Filesets: 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: No (superseded patches were critical) PHKL_26039: PANIC HANG The problem may happen only when using the HP-UX Virtual Partitions product with dynamic CPU migration. Category Tags: defect_repair general_release critical panic halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHKL_26755 Symptoms: PHKL_26755: ( SR:8606195416 CR:JAGad64620 ) Virtual repetitive timers may get randomly disabled causing CMA thread applications to stop context switching unexpectedly, resulting in a huge performance degradation. ( SR:8606242423 CR:JAGae09673 ) An application may receive a SIGXCPU signal prematurely when the RLIMIT_CPU for the application is changed through the setrlimit(2) system call. PHKL_26039: ( SR:8606233950 CR:JAGae03173 ) A system panic or hang may result from the corruption of callout data structures. This corruption may occur as a result of the expiration, reloading or disarming of REALTIME timers with the HP-UX Virtual Partitions product when dynamic CPU migration across virtual partitions is used. This defect was discovered through inspection, but due to timing issues involved with this defect, internal testing did not produce this panic. Defect Description: PHKL_26755: ( SR:8606195416 CR:JAGad64620 ) A process that has threads that run in short bursts may accumulate a lot of time without getting caught in clock interrupts. The virtual and profile timers in such a process may not get updated for a long time. When these timers finally expire, their effective time values become negative. If a timer happens to be a repetitive timer, we add this negative quantity to the timer's it_interval value to get the new it_value for the timer's reload. The it_value may thus end up being zero, wrongly signaling a disabling of the timer. In the specific case of CMA applications, 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. Resolution: Add an extra interval timer if the time value of a repetitive virtual or profile timer becomes zero while reloading. ( SR:8606242423 CR:JAGae09673 ) 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. PHKL_26039: ( SR:8606233950 CR:JAGae03173 ) The HP-UX callout subsystem uses per-CPU-callout locks to protect callout data structures and synchronize callout operations. The REALTIME timers are implemented using callouts, and take the per-CPU-callout lock for synchronization. The timers code identifies and takes the callout lock based on the CPU assigned to the callout. If the callout gets migrated to another CPU after the timers code has read its CPU assignment, but before it can take the associated callout lock, the timers code may end up with an incorrect callout lock leading to potential race conditions and data structure corruption. Resolution: Handle the race condition in REALTIME timers code with callout migration by re-validating the assigned CPU of the callout for the timer after acquiring the per CPU callout lock. If we are not holding the callout lock for the assigned CPU, drop the lock and try again. SR: 8606195416 8606233950 8606242423 Patch Files: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: /usr/conf/lib/libpm.a(subr_timers.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libpm.a(subr_timers.o) what(1) Output: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: /usr/conf/lib/libpm.a(subr_timers.o): subr_timers.c $Date: 2002/05/05 01:39:39 $Revision: r11.11/2 PATCH_11.11 (PHKL_26755) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libpm.a(subr_timers.o): subr_timers.c $Date: 2002/05/05 01:39:39 $Revision: r11.11/2 PATCH_11.11 (PHKL_26755) cksum(1) Output: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: 1287471542 20596 /usr/conf/lib/libpm.a(subr_timers.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: 572783005 48280 /usr/conf/lib/libpm.a(subr_timers.o) Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHKL_26039 Equivalent Patches: None Patch Package Size: 90 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_26755 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_26755.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_26755. 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_26755.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_26755.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_26755.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None