Patch Name: PHKL_30590 Patch Description: s700_800 11.11 application hangs using msg queues Creation Date: 04/04/13 Post Date: 04/07/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: Yes PHKL_30590: CORRUPTION HANG PHKL_29070: HANG Multi-threaded application hang. Category Tags: defect_repair general_release critical halts_system corruption Path Name: /hp-ux_patches/s700_800/11.X/PHKL_30590 Symptoms: PHKL_30590: ( SR:8606329286 CR:JAGae90410 ) An application making use of the system V message queue facility (see msgget(2)) may hang. In addition, messages reported by the system to have been properly sent to a particular system V message queue may be lost. PHKL_29070: ( SR:8606306961 CR:JAGae69996 ) Applications may hang using Sys V message sends. Defect Description: PHKL_30590: ( SR:8606329286 CR:JAGae90410 ) There is a race within the system V message queue facility wherein a given message queue can be used when it is allocated but before it is fully initialized. This may result in the corruption of the kernel control data for that particular message queue, as the initialization of a particular message queue can occur concurrently with its use. This corruption of kernel data fields for that particular message queue can cause the calling application to hang, as the message queue can be placed into an inconsistent state. Messages can be lost similarly: the kernel control data containing the number of messages on the queue can become corrupted. These conditions are quite rare and can only occur if the application passes into the message queue facility (via msgsnd(2), msgrcv(2), or msgctl(2)) a message queue id that is not the result of a matching msgget(2) call. Resolution: Proper synchronization is performed to ensure that a message queue must be fully initialized before it can be used. PHKL_29070: ( SR:8606306961 CR:JAGae69996 ) If during the usage of message operations, an application erroneously attempts a message send that is too large, the application can hang and become unkillable. This can happen only if the system and the application are setup in the following manner: The system is tuned such that msgmnb >65535 (enable big message queues) and msgmax >65535 (allow big individual messages). The application must be compiled without the -D__BIGMSGQUEUE_ENABLED option and it attempts to enqueue a large single message >65535 bytes. Resolution: Release the semaphore lock in the error reporting code. Enhancement: No SR: 8606306961 8606329286 Patch Files: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: /usr/conf/lib/libpm.a(sysV_ipc.o) /usr/conf/lib/libpm.a(sysV_msg.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libpm.a(sysV_ipc.o) /usr/conf/lib/libpm.a(sysV_msg.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(sysV_ipc.o): sysV_ipc.c $Date: 2004/04/07 23:37:58 $Revision: r11 .11/1 PATCH_11.11 (PHKL_30590) /usr/conf/lib/libpm.a(sysV_msg.o): sysV_msg.c $Date: 2004/04/07 23:37:58 $Revision: r11 .11/2 PATCH_11.11 (PHKL_30590) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libpm.a(sysV_ipc.o): sysV_ipc.c $Date: 2004/04/07 23:37:58 $Revision: r11 .11/1 PATCH_11.11 (PHKL_30590) /usr/conf/lib/libpm.a(sysV_msg.o): sysV_msg.c $Date: 2004/04/07 23:37:58 $Revision: r11 .11/2 PATCH_11.11 (PHKL_30590) cksum(1) Output: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: 2005522857 2064 /usr/conf/lib/libpm.a(sysV_ipc.o) 895923209 15516 /usr/conf/lib/libpm.a(sysV_msg.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: 443518246 4896 /usr/conf/lib/libpm.a(sysV_ipc.o) 3220395247 45528 /usr/conf/lib/libpm.a(sysV_msg.o) Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHKL_29070 Equivalent Patches: PHKL_30073: s700: 11.00 s800: 11.00 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_30590 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_30590.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_30590. 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_30590.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_30590.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_30590.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None