Patch Name: PHCO_25174 Patch Description: s700_800 11.00 sar(1m) cumulative patch Creation Date: 01/12/02 Post Date: 01/12/21 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: N/A Filesets: OS-Core.ADMN-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: No (superseded patches were critical) PHCO_22733: OTHER If sar(1M) cannot fork its child processes, it can kill unrelated processes. Category Tags: defect_repair hardware_enablement general_release critical Path Name: /hp-ux_patches/s700_800/11.X/PHCO_25174 Symptoms: PHCO_25174: 1. sar(1m) shows wrong data for disks after reboot. 2. sar(1m) dumps core with some of the data files generated by 11.00 MR sadc. PHCO_22733: 1. sar(1m) from PHCO_21893 can core dump when encountering RESTART record. 2. sar(1m) used to kill some unintended processes on failure to create child processes. 3. sar(1m) used to kill some unintended processes when a signal is sent to it. 4. sar does not report bread/bwrite information correctly on multiprocessor systems. PHCO_21893: In a multi processor system, if any processor other than the last processor is deallocated, sar(1m) shows incorrect run queue length, cpu usage, average run queue length and average cpu usage information. PHCO_15220: Year displayed in three digits Defect Description: PHCO_25174: 1. sar(1m) shows wrong data for disks after reboot, The problem can be reproduced in the following way: 1. Add 5 data records to the data file /var/adm/sa/sadd 2. Write a script in /sbin/init.d/ which generates and adds the restart record at boot up time. Create a link in /sbin/rc2.d/ to the script in /sbin/init.d/ to invoke it at the boot up time. 3. Reboot the system. 4. Add 5 more records to the data file /var/adm/sa/sadd. 5. Run /usr/sbin/sar with '-d' option to display device information. Ex: $ sar -d 00:00:00 device %busy avque r+w/s blks/s avwait avserv 10:20:01 c0t6d0 9.80 33.86 11 175 231.72 13.71 10:40:00 c0t6d0 2.38 10.92 3 41 96.56 15.65 11:04:25 HP-UX restarts c0t6d0 100.00 0.50 102 12 1000.22 0.00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 11:20:00 c0t6d0 8.02 7.40 7 121 82.91 24.01 This is because sar(1m) is not setting the old_dev_data to zero, when it encounters a restart record. Resolution: Now sar(1m) code is changed to start the calculations newly by clearing the record pointed to by old_dev_data, whenever a restart record occurs. 2. sar(1m) is dumping core with some of the data files generated by 11.00 MR sadc(1m). The problem can be reproduced as follows: 1. temp_data_file is a data file generated by sadc (80.1) given in 11.00 MR. 2. /usr/sbin/sar -f temp_data_file dumps core. Ex: $ sar -f temp_data_file HP-UX lib210-1 B.11.00 A 9000/770 01/12/70 00:10:16 %usr %sys %wio %idle 05:30:00 100 0 0 0 06:05:44 201 100 100 100 Memory fault(coredump) As part of iCOD, the format of data files generated by sadc(1m) has been changed, and sar(1m) was made to recognize that new format. sar(1m) was unable to recognize the MR format and used to dump core if a data file generated by MR sadc(1m) is given to sar(1m). Resolution: Now sar(1m) is made to recognize data files generated by both the new sadc(80.1.1.6) and MR(80.1). PHCO_22733: 1. On encountering a RESTART record, sar(1m) coredumps. This was due to improper memory management. Resolution: Now sar(1m) takes care to handle RESTART records appropriately. 2. When sar(1m) fails to create child processes, it killed unrelated processes due to incorrect handling of signals. Resolution: Now sar(1m) handles signals correctly. 3. On receiving a signal, sar(1m) used to send the signal to all processes in its process group, thus killing them. Resolution: Now sar(1m) takes care not to send the signals to all processes in its process group. 4. sar is not calculating buffer cache read/writes correctly for multiprocessor systems. It just uses the statistics from the last CPU, instead of using the info from all the CPUs. Resolution: Now sar(1m) is made to store statistics of all the processors, Uses the statistics while calculating the buffer cache read/writes. PHCO_21893: In a multiprocessor system of say, n processors, when a processor other than processor "n" is deallocated, sar(1m) skips the information of processor "n" instead of the deallocated processor. While calculating the averages, sar(1m) takes the deallocated processor into consideration instead of processor "n". Resolution: Now, mpctl(2) call is used in sar(1m) to find the allocated processors' numbers and sar(1m) is made to display and calculate information only for the allocated processors. PHCO_15220: Year displayed in three digits SR: 1653246744 8606218048 8606167692 8606155322 8606151981 8606108312 8606142600 4701391466 Patch Files: OS-Core.ADMN-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: /usr/share/man/man1m.Z/sar.1m /usr/share/man/man1m.Z/sadc.1m /usr/share/man/man1m.Z/sa1.1m /usr/share/man/man1m.Z/sa2.1m OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/nls/msg/C/sar.cat /usr/lbin/sa/sadc /usr/sbin/sar /usr/contrib/bin/sar_converter /usr/share/doc/sar_converter.README what(1) Output: OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/nls/msg/C/sar.cat: None OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lbin/sa/sadc: sadc.c $Revision: 80.1.1.6 $ PATCH_11_00: sadc.o 01/12/02 OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/sbin/sar: $Revision: 82.1.1.17 $ PATCH_11_00: sar.o 01/12/02 OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/contrib/bin/sar_converter: sar converter $Revision: r11.00 OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/share/doc/sar_converter.README: None OS-Core.ADMN-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: /usr/share/man/man1m.Z/sar.1m: None OS-Core.ADMN-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: /usr/share/man/man1m.Z/sadc.1m: None OS-Core.ADMN-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: /usr/share/man/man1m.Z/sa1.1m: None OS-Core.ADMN-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: /usr/share/man/man1m.Z/sa2.1m: None cksum(1) Output: OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 3149599084 589 /usr/lib/nls/msg/C/sar.cat OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 1825396306 20480 /usr/lbin/sa/sadc OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 1802138773 40960 /usr/sbin/sar OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 3473909375 24576 /usr/contrib/bin/sar_converter OS-Core.SYS-ADMIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 3485436679 1952 /usr/share/doc/sar_converter.README OS-Core.ADMN-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: 2166826452 4841 /usr/share/man/man1m.Z/sar.1m OS-Core.ADMN-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: 969864098 4082 /usr/share/man/man1m.Z/sadc.1m OS-Core.ADMN-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: 969864098 4082 /usr/share/man/man1m.Z/sa1.1m OS-Core.ADMN-ENG-A-MAN,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: 969864098 4082 /usr/share/man/man1m.Z/sa2.1m Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_15220 PHCO_21893 PHCO_22733 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 PHCO_25174 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_25174.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_25174. 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_25174.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_25174.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_25174.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: The revised sar(1m) now supports the data files generated by sadc (version 80.1) and the new sadc (80.1.1.6) that is given in this patch. However, it does not support the data files generated by sadc (80.1.1.5) given in the previous patch (PHCO_22733). Customers needing to use data files created by sadc (80.1.1.5) must first convert the format of the files using the conversion utility included with this patch (/usr/contrib/bin/sar_converter). The sar_converter utility is not guaranteed to work with all data files due to technical reasons associated with correctly identifying the file to be converted (refer to /usr/share/doc/sar_converter.README). NOTE: Neither the conversion utility or the sadc (80.1.1.5) format will be supported in subsequent releases of HP-UX.