Patch Name: PHCO_30397 Patch Description: s700_800 11.11 ps(1) cumulative patch Creation Date: 04/02/19 Post Date: 04/03/09 Hardware Platforms - OS Releases: s700: 11.11 s800: 11.11 Products: N/A Filesets: OS-Core.CORE-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: No (superseded patches were critical) PHCO_29042: ABORT Category Tags: defect_repair enhancement general_release critical halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHCO_30397 Symptoms: PHCO_30397: ( SR:8606310333 CR:JAGae73205 ) Incorrect determination of controlling terminal. PHCO_29042: ( SR:8606316285 CR:JAGae79002 ) ps -x at times gives confusing output. ( SR:8606274557 CR:JAGae38634 ) ps(1) dumps core with large terminal name. PHCO_25605: ( SR:8606224770 CR:JAGad93858 ) ps(1) when invoked with -x option, sometimes exits with "pstat failure". PHCO_24482: ( SR:8606179390 CR:JAGad48614 ) This patch is a member of a set of patches needed to enable the HP-UX Processor Sets product (PROCSETS). When PROCSETS product is installed, it will install the full set of required patches for that product, including this patch. If the HP-UX Processor Sets product is not installed, this change will have no impact on your system. Defect Description: PHCO_30397: ( SR:8606310333 CR:JAGae73205 ) ps(1) uses file descriptors 0(STDIN),1(STDOUT) or 2(STDERR) to identify the major and minor device numbers.This major & minor device numbers are used as qualifiers to identify the processes to be displayed when ps(1) is invoked without any option.The problem with the above implementation is, if the STDIN, STDOUT and STDERR are redirected then ps(1) will come out with an error "ps: don't know which terminal to select". This is because ps(1) could not determine the controlling terminal. The problem can be reproduced as follows: $ ps < /dev/null 1> /tmp/out 2> /tmp/err $ echo $? 1 $ cat /tmp/out --- This does not give any output. $ cat /tmp/err ps: don't know which terminal to select Resolution: Now the controlling terminal is identified by obtaining the major and minor device numbers from the process structure of the current process. PHCO_29042: ( SR:8606316285 CR:JAGae79002 ) During ps(1) execution, if a process dies before the commandline is retrieved, ps(1) displays part of this process details along with the next one in the same line causing confusing output. This problem occurs when ps(1) is invoked with -x option. Resolution: If a process dies before the commandline is retrieved, ps(1) skips the details of this process and continues. ( SR:8606274557 CR:JAGae38634 ) If terminal name length exceeds MAXPATHLEN, then due to buffer overflow, ps(1) dumps core. The problem can be reproduced as follows: $ps -t `perl -e 'print "x"x2000'` Memory fault(coredump) Resolution: Terminal name is truncated to MAXPATHLEN before copying it into the buffer. PHCO_25605: ( SR:8606224770 CR:JAGad93858 ) ps(1) exits with the pstat(2) failure when a process terminates during the execution of "ps -x[other options]" command. Resolution: The error got from the pstat(2) call is checked and if it is ESRCH, which means that a process has terminated during the execution of ps(1), displaying of the rest of the processes is continued from ps(1). PHCO_24482: ( SR:8606179390 CR:JAGad48614 ) This patch contains minor enhancements required to support the HP-UX Processor Sets product. Resolution: Enhancements to ps(1) to display Processor Set information . Two new options "-z" and "-Z" are added to ps(1) for displaying Processor Set information. "-z" option displays the psetid to which the process is bound for all the processes that are displayed. "-Z" option displays the information of processes running on specified psetid/psetids. Enhancement: No (superseded patches contained enhancements) PHCO_25605: Enhancements were delivered in a patch this one has superseded. Please review the Defect Description text for more information. SR: 8606179390 8606224770 8606274557 8606310333 8606316285 Patch Files: OS-Core.CORE-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64, v=HP: /usr/share/man/man1.Z/ps.1 OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/bin/ps /usr/lib/nls/msg/C/ps.cat what(1) Output: OS-Core.CORE-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64, v=HP: /usr/share/man/man1.Z/ps.1: None OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/bin/ps: ps.c $Date: 2004/02/10 02:51:59 $Revision: r11.11/9 PATCH_11.11 (PHCO_30397) $Revision: @(#) all R11.11_BL2004_0219_8 PATCH_11.11 PHCO_30397 Thu Feb 19 21:32:18 PST 2004 $ /usr/lib/nls/msg/C/ps.cat: None cksum(1) Output: OS-Core.CORE-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64, v=HP: 1166013302 7592 /usr/share/man/man1.Z/ps.1 OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: 3120423911 36864 /usr/bin/ps 1184724195 1865 /usr/lib/nls/msg/C/ps.cat Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_29042 PHCO_25605 PHCO_24482 Equivalent Patches: None Patch Package Size: 60 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 PHCO_30397 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_30397.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_30397. 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 PHCO_30397.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_30397.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_30397.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None