/******************************************************************************/ /* Document : Collection of a few lists of errorcodes, and some threads, */ /* describing some error conditions on Unix systems. */ /* Doc. Version : 7 */ /* File : error_unix.txt */ /* Purpose : some hopefully usefull examples for the Oracle, */ /* SQL Server, and DB2 DBA */ /* Date : 21/08/2009 */ /* Compiled by : Albert van der Sel */ /* Best use : You cannot really "read" this file. Use find/search of your */ /* editor to search for a code or any other identifier. */ /* Because a certain code can occur many times in this */ /* document, it's probably best to search multiple times. */ /* */ /******************************************************************************/ ############################################################## SECTION 1: AIX IPL progress codes: ############################################################## >>>> PART 1: POWER 5 and above<<<<: =================================== -- AIX configuration program indicators The numbers in this list display on the operator panel as the system loads the AIX operating system and prepares the hardware by loading software drivers. Some systems may produce 4-digit codes. If the leftmost digit of a 4-digit code is 0, use the three rightmost digits. Progress code Description/Action: --------------------------------- 2E6 The PCI Differential Ultra SCSI adapter or the Universal PCI Differential Ultra SCSI adapter being configured. 2E7 Configuration method unable to determine if the SCSI adapter type is SE or DE type. 440 9.1GB Ultra SCSI Disk Drive being identified or configured. 441 18.2 GB Ultra SCSI Disk Drive being identified or configured. 444 2-Port Multiprotocol PCI Adapter (ASIC) being identified or configured. 447 PCI 64-bit Fibre Channel Arbitrated Loop Adapter being configured. 458 36 GB DAT72 Tape Drive 459 36 GB DAT72 Tape Drive 45D 200 GB HH LTO2 Tape drive 500 Querying Standard I/O slot. 501 Querying card in Slot 1. 502 Querying card in Slot 2. 503 Querying card in Slot 3. 504 Querying card in Slot 4. 505 Querying card in Slot 5. 506 Querying card in Slot 6. 507 Querying card in Slot 7. 508 Querying card in Slot 8. 510 Starting device configuration. 511 Device configuration completed. 512 Restoring device configuration files from media. 513 Restoring basic operating system installation files from media. 516 Contacting server during network boot. 517 Mounting client remote file system during network IPL. 518 Remote mount of the root (/) and /usr file systems failed during network boot. 520 Bus configuration running. 521 /etc/init invoked cfgmgr with invalid options; /etc/init has been corrupted or incorrectly modified (irrecoverable error). 522 The configuration manager has been invoked with conflicting options (irrecoverable error). 523 The configuration manager is unable to access the ODM database (irrecoverable error). 524 The configuration manager is unable to access the config.rules object in the ODM database (irrecoverable error). 525 The configuration manager is unable to get data from a customized device object in the ODM database (irrecoverable error). 526 The configuration manager is unable to get data from a customized device driver object in the ODM database (irrecoverable error). 527 The configuration manager was invoked with the phase 1 flag; running phase 1 at this point is not permitted (irrecoverable error). 528 The configuration manager cannot find sequence rule, or no program name was specified in the ODM database (irrecoverable error). 529 The configuration manager is unable to update ODM data (irrecoverable error). 530 The savebase program returned an error. 531 The configuration manager is unable to access the PdAt object class (irrecoverable error). 532 There is not enough memory to continue (malloc failure); irrecoverable error. 533 The configuration manager could not find a configuration method for a device. 534 The configuration manager is unable to acquire database lock (irrecoverable error). 535 HIPPI diagnostics interface driver being configured. 536 The configuration manager encountered more than one sequence rule specified in the same phase (irrecoverable error). 537 The configuration manager encountered an error when invoking the program in the sequence rule. 538 The configuration manager is going to invoke a configuration method. 539 The configuration method has terminated, and control has returned to the configuration manager. 541 A DLT tape device is being configured. 542 7208-345 60 GB tape drive 7334-410 60 GB tape drive 549 Console could not be configured for the Copy a System Dump Menu. 551 IPL vary-on is running. 552 IPL vary-on failed. 553 IPL phase 1 is complete. 554 The boot device could not be opened or read, or unable to define NFS swap device during network boot. 555 An ODM error occurred when trying to vary-on the rootvg, or unable to create an NFS swap device during network boot. 556 Logical Volume Manager encountered error during IPL vary-on. 557 The root file system does not mount. 558 There is not enough memory to continue the system IPL. 559 Less than 2 MB of good memory are available to load the AIX kernel. 569 FCS SCSI protocol device is being configured (32 bits). 570 Virtual SCSI devices being configured. 571 HIPPI common function device driver being configured. 572 HIPPI IPI-3 master transport driver being configured. 573 HIPPI IPI-3 slave transport driver being configured. 574 HIPPI IPI-3 transport services user interface device driver being configured. 575 A 9570 disk-array driver being configured. 576 Generic async device driver being configured. 577 Generic SCSI device driver being configured. 578 Generic commo device driver being configured. 579 Device driver being configured for a generic device. 580 HIPPI TCP/IP network interface driver being configured. 581 Configuring TCP/IP. 582 Configuring Token-Ring data link control. 583 Configuring an Ethernet data link control. 584 Configuring an IEEE Ethernet data link control. 585 Configuring an SDLC MPQP data link control. 586 Configuring a QLLC X.25 data link control. 587 Configuring a NETBIOS. 588 Configuring a Bisync Read-Write (BSCRW). 589 SCSI target mode device being configured. 590 Diskless remote paging device being configured. 591 Configuring an LVM device driver. 592 Configuring an HFT device driver. 593 Configuring SNA device drivers. 594 Asynchronous I/O being defined or configured. 595 X.31 pseudo-device being configured. 596 SNA DLC/LAPE pseudo-device being configured. 597 OCS software being configured. 598 OCS hosts being configured during system reboot. 599 Configuring FDDI data link control. 59B FCS SCSI protocol device being configured (64 bits). 5C0 Streams-based hardware drive being configured. 5C1 Streams-based X.25 protocol being configured. 5C2 Streams-based X.25 COMIO emulator driver being configured 5C3 Streams-based X.25 TCP/IP interface driver being configured. 5C4 FCS adapter device driver being configured. 5C5 SCB network device driver for FCS being configured. 5C6 AIX SNA channel being configured. 600 Starting network boot portion of /sbin/rc.boot. 602 Configuring network parent devices. 603 /usr/lib/methods/defsys, /usr/lib/methods/cfgsys, or /usr/lib/methods/cfgbus failed. 604 Configuring physical network boot device. 605 Configuration of physical network boot device failed. 606 Running /usr/sbin/ifconfig on logical network boot device. 607 /usr/sbin/ifconfig failed. 608 Attempting to retrieve the client.info file with tftp. Note: Note that a flashing 608 indicates multiple attempt(s) to retrieve the client_info file are occurring. 609 The client.info file does not exist or it is zero length. 60B 18.2 GB 68-pin LVD SCSI Disk Drive being configured. 610 Attempting remote mount of NFS file system. 611 Remote mount of the NFS file system failed. 612 Accessing remote files; unconfiguring network boot device. 613 8 mm 80 GB VXA-2 tape device 614 Configuring local paging devices. 615 Configuration of a local paging device failed. 616 Converting from diskless to dataless configuration. 617 Diskless to dataless configuration failed. 618 Configuring remote (NFS) paging devices. 619 Configuration of a remote (NFS) paging device failed. 61B 36.4 GB 80-pin LVD SCSI Disk Drive being configured. 61D 36.4 GB 80-pin LVD SCSI Disk Drive being configured. 61E 18.2 GB 68-pin LVD SCSI Disk Drive being configured. 620 Updating special device files and ODM in permanent file system with data from boot RAM file system. 621 9.1 GB LVD 80-pin SCSI Drive being configured. 622 Boot process configuring for operating system installation. 62D 9.1 GB 68-pin LVD SCSI Disk Drive being configured. 62E 9.1GB 68-pin LVD SCSI Disk Drive being configured. 636 TURBOWAYSr 622 Mbps PCI MMF ATM Adapter. 637 Dual Channel PCI-2 Ultra2 SCSI Adapter being configured. 638 4.5 GB Ultra SCSI Single Ended Disk Drive being configured. 639 9.1 GB 10K RPM Ultra SCSI Disk Drive (68-pin). 643 18.2 GB LVD 80-pin SCA-2 connector SCSI Disk Drive being configured. 63A See 62D. 63B 9.1 GB 80-pin LVD SCSI Disk Drive being configured. 63C See 60B. 63D 18.2 GB 80-pin LVD SCSI Disk Drive being configured. 63E 36.4 GB 68-pin LVD SCSI Disk Drive being configured. 63F See 61B. 640 9.1 GB 10K RPM Ultra SCSI Disk Drive (80-pin). 646 High-Speed Token-Ring PCI Adapter being configured. 64A See 62E. 64B 9.1 GB 80-pin LVD SCSI Disk Drive being configured. 64C See 61E. 64D 18.2 GB LVD 80-pin Drive/Carrier being configured. 64E 36.4 GB 68-pin LVD SCSI Disk Drive being configured. 64F See 61D. 650 SCSD disk drive being configured. 653 18.2 GB Ultra-SCSI 16-bit Disk Drive being configured. 655 GXT130P Graphics adapter being configured. 657 GXT2000P graphics adapter being configured. 658 PCI Fibre Channel Disk Subsystem Controller being identified or configured. 659 2102 Fibre Channel Disk Subsystem Controller Drawer being identified or configured. 660 2102 Fibre Channel Disk Array being identified or configured. 662 Ultra2 Integrated SCSI controller. 663 The ARTIC960RxD Digital Trunk Quad PCI Adapter or the ARTIC960RxF Digital Trunk Resource Adapter being configured. 664 32x (MAX) SCSI-2 CD-ROM drive being configured. 667 PCI 3-Channel Ultra2 SCSI RAID Adapter being configured. 669 PCI Gigabit Ethernet Adapter being configured. 66A Keyboard/Mouse Attachment Card-PCI being configured. 66C 10/100/1000 Base-T Ethernet PCI Adapter. 66D PCI 4-Channel Ultra-3 SCSI RAID Adapter. 66E 4.7 GB DVD-RAM drive. 674 ESCONr Channel PCI Adapter being configured. 677 PCI 32-bit Fibre Channel Arbitrated Loop Adapter being configured. 678 12 GB 4 mm SCSI tape drive 67B PCI Cryptographic Coprocessor being configured. 682 20x (MAX) SCSI-2 CD-ROM Drive being configured. 689 4.5 GB Ultra SCSI Single Ended Disk Drive being configured. 68C 20 GB 4-mm Tape Drive being configured. 68E POWER GXT6000P PCI Graphics Adapter. 690 9.1 GB Ultra SCSI Single Ended Disk Drive being configured. 69b 64-bit/66 MHz PCI ATM 155 MMF PCI adapter being configured. 69d 64-bit/66 MHz PCI ATM 155 UTP PCI adapter being configured. 6CC SSA disk drive being configured. 700 A 1.1 GB 8-bit SCSI disk drive being identified or configured. 701 A 1.1 GB 16-bit SCSI disk drive being identified or configured. 702 A 1.1 GB 16-bit differential SCSI disk drive being identified or configured. 703 A 2.2 GB 8-bit SCSI disk drive being identified or configured. 704 A 2.2 GB 16-bit SCSI disk drive being identified or configured. 705 The configuration method for the 2.2 GB 16-bit differential SCSI disk drive is being run. If an irrecoverable error occurs, the system halts. 706 A 4.5 GB 16-bit SCSI disk drive being identified or configured. 707 A 4.5 GB 16-bit differential SCSI disk drive being identified or configured. 708 An L2 cache being identified or configured. 709 128 port ISA adapter being configured 710 POWER GXT150M graphics adapter being identified or configured. 711 Unknown adapter being identified or configured. 712 Graphics slot bus configuration is executing. 713 The IBM ARTIC960 device being configured. 714 A video capture adapter being configured. 715 The Ultramedia Services audio adapter being configured. This number displays briefly on the panel. 717 TP Ethernet Adapter being configured. 718 GXT500 Graphics Adapter being configured. 720 Unknown read/write optical drive type being configured. 721 Unknown disk or SCSI device being identified or configured. 722 Unknown disk being identified or configured. 723 Unknown CD-ROM being identified or configured. 724 Unknown tape drive being identified or configured. 725 Unknown display adapter being identified or configured. 726 Unknown input device being identified or configured. 727 Unknown async device being identified or configured. 728 Parallel printer being identified or configured. 729 Unknown parallel device being identified or configured. 730 Unknown diskette drive being identified or configured. 731 PTY being identified or configured. 732 Unknown SCSI initiator type being configured. 733 7 GB 8-mm tape drive being configured. 734 4x SCSI-2 640 MB CD-ROM Drive being configured. 736 Quiet Touch keyboard and speaker cable being configured. 741 1080 MB SCSI Disk Drive being configured. 745 16 GB 4-mm Tape Auto Loader being configured. 746 SCSI-2 Fast/Wide PCI Adapter being configured. 747 SCSI-2 Differential Fast/Wide PCI Adapter being configured. 749 7331 Model 205 Tape Library being configured. 751 SCSI 32-bit SE F/W RAID Adapter being configured. 754 1.1 GB 16-bit SCSI disk drive being configured. 755 2.2 GB 16-bit SCSI disk drive being configured. 756 4.5 GB 16-bit SCSI disk drive being configured. 757 External 13 GB 1.5M/s 1/4-inch tape being configured. 763 SP Switch MX Adapter being configured. 764 SP System Attachment Adapter being configured. 772 4.5 GB SCSI F/W Disk Drive being configured. 773 9.1 GB SCSI F/W Disk Drive being configured. 774 9.1 GB External SCSI Disk Drive being configured. 776 PCI Token-Ring Adapter being identified or configured. 777 10/100 Ethernet Tx PCI Adapter being identified or configured. 778 POWER GXT3000P 3D PCI Graphics adapter being configured. 77B 4-Port 10/100 Ethernet Tx PCI Adapter being identified or configured. 77c A 1.0 GB 16-bit SCSI disk drive being identified or configured. 783 4-mm DDS-2 Tape Autoloader being configured. 789 2.6 GB External Optical Drive being configured. 78B POWER GXT4000P PCI Graphics Adapter. 78D GXT300P 2D Graphics adapter being configured. 790 Multi-bus Integrated Ethernet Adapter being identified or configured. 797 TURBOWAYSr 155 UTP/STP ATM Adapter being identified or configured. 798 Video streamer adapter being identified or configured. 799 2-Port Multiprotocol PCI adapter being identified or configured. 79c ISA bus configuration executing. 7C0 CPU/System Interface being configured. 7C1 Business Audio Subsystem being identified or configured. 7cc PCMCIA bus configuration executing. 800 TURBOWAYSr 155 MMF ATM Adapter being identified or configured. 803 7336 Tape Library robotics being configured. 804 8x Speed SCSI-2 CD-ROM Drive being configured. 806 POWER GXT800 PCI Graphics adapter being configured. 807 SCSI Device Enclosure being configured. 80c SSA 4-Port Adapter being identified or configured. 811 Processor complex being identified or configured. 812 Memory being identified or configured. 813 Battery for time-of-day, NVRAM, and so on being identified or configured, or system I/O control logic being identified or configured. 814 NVRAM being identified or configured. 815 Floating-point processor test. 816 Operator panel logic being identified or configured. 817 Time-of-day logic being identified or configured. 819 Graphics input device adapter being identified or configured. 821 Standard keyboard adapter being identified or configured. 823 Standard mouse adapter being identified or configured. 824 Standard tablet adapter being identified or configured. 825 Standard speaker adapter being identified or configured. 826 Serial Port 1 adapter being identified or configured. 827 Parallel port adapter being identified or configured. 828 Standard diskette adapter being identified or configured. 831 3151 adapter being identified or configured, or Serial Port 2 being identified or configured. 834 64-port async controller being identified or configured. 835 16-port async concentrator being identified or configured. 836 128-port async controller being identified or configured. 837 16-port remote async node being identified or configured. 838 Network Terminal Accelerator Adapter being identified or configured. 839 7318 Serial Communications Server being configured. 840 PCI Single-Ended Ultra SCSI Adapter being configured. 841 8-port async adapter (EIA-232) being identified or configured. 842 8-port async adapter (EIA-422A) being identified or configured. 843 8-port async adapter (MIL-STD-188) being identified or configured. 844 7135 RAIDiant Array disk drive subsystem controller being identified or configured. 845 7135 RAIDiant Array disk drive subsystem drawer being identified or configured. 846 RAIDiant Array SCSI 1.3 GB Disk Drive being configured. 847 16-port serial adapter (EIA-232) being identified or configured. 848 16-port serial adapter (EIA-422) being identified or configured. 849 X.25 Interface Coprocessor/2 adapter being identified or configured. 850 Token-Ring network adapter being identified or configured. 851 T1/J1 Portmasterr adapter being identified or configured. 852 Ethernet adapter being identified or configured. 854 3270 Host Connection Program/6000 connection being identified or configured. 855 Portmaster Adapter/A being identified or configured. 857 FSLA adapter being identified or configured. 858 5085/5086/5088 adapter being identified or configured. 859 FDDI adapter being identified or configured. 85c Token-Ring High-Performance LAN adapter being identified or configured. 861 Optical adapter being identified or configured. 862 Block Multiplexer Channel Adapter being identified or configured. 865 ESCON Channel Adapter or emulator being identified or configured. 866 SCSI adapter being identified or configured. 867 Async expansion adapter being identified or configured. 868 SCSI adapter being identified or configured. 869 SCSI adapter being identified or configured. 870 Serial disk drive adapter being identified or configured. 871 Graphics subsystem adapter being identified or configured. 872 Grayscale graphics adapter being identified or configured. 874 Color graphics adapter being identified or configured. 875 Vendor generic communication adapter being configured. 876 8-bit color graphics processor being identified or configured. 877 POWER Gt3T/POWER Gt4T being identified or configured. 878 POWER Gt4T graphics processor card being configured. 879 24-bit color graphics card, MEV2 being configured. 880 POWER Gt1T adapter being identified or configured. 887 Integrated Ethernet adapter being identified or configured. 889 SCSI adapter being identified or configured. 890 SCSI-2 Differential Fast/Wide and Single-Ended Fast/Wide Adapter/A being configured. 891 Vendor SCSI adapter being identified or configured. 892 Vendor display adapter being identified or configured. 893 Vendor LAN adapter being identified or configured. 894 Vendor async/communications adapter being identified or configured. 895 Vendor IEEE 488 adapter being identified or configured. 896 Vendor VME bus adapter being identified or configured. 897 S/370T Channel Emulator adapter being identified or configured. 898 POWER Gt1xT graphics adapter being identified or configured. 899 3490 attached tape drive being identified or configured. 89c A multimedia SCSI CD-ROM being identified or configured. 900 GXT110P Graphics Adapter being identified or configured. 901 Vendor SCSI device being identified or configured. 902 Vendor display device being identified or configured. 903 Vendor async device being identified or configured. 904 Vendor parallel device being identified or configured. 905 Vendor other device being identified or configured. 908 POWER GXT1000 Graphics subsystem being identified or configured. 910 1/4 GB Fiber Channel/266 Standard Adapter being identified or configured. 911 Fiber Channel/1063 Adapter Short Wave being configured. 912 2.0 GB SCSI-2 differential disk drive being identified or configured. 913 1.0 GB differential disk drive being identified or configured. 914 5 GB 8-mm differential tape drive being identified or configured. 915 4 GB 4-mm tape drive being identified or configured. 916 Non-SCSI vendor tape adapter being identified or configured. 917 A 2.0 GB 16-bit differential SCSI disk drive being identified or configured. 918 A 2.0 GB 16-bit single-ended SCSI disk drive being identified or configured. 920 Bridge Box being identified or configured. 921 101 keyboard being identified or configured. 922 102 keyboard being identified or configured. 923 Kanji keyboard being identified or configured. 924 Two-button mouse being identified or configured. 925 Three-button mouse being identified or configured. 926 5083 tablet being identified or configured. 927 5083 tablet being identified or configured. 928 Standard speaker being identified or configured. 929 Dials being identified or configured. 930 Lighted program function keys (LPFK) being identified or configured. 931 IP router being identified or configured. 933 Async planar being identified or configured. 934 Async expansion drawer being identified or configured. 935 3.5-inch diskette drive being identified or configured. 936 5.25-inch diskette drive being identified or configured. 937 An HIPPI adapter being configured. 938 Serial HIPPI PCI adapter being configured. 942 POWER GXT 100 graphics adapter being identified or configured. 943 A 3480 or 3490 control unit attached to a System/370 Channel Emulator/A adapter are being identified or configured. 944 100 MB ATM adapter being identified or configured. 945 1.0 GB SCSI differential disk drive being identified or configured. 946 Serial port 3 adapter being identified or configured. 947 A 730 MB SCSI disk drive being configured. 948 Portable disk drive being identified or configured. 949 Unknown direct bus-attach device being identified or configured. 950 Missing SCSI device being identified or configured. 951 670 MB SCSI disk drive being identified or configured. 952 355 MB SCSI disk drive being identified or configured. 953 320 MB SCSI disk drive being identified or configured. 954 400 MB SCSI disk drive being identified or configured. 955 857 MB SCSI disk drive being identified or configured. 956 670 MB SCSI disk drive electronics card being identified or configured. 957 120 MB DBA disk drive being identified or configured. 958 160 MB DBA disk drive being identified or configured. 959 160 MB SCSI disk drive being identified or configured. 960 1.37 GB SCSI disk drive being identified or configured. 964 Internal 20 GB 8-mm tape drive identified or configured. 968 1.0 GB SCSI disk drive being identified or configured. 970 Half-inch, 9-track tape drive being identified or configured. 971 150 MB 1/4-inch tape drive being identified or configured. 972 2.3 GB 8-mm SCSI tape drive being identified or configured. 973 Other SCSI tape drive being identified or configured. 974 CD-ROM drive being identified or configured. 975 An optical disk drive being identified or configured. 977 M-Audio Capture and Playback Adapter being identified or configured. 981 540 MB SCSI-2 single-ended disk drive being identified or configured. 984 1 GB 8-bit disk drive being identified or configured. 985 M-Video Capture Adapter being identified or configured. 986 2.4 GB SCSI disk drive being identified or configured. 987 An Enhanced SCSI CD-ROM drive being identified or configured. 989 200 MB SCSI disk drive being identified or configured. 990 2.0 GB SCSI-2 single-ended disk drive being identified or configured. 991 525 MB 1/4-inch cartridge tape drive being identified or configured. 994 5 GB 8-mm tape drive being identified or configured. 995 1.2GB 1/4-inch cartridge tape drive being identified or configured. 996 A single-port, multiprotocol communications adapter being identified or configured. 997 FDDI adapter being identified or configured. 998 2.0 GB 4-mm tape drive being identified or configured. 999 7137 or 3514 Disk Array Subsystem being configured. D46 Token-Ring cable. D81 T2 Ethernet Adapter being configured. 2000 Dynamic LPAR CPU Addition 2001 Dynamic LPAR CPU Removal 2002 Dynamic LPAR Memory Addition 2003 Dynamic LPAR Memory Removal 2004 DLPAR Maximum Memory size too large 2010 HTX miscompare 2011 Configuring device model 2107 fcp 2012 Configuring device model 2107 iscsi 2013 Configuring MR-1750 (device model 1750) fcp 2014 Configuring MR-1750 (device model 1750) iscsi 2015 Configuring SVC (device model 2145) fcp 2016 Configuring SVCCISCO (device model 2062) fcp 2017 Configuring SVCCISCO (device model 2062) iscsi 2018 Configuring Virtual Management Channel driver 2019 Configuring vty server 201b Configuring Virtual SCSI Optical 2020 Configuring Infiniband ICM kernel component 2021 Configuring TCP Infiniband Interface kernel component 2502 Configuring PCI-X266 Planar 3 GB integrated SAS adapter 2503 Configuring PCI-X266 Planar 3 GB integrated SAS RAID adapter 2512 Configuring PCI-X DDR quad channel Ultra320 SCSI RAID adapter 2513 Configuring PCI-X DDR quad channel Ultra320 SCSI RAID adapter 2514 Configuring PCI-X DDR quad channel Ultra320 SCSI RAID adapter 2520 PCI Dual-Channel Ultra-3 SCSI adapter being identified or configured. 2522 PCI-X Dual Channel Ultra320 SCSI Adapter 2523 PCI-X Ultra320 SCSI RAID Adapter 2526 PCI-X Ultra320 SCSI RAID Battery Pack 2527 PCI-X Quad Channel U320 SCSI RAID Adapter 2528 PCI-X Dual Channel Ultra320 SCSI adapter 2529 PCI-X Dual Channel Ultra320 SCSI RAID adapter 252B PCI-X DDR Dual Channel Ultra320 SCSI RAID adapter 252D PCI-X DDR Dual Channel Ultra320 SCSI RAID adapter 252E PCI-X DDR Auxiliary Cache adapter 2530 10/100 Mbps Ethernet PCI Adapter II being configured. 2533 10 GB Ethernet -SR PCI-X 2.0 DDR adapter being configured 2534 10 GB Ethernet -LR PCI-X 2.0 DDR adapter being configured 2535 4-Port 10/100/1000 Base-TX Ethernet PCI-X Adapter being configured. 2547 Generic 522 bites per sector SCSI JBOD (not osdisk) Disk Drive 254E Fibre Channel Expansion Card 2562 Keyboard/Mouse Attachment Card-PCI being configured. 2564 Keyboard/Mouse Attachment Card-PCI being configured. 2566 USB 3.5 inch Micro Diskette Drive 2568 USB CD-ROM, Generic 2571 2-Port PCI Asynchronous EIA-232 Adapter 2581 1 GB iSCSI TOE PCI-X adapter is being configured (copper connector) 2582 iSCSI protocol device associated with an iSCSI adapter is being configured 2583 1 GB iSCSI TOE PCI-X adapter being configured (copper connector) 2584 IDE DVD-RAM drive being configured 2585 IDE DVD-ROM drive being configured 2586 2587 Slimline DVD-ROM drive 2588 4.7 GB slimline DVD-RAM drive 2590 IDE CD-ROM drive being configured 2591 IDE DVD-ROM drive being configured. 2592 IDE DVD-ROM drive being configured. 2593 IDE DVD-RAM drive being configured. 2594 4.7 GB IDE slimline DVD-RAM drive 2595 IDE slimline DVD-ROM drive 25A0 I/O Planar Control Logic for IDE devices 25B9 Ethernet Adapter (Fiber) 25C0 Gigabit Ethernet-SX PCI-X adapter 25C1 10/100/1000 base-TX Ethernet PCI-X adapter 25C2 Dual Port Gigabit SX Ethernet PCI-X Adapter 25C3 10/100/1000 Base-TX Dual Port PCI-Adapter 25C4 Broadcom Dual-Port Gpbs Ethernet PCI-X Adapter 25D2 LSI SAS adapter 2600 PCI 64-bit Fibre Channel Arbitrated Loop Adapter being configured. 2601 PCI 64-bit Fibre Channel Arbitrated Loop Adapter being configured. 2602 PCI 64-Bit 4 GB fibre channel adapter 2611 36/72 GB 4 mm internal tape drive 2612 80/160 GB internal tape drive with VXA2 technology 2613 200/400 GB LTO2 Tape drive 2614 VXA3 160/320 GB Tape Drive 2615 Configuring DAT160 80 GB Tape drive 2617 Configuring LTO3 400 GB Tape drive 2621 PCI-X Dual-port 4x HCA Adapter being configured 2631 Integrated IDE controller 2640 IDE Disk Drive, 2.5 inch 2641 73 GB SCSI disk drive 68 pin 10K rpm being identified or configured. 2642 73 GB SCSI disk drive 80 pin 10K rpm with u3 carrier being identified or configured. 2643 73 GB SCSI disk drive 80 pin 10K rpm with u3 carrier being identified or configured. (For OpenPower systems) 2644 146 GB SCSI disk drive 68 pin 10K rpm being identified or configured. 2645 146 GB SCSI disk drive 80 pin 10K rpm with u3 carrier being identified or configured. 2646 146 GB SCSI disk drive 80 pin 10K rpm with u3 carrier being identified or configured. (For OpenPower systems) 2647 300 GB SCSI disk drive 68 pin 10K rpm being identified or configured. 2648 300 GB SCSI disk drive 80 pin 10K rpm with u3 carrier being identified or configured. 2649 300 GB SCSI disk drive 80 pin 10K rpm with u3 carrier being identified or configured. (For OpenPower systems) 264b 36 GB SCSI disk drive 80 pin 15K rpm with u3 carrier being identified or configured. 264d 36 GB SCSI disk drive 80 pin 15K rpm with u3 carrier being identified or configured. (For OpenPower systems) 264e 73 GB SCSI disk drive 80 pin 15K rpm with u3 carrier being identified or configured. 2650 ESS iSCSI devices being identified or configured. 2651 SVC being identified or configured. 2652 SVCCISCOi being identified or configured. 2653 73 GB SCSI disk drive 80 pin 15K rpm with u3 carrier being identified or configured. (For OpenPower systems) 2654 146 GB SCSI disk drive 80 pin 15K rpm with u3 carrier being identified or configured. 2655 146 GB SCSI disk drive 80 pin 15K rpm with u3 carrier being identified or configured. (For OpenPower systems) 2656 73 GB SCSI disk drive 80 pin 15K rpm being identified or configured. 2657 146 GB SCSI disk drive 80 pin 15K rpm being identified or configured. 2658 73 GB SCSI disk drive 80 pin 10K rpm being identified or configured. 2659 146 GB SCSI disk drive 80 pin 10K rpm being identified or configured. 265b 300 GB SCSI disk drive 80 pin 10K rpm being identified or configured. 2D01 PCI-X Quad Channel U320 SCSI RAID battery pack 2D05 PCI-X266 Planar 3 GB SAS RAID adapter battery pack 2D07 PCI-X DDR Auxiliary Cache adapter -- AIX diagnostics load-progress indicators Note: Some systems might produce 4-digit codes. If the leftmost digit of a 4-digit code is 0, use the three rightmost digits. Progress code Description/Action -------------------------------- c00 AIX Install/Maintenance loaded successfully. c01 Insert the first diagnostic diskette. c02 Diskettes inserted out of sequence. c03 The wrong diskette is in diskette drive. c04 The loading stopped with an irrecoverable error. c05 A diskette error occurred. c06 The rc.boot configuration shell script is unable to determine type of boot. c07 Insert the next diagnostic diskette. c08 RAM file system started incorrectly. c09 The diskette drive is reading or writing a diskette. c20 An unexpected halt occurred, and the system is configured to enter the kernel debug program instead of entering a system dump. c21 The ifconfig command was unable to configure the network for the client network host. c22 The tftp command was unable to read client's ClientHostName. info file during a client network boot. c24 Unable to read client's ClientHostName.info file during a client network boot. c25 Client did not mount remote miniroot during network install. c26 Client did not mount the /usr file system during the network boot. c29 The system was unable to configure the network device. c31 Select the console display for the diagnostics. To select No console display, set the key mode switch to Normal, then to Service. The diagnostic programs then load and run the diagnostics automatically. If you continue to get the message, check the cables and make sure you are using the serial port. c32 A directly attached display (HFT) was selected. c33 A TTY terminal attached to serial ports S1 or S2 was selected. c34 A file was selected. The console messages store in a file. c35 No console found. c40 Configuration files are being restored. c41 Could not determine the boot type or device. c42 Extracting data files from diskette. c43 Cannot access the boot/install tape. c44 Initializing installation database with target disk information. c45 Cannot configure the console. c46 Normal installation processing. c47 Could not create a physical volume identifier (PVID) on disk. c48 Prompting you for input. c49 Could not create or form the JFS log. c50 Creating root volume group on target disks. c51 No paging devices were found. c52 Changing from RAM environment to disk environment. c53 Not enough space in the /tmp directory to do a preservation installation. c54 Installing either BOS or additional packages. c55 Could not remove the specified logical volume in a preservation installation. c56 Running user-defined customization. c57 Failure to restore BOS. c58 Displaying message to turn the key. c59 Could not copy either device special files, device ODM, or volume group information from RAM to disk. c61 Failed to create the boot image. c62 Loading platform dependent debug files. c63 Loading platform dependent data files. c64 Failed to load platform dependent data files. c70 Problem Mounting diagnostic CD-ROM disc. c99 Diagnostics have completed. This code is only used when there is no console. Fxx (xx is any number) Refer to Firmware chapter of the service manual. -- Dump progress indicators (dump status codes) The following dump progress indicators, or dump status codes, are part of a Type 102 message. Note: When a lowercase c is listed, it displays in the lower half of the character position. Some systems produce 4-digit codes, the two leftmost positions can have blanks or zeros. Use the two rightmost digits. Progress code Description/Action -------------------------------- 0c0 The dump completed successfully. 0c1 The dump failed due to an I/O error. 0c2 A dump, requested by the user, is started. 0c3 The dump is inhibited. 0c4 The dump device is not large enough. 0c5 The dump did not start, or the dump crashed. 0c6 Dumping to a secondary dump device. 0c7 Reserved. 0c8 The dump function is disabled. 0c9 A dump is in progress. 0cc Unknown dump failure. -- Crash codes Note: Some systems may produce 4-digit codes. If the leftmost digit of a 4-digit code is 0, use the three rightmost digits. The crash codes that follow are part of a Type 102 message. These crash codes are grouped into three categories: Category 1 Dump analysis is the appropriate first action in Problem Determination. Begin the Problem Determination process with software support. Category 2 Dump analysis most likely will not aid in Problem Determination. Begin the Problem Determination process with hardware support. Category 3 Both software and hardware support may be needed in Problem Determination, go to 888 sequence in operator panel display to assist in problem isolation. Category 1 crash progress code Progress code Description/Action 300 Data storage interrupt from the processor. 32x Data storage interrupt because of an I/O exception from IOCC. 38x Data storage interrupt because of an I/O exception from SLA. 400 Instruction storage interrupt. 700 Program interrupt. Category 2 crash progress code Progress code Description/Action 200 Machine check because of a memory bus error. 201 Machine check because of a memory timeout. 202 Machine check because of a memory card failure. 203 Machine check because of an out of range address. 204 Machine check because of an attempt to write to ROS. 205 Machine check because of an uncorrectable address parity. 206 Machine check because of an uncorrectable ECC error. 207 Machine check because of an unidentified error. 208 Machine check due to an L2 uncorrectable ECC. 500 External interrupt because of a scrub memory bus error. 501 External interrupt because of an unidentified error. 51x External interrupt because of a DMA memory bus error. 52x External interrupt because of an IOCC channel check. 53x External interrupt from an IOCC bus timeout; x represents the IOCC number. 54x External interrupt because of an IOCC keyboard check. 800 Floating point is not available. Category 3 crash progress code Progress code Description/Action 000 Unexpected system interrupt. 558 There is not enough memory to continue the IPL. 600 AIX 4.3.3.3 and above: Alignment Interrupt. If pre-AIX 4.3.3.3: AIX has crashed because the Portability Assist Layer (PAL) for this machine type has detected a problem. 605 AIX 4.3.3.3 and above: AIX has crashed because the Portability Assist Layer (PAL) for this machine type has detected a problem. >>>>> PART 2: POWER AND RS IPL CODES <<<<< ========================================== MCA LED codes: -------------- Booting BIST phase: leds 100-195, defining hardware status Booting POST phase: leds 200-2E7, during finding BLV LED 200: key in secure position LED 299: BLV will be loaded PCI systems an pSeries LED codes: --------------------------------- reduced ODM from BLV copied into RAMFS: OK=510, NOT OK=LED 548: LED 511: bootinfo -b is called to determine the last bootdevice ipl_varyon of rootvg: OK=517,ELSE 551,552,554,556: LED 555,557: mount /dev/hd4 on temporary mountpoint /mnt LED 518: mount /usr, /var LED 553: syncvg rootvg, or inittab problem LED 549 LED 581: tcp/ip is being configured, and there is some problem Last phases in the boot is where cfgcon is called, to configure the console. cfgcon LED codes include: C31: Console not yet configured. C32: Console is an LFT terminal C33: Console is a TTY C34: Console is a file on disk C99: Could not detect a console device LED 551: ipl_varyon of rootvg 201 : Damaged boot image 223-229 : Invalid boot list 551,555,557 : Corrupted filesystem, corrupted JFS log 552,554,556 : Superblock corrupted, corrupted customized ODM database 553 : Corrupted /etc/inittab file Firmware that leads to LED code: -------------------------------- LED Code 888 right after boot: software problem 102, OR, hardware or software problem 103 rc.boot LED codes: ------------------ rc.boot1 init success=F05 error=c06 restbase copies bootimage ODM -> RAM fs ODM: success=510 error=548 cfgmgr -f configuration all base devices needed to access rootvg bootinfo -b end rc.boot 1 LED=511 Built-In Self-Test (BIST) Indicators ------------------------------------ 100 BIST completed successfully; control was passed to IPL ROS. 101 BIST started following reset. 102 BIST started, following the system unit's power-on reset. 103 BIST could not determine the system model number. 104 Equipment conflict; BIST could not find the CBA. 105 BIST could not read from the OCS EPROM. 106 BIST failed: CBA not found 111 OCS stopped; BIST detected a module error. 112 A checkstop occurred during BIST; checkstop results could not be logged out. 113 Three checkstops have occurred. 120 BIST starting a CRC check on the 8752 EPROM. 121 BIST detected a bad CRC in the first 32K bytes of the OCS EPROM. 122 BIST started a CRC check on the first 32K bytes of the OCS EPROM. 123 BIST detected a bad CRC on the OCS area of NVRAM. 124 BIST started a CRC check on the OCS area of NVRAM. 125 BIST detected a bad CRC on the time-of-day area of NVRAM. 126 BIST started a CRC check on the time-of-day area of NVRAM. 127 BIST detected a bad CRC on the 8752 EPROM. 130 BIST presence test started. 140 Running BIST. (Box Manufacturing Mode Only) 142 Box manufacturing mode operation. 143 Invalid memory configuration. 144 Manufacturing test failure. 151 BIST started AIPGM test code. 152 BIST started DCLST test code. 153 BIST started ACLST test code. 154 BIST started AST test code. 160 Bad EPOW Signal/Power status signal. 161 BIST being conducted on BUMP I/O. 162 BIST being conducted on JTAG. 163 BIST being conducted on Direct I/O. 164 BIST being conducted on CPU. 165 BIST being conducted on DCB and Memory. 166 BIST being conducted on Interrupts. 170 BIST being conducted on Multi-Processors. 180 Logout in progress. 182 BIST COP bus not responding. 185 A checkstop condition occurred during the BIST. 186 System logic-generated checkstop (Model 250 only). 187 Graphics-generated checkstop (Model 250). 195 Checkstop logout complete 199 Generic SCSI backplane 888 BIST did not start. Power-On Self-Test (POST) Indicators ------------------------------------ 200 IPL attempted with keylock in the Secure position. 201 IPL ROM test failed or checkstop occurred (irrecoverable). 202 Unexpected machine check interrupt. 203 Unexpected data storage interrupt. 204 Unexpected instruction storage interrupt. 205 Unexpected external interrupt. 206 Unexpected alignment interrupt. 207 Unexpected program interrupt. 208 Unexpected floating point unavailable interrupt. 209 Unexpected SVC interrupt. 20c L2 cache POST error. (The display shows a solid 20c for 5 seconds.) 210 Unexpected SVC interrupt. 211 IPL ROM CRC comparison error (irrecoverable). 212 RAM POST memory configuration error or no memory found (irrecoverable). 213 RAM POST failure (irrecoverable). 214 Power status register failed (irrecoverable). 215 A low voltage condition is present (irrecoverable). 216 IPL ROM code being uncompressed into memory. 217 End of boot list encountered. 218 RAM POST is looking for good memory. 219 RAM POST bit map is being generated. 21c L2 cache is not detected. (The display shows a solid 21c for 2 seconds.) 220 IPL control block is being initialized. 221 NVRAM CRC comparison error during AIX IPL(key mode switch in Normal mode). Reset NVRAM by reaccomplishing IPL in Service mode. For systems with an internal, direct-bus-attached (DBA) disk, IPL ROM attempted to perform an IPL from that disk before halting with this operator panel display value. 222 Attempting a Normal mode IPL from Standard I/O planar-attached devices specified in NVRAM IPL Devices List. 223 Attempting a Normal mode IPL from SCSI-attached devices specified in NVRAM IPL Devices List. 224 Attempting a Normal mode IPL from 9333 subsystem device specified in NVRAM IPL Devices List. 225 Attempting a Normal mode IPL from 7012 DBA disk-attached devices specified in NVRAM IPL Devices List. 226 Attempting a Normal mode IPL from Ethernet specified in NVRAM IPL Devices List. 227 Attempting a Normal mode IPL from Token-Ring specified in NVRAM IPL Devices List. 228 Attempting a Normal mode IPL from NVRAM expansion code. 229 Attempting a Normal mode IPL from NVRAM IPL Devices List; cannot IPL from any of the listed devices, or there are no valid entries in the Devices List. 22c Attempting a normal mode IPL from FDDI specified in NVRAM IPL device list. 230 Attempting a Normal mode IPL from adapter feature ROM specified in IPL ROM Device List. 231 Attempting a Normal mode IPL from Ethernet specified in IPL ROM Device List. 232 Attempting a Normal mode IPL from Standard I/O planar-attached devices specified in ROM Default Device List. 233 Attempting a Normal mode IPL from SCSI-attached devices specified in IPL ROM Default Device List. 234 Attempting a Normal mode IPL from 9333 subsystem device specified in IPL ROM Device List. 235 Attempting a Normal mode IPL from 7012 DBA disk-attached devices specified in IPL ROM Default Device List. 236 Attempting a Normal mode IPL from Ethernet specified in IPL ROM Default Device List. 237 Attempting a Normal mode IPL from Token-Ring specified in IPL ROM Default Device List. 238 Attempting a Normal mode IPL from Token-Ring specified by the operator. 239 System failed to IPL from the device chosen by the operator. 23c Attempting a normal mode IPL from FDDI specified in IPL ROM device list. 240 Attempting a Service mode IPL from adapter feature ROM. 241 Attempting a normal boot from devices specified in the NVRAM boot list. 242 Attempting a Service mode IPL from Standard I/O planar-attached devices specified in the NVRAM IPL Devices List. 243 Attempting a Service mode IPL from SCSI-attached devices specified in the NVRAM IPL Devices List. 244 Attempting a Service mode IPL from 9333 subsystem device specified in the NVRAM IPL Devices List. 245 Attempting a Service mode IPL from 7012 DBA disk-attached devices specified in the NVRAM IPL Devices List. 246 Attempting a Service mode IPL from Ethernet specified in the NVRAM IPL Devices List. 247 Attempting a Service mode IPL from Token-Ring specified in the NVRAM Device List. 248 Attempting a Service mode IPL from NVRAM expansion code. 249 Attempting a Service mode IPL from the NVRAM IPL Devices List; cannot IPL from any of the listed devices, or there are no valid entries in the Devices List. 24c Attempting a service mode IPL from FDDI specified in NVRAM IPL device list. 250 Attempting a Service mode IPL from adapter feature ROM specified in the IPL ROM Device List. 251 Attempting a Service mode IPL from Ethernet specified in the IPL ROM Default Device List. 252 Attempting a Service mode IPL from Standard I/O planar-attached devices specified in the ROM Default Device List. 253 Attempting a Service mode IPL from SCSI-attached devices specified in the IPL ROM Default Device List. 254 Attempting a Service mode IPL from 9333 subsystem device specified in the IPL ROM Devices List. 255 Attempting a Service mode IPL from 7012 DBA disk-attached devices specified in IPL ROM Default Device List. 256 Attempting a Service mode IPL from Ethernet specified in the IPL ROM Devices List. 257 Attempting a Service mode IPL from Token-Ring specified in the IPL ROM Devices List. 258 Attempting a Service mode IPL from Token-Ring specified by the operator. 259 Attempting a Service mode IPL from FDDI specified by the operator. 25c Attempting a service mode IPL from FDDI specified in IPL ROM device list. 260 Information is being displayed on the display console. 261 No supported local system display adapter was found. 262 Keyboard not detected as being connected to the system's keyboard port. 263 Attempting a Normal mode IPL from adapter feature ROM specified in the NVRAM Device List. 269 Stalled state - the system is unable to IPL. 270 Low Cost Ethernet Adapter (LCE) POST executing 271 Mouse and Mouse port POST. 272 Tablet Port POST. 276 10/100Mbps MCA Ethernet Adapter POST executing 277 Auto Token-Ring LANstreamer MC 32 Adapter. 278 Video ROM scan POST. 279 FDDI POST. 280 3com Ethernet POST. 281 Keyboard POST executing. 282 Parallel port POST executing. 283 Serial port POST executing. 284 POWER Gt1 graphics adapter POST executing. 285 POWER Gt3 graphics adapter POST executing. 286 Token-Ring adapter POST executing. 287 Ethernet adapter POST executing. 288 Adapter card slots being queried. 289 POWER GT0 Display Adapter POST. 290 IOCC POST error (irrecoverable). 291 Standard I/O POST running. 292 SCSI POST running. 293 7012 DBA disk POST running. 294 IOCC bad TCW memory module in slot location J being tested. 295 Graphics Display adapter POST, color or grayscale. 296 ROM scan POST. 297 System model number does not compare between OCS and ROS (irrecoverable). 298 Attempting a software IPL. 299 IPL ROM passed control to the loaded program code. 301 Flash Utility ROM test failed or checkstop occurred (irrecoverable 302 Flash Utility ROM: User prompt, move the key to the service position in order to perform an optional Flash Update. LED 3d2 will only appear if the key switch is in the secure position. This signals the user that a Flash Update may be initiated by moving the key switch to the service position. If the key is moved to the service position then LED 3d3 will be displayed, this signals the user to press the Reset button and select optional Flash Update. 303 Flash Utility ROM: User prompt, press the Reset button in order to perform an optional Flash Update. LED 3d2 will only appear if the key switch is the secure position. This signals the user that a Flash Update may be initiated by moving the key switch to the service position. If the key is moved to the service position LED 3d3 will be displayed, this signals the user to press the Reset button and select optional Flash Update. 304 Flash Utility ROM IOCC POST error (irrecoverable). 305 Flash Utility ROM standard I/O POST running. 306 Flash Utility ROM is attempting IPL from Flash Update media device. 307 Flash Utility ROM system model number does not compare between OCS and ROM (irrecoverable). 308 Flash Utility ROM: IOCC TCW memory is being tested. 309 Flash Utility ROM passed control to a Flash Update Boot Image. 311 Flash Utility ROM CRC comparison error (irrecoverable). 312 Flash Utility ROM RAM POST memory configuration error or no memory found (irrecoverable). 313 Flash Utility ROM RAM POST failure (irrecoverable). 314 Flash Utility ROM Power status register failed (irrecoverable). 315 Flash Utility ROM detected a low voltage condition. 318 Flash Utility ROM RAM POST is looking for good memory. 319 Flash Utility ROM RAM POST bit map is being generated. 322 CRC error on media Flash Image. No Flash Update performed. 323 Current Flash Image is being erased. 324 CRC error on new Flash Image after Update was performed. (Flash Image is cor-rupted.) 325 Flash Update successful and complete. Configuration Program Indicators -------------------------------- 500 Querying Standard I/O slot. 501 Querying card in Slot 1. 502 Querying card in Slot 2. 503 Querying card in Slot 3. 504 Querying card in Slot 4. 505 Querying card in Slot 5. 506 Querying card in Slot 6. 507 Querying card in Slot 7. 508 Querying card in Slot 8. 510 Starting device configuration. 511 Device configuration completed. 512 Restoring device configuration files from media. 513 Restoring basic operating system installation files from media. 516 Contacting server during network boot. 517 Mounting client remote file system during network IPL. 518 Remote mount of the root and /usr file systems failed during network boot. 520 Bus configuration running. 521 /etc/init invoked cfgmgr with invalid options; /etc/init has been corrupted or incor-rectly modified (irrecoverable error). 522 The configuration manager has been invoked with conflicting options (irrecoverable error). 523 The configuration manager is unable to access the ODM database (irrecoverable error). 524 The configuration manager is unable to access the config.rules object in the ODM database (irrecoverable error). 525 The configuration manager is unable to get data from a customized device object in the ODM database (irrecoverable error). 526 The configuration manager is unable to get data from a customized device driver object in the ODM database ( irrecoverable error). 527 The configuration manager was invoked with the phase 1 flag; running phase 1 at this point is not permitted (irrecoverable error). 528 The configuration manager cannot find sequence rule, or no program name was specified in the ODM database (irrecoverable error). 529 The configuration manager is unable to update ODM data (irrecoverable error). 530 The program savebase returned an error. 531 The configuration manager is unable to access the PdAt object class (irrecoverable error). 532 There is not enough memory to continue (malloc failure); irrecoverable error. 533 The configuration manager could not find a configure method for a device. 534 The configuration manager is unable to acquire database lock (irrecoverable error). 535 HIPPI diagnostics interface driver being configured. 536 The configuration manager encountered more than one sequence rule specified in the same phase (irrecoverable error). 537 The configuration manager encountered an error when invoking the program in the sequence rule. 538 The configuration manager is going to invoke a configuration method. 539 The configuration method has terminated, and control has returned to the configura-tion manager. 551 IPL vary-on is running. 552 IPL varyon failed. 553 IPL phase 1 is complete. 554 The boot device could not be opened or read, or unable to define NFS swap device during network boot. 555 An ODM error occurred when trying to varyon the rootvg, or unable to create an NFS swap device during network boot. 556 Logical Volume Manager encountered error during IPL vary-on. 557 The root filesystem will not mount. 558 There is not enough memory to continue the system IPL. 559 Less than 2 M bytes of good memory are available to load the AIX kernel. 570 Virtual SCSI devices being configured. 571 HIPPI common function device driver being configured. 572 HIPPI IPI-3 master transport driver being configured. 573 HIPPI IPI-3 slave transport driver being configured. 574 HIPPI IPI-3 transport services user interface device driver being configured. 575 A 9570 disk-array driver is being configured. 576 Generic async device driver being configured. 577 Generic SCSI device driver being configured. 578 Generic commo device driver being configured. 579 Device driver being configured for a generic device. 580 HIPPI TCPIP network interface driver being configured. 581 Configuring TCP/IP. 582 Configuring Token-Ring data link control. 583 Configuring an Ethernet data link control. 584 Configuring an IEEE Ethernet data link control. 585 Configuring an SDLC MPQP data link control. 586 Configuring a QLLC X.25 data link control. 587 Configuring a NETBIOS. 588 Configuring a Bisync Read-Write (BSCRW). 589 SCSI target mode device being configured. 590 Diskless remote paging device being configured. 591 Configuring an LVM device driver. 592 Configuring an HFT device driver. 593 Configuring SNA device drivers. 594 Asynchronous I/O being defined or configured. 595 X.31 pseudo-device being configured. 596 SNA DLC/LAPE pseudo-device being configured. 597 OCS software being configured. 598 OCS hosts being configured during system reboot. 599 Configuring FDDI data link control. 5c0 Streams-based hardware drive being configured. 5c1 Streams-based X.25 protocol being configured. 5c2 Streams-based X.25 COMIO emulator driver being configured. 5c3 Streams-based X.25 TCP/IP interface driver being configured. 5c4 FCS adapter device driver being configured. 5c5 SCB network device driver for FCS is being configured. 5c6 AIX SNA channel being configured. 600 Starting network boot portion of /sbin/rc.boot 602 Configuring network parent devices. 603 /usr/lib/methods/defsys, /usr/lib/methods/cfgsys, or /usr/lib/methods/cfgbus failed. 604 Configuring physical network boot device. 605 Configuration of physical network boot device failed. 606 Running /usr/sbin/ifconfig on logical network boot device. 607 /usr/sbin/ifconfig failed. 608 Attempting to retrieve the client.info file with tftp.Note that a flashing 608 indicates multiple attempt(s) to retrieve the client_info file are occurring. 609 The client.info file does not exist or it is zero length. 610 Attempting remote mount of NFS file system. 611 Remote mount of the NFS file system failed. 612 Accessing remote files; unconfiguring network boot device. 614 Configuring local paging devices. 615 Configuration of a local paging device failed. 616 Converting from diskless to dataless configuration. 617 Diskless to dataless configuration failed. 618 Configuring remote (NFS) paging devices. 619 Configuration of a remote (NFS) paging device failed. 620 Updating special device files and ODM in permanent filesystem with data from boot RAM filesystem. 622 Boot process configuring for operating system installation. 650 IBM SCSD disk drive being configured 668 25MB ATM MCA Adapter being configured 680 POWER GXT800M Graphics Adapter 689 4.5GB Ultra SCSI Single Ended Disk Drive being configured 690 9.1GB Ultra SCSI Single Ended Disk Drive being configured 694 Eicon ISDN DIVA MCA Adapter for PowerPC Systems 700 Progress indicator. A 1.1 GB 8-bit SCSI disk drive being identified or configured. 701 Progress indicator. A 1.1 GB 16-bit SCSI disk drive is being identified or configured. 702 Progress indicator. A 1.1 GB 16-bit differential SCSI disk drive is being identified or configured. 703 Progress indicator. A 2.2 GB 8-bit SCSI disk drive is being identified or configured. 704 Progress indicator. A 2.2 GB 16-bit SCSI disk drive is being identified or configured. 705 The configuration method for the 2.2 GB 16-bit differential SCSI disk drive is being run. If an irrecoverable error occurs, the system halts. 706 Progress indicator. A 4.5 GB 16-bit SCSI disk drive is being identified or configured. 707 Progress indicator. A 4.5 GB 16-bit differential SCSI disk drive is being identified or configured. 708 Progress indicator. A L2 cache is being identified or configured. 710 POWER GXT150M graphics adapter being identified or configured. 711 Unknown adapter being identified or configured. 712 Graphics slot bus configuration is executing. 713 The IBM ARTIC960 device is being configured. 714 A video capture adapter is being configured. 715 The Ultimedia Services audio adapter is being configured. This LED displays briefly on the panel. 717 TP Ethernet Adapter being configured. 718 GXT500 Graphics Adapter being configured. 720 Unknown read/write optical drive type being configured. 721 Unknown disk or SCSI device being identified or configured. 722 Unknown disk being identified or configured. 723 Unknown CD-ROM being identified or configured. 724 Unknown tape drive being identified or configured. 725 Unknown display adapter being identified or configured. 726 Unknown input device being identified or configured. 727 Unknown async device being identified or configured. 728 Parallel printer being identified or configured. 729 Unknown parallel device being identified or configured. 730 Unknown diskette drive being identified or configured. 731 PTY being identified or configured. 732 Unknown SCSI initiator type being configured. 733 7GB 8mm tape drive being configured. 734 4x SCSI-2 640MB CD-ROM Drive 741 1080MB SCSI Disk Drive 745 16GB 4mm Tape Auto Loader 748 MCA keyboard/mouse adapter being configured. 749 7331 Model 205 Tape Library 754 1.1GB 16-bit SCSI disk drive being configured. 755 2.2GB 16-bit SCSI disk drive being configured. 756 4.5GB 16-bit SCSI disk drive being configured. 757 External 13GB 1.5M/s 1/4 inch tape being configured. 772 4.5GB SCSI F/W Disk Drive 773 9.1GB SCSI F/W Disk Drive 774 9.1GB External SCSI Disk Drive 77c Progress indicator. A 1.0 GB 16-bit SCSI disk drive being identified or configured. 783 4mm DDS-2 Tape Autoloader 789 2.6GB External Optical Drive 794 10/100MB Ethernet PX MC Adapter 797 Turboways 155 UTP/STP ATM Adapter being identified or configured. 798 Video streamer adapter being identified or configured. 800 Turboways 155 MMF ATM Adapter being identified or configured. 803 7336 Tape Library Robotics being configured 804 8x Speed SCSI-2 CD ROM drive being configured 807 SCSI Device Enclosure being configured 808 System Interface Full (SIF) configuration process 80c SSA 4-Port Adapter being identified or configured. 811 Processor complex being identified or configured. 812 Memory being identified or configured. 813 Battery for time-of-day, NVRAM, and so on being identified or configured, or system I/O control logic being identified or configured. 814 NVRAM being identified or configured. 815 Floating-point processor test 816 Operator panel logic being identified or configured. 817 Time-of-day logic being identified or configured. 819 Graphics input device adapter being identified or configured. 821 Standard keyboard adapter being identified or configured. 823 Standard mouse adapter being identified or configured. 824 Standard tablet adapter being identified or configured. 825 Standard speaker adapter being identified or configured. 826 Serial Port 1 adapter being identified or configured. 827 Parallel port adapter being identified or configured. 828 Standard diskette adapter being identified or configured. 831 3151 adapter being identified or configured, or Serial Port 2 being identified or con-figured. 834 64-port async controller being identified or configured. 835 16-port async concentrator being identified or configured. 836 128-port async controller being identified or configured. 837 16-port remote async node being identified or configured. 838 Network Terminal Accelerator Adapter being identified or configured. 839 7318 Serial Communications Server being configured. 841 8-port async adapter (EIA-232) being identified or configured. 842 8-port async adapter (EIA-422A) being identified or configured. 843 8-port async adapter (MIL-STD 188) being identified or configured. 844 7135 RAIDiant Array disk drive subsystem controller being identified or configured. 845 7135 RAIDiant Array disk drive subsystem drawer being identified or configured. 846 RAIDiant Array SCSI 1.3GB Disk Drive 847 16-port serial adapter (EIA-232) being identified or configured. 848 16-port serial adapter (EIA-422) being identified or configured. 849 X.25 Interface Co-Processor/2 adapter being identified or configured. 850 Token-Ring network adapter being identified or configured. 851 T1/J1 Portmaster adapter being identified or configured. 852 Ethernet adapter being identified or configured. 854 3270 Host Connection Program/6000 connection being identified or configured. 855 Portmaster Adapter/A being identified or configured. 857 FSLA adapter being identified or configured. 858 5085/5086/5088 adapter being identified or configured. 859 FDDI adapter being identified or configured. 85c Progress indicator. Token-Ring High-Performance LAN adapter is being identified or configured. 861 Optical adapter being identified or configured. 862 Block Multiplexer Channel Adapter being identified or configured. 865 ESCON Channel Adapter or emulator being identified or configured. 866 SCSI adapter being identified or configured. 867 Async expansion adapter being identified or configured. 868 SCSI adapter being identified or configured. 869 SCSI adapter being identified or configured. 870 Serial disk drive adapter being identified or configured. 871 Graphics subsystem adapter being identified or configured. 872 Grayscale graphics adapter being identified or configured. 874 Color graphics adapter being identified or configured. 875 Vendor generic communication adapter being configured. 876 8-bit color graphics processor being identified or configured. 877 POWER Gt3/POWER Gt4 being identified or configured. 878 POWER Gt4 graphics processor card being configured. 879 24-bit color graphics card, MEV2 880 POWER Gt1 adapter being identified or configured. 887 Integrated Ethernet adapter being identified or configured. 889 SCSI adapter being identified or configured. 890 SCSI-2 Differential Fast/Wide and Single-Ended Fast/Wide Adapter/A. 891 Vendor SCSI adapter being identified or configured. 892 Vendor display adapter being identified or configured. 893 Vendor LAN adapter being identified or configured. 894 Vendor async/communications adapter being identified or configured. 895 Vendor IEEE 488 adapter being identified or configured. 896 Vendor VME bus adapter being identified or configured. 897 S/370 Channel Emulator adapter being identified or configured. 898 POWER Gt1x graphics adapter being identified or configured. 899 3490 attached tape drive being identified or configured. 89c Progress indicator. A multimedia SCSI CD-ROM is being identified or configured. 901 Vendor SCSI device being identified or configured. 902 Vendor display device being identified or configured. 903 Vendor async device being identified or configured. 904 Vendor parallel device being identified or configured. 905 Vendor other device being identified or configured. 908 POWER GXT1000 Graphics subsystem being identified or configured. 910 1/4GB Fibre Channel/266 Standard Adapter being identified or configured. 911 Fibre Channel/1063 Adapter Short Wave 912 2.0GB SCSI-2 differential disk drive being identified or configured. 913 1.0GB differential disk drive being identified or configured. 914 5GB 8 mm differential tape drive being identified or configured. 915 4GB 4 mm tape drive being identified or configured. 916 Non-SCSI vendor tape adapter being identified or configured. 917 Progress indicator. 2.0GB 16-bit differential SCSI disk drive is being identified or configured. 918 Progress indicator. 2GB 16-bit single-ended SCSI disk drive is being identified or configured. 920 Bridge Box being identified or configured. 921 101 keyboard being identified or configured. 922 102 keyboard being identified or configured. 923 Kanji keyboard being identified or configured. 924 Two-button mouse being identified or configured. 925 Three-button mouse being identified or configured. 926 5083 tablet being identified or configured. 927 5083 tablet being identified or configured. 928 Standard speaker being identified or configured. 929 Dials being identified or configured. 930 Lighted program function keys (LPFK) being identified or configured. 931 IP router being identified or configured. 933 Async planar being identified or configured. 934 Async expansion drawer being identified or configured. 935 3.5-inch diskette drive being identified or configured. 936 5.25-inch diskette drive being identified or configured. 937 An HIPPI adapter is being configured. 942 POWER GXT 100 graphics adapter being identified or configured. 943 Progress indicator. 3480 and 3490 control units attached to a System/370 Channel Emulator/A adapter are being identified or configured. 944 100MB ATM adapter being identified or configured 945 1.0GB SCSI differential disk drive being identified or configured. 946 Serial port 3 adapter is being identified or configured. 947 Progress indicator. A 730MB SCSI disk drive is being configured. 948 Portable disk drive being identified or configured. 949 Unknown direct bus-attach device being identified or configured. 950 Missing SCSI device being identified or configured. 951 670MB SCSI disk drive being identified or configured. 952 355MB SCSI disk drive being identified or configured. 953 320MB SCSI disk drive being identified or configured. 954 400MB SCSI disk drive being identified or configured. 955 857MB SCSI disk drive being identified or configured. 956 670MB SCSI disk drive electronics card being identified or configured. 957 120MB DBA disk drive being identified or configured. 958 160 MB DBA disk drive being identified or configured. 959 160MB SCSI disk drive being identified or configured. 960 1.37GB SCSI disk drive being identified or configured. 964 Internal 20GB 8mm tape drive identified or configured. 968 1.0GB SCSI disk drive being identified or configured. 970 Half-inch, 9-track tape drive being identified or configured. 971 150MB 1/4-inch tape drive being identified or configured. 972 2.3GB 8 mm SCSI tape drive being identified or configured. 973 Other SCSI tape drive being identified or configured. 974 CD-ROM drive being identified or configured. 975 Progress indicator. An optical disk drive is being identified or configured. 977 M-Audio Capture and Playback Adapter being identified or configured. 981 540MB SCSI-2 single-ended disk drive being identified or configured. 984 1GB 8-bit disk drive being identified or configured. 985 M-Video Capture Adapter being identified or configured. 986 2.4GB SCSI disk drive being identified or configured. 987 Progress indicator. Enhanced SCSI CD-ROM drive is being identified or configured. 989 200MB SCSI disk drive being identified or configured. 990 2.0GB SCSI-2 single-ended disk drive being identified or configured. 991 525MB 1/4-inch cartridge tape drive being identified or configured. 994 5GB 8 mm tape drive being identified or configured. 995 1.2GB 1/4 inch cartridge tape drive being identified or configured. 996 Progress indicator. Single-port, multi-protocol communications adapter is being identified or configured. 997 FDDI adapter being identified or configured. 998 2.0GB4 mm tape drive being identified or configured. 999 7137 or 3514 Disk Array Subsystem being configured. D81 T2 Ethernet Adapter being configured. Diagnostic Load Progress Indicators ----------------------------------- Note: When a lowercase c is listed, it displays in the lower half of the seven-segment character position. c00 AIX Install/Maintenance loaded successfully. c01 Insert the first diagnostic diskette. c02 Diskettes inserted out of sequence. c03 The wrong diskette is in diskette drive. c04 The loading stopped with a nonrecoverable error. c05 A diskette error occurred. c06 The rc.boot configuration shell script is unable to determine type of boot. c07 Insert the next diagnostic diskette. c08 RAM file system started incorrectly. c09 The diskette drive is reading or writing a diskette. c20 An unexpected halt occurred, and the system is configured to enter the kernel debug program instead of entering a system dump. c21 The ifconfig command was unable to configure the network for the client network host. c22 The tftp command was unable to read client's ClientHostName info file during a client network boot. c24 Unable to read client's ClientHostName.info file during a client network boot. c25 Client did not mount remote miniroot during network install. c26 Client did not mount the /usr file system during the network boot. c29 The system was unable to configure the network device. c31 Select the console display for the diagnostics. To select No console display, set the key mode switch to Normal then to Service. The diagnostic programs will then load and run the diagnostics automatically. c32 A direct-attached display (HFT) was selected. c33 A tty terminal attached to serial ports S1 or S2 was selected. c34 A file was selected. The console messages store in a file. c40 Configuration files are being restored. c41 Could not determine the boot type or device. c42 Extracting data files from diskette. c43 Cannot access the boot/install tape. c44 Initializing installation database with target disk information. c45 Cannot configure the console. c46 Normal installation processing. c47 Could not create a physical volume identifier (PVID) on disk. c48 Prompting you for input. c49 Could not create or form the JFS log. c50 Creating root volume group on target disks. c51 No paging devices were found. c52 Changing from RAM environment to disk environment. c53 Not enough space in the /tmp directory to do a preservation installation. c54 Installing either BOS or additional packages. c55 Could not remove the specified logical volume in a preservation installation. c56 Running user-defined customization. c57 Failure to restore BOS. c58 Displaying message to turn the key. c59 Could not copy either device special files, device ODM, or volume group information from RAM to disk. c61 Failed to create the boot image. c62 Loading platform dependent debug files c63 Loading platform dependent data files c64 Failed to load platform dependent data files c70 Problem Mounting diagnostic CDROM disc c99 Diagnostics have completed. This code is only used when there is no console. 0c0 The dump completed successfully 0c1 The dump failed due to an I/O error. 0c2 A user-requested dump has started. You requested a dump using the SYSDUMPSTART command, a dump key sequence, or the Reset button. 0c3 The dump is inhibit 0c4 The dump did not complete. A partial dump was written to the dump device. There is not enough space on the dump device to contain the entire dump. To prevent this problem from occuring again, you must increase the size of your dumpmedia. 0c5 The dump failed to start. An unecpected error occured while the system was attempting to write to the dump media. 0c6 A dump to the secondary dump device was requested. Make the secondary dump device ready, then press CTRL-ALT-NUMPAD2. 0c7 Reserved. 0c8 The dump function is disabled. No primary dump device is configured. 0c9 A dump is in progress. 0cc Unknown dump failure ---------- Diagnostics Load Progress Indicators ----------- c00 AIX Install/Maintenance loaded successfully. c01 Insert the first diagnostic diskette. c02 Diskettes inserted out of sequence. c03 The wrong diskette is in the drive. c04 The loading stopped with an irrecoverable error. c05 A diskette error occurred. c08 RAM filesystem started incorrectly. c07 Insert the next diagnostic diskette. c09 The diskette drive is reading or writing a diskette. c20 An unexpected halt occured, and the system is configured to enter the kernel debug program instead of entering asystem dump. c21 The 'ifconfig' command was unable to configure the network for the client network host. c22 The 'tftp' command was unable to read client's ClientHostName.info file during a client network boot. c24 Unable to read client's ClientHostName.info file during a client network boot. c25 Client did not mount remote miniroot during network install. c26 Client did not mount the /usr filesystem during the network boot. c29 System was unable to configure the network device. c31 Select the console display for the diagnostics. To select "No console display", set the key mode switch to normal then to Service. The diagnostic program will then load and run the diagnostics automatically. c32 A direct-attached display (HFT) was selected. c33 a TTY terminal attached to serial ports S1 or S2 was selected. c34 A file was selected. The console messages store in a file c40 Configuration files are been restored. c41 Could not determine the boot type or device. c42 Extracting data files from diskette. c43 Diagboot cannot be accessed. c44 Initialyzing installation database with target disk information. c45 Cannot configure the console. c46 Normal installation processing. c47 Could not create a physical volume identifier (PVID) on disk. c48 Prompting you for input. c49 Could not create or form the JFS log. c50 Creating rootvg volume group on target disk c51 No paging space were found. c52 Changing from RAM environment to disk environment. c53 Not enough space in the /tmp directory to do a preservation installation. c54 Installing either BOS or additionnal packages. c55 Could not remove the specified logical volume in a preservation installation. c56 Running user-defined customization. c57 Failure to restore BOS. c58 Display message to turn the key. c59 Could not copy either device special files, device ODM, or volume group information from RAM to disk. c61 Failed to create the boot image. c70 Problem Mounting diagnostics CDROM disc. c99 Diagnostics have completed. This code is only used when there is no console. --------Debugger Progress Indicators ---------- c20 Kernel debug program activated. An unexpected system halt has occured, and you have configured the system to enter the kernel debug program instead of performing a dump. ---------Built-In Self Test (Bist) Indicators--------- 100 BIST completed successfully. Control was passed to IPL ROS. 101 BIST started following RESET 102 BIST started following Power-on Reset 103 BIST could not determine the system model number. 104 Equipment conflict. BIST could not find the CBA. 105 BIST could not read the OCS EPROM. 106 BIST detected a module error. 111 OCS stopped. BIST detected a module error. 112 A checkstop occured during BIST. 113 BIST checkstop count is greater than 1. 120 BIST starting a CRC check on the 8752 EPROM. 121 BIST detected a bad CRC in the first 32K of the OCS EPROM. 122 BIST started a CRC check on the first 32K of the OCS EPROM. 123 BIST detected a bad CRC on the OCS area of NVRAM. 124 BIST started a CRC check on the OCS area of NVRAM. 125 BIST detected a bad CRC on the time-of-day area of NVRAM. 126 BIST started a CRC check on the time-of-day area of the NVRAM. 127 BIST detected a bad CRC on the 8752 EPROM. 130 BIST presence test started. 140 BIST failed: procedure error 142 BIST failed: procedure error 143 Invalid memory configuration. 144 BIST failed; procedure error. 151 BIST started AIPGM test code. 152 BIST started DCLST test code. 153 BIST started ACLST test code. 154 BIST started AST test code. 160 Bad EPOW Signal/Power status signal 161 BIST being conducted on BUMP I/O 162 BIST being conducted on JTAG 163 BIST being conducted on Direct I/O 164 BIST being conducted on CPU 165 BIST being conducted on DCB and Memory 166 BIST being conducted on interrupts 170 BIST being conducted on 'Multi-Processor 180 BIST logout failed. 182 BIST COP bus not responding 185 A checkstop condition occured during the BIST 186 System logic-generated checkstop (Model 250 only) 187 Graphics-generated checkstop (Model 250) 195 BIST logout completed. 888 BIST did not start ------- Power-On Self Test ------- 200 IPL attempted with keylock in the SECURE position. 201 IPL ROM test failed or checkstop occured (irrecoverable) 202 IPL ROM test failed or checkstop occured (irrecoverable) 203 Unexpected data storage interrupt. 204 Unexpected instruction storage interrupt. 205 Unexpected external interrupt. 206 Unexpected alignment interrupt. 207 Unexpected program interrupt. 208 Unexpected floating point unavailable interrupt. 209 Unexpected SVC interrupt. 20c L2 cache POST error. (The display shows a solid 20c for 5 seconds 210 Unexpected SVC interrupt. 211 IPL ROM CRC comparison error (irrecoverable). 212 RAM POST memory configuration error or no memory found (irrecoverable). 213 RAM POST failure (irrecoverable). 214 Power status register failed (irrecoverable). 215 A low voltage condition is present (irrecoverable). 216 IPL ROM code being uncompressed into memory. 217 End of bootlist encountered. 218 RAM POST is looking for 1M bytes of good memory. 219 RAM POST bit map is being generated. 21c L2 cache is not detected. (The display shows a solid 21c for 5 sec) 220 IPL control block is being initialized. 221 NVRAM CRC comparison error during AIX. IPL(Key Mode Switch in Normal mode). Reset NVRAM by reaccomplishing IPL in Service mode. For systems with an internal, direct-bus-attached(DBA)disk,IPL ROM attempted to perform an IPL from that disk before halting with this three-digit display value. 222 Attempting a Normal mode IPL from Standard I/O planar attached devices specified in NVRAM IPL Devices List. 223 Attempting a Normal mode IPL from SCSI attached devices specified in NVRAM IPL Devices List. Note: May be caused by incorrect jumper setting for external SCSI devices or by incorrect SCSI terminator. REFER FFC B88 224 Attempting a Normal mode restart from 9333 subsystem device specified in NVRAM device list. 225 Attempting a Normal mode IPL from IBM 7012 DBA disk attached devices specified in NVRAM IPL Devices List. 226 Attempting a Normal mode restart from Ethernet specified in NVRAM device list. 227 Attempting a Normal mode restart from Token Ring specified in NVRAM device list. 228 Attempting a Normal mode IPL from NVRAM expansion code. 229 Attempting a Normal mode IPL from NVRAM IPL Devices List; cannot IPL from any of the listed devices, or there are no valid entry in the Devices List. 22c Attempting a normal mode IPL from FDDI specified in NVRAM IPL device list. 230 Attempting a Normal mode restart from adapter feature ROM specified in IPL ROM devices list. 231 Attempting a Normal mode restart from Ethernet specified in IPL ROM devices list. 232 Attempting a Normal mode IPL from Standard I/O planar attached devices specified in Rom Default Device List. 233 Attempting a Normal mode IPL from SCSI attached devices specified in IPL ROM Default Device List. 234 Attempting a Normal mode restart from 9333 subsystem device specified in IPL ROM device list. 235 Attempting a Normal mode IPL from IBM 7012 DBA disk attached devices specified in IPL ROM Default Device List. 236 Attempting a Normal mode restart from Ethernet specified in IPL ROM default devices list. 237 Attempting a Normal mode restart from Token Ring specified in IPL ROM default device list. 238 Attempting a Normal mode restart from Token Ring specified by the operator. 239 System failed to restart from the device chosen by the operator. 23c Attempting a normal mode IPL from FDDI specified in IPL ROM device list. 240 Attempting a Service mode restart from adapter feature ROM. 241 Attempting a Normal mode IPL from devices specified in the NVRAM IPL Devices List. 242 Attempting a Service mode IPL from Standard I/O planar attached devices specified in NVRAM IPL Devices List. 243 Attempting a Service mode IPL from SCSI attached devices specified in NVRAM IPL Devices List. 244 Attempting a Service mode restart from 9333 subsystem device specified in NVRAM device list. 245 Attempting a Service mode IPL from IBM 7012 DBA disk attached devices specified in NVRAM IPL Devices List. 246 Attempting a Service mode restart from Ethernet specified in NVRAM device list. 247 Attempting a Service mode restart from Token Ring specified in NVRAM device list. 248 Attempting a Service mode IPL from NVRAM expansion code. 249 Attempting a Service mode IPL from NVRAM IPL Devices List; cannot IPL from any of the listed devices, or there areno valid entries in the Devices List. 24c Attempting a service mode IPL from FDDI specified in NVRAM IPL device list. 250 Attempting a Service mode restart from adapter feature ROM specified in IPL ROM device list. 251 Attempting a Service mode restart from Ethernet specified in IPL ROM device list. 252 Attempting a Service mode IPL from standard I/O planar attached devicesspecified in ROM Default Device List. 253 Attempting a Service mode IPL from SCSI attached devices specified in IPL ROM Default Device List. 254 Attempting a Service mode restart from 9333 subsystem device specified in IPL ROM device list. 255 Attempting a Service mode IPL from IBM 7012 DBA disk'attached devices specified in IPL ROM Default Devices List. 256 Attempting a Service mode restart from Ethernet specified in IPL ROM default device list. 257 Attempting a Service mode restart from Token Ring specified in IPL ROM default device list. 258 Attempting a Service mode restart from Token Ring specified by the operator. 259 Attempting a Service mode restart from FDDI specified by the operator. 25c Attempting a normal mode IPL from FDDI specified in IPL ROM device list. 260 Information is being displayed on the display console. 261 Information will be displayed on the tty terminal when the "1" key is pressed on the tty terminal keyboard. 262 A keyboard was not detected as being connected to the system's NOTE: Check for blown planar fuses or for a corrupted boot on disk drive 263 Attempting a Normal mode restart from adapter feature ROM specified in NVRAM device list. 269 Stalled state - the system is unable to IPL 271 Mouse port POST. 272 Tablet port POST. 277 Auto Token-Ring LANstreamer MC 32 Adapter 278 Video ROM Scan POST. 279 FDDI adapter POST. 280 3COM Ethernet POST. 281 Keyboard POST executing. 282 Parallel port POST executing 283 Serial port POST executing 284 POWER Gt1 graphadapte POST executing 285 POWER Gt3 graphadapte POST executing 286 Token Ring adapter POST executing. 287 Ethernet adapter POST executing. 288 Adapter card slots being queried. 289 GTO POST. 290 IOCC POST error (irrecoverable). 291 Standard I/O POST running. 292 SCSI POST running. 293 IBM 7012 DBA disk POST running. 294 IOCC bad TCW SIMM in slot location J being tested. 295 Graphics Display adapter POST, color or grayscale. 296 ROM scan POST. 297 System model number does not compare between OCS and ROS (irrecoverable). Attempting a software IPL. 298 Attempting a software IPL (warm boot). 299 IPL ROM passed control to the loaded program code. 301 Flash Utility ROM failed or checkstop occured (irrecoverable) 302 Flash Utility ROM failed or checkstop occured (irrecoverable) 302 Flash Utility ROM: User prompt, move the key to the service in order to perform an optional Flash Update. LED will only appear if the key switch is in the SECURE position. This signals the user that a Flash Update may be initiated by moving the key switch to the SERVICE position. If the key is moved to the SERVICE position, LED 303 will be displayed. This signals the user to press the reset button and select optional Flash Update. 303 Flash Utility ROM: User prompt, press the reset button in order to perform an optional Flash Update. LED only appear if the key switch is in the SECURE position. This signals the user that a Flash Update may be initiated by moving the key switch to the SERVICE position. If the key is moved to the SERVICE position, LED 303 will be displayed. This signals the user to press the reset button and select optional Flash Update. 304 Flash Utility ROM IOCC POST error (irrecoverable) 305 Flash Utility ROM standard I/O POST running. 306 Flash Utility ROM is attempting IPL from Flash Update Boot Image. 307 Flash Utility ROM system model number does not compare between OCS and ROM (irrecoverable). 308 Flash Utility ROM: IOCC TCW memory is being tested. 309 Flash Utility ROM passed control to a Flash Update Boot Image. 311 Flash Utility ROM CRC comparison error (irrecoverable). 312 Flash Utility ROM RAM POST memory configuration error or no memory found ( iirecoverable). 313 Flash Utility ROM RAM POST failure( irrecoverable). 314 Flash Utility ROM Power status register failed (irrecoverable). 315 Flash Utility ROM detected a low voltage condition. 318 Flash Utility ROM RAM POST is looking for good memory. 319 Flash Utility ROM RAM POST bit map is being generated. 322 CRC error on media Flash Image. No Flash Update performed. 323 Current Flash Image is being erased. 324 CRC error on new Flash Image after Update was performed. (Flash Image is corrupted). 325 Flash Image successful and complete. 500 Querying Native I/O slot. 501 Querying card in Slot 1 502 Querying card in Slot 2 503 Querying card in Slot 3 504 Querying card in Slot 4 505 Querying card in Slot 5 506 Querying card in Slot 6 507 Querying card in Slot 7 508 Querying card in Slot 8 510 Starting device configuration. 511 Device configuration completed. 512 Restoring device configuration files from media. 513 Restoring basic operating system installation files from media. 516 Contacting server during network boot 517 Mounting client remote file system during network IPL. 518 Remote mount of the root and /usr filesystems failed during network boot. 520 Bus configuration running. 521 /etc/init invoked cfgmgr with invalid options; /etc/init has been corrupted or incorrectly modified (irrecoverable error). 522 The configuration manager has been invoked with conflicting options (irrecoverable error). 523 The configuration manager is unable to access the ODM database (irrecoverable error). 524 The configuration manager is unable to access the config rules object in the ODM database (irrecoverable error). 525 The configuration manager is unable to get data from a customized device object in the ODM database (irrecoverable error). 526 The configuration manager is unable to get data from a customized device driver objet in the ODM database (irrecoverable error). 527 The configuration manager was invoked with the phase 1 flag; running phase 1 flag; running phase 1 at this point is not permitted (irrecoverable error). 528 The configuration manager cannot find sequence rule, or no program was specified in the ODM database (irrecoverable error). 529 The configuration manager is unable to update ODM data (irrecoverable error). 530 The program "savebase" returned an error. 531 The configuration manager is unable to access PdAt object class (irrecoverable eroor) 532 There is not enough memory to continue (malloc failure); irrecoverable error. 533 The configuration manager could not find a configure method for a device. 534 The configuration manager is unable to aquire database lock. irrecoverable error. 536 The configuration manager encountered more than one sequence rule specified in the same phase. (irrecoverable error). 537 The configuration manager encountered an error when invoking the program in the sequence rule. 538 The configuration manager is going to invoke a configuration 539 The configuration method has terminated, and control has returned to the configuration manager. 551 IPL Varyon is running 552 IPL Varyon failed. 553 IPL phase 1 is complete. 554 Unable to define NFS swap device during network boot 555 Unable to define NFS swap device during network boot 556 Logical Volume Manager encountered error during IPL varyon. 557 The root filesystem will not mount. 558 There is not enough memory to continue the IPL. 559 Less than 2MB of good memory are available to load the AIX kernel. 570 Virtual SCSI devices being configured. 571 HIPPI common function device driver being configured. 572 HIPPI IPI-3 master transport driver being configured. 573 HIPPI IPI-3 slave transport driver being configured. 574 HIPPI IPI-3 transport services user interface device driver being configured. 576 Generic async device driver being configured. 577 Generic SCSI device driver being configured. 578 Generic commo device driver being configured. 579 Device driver being configured for a generic device. 580 HIPPI TCPIP network interface driver being configured. 581 Configuring TCP/IP. 582 Configuring token ring data link control. 583 Configuring an Ethernet data link control. 584 Configuring an IEEE ethernet data link control. 585 Configuring an SDLC MPQP data link control. 586 Configuring a QLLC X.25 data link control. 587 Configuring NETBIOS. 588 Configuring a Bisync Read-Write (BSCRW). 589 SCSI target mode device being configured. 590 Diskless remote paging device being configured. 591 Configuring an LVM device driver 592 Configuring an HFT device driver 593 Configuring SNA device drivers. 594 Asynchronous I/O being defined or configured. 595 X.31 pseudo device being configured. 596 SNA DLC/LAPE pseudo device being configured. 597 OCS software being configured. 598 OCS hosts being configured during system reboot. 599 Configuring FDDI data link control. 5c0 Streams-based hardware drive being configured. 5c1 Streams-based X.25 protocol being configured. 5c2 Streams-based X.25 COMIO emulator driver being configured. 5c3 Streams-based X.25 TCP/IP interface driver being configured. 5c4 FCS adapter device driver being configured. 5c5 SCB network device driver for FCS is being configured. 5c6 AIX SNA channel being configured. 600 Starting network boot portion of /sbin/rs.boot 602 Configuring network parent devices. 603 /usr/lib/methods/defsys /usr/lib/methods/cggsys, or /usr/lib/methods/cggbus failed. 604 Configuring physical network boot device. 605 Configuring physical network boot device failed. 606 Running /usr/sbin/ifconfig on logical network boot device. 607 /usr/sbin/ifconfig failed. 608 Attempting to retrieve the client.info file with tftp. Note that a flashing 608 indicates multiple attempts to retrieve the client_info file are occuring. 609 The client.info file does not exist or it is zero length. 610 Attempting remote mount of NFS file system 611 Remote mount of the NFS filesystem failed. 612 Accessing remote files; unconfiguring network boot device. 614 Configuring local paging devices. 615 Configuring of a local paging device failed. 616 Converting from diskette to dataless configuration. 617 Diskless to dataless configuration failed. 618 Configuring remote (NFS) paging devices. 619 Configuration of a remote (NFS) paging device failed. 620 Updating special device files and ODM in permanent filesystem with data from boot RAM filesystem. 622 Boot process configuring for operating system installation. 650 IBM SCSD disk drive drive being configured 700 Progress indicator. A 1.1GB 8-bit SCSI disk drive being identified or configured. 701 Progress indicator. A 1.1GB 16-bit SCSI SE disk drive being identified or configured. 702 Progress indicator. A 1.1GB 16-bit SCSI differential disk drive being identified or configured. 703 Progress indicator. A 2.2GB 8-bit SCSI disk drive being identified or configured. 704 Progress indicator. A 2.2GB 16-bit SCSI SE disk drive being identified or configured. 705 The configuration method for the 2.2GB 16-bit differential SCSI disk drive is being run. If a irrecoverable error occurs, the system halts. identified or configured. 706 Progress indicator. A 4.5GB 16-bit SE SCSI disk drive is being identified or configured. 707 Progress indicator. A 4.5GB 16-bit differential SCSI drive is being identified or configured. 708 Progress indicator: A L2 cache is being identified or configured. 710 POWER GXT150M graphics adapterbeing ientifyied or configured. 711 Unknown adapter being identified or configured. 712 Graphics slot bus configuration is executing. 713 The IBM ARTIC960 device is being configured. 714 A video capture adapter is being configured. 715 The Ultimedia Services audio adapter is being configured. This LED displays briefly on the panel. 720 Unknown read/write optical drive type being configured. 721 Unknown disk or SCSI device being identified or configured. 722 Unknown disk being identified or configured. 723 Unknown CDROM being identified or configured. 724 Unknown tape drive being identified or configured. 725 Unknown display being identified or configured. 726 Unknown input device being idenor configured 727 Unknown adync device being idenor configured +++++ pSeries: Display codes (LEDs) This page provides descriptions for the numbers and characters that display on the operator panel and descriptions of the location codes used to identify a particular item. Information is available about the following codes: *Note:* AIX logical location codes can still be seen and supported under various AIX commands and functions. However, the Diagnostic screens and menus display physical location codes for resources when running versions 5.2.0 and later. For these systems, refer to Physical Location Codes . The basic formats of the AIX location codes are as follows: * For non-SCSI devices/drives: AB-CD-EF-GH * For SCSI devices/drives: AB-CD-EF-G,H For planars, cards, and non-SCSI devices, the location code is defined as follows: AB-CD-EF-GH | | | | | | | Device/FRU/Port ID | | Connector ID | devfunc Number, Adapter Number or Physical Location Bus Type or PCI Parent Bus * The AB value identifies a bus type or PCI parent bus as assigned by the firmware. * The CD value identifies adapter number, adapter's devfunc number, or physical location. The devfunc number is defined as the PCI device number times 8, plus the function number. * The EF value identifies a connector. * The GH value identifies a port, address, device, or FRU. Adapters and cards are identified only with AB-CD. The possible values for AB are: 00 Processor bus 01 ISA bus 02 EISA bus 03 MCA bus 04 PCI bus used in the case where the PCI bus cannot be identified 05 PCMCIA buses xy For PCI adapters where x is equal to or greater than 1. The x and y are characters in the range of 0-9, A-H, J-N, P-Z (O, I, and lower case are omitted) and are equal to the parent bus's ibm, aix-loc Open Firmware Property. The possible values for CD depend on the adapter or card are as follows: * For pluggable PCI adapters/cards, CD is the device's *devfunc* number (PCI device number times 8, plus the function number). The C and D are characters in the range of 0-9, and A-F (hex numbers). This allows the location code to uniquely identify multiple adapters on individual PCI cards. For pluggable ISA adapters, CD is equal to the order in which the ISA cards defined or configured, either by SMIT or the ISA Adapter Configuration Service Aid. For integrated ISA adapters, CD is equal to a unique code identifying the ISA adapter. In most cases, this is equal to the adapter's physical location code. In cases where a physical location code is not available, CD is FF. * EF is the connector ID. It is used to identify a connector on the adapter to which a resource is attached. * GH is used to identify a port, device, or FRU. For example: o For async devices, GH defines the port on the fanout box. The values are 00 to 15. o For a diskette drive, H defines either diskette drive 1 or 2. G is always 0. o For all other devices, GH is equal to 00. For the integrated adapters, EF-GH is the same as the definition for the pluggable adapters. For example, the location code for a diskette drive is 01-D1-00-00. A second diskette drive is 01-D1-00-01. For SCSI devices, the location code is defined as: AB-CD-EF-G,H | | | | | | | | | Logical Unit address of the SCSI Device | | | Control Unit Address of the SCSI Device | | Connector ID | devfunc Number, Adapter Number or Physical Location Bus Type or PCI Parent Bus Where: * AB-CD-EF are the same as non-SCSI devices. * G defines the control unit address of the device. Values of 0 to 15 are valid. * H defines the logical unit address of the device. Values of 0 to 255 are valid. There is also a bus location code that is generated as '00-xxxxxxxx' where xxxxxxxx is equivalent to the node's unit address. Refer to the system unit service guide for additional information. Location Codes for CHRP Model Architecture System Units Top of page *Note:* You need to know which system architecture the system unit on which you are working uses. If you are working with a RSPC model use the Location Codes for RSPC Model Architecture System Units . If you do not know which model you have, refer to Determining System Architecture in /Diagnostic Information for Multiple Bus Systems/ before proceeding. The (CHRP) system unit uses Physical Location Codes in conjunction with AIX Location Codes to provide mapping of the failing field replaceable units. The location codes are produced by the system unit's firmware and the AIX operating system. Diagnostic Load Progress Indicators Top of page *Note:* Some systems might produce 4-digit codes. If the leftmost digit of a 4-digit code is 0, use the three rightmost digits. *c00 * AIX Install/Maintenance loaded successfully. *c01 * Insert the first diagnostic diskette. *c02 * Diskettes inserted out of sequence. *c03 * The wrong diskette is in diskette drive. *c04 * The loading stopped with an irrecoverable error. *c05 * A diskette error occurred. *c06 * The *rc.boot* configuration shell script is unable to determine type of boot. *c07 * Insert the next diagnostic diskette. *c08 * RAM file system started incorrectly. *c09 * The diskette drive is reading or writing a diskette. *c20 * An unexpected halt occurred, and the system is configured to enter the kernel debug program instead of entering a system dump. *c21 * The *ifconfig* command was unable to configure the network for the client network host. *c22 * The *tftp* command was unable to read client's /ClientHostName/ *info* file during a client network boot. *c24 * Unable to read client's /ClientHostName/.*info* file during a client network boot. *c25 * Client did not mount remote miniroot during network install. *c26 * Client did not mount the /usr file system during the network boot. *c29 * The system was unable to configure the network device. *c31 * Select the console display for the diagnostics. To select No console display, set the key mode switch to Normal then to Service. The diagnostic programs then load and run the diagnostics automatically. If you continue to get the message, check the cables and make sure you are using the serial port. *c32 * A directly attached display (HFT) was selected. *c33 * A TTY terminal attached to serial ports S1 or S2 was selected. *c34 * A file was selected. The console messages store in a file. *c35 * No console found. *c40 * Configuration files are being restored. *c41 * Could not determine the boot type or device. *c42 * Extracting data files from diskette. *c43 * Cannot access the boot/install tape. *c44 * Initializing installation database with target disk information. *c45 * Cannot configure the console. *c46 * Normal installation processing. *c47 * Could not create a physical volume identifier (PVID) on disk. *c48 * Prompting you for input. *c49 * Could not create or form the JFS log. *c50 * Creating root volume group on target disks. *c51 * No paging devices were found. *c52 * Changing from RAM environment to disk environment. *c53 * Not enough space in the */tmp* directory to do a preservation installation. *c54 * Installing either BOS or additional packages. *c55 * Could not remove the specified logical volume in a preservation installation. *c56 * Running user-defined customization. *c57 * Failure to restore BOS. *c58 * Displaying message to turn the key. *c59 * Could not copy either device special files, device ODM, or volume group information from RAM to disk. *c61 * Failed to create the boot image. *c62 * Loading platform dependent debug files. *c63 * Loading platform dependent data files. *c64 * Failed to load platform dependent data files. *c70 * Problem Mounting diagnostic CD-ROM disc. *c99 * Diagnostics have completed. This code is only used when there is no console. *Fxx * (xx is any number) Refer to Firmware chapter of the service manual. Dump Progress Indicators (Dump Status Codes) The following dump progress indicators, or dump status codes, are part of a Type 102 message. *Note:* When a lowercase c is listed, it displays in the lower half of the character position. Some systems produce 4-digit codes, the two leftmost positions can have a blanks or zeros. Use the two rightmost digits. *0c0 * The dump completed successfully. *0c1 * The dump failed due to an I/O error. *0c2 * A dump, requested by the user, is started. *0c3 * The dump is inhibited. *0c4 * The dump device is not large enough. *0c5 * The dump did not start, or the dump crashed. *0c6 * Dumping to a secondary dump device. *0c7 * Reserved. *0c8 * The dump function is disabled. *0c9 * A dump is in progress. *0cc * Unknown dump failure Crash Codes *Note:* Some systems may produce 4-digit codes. If the leftmost digit of a 4-digit code is 0, use the three rightmost digits. The crash codes that follow are part of a Type 102 message. These crash codes are grouped into three categories: *Category 1 * Dump analysis is the appropriate first action in Problem Determination, begin the Problem Determination process with software support. *Category 2 * Dump analysis most likely will not aid in Problem Determination, begin the Problem Determination process with hardware support. *Category 3 * Both software and hardware support may be needed in Problem Determination, go to MAP 0070: 888 Sequence in Operator Panel Display in /Diagnostic Information for Multiple Bus Systems/to assist in problem isolation. Category 1 *300 * Data storage interrupt from the processor. *32x * Data storage interrupt because of an I/O exception from IOCC. *38x * Data storage interrupt because of an I/O exception from SLA. *400 * Instruction storage interrupt. *700 * Program interrupt. Category 2 *200 * Machine check because of a memory bus error. *201 * Machine check because of a memory timeout. *202 * Machine check because of a memory card failure. *203 * Machine check because of a out of range address. *204 * Machine check because of an attempt to write to ROS. *205 * Machine check because of an uncorrectable address parity. *206 * Machine check because of an uncorrectable ECC error. *207 * Machine check because of an unidentified error. *208 * Machine check due to an L2 uncorrectable ECC. *500 * External interrupt because of a scrub memory bus error. *501 * External interrupt because of an unidentified error. *51x * External interrupt because of a DMA memory bus error. *52x * External interrupt because of an IOCC channel check. *53x * External interrupt from an IOCC bus timeout; x represents the IOCC number. *54x * External interrupt because of an IOCC keyboard check. *800 * Floating point is not available. Category 3 *000 * Unexpected system interrupt. *558 * There is not enough memory to continue the IPL. *600 * AIX 4.3.3.3 and above: Alignment Interrupt. If pre-AIX 4.3.3.3: AIX has crashed because the Portability Assist Layer (PAL) for this machine type has detected a problem. *605 * AIX has crashed because the Portability Assist Layer (PAL) for this machine type has detected a problem (AIX 4.3.3.3 and above). Operator Panel Display Numbers Top of page This page contains a list of the various numbers and characters that display in the operator panel display. There are three categories of numbers and characters. The first group tracks the progress of the configuration program. The second group tracks the progress of the diagnostics. The third group provides information about messages that follow an 888 sequence. Configuration Program Indicators The numbers in this list display on the operator panel as the system loads the operating system and prepares the hardware by loading software drivers. *Note:* Some systems may produce 4-digit codes. If the leftmost digit of a 4-digit code is 0, use the three rightmost digits. *2E6 * The PCI Differential Ultra SCSI adapter or the Universal PCI Differential Ultra SCSI adapter being configured. *2E7 * Configuration method unable to determine if the SCSI adapter type is SE or DE type. *440 * 9.1GB Ultra SCSI Disk Drive being identified or configured. *441 * 18.2GB Ultra SCSI Disk Drive being identified or configured. *444 * 2-Port Multiprotocol PCI Adapter (ASIC) being identified or configured. *447 * PCI 64-bit Fibre Channel Arbitrated Loop Adapter being configured. *500 * Querying Standard I/O slot. *501 * Querying card in Slot 1. *502 * Querying card in Slot 2. *503 * Querying card in Slot 3. *504 * Querying card in Slot 4. *505 * Querying card in Slot 5. *506 * Querying card in Slot 6. *507 * Querying card in Slot 7. *508 * Querying card in Slot 8. *510 * Starting device configuration. *511 * Device configuration completed. *512 * Restoring device configuration files from media. *513 * Restoring basic operating system installation files from media. *516 * Contacting server during network boot. *517 * Mounting client remote file system during network IPL. *518 * Remote mount of the *root (/)* and */usr* file systems failed during network boot. *520 * Bus configuration running. *521 * */etc/init* invoked *cfgmgr* with invalid options; */etc/init*has been corrupted or incorrectly modified (irrecoverable error). *522 * The configuration manager has been invoked with conflicting options (irrecoverable error). *523 * The configuration manager is unable to access the ODM database (irrecoverable error). *524 * The configuration manager is unable to access the config.rules object in the ODM database (irrecoverable error). *525 * The configuration manager is unable to get data from a customized device object in the ODM database (irrecoverable error). *526 * The configuration manager is unable to get data from a customized device driver object in the ODM database ( irrecoverable error). *527 * The configuration manager was invoked with the phase 1 flag; running phase 1 at this point is not permitted (irrecoverable error). *528 * The configuration manager cannot find sequence rule, or no program name was specified in the ODM database (irrecoverable error). *529 * The configuration manager is unable to update ODM data (irrecoverable error). *530 * The program *savebase* returned an error. *531 * The configuration manager is unable to access the *PdAt* object class (irrecoverable error). *532 * There is not enough memory to continue (malloc failure); irrecoverable error. *533 * The configuration manager could not find a configuration method for a device. *534 * The configuration manager is unable to acquire database lock (irrecoverable error). *535 * HIPPI diagnostics interface driver being configured. *536 * The configuration manager encountered more than one sequence rule specified in the same phase (irrecoverable error). *537 * The configuration manager encountered an error when invoking the program in the sequence rule. *538 * The configuration manager is going to invoke a configuration method. *539 * The configuration method has terminated, and control has returned to the configuration manager. *541 * A DLT tape device is being configured. *549 * Console could not be configured for the Copy a System Dump Menu. *551 * IPL vary-on is running. *552 * IPL vary-on failed. *553 * IPL phase 1 is complete. *554 * The boot device could not be opened or read, or unable to define NFS swap device during network boot. *555 * An ODM error occurred when trying to vary-on the rootvg, or unable to create an NFS swap device during network boot. *556 * Logical Volume Manager encountered error during IPL vary-on. *557 * The root filesystem does not mount. *558 * There is not enough memory to continue the system IPL. *559 * Less than 2 M bytes of good memory are available to load the AIX kernel. *569 * FCS SCSI protocol device is being configured (32 bits). *570 * Virtual SCSI devices being configured. *571 * HIPPI common function device driver being configured. *572 * HIPPI IPI-3 master transport driver being configured. *573 * HIPPI IPI-3 slave transport driver being configured. *574 * HIPPI IPI-3 transport services user interface device driver being configured. *575 * A 9570 disk-array driver being configured. *576 * Generic async device driver being configured. *577 * Generic SCSI device driver being configured. *578 * Generic commo device driver being configured. *579 * Device driver being configured for a generic device. *580 * HIPPI TCPIP network interface driver being configured. *581 * Configuring TCP/IP. *582 * Configuring Token-Ring data link control. *583 * Configuring an Ethernet data link control. *584 * Configuring an IEEE Ethernet data link control. *585 * Configuring an SDLC MPQP data link control. *586 * Configuring a QLLC X.25 data link control. *587 * Configuring a NETBIOS. *588 * Configuring a Bisync Read-Write (BSCRW). *589 * SCSI target mode device being configured. *590 * Diskless remote paging device being configured. *591 * Configuring an LVM device driver. *592 * Configuring an HFT device driver. *593 * Configuring SNA device drivers. *594 * Asynchronous I/O being defined or configured. *595 * X.31 pseudo-device being configured. *596 * SNA DLC/LAPE pseudo-device being configured. *597 * OCS software being configured. *598 * OCS hosts being configured during system reboot. *599 * Configuring FDDI data link control. *59B * FCS SCSI protocol device being configured (64 bits). *5C0 * Streams-based hardware drive being configured. *5C1 * Streams-based X.25 protocol being configured. *5C2 * Streams-based X.25 COMIO emulator driver being configured *5C3 * Streams-based X.25 TCP/IP interface driver being configured. *5C4 * FCS adapter device driver being configured. *5C5 * SCB network device driver for FCS being configured. *5C6 * AIX SNA channel being configured. *600 * Starting network boot portion of */sbin/rc.boot*. *602 * Configuring network parent devices. *603 * */usr/lib/methods/defsys, /usr/lib/methods/cfgsys,* or */usr/lib/methods/cfgbus* failed. *604 * Configuring physical network boot device. *605 * Configuration of physical network boot device failed. *606 * Running */usr/sbin/ifconfig* on logical network boot device. *607 * */usr/sbin/ifconfig* failed. *608 * Attempting to retrieve the *client.info* file with *tftp.*Note that a flashing 608 indicates multiple attempt(s) to retrieve the *client_info* file are occurring. *609 * The *client.info* file does not exist or it is zero length. *60B * 18.2GB 68-pin LVD SCSI Disk Drive being configured. *610 * Attempting remote mount of NFS file system. *611 * Remote mount of the NFS file system failed. *612 * Accessing remote files; unconfiguring network boot device. *614 * Configuring local paging devices. *615 * Configuration of a local paging device failed. *616 * Converting from diskless to dataless configuration. *617 * Diskless to dataless configuration failed. *618 * Configuring remote (NFS) paging devices. *619 * Configuration of a remote (NFS) paging device failed. *61B * 36.4GB 80-pin LVD SCSI Disk Drive being configured. *61D * 36.4GB 80-pin LVD SCSI Disk Drive being configured. *61E * 18.2GB 68-pin LVD SCSI Disk Drive being configured. *620 * Updating special device files and ODM in permanent filesystem with data from boot RAM filesystem. *621 * 9.1 GB LVD 80-pin SCSI Drive being configured. *622 * Boot process configuring for operating system installation. *62D * 9.1GB 68-pin LVD SCSI Disk Drive being configured. *62E * 9.1GB 68-pin LVD SCSI Disk Drive being configured. *636 * TURBROWAYS 622 Mbps PCI MMF ATM Adapter. *637 * Dual Channel PCI-2 Ultra2 SCSI Adapter being configured. *638 * 4.5GB Ultra SCSI Single Ended Disk Drive being configured. *639 * 9.1GB 10K RPM Ultra SCSI Disk Drive (68-pin). *63A * See 62D. *63B * 9.1GB 80-pin LVD SCSI Disk Drive being configured. *63C * See 60B. *63D * 18.2GB 80-pin LVD SCSI Disk Drive being configured. *63E * 36.4GB 68-pin LVD SCSI Disk Drive being configured. *63F * See 61B. *640 * 9.1GB 10K RPM Ultra SCSI Disk Drive (80-pin). *646 * High-Speed Token-Ring PCI Adapter being configured. *64A * See 62E. *64B * 9.1GB 80-pin LVD SCSI Disk Drive being configured. *64C * See 61E. *64D * 18.2 GB LVD 80-pin Drive/Carrier being configured. *64E * 36.4GB 68-pin LVD SCSI Disk Drive being configured. *64F * See 61D. *650 * IBM SCSD disk drive being configured. *653 * 18.2GB Ultra-SCSI 16-bit Disk Drive being configured. *655 * GXT130P Graphics adapter being configured. *657 * GXT2000P graphics adapter being configured. *658 * PCI Fibre Channel Disk Subsystem Controller being identified or configured. *659 * 2102 Fibre Channel Disk Subsystem Controller Drawer being identified or configured. *660 * 2102 Fibre Channel Disk Array being identified or configured. *662 * Ultra2 Integrated SCSI controller. *663 * The ARTIC960RxD Digital Trunk Quad PCI Adapter or the ARTIC960RxF Digital Trunk Resource Adapter being configured. *664 * 32x (MAX) SCSI-2 CD-ROM drive being configured. *667 * PCI 3-Channel Ultra2 SCSI RAID Adapter being configured. *669 * PCI Gigabit Ethernet Adapter being configured. *66C * 10/100/1000 Base-T EthernetPCI Adapter. *66D * PCI 4-Channel Ultra-3 SCSI RAID Adapter. *66E * 4.7 GB DVD-RAM drive. *674 * ESCON^(R) Channel PCI Adapter being configured. *677 * PCI 32-bit Fibre Channel Arbitrated Loop Adapter being configured. *67B * PCI Cryptographic Coprocessor being configured. *682 * 20x (MAX) SCSI-2 CD-ROM Drive being configured. *689 * 4.5GB Ultra SCSI Single Ended Disk Drive being configured. *68C * 20 GB 4-mm Tape Drive being configured. *68E * POWER GXT6000P PCI Graphics Adapter. *690 * 9.1GB Ultra SCSI Single Ended Disk Drive being configured. *69b * 64-bit/66MHz PCI ATM 155 MMF PCI adapter being configured. *69d * 64-bit/66MHz PCI ATM 155 UTP PCI adapter being configured. *6CC * SSA disk drive being configured. *700 * A 1.1 GB 8-bit SCSI disk drive being identified or configured. *701 * A 1.1 GB 16-bit SCSI disk drive being identified or configured. *702 * A 1.1 GB 16-bit differential SCSI disk drive being identified or configured. *703 * A 2.2 GB 8-bit SCSI disk drive being identified or configured. *704 * A 2.2 GB 16-bit SCSI disk drive being identified or configured. *705 * The configuration method for the 2.2 GB 16-bit differential SCSI disk drive is being run. If an irrecoverable error occurs, the system halts. *706 * A 4.5 GB 16-bit SCSI disk drive being identified or configured. *707 * A 4.5 GB 16-bit differential SCSI disk drive being identified or configured. *708 * A L2 cache being identified or configured. *710 * POWER GXT150M graphics adapter being identified or configured. *711 * Unknown adapter being identified or configured. *712 * Graphics slot bus configuration is executing. *713 * The IBM ARTIC960 device being configured. *714 * A video capture adapter being configured. *715 * The Ultramedia Services audio adapter being configured. (this number displays briefly on the panel). *717 * TP Ethernet Adapter being configured. *718 * GXT500 Graphics Adapter being configured. *720 * Unknown read/write optical drive type being configured. *721 * Unknown disk or SCSI device being identified or configured. *722 * Unknown disk being identified or configured. *723 * Unknown CD-ROM being identified or configured. *724 * Unknown tape drive being identified or configured. *725 * Unknown display adapter being identified or configured. *726 * Unknown input device being identified or configured. *727 * Unknown async device being identified or configured. *728 * Parallel printer being identified or configured. *729 * Unknown parallel device being identified or configured. *730 * Unknown diskette drive being identified or configured. *731 * PTY being identified or configured. *732 * Unknown SCSI initiator type being configured. *733 * 7GB 8 mm tape drive being configured. *734 * 4x SCSI-2 640 MB CD-ROM Drive being configured. *736 * Quiet Touch keyboard and speaker cable being configured. *741 * 1080 MB SCSI Disk Drive being configured. *745 * 16GB 4 mm Tape Auto Loader being configured. *746 * SCSI-2 Fast/Wide PCI Adapter being configured. *747 * SCSI-2 Differential Fast/Wide PCI Adapter being configured. *749 * 7331 Model 205 Tape Library being configured. *751 * SCSI 32-bit SE F/W RAID Adapter being configured. *754 * 1.1GB 16-bit SCSI disk drive being configured. *755 * 2.2GB 16-bit SCSI disk drive being configured. *756 * 4.5GB 16-bit SCSI disk drive being configured. *757 * External 13GB 1.5M/s 1/4 inch tape being configured. *763 * SP Switch MX Adapter being configured. *764 * SP System Attachment Adapter being configured. *772 * 4.5GB SCSI F/W Disk Drive being configured. *773 * 9.1GB SCSI F/W Disk Drive being configured. *774 * 9.1GB External SCSI Disk Drive being configured. *776 * PCI Token-Ring Adapter being identified or configured. *777 * 10/100 Ethernet Tx PCI Adapter being identified or configured. *778 * POWER GXT3000P 3D PCI Graphics adapter being configured. *77B * 4-Port 10/100 Ethernet Tx PCI Adapter being identified or configured. *77c * A 1.0 GB 16-bit SCSI disk drive being identified or configured. *783 * 4 mm DDS-2 Tape Autoloader being configured. *789 * 2.6 GB External Optical Drive being configured. *78B * POWER GXT4000P PCI Graphics Adapter. *78C * PCI bus configuration executing. *78D * GXT300P 2D Graphics adapter being configured. *790 * Multi-bus Integrated Ethernet Adapter being identified or configured. *797 * TURBOWAYS^(R) 155 UTP/STP ATM Adapter being identified or configured. *798 * Video streamer adapter being identified or configured. *799 * 2-Port Multiprotocol PCI adapter being identified or configured. *79c * ISA bus configuration executing. *7C0 * CPU/System Interface being configured. *7C1 * Business Audio Subsystem being identified or configured. *7cc * PCMCIA bus configuration executing. *800 * TURBOWAYS 155 MMF ATM Adapter being identified or configured. *803 * 7336 Tape Library robotics being configured. *804 * 8x Speed SCSI-2 CD-ROM Drive being configured. *806 * POWER GXT800 PCI Graphics adapter being configured. *807 * SCSI Device Enclosure being configured. *80c * SSA 4-Port Adapter being identified or configured. *811 * Processor complex being identified or configured. *812 * Memory being identified or configured. *813 * Battery for time-of-day, NVRAM, and so on being identified or configured, or system I/O control logic being identified or configured. *814 * NVRAM being identified or configured. *815 * Floating-point processor test. *816 * Operator panel logic being identified or configured. *817 * Time-of-day logic being identified or configured. *819 * Graphics input device adapter being identified or configured. *821 * Standard keyboard adapter being identified or configured. *823 * Standard mouse adapter being identified or configured. *824 * Standard tablet adapter being identified or configured. *825 * Standard speaker adapter being identified or configured. *826 * Serial Port 1 adapter being identified or configured. *827 * Parallel port adapter being identified or configured. *828 * Standard diskette adapter being identified or configured. *831 * 3151 adapter being identified or configured, or Serial Port 2 being identified or configured. *834 * 64-port async controller being identified or configured. *835 * 16-port async concentrator being identified or configured. *836 * 128-port async controller being identified or configured. *837 * 16-port remote async node being identified or configured. *838 * Network Terminal Accelerator Adapter being identified or configured. *839 * 7318 Serial Communications Server being configured. *840 * PCI Single-Ended Ultra SCSI Adapter being configured. *841 * 8-port async adapter (EIA-232) being identified or configured. *842 * 8-port async adapter (EIA-422A) being identified or configured. *843 * 8-port async adapter (MIL-STD 188) being identified or configured. *844 * 7135 RAIDiant Array disk drive subsystem controller being identified or configured. *845 * 7135 RAIDiant Array disk drive subsystem drawer being identified or configured. *846 * RAIDiant Array SCSI 1.3GB Disk Drive being configured. *847 * 16-port serial adapter (EIA-232) being identified or configured. *848 * 16-port serial adapter (EIA-422) being identified or configured. *849 * X.25 Interface Coprocessor/2 adapter being identified or configured. *850 * Token-Ring network adapter being identified or configured. *851 * T1/J1 Portmaster^(R) adapter being identified or configured. *852 * Ethernet adapter being identified or configured. *854 * 3270 Host Connection Program/6000 connection being identified or configured. *855 * Portmaster Adapter/A being identified or configured. *857 * FSLA adapter being identified or configured. *858 * 5085/5086/5088 adapter being identified or configured. *859 * FDDI adapter being identified or configured. *85c * Token-Ring High-Performance LAN adapter being identified or configured. *861 * Optical adapter being identified or configured. *862 * Block Multiplexer Channel Adapter being identified or configured. *865 * ESCON Channel Adapter or emulator being identified or configured. *866 * SCSI adapter being identified or configured. *867 * Async expansion adapter being identified or configured. *868 * SCSI adapter being identified or configured. *869 * SCSI adapter being identified or configured. *870 * Serial disk drive adapter being identified or configured. *871 * Graphics subsystem adapter being identified or configured. *872 * Grayscale graphics adapter being identified or configured. *874 * Color graphics adapter being identified or configured. *875 * Vendor generic communication adapter being configured. *876 * 8-bit color graphics processor being identified or configured. *877 * POWER Gt3^(TM) /POWER Gt4^(TM) being identified or configured. *878 * POWER Gt4 graphics processor card being configured. *879 * 24-bit color graphics card, MEV2 being configured. *880 * POWER Gt1^(TM) adapter being identified or configured. *887 * Integrated Ethernet adapter being identified or configured. *889 * SCSI adapter being identified or configured. *890 * SCSI-2 Differential Fast/Wide and Single-Ended Fast/Wide Adapter/A being configured. *891 * Vendor SCSI adapter being identified or configured. *892 * Vendor display adapter being identified or configured. *893 * Vendor LAN adapter being identified or configured. *894 * Vendor async/communications adapter being identified or configured. *895 * Vendor IEEE 488 adapter being identified or configured. *896 * Vendor VME bus adapter being identified or configured. *897 * S/370^(TM) Channel Emulator adapter being identified or configured. *898 * POWER Gt1x^(TM) graphics adapter being identified or configured. *899 * 3490 attached tape drive being identified or configured. *89c * A multimedia SCSI CD-ROM being identified or configured. *900 * GXT110P Graphics Adapter being identified or configured. *901 * Vendor SCSI device being identified or configured. *902 * Vendor display device being identified or configured. *903 * Vendor async device being identified or configured. *904 * Vendor parallel device being identified or configured. *905 * Vendor other device being identified or configured. *908 * POWER GXT1000 Graphics subsystem being identified or configured. *910 * 1/4GB Fiber Channel/266 Standard Adapter being identified or configured. *911 * Fiber Channel/1063 Adapter Short Wave being configured. *912 * 2.0GB SCSI-2 differential disk drive being identified or configured. *913 * 1.0GB differential disk drive being identified or configured. *914 * 5GB 8 mm differential tape drive being identified or configured. *915 * 4GB 4 mm tape drive being identified or configured. *916 * Non-SCSI vendor tape adapter being identified or configured. *917 * A 2.0 GB 16-bit differential SCSI disk drive being identified or configured. *918 * A 2 GB 16-bit single-ended SCSI disk drive being identified or configured. *920 * Bridge Box being identified or configured. *921 * 101 keyboard being identified or configured. *922 * 102 keyboard being identified or configured. *923 * Kanji keyboard being identified or configured. *924 * Two-button mouse being identified or configured. *925 * Three-button mouse being identified or configured. *926 * 5083 tablet being identified or configured. *927 * 5083 tablet being identified or configured. *928 * Standard speaker being identified or configured. *929 * Dials being identified or configured. *930 * Lighted program function keys (LPFK) being identified or configured. *931 * IP router being identified or configured. *933 * Async planar being identified or configured. *934 * Async expansion drawer being identified or configured. *935 * 3.5-inch diskette drive being identified or configured. *936 * 5.25-inch diskette drive being identified or configured. *937 * An HIPPI adapter being configured. *938 * Serial HIPPI PCI adapter being configured. *942 * POWER GXT 100 graphics adapter being identified or configured. *943 * A 3480 or 3490 control unit attached to a System/370 Channel Emulator/A adapter are being identified or configured. *944 * 100MB ATM adapter being identified or configured. *945 * 1.0GB SCSI differential disk drive being identified or configured. *946 * Serial port 3 adapter being identified or configured. *947 * A 730MB SCSI disk drive being configured. *948 * Portable disk drive being identified or configured. *949 * Unknown direct bus-attach device being identified or configured. *950 * Missing SCSI device being identified or configured. *951 * 670MB SCSI disk drive being identified or configured. *952 * 355MB SCSI disk drive being identified or configured. *953 * 320MB SCSI disk drive being identified or configured. *954 * 400MB SCSI disk drive being identified or configured. *955 * 857MB SCSI disk drive being identified or configured. *956 * 670MB SCSI disk drive electronics card being identified or configured. *957 * 120 MB DBA disk drive being identified or configured. *958 * 160 MB DBA disk drive being identified or configured. *959 * 160 MB SCSI disk drive being identified or configured. *960 * 1.37GB SCSI disk drive being identified or configured. *964 * Internal 20 GB 8 mm tape drive identified or configured. *968 * 1.0 GB SCSI disk drive being identified or configured. *970 * Half-inch, 9-track tape drive being identified or configured. *971 * 150 MB 1/4-inch tape drive being identified or configured. *972 * 2.3 GB 8 mm SCSI tape drive being identified or configured. *973 * Other SCSI tape drive being identified or configured. *974 * CD-ROM drive being identified or configured. *975 * An optical disk drive being identified or configured. *977 * M-Audio Capture and Playback Adapter being identified or configured. *981 * 540MB SCSI-2 single-ended disk drive being identified or configured. *984 * 1GB 8-bit disk drive being identified or configured. *985 * M-Video Capture Adapter being identified or configured. *986 * 2.4GB SCSI disk drive being identified or configured. *987 * An Enhanced SCSI CD-ROM drive being identified or configured. *989 * 200MB SCSI disk drive being identified or configured. *990 * 2.0GB SCSI-2 single-ended disk drive being identified or configured. *991 * 525MB 1/4-inch cartridge tape drive being identified or configured. *994 * 5 GB 8 mm tape drive being identified or configured. *995 * 1.2GB 1/4 inch cartridge tape drive being identified or configured. *996 * A single-port, multiprotocol communications adapter being identified or configured. *997 * FDDI adapter being identified or configured. *998 * 2.0 GB 4 mm tape drive being identified or configured. *999 * 7137 or 3514 Disk Array Subsystem being configured. *D46 * Token-Ring cable *D81 * T2 Ethernet Adapter being configured. *2530 * 10/100 Mbps Ethernet PCI Adapter II being configured. Physical Location Codes Top of page *Note:* Diagnostic Versions 5.2.0 and later display physical location codes for all resources. Diagnostic versions earlier than 5.2.0 show a mixture of physical location codes and AIX location codes. As an example, under diagnostics version 5.2.0 might display a resource as: ent0 P2/E1 IBM 10/100 Mbps Ethernet PCI adapter The P2/E1 is the physical location code indicating an Ethernet port built into the P2 planar. whereas, in versions prior to 5.2.0, the resource might be shown as: ent0 10-60 IBM 10/100 Mbps Ethernet PCI adapter The 10-60 is an AIX location code indicating a PCI parent bus of 10, and a devfunc number of 60 (for more information , see AIX Location Codes ). These physical location codes can appear in many places while running diagnostics; for instance, within resource menus, SRNs, or specific service aids. Physical location codes provide a mapping of logical functions in a platform (or expansion sites for logical functions, such as connectors or ports) to their specific locations within the physical structure of the platform. Location Code Format The format for the location code is a string of alphanumeric characters separated by a dash (-), slash (/), pound sign (#), or period (.). The base location is all of the information before the slash (/) or pound sign (#). It identifies a device that is connected or plugged into the parent. Extended location information follows the slash (/). It identifies a device that is part of the parent, a connector, or a cable. Cable information follows the pound sign (#). It identifies a cable that is connected to the parent. The following are examples: * P1 identifies system planar P1. * U1-P1 also identifies system planar P1 in a rack or drawer unit. * P2 identifies an I/O planar (including all integrated I/O devices). * P1-C1 identifies a CPU card C1 plugged into planar P1. * P1-M2 identifies a memory card or SIMM M2 plugged into planar P1. * P2/K1 identifies a keyboard port controller (with connector) connected to planar P2. * P1-K1 identifies a keyboard attached to connector K1 on planar P1. * P1/S1 identifies serial port 1 controller on planar P1, the connector for serial port 1, or the cable attached to connector S1. * P1-I2/E3 identifies; Ethernet controller 3 on the card plugged into slot 2 (I2) on planar P1, the connector for Ethernet controller 3, or the cable attached to Ethernet controller 3. * P1-I2#E3 identifies; the cable attached to Ethernet controller 3 plugged into slot 2 (I2) on planar P1. The period (.) is used to identify sub-locations such as memory DIMMs on a base memory card or a specific SCSI address. The following are examples: * P1-M1.4 identifies DIMM 4 on memory card 1 on planar 1. * U1-P1-M2.12 identifies DIMM 12 on memory card in slot 2 on the system planar. * P1-C1.1 identifies CPU 1 on CPU card 1 on planar 1. * P2/Z1-A3.1 identifies a SCSI device with a SCSI address of LUN 1 at SCSI ID 3 attached to SCSI bus 1 from planar 2. * P1-I2#E3.2 identifies the second cable in a series of cables attached to Ethernet controller 3 in slot 2 (I2) on planar 1. Depending on the AIX and firmware levels, AIX Diagnostics may include extended location information when identifying a planar or card. The extended location information or cable information is always included when identifying a cable or connector. Location codes with extended location information that display without a description identifying the devices, always identify the cable attached to the port. Physical Location Code Standard Prefixes The following table lists the assigned values for the location type prefixes. In most cases, the prefix value assignments were chosen to provide some mnemonic characteristic, so that they would be easier to remember. The underlined characters in the description field are intended to illustrate this mnemonic relationship. Description Prefix Value (n=instance #) Rack or drawer _u_nit Un Drawer _u_nit mounted in a rack Un.n (U0.n if rack cannot be sensed by firmware) Single enclosure platform (No enclosure location code) _P_lanar (backplane, system, I/O) Pn _P_lanar riser card, extender Pn.n Power/_v_oltage supply, _v_oltage regulator, backup battery Vn _F_an/sensor Fn _L_ED/_L_CD operator panel or Logical device address n relative to adapter port Ln _C_PU/cache card (or pluggable module if on planar) Cn _C_PU/cache module on CPU card (if pluggable) Cn.n _M_emory card or SIMM/DIMM on planar Mn _M_emory SIMM/DIMM on memory card Mn.n Other _e_xtra-function base system cards (for example, service processor) Xn _I_/O adapter In Pluggable modules or daughter cards on _I_/O adapter In.n _D_evice in Bay n Dn Ports/Connectors: _G_raphics/video connector Gn _K_eyboard/keyboard connector Kn M_o_use/mouse connector On _S_erial port Sn Parallel port Rn _E_thernet connector En _T_oken Ring connector Tn SCSI (pronounced scu_z_zy) connector Zn Other I/O ports or connectors Qn SCSI device addresses (including SSA (Serial Storage Architecture)) Primary _a_ddress (SCSI control unit ID) An Primary and secondary _a_ddress (SCSI ID and LUN (Logical Unit Number)) An.n SCSI device location in SCSI Enclosure Services (SES) SCSI bank Bn SCSI bank and bay Bn.n Undefined prefixes (reserved) H, J, N, Y Unique device address, this address remains constant independent of which port the device is attached to. Wn Location Codes for RSPC Model Architecture System Units Top of page *Notes: * 1. RSPC systems are only supported with AIX or Diagnostic versions below 5.2.0 2. You need to know which system architecture the system unit on which you are working uses. If you are working with a CHRP model, use the Location Codes for CHRP Model Architecture System Units . If you do not know which model you have, refer to Determining System Architecture in /Diagnostic Information for Multiple Bus Systems/ before proceeding. Because the same diagnostic programs are used on all system units, a location code is used to physically locate a failing device or unit. The location code is displayed along with the service request number (SRN) when the diagnostic programs isolate a failure. If the location code is not known, you can run the Display Previous Diagnostic Results service aid to display the results of the last time the diagnostic programs were run. The basic format of the system unit's location code is: AB-CD-EF-GH non-SCSI AB-CD-EF-G,H SCSI For planars, cards, and non-SCSI devices, the location code is defined as follows: AB-CD-EF-GH | | | | | | | Device/FRU/Port ID | | Connector ID | Slot or Adapter Number Bus Type * AB identifies a bus type. * CD identifies a slot or adapter number. * EF is the connector identifier, used to identify the adapter connector to which a resource is attached. * GH identifies a port, address, memory module, device, or FRU. GH has several meanings depending upon the resource type, they are as follows: o For memory cards, GH defines a memory module. Values for GH are 1 through 16. For systems that have memory modules that plug directly into the system planar, the location code is 00-00-00-GH where GH is the memory module slot. For systems that have memory cards with memory modules, the location code is 00-CD-EF-GH, where CD is the card slot and GH is the memory module slot. o For L2 caches, GH defines the cache. Values for GH are 1 through 16. o For PCMCIA devices, GH defines the PCMCIA. Values for GH are 1 through 16. o For async devices, GH defines the port on the fanout box. Values are 00 to 15. o For a diskette drive, H defines which diskette drive 1 or 2. G is always 0. o For all other devices, GH is equal to 00. For integrated adapters, EF-GH is the same as the definition for a pluggable adapter. For example, the location code for a diskette drive is 01-A0-00-00. A second diskette drive is 01-A0-00-01. For SCSI, the location code is defined as follows: AB-CD-EF-G,H | | | | | | | | | Logical Unit Address of SCSI Device | | | Control Unit Address of SCSI Device | | Connector ID | Slot or Adapter Number Bus Type Where: * AB-CD-EF are the same as non-SCSI devices. * G defines the control unit address of the device. Values of 0 to 15 are valid. * H defines the logical unit address of the device. Values of 0 to 255 are valid. Adapters and cards are identified with only AB-CD. The possible values for AB are as follows: 00 for processor bus 01 for ISA buses 04 for PCI buses 05 for PCMCIA buses (not supported on 7024) The possible values for CD depend on the adapter or card. For pluggable adapters or cards, this is a two-digit slot number in the range from 01 to 99. However, in the case of ISA cards these numbers do not actually correspond to the physical slot numbers. They simply are based on the order in which the ISA cards are defined or configured, either by SMIT or the ISA Adapter Configuration Service Aid. For integrated adapters, the first character (C) is a letter in the range from A to Z. This letter is based on the order in which the integrated adapters are defined in residual data. This ensures unique location codes for the integrated adapters. The second character (D) is set to 0. Refer to the following RSPC location code examples: Processor-PCI bus 00-00 PCI bus Memory module in system planar 00-00-00-01 Memory module in card 00-0A-00-01 Integrated PCI adapters 04-A0 ISA bus (Integrated PCI-ISA bridge) 04-B0 Secondary PCI bus (Integrated PCI-PCI bridge) 04-C0 Integrated PCI SCSI controller Non-integrated PCI adapters 04-01 Any PCI card in slot 1 04-02 Any PCI card in slot 2 Integrated ISA adapters 01-A0 Diskette adapter 01-B0 Parallel port adapter 01-C0 Serial port 1 adapter 01-D0 Serial port 2 adapter 01-E0 Keyboard adapter 01-F0 Mouse adapter Non-integrated ISA adapters 01-01 First ISA card defined/configured 01-02 Second ISA card defined/configured 01-03 Third ISA card defined/configured 01-04 Fourth ISA card defined/configured Device attached to SCSI controller 04-C0-01-4,0 Device attached to Integrated PCI SCSI controller +++++ RS/6000 RS/6000 Diagnostic LED's ------------------------------------------------------------------------ TITLE : Diagnostic LED numbers and codes. OS LEVEL : AIX DATE : 07/04/99 VERSION : 1.0 ------------------------------------------------------------------------ Built-In Self-Test (BIST) Indicators ------------------------------------ 100 BIST completed successfully; control was passed to IPL ROS. 101 BIST started following reset. 102 BIST started, following the system unit's power-on reset. 103 BIST could not determine the system model number. 104 Equipment conflict; BIST could not find the CBA. 105 BIST could not read from the OCS EPROM. 106 BIST failed: CBA not found 111 OCS stopped; BIST detected a module error. 112 A checkstop occurred during BIST; checkstop results could not be logged out. 113 Three checkstops have occurred. 120 BIST starting a CRC check on the 8752 EPROM. 121 BIST detected a bad CRC in the first 32K bytes of the OCS EPROM. 122 BIST started a CRC check on the first 32K bytes of the OCS EPROM. 123 BIST detected a bad CRC on the OCS area of NVRAM. 124 BIST started a CRC check on the OCS area of NVRAM. 125 BIST detected a bad CRC on the time-of-day area of NVRAM. 126 BIST started a CRC check on the time-of-day area of NVRAM. 127 BIST detected a bad CRC on the 8752 EPROM. 130 BIST presence test started. 140 Running BIST. (Box Manufacturing Mode Only) 142 Box manufacturing mode operation. 143 Invalid memory configuration. 144 Manufacturing test failure. 151 BIST started AIPGM test code. 152 BIST started DCLST test code. 153 BIST started ACLST test code. 154 BIST started AST test code. 160 Bad EPOW Signal/Power status signal. 161 BIST being conducted on BUMP I/O. 162 BIST being conducted on JTAG. 163 BIST being conducted on Direct I/O. 164 BIST being conducted on CPU. 165 BIST being conducted on DCB and Memory. 166 BIST being conducted on Interrupts. 170 BIST being conducted on Multi-Processors. 180 Logout in progress. 182 BIST COP bus not responding. 185 A checkstop condition occurred during the BIST. 186 System logic-generated checkstop (Model 250 only). 187 Graphics-generated checkstop (Model 250). 195 Checkstop logout complete 199 Generic SCSI backplane 888 BIST did not start. Power-On Self-Test (POST) Indicators ------------------------------------ 200 IPL attempted with keylock in the Secure position. 201 IPL ROM test failed or checkstop occurred (irrecoverable). 202 Unexpected machine check interrupt. 203 Unexpected data storage interrupt. 204 Unexpected instruction storage interrupt. 205 Unexpected external interrupt. 206 Unexpected alignment interrupt. 207 Unexpected program interrupt. 208 Unexpected floating point unavailable interrupt. 209 Unexpected SVC interrupt. 20c L2 cache POST error. (The display shows a solid 20c for 5 seconds.) 210 Unexpected SVC interrupt. 211 IPL ROM CRC comparison error (irrecoverable). 212 RAM POST memory configuration error or no memory found (irrecoverable). 213 RAM POST failure (irrecoverable). 214 Power status register failed (irrecoverable). 215 A low voltage condition is present (irrecoverable). 216 IPL ROM code being uncompressed into memory. 217 End of boot list encountered. 218 RAM POST is looking for good memory. 219 RAM POST bit map is being generated. 21c L2 cache is not detected. (The display shows a solid 21c for 2 seconds.) 220 IPL control block is being initialized. 221 NVRAM CRC comparison error during AIX IPL(key mode switch in Normal mode). Reset NVRAM by reaccomplishing IPL in Service mode. For systems with an internal, direct-bus-attached (DBA) disk, IPL ROM attempted to perform an IPL from that disk before halting with this operator panel display value. 222 Attempting a Normal mode IPL from Standard I/O planar-attached devices specified in NVRAM IPL Devices List. 223 Attempting a Normal mode IPL from SCSI-attached devices specified in NVRAM IPL Devices List. 224 Attempting a Normal mode IPL from 9333 subsystem device specified in NVRAM IPL Devices List. 225 Attempting a Normal mode IPL from 7012 DBA disk-attached devices specified in NVRAM IPL Devices List. 226 Attempting a Normal mode IPL from Ethernet specified in NVRAM IPL Devices List. 227 Attempting a Normal mode IPL from Token-Ring specified in NVRAM IPL Devices List. 228 Attempting a Normal mode IPL from NVRAM expansion code. 229 Attempting a Normal mode IPL from NVRAM IPL Devices List; cannot IPL from any of the listed devices, or there are no valid entries in the Devices List. 22c Attempting a normal mode IPL from FDDI specified in NVRAM IPL device list. 230 Attempting a Normal mode IPL from adapter feature ROM specified in IPL ROM Device List. 231 Attempting a Normal mode IPL from Ethernet specified in IPL ROM Device List. 232 Attempting a Normal mode IPL from Standard I/O planar-attached devices specified in ROM Default Device List. 233 Attempting a Normal mode IPL from SCSI-attached devices specified in IPL ROM Default Device List. 234 Attempting a Normal mode IPL from 9333 subsystem device specified in IPL ROM Device List. 235 Attempting a Normal mode IPL from 7012 DBA disk-attached devices specified in IPL ROM Default Device List. 236 Attempting a Normal mode IPL from Ethernet specified in IPL ROM Default Device List. 237 Attempting a Normal mode IPL from Token-Ring specified in IPL ROM Default Device List. 238 Attempting a Normal mode IPL from Token-Ring specified by the operator. 239 System failed to IPL from the device chosen by the operator. 23c Attempting a normal mode IPL from FDDI specified in IPL ROM device list. 240 Attempting a Service mode IPL from adapter feature ROM. 241 Attempting a normal boot from devices specified in the NVRAM boot list. 242 Attempting a Service mode IPL from Standard I/O planar-attached devices specified in the NVRAM IPL Devices List. 243 Attempting a Service mode IPL from SCSI-attached devices specified in the NVRAM IPL Devices List. 244 Attempting a Service mode IPL from 9333 subsystem device specified in the NVRAM IPL Devices List. 245 Attempting a Service mode IPL from 7012 DBA disk-attached devices specified in the NVRAM IPL Devices List. 246 Attempting a Service mode IPL from Ethernet specified in the NVRAM IPL Devices List. 247 Attempting a Service mode IPL from Token-Ring specified in the NVRAM Device List. 248 Attempting a Service mode IPL from NVRAM expansion code. 249 Attempting a Service mode IPL from the NVRAM IPL Devices List; cannot IPL from any of the listed devices, or there are no valid entries in the Devices List. 24c Attempting a service mode IPL from FDDI specified in NVRAM IPL device list. 250 Attempting a Service mode IPL from adapter feature ROM specified in the IPL ROM Device List. 251 Attempting a Service mode IPL from Ethernet specified in the IPL ROM Default Device List. 252 Attempting a Service mode IPL from Standard I/O planar-attached devices specified in the ROM Default Device List. 253 Attempting a Service mode IPL from SCSI-attached devices specified in the IPL ROM Default Device List. 254 Attempting a Service mode IPL from 9333 subsystem device specified in the IPL ROM Devices List. 255 Attempting a Service mode IPL from 7012 DBA disk-attached devices specified in IPL ROM Default Device List. 256 Attempting a Service mode IPL from Ethernet specified in the IPL ROM Devices List. 257 Attempting a Service mode IPL from Token-Ring specified in the IPL ROM Devices List. 258 Attempting a Service mode IPL from Token-Ring specified by the operator. 259 Attempting a Service mode IPL from FDDI specified by the operator. 25c Attempting a service mode IPL from FDDI specified in IPL ROM device list. 260 Information is being displayed on the display console. 261 No supported local system display adapter was found. 262 Keyboard not detected as being connected to the system's keyboard port. 263 Attempting a Normal mode IPL from adapter feature ROM specified in the NVRAM Device List. 269 Stalled state - the system is unable to IPL. 270 Low Cost Ethernet Adapter (LCE) POST executing 271 Mouse and Mouse port POST. 272 Tablet Port POST. 276 10/100Mbps MCA Ethernet Adapter POST executing 277 Auto Token-Ring LANstreamer MC 32 Adapter. 278 Video ROM scan POST. 279 FDDI POST. 280 3com Ethernet POST. 281 Keyboard POST executing. 282 Parallel port POST executing. 283 Serial port POST executing. 284 POWER Gt1 graphics adapter POST executing. 285 POWER Gt3 graphics adapter POST executing. 286 Token-Ring adapter POST executing. 287 Ethernet adapter POST executing. 288 Adapter card slots being queried. 289 POWER GT0 Display Adapter POST. 290 IOCC POST error (irrecoverable). 291 Standard I/O POST running. 292 SCSI POST running. 293 7012 DBA disk POST running. 294 IOCC bad TCW memory module in slot location J being tested. 295 Graphics Display adapter POST, color or grayscale. 296 ROM scan POST. 297 System model number does not compare between OCS and ROS (irrecoverable). 298 Attempting a software IPL. 299 IPL ROM passed control to the loaded program code. 301 Flash Utility ROM test failed or checkstop occurred (irrecoverable 302 Flash Utility ROM: User prompt, move the key to the service position in order to perform an optional Flash Update. LED 302 will only appear if the key switch is in the secure position. This signals the user that a Flash Update may be initiated by moving the key switch to the service position. If the key is moved to the service position then LED 303 will be displayed, this signals the user to press the Reset button and select optional Flash Update. 303 Flash Utility ROM: User prompt, press the Reset button in order to perform an optional Flash Update. LED 3d2 will only appear if the key switch is the secure position. This signals the user that a Flash Update may be initiated by moving the key switch to the service position. If the key is moved to the service position LED 303 will be displayed, this signals the user to press the Reset button and select optional Flash Update. 304 Flash Utility ROM IOCC POST error (irrecoverable). 305 Flash Utility ROM standard I/O POST running. 306 Flash Utility ROM is attempting IPL from Flash Update media device. 307 Flash Utility ROM system model number does not compare between OCS and ROM (irrecoverable). 308 Flash Utility ROM: IOCC TCW memory is being tested. 309 Flash Utility ROM passed control to a Flash Update Boot Image. 311 Flash Utility ROM CRC comparison error (irrecoverable). 312 Flash Utility ROM RAM POST memory configuration error or no memory found (irrecoverable). 313 Flash Utility ROM RAM POST failure (irrecoverable). 314 Flash Utility ROM Power status register failed (irrecoverable). 315 Flash Utility ROM detected a low voltage condition. 318 Flash Utility ROM RAM POST is looking for good memory. 319 Flash Utility ROM RAM POST bit map is being generated. 322 CRC error on media Flash Image. No Flash Update performed. 323 Current Flash Image is being erased. 324 CRC error on new Flash Image after Update was performed. (Flash Image is cor-rupted.) 325 Flash Update successful and complete. Configuration Program Indicators -------------------------------- 500 Querying Standard I/O slot. 501 Querying card in Slot 1. 502 Querying card in Slot 2. 503 Querying card in Slot 3. 504 Querying card in Slot 4. 505 Querying card in Slot 5. 506 Querying card in Slot 6. 507 Querying card in Slot 7. 508 Querying card in Slot 8. 510 Starting device configuration. 511 Device configuration completed. 512 Restoring device configuration files from media. 513 Restoring basic operating system installation files from media. 516 Contacting server during network boot. 517 Mounting client remote file system during network IPL. 518 Remote mount of the root and /usr file systems failed during network boot. 520 Bus configuration running. 521 /etc/init invoked cfgmgr with invalid options; /etc/init has been corrupted or incor-rectly modified (irrecoverable error). 522 The configuration manager has been invoked with conflicting options (irrecoverable error). 523 The configuration manager is unable to access the ODM database (irrecoverable error). 524 The configuration manager is unable to access the config.rules object in the ODM database (irrecoverable error). 525 The configuration manager is unable to get data from a customized device object in the ODM database (irrecoverable error). 526 The configuration manager is unable to get data from a customized device driver object in the ODM database ( irrecoverable error). 527 The configuration manager was invoked with the phase 1 flag; running phase 1 at this point is not permitted (irrecoverable error). 528 The configuration manager cannot find sequence rule, or no program name was specified in the ODM database (irrecoverable error). 529 The configuration manager is unable to update ODM data (irrecoverable error). 530 The program savebase returned an error. 531 The configuration manager is unable to access the PdAt object class (irrecoverable error). 532 There is not enough memory to continue (malloc failure); irrecoverable error. 533 The configuration manager could not find a configure method for a device. 534 The configuration manager is unable to acquire database lock (irrecoverable error). 535 HIPPI diagnostics interface driver being configured. 536 The configuration manager encountered more than one sequence rule specified in the same phase (irrecoverable error). 537 The configuration manager encountered an error when invoking the program in the sequence rule. 538 The configuration manager is going to invoke a configuration method. 539 The configuration method has terminated, and control has returned to the configura-tion manager. 551 IPL vary-on is running. 552 IPL varyon failed. 553 IPL phase 1 is complete. 554 The boot device could not be opened or read, or unable to define NFS swap device during network boot. 555 An ODM error occurred when trying to varyon the rootvg, or unable to create an NFS swap device during network boot. 556 Logical Volume Manager encountered error during IPL vary-on. 557 The root filesystem will not mount. 558 There is not enough memory to continue the system IPL. 559 Less than 2 M bytes of good memory are available to load the AIX kernel. 570 Virtual SCSI devices being configured. 571 HIPPI common function device driver being configured. 572 HIPPI IPI-3 master transport driver being configured. 573 HIPPI IPI-3 slave transport driver being configured. 574 HIPPI IPI-3 transport services user interface device driver being configured. 575 A 9570 disk-array driver is being configured. 576 Generic async device driver being configured. 577 Generic SCSI device driver being configured. 578 Generic commo device driver being configured. 579 Device driver being configured for a generic device. 580 HIPPI TCPIP network interface driver being configured. 581 Configuring TCP/IP. 582 Configuring Token-Ring data link control. 583 Configuring an Ethernet data link control. 584 Configuring an IEEE Ethernet data link control. 585 Configuring an SDLC MPQP data link control. 586 Configuring a QLLC X.25 data link control. 587 Configuring a NETBIOS. 588 Configuring a Bisync Read-Write (BSCRW). 589 SCSI target mode device being configured. 590 Diskless remote paging device being configured. 591 Configuring an LVM device driver. 592 Configuring an HFT device driver. 593 Configuring SNA device drivers. 594 Asynchronous I/O being defined or configured. 595 X.31 pseudo-device being configured. 596 SNA DLC/LAPE pseudo-device being configured. 597 OCS software being configured. 598 OCS hosts being configured during system reboot. 599 Configuring FDDI data link control. 5c0 Streams-based hardware drive being configured. 5c1 Streams-based X.25 protocol being configured. 5c2 Streams-based X.25 COMIO emulator driver being configured. 5c3 Streams-based X.25 TCP/IP interface driver being configured. 5c4 FCS adapter device driver being configured. 5c5 SCB network device driver for FCS is being configured. 5c6 AIX SNA channel being configured. 600 Starting network boot portion of /sbin/rc.boot 602 Configuring network parent devices. 603 /usr/lib/methods/defsys, /usr/lib/methods/cfgsys, or /usr/lib/methods/cfgbus failed. 604 Configuring physical network boot device. 605 Configuration of physical network boot device failed. 606 Running /usr/sbin/ifconfig on logical network boot device. 607 /usr/sbin/ifconfig failed. 608 Attempting to retrieve the client.info file with tftp.Note that a flashing 608 indicates multiple attempt(s) to retrieve the client_info file are occurring. 609 The client.info file does not exist or it is zero length. 610 Attempting remote mount of NFS file system. 611 Remote mount of the NFS file system failed. 612 Accessing remote files; unconfiguring network boot device. 614 Configuring local paging devices. 615 Configuration of a local paging device failed. 616 Converting from diskless to dataless configuration. 617 Diskless to dataless configuration failed. 618 Configuring remote (NFS) paging devices. 619 Configuration of a remote (NFS) paging device failed. 620 Updating special device files and ODM in permanent filesystem with data from boot RAM filesystem. 622 Boot process configuring for operating system installation. 650 IBM SCSD disk drive being configured 668 25MB ATM MCA Adapter being configured 680 POWER GXT800M Graphics Adapter 689 4.5GB Ultra SCSI Single Ended Disk Drive being configured 690 9.1GB Ultra SCSI Single Ended Disk Drive being configured 694 Eicon ISDN DIVA MCA Adapter for PowerPC Systems 700 Progress indicator. A 1.1 GB 8-bit SCSI disk drive being identified or configured. 701 Progress indicator. A 1.1 GB 16-bit SCSI disk drive is being identified or configured. 702 Progress indicator. A 1.1 GB 16-bit differential SCSI disk drive is being identified or configured. 703 Progress indicator. A 2.2 GB 8-bit SCSI disk drive is being identified or configured. 704 Progress indicator. A 2.2 GB 16-bit SCSI disk drive is being identified or configured. 705 The configuration method for the 2.2 GB 16-bit differential SCSI disk drive is being run. If an irrecoverable error occurs, the system halts. 706 Progress indicator. A 4.5 GB 16-bit SCSI disk drive is being identified or configured. 707 Progress indicator. A 4.5 GB 16-bit differential SCSI disk drive is being identified or configured. 708 Progress indicator. A L2 cache is being identified or configured. 710 POWER GXT150M graphics adapter being identified or configured. 711 Unknown adapter being identified or configured. 712 Graphics slot bus configuration is executing. 713 The IBM ARTIC960 device is being configured. 714 A video capture adapter is being configured. 715 The Ultimedia Services audio adapter is being configured. This LED displays briefly on the panel. 717 TP Ethernet Adapter being configured. 718 GXT500 Graphics Adapter being configured. 720 Unknown read/write optical drive type being configured. 721 Unknown disk or SCSI device being identified or configured. 722 Unknown disk being identified or configured. 723 Unknown CD-ROM being identified or configured. 724 Unknown tape drive being identified or configured. 725 Unknown display adapter being identified or configured. 726 Unknown input device being identified or configured. 727 Unknown async device being identified or configured. 728 Parallel printer being identified or configured. 729 Unknown parallel device being identified or configured. 730 Unknown diskette drive being identified or configured. 731 PTY being identified or configured. 732 Unknown SCSI initiator type being configured. 733 7GB 8mm tape drive being configured. 734 4x SCSI-2 640MB CD-ROM Drive 741 1080MB SCSI Disk Drive 745 16GB 4mm Tape Auto Loader 748 MCA keyboard/mouse adapter being configured. 749 7331 Model 205 Tape Library 754 1.1GB 16-bit SCSI disk drive being configured. 755 2.2GB 16-bit SCSI disk drive being configured. 756 4.5GB 16-bit SCSI disk drive being configured. 757 External 13GB 1.5M/s 1/4 inch tape being configured. 772 4.5GB SCSI F/W Disk Drive 773 9.1GB SCSI F/W Disk Drive 774 9.1GB External SCSI Disk Drive 77c Progress indicator. A 1.0 GB 16-bit SCSI disk drive being identified or configured. 783 4mm DDS-2 Tape Autoloader 789 2.6GB External Optical Drive 794 10/100MB Ethernet PX MC Adapter 797 Turboways 155 UTP/STP ATM Adapter being identified or configured. 798 Video streamer adapter being identified or configured. 800 Turboways 155 MMF ATM Adapter being identified or configured. 803 7336 Tape Library Robotics being configured 804 8x Speed SCSI-2 CD ROM drive being configured 807 SCSI Device Enclosure being configured 808 System Interface Full (SIF) configuration process 80c SSA 4-Port Adapter being identified or configured. 811 Processor complex being identified or configured. 812 Memory being identified or configured. 813 Battery for time-of-day, NVRAM, and so on being identified or configured, or system I/O control logic being identified or configured. 814 NVRAM being identified or configured. 815 Floating-point processor test 816 Operator panel logic being identified or configured. 817 Time-of-day logic being identified or configured. 819 Graphics input device adapter being identified or configured. 821 Standard keyboard adapter being identified or configured. 823 Standard mouse adapter being identified or configured. 824 Standard tablet adapter being identified or configured. 825 Standard speaker adapter being identified or configured. 826 Serial Port 1 adapter being identified or configured. 827 Parallel port adapter being identified or configured. 828 Standard diskette adapter being identified or configured. 831 3151 adapter being identified or configured, or Serial Port 2 being identified or con-figured. 834 64-port async controller being identified or configured. 835 16-port async concentrator being identified or configured. 836 128-port async controller being identified or configured. 837 16-port remote async node being identified or configured. 838 Network Terminal Accelerator Adapter being identified or configured. 839 7318 Serial Communications Server being configured. 841 8-port async adapter (EIA-232) being identified or configured. 842 8-port async adapter (EIA-422A) being identified or configured. 843 8-port async adapter (MIL-STD 188) being identified or configured. 844 7135 RAIDiant Array disk drive subsystem controller being identified or configured. 845 7135 RAIDiant Array disk drive subsystem drawer being identified or configured. 846 RAIDiant Array SCSI 1.3GB Disk Drive 847 16-port serial adapter (EIA-232) being identified or configured. 848 16-port serial adapter (EIA-422) being identified or configured. 849 X.25 Interface Co-Processor/2 adapter being identified or configured. 850 Token-Ring network adapter being identified or configured. 851 T1/J1 Portmaster adapter being identified or configured. 852 Ethernet adapter being identified or configured. 854 3270 Host Connection Program/6000 connection being identified or configured. 855 Portmaster Adapter/A being identified or configured. 857 FSLA adapter being identified or configured. 858 5085/5086/5088 adapter being identified or configured. 859 FDDI adapter being identified or configured. 85c Progress indicator. Token-Ring High-Performance LAN adapter is being identified or configured. 861 Optical adapter being identified or configured. 862 Block Multiplexer Channel Adapter being identified or configured. 865 ESCON Channel Adapter or emulator being identified or configured. 866 SCSI adapter being identified or configured. 867 Async expansion adapter being identified or configured. 868 SCSI adapter being identified or configured. 869 SCSI adapter being identified or configured. 870 Serial disk drive adapter being identified or configured. 871 Graphics subsystem adapter being identified or configured. 872 Grayscale graphics adapter being identified or configured. 874 Color graphics adapter being identified or configured. 875 Vendor generic communication adapter being configured. 876 8-bit color graphics processor being identified or configured. 877 POWER Gt3/POWER Gt4 being identified or configured. 878 POWER Gt4 graphics processor card being configured. 879 24-bit color graphics card, MEV2 880 POWER Gt1 adapter being identified or configured. 887 Integrated Ethernet adapter being identified or configured. 889 SCSI adapter being identified or configured. 890 SCSI-2 Differential Fast/Wide and Single-Ended Fast/Wide Adapter/A. 891 Vendor SCSI adapter being identified or configured. 892 Vendor display adapter being identified or configured. 893 Vendor LAN adapter being identified or configured. 894 Vendor async/communications adapter being identified or configured. 895 Vendor IEEE 488 adapter being identified or configured. 896 Vendor VME bus adapter being identified or configured. 897 S/370 Channel Emulator adapter being identified or configured. 898 POWER Gt1x graphics adapter being identified or configured. 899 3490 attached tape drive being identified or configured. 89c Progress indicator. A multimedia SCSI CD-ROM is being identified or configured. 901 Vendor SCSI device being identified or configured. 902 Vendor display device being identified or configured. 903 Vendor async device being identified or configured. 904 Vendor parallel device being identified or configured. 905 Vendor other device being identified or configured. 908 POWER GXT1000 Graphics subsystem being identified or configured. 910 1/4GB Fibre Channel/266 Standard Adapter being identified or configured. 911 Fibre Channel/1063 Adapter Short Wave 912 2.0GB SCSI-2 differential disk drive being identified or configured. 913 1.0GB differential disk drive being identified or configured. 914 5GB 8 mm differential tape drive being identified or configured. 915 4GB 4 mm tape drive being identified or configured. 916 Non-SCSI vendor tape adapter being identified or configured. 917 Progress indicator. 2.0GB 16-bit differential SCSI disk drive is being identified or configured. 918 Progress indicator. 2GB 16-bit single-ended SCSI disk drive is being identified or configured. 920 Bridge Box being identified or configured. 921 101 keyboard being identified or configured. 922 102 keyboard being identified or configured. 923 Kanji keyboard being identified or configured. 924 Two-button mouse being identified or configured. 925 Three-button mouse being identified or configured. 926 5083 tablet being identified or configured. 927 5083 tablet being identified or configured. 928 Standard speaker being identified or configured. 929 Dials being identified or configured. 930 Lighted program function keys (LPFK) being identified or configured. 931 IP router being identified or configured. 933 Async planar being identified or configured. 934 Async expansion drawer being identified or configured. 935 3.5-inch diskette drive being identified or configured. 936 5.25-inch diskette drive being identified or configured. 937 An HIPPI adapter is being configured. 942 POWER GXT 100 graphics adapter being identified or configured. 943 Progress indicator. 3480 and 3490 control units attached to a System/370 Channel Emulator/A adapter are being identified or configured. 944 100MB ATM adapter being identified or configured 945 1.0GB SCSI differential disk drive being identified or configured. 946 Serial port 3 adapter is being identified or configured. 947 Progress indicator. A 730MB SCSI disk drive is being configured. 948 Portable disk drive being identified or configured. 949 Unknown direct bus-attach device being identified or configured. 950 Missing SCSI device being identified or configured. 951 670MB SCSI disk drive being identified or configured. 952 355MB SCSI disk drive being identified or configured. 953 320MB SCSI disk drive being identified or configured. 954 400MB SCSI disk drive being identified or configured. 955 857MB SCSI disk drive being identified or configured. 956 670MB SCSI disk drive electronics card being identified or configured. 957 120MB DBA disk drive being identified or configured. 958 160 MB DBA disk drive being identified or configured. 959 160MB SCSI disk drive being identified or configured. 960 1.37GB SCSI disk drive being identified or configured. 964 Internal 20GB 8mm tape drive identified or configured. 968 1.0GB SCSI disk drive being identified or configured. 970 Half-inch, 9-track tape drive being identified or configured. 971 150MB 1/4-inch tape drive being identified or configured. 972 2.3GB 8 mm SCSI tape drive being identified or configured. 973 Other SCSI tape drive being identified or configured. 974 CD-ROM drive being identified or configured. 975 Progress indicator. An optical disk drive is being identified or configured. 977 M-Audio Capture and Playback Adapter being identified or configured. 981 540MB SCSI-2 single-ended disk drive being identified or configured. 984 1GB 8-bit disk drive being identified or configured. 985 M-Video Capture Adapter being identified or configured. 986 2.4GB SCSI disk drive being identified or configured. 987 Progress indicator. Enhanced SCSI CD-ROM drive is being identified or configured. 989 200MB SCSI disk drive being identified or configured. 990 2.0GB SCSI-2 single-ended disk drive being identified or configured. 991 525MB 1/4-inch cartridge tape drive being identified or configured. 994 5GB 8 mm tape drive being identified or configured. 995 1.2GB 1/4 inch cartridge tape drive being identified or configured. 996 Progress indicator. Single-port, multi-protocol communications adapter is being identified or configured. 997 FDDI adapter being identified or configured. 998 2.0GB4 mm tape drive being identified or configured. 999 7137 or 3514 Disk Array Subsystem being configured. D81 T2 Ethernet Adapter being configured. Diagnostic Load Progress Indicators ----------------------------------- Note: When a lowercase c is listed, it displays in the lower half of the seven-segment character position. c00 AIX Install/Maintenance loaded successfully. c01 Insert the first diagnostic diskette. c02 Diskettes inserted out of sequence. c03 The wrong diskette is in diskette drive. c04 The loading stopped with a nonrecoverable error. c05 A diskette error occurred. c06 The rc.boot configuration shell script is unable to determine type of boot. c07 Insert the next diagnostic diskette. c08 RAM file system started incorrectly. c09 The diskette drive is reading or writing a diskette. c20 An unexpected halt occurred, and the system is configured to enter the kernel debug program instead of entering a system dump. c21 The ifconfig command was unable to configure the network for the client network host. c22 The tftp command was unable to read client's ClientHostName info file during a client network boot. c24 Unable to read client's ClientHostName.info file during a client network boot. c25 Client did not mount remote miniroot during network install. c26 Client did not mount the /usr file system during the network boot. c29 The system was unable to configure the network device. c31 Select the console display for the diagnostics. To select No console display, set the key mode switch to Normal then to Service. The diagnostic programs will then load and run the diagnostics automatically. c32 A direct-attached display (HFT) was selected. c33 A tty terminal attached to serial ports S1 or S2 was selected. c34 A file was selected. The console messages store in a file. c40 Configuration files are being restored. c41 Could not determine the boot type or device. c42 Extracting data files from diskette. c43 Cannot access the boot/install tape. c44 Initializing installation database with target disk information. c45 Cannot configure the console. c46 Normal installation processing. c47 Could not create a physical volume identifier (PVID) on disk. c48 Prompting you for input. c49 Could not create or form the JFS log. c50 Creating root volume group on target disks. c51 No paging devices were found. c52 Changing from RAM environment to disk environment. c53 Not enough space in the /tmp directory to do a preservation installation. c54 Installing either BOS or additional packages. c55 Could not remove the specified logical volume in a preservation installation. c56 Running user-defined customization. c57 Failure to restore BOS. c58 Displaying message to turn the key. c59 Could not copy either device special files, device ODM, or volume group information from RAM to disk. c61 Failed to create the boot image. c62 Loading platform dependent debug files c63 Loading platform dependent data files c64 Failed to load platform dependent data files c70 Problem Mounting diagnostic CDROM disc c99 Diagnostics have completed. This code is only used when there is no console. TITLE : Common Boot Time LEDs and Their Solution OS LEVEL : AIX DATE : 17/11/99 VERSION : 1.0 ---------------------------------------------------------------------------- Common Boot Time LEDs and Their Solution LED 201 - Damaged Boot Image ---------------------------- 1. Access your rootvg using a maintenance shell. 2. Check / and /tmp filesystems. If they are almost full create more space. 3. Determine the boot disk by using the command lslv -m hd5 4. Re-create boot image using bosboot -a -d /dev/hdiskn 5. Check for CHECKSTOP errors in the error log. If such errors are found, it is probably failing hardware. 6. Shutdown and restart the system. LED 223-229 - Invalid Boot List ------------------------------- 1. Set the key mode switch to service (F5 for systems without keylock) and power up the machine. 2. If display continues normally, change the key mode switch to Normal and continue with step 3. If you do not get the prompt, go to step 4. 3. When you get the login prompt, login and change the bootlist. Continue with step 7. 4. Access your rootvg using a maintenance shell and continue with step 5. 5. Determine the boot disk by using the command lslv -m hd5. 6. Change the bootlist. 7. Shutdown and restart your system. LED 551, 555, and 557 - Corrupted File System, Corrupted JFS log, and so on. ---------------------------------------------------------------------------- 1. Access your rootvg using a maintenance shell, access the rootvg before mounting any file systems (Option 2 on the Maintenance screen). 2. Verify and correct the file systems as follows: fsck -y /dev/hd1 fsck -y /dev/hd2 fsck -y /dev/hd3 fsck -y /dev/hd4 fsck -y /dev/hd9var 3. Format the JFS log again by using the command: /usr/sbin/logform /dev/hd8 4. Use lslv -m hd5 to find out the boot disk. 5. Recreate boot image by using the command: bosboot -a -d /dev/hdiskn Where n is the disk number of the disk containing boot logical volume. LED 552, 554, and 556 - Super Block Corrupted or Corrupted Customized ODM Database ---------------------------------------------------------------------------------- 1. Repeat steps 1 through 2 for LEDs 551, 555, and 557. 2. If fsck indicates that block 8 is corrupted, the super block for the file system is corrupted and needs to be repaired. Enter the command: dd count=1 bs=4k skip=31 seek=1 if=/dev/hdn of=/dev/hdn where n is the number of the file system. 3. Rebuild your JFS log by using the command: /usr/sbin/logform /dev/hd8 4. If this solves the problem, stop here otherwise continue with step 5. 5. Your ODM database is corrupted. Restart your system and Access your rootvg using a maintenance shell, access the rootvg before mounting any file systems (Option 2 on the Maintenance screen). 6. Mount the root and usr file system as follows: mount /dev/hd4 /mnt mount /usr 7. Copy system configuration to a back up directory: mkdir /mnt/etc/objrepors/backup cp /mnt/etc/objrepors/Cu* /mnt/etc/objrepos 8. Copy configuration from RAM file system as follows: cp /etc/objrepos/Cu* /mnt/etc/objrepos 9. Unmount all file systems by using the umount all command. 10. Determine bootdisk by using the lslv -m hd5 command. 11. Save the clean ODM to the boot logical volume by using the command: savebase -d/dev/hdiskn 12. Reboot, if system does not come up, reinstall BOS. LED 553 - Corrupted /etc/inittab file ------------------------------------- 1. Access the rootvg with all file systems mounted. 2. Check for free space in /, /var and /tmp by using df command. 3. Check the /etc/inittab file and correct the inittab problems if there is one empty inittab file, missing inittab file or wrong entry in inittab file. 4. Check problems with: /etc/environment file /bin/sh /bin/bsh /etc/fsck /etc/profile /.profile 5. Shutdown the system and reboot. ############################################################## SECTION 2: IBM lpar reference codes: ############################################################## (A2xx, B2xx) Logical partition reference codes When the server posts these SRCs, you can find them in the Serviceable Event View or the view that you use to see informational logs (such as the Product Activity Log or ASM). Characters 3 and 4 of word 1 are the partition ID of the logical partition with the problem. If the SRC begins with A2xx, no service action is required. If the SRC begins with B2xx, find the next 4 characters of the SRC (called the unit reference code) in the following table. Table 1. (A2xx, B2xx) Logical partition reference codes Reference Code Description/Action Perform all actions before exchanging Failing Items Failing Item 1150 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). This is a partitioning configuration problem. The LPARCFG Symbolic FRU will help correct the problem. If the problem persists, call your next level of support. LPARCFG 1225 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). The partition attempted to IPL prior to the platform fully initializing. Retry the partition IPL after the platform IPL has fully completed and the platform is not in standby mode. If that IPL fails, call your next level of support. SVCDOCS 1230 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). This is a partitioning configuration problem. The partition is lacking the necessary resources to IPL. This error might occur when you shut down a partition that is set to automatically IPL and then turn the managed system off and back on. When the partition automatically IPLs, it uses the resources specified in PHYP NVRAM, and this error occurs when the server does not find the exact resources specified in NVRAM. The solution is to activate the partition by using the partition profile on the HMC. The HMC applies the values in the profile to NVRAM. When the partition IPLs, it uses the resources specified in the profile. LPARCFG LICCODE 1260 A problem occurred during the IPL of a partition. The partition could not IPL at the Timed Power On setting because the IPL setting of the partition was not set to Normal. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). SVCDOCS 1265 A problem occurred during the IPL of a partition. The partition could not IPL. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). An operating system MSD IPL was attempted with the IPL side on D-mode. This is not a valid operating system IPL scenario, and the IPL will be halted. This SRC is usually seen when a D-mode SLIC install fails and attempts an MSD. SVCDOCS 1266 A problem occurred during the IPL of a partition. The partition could not IPL. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). You are attempting to IPL an operating system that is not supported. SVCDOCS 1280 A problem occurred during a partition Main Storage Dump. A mainstore dump IPL did not complete due to configuration mismatch. Contact your next level of support. NEXTLVL 1281 A partition memory error occurred An attempt to perform a partition dump failed. A partition memory error occurred. The failed memory will no longer be used. The partition dump was terminated. The partition ID is in extended word one as LP=xxx (in decimal format). Re-IPL the partition. SVCDOCS 1310 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). No alternate (D-mode) IPL IOP was selected. The IPL will attempt to continue, but there may not be enough information to find the correct D-mode load source. Have the customer configure an alternate IPL IOP for the partition. Then retry the partition IPL. SVCDOCS 1320 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). No default load source IOP was selected for an A/B-mode IPL. The IPL will attempt to continue, but there may not be enough information to find the correct load source. Have the customer configure a load source IOP for the partition. Then retry the partition IPL. SVCDOCS 1321 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). The IOA for the load source device needed an IOP, and none was detected. Check your LPAR configuration and make sure the correct slot is specified for the IPL load source. Then retry the partition IPL. SVCDOCS 1322 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). During the partition IPL, code tried to determine if the device in a slot was an I/O Processor or an I/O Adapter. That check failed. Check your LPAR configuration and make sure that the correct slot is specified for the IPL load source. Then retry the partition IPL. If this does not resolve the problem, perform LICIP15. SVCDOCS 2048 A problem occurred during a partition Main Storage Dump. A mainstore dump IPL did not complete due to a copy error. Contact your next level of support. NEXTLVL 2058 A problem occurred during a partition Main Storage Dump. A mainstore dump IPL did not complete due to a copy error. Contact your next level of support. NEXTLVL 2250, 2300 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). A slot that was needed for the partition was unavailable. See the Symbolic FRU SLOTUSE for more information on the cause of this error. SLOTUSE 2310, 2320, 2425 to 2426 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). The platform LIC for this partition attempted an operation. There was a failure. Contact your next level of support. NEXTLVL 2475 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). A slot that was needed for the partition was either empty or the device in the slot has failed. See the Symbolic FRU SLOTUSE for more information on the cause of this error. If you have a RAID enablement card (CCIN 5709) on your system, it will disable an embedded SCSI adapter. If that embedded slot is called out in the error, you can safely ignore this error. SLOTUSE 2485 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). The platform LIC for this partition attempted an operation. There was a failure. Contact your next level of support. NEXTLVL 3000 System log entry only, no service action required A user requested an immediate termination and main store dump of a partition. The partition ID is in extended word one as LP=xxx in decimal format. 3081 A problem occurred during the IPL of a partition. IPL did not complete due to a copy error. Contact your next level of support. LICCODE 3110 A problem occurred during the IPL of a partition. The search for a valid load source device was exhausted. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). Perform LICIP15. SVCDOCS 3113 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). A problem occurred on the path to the load source for the partition. If present, look in the Serviceable Event View for a B7xx xxxx during the partition's IPL. Correct that error and retry the partition IPL. SVCDOCS 3114 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). The B2xx xxxx SRC Format is Word 1: B2xx3114, Word 3: Bus, Word 4: Board, Word 5: Card. NEXTLVL 3120 System log entry only, no service action required The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). Retry count exceeded. This is logged for each unsuccessful attempt to IPL with a loadsource candidate. If the IPL fails, look for other serviceable errors. 3123 System log entry only, no service action required 3125 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). This is a platform LIC main store utilization problem. The platform LIC could not obtain a segment of main storage within the platform's main store to use for managing the creation of a partition. LICCODE 3128 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). An unexpected failure return code was returned when attempting to query the IOA slots that are assigned to an IOP. Look for B700 69xx errors in the Serviceable Event View and work those errors. NEXTLVL 3130 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). If word 3 is zero, then this SRC is informational and can be ignored. Otherwise there is a problem in the platform LIC. A nonzero bus number has no associated bus object. Look for B700 69xx errors in the Serviceable Event View and work those errors. If there are no serviceable B700 69xx errors, or if correcting the errors did not correct this problem, contact your next level of support. NEXTLVL 3135 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). An unknown bus type was detected. NEXTLVL 3140 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). The load source IOP is not owned by the partition. This is a configuration problem in the partition. Have the customer reconfigure the partition to have the intended load source IOP. If there is not a configuration problem then contact your next level of support. SVCDOCS 3141 System log entry only, no service action required The IOP in the slot used for the last successful IPL of the operating system was replaced with an I/O Adapter. The IPL will continue by searching for a valid load source device. Check the LPAR configuration if required, and ensure that the tagged I/O for the partition is correct. 3142 System log entry only, no service action required The I/O Adapter in the slot used for the last successful IPL of the operating system was replaced with an I/O Processor. The IPL will continue by searching for a valid load source device. Check the LPAR configuration if required, and ensure that the tagged I/O for the partition is correct. 3143 System log entry only, no service action required The I/O Adapter in the slot used for the last successful IPL of the operating system was removed. The IPL will continue by searching for a valid load source device. Check the LPAR configuration if required, and ensure that the tagged I/O for the partition is correct. 3144 System log entry only, no service action required The I/O Processor in the slot used for the last successful IPL of the operating system was removed. The IPL will continue by searching for a valid load source device. Check the LPAR configuration if required, and ensure that the tagged I/O for the partition is correct. 3200 System log entry only, no service action required The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). Look for a SRC in the Serviceable Event View logged at the time the partition was performing an IPL. This error indicates a failure during a search for the load source. There may be a number of these failures prior to finding a good load source. This is normal. If a B2xx3110 error is logged, a B2xx3200 may be posted to the control panel. Work the B2xx3110 error in the Serviceable Event View. If the system IPL hangs at B2xx3200 and you cannot check the SRC history, perform the actions indicated for the B2xx3110 SRC. 4158 System log entry only, no service action required The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). Look for a SRC in the Serviceable Event View logged at the time the partition was performing an IPL. This error indicates a failure during a search for the load source. It is usual for a number of these failures to occur prior to finding a valid load source. This is normal. If a B2xx3110 error is logged, a B2xx3200 may be posted to the control panel. Work the B2xx3110 error in the Serviceable Event View. If the system IPL hangs at B2xx3200 and you cannot check the SRC history, perform the actions indicated for the B2xx3110 SRC. 5106 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There is not enough space to contain the partition main storage dump. Contact your next level of support. NEXTLVL 5109 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There was a partition main storage dump problem. Contact your next level of support. NEXTLVL 5114 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There is not enough space to contain the partition main storage dump. Contact your next level of support. NEXTLVL 5115 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There was an error reading the partition's main storage dump from the partition's load source into main storage. NEXTLVL 5117 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). A partition main storage dump has occurred but cannot be written to the load source device because a valid dump already exists. Use the Main Storage Dump Manager to rename or copy the current main storage dump. SVCDOCS 5121 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There was an error writing the partition's main storage dump to the partition's load source. NEXTLVL 5122 to 5123 System log entry only, no service action required A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). An error occurred when writing the partition's main storage dump to the partition's load source. No service action required. 5135 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There was an error writing the partition's main storage dump to the partition's load source. NEXTLVL 5137 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There was an error writing the partition's main storage dump to the partition's load source. NEXTLVL 5145 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There was an error writing the partition's main storage dump to the partition's load source. NEXTLVL 5148 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). An error occurred while doing a main storage dump that would have caused another main storage dump. Contact your next level of support. NEXTLVL 6006 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). A platform LIC error occurred when the partition's memory initialized. The IPL will not continue. Contact your next level of support. NEXTLVL 6012 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). The partition's LID failed to completely load into the partition's mainstore area. Contact your next level of support. NEXTLVL 6015 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). The load source media is corrupted or not valid. LSERROR 6025 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). This is a problem with the load source media being corrupt or not valid. LSERROR 6027 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). A failure occurred when allocating memory for an internal object used for LID load operations. Ensure the partition was allocated enough main storage, verify that no memory leaks are present, and then retry the operation. NEXTLVL 6110 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). Error on load source device. LSERROR 690A A problem occurred during the IPL of a partition. An error occurred while copying Open Firmware into the partition load area. Contact your next level of support. NEXTLVL 7200 System log entry only, no service action required The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). An error condition was encountered when communicating with the load source I/O Processor for the partition identified in the xx field of the B2xx SRC. This informational error indicates a failure resetting the I/O Processor in the preceding B2xx3200 error. This may be normal. If there is a hardware failure there will be a different serviceable event. If the system IPL hangs at B2xx7200 and you cannot check the SRC history, perform the actions indicated for the B2xx3110 SRC. 8080 System log entry only, no service action required 8081 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). An internal LIC timeout has occurred. The partition may continue to IPL but it may experience problems while running. LICCODE 8105 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There was a failure loading the VPD areas of the partition. Possible causes are: Corrupted/unsupported load source media Insufficient resources allocated to the partition Unsupported partition configuration by the operating system If the problem is due to media, replace the load source media. If the problem is due to insufficient resources, allocate enough resources to the partition. If the problem is due to unsupported partition configuration, correct the partition configuration. SVCDOCS 8107 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There was a problem getting a segment of main storage in the platform's main store. LICCODE 8109 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). A failure occurred. The IPL is terminated. Ensure that there is enough memory to IPL the partition. LICCODE 8112 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). A failure occurred. The IPL is terminated. LICCODE 8113 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). A problem occurred on the path to the load source for the partition. There was an error mapping memory for the partition's IPL. Call your next level of support. LICCODE 8114 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). A problem occurred on the path to the load source for the partition. There was a failure verifying VPD for the partition's resources during IPL. Call your next level of support. LICCODE 8115 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There was a low level partition to partition communication failure. LICCODE 8117, 8121, 8123, 8125, 8127, 8129 A problem occurred during the IPL of a partition. Partition did not IPL due to platform Licensed Internal Code error. Contact your next level of support. NEXTLVL 813A A problem occurred during the IPL of a partition. Ensure that the console device cables are connected properly. If the cables are already connected properly, replace the cables. Re-IPL the partition. If the problem reoccurs, contact your next level of support. SVCDOCS A100 to A101 A problem occurred after a partition ended abnormally. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). This partition could not stay running and shut itself down. Work any error logs in the Serviceable Event View. If there are no errors, contact your next level of support. SVCDOCS B07B System log entry only, no service action required B215 A problem occurred after a partition ended abnormally. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There was a communications problem between this partition's service processor and the platform's service processor. The platform will need to be re-IPLed before that partition can be used. Call your next level of support. NEXTLVL C1F0 A problem occurred during a power off a partition Internal platform Licensed Internal Code error occurred during partition shutdown or re-IPL. Contact your next level of support. NEXTLVL D150 A problem occurred after a partition ended abnormally. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). There was a communications problem between this partition and code that handles resource allocation. Call your next level of support. LICCODE E0AA A problem occurred during the IPL of a partition. Ensure that the console device cables are connected properly. If the cables are already connected properly, replace the cables. Re-IPL the partition. If the problem reoccurs, contact your next level of support. SVCDOCS F001 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). An operation has timed out. Ignore this error if there are other serviceable errors. Work those error logs for this partition and for the platform from the Serviceable Event View. If there are no errors, contact your next level of support. SVCDOCS F003 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). Partition processors did not start LIC within the timeout window. Capture a Partition Dump and call your next level of support. NEXTLVL F004 A system request to power off a partition failed The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). The partition did not respond to a system request to power off the partition. This partition had a communications problem. If the partition is an i5/OS partition, capture a Partition Dump. Contact your next level of support. NEXTLVL F005 A system request to power off a partition failed The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). The partition did not respond to a system request to power off the partition. This partition had a communications problem. If the partition is an i5/OS partition, perform a Partition Dump and contact your next level of support. For all other partition types, a Partition Dump is not supported. If the system is Hardware Management Console (HMC) or Integrated Virtualization Manager (IVM) controlled, do an immediate partition power off. If the system is not HMC or IVM controlled, perform a Function 8 on the control panel. After the partition has powered off, re-IPL the partition, collect error logs and contact your next level of support. NEXTLVL F006 A problem occurred during the IPL of a partition. The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). The code load operation for the partition's IPL timed out. Work any error logs for this partition in the Serviceable Event View. If there are no errors, contact your next level of support. SVCDOCS F007 A problem occurred during a power off a partition The partition ID is characters 3 and 4 of the B2xx reference code in word 1 of the SRC (in hexadecimal format). If characters 3 and 4 are both zero, then the partition ID is in extended word one as LP=xxx (in decimal format). A problem occurred on the path to the load source for the partition. A timeout occurred during the process of trying to stop a partition from running. Contact your next level of support. LICCODE F008 A problem occurred during the IPL of a partition. During an IPL, a timeout occurred while waiting for a ready message from the partition. Look for other errors. Re-IPL the partition to recover. F009 System log entry only, no service action required During an IPL, a timeout occurred while waiting for a response to a message. Look for other errors. Re-IPL the partition to recover. F00A to F00B System log entry only, no service action required During an IPL, a timeout occurred while waiting for a response to a message. Look for other errors. If this SRC is displayed in the operator panel, then panel function 34 might be used to retry the current IPL while the partition is still in the failed state. F00C System log entry only, no service action required During an IPL, a timeout occurred while waiting for a response to a message. Look for other errors. If this SRC is displayed in the operator panel, then panel function 34 might be used to retry the current IPL while the partition is still in the failed state. F00D Timeout occurred during a main store dump IPL If this SRC is displayed in the operator panel during a main store dump IPL, then panel function 34 might be used to retry the current main store dump IPL while the partition is still in the failed state. ############################################################## SECTION 3: IBM Partition firmware reference (error) codes: ############################################################## (BAxx) Partition firmware reference (error) codes The partition firmware detected a failure. The first eight characters in the display represent the SRC. Any additional characters represent the associated location code. Record the location code as well as the reference code, then find the SRC in the following table. Table 1. (BAxx) Partition firmware reference (error) codes Reference Code Description/Action Perform all actions before exchanging Failing Items Failing Item BA000010 The device data structure is corrupted FWFLASH BA000020 Incompatible firmware levels were found Reflash the platform firmware. BA000030 An lpevent communication failure occurred FWFLASH BA000032 The firmware failed to register the lpevent queues FWFLASH BA000034 The firmware failed to exchange capacity and allocate lpevents FWFLASH BA000038 The firmware failed to exchange virtual continuation events FWFLASH BA000040 The firmware was unable to obtain the RTAS code lid details FWFLASH BA000050 The firmware was unable to load the RTAS code lid FWFLASH BA000060 The firmware was unable to obtain the open firmware code lid details FWFLASH BA000070 The firmware was unable to load the open firmware code lid FWFLASH BA000080 The user did not accept the license agreement There is no further action required. If the user did not accept the license agreement, the system will not function. BA000081 Failed to get the firmware license policy FWFLASH BA000082 Failed to set the firmware license policy FWFLASH BA010000 There is insufficient information to boot the partition FWIPIPL BA010001 The client IP address is already in use by another network device FWIPIPL BA010002 Cannot get gateway IP address If the system is a model 185 or A50, refer to partition firmware progress code E174. For all other systems, refer to partition firmware progress code CA00E174. FWHOST BA010003 Cannot get server hardware address If the system is a model 185 or A50, refer to partition firmware progress code E174. For all other systems, refer to partition firmware progress code CA00E174. FWHOST BA010004 Bootp failed BA010005 File transmission (TFTP) failed Refer to partition firmware progress code CA00E174 FWHOST FWADIPL BA010006 The boot image is too large FWADIPL BA020001 Partition firmware password entry error Reenter the password. BA020009 Invalid password entered - system locked A password was entered incorrectly three times. Deactivate the partition using the HMC, then reactivate it. When asked for the password, enter the correct password. BA030011 RTAS attempt to allocate memory failed FWFWPBL BA04000F Self test failed on device; no error or location code information available If there was a location code reported with the error, replace the device specified by the location code. NEXTLVL BA040010 Self test failed on device; cannot locate package NEXTLVL BA040020 The machine type and model are not recognized by the server firmware Check for server firmware updates, and apply them, if available. NEXTLVL BA040030 The firmware was not able to build the UID properly for this system. As a result, problems may occur with the licensing of the AIXr operating system. Using the Advanced System Management Interface (ASMI) menus, ensure that the machine type, model, and serial number in the VPD for this system are correct. If this is a new system, check for server firmware updates and apply them, if available. BA040035 The firmware was unable to find the "plant of manufacture" in the VPD. This may cause problems with the licensing of the AIX operating system. Verify the that machine type, model, and serial number are correct for this system. If this is a new system, check for server firmware updates and apply them, if available. BA040040 Setting the machine type, model, and serial number failed. FWFWPBL BA040050 The h-call to switch off the boot watchdog timer failed. FWFWPBL BA040060 Setting the firmware boot side for the next boot failed. FWFWPBL BA050001 Rebooting a partition in logical partition mode failed. FWFWPBL BA050004 Locating a service processor device tree node failed. FWFWPBL BA05000A Failed to send boot failed message to the service processor FWFWPBL BA060003 IP parameter requires 3 period (.) characters Enter a valid IP parameter. Example: 000.000.000.000 BA060004 Invalid IP parameter Enter a valid IP parameter. Example: 000.000.000.000 BA060005 Invalid IP parameter (>255) Enter a valid IP parameter. Example: 000.000.000.000 BA060007 A keyboard was not found Make sure that a keyboard is attached to the USB port that is assigned to the partition. Replace the USB card to which the keyboard is attached. BA060008 No configurable adapters found by the remote IPL menu in the System Management Services (SMS) utilities This error occurs when the remote IPL menu in the SMS utilities cannot locate any LAN adapters that are supported by the remote IPL function. FWRIPL BA06000B The system was not able to find an operating system on the devices in the boot list. See Problems with loading and starting the operating system (AIX and Linuxr) BA06000C A pointer to the operating system was found in non-volatile storage. FWPTR BA060020 The boot-device environment variable exceeded the allowed character limit. FWNIM BA060021 The boot-device environment variable contained more than five entries. FWNIM BA060022 The boot-device environment variable contained an entry that exceeded 255 characters in length FWNIM BA060030 Logical partitioning with shared processors is enabled and the operating system does not support it. Install or boot a level of the operating system that supports shared processors. Disable logical partitioning with shared processors in the operating system. BA060040 The system or partition is configured to use huge pages, but the operating system image does not support huge pages. Do one of the following: Install a newer version of the operating system that supports huge pages. Use the ASMI to remove the huge pages. BA060050 The Hypervisor supports dynamic partitioning of the huge page-type of memory allocation, but dynamic partitioning of huge pages is not supported. Use the ASMI to disable dynamic partitioning of huge pages. BA060060 The operating system expects an IOSP partition, but the operating system failed to make the transition to alpha mode. Ensure that the alpha-mode operating system image is intended for this partition. Ensure that the configuration of the partition supports an alpha-mode operating system. BA060061 The operating system expects a non-IOSP partition, but the operating system failed to make the transition to MGC mode. Ensure that the nonalpha-mode operating system image is intended for this partition. Ensure that the configuration of the partition supports a nonalpha-mode operating system. BA07xxxx SCSI controller failure FWSCSI1 BA080001 An IDE device remained busy for a longer period than the time out period FWFWPBL BA080002 The IDE controller senses IDE devices but with errors. Verify that the IDE devices are properly seated and cabled correctly Replace the IDE controller (model-dependent) BA080010 An IDE device is busy longer than specified time-out period. Retry the operation. FWIDE1 BA080011 An IDE command timed out; command is exceeding the period allowed to complete. Retry the operation. FWIDE1 BA080012 The ATA command failed FWIDE2 BA080013 The media is not present in the tray Retry the operation. FWIDE1 BA080014 The media has been changed Retry the operation. FWIDE1 BA080015 The packet command failed; the media might not be readable. Retry the operation. FWIDE1 BA09xxxx SCSI controller failure. This checkpoint might remain in the control panel for up to 15 minutes If the checkpoint persists longer than 15 minutes, do the following: Power off the server and reboot from the permanent side. Reject the firmware image on the temporary side. If the problem persists, before replacing any components, refer to the actions for BA090001. BA090001 SCSI disk unit: test unit ready failed; hardware error FWSCSI1 BA090002 SCSI disk unit: test unit ready failed; sense data available FWSCSI2 BA090003 SCSI disk unit: send diagnostic failed; sense data available FWSCSI3 BA090004 SCSI disk unit: send diagnostic failed: devofl command FWSCSI3 BA100001 SCSI tape: test unit ready failed; hardware error FWSCSI1 BA100002 SCSI tape: test unit ready failed; sense data available FWSCSI4 BA100003 SCSI tape: send diagnostic failed; sense data available FWSCSI3 BA100004 SCSI tape: send diagnostic failed: devofl command FWSCSI3 BA110001 SCSI changer: test unit ready failed; hardware error FWSCSI1 BA110002 SCSI changer: test unit ready failed; sense data available FWSCSI4 BA110003 SCSI changer: send diagnostic failed; sense data available FWSCSI3 BA110004 SCSI changer: send diagnostic failed: devofl command FWSCSI3 BA120001 On an undetermined SCSI device, test unit ready failed; hardware error FWSCSI5 BA120002 On an undetermined SCSI device, test unit ready failed; sense data available FWSCSI4 BA120003 On an undetermined SCSI device, send diagnostic failed; sense data available FWSCSI4 BA120004 On an undetermined SCSI device, send diagnostic failed; devofl command FWSCSI4 BA130001 SCSI CD-ROM: test unit ready failed; hardware error FWSCSI1 BA130002 SCSI CD-ROM: test unit ready failed; sense data available FWSCSI3 BA130003 SCSI CD-ROM: send diagnostic failed; sense data available FWSCSI3 BA130004 SCSI CD-ROM: send diagnostic failed: devofl command FWSCSI3 BA130010 USB CD-ROM: device remained busy longer than the time-out period Retry the operation. FWFWPBL BA130011 USB CD-ROM: execution of ATA/ATAPI command was not completed within the allowed time. Retry the operation. FWCD1 BA130012 USB CD-ROM: execution of ATA/ATAPI command failed. Verify that the power and signal cables going to the USB CD-ROM are properly connected and are not damaged. If any problems are found, correct them, then retry the operation. If the problem persists, the CD in the USB CD-ROM drive might not be readable. Remove the CD and insert another CD. NEXTLVL BA130013 USB CD-ROM: bootable media is missing from the drive Insert a bootable CD-ROM in the USB CD-ROM drive, then retry the operation. FWCD1 BA130014 USB CD-ROM: the media in the USB CD-ROM drive has been changed. Retry the operation. FWCD2 BA130015 USB CD-ROM: ATA/ATAPI packet command execution failed. If the problem persists, the CD in the USB CD-ROM drive might not be readable. Remove the CD and insert another CD. FWCD2 BA131010 The USB keyboard was removed. Plug in the USB keyboard and reboot the partition. Check for system firmware updates and apply them, if available. BA140001 SCSI read/write optical: test unit ready failed; hardware error FWSCSI1 BA140002 SCSI read/write optical: test unit ready failed; sense data available FWSCSI1 BA140003 SCSI read/write optical: send diagnostic failed; sense data available FWSCSI3 BA140004 SCSI read/write optical: send diagnostic failed; devofl command FWSCSI3 BA150001 PCI Ethernet BNC/RJ-45 or PCI Ethernet AUI/RJ-45 adapter: internal wrap test failure Replace the adapter specified by the location code. BA151001 10/100 MBPS Ethernet PCI adapter: internal wrap test failure Replace the adapter specified by the location code. BA151002 10/100 MBPS Ethernet card FWENET BA153002 Gigabit Ethernet adapter failure Verify that the MAC address programmed in the FLASH/EEPROM is correct. BA153003 Gigabit Ethernet adapter failure Check for adapter firmware updates; apply if available. Remove other cards from the PHB in which the gigabit Ethernet adapter is plugged and retry the operation. If the operation is successful, plug the cards in again, one at a time, until the failing card is isolated. After you identify the failing card, replace it. Replace the adapter. BA160001 PCI auto LANstreamerT token ring adapter: failed to complete hardware initialization. Replace the adapter specified by the location code. BA161001 PCI token ring adapter: failed to complete hardware initialization. Replace the adapter specified by the location code. BA170xxx NVRAM problems FWNVR1 BA170000 NVRAMRC initialization failed; device test failed FWNVR2 BA170100 NVRAM data validation check failed Turn off, then turn on the system. FWNVR2 BA170201 The firmware was unable to expand target partition - saving configuration variable FWNVR1 BA170202 The firmware was unable to expand target partition - writing error log entry FWNVR1 BA170203 The firmware was unable to expand target partition - writing VPD data FWNVR1 BA170210 Setenv/$Setenv parameter error - name contains a null character FWNVR1 BA170211 Setenv/$Setenv parameter error - value contains a null character FWNVR1 BA170220 The firmware was not able to write a variable value into NVRAM because not enough space exists in NVRAM. Do the following: Reduce the number of partitions, if possible, so that each of the remaining partitions has more NVRMA allocated to it. Contact your next level of support. BA170221 The setenv/$setenv function had to delete network boot information to free space in NVRAM. You might need to use the SMS menus to reenter the parameters for network installation or boot. BA170998 NVRAMRC script evaluation error - command line execution error. FWNVR3 BA170999 NVRAMRC script evaluation error - stack unbalanced on completion. This is a firmware debug environment error. There is no user action or FRU replacement for this error. NEXTLVL BA180008 PCI device Fcode evaluation error. FWPCI1 BA180009 The Fcode on a PCI adapter left a data stack imbalance You should load the new adapter Fcode before you use the adapter (specified by the location code associated with this error) for booting. FWPCI1 BA180010 PCI probe error, bridge in freeze state FWPCI2 BA180011 PCI bridge probe error, bridge is not usable FWPCI3 BA180012 PCI device runtime error, bridge in freeze state FWPCI3 BA180013 A PCI adapter was found that this machine type and model does not support. Is the system an IBMr Intellistation model? Yes: Complete the following steps. Check for and apply any available server firmware udpates. Replace the adapter at the location code that was reported with the error. No: Remove the PCI adapter specified by the location code. BA180014 MSI software error FWFLASH BA180100 FDDI adapter Fcode driver is not supported on this system. This server does not support the Fcode driver of this adapter. Service support might have additional information. BA180101 Stack underflow from fibre-channel adapter FWFWPBL BA188000 An unsupported adapter was found in a PCI slot Remove the unsupported adapter in the slot identified by the location code. BA188001 EEH recovered a failing I/O adapter This is an informational code only, and no action is required. Since it is informational, no location code will be reported. BA188002 EEH could not recover the failed I/O adapter Replace the adapter in the slot identified by the location code. BA190001 Firmware function to get/set time-of-day reported an error FWFWPBL BA191001 The server firmware function to turn on the speaker reported an error FWFWPBL BA201001 The serial interface dropped data packets FWFWPBL BA201002 The serial interface failed to open Note: Check console settings to ensure the console is defined to the correct port. Ensure the console cables are connected to the port that is defined as the console. FWFWPBL BA201003 The firmware failed to handshake properly with the serial interface FWFWPBL BA210000 Partition firmware reports a default catch FWFWPBL BA210001 Partition firmware reports a stack underflow was caught FWFWPBL BA210002 Partition firmware was ready before standout was ready FWFWPBL BA210010 The transfer of control to the SLIC loader failed FWFWPBL BA210020 The I/O configuration exceeds the maximum size allowed by partition firmware. Increase the logical memory block size to 256 megabytes (MB) and reboot the managed system. Note: If the logical memory block size is already 256 MB, contact your next level of support. BA210100 The partition firmware was unable to log an error with the server firmware. No reply was received from the server firmware to an error log that was sent previously NEXTLVL BA210101 The partition firmware error log queue is full NEXTLVL BA250010 dlpar error in open firmware FWLPAR BA250020 dlpar error in open firmware due to an invalid dlpar entity. This error may have been caused by an errant or hung operating system process. Check for operating system updates that resolve problems with dynamic logical partitioning (dlpar) and apply them, if available. Check for server firmware updates and apply them, if available. BA250030 A hotplug operation in dynamic logical partitioning (dlpar) was terminated for concurrent firmware update. Retry the hotplug operation after the concurrent firmware update is complete. BA250040 The firmware was unable to generate a device tree node After you perform the FRU indicated in the Failing Items column, check for operating system updates and apply them, if available. FWFLASH BA278001 Failed to flash firmware: invalid image file Obtain a valid firmware update (flash) image for this system. BA278002 Flash file is not designed for this eServerT platform Obtain a valid firmware update (flash) image for this system. BA278003 Unable to lock the firmware update lid manager Reboot the system. Make sure that the operating system is authorized to update the firmware. If the system is running multiple partitions, verify that this partition has service authority. BA278004 An invalid firmware update lid was requested Obtain a valid firmware update (flash) image for this system. BA278005 Failed to flash a firmware update lid Obtain a valid firmware update (flash) image for this system. BA278006 Unable to unlock the firmware update lid manager Reboot the system. BA278007 Failed to reboot the system after a firmware flash update Reboot the system. BA278008 A server firmware update was attempted from the operating system. You must perform the update by using the Hardware Management Console (HMC). Perform the server firmware update by using the HMC. BA278009 The server firmware update management tools for the version of Linux that you are running are incompatible with this system. Go to Service and productivity tools for Linux on POWERT and download the latest service aids and productivity tools for the version of Linux that you are running. BA280000 RTAS discovered an invalid operation that may cause a hardware error NEXTLVL BA290000 RTAS discovered an internal stack overflow FWFWPBL BA300010 The partition exceeded the maximum number of logical memory blocks allowed under the new memory allocation scheme. Reduce the total logical memory block limit in the partition profile, then reactivate the partition. Note: The maximum number of logical memory blocks per partition is 128 kilobytes (K) under the new memory allocation scheme. BA300020 Function call to isolate a logical memory block failed under the standard memory allocation scheme. Do the following: Upgrade the firmware of the managed system to the latest level, if a newer level is available. Upgrade the operating system to a level that supports the new memory representation, or edit the profile to have fewer logical memory blocks than the 8K maximum. Reboot the partition. BA300030 Function call to make a logical memory block unusable failed under the standard memory allocation scheme. Do the following: Upgrade the firmware of the managed system to the latest level, if a newer level is available. Upgrade the operating system to a level that supports the new memory representation, or edit the profile to have fewer logical memory blocks than the 8K maximum. Reboot the partition. BA300040 The partition, which is running the traditional memory representation, exceeded the limit of 8192 logical memory blocks allowed by the standard memory allocation scheme. Do the following: Upgrade the operating system to one that supports the new memory representation, or edit the profile to have fewer than 8192 logical memory blocks. Reboot the partition. BA310010 The firmware could not obtain the SRC history FWFLASH BA310020 The firmware received an invalid SRC history FWFLASH BA310030 The firmware operation to write the MAC address to vital product data (VPD) failed FWFLASH ############################################################## SECTION 4: IBM: Using system reference codes: ############################################################## Using system reference codes System reference codes (SRCs) indicate a server hardware or software problem that can originate in hardware, in Licensed Internal Code, or in the operating system. A server component generates an error code when it detects a problem. An SRC identifies the component that detected the error code and describes the error condition. Use the SRC information to identify a list of possible failing items and to find information about any additional isolation procedures. SRC formats SRCs are strings of either six or eight alphanumeric characters. The characters in the SRC typically represent the reference code type and the unit reference code (URC): For SRCs displayed on the control panel, the first four characters designate the reference code type and the second four characters designate the URC. For SRCs displayed on software displays, characters 1 through 4 of word 1 designate the reference code type and characters 5 through 8 of word 1 designate the URC. Note: For partition firmware SRCs (AAxx, BAxx, and DAxx) and service processor SRCs (A1xx and B1xx), only the first two characters of the SRC indicate the necessary action. For partition firmware SRCs that begin with 2xxx, only the first character indicates the necessary action. In these cases, the term URC does not apply. A reference code that is 6 or 8 characters long and appears in either of the following formats (xxxxxx or xxxxxxxx) is an SRC, unless it fits one of the following conditions: An 8-character code that begins with a C (except CB) or D (except DA) is a progress code An 8-character code that begins with an H is a Hardware Management Console (HMC) error code or message A 6-character code that begins with a zero (0) and does not include a hyphen is an HMC error code A code that begins with a number sign character (#) represents an AIXr diagnostics message. Using the list of reference codes The list of system reference codes is organized in hexadecimal sequence, with numeric characters listed before alphabetic characters. Each entry in the list represents the first four characters (the reference code type) of the SRC. The entries link to more information, typically a table that lists the URCs that are associated with that reference code type. Unless specified otherwise on a particular SRC page, the SRC tables contain the following columns: The Reference Code column contains numbers that represent the unit reference code (URC). The Description/Action column offers a brief description of the failure that this SRC represents. It may also contain instructions for continuing the problem analysis. The Failing Item column represents functional areas of the system unit. When available, the failing function code links to the FRU that contains this function for each specific system unit. To use the list of system reference codes, complete the following steps: Click the item in the list of system reference codes that matches the reference code type that you want to find. Note: The SRC tables support only 8-character reference code formats. If the reference code provided contains only 4 or 6 characters, contact your next level of support for assistance. When the SRC table appears, select the appropriate URC from the first column of the table. The tables list URCs in hexadecimal sequence, with numeric characters listed before alphabetic characters. Perform the action indicated for the URC in the Description/Action column of the table. If the table entry does not indicate an action or if performing the action does not correct the problem, exchange the failing items or parts listed in the Failing Item column in the order that they are listed. Use the following instructions to exchange failing items: Note: Some failing items are required to be exchanged in groups until the problem is solved. Other failing items are flagged as mandatory exchange and must be exchanged before the service action is complete, even if the problem appears to have been repaired. For more information, see Block replacement of FRUs. Exchange the failing item listed first. If exchanging the first failing item does not correct the problem, reinstall the original item and exchange the next failing item listed. Continue to exchange and reinstall the failing items, one at a time, until the problem is corrected. If exchanging the failing items does not correct the problem, ask your next level of support for assistance. ############################################################## SECTION 5: GENERAL: UNIX ERROR CODES errno.h : ############################################################## Generic errormaps/links from the errno.h file: >>>> Errcodes, for example, Linux (generic): #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted system call */ #define EIO 5 /* I/O error */ #define ENXIO 6 /* No such device or address */ #define E2BIG 7 /* Arg list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file number */ #define ECHILD 10 /* No child processes */ #define EAGAIN 11 /* Try again */ #define ENOMEM 12 /* Out of memory */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #define ENOTBLK 15 /* Block device required */ #define EBUSY 16 /* Device or resource busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Cross-device link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define ENFILE 23 /* File table overflow */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Not a typewriter */ #define ETXTBSY 26 /* Text file busy */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ #define EDOM 33 /* Math argument out of domain of func */ #define ERANGE 34 /* Math result not representable */ #define EDEADLK 35 /* Resource deadlock would occur */ #define ENAMETOOLONG 36 /* File name too long */ #define ENOLCK 37 /* No record locks available */ #define ENOSYS 38 /* Function not implemented */ #define ENOTEMPTY 39 /* Directory not empty */ #define ELOOP 40 /* Too many symbolic links encountered */ #define EWOULDBLOCK EAGAIN /* Operation would block */ #define ENOMSG 42 /* No message of desired type */ #define EIDRM 43 /* Identifier removed */ #define ECHRNG 44 /* Channel number out of range */ #define EL2NSYNC 45 /* Level 2 not synchronized */ #define EL3HLT 46 /* Level 3 halted */ #define EL3RST 47 /* Level 3 reset */ #define ELNRNG 48 /* Link number out of range */ #define EUNATCH 49 /* Protocol driver not attached */ #define ENOCSI 50 /* No CSI structure available */ #define EL2HLT 51 /* Level 2 halted */ #define EBADE 52 /* Invalid exchange */ #define EBADR 53 /* Invalid request descriptor */ #define EXFULL 54 /* Exchange full */ #define ENOANO 55 /* No anode */ #define EBADRQC 56 /* Invalid request code */ #define EBADSLT 57 /* Invalid slot */ #define EDEADLOCK EDEADLK #define EBFONT 59 /* Bad font file format */ #define ENOSTR 60 /* Device not a stream */ #define ENODATA 61 /* No data available */ #define ETIME 62 /* Timer expired */ #define ENOSR 63 /* Out of streams resources */ #define ENONET 64 /* Machine is not on the network */ #define ENOPKG 65 /* Package not installed */ #define EREMOTE 66 /* Object is remote */ #define ENOLINK 67 /* Link has been severed */ #define EADV 68 /* Advertise error */ #define ESRMNT 69 /* Srmount error */ #define ECOMM 70 /* Communication error on send */ #define EPROTO 71 /* Protocol error */ #define EMULTIHOP 72 /* Multihop attempted */ #define EDOTDOT 73 /* RFS specific error */ #define EBADMSG 74 /* Not a data message */ #define EOVERFLOW 75 /* Value too large for defined data type */ #define ENOTUNIQ 76 /* Name not unique on network */ #define EBADFD 77 /* File descriptor in bad state */ #define EREMCHG 78 /* Remote address changed */ #define ELIBACC 79 /* Can not access a needed shared library */ #define ELIBBAD 80 /* Accessing a corrupted shared library */ #define ELIBSCN 81 /* .lib section in a.out corrupted */ #define ELIBMAX 82 /* Attempting to link in too many shared libraries */ #define ELIBEXEC 83 /* Cannot exec a shared library directly */ #define EILSEQ 84 /* Illegal byte sequence */ #define ERESTART 85 /* Interrupted system call should be restarted */ #define ESTRPIPE 86 /* Streams pipe error */ #define EUSERS 87 /* Too many users */ #define ENOTSOCK 88 /* Socket operation on non-socket */ #define EDESTADDRREQ 89 /* Destination address required */ #define EMSGSIZE 90 /* Message too long */ #define EPROTOTYPE 91 /* Protocol wrong type for socket */ #define ENOPROTOOPT 92 /* Protocol not available */ #define EPROTONOSUPPORT 93 /* Protocol not supported */ #define ESOCKTNOSUPPORT 94 /* Socket type not supported */ #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ #define EPFNOSUPPORT 96 /* Protocol family not supported */ #define EAFNOSUPPORT 97 /* Address family not supported by protocol */ #define EADDRINUSE 98 /* Address already in use */ #define EADDRNOTAVAIL 99 /* Cannot assign requested address */ #define ENETDOWN 100 /* Network is down */ #define ENETUNREACH 101 /* Network is unreachable */ #define ENETRESET 102 /* Network dropped connection because of reset */ #define ECONNABORTED 103 /* Software caused connection abort */ #define ECONNRESET 104 /* Connection reset by peer */ #define ENOBUFS 105 /* No buffer space available */ #define EISCONN 106 /* Transport endpoint is already connected */ #define ENOTCONN 107 /* Transport endpoint is not connected */ #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ #define ETOOMANYREFS 109 /* Too many references: cannot splice */ #define ETIMEDOUT 110 /* Connection timed out */ #define ECONNREFUSED 111 /* Connection refused */ #define EHOSTDOWN 112 /* Host is down */ #define EHOSTUNREACH 113 /* No route to host */ #define EALREADY 114 /* Operation already in progress */ #define EINPROGRESS 115 /* Operation now in progress */ #define ESTALE 116 /* Stale NFS file handle */ #define EUCLEAN 117 /* Structure needs cleaning */ #define ENOTNAM 118 /* Not a XENIX named type file */ #define ENAVAIL 119 /* No XENIX semaphores available */ #define EISNAM 120 /* Is a named type file */ #define EREMOTEIO 121 /* Remote I/O error */ #define EDQUOT 122 /* Quota exceeded */ #define ENOMEDIUM 123 /* No medium found */ #define EMEDIUMTYPE 124 /* Wrong medium type */ The list above should actually be enough, but we shall list the same for AIX: >>>> errcodes AIX: #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* interrupted system call */ #define EIO 5 /* I/O error */ #define ENXIO 6 /* No such device or address */ #define E2BIG 7 /* Arg list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file descriptor */ #define ECHILD 10 /* No child processes */ #define EAGAIN 11 /* Resource temporarily unavailable */ #define ENOMEM 12 /* Not enough space */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #define ENOTBLK 15 /* Block device required */ #define EBUSY 16 /* Resource busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Improper link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define ENFILE 23 /* Too many open files in system */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Inappropriate I/O control operation */ #define ETXTBSY 26 /* Text file busy */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Invalid seek */ #define EROFS 30 /* Read only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ #define EDOM 33 /* Domain error within math function */ #define ERANGE 34 /* Result too large */ #define ENOMSG 35 /* No message of desired type */ #define EIDRM 36 /* Identifier removed */ #define ECHRNG 37 /* Channel number out of range */ #define EL2NSYNC 38 /* Level 2 not synchronized */ #define EL3HLT 39 /* Level 3 halted */ #define EL3RST 40 /* Level 3 reset */ #define ELNRNG 41 /* Link number out of range */ #define EUNATCH 42 /* Protocol driver not attached */ #define ENOCSI 43 /* No CSI structure available */ #define EL2HLT 44 /* Level 2 halted */ #define EDEADLK 45 /* Resource deadlock avoided */ #define ENOTREADY 46 /* Device not ready */ #define EWRPROTECT 47 /* Write-protected media */ #define EFORMAT 48 /* Unformatted media */ #define ENOLCK 49 /* No locks available */ #define ENOCONNECT 50 /* no connection */ #define ESTALE 52 /* no filesystem */ #define EDIST 53 /* old, currently unused AIX errno*/ #define EINPROGRESS 55 /* Operation now in progress */ #define EALREADY 56 /* Operation already in progress */ #define ENOTSOCK 57 /* Socket operation on non-socket */ #define EDESTADDRREQ 58 /* Destination address required */ #define EDESTADDREQ EDESTADDRREQ /* Destination address required */ #define EMSGSIZE 59 /* Message too long */ #define EPROTOTYPE 60 /* Protocol wrong type for socket */ #define ENOPROTOOPT 61 /* Protocol not available */ #define EPROTONOSUPPORT 62 /* Protocol not supported */ #define ESOCKTNOSUPPORT 63 /* Socket type not supported */ #define EOPNOTSUPP 64 /* Operation not supported on socket */ #define EPFNOSUPPORT 65 /* Protocol family not supported */ #define EAFNOSUPPORT 66 /* Address family not supported by protocol family */ #define EADDRINUSE 67 /* Address already in use */ #define EADDRNOTAVAIL 68 /* Can't assign requested address */ #define ENETDOWN 69 /* Network is down */ #define ENETUNREACH 70 /* Network is unreachable */ #define ENETRESET 71 /* Network dropped connection on reset */ #define ECONNABORTED 72 /* Software caused connection abort */ #define ECONNRESET 73 /* Connection reset by peer */ #define ENOBUFS 74 /* No buffer space available */ #define EISCONN 75 /* Socket is already connected */ #define ENOTCONN 76 /* Socket is not connected */ #define ESHUTDOWN 77 /* Can't send after socket shutdown */ #define ETIMEDOUT 78 /* Connection timed out */ #define ECONNREFUSED 79 /* Connection refused */ #define EHOSTDOWN 80 /* Host is down */ #define EHOSTUNREACH 81 /* No route to host */ #define ERESTART 82 /* restart the system call */ #define EPROCLIM 83 /* Too many processes */ #define EUSERS 84 /* Too many users */ #define ELOOP 85 /* Too many levels of symbolic links */ #define ENAMETOOLONG 86 /* File name too long */ #define EDQUOT 88 /* Disc quota exceeded */ #define ECORRUPT 89 /* Invalid file system control data */ #define EREMOTE 93 /* Item is not local to host */ #define ENOSYS 109 /* Function not implemented POSIX */ #define EMEDIA 110 /* media surface error */ #define ESOFT 111 /* I/O completed, but needs relocation */ #define ENOATTR 112 /* no attribute found */ #define ESAD 113 /* security authentication denied */ #define ENOTRUST 114 /* not a trusted program */ #define ETOOMANYREFS 115 /* Too many references: can't splice */ #define EILSEQ 116 /* Invalid wide character */ #define ECANCELED 117 /* asynchronous i/o cancelled */ #define ENOSR 118 /* temp out of streams resources */ #define ETIME 119 /* I_STR ioctl timed out */ #define EBADMSG 120 /* wrong message type at stream head */ #define EPROTO 121 /* STREAMS protocol error */ #define ENODATA 122 /* no message ready at stream head */ #define ENOSTR 123 /* fd is not a stream */ #define ECLONEME ERESTART /* this is the way we clone a stream ... */ #define ENOTSUP 124 /* POSIX threads unsupported value */ #define EMULTIHOP 125 /* multihop is not allowed */ #define ENOLINK 126 /* the link has been severed */ #define EOVERFLOW 127 /* value too large to be stored in data type */ Base AIX error codes: ===================== Appendix A. Base Operating System Error Codes for Services That Require Path-Name Resolution The following errors apply to any service that requires path name resolution: EACCES Search permission is denied on a component of the path prefix. EFAULT The Path parameter points outside of the allocated address space of the process. EIO An I/O error occurred during the operation. ELOOP Too many symbolic links were encountered in translating the Path parameter. ENAMETOOLONG A component of a path name exceeded 255 characters and the process has the DisallowTruncation attribute (see the ulimit subroutine) or an entire path name exceeded 1023 characters. ENOENT A component of the path prefix does not exist. ENOENT A symbolic link was named, but the file to which it refers does not exist. ENOENT The path name is null. ENOTDIR A component of the path prefix is not a directory. ESTALE The root or current directory of the process is located in a virtual file system that is unmounted. albert@starboss:/usr/include $ cat errlog.h /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* bos53D src/bos/usr/ccs/lib/liberrlog/errlog.h 1.7 */ /* */ /* Licensed Materials - Property of IBM */ /* */ /* Restricted Materials of IBM */ /* */ /* (C) COPYRIGHT International Business Machines Corp. 2000,2005 */ /* All Rights Reserved */ /* */ /* US Government Users Restricted Rights - Use, duplication or */ /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* */ /* IBM_PROLOG_END_TAG */ #ifndef H_errlog #define H_errlog /* @(#)74 1.7 src/bos/usr/ccs/lib/liberrlog/errlog.h, cmderrlg, bos53D, d2005_09B1 2/24/05 15:34:58 */ /* * COMPONENT_NAME: CMDERRLG system error logging and reporting facility * * External definitions and declarations for liberrlog.a * */ #include #include typedef void *errlog_handle_t; /* * These magic numbers will indicate which version of errlog * entry is being returned. * All users of errlog_entry_t should use only LE_MAGIC. */ #define LE_MAGIC_41 0x0C3DF420 /* LE_MAGIC434_INTERUM is an interum 43T magic, before le_errdiag was added. */ #define LE_MAGIC434_INTERUM 0x0C3DF434 #define LE_MAGIC434 0x0C4DF434 #define LE_MAGIC52F 0x0C4DF52F #define LE_MAGIC53D 0x0C4DF53D #define LE_MAGIC LE_MAGIC53D /* current errlog_open magic # */ /* VALID_LE_MAGIC gives valid magic numbers for an error log record. */ #define VALID_LE_MAGIC(m) (((m) == LE_MAGIC_41) || \ ((m) == LE_MAGIC434_INTERUM) || ((m) == LE_MAGIC434)) /* VALID_LENTRY_MAGIC gives valid magic numbers for errlog_open(). */ #define VALID_LENTRY_MAGIC(m) (((m) == LE_MAGIC) || ((m) == LE_MAGIC434) ||\ ((m) == LE_MAGIC52F)) /* * Optional duplicate information. */ struct errdup { unsigned int ed_dupcount; time32_t ed_time1; time32_t ed_time2; }; /* Lengths of the various fields in the structure. */ #define LE_LABEL_MAX 20 #define LE_MACHINE_ID_MAX 32 #define LE_NODE_ID_MAX 32 #define LE_CLASS_MAX 2 #define LE_TYPE_MAX 5 #define LE_RESOURCE_MAX 16 #define LE_RCLASS_MAX 16 #define LE_RTYPE_MAX 16 #define LE_VPD_MAX 512 #define LE_IN_MAX 256 #define LE_CONN_MAX 20 #define LE_DETAIL_MAX ERR_REC_MAX #define LE_SYMPTOM_MAX 312 #define LE_ERRDUP_MAX sizeof(struct errdup) /* The data structure that contains an errlog entry */ typedef struct errlog_entry { unsigned int el_magic; unsigned int el_sequence; char el_label[LE_LABEL_MAX]; unsigned int el_timestamp; unsigned int el_crcid; unsigned int el_errdiag; char el_machineid[LE_MACHINE_ID_MAX]; char el_nodeid[LE_NODE_ID_MAX]; char el_class[LE_CLASS_MAX]; char el_type[LE_TYPE_MAX]; char el_resource[LE_RESOURCE_MAX]; char el_rclass[LE_RCLASS_MAX]; char el_rtype[LE_RTYPE_MAX]; char el_vpd_ibm[LE_VPD_MAX]; char el_vpd_user[LE_VPD_MAX]; char el_in[LE_IN_MAX]; char el_connwhere[LE_CONN_MAX]; unsigned short el_flags; unsigned short el_detail_length; char el_detail_data[LE_DETAIL_MAX]; unsigned int el_symptom_length; char el_symptom_data[LE_SYMPTOM_MAX]; struct errdup el_errdup; } errlog_entry_t; /* Values for the el_flags element. */ #define LE_FLAG_ERR64 0x01 #define LE_FLAG_ERRDUP 0x100 /* * This structure is used to pass search criteria to errlog_find_first. * To use it an operation is put in em_op. If it is a leaf operation, * the field in errlog_entry_t to apply the op to is put in em_field and * the value to compare against is put in em_strvalue or em_intvalue. * Boolean values are put in em_intvalue. * * To connect operations, a unary or binary operator is put in em_op. * The operation(s) to apply the operator to are put in em_left and, * if it's a binary operator, em_right. */ typedef struct errlog_match { unsigned int em_op; union { struct errlog_match *emu_left; unsigned int emu_field; } emu1; union { struct errlog_match *emu_right; unsigned int emu_intvalue; unsigned char *emu_strvalue; } emu2; } errlog_match_t; #define em_left emu1.emu_left #define em_field emu1.emu_field #define em_right emu2.emu_right #define em_intvalue emu2.emu_intvalue #define em_strvalue emu2.emu_strvalue /* Operators to use in the match structures for the find functions */ #define LE_OP_EQUAL 0x01 #define LE_OP_NE 0x02 #define LE_OP_SUBSTR 0x03 #define LE_OP_LT 0x04 #define LE_OP_LE 0x05 #define LE_OP_GT 0x06 #define LE_OP_GE 0x07 #define LE_OP_LEAF 0x100 #define LE_OP_NOT 0x101 #define LE_OP_AND 0x201 #define LE_OP_OR 0x202 #define LE_OP_XOR 0x203 /* Flags to combine with the field id to indicate the data type of the field */ #define LE_TYPE 0xff00 #define LE_TYPE_INT 0x0100 #define LE_TYPE_STRING 0x0200 #define LE_TYPE_BOOLEAN 0x0300 /* Flags to indicate which field to match in the find functions. */ #define LE_MATCH_FIELD 0xff #define LE_MATCH_SEQUENCE (0x01|LE_TYPE_INT) #define LE_MATCH_LABEL (0x02|LE_TYPE_STRING) #define LE_MATCH_TIMESTAMP (0x03|LE_TYPE_INT) #define LE_MATCH_CRCID (0x04|LE_TYPE_INT) #define LE_MATCH_MACHINEID (0x05|LE_TYPE_STRING) #define LE_MATCH_NODEID (0x06|LE_TYPE_STRING) #define LE_MATCH_CLASS (0x07|LE_TYPE_STRING) #define LE_MATCH_TYPE (0x08|LE_TYPE_STRING) #define LE_MATCH_RESOURCE (0x09|LE_TYPE_STRING) #define LE_MATCH_RCLASS (0x0a|LE_TYPE_STRING) #define LE_MATCH_RTYPE (0x0b|LE_TYPE_STRING) #define LE_MATCH_VPD_IBM (0x0c|LE_TYPE_STRING) #define LE_MATCH_VPD_USER (0x0d|LE_TYPE_STRING) #define LE_MATCH_IN (0x0e|LE_TYPE_STRING) #define LE_MATCH_CONNWHERE (0x0f|LE_TYPE_STRING) #define LE_MATCH_FLAG_ERR64 (0x10|LE_TYPE_BOOLEAN) #define LE_MATCH_FLAG_ERRDUP (0x11|LE_TYPE_BOOLEAN) #define LE_MATCH_DETAIL_DATA (0x12|LE_TYPE_STRING) #define LE_MATCH_SYMPTOM_DATA (0x13|LE_TYPE_STRING) #define LE_MATCH_ERRDIAG (0x14|LE_TYPE_INT) /* * Define the directions find can walk through the errlog file. */ #define LE_FORWARD 0x01 #define LE_REVERSE 0x02 /* * Define the errors that the functions can return. */ #define LE_ERR_INVARG 0x01 /* Invalid input argument */ #define LE_ERR_NOFILE 0x02 /* The errlog file can't be opened */ #define LE_ERR_INVFILE 0x03 /* The errlog file isn't valid */ #define LE_ERR_NOMEM 0x04 /* We're out of memory */ #define LE_ERR_NOWRITE 0x05 /* Can't write entry back */ #define LE_ERR_IO 0x06 /* IO error in the errlog file */ #define LE_ERR_DONE 0x07 /* The find function reached the end */ /* * These are the functions that comprise the API */ extern int errlog_open(char *path, int mode, unsigned int magic, errlog_handle_t *handle); extern int errlog_close(errlog_handle_t handle); extern int errlog_find_first(errlog_handle_t handle, errlog_match_t *filter, errlog_entry_t *result); extern int errlog_find_next(errlog_handle_t handle, errlog_entry_t *result); extern int errlog_find_sequence(errlog_handle_t handle, int sequence, errlog_entry_t *result); extern int errlog_set_direction(errlog_handle_t handle, int direction); extern int errlog_write(errlog_handle_t handle, errlog_entry_t *data); #endif albert@starboss:/usr/include $ albert@starboss:/usr/include/sys $ cat errno.h /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* bos530 src/bos/kernel/sys/errno.h 1.27.1.23 */ /* */ /* Licensed Materials - Property of IBM */ /* */ /* (C) COPYRIGHT International Business Machines Corp. 1985,1995 */ /* All Rights Reserved */ /* */ /* US Government Users Restricted Rights - Use, duplication or */ /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* */ /* IBM_PROLOG_END_TAG */ /* @(#)49 1.27.1.23 src/bos/kernel/sys/errno.h, incstd, bos530 1/25/01 16:31:11 */ /* * COMPONENT_NAME: (INCSTD) Standard Include Files * * FUNCTIONS: * * ORIGINS: 27,71 * * (C) COPYRIGHT International Business Machines Corp. 1985, 1996 * All Rights Reserved * Licensed Materials - Property of IBM * * US Government Users Restricted Rights - Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* * (c) Copyright 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. * ALL RIGHTS RESERVED */ #ifndef _H_ERRNO #define _H_ERRNO #include /* * Error codes * * The ANSI, POSIX, and XOPEN standards require that certain values be * in errno.h. The standards allow additional macro definitions, * beginning with an E and an uppercase letter. * */ #ifdef _ANSI_C_SOURCE #ifndef _KERNEL #if defined(_THREAD_SAFE) || defined(_THREAD_SAFE_ERRNO) /* * Per thread errno is provided by the threads provider. Both the extern int * and the per thread value must be maintained by the threads library. */ extern int *_Errno( void ); #define errno (*_Errno()) #else extern int errno; #endif /* _THREAD_SAFE || _THREAD_SAFE_ERRNO */ #endif /* _KERNEL */ #ifdef _ALL_SOURCE extern char *sys_errlist[]; extern int sys_nerr; #endif /* _ALL_SOURCE */ #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* interrupted system call */ #define EIO 5 /* I/O error */ #define ENXIO 6 /* No such device or address */ #define E2BIG 7 /* Arg list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file descriptor */ #define ECHILD 10 /* No child processes */ #define EAGAIN 11 /* Resource temporarily unavailable */ #define ENOMEM 12 /* Not enough space */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #define ENOTBLK 15 /* Block device required */ #define EBUSY 16 /* Resource busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Improper link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define ENFILE 23 /* Too many open files in system */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Inappropriate I/O control operation */ #define ETXTBSY 26 /* Text file busy */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Invalid seek */ #define EROFS 30 /* Read only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ #define EDOM 33 /* Domain error within math function */ #define ERANGE 34 /* Result too large */ #define ENOMSG 35 /* No message of desired type */ #define EIDRM 36 /* Identifier removed */ #define ECHRNG 37 /* Channel number out of range */ #define EL2NSYNC 38 /* Level 2 not synchronized */ #define EL3HLT 39 /* Level 3 halted */ #define EL3RST 40 /* Level 3 reset */ #define ELNRNG 41 /* Link number out of range */ #define EUNATCH 42 /* Protocol driver not attached */ #define ENOCSI 43 /* No CSI structure available */ #define EL2HLT 44 /* Level 2 halted */ #define EDEADLK 45 /* Resource deadlock avoided */ #define ENOTREADY 46 /* Device not ready */ #define EWRPROTECT 47 /* Write-protected media */ #define EFORMAT 48 /* Unformatted media */ #define ENOLCK 49 /* No locks available */ #define ENOCONNECT 50 /* no connection */ #define ESTALE 52 /* no filesystem */ #define EDIST 53 /* old, currently unused AIX errno*/ /* non-blocking and interrupt i/o */ /* * AIX returns EAGAIN where 4.3BSD used EWOULDBLOCK; * but, the standards insist on unique errno values for each errno. * A unique value is reserved for users that want to code case * statements for systems that return either EAGAIN or EWOULDBLOCK. */ #if _XOPEN_SOURCE_EXTENDED==1 #define EWOULDBLOCK EAGAIN /* Operation would block */ #else /* _XOPEN_SOURCE_EXTENDED */ #define EWOULDBLOCK 54 #endif /* _XOPEN_SOURCE_EXTENDED */ #define EINPROGRESS 55 /* Operation now in progress */ #define EALREADY 56 /* Operation already in progress */ /* ipc/network software */ /* argument errors */ #define ENOTSOCK 57 /* Socket operation on non-socket */ #define EDESTADDRREQ 58 /* Destination address required */ #define EDESTADDREQ EDESTADDRREQ /* Destination address required */ #define EMSGSIZE 59 /* Message too long */ #define EPROTOTYPE 60 /* Protocol wrong type for socket */ #define ENOPROTOOPT 61 /* Protocol not available */ #define EPROTONOSUPPORT 62 /* Protocol not supported */ #define ESOCKTNOSUPPORT 63 /* Socket type not supported */ #define EOPNOTSUPP 64 /* Operation not supported on socket */ #define EPFNOSUPPORT 65 /* Protocol family not supported */ #define EAFNOSUPPORT 66 /* Address family not supported by protocol family */ #define EADDRINUSE 67 /* Address already in use */ #define EADDRNOTAVAIL 68 /* Can't assign requested address */ /* operational errors */ #define ENETDOWN 69 /* Network is down */ #define ENETUNREACH 70 /* Network is unreachable */ #define ENETRESET 71 /* Network dropped connection on reset */ #define ECONNABORTED 72 /* Software caused connection abort */ #define ECONNRESET 73 /* Connection reset by peer */ #define ENOBUFS 74 /* No buffer space available */ #define EISCONN 75 /* Socket is already connected */ #define ENOTCONN 76 /* Socket is not connected */ #define ESHUTDOWN 77 /* Can't send after socket shutdown */ #define ETIMEDOUT 78 /* Connection timed out */ #define ECONNREFUSED 79 /* Connection refused */ #define EHOSTDOWN 80 /* Host is down */ #define EHOSTUNREACH 81 /* No route to host */ /* ERESTART is used to determine if the system call is restartable */ #define ERESTART 82 /* restart the system call */ /* quotas and limits */ #define EPROCLIM 83 /* Too many processes */ #define EUSERS 84 /* Too many users */ #define ELOOP 85 /* Too many levels of symbolic links */ #define ENAMETOOLONG 86 /* File name too long */ /* * AIX returns EEXIST where 4.3BSD used ENOTEMPTY; * but, the standards insist on unique errno values for each errno. * A unique value is reserved for users that want to code case * statements for systems that return either EEXIST or ENOTEMPTY. */ #if defined(_ALL_SOURCE) && !defined(_LINUX_SOURCE_COMPAT) #define ENOTEMPTY EEXIST /* Directory not empty */ #else /* not _ALL_SOURCE */ #define ENOTEMPTY 87 #endif /* _ALL_SOURCE */ /* disk quotas */ #define EDQUOT 88 /* Disc quota exceeded */ #define ECORRUPT 89 /* Invalid file system control data */ /* errnos 90-92 reserved for future use compatible with AIX PS/2 */ /* network file system */ #define EREMOTE 93 /* Item is not local to host */ /* errnos 94-108 reserved for future use compatible with AIX PS/2 */ #define ENOSYS 109 /* Function not implemented POSIX */ /* disk device driver */ #define EMEDIA 110 /* media surface error */ #define ESOFT 111 /* I/O completed, but needs relocation */ /* security */ #define ENOATTR 112 /* no attribute found */ #define ESAD 113 /* security authentication denied */ #define ENOTRUST 114 /* not a trusted program */ /* BSD 4.3 RENO */ #define ETOOMANYREFS 115 /* Too many references: can't splice */ #define EILSEQ 116 /* Invalid wide character */ #define ECANCELED 117 /* asynchronous i/o cancelled */ /* SVR4 STREAMS */ #define ENOSR 118 /* temp out of streams resources */ #define ETIME 119 /* I_STR ioctl timed out */ #define EBADMSG 120 /* wrong message type at stream head */ #define EPROTO 121 /* STREAMS protocol error */ #define ENODATA 122 /* no message ready at stream head */ #define ENOSTR 123 /* fd is not a stream */ #define ECLONEME ERESTART /* this is the way we clone a stream ... */ #define ENOTSUP 124 /* POSIX threads unsupported value */ #define EMULTIHOP 125 /* multihop is not allowed */ #define ENOLINK 126 /* the link has been severed */ #define EOVERFLOW 127 /* value too large to be stored in data type */ #endif /* _ANSI_C_SOURCE */ #endif /* _H_ERRNO */ albert@starboss:/usr/include/sys $ albert@starboss:/usr/include $ file sysexits.h sysexits.h: ascii text albert@starboss:/usr/include $ cat sysexits.h /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* bos530 src/bos/usr/include/sysexits.h 1.6 */ /* */ /* Licensed Materials - Property of IBM */ /* */ /* (C) COPYRIGHT International Business Machines Corp. 1989,1991 */ /* All Rights Reserved */ /* */ /* US Government Users Restricted Rights - Use, duplication or */ /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* */ /* IBM_PROLOG_END_TAG */ /* @(#)30 1.6 src/bos/usr/include/sysexits.h, incstd, bos530 6/16/90 00:14:57 */ #ifndef _H_SYSEXITS #define _H_SYSEXITS /* * COMPONENT_NAME: (INCSTD) Standard Include Files * * FUNCTIONS: * * ORIGINS: 27 * * (C) COPYRIGHT International Business Machines Corp. 1989 * All Rights Reserved * Licensed Materials - Property of IBM * * US Government Users Restricted Rights - Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* ** SYSEXITS.H -- Exit status codes for system programs. ** ** This include file attempts to categorize possible error ** exit statuses for system programs, notably delivermail ** and the Berkeley network. ** ** Error numbers begin at EX__BASE to reduce the possibility of ** clashing with other exit statuses that random programs may ** already return. The meaning of the codes is approximately ** as follows: ** ** EX_USAGE -- The command was used incorrectly, e.g., with ** the wrong number of arguments, a bad flag, a bad ** syntax in a parameter, or whatever. ** EX_DATAERR -- The input data was incorrect in some way. ** This should only be used for user's data & not ** system files. ** EX_NOINPUT -- An input file (not a system file) did not ** exist or was not readable. This could also include ** errors like "No message" to a mailer (if it cared ** to catch it). ** EX_NOUSER -- The user specified did not exist. This might ** be used for mail addresses or remote logins. ** EX_NOHOST -- The host specified did not exist. This is used ** in mail addresses or network requests. ** EX_UNAVAILABLE -- A service is unavailable. This can occur ** if a support program or file does not exist. This ** can also be used as a catchall message when something ** you wanted to do doesn't work, but you don't know ** why. ** EX_SOFTWARE -- An internal software error has been detected. ** This should be limited to non-operating system related ** errors as possible. ** EX_OSERR -- An operating system error has been detected. ** This is intended to be used for such things as "cannot ** fork", "cannot create pipe", or the like. It includes ** things like getuid returning a user that does not ** exist in the passwd file. ** EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp, ** etc.) does not exist, cannot be opened, or has some ** sort of error (e.g., syntax error). ** EX_CANTCREAT -- A (user specified) output file cannot be ** created. ** EX_IOERR -- An error occurred while doing I/O on some file. ** EX_TEMPFAIL -- temporary failure, indicating something that ** is not really an error. In sendmail, this means ** that a mailer (e.g.) could not create a connection, ** and the request should be reattempted later. ** EX_PROTOCOL -- the remote system returned something that ** was "not possible" during a protocol exchange. ** EX_NOPERM -- You did not have sufficient permission to ** perform the operation. This is not intended for ** file system problems, which should use NOINPUT or ** CANTCREAT, but rather for higher level permissions. ** For example, kre uses this to restrict who students ** can send mail to. ** */ # define EX_OK 0 /* successful termination */ # define EX__BASE 64 /* base value for error messages */ # define EX_USAGE 64 /* command line usage error */ # define EX_DATAERR 65 /* data format error */ # define EX_NOINPUT 66 /* cannot open input */ # define EX_NOUSER 67 /* addressee unknown */ # define EX_NOHOST 68 /* host name unknown */ # define EX_UNAVAILABLE 69 /* service unavailable */ # define EX_SOFTWARE 70 /* internal software error */ # define EX_OSERR 71 /* system error (e.g., can't fork) */ # define EX_OSFILE 72 /* critical OS file missing */ # define EX_CANTCREAT 73 /* can't create (user) output file */ # define EX_IOERR 74 /* input/output error */ # define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ # define EX_PROTOCOL 76 /* remote error in protocol */ # define EX_NOPERM 77 /* permission denied */ # define EX_CONFIG 78 /* configuration error */ # define EX_DB 79 /* database access error */ #endif /* _H_SYSEXITS */ >>>> For Solaris: 1 EPERM Not superuser Typically this error indicates an attempt to modify a file in some way forbidden except to its owner or the super-user. It is also returned for attempts by ordinary users to do things allowed only to the super-user. 2 ENOENT No such file or directory A file name is specified and the file should exist but doesn't, or one of the directories in a path name does not exist. 3 ESRCH No such process, LWP, or thread No process can be found in the system that corresponds to the specified PID, LWPID_t, or thread_t. 4 EINTR Interrupted system call An asynchronous signal (such as interrupt or quit), which the user has elected to catch, occurred during a system service routine. If execution is resumed after processing the signal, it will appear as if the interrupted routine call returned this error condition. In a multi-threaded application, EINTR may be returned whenever another thread or LWP calls fork(2). 5 EIO I/O error Some physical I/O error has occurred. This error may in some cases occur on a call following the one to which it actually applies. 6 ENXIO No such device or address I/O on a special file refers to a subdevice which does not exist, or exists beyond the limit of the device. It may also occur when, for example, a tape drive is not on-line or no disk pack is loaded on a drive. 7 E2BIG Arg list too long An argument list longer than ARG_MAX bytes is presented to a member of the exec family of routines. The argument list limit is the sum of the size of the argument list plus the size of the environment's exported shell variables. 8 ENOEXEC Exec format error A request is made to execute a file which, although it has the appropriate permissions, does not start with a valid format (see a.out(4)). 9 EBADF Bad file number Either a file descriptor refers to no open file, or a read (respectively, write) request is made to a file that is open only for writing (respectively, reading). 10 ECHILD No child processes A wait routine was executed by a process that had no existing or unwaited-for child processes. 11 EAGAIN No more processes, or no more LWPs For example, the fork routine failed because the system's process table is full or the user is not allowed to create any more processes, or a system call failed because of insufficient memory or swap space. 12 ENOMEM Not enough space During execution of an exec, brk, or sbrk routine, a program asks for more space than the system is able to supply. This is not a temporary condition; the maximum size is a system parameter. On some architectures, the error may also occur if the arrangement of text, data, and stack segments requires too many segmentation registers, or if there is not enough swap space during the fork routine. If this error occurs on a resource associated with Remote File Sharing (RFS), it indicates a memory depletion which may be temporary, dependent on system activity at the time the call was invoked. 13 EACCES Permission denied An attempt was made to access a file in a way forbidden by the protection system. 14 EFAULT Bad address The system encountered a hardware fault in attempting to use an argument of a routine. For example, errno potentially may be set to EFAULT any time a routine that takes a pointer argument is passed an invalid address, if the system can detect the condition. Because systems will differ in their ability to reliably detect a bad address, on some implementations passing a bad address to a routine will result in undefined behavior. 15 ENOTBLK Block device required A non-block device or file was mentioned where a block device was required (for example, in a call to the mount routine). 16 EBUSY Device busy An attempt was made to mount a device that was already mounted or an attempt was made to unmount a device on which there is an active file (open file, current directory, mounted-on file, active text segment). It will also occur if an attempt is made to enable accounting when it is already enabled. The device or resource is currently unavailable. EBUSY is also used by mutexes, semaphores, condition variables, and r/w locks, to indicate that a lock is held. And, EBUSY is also used by the processor control function P_ONLINE. 17 EEXIST File exists An existing file was mentioned in an inappropriate context (for example, call to the link routine). 18 EXDEV Cross-device link A hard link to a file on another device was attempted. 19 ENODEV No such device An attempt was made to apply an inappropriate operation to a device (for example, read a write-only device). 20 ENOTDIR Not a directory A non-directory was specified where a directory is required (for example, in a path prefix or as an argument to the chdir routine). 21 EISDIR Is a directory An attempt was made to write on a directory. 22 EINVAL Invalid argument An invalid argument was specified (for example, unmounting a non-mounted device), mentioning an undefined signal in a call to the signal or kill routine. 23 ENFILE File table overflow The system file table is full (that is, SYS_OPEN files are open, and temporarily no more files can be opened). 24 EMFILE Too many open files No process may have more than OPEN_MAX file descriptors open at a time. 25 ENOTTY Inappropriate ioctl for device A call was made to the ioctl routine specifying a file that is not a special character device. 26 ETXTBSY Text file busy (obsolete) An attempt was made to execute a pure-procedure program that is currently open for writing. Also an attempt to open for writing or to remove a pure-procedure program that is being executed. (This message is obsolete.) 27 EFBIG File too large The size of the file exceeded the limit specified by resource RLIMIT_FSIZE; the file size exceeds the maximum supported by the file system; or the file size exceeds the offset maximum of the file descriptor. See the File Descriptor subsection of the DEFINITIONS section below. 28 ENOSPC No space left on device While writing an ordinary file or creating a directory entry, there is no free space left on the device. In the fcntl routine, the setting or removing of record locks on a file cannot be accomplished because there are no more record entries left on the system. 29 ESPIPE Illegal seek A call to the lseek routine was issued to a pipe. 30 EROFS Read-only file system An attempt to modify a file or directory was made on a device mounted read-only. 31 EMLINK Too many links An attempt to make more than the maximum number of links, LINK_MAX, to a file. 32 EPIPE Broken pipe A write on a pipe for which there is no process to read the data. This condition normally generates a signal; the error is returned if the signal is ignored. 33 EDOM Math argument out of domain of func The argument of a function in the math package (3M) is out of the domain of the function. 34 ERANGE Math result not representable The value of a function in the math package (3M) is not representable within machine precision. 35 ENOMSG No message of desired type An attempt was made to receive a message of a type that does not exist on the specified message queue (see msgrcv(2)). 36 EIDRM Identifier removed This error is returned to processes that resume execution due to the removal of an identifier from the file system's name space (see msgctl(2), semctl(2), and shmctl(2)). 37 ECHRNG Channel number out of range 38 EL2NSYNC Level 2 not synchronized 39 EL3HLT Level 3 halted 40 EL3RST Level 3 reset 41 ELNRNG Link number out of range 42 EUNATCH Protocol driver not attached 43 ENOCSI No CSI structure available 44 EL2HLT Level 2 halted 45 EDEADLK Deadlock condition A deadlock situation was detected and avoided. This error pertains to file and record locking, and also applies to mutexes, semaphores, condition variables, and r/w locks. 46 ENOLCK No record locks available There are no more locks available. The system lock table is full (see fcntl(2)). 47 ECANCELED Operation canceled The associated asynchronous operation was canceled before completion. 48 ENOTSUP Not supported This version of the system does not support this feature. Future versions of the system may provide support. 49 EDQUOT Disc quota exceeded A write() to an ordinary file, the creation of a directory or symbolic link, or the creation of a directory entry failed because the user's quota of disk blocks was exhausted, or the allocation of an inode for a newly created file failed because the user's quota of inodes was exhausted. 58-59 Reserved 60 ENOSTR Device not a stream A putmsg or getmsg system call was attempted on a file descriptor that is not a STREAMS device. 61 ENODATA No data available 62 ETIME Timer expired The timer set for a STREAMS ioctl call has expired. The cause of this error is device-specific and could indicate either a hardware or software failure, or perhaps a timeout value that is too short for the specific operation. The status of the ioctl operation is indeterminate. This is also returned in the case of _lwp_cond_timedwait() or cond_timedwait(). 63 ENOSR Out of stream resources During a STREAMS open, either no STREAMS queues or no STREAMS head data structures were available. This is a temporary condition; one may recover from it if other processes release resources. 64 ENONET Machine is not on the network This error is Remote File Sharing (RFS) specific. It occurs when users try to advertise, unadvertise, mount, or unmount remote resources while the machine has not done the proper startup to connect to the network. 65 ENOPKG Package not installed This error occurs when users attempt to use a system call from a package which has not been installed. 66 EREMOTE Object is remote This error is RFS-specific. It occurs when users try to advertise a resource which is not on the local machine, or try to mount/unmount a device (or pathname) that is on a remote machine. 67 ENOLINK Link has been severed This error is RFS-specific. It occurs when the link (virtual circuit) connecting to a remote machine is gone. 68 EADV Advertise error This error is RFS-specific. It occurs when users try to advertise a resource which has been advertised already, or try to stop RFS while there are resources still advertised, or try to force unmount a resource when it is still advertised. 69 ESRMNT Srmount error This error is RFS-specific. It occurs when an attempt is made to stop RFS while resources are still mounted by remote machines, or when a resource is readvertised with a client list that does not include a remote machine that currently has the resource mounted. 70 ECOMM Communication error on send This error is RFS-specific. It occurs when the current process is waiting for a message from a remote machine, and the virtual circuit fails. 71 EPROTO Protocol error Some protocol error occurred. This error is device-specific, but is generally not related to a hardware failure. 74 EMULTIHOP Multihop attempted This error is RFS-specific. It occurs when users try to access remote resources which are not directly accessible. 76 EDOTDOT Error 76 This error is RFS-specific. A way for the server to tell the client that a process has transferred back from mount point. 77 EBADMSG Not a data message During a read, getmsg, or ioctl I_RECVFD system call to a STREAMS device, something has come to the head of the queue that can not be processed. That something depends on the system call: read: control information or passed file descriptor. getmsg: passed file descriptor. ioctl: control or data information. 78 ENAMETOOLONG File name too long The length of the path argument exceeds PATH_MAX, or the length of a path component exceeds NAME_MAX while _POSIX_NO_TRUNC is in effect; see limits(4). 79 EOVERFLOW Value too large for defined data type. 80 ENOTUNIQ Name not unique on network Given log name not unique. 81 EBADFD File descriptor in bad state Either a file descriptor refers to no open file or a read request was made to a file that is open only for writing. 82 EREMCHG Remote address changed 83 ELIBACC Cannot access a needed shared library Trying to exec an a.out that requires a static shared library and the static shared library does not exist or the user does not have permission to use it. 84 ELIBBAD Accessing a corrupted shared library Trying to exec an a.out that requires a static shared library (to be linked in) and exec could not load the static shared library. The static shared library is probably corrupted. 85 ELIBSCN .lib section in a.out corrupted Trying to exec an a.out that requires a static shared library (to be linked in) and there was erroneous data in the .lib section of the a.out. The .lib section tells exec what static shared libraries are needed. The a.out is probably corrupted. 86 ELIBMAX Attempting to link in more shared libraries than system limit Trying to exec an a.out that requires more static shared libraries than is allowed on the current configuration of the system. See NFS AdministrationGuide. 87 ELIBEXEC Cannot exec a shared library directly Attempting to exec a shared library directly. 88 EILSEQ Error 88 Illegal byte sequence. Handle multiple characters as a single character. 89 ENOSYS Operation not applicable 90 ELOOP Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS 91 ESTART Restartable system call Interrupted system call should be restarted. 92 ESTRPIPE If pipe/FIFO, don't sleep in stream head Streams pipe error (not externally visible). 93 ENOTEMPTY Directory not empty 94 EUSERS Too many users 95 ENOTSOCK Socket operation on non-socket 96 EDESTADDRREQ Destination address required A required address was omitted from an operation on a transport endpoint. Destination address required. 97 EMSGSIZE Message too long A message sent on a transport provider was larger than the internal message buffer or some other network limit. 98 EPROTOTYPE Protocol wrong type for socket A protocol was specified that does not support the semantics of the socket type requested. 99 ENOPROTOOPT Protocol not available A bad option or level was specified when getting or setting options for a protocol. 120 EPROTONOSUPPORT Protocol not supported The protocol has not been configured into the system or no implementation for it exists. 121 ESOCKTNOSUPPORT Socket type not supported The support for the socket type has not been configured into the system or no implementation for it exists. 122 EOPNOTSUPP Operation not supported on transport endpoint For example, trying to accept a connection on a datagram transport endpoint. 123 EPFNOSUPPORT Protocol family not supported The protocol family has not been configured into the system or no implementation for it exists. Used for the Internet protocols. 124 EAFNOSUPPORT Address family not supported by protocol family An address incompatible with the requested protocol was used. 125 EADDRINUSE Address already in use User attempted to use an address already in use, and the protocol does not allow this. 126 EADDRNOTAVAIL Cannot assign requested address Results from an attempt to create a transport endpoint with an address not on the current machine. 127 ENETDOWN Network is down Operation encountered a dead network. 128 ENETUNREACH Network is unreachable Operation was attempted to an unreachable network. 129 ENETRESET Network dropped connection because of reset The host you were connected to crashed and rebooted. 130 ECONNABORTED Software caused connection abort A connection abort was caused internal to your host machine. 131 ECONNRESET Connection reset by peer A connection was forcibly closed by a peer. This normally results from a loss of the connection on the remote host due to a timeout or a reboot. 132 ENOBUFS No buffer space available An operation on a transport endpoint or pipe was not performed because the system lacked sufficient buffer space or because a queue was full. 133 EISCONN Transport endpoint is already connected A connect request was made on an already connected transport endpoint; or, a sendto or sendmsg request on a connected transport endpoint specified a destination when already connected. 134 ENOTCONN Transport endpoint is not connected A request to send or receive data was disallowed because the transport endpoint is not connected and (when sending a datagram) no address was supplied. 143 ESHUTDOWN Cannot send after transport endpoint shutdown A request to send data was disallowed because the transport endpoint has already been shut down. 144 ETOOMANYREFS Too many references: cannot splice 145 ETIMEDOUT Connection timed out A connect or send request failed because the connected party did not properly respond after a period of time; or a write or fsync request failed because a file is on an NFS file system mounted with the __s__o__f__t option. 146 ECONNREFUSED Connection refused No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the remote host. 147 EHOSTDOWN Host is down A transport provider operation failed because the destination host was down. 148 EHOSTUNREACH No route to host A transport provider operation was attempted to an unreachable host. 149 EALREADY Operation already in progress An operation was attempted on a non-blocking object that already had an operation in progress. 150 EINPROGRESS Operation now in progress An operation that takes a long time to complete (such as a connect) was attempted on a non-blocking object. 151 ESTALE Stale NFS file handle ############################################################## SECTION 6: SOLARIS (and GENERIC) Errors: ############################################################## Section is devided in PARTS 1,2,3 >>>> PART 1 <<<< ================ A command window has exited because its child exited. ===================================================== The argument to a cmdtool(1) or a shelltool(1) window looks like it is supposed to be a command, but the system cannot find the command. To run this command inside a cmdtool or a shelltool, make sure the command is spelled correctly and is in your search path (if necessary, use a full path name). If you intended this argument as an option setting, use a minus sign (-) at the beginning of the option. Both the cmdtool and the shelltool are OpenWindows terminal emulators. admintool: Received communication service error 4 ================================================= AdminTool could not start a display method because a remote procedure call timed out, so it can't send the request. This error results when admintool tries to access the NIS or NIS+ tables when networking is not enabled. Verify the system network status with ifconfig -a to make sure the system is connected to the network. Make sure the ethernet cable is connected and the system is configured to run NIS or NIS+. answerbook: XView error: NULL pointer passed to xv_set ====================================================== The AnswerBook navigator window comes up, but the document viewer window does not. This message appears on the console, and the message "Could not start new viewer" appears in the navigator window. This situation indicates that you have an unknown client or a problem with the network naming service. Run the ypmatch(1) or nismatch(1) command o determine if the client hostname is in the hosts map. If it isn't, add it to to NIS hosts map on the NIS master server. Then make sure the /etc/hosts file on the client contains an IP address and entry for that hostname followed by loghost (reboot if you changed the /etc/hosts file). Check that the ypmatch or nismatch client hosts command returns the same IP host address as in the /etc/hosts file. Finally, quit all existing AnswerBooks and restart. For more information on the NIS hosts map, see the section on the default search criteria in the NIS+ and FNS Administration Guide. If you are using the AnswerBook, "NIS hosts map" is a good search string. Arg list too long ================= The system could not handle the number of arguments given to a command or program when it combined those arguments with the environment's exported shell variables. The argument list limit is the size of the argument list plus the size of the environment's exported shell variables. The easiest solution is to reduce the size of the parent process environment by unsetting extraneous environment variables. (See the man page for the shell you're using to find out how to list and change your environment variables.) Then run the program again. An argument list longer than ARG_MAX bytes was presented to a member of the exec() family of system calls. The symbolic name for this error is E2BIG, errno=7. Argument out of domain ====================== This is a programming error or a data input error. Ask the program's author to fix this condition,or supply data in a different format. This indicates an attempt to evaluate a mathematical programming function at a point where its value is not defined. The argument of a programming function in the math package (3M) is out of the domain of the function. This could happen when taking the square root, power, or log of a negative number, when computing a power to a non-integer, or when passing an out-of-range argument to a hyperbolic programming function. To help pinpoint a program's math errors, use the matherr(3M) facility. The symbolic name for this error is EDOM, errno=33. Arguments too long ================== This C shell error message indicates that there are too many arguments after a command. For example, this can happen by invoking rm * in a huge directory. The C shell cannot handle more than 1706 arguments. Temporarily start a Bourne shell with sh and run the command again. The Bourne shell dynamically allocates command line arguments. Return to your original shell by typing exit. assertion failed: variable, file variable, line N ================================================= A condition in the program that was never expected to happen has happened. Contact the vendor or author of the program to ask why it failed. If you have the source code for the program, you can look at the file and line number where the assertion failed. This might give you an idea of how to run the program differently. This message results from a diagnostic macro called assert() that a programmer inserted into the specified line of a source file. The expression that evaluated untrue precedes the file name and line number. automountd[N]: No network locking on variable: contact admin to install server change ======================================= See "WARNING: No network locking on variable: contact admin to install server" message for details. If the server is not changed, data loss is possible in applications that depend on locking. automountd[N]: server variable not responding ============================================= This automounter message indicates that the system tried to mount a filesystem from an NFS server that is either down or extremely slow to respond. In some cases this message indicates that the network link to the NFS server is broken, although that condition produces other error messages as well. If you are the system administrator responsible for the non- responding NFS server, check it out to see whether the machine needs repair or rebooting. Encourage your user community to report such problems quickly but only once. When the NFS server is back in operation, the automounter will be able to access the requested file system. For more information on NFS failures, seethe section on NFS troubleshooting in the NFS Administration Guide. If you are using the AnswerBook, a good search string is "NFS Service." automount[N]: variable: Not a directory ======================================= The file specified after the first colon is not a valid mount point because it is not a directory. Ensure that the mount point is a directory, and not a regular file or a symbolic link. Bad address =========== The system encountered a hardware fault in attempting to access a parameter of a programming function. Check if the bad address resulted from supplying the wrong device or option to a command. If that is not the problem, contact the vendor or author of the program for an update. This error could occur any time a function that takes a pointer argument is passed an invalid address. Because processors differ in their ability to detect bad addresses, on some architectures passing bad addresses can result in undefined behaviors. The symbolic name for this error is EFAULT,errno=14. BAD/DUP FILE I=i OWNER=o MODE=m SIZE=s MIME ==== CLEAR? While checking anode link counts during phase 4, fsck(1M) found a file (or directory) that either does not exist or exists somewhere else. To clear the anode of its reference to this file or directory, answer yes. With the -p (preen) option, fsck automatically clears bad or duplicate file references, so answering yes to this question seldom causes a problem. Bad file number =============== Generally this is a program error, not a usage error. Contact the vendor or author of the program for an update. Either a file descriptor refers to no open file, or a read (or write) request is made to a file that is open only for writing (or reading). The symbolic name for this error is EBADF, errno=9. N BAD I=N ========= Upon detecting an out-of-range block, fsck(1M) prints the bad block number and its containing inode (after I=). In fsck phases 2 and 4, you will decide whether ornot to clear these bad blocks. Before committing to repair with fsck, you could determine which file contains this inode by passing the inode number to the ncheck(1M) command: by passing the inode number to the ncheck(1M) command: # ncheck -iinum file system For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume I. bad module/chip at: variable ============================ This message from the memory management system often appears with parity errors, and indicates a bad memory module or chip at the position listed. Data loss is possible if the problem occurs other than at boot time. Replace the memory module or chip at the indicated position. Refer to the vendor's hardware manual for help finding this location. BAD SUPER BLOCK: variable ========================= This message from fsck(1M) indicates that a filesystem's super- block is damaged beyond repair and must be replaced. At boot time (with the -p option) this message is prefaced by the file system's device name. After this message comes the actual damage recognized (see Action). Unfortunately fsck does not print the number of the damaged super-block. The most common cause of this error is overlapping disk partitions. Donot immediately rerun fsck as suggested by the lines that display after the error message. First make sure that you have a recent backup of the file system involved; if not, try to back up the file system now using ufsdump(1M). Then run the format(1M) command, select the disk involved, and print out the partition information. # format : N > partition > print Note whether the overlap occurs at the beginning or end of the file system involved. Then run newfs(1M) with the -N option to print out the file system parameters, including the location of backup super-blocks. # newfs -N /dev/dsk/device Select a super-block from a non-overlapping area of the disk, but note that in most cases you have only one chance to select the proper replacement super-block, which fsck soon propagates to all the cylinders. If you select the wrong replacement super-block, data corruption will probably occur, and you will have to restore from backup tapes. After you select a new super-block, provide fsck with the new master super-block number: # fsck -o b=NNNN /dev/dsk/device Specific reasons for a damaged super-block include: a wrong magic number, out of range NCG (number of cylinder groups) or CPG (cylinders per group), the wrong number of cylinders, a preposterously large super-block size, and trashed values in super-block. These reasons are generally not meaningful because a corrupt super-block is usually extremely corrupt. For more information on bad super blocks, see the sections on restoring bad super blocks in the System Administration Guide, Volume I. If you are using the AnswerBook, "superblock" is a good search string. BAD TRAP ======== A bad trap can indicate faulty hardware or a mismatch between hardware and its configuration information. Data loss is possible if the problem occurs other than at boot time. If you recently installed new hardware, verify that the software was correctly configured. Check the kernel trace back displayed on the console to see which device generated the trap. If the configuration files are correct, you will probably have to replace the device. In some cases, the bad trap message indicates a bad or down-rev CPU. A hardware processor trap occurred, and the kernel trap handler was unable to restore system state. This is a fatal error that usually precedes a panic, after which the system performs a sync, dump, and reboot. The following conditions can cause a bad trap: a system text or data access fault, a system data alignment error, or certain kinds of user software traps. bad trap = N ============ See the message "BAD TRAP" for details. /bin/sh: variable: too big ========================== This Bourne shell message indicates a classic "no memory" error. While trying to load the program specified after thefirstcolon, the shell noticed that the system ran out of virtual memory (swap space). See the message "Not enough space" for information on reconfiguring your system to add more swap space. Block device required ===================== A raw (character special) device was specified where a block device was required, such as during a call to the mount(1M) command. To see which block devices are available, use ls -l to look in /devices. Then specify a block device instead of a character device. Block device modes start with a b, whereas raw character device modes start with a c. The symbolic name for this error is ENOTBLK, errno=15. Boot device: /iommu/sbus/variable/variable/sd@3,0 ================================================= This message alwaysappears at the beginning of rebooting. If there is a problem, the system hangs, and no other messages appear. This condition is caused by conflicting SCSI targets for the boot device, which is almost always target 3. The boot device is usually the machine's internal disk drive, target 3. Make sure that external and secondary disk drives are targeted to 1, 2, or 0, and do not conflict with each other. Also make sure that tape drives are targeted to 4 or 5, and CD drives to 6, avoiding any conflict with each other or with the disk drives. You can set a device's target number using pushbutton switches or a dial on the back near the SCSI cables. If the targeting of the internal disk drive is in question, check it by powering off the machine, removing all external drives, turning the power on, and running the probe-scsi-all or probe-scsi command from the PROM monitor. Broadcast Message from root (pts/N) on server [date] ==================================================== This message from the wall(1M) command gets transmitted to all users logged into a system. You could see it during a rlogin or telnet session, or on terminals connected to a timesharing system. Carefully read the broadcast message. Often this broadcast is followed by a shutdown warning. See the message "The system will be shut down in N minutes" for details about system shutdown. For more information on bringing down the system, see the section on halting the system in the System Administration Guide, Volume I. If you are using the AnswerBook, "halting the system" is a good search string. Broken pipe =========== This condition is often normal, and the message is merely informational (as when piping many lines to the head program). The condition occurs when a write on a pipe does not find a reading process. This usually generates a signal to the executing program, but this message displays when the program ignores the signal. Check the process at the end of the pipe to see why it exited. The symbolic name for this error is EPIPE, errno=32. Bus Error ========= A process has received a signal indicating that it attempted to perform I/O to a device that is restricted or that does not exist. This message is usually accompanied by a core dump, except on read-only filesystems. Use a debugger to examine the core file and determine what program fault or system problem led to the bus error. If possible, check the program's output files for data corruption that might have occurred before the bus error. Bus errors can result from either programming error or device corruption on your system. Some common causes of bus errors are: invalid file descriptors, unreasonable I/O requests, bad memory allocation, misaligned data structures, compiler bugs, and corrupt boot blocks. Cannot allocate color map entry for "variable" ============================================= This message from libXt (X Intrinsics library) indicates that the system color map was full even before the color name specified in quotes was requested. Some applications can continue after this message. Other applications, such as Workspace Properties Color, fail to come up when the color map is full. Exit the programs that make heavy use of the color map, then restart the failed application and try again. Can't create public message device (Device busy) ================================================ This message comes from the lp print scheduler, indicating that it is either extremely busy or hung. If print jobs are coming out of the printer in question, wait until they are finished and then resubmit this print job. If you see this message again, the lp system is probably hung. See the message "lp hang" for a procedure to clear the queue. If lp is unable to create a device for printer messages, the message FIFO could be already in use, or locked by another print job. For more information on the print scheduler, see the section on administrating printers in the System Administration Guide Volume II. Can't invoke /etc/init, error N =============================== This message can appear while a system is booting, indicating that the init program is missing or corrupted. Note that /etc/init is a symbolic link to /sbin/init. Boot the miniroot so you can replace init. Halt the machine by typing Stop-A or by pressing the reset button. Reboot single-user from CDROM, the net, or diskette. For example, type boot cdrom -s at the ok prompt to boot from CDROM. After the system comes up and gives you a # prompt, mount the device corresponding to the original / partition somewhere, with a command similar to the mount command below. Then copy the init program from the miniroot to the original / partition, and reboot the system. # mount /dev/dsk/c0t3d0s0 /mnt # cp /sbin/init /mnt/sbin/init # reboot If this doesn't work, other files might be corrupted, and you might need to reinstall the entire system. The error number is 2 if /sbin/init is missing, or 8 if /sbin/init has an incorrect executable format. This is usually followed by a "panic:icode" message. The system tries to reboot itself, but goes into a loop, because rebooting is impossible without init. For more information on booting the system, see the section on halting and booting the system in the System Administration Guide, Volume I. can't synchronize with hayes ============================ This message sometimes appears when using a modem that the system regards as a "Hayes" type modem, which includes most modems manufactured today. The message can be caused by incorrect switch settings, by poor cable connections, or by not turning the modem on. Check that the modem is on and that the cables between the modem and your system are securely connected. Check the internal and external modem switch settings. Turn the modem off and then on again, if necessary. cd: Too many arguments ====================== The C shell's cd(1) command takes only one argument. Either more than one directory was specified, or a directory name containing a space was specified. Directory names with spaces are easy to create with File Manager. Use only one directory name. To change to a directory whose name contains spaces, enclose the directory name in double (") or single (') quotes, or use File Manager. Channel number out of range =========================== The system has run out of stream devices. This error results when a stream head attempts to open a minor device that does not exist or that is currently in use. Check that the stream device in question exists and was created with an appropriate number of minor devices. Make sure that the hardware corresponds to this configuration. If the stream device configuration is correct, try again later when more system resources might be available. The symbolic name for this error is ECHRNG, errno=37. chmod: ERROR: invalid mode ========================== This message from the chmod(1) command indicates a problem in the first non-option argument. If you are specifying a numeric file mode, you can provide any number of digits (although only the final one to four are considered), but all digits must be between 0 and 7. If you are specifying a symbolic file mode, use the syntax provided in the chmod usage message to avoid the "invalid mode" error message: Usage: chmod [ugoa][+-=][rwxlstugo] file ... Note that some combinations of symbolic keyletters produce no error message but fail to have any effect. The first group, [ugoa], is truly optional. The second group, [+-=], is mandatory for chmod to have an effect. The third group,[rwxlstugo], is also mandatory for effect, and can be used in combination when that combination does not conflict. Command not found ================= The C shell could not find the program you gave as a command. Check the form and spelling of the command line. If that looks correct, echo $path to see if the user's search path is correct. When communications are garbled, it is possible to unset a search path to such an extent that only built-in shell commands are available. Here is a command to reset a basic search path: % set path = (/usr/bin /usr/ccs/bin /usr/openwin/bin .) If the search path looks correct, check the directory contents along the search path to see if programs are missing or if directories are not mounted. For more information about the C shell, see csh(1). Connection closed. ================== This message can appear when using rlogin(1) to another system if the remote host cannot create a process for this user, if the user takes too long to type the correct password, if the user interrupts the network connection, or if the remote host goes down. Data loss is possible if files were modified and not saved before the connection closed. Just try again. If the other system has gone down, wait for it to reboot first. Connection closed by foreign host. ================================== When a user telnets to another system, this message can appear if the user takes too long to type the correct password, if the remote host cannot create a login for this user,or if the remote host goes down or terminates the connection. Data loss is possible if files were modified and not saved before the connection closed. Just try again. If the other system has gone down, wait for it to reboot first. [Connection closed. Exiting] ============================ After using the talk(1) command to communicate with another user, the other person enters an interrupt (usually Control-c), and this message appears on your screen. Sending an interrupt like this is the usual way of exiting the talk program. The talk session is over and you can return to your work. Connection refused ================== No connection could be made because the target machine actively refused it. This happens either when trying to connect to an inactive service or when a service process is not present at the requested address. Activate the service on the target machine, or start it up again if it has disappeared. If for security reasons you do not intend to provide this service, inform the user community, possibly suggesting an alternative. The symbolic name for this error is ECONNREFUSED, errno=146. Connection timed out ==================== This occurs either when the destination host is down or when problems in the network cause lost transmission. First check the operation of the host system, for example by using ping(1M) and ftp (1), then repair or reboot as necessary. If that doesn't solve the problem, check the network cabling and connections. No connection was established in a specified time. A connect or send request failed because the destination host did not properly respond after a reasonable interval. (The timeout period is dependent on the communication protocol.) The symbolic name for this error is ETIMEDOUT, errno=145. console login: ^J^M^Q^K^K^P =========================== This usually occurs because OpenWindows exited abnormally, leaving the system's keyboard in the wrong mode. The characters that appear when someone attempts to login are garbage transliterations of what someone types. Find another machine and remote login to this system, then run this command: $ /usr/openwin/bin/kbd_mode -a This puts the console back into ASCII mode. Note that kbd_mode is not a windows program, it just fixes the console mode. The usual reason for this problem occurring is an automated script run from cron that clears out the /tmp directory every so often. Ensure that any such scripts do not remove the /tmp/.X11- pipe or /tmp/.X11-unix directories, or any files therein. core dumped =========== A core file contains an image of memory at the point of software failure, and is used by programmers to find the reason for the failure. To see which program produced a core file, run either the file(1) command or the adb (1) command. The following examples show the output of the file and adb commands on a core file from the dtmail program. $ file core core: ELF 32-bit MSB core file SPARC Version 1, from `dtmail' $ adb core core file = core -- program `dtmail' SIGSEGV 11: segmentation violation ^D (use Control-d to quit the program) Ask the vendor or author of this program for a debugged version. Some signals, such as SIGQUIT, SIGBUS, and SIGSEGV, produce a core dump. See the signal(5) man page for a complete list. If youhave the source code for the program, you can try compiling it with cc -g, and debugging it yourself using dbx or a similar debugger. The where directive of dbx provides a stack trace. On mixed networks, it can be difficult to discern which machine architecture produced a particular core dump, since adb on one type of system generally cannot read a core file from another type of system, and will produce an "unrecognized file" message. Run adb on various machine architectures until you find the right one. The term "core" is archaic-- ferrite core memory was supplanted by silicon RAM in the 1970s, although spaceships still employ core memory for its imperviousness to radiation. For information on saving and viewing crash information see the System Administration Guide, Volume II. If you are using the AnswerBook, "system crash" is a good search string. Could not initialize tooltalk (tt_open): TT_ERR_NOMP ==================================================== Various desktop tools display or print this message when the ttsession(1) process is not available. The TookTalk service generally tries to restart ttsession if it is not running. So this error indicates that the ToolTalk service is either not installed or is not installed correctly. Verify that the ttsession command exists in /usr/openwin/bin or /usr/dt/bin. If this command is not present, ToolTalk is not installed correctly. The packages constituting ToolTalk are the runtime SUNWtltk, developer support SUNWtltkd, and themanual pages SUNWtltkm. CDE ToolTalk packages have the same names with ".2" appended. The full TT_ERR_NOMP message string reads as follows: "No ttsession is running, probably because tt_open() has not been called yet. If this is returned from tt_open() it means ttsession could not be started, which generally means ToolTalk is not installed on the system." Could not start new viewer ========================== This message appears in the AnswerBook navigator window, along with an XView error messageon the console. See the message "answerbook: XView error: NULL pointer passed to xv_set" for details. cpio: Bad magic number/header. ============================== A cpio(1) archive has either become corrupted or was written out with an incompatible version of cpio. Use the -k option to cpio to skip I/O errors and corrupted file headers. This might permit you to extract other files from the cpio archive. To extract files with corrupted headers, try editing the archive with a binary editor such as emacs. Each cpio file header contains a filename as a string. For more information on magic numbers, see magic(4). Cross-device link ================= An attempt was made to make a hard link to a file on another device, such as on another file system. Establish a symbolic link using ln -s instead. Symbolic links are permitted across file system boundaries. The symbolic name for this error is EXDEV, errno=18. data access exception ===================== This message can result from running an old version of the operating system that does not support new hardware, or by running an operating system that is not configured for new hardware. It can also result from incorrectly installed DSIMMs or from a disk problem. Upgrade your operating system to a version that supports the new hardware or machine architecture. For example, upgrading a SPARCstation 2 (with sun4c kernel architecture) to a SPARCstation 20 (with sun4m kernel architecture) requires an operating system upgrade or reconfiguration. For more information onupgrades, see the section describing system and device configuration in the Solaris 1.x to Solaris 2.x Transition Guide. Data fault ========== This is a kind of bad trap that usually causes a system panic. When this message appears after a bad trap message, a system text or data access fault probably occurred. In the absence of a bad trap message, this message might indicate a user text or data access fault. Data loss is possible if the problem occurs other than at boot time. Make sure the machine can reboot, then check the log file /var/adm/messages for hints about what went wrong.  See the message "BAD TRAP" for more information. Deadlock situation detected/avoided =================================== A programming deadlock situation was detected and avoided. If the system had not detected and avoided a deadlock, a piece of software would have hung. Run the program again. The deadlock might not reoccur. This error usually relates to file and record locking, but can also apply to mutexes, semaphores, condition variables, and read/write locks. The symbolic name for this error is EDEADLK, errno=45. See the section on deadlock handling in the System Interface Guide. See the section on avoiding deadlock in the Multithreaded Programming Guide. Device busy =========== An attempt was made to mount a device that was already mounted or to unmount a device containing an active file (such as an open file, a current directory, a mount point, or a running program). This message also occurs when trying to enable accounting that is already enabled. To unmount a device containing active processes, close all the files under that mount point, quit any programs started from there, and change directories out of that hierarchy. Then try to unmount again. Mutexes, semaphores, condition variables, and read/write locks set this error condition to indicate that a lock is held. The symbolic name for this error is EBUSY, errno=16. /dev/rdsk/variable: CAN'T CHECK FILE SYSTEM. ============================================ The system cannot automatically clean (preen) this file system because it appears to be set up incorrectly or is having hard disk problems. This message asks that you run fsck(1M) manually, since data corruption might already have occurred. Run fsck to clean the file system in question. See the message "/dev/rdsk/N: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY" for proper procedures. /dev/rdsk/variable: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. ================================================================ At boot time the /etc/rcS script runs the fsck(1M) command to check the integrity of file systems marked "fsck" in /etc/vfstab. If fsck cannot repair a file system automatically, it interrupts the boot procedure and produces this message. When fsck gets into this state, it cannot repair a file system without losing one or more files, so it wants to defer this responsibility to you, the administrator. Data corruption has probably already occurred. First run sack -n on the file system, to see how many and what type of problems exist. Then run fsck again to repair the file system. If you have a recent backup of the file system, you can generally answer "y" to all the fsck questions. It's a good idea to keep a record of all problematic files and inode numbers for later reference. To run fsck yourself, specify options as recommended by the boot script. For example: # fsck /dev/rdsk/c0t4d0s0 Usually the files lost during fsck repair are these that were created just before a crash or power outage, and they cannot be recovered. If you lose important files, you can recover them from backup tapes. If you don't have a backup, ask an expert to run fsck for you. For more information on file checking, see the section on checking file system integrity in the System Administration Guide, Volume I. Directory not empty =================== The directory operation that was attempted, such as directory removal with rmdir, can be performed only on an empty directory. To remove the directory, first remove all the files that it contains. A quick way to remove a non-empty directory hierarchy is with the rm -r command. The symbolic name for this error is ENOTEMPTY, errno=93. Disc quota exceeded =================== The user'sdisk limit has been exceeded on a user filesystem, usually because a file was just created or enlarged beyond the limit. This almost always refers to a magnetic disk, and not to an optical disc. Any data created after this condition occurs will be lost. The user can delete files to bring disk usage under the limit, or the server administrator can use the edquota(1M) command to increase the user's disk limit. The symbolic name for this error is EDQUOT, errno=49. dumptm: Cannot open `/dev/rmt/variable': Device busy ==================================================== During file system backup, the dump program cannot open the tape drive because some other process is holding it open. Find the process that has the tape drive open, and either kill(1) the process or wait for it to finish. # ps -ef | grep /dev/rmt # kill -9 processID DUP/BAD I=i OWNER=o MODE=m SIZE=s MTIME=t FILE=f REMOVE? ========================================================= During phase 1, fsck(1M) found duplicate blocks or bad blocks associated with the file or directory specified after FILE= whose inode number appears after I= (with other information). To remove this file or directory, answer yes. If you end up removing more than a few files in this manner, data loss will result, so it might be preferable to restore the filesystem from backup tapes. For more information on checking filesystems, see the section on checking filesystem integrity in the System Administration Guide, Volume I. N DUP I=N ========= Upon detecting a block that is already claimed by another inode, fsck(1M) prints the duplicate block number and its containing inode (after I=). In fsck phases 2 and 4, you will decide whether or not to clear these bad blocks. Before committing to repair with fsck, you could determine which file contains this inode by passing the inode number to the ncheck(1M) command: # ncheck -iinum filesystem For more information, see the chapter on checking filesystem integrity in the System Administration Guide,Volume I. error: DPS has not initialized or server connection failed ========================================================== This message appears when trying to run AnswerBook with a generic X11 window server or on a generic X terminal. Running AnswerBook requires Display PostScript (DPS), or a NeWS server, or the Adobe DPS NS remote display software. In addition, a complete LaserWriterII Type-1 font set (including Palatino) should be installed on the X server. To find out if your X server has DPS, run xdpyinfo(1) to verify the presence of an "Adobe- DPS-Extension" line. X servers without this line don't know about DPS. ERROR: missing file arg (cm3) ============================= An attempt was madd to run some sccs(1) operation that requires a filename, such as create, edit, delget, or prt. Supply the appropriate filename after the SCCS operation. ERROR [SCCS/s.variable]: `SCCS/p.variable' nonexistent (ut4) ============================================================ An attempt was made to sccs edit or sccs get a file that is not yet under SCCS control. Run sccs create on that file to place it under SCCS control. ERROR [SCCS/s.variable]: writable `variable' exists (ge4) ========================================================= An attempt was made to sccs edit a file that is writable, probably because it is already checked out. Run sccs info to see who has the file checked out. If it is you, go ahead and edit it. If it is somebody else, ask that personto check in the file. esp0: data transfer overrun =========================== When a user tries to mount a CDROM on a third-party CD drive, mount(1M) fails with the above error, followed by the "sr0: SCSI transport failed" message. The CD drive probably comes from a vendor unknown to the system. Third-party CD drives generally have an 8192 block size, as opposed to the 512 block size on supported Sun drives. Check with the vendor to see if any special configuration is possible to allow the drive to operate on a Sun workstation. Event not found =============== This C shell message indicates that a user tried to repeat a command from the history list, but that command or number does not exist in the list. Run the C shell history command to display recent events in the history list. If a user often tries to run commands that have disappeared from the history list, make the list longer by setting history to a higher value. For more information about the C shell, see csh(1). EXCESSIVE BAD BLKSI=N CONTINUE? ================================== During phase 1, fsck(1M) found more than 10 bad (out-of-range) blocks associated with the specified inode number. With this many bad blocks, it might be preferable to restore the filesystem from backup tapes. For more information on bad blocks, see the section on checking filesystem integrity in the System Administration Guide, Volume I. If you are using the AnswerBook, "bad blocks" is a good search string. EXCESSIVE DUP BLKS I=N CONTINUE? ================================== During phase 1, fsck(1M) found more than 10 duplicate (previously claimed) blocks associated with the specified inode number. With this many duplicate blocks, it might be preferable to restore the filesystem from backup tapes. For more informationon blocks, see the section on checking filesystem integrity in the System Administration Guide, Volume I. If you are using the AnswerBook, "bad blocks" is a good search string. Exec format error ================= This often happens when trying to runsoftware compiled for different systems or architectures, such as when executing Solaris 2.x programs on a SunOS 4.1.x system, or when trying to execute SPARC-specific programs on an x86 machine. On a Solaris 2.x system, it can also occur if the BinaryCompatibility Package was not installed. Make sure that the software matches the architecture and system you're using. The file(1) command can help you determine the target architecture. If you're using SunOS 4.1.x softwareon a Solaris 2.x system, make sure that the Binary Compatibility Package is installed. You can check for it using this command: $ pkginfo | grep SUNWbcp A request was made to execute a file that, although it has the appropriate permissions, does not start with a valid format. The symbolic name for this error is ENOEXEC, errno=8. See the a.out(4) man page for a description of executable files. fd0: unformatted diskette or no diskette in the drive ===================================================== This message appears on the system console to indicate that the floppy driver fd(7) could not read the label on a diskette. Usually this is either because a new diskette has not yet been formatted, or a formatted diskette has become corrupted. This message often appears along with "read failed" and "bad format" messages after volcheck(1) is run. If you are certain that the diskette contains no data, run fdformat -d to format the diskette in DOS format. (You can also format a diskette in UFS format if you like, although then it is not transportable to most other systems.) When the diskette is formatted, you can write on it, if it was not corrupted beyond repair. File exists =========== The name of an existing file was mentioned in an inappropriate context. For example,it is not allowed to establish a link to an existing file, or to overwrite an existing file when the csh(1) noclobber option is set. Look at the names of files in the directory, then try again with a different name or after renaming or removing the existing file. The symbolic name for this error is EEXIST, errno=17. File locking deadlock ===================== This is a programming problem, in some cases unavoidable. All a user can do is restart the program and hope deadlock does not reoccur. Inthe file locking subsystem, two processes tried to modify some lock at the same time. In the multithreading subsystem, two threads became deadlocked and could not continue. When a program using the threads library encounters this error, it should restart the deadlocked threads. The symbolic name for this error is EDEADLOCK, errno=56. filemgr: mknod: Permission denied ================================= File Manager issues this message and fails to come up whenever the /tmp/.removable directory is owned by another user and is not 1777 mode. This can happen, for example, when multiple users share a workstation. Have the original owner change the mode ((chmod(1)) of this file back to 1777, its default creation mode. Rebooting the workstation also resolves this problem. This is a known problem that was fixed in Solaris 2.4. File name too long ================== The specified file name has too many characters. If a file name or path name component is too long, devise a shorter name. If the totalpath name is longer than PATH_MAX characters, first change to an intermediate directory, then specify a shorter path name. Newly-created data will be lost unless written to another file with a shorter name. In a UFS or NFS-mounted UFS filesystem, the length of a path name component exceeds MAXNAMLEN (255) characters, or the total length of the path name exceeds PATH_MAX (1024) characters. In a System V filesystem, the length of a path name component exceeds NAME_MAX (14) characters while no-truncation mode is in effect. These values are defined in the /usr/include/limits.h(4) file. The symbolic name for this error is ENAMETOOLONG, errno=78. FILE SYSTEM STATE IN SUPERBLOCK IS WRONG; FIX? ============================================== The fsck(1M) command has just checked a filesystem, and has determined that the filesystem is clean. The filesystem's superblock, however, still thinks the filesystem is "dirty" in some way. If you believe that the filesystem is adequately repaired, answer yes to mark the filesystem as clean. Different "dirty" filesystem types are listed in /usr/include/sys/fs/ufs_fs.h, and include FSACTIVE, FSBAD, FSFIX, FSLOG, and FSSUSPEND. For more information on superblocks, see the section onchecking filesystem integrity in the System Administration Guide, Volume I. If you are using the AnswerBook, "bad superblock" is a good search string. File table overflow =================== The kernel file table is full because too many files are open on the system. Temporarily, no more files can be opened. New data created under this condition will probably be lost. Simply waiting often gives the system time to close files. However, if this message occurs often, reconfigure the kernel to allow more open files. To increasethe size of the file table in Solaris 2.x, increase the value of maxusers in the /etc/system file. The default maxusers value is the amount of main memory in MB, minus 2. The symbolic name for this error is ENFILE, errno=23. File too large ============== The file size exceeded the limit specified by ulimit(1), or the file size exceeds the maximum supported by the file system. New data created under this condition will probably be lost. In the C shell, use the limit command to see or set the default file size. In the Bourne or Korn shells, use the ulimit -a command. Even when the shells claim that the file size is unlimited, in fact the system limit is FCHR_MAX (usually 1 gigabyte). The symbolic name for this error is EFBIG, errno=27. FREE BLK COUNT(S) WRONG IN SUPERBLK SALVAGE? ============================================= During phase 5, fsck(1M) detected that the actual number of free blocks in the filesystem did not match the superblock's free block count.The df(1M) command accesses this free block count when measuring filesystem capacity. Generally you can answer yes to this question without harming the filesystem. For more information on superblocks, see the section on checking filesystem integrity in the System Administration Guide, Volume I. If you are using the AnswerBook, "bad superblock" is a good search string. fsck: Can't open /dev/dsk/variable ================================== The fsck(1M) command cannot open the disk device, because although a similar filesystem exists, the partition specified does not. Run the mount(1M) or the format(1M) command to see what filesystems are configured on the machine. Then run fsck again on an existing partition. fsck: Can't stat /dev/dsk/variable ================================== The fsck(1M) command cannot open the disk device, because the specified filesystem does not exist. Run the mount(1M) or the format(1M) command to see what filesystems are configured on the machine. Then run fsck again on an existing filesystem. giving up ========= This message appears in the SCSI log to indicate that a read or write operation has been retried until it timed out. With SCSI disk the timeout period is usually 30 seconds; with tape the period is usually 20 attempts. Timeout periods are generally coded into the drivers. Check that all SCSI devices are connected and powered on. Make sure that SCSI target numbers are correct and not in conflict. Verify that all cables are no longer than six meters, total, and that all SCSI connections are properly terminated. The scsi_log(9F) routine usually displays messages on the system console and in the /var/adm/messages file. Run the dmesg(1M) command to see the most recent message buffer. Graphics Adapterdevice /dev/fb is of unknown type ================================================== The /dev/fb driver is either missing or corrupted. See "InitOutput: Error loading module for /dev/fb" for details. group.org_dir: NIS+ servers unreachable ======================================= This is the second of three messages that an NIS+ client prints when it cannot locate an NIS+ server on the network. See the message "hosts.org_dir: NIS+ servers unreachable" for details. /home/variable: No such file ordirectory ========================================= An attempt was made to change to a user's home directory, but either that user does not exist or the user's fileserver has not shared (exported) that filesystem. To check on the existence of a particular user, run the ypmatch(1) or nismatch(1) command, specifying the user name and then the passwd map. To export filesystems from the remote fileserver, become superuser on that system and run the share(1M) command with the appropriate options. If that system is sharing (exporting) filesystems for the first time, also invoke /etc/init.d/nfs.server start to begin NFS service. For more information on sharing filesystems, see the share_nfs(1M) man page. Host is down ============ A transport connection failed because the destination host was down. For example, mail delivery was attempted over several days, but the destination machine was not available during any of these attempts. Report this error to the system administrator for the host. If you are the person responsible for this system, check to see if the machine needs repair or rebooting. This error results from status information delivered by the underlying communication interface. If there is no known connection to the host, a different message usually results. See "No route to host" for details. The symbolic name for this error is EHOSTDOWN, errno=147. host name configuration error ============================= This is an old sendmail message, which replaced "I refuse to talk tomyself" and is now replaced by the "Local configuration error" message. See the message "554 variable... Local configuration error" for details. hosts.org_dir: NIS+ servers unreachable ======================================= This is the third of three messages that an NIS+ client prints when it cannot locate an NIS+ server on the network. If other NIS+ clients are behaving normally, check the Ethernet cabling on the workstation showing this message. On SPARC machines, disconnected network cablingalso produces a series of "no carrier" messages. On x86 machines, the NIS+ messages might be your only indication that network cabling is disconnected. If many NIS+ clients on the network are giving this message, go to the NIS+ server in question and reboot or repair it, as necessary. When the server machine is back in operation, NIS+ clients will give an "NIS server for domain OK" message. I can't read your attachments. What mailer are you using? ========================================================= The SunView mailtool andpre-3.3 OpenWindows mailtool produce this message when they cannot cope with an attachment. The attachment is probably in MIME (Multipurpose Internet Mail Extensions) format, using base64 encoding. To read a mail message containing MIME attachments, use mailtool(1) from Solaris 2.3 or later. If you are running an earlier version of Solaris, rlogin(1) to a later version of Solaris, set the DISPLAY environment variable back to the first system, and run mailtool remotely. If those options prove impossible, ask the originator to send the message again using mailtool, or using the CDE dtmail compose File->SendAs- >SunMailTool option. Standard MIME attachments with base64 encoding, for example, produce this message and fail to display in older mailtools. Look into using metamail, available on the Internet, which allows you to send and receive MIME attachments. ie0: Ethernet jammed ==================== This message can appear on SPARCservers or x86 machines with an Intel 82586 Ethernet chip. It indicates that 16 successive transmission attempts failed, causing the driver to give up on the current packet. If this error occurs sporadically or at busy times, it probably means that the network is saturated. Wait for network traffic to clear. If bottlenecks arise frequently, think about reconfiguring the network or adding subnets. Another possible cause of this message is a noise source somewhere in the network, such as a loose transceiver connection. Use snoop(1M)or a similar program to isolate the problem area, then check and tighten network connectors as necessary. ie0: no carrier =============== This message can appear on SPARCservers or x86 machines with an Intel 82586 Ethernet chip. It indicates that thechip has lost input to its carrierdetect pin while trying to transmit a packet, causing the packet to be dropped. Check that the Ethernet connector is not loose or disconnected. Other possible causes include an open circuit somewhere in the network and noise on the carrier detect linefrom the transceiver. Use snoop(1M) or a similar program to isolate the problem area, then check the network connectors and transceivers, as needed. Illegal Instruction =================== A process has received a signal indicating that it attempted to execute an instruction that is not allowed by the kernel. This usually results from running programs compiled for a slightly different machine architecture. This message is usually accompanied by a core dump, excepton read-only filesystems. If you are booting from CDROM or from the net, check README files to make sure you are using an image appropriate for your machine architecture. Run df to make sure there is enough swap space on the system; too little swap space can cause this error. If you recently upgraded your CPU to a new architecture, replace your operating system with one that supports the new architecture (an operating system upgrade might be required). Sometimes this condition results from programming error, such as when a program attempts to execute data as instructions. This condition can also indicate device file corruption on your system. Illegal instruction "0xN" was encountered at PC 0xN =================================================== The machine is trying to boot from a non-boot device, or from a boot device for a different hardware architecture. If you are booting from the net, check README files to make sure you are using a boot image for that architecture. If you are booting from disk, make sure the system is looking at the right disk, which is usually SCSI target 3. Failing these solutions, connect a CD drive to the system and boot from CDROM. Illegal seek ============ Using a pipe ("|") on the command line doesn't work here. Rather than using a pipe on the command line, redirect the output of the first program into a file and then run the second program on that file. A call to lseek(2) was issued to a pipe. This error condition can also be fixed by altering the program to avoid using lseek(). The symbolic name for this error is ESPIPE, errno=29. Image Tool: Unable to open XIL Library. ======================================= This message follows multiple multi-line "XilDefaultErrorFunc" errors, indicating that ImageTool could not locate the X Imaging Library. Many OpenWindows and CDE deskset programs require XIL. Run pkginfo(1) to determine what packages are installed on the system. If the following packages are not present, install them from CDROM or over thenet: SUNWxildg, SUNWxiler, SUNWxilow, and SUNWxilrt. Inappropriate ioctl for device ============================== This is a programming error. Ask the program's author to fix this condition. The program needs to be changed so it employs a device driver that can accept special character device controls. The ioctl() system call was given as an argument for a file that is not a special character device. This message replaces the traditional but puzzling "Not a typewriter" message. The symbolic name for this error is ENOTTY, errno=25. INCORRECT BLOCK COUNT I=N (should be N) CORRECT? ================================================= During phase 1, fsck(1M) determined that the specified inode pointed to a number of bad or duplicate blocks, sothe block count should be corrected to the actual number shown. Generally you can answer yes to this question without harming the filesystem. For more information on bad blocks, see the section on checking filesystem integrity in the System Administration Guide, Volume I. inetd[N]: execv /usr/sbin/in.uucpd: No such file or directory ============================================================= This message indicates that the Internet services daemon inetd(1M) tried to start up the UUCP service without the UUCP daemon existing on the system. The SUNWbnuu package must be installed before the machine can run UUCP. Run pkgadd(1M) to install this package from the distribution CDROM or over the network. inetd[N]: variable/tcp: unknown service ======================================= This message indicates that the Internet services daemon inetd(1M) could not locate the TCP service specified after the first colon. Check the current machine's /etc/services file, and the NIS services map, to see if the service is described. To start this service, add an appropriate entry into the /etc/services file and possibly the services map as well. Note that NIS+ does not consult the local /etc/services file unless you put "files" right after "nisplus" on the services line of the system's /etc/nsswitch.conf file. If you do not want to start this service, edit the system's /etc/inetd.conf file and delete the entry that tries to start it up. For more information about NIS+, see the NIS+ and FNS Administration Guide. inetd[N]: variable/udp:unknown service ======================================= This message indicates that the Internet services daemon inetd(1M) could not locate the UDP service specified after the first colon. See the message "inetd[N]: variable/tcp: unknown service" fora solution. inetd: Too many open files ========================== This message can appear when someone runs a command from the shell or uses a third-party application. The sar(1M) command does not indicate that the system-wide open file limit has been exceeded. The probable cause for this is that the shell limit has been exceeded. The default open file limit is 64, but can be raised to 256. See the message "Too many open files" for a solution. INIT: Cannot create /var/adm/utmp or /var/adm/utmpx =================================================== This console message indicates that init(1M) cannot write in the /var directory, which is usually part of the / (root) filesystem. Some other messages follow, andthe system usually comes up single-user. The problem is often that / or /var is mounted read-only. Sometimes a brief power outage leaves the system believing that many filesystems are still mounted. If /var is a separate filesystem on the machine, andis not yet not mounted, mount it now. If the filesystem containing /var is mounted read-only, remount it read-write with a command similar to this: # mount -o rw,remount / Then type Control-d and try to bring up the system multi-user. If that fails, the root filesystem is probably corrupted. Run fsck(1M) on the root filesystem, halt the machine, power cycle the CPU, and wait for the system to reboot. Should this problem still occur, restore the root filesystem from backup tapes, or re-install the system from net or CDROM to replace the root filesystem. InitOutput: Error loading module for /dev/fb ============================================ This fatal X server error message indicates that /dev/fb, the "dumb frame buffer," is either missing or corrupted. It is usually followed by a "giving up" message and a few xinit errors. If other devices on the system are working correctly, the most likely reason for this error is that the SUNWdfb package was removed or never installed. Insert the installation CD-ROM, change to the Solaris_2.xdirectory, and run the following command to install the packages SUNWdfbh and SUNWdfb (for your machine architecture): pkgadd -d . If other devices on the system are not working correctly, the system might havea corrupt /devices directory. Halt the system and boot using the -r (reconfigure) option. The system will run fsck(1M) if the /devices filesystem is corrupted, most likely fixing the problem. Interrupted system call ======================= The user issued an interrupt signal (usually Control-c) while the system was in the middle of executing a system call. When network service is slow, interrupting cd(1) to a remote-mounted directory can produce this message. Proceed with your work, this message is purely informational. An asynchronoussignal (such as interrupt or quit), which a program was set up to catch, occurred during an internal system call. If execution is resumed after processing the signal, it will appear as if the interrupted programming function returned this error condition, so the program might exit with an incorrect error message. The symbolic name for this error is EINTR, errno=4. Invalid argument ================ An invalid parameter was specified that the system cannot interpret. For example, trying to mount an uncreated filesystem, printing without sufficient system support, or providing an undefined signal to a signal(3c) library function, can all produce this message. If you see this message when you are trying to mount a filesystem, make sure that you have run newfs(1M) to create the filesystem. If you see this message when you are trying to read a diskette, make sure that the diskette was properly formatted with fdformat(1), either in DOS format (pcfs) or as a UFS filesystem. If you see this message while you are trying to print, make sure that the print service is configured correctly. The symbolic name for this error is EINVAL, errno=22. Invalid null command ==================== This C shell message results from a command line with two pipes (|)in a row or from a pipe without a command afterwards. Change the command line so that each pipe is followed by a command. I/O error ========= Some physical Input/Output error has occurred. If the process was writing a file, data corruption is possible. First find out which device is experiencing the I/O error. If the device is a tape drive, make sure a tape is inserted into the drive. When this error occurs with a tape in the drive, it is likely that the tape contains an unrecoverable bad spot. If the device is a floppy drive, an unformatted or defective diskette could be at fault. Format the diskette, or obtain a replacement. If the device is a hard disk drive, you might need to run fsck(1M) and possibly even reformat the disk. In some cases this error might occur on a call following the one to which it actually applies. The symbolic name for this error is EIO, errno=5. Is a directory ============== An attempt was made to read or write a directory as if it were a file. Look at a listing of all the files in the current directory and try again, specifying a file instead of a directory. The symbolic name for this error is EISDIR, errno=21. kernel read error ================= This message appears when savecore(1M), if activated, tries to copy a debugging image of kernel memory to disk but cannot read various kernel data structures correctly. Generally this occurs after a system panic has corrupted main memory. Data corruption on the systemis possible. Look at the kernel error messages that preceded this one to try to determine the cause of the problem. Error messages such as "BAD TRAP" usually indicate faulty hardware. Until the problem that caused the kernel panic is resolved, a kernel core image cannot be saved for debugging. Killed ====== This message is purely informational. If the killed process was writing a file, some data might be lost. Continue with your work. This message from the signal handler or various shells indicates that a process has been terminated with a SIGKILL. However, if you don't see this message and cannot terminate a process with a SIGKILL, you might have to reboot the machine to get rid of that process. kmem_free block already free ============================ This is a programming error,probably from a device driver. Determine which driver is giving this message and contact the vendor for a software update, as this message indicates a bug in the driver. This message is from the DDI programming function kmem_free(9F), which releases a block of memory at address addr of size siz that was previously allocated by the DDI function kmem_alloc(9F). Both addr and siz must correspond to the original allocation. If you have source code for the driver, follow kmem_alloc() and kmem_free() in the code to make sure they allocate and free the same chunk of memory. last message repeated N times ============================= This message comes from syslog(1M), the facility that prints messages on the console and records them in /var/adm/messages. To reduce the log size and minimize buffer usage, syslog collapses any identical messages it sees during a 20 second period, then prints this message with the number of repetitions. Look above this message to see which message was repeated so often. Then consider the repeated message and take action accordingly. If repeated log entries such as "su ... failed" appear, consider the possibility of a security breach. ld.so.1: variable: fatal: relocation error: symbol not found: variable This message from the run-time linker ld.so.1 indicates that in trying to execute the application given after the first colon, the specified symbol could not be found for relocation. The message goes on to say in what file the symbol was referenced. Since this is a fatal error, the application terminates with this message. Run the ldd -d command on the application to show its shared object dependencies and symbols that aren't found. Probably your system contains an old version of the shared object that should contain this symbol. Contact the library vendor or author for an update. This error does not necessarily occur when you first bring up an application. It could take months to develop, if ordinary use of the application seldom references the undefined symbol. ld.so.1: variable: fatal: variable: can't open file: errno=2 ============================================================ This message indicates that the run-time linker, ld.so.1, while running the program specified after the first colon, could not find the shared object specified after the third colon. (A shared object is sometimes called a dynamically linked library.) Error number 2 translates to "No such file or directory" (ENOENT). As a workaround, set the environment variable LD_LIBRARY_PATH to include the location of the shared object in question, for example: /usr/dt/lib:/usr/openwin/lib Better yet, if you have accessto source code, recompile the program using the -Rpath loader option. Using LD_LIBRARY_PATH is discouraged because it slows down performance. le0: Memory error! ================== This message indicates that the network interface encountered an access time-out from the CPU's main memory. There is probably nothing wrong except system overload. If the system is busy with other processes, this error can occur frequently. If possible, try to reduce the system load by quitting applications or killing some processes. The Lance Ethernet chip timed out while trying to acquire the bus for a DVMA transfer. Most network applications wait for a transfer to occur, so generally no data gets lost. However, data transfer might fail after too many time-outs. For more information about the Lance Ethernet chip, see the le(7D) man page. le0: No carrier-- cable disconnected or hub link test disabled? =============================================================== Standalone machines with no Ethernet port connection get this error when the system triesto access the network. If the Ethernet cable is disconnected, SPARC machines with the sun4m architecture usually display this message, whereas machines with the sun4c architecture usually display the "le0: No carrier-- transceiver cable problem" message instead. If the Ethernet cable is connected, this message could result from a mismatch between the machine's NVRAM settings and the Ethernet hub settings. If this message is continuous, try to save any workto local disk. When a machine is configured as a networked system, it must be plugged into the Ethernet with a twisted pair J45 connector. If the Ethernet cable is plugged in, find out whether or not the Ethernet hub does a Link Integrity Test. Then become superuser to check and possibly set the machine's NVRAM. If the hub's Link Integrity Test is disabled, set this variable to false. # eeprom | grep tpe tpe-link-test?=true # eeprom 'tpe-link- test?=false' The default setting is true. If for some reason tpe-link-test? was set to false,and the hub's Link Integrity Test is enabled, set this variable to true. le0: No carrier-- transceiver cable problem? ============================================ Standalone machines with no Ethernet port connection get this error when the system tries to access the network. If this message is continuous, try to save any work to local disk. When a machine is configured as a networked system, it must be plugged into the Ethernet with either a twisted pair J45 connector or thicknet 10Base-T connector (depending on the building's Ethernet cable type). Older workstations have a thicknet connection on the back instead of a twisted pair Ethernet connection, so they require a thicknet to twisted pair transceiver to translate between cabling types. LINK COUNT FILE I=i OWNER=o MODE=m SIZE=s MTIME=t COUNT... ADJUST? =================================================================== During phase 4, fsck(1M) determined that the inode's link count for the specified file is wrong, and asks if you want to adjust it to the value given. Generally you can answer yes to this question without harming the filesystem. For more information on fsck, see the section on checking filesystem integrity in the SystemAdministration Guide, Volume I. LL105W: Protocol error detected. ================================ This error message comes from Lifeline Mail, an unbundled PC compatibility application. The likeliest cause for this problem is that someone set up a user account without a password. Assign the user a password to solve this problem. ln: cannot create /dev/fb: Read-only file system ================================================ During device reconfiguration at boot time, the system cannot link to the frame buffer because /dev is on a read-only filesystem. Check that /dev/fb is a symbolic link to the hardware frame buffer, such as cgsix or tcx. Ensure that the filesystem containing /dev is mounted read-write. lockd[N]: create_client: no name forinet address 0xN ===================================================== This lock daemon message usually indicates that the NIS hosts.byname and hosts.byaddr maps are not coordinated. Wait a short time for the maps to synchronize. If they don't, takesteps to coordinate them. For information on updating NIS data, see the section on NIS maps in the NIS+ and FNS Administration Guide. If you are using the AnswerBook, "hosts.byaddr" is a good search string. Login incorrect =============== This message from the login(1) program indicates an incorrect combination of login name and password. There is no way to tell whether what's wrong is the login name, the password, or both. Other programs such as ftp(1), rexecd(1M), sulogin(1M), and uucp(1C) alsogive this error under similar conditions. Check the /etc/passwd file and the NIS or NIS+ passwd map on the local system to see if an entry exists for this user. If a user has simply forgotten the password, su and set a new one with the passwd usernamecommand. This command automatically updates the NIS+ passwd map, but with NIS you'll need to coordinate the update with the passwd map. The "Login incorrect" problem can also occur with older versions of NIS when the user name has more than eight characters. If this is the case, edit the NIS password file, change the user name to have eight or fewer characters, and then remake the NIS passwd map. If you cannot log in to the system as root, despite knowing the proper password, it is possible that the /etc/passwd file is corrupted. Try to log in as a regular user and su to root. If that doesn't work, see the message "su: No shell" and follow most of the instructions given there. Instead of changing the default shell however, make the password field blank in /etc/shadow. lp hang ======= On a print server, the queue continues to grow but nothing comes out of the printer. The printer daemon is hung. Here is a simple procedure for flushing a hung printing queue: 1. Login or switch user to root. 2. Issue the reject printername command to make sure no one sends any job to the printer. 3. Turn off power to the printer. 4. If the active job appears to be causing the hang, remove it from the print queue with the cancel jobnumber command, and ask the owner to requeue that print job. 5. Shut down the print queue with the /usr/lib/lpshut command. 6. Remove the lock file /var/spool/lp/SCHEDLOCK and the temporary files /var/spool/lp/tmp/*/*. 7. Turn the printer back on. 8. Restart the print queue with the /usr/lib/lpsched command. For more information on print queuing, see the System Administration Guide, Volume II. If you are using the AnswerBook, "print server" is a good search string. mailtool: Can't create dead letter: Permission denied ===================================================== An attempt was made to send a message with mailtool(1) from a directory where the user does not have write permission, and the user's home directory is currently unavailable. Change to another directory and start mailtool again, or use chmod(1) to change permissions for the directory (if possible). mailtool: Could not initialize the Classing Engine ================================================== When a user runs mailtool(1) on a remote machine, setting the DISPLAY environment back to the local machine, this message might appear inside a dialog box window. The dialog box goes on to say that the Classing Engine must be installed to use Attachments. This problem occurs because rlogin(1) does not propagate the user's environment. Exit mailtool and set your OPENWINHOME environment variable to /usr/openwin. Then run mailtool again. The error message will not appear, and you will be able to use Attachments. Classing Engine is a new name for Tool Talk. Earlier versions of mailtool said "Tool Talk: TT_ERR_NOMP" instead of Classing Engine. Mail Tool is confused about the state of your Mail File. ======================================================== This message appears in a pop-up dialog box whenever you ask mailtool(1) to access messages after another mail reader has modified your inbox. A request follows: "Please Quit this Mail Tool." Click "Continue" to close the dialog box, then exit mailtool. If you continue trying to read mail, messages deleted by the other mail reader will never appear, and mailtool will fail to see any new messages. mail: Your mailfile was found to be corrupted (Content-length mismatch). ======================================================================= This message comes from mail(1) or mailx(1) whenever it detects messages with a different content length than advertised. The mail program tells you which message might be truncated or might have another message concatenated to it. Two common causes of content length mismatches are the simultaneous use of different mail readers (such as mail and mailtool), or using a mail reading program (or an editor) that does not update the Content-Length field after altering a message. The mailx program can usually recover from this error and delineate mail message boundaries correctly. Pay close attention to the message that might be truncated or combined with another message, and to all messages after that one. If a mail file becomes hopelessly corrupted, run it through a text editor to eliminate all Content-Length lines, and ensure that each message has a From (no colon) line for each message, preceded by a blank line. To avoid mailfile corruption, exit from mailtool without saving changes when you are currently running mail or mailx. Memory address alignment ======================== This message can occur when printing large files on a SPARCprinter attached to a SPARCstation 2. Replace the SPARCstation 2 CPU with one that isat the most recent dash level. memory leaks ============ An application uses up more and more memory, until all swap space is exhausted. Many developers have found that third party software (such as Purify) can help identify memory leaks in their applications. If you suspect that you have a memory leak, you can use sar(1) to check on the Kernel Memory Allocation (KMA). Any driver or module that uses KMA resources, but does not specifically return the resources before it exits, can create a memory leak. For more information on memory leaks, see the section on monitoring system activity in the System Administration Guide, Volume II. If you are using the AnswerBook, "displaying disk usage" is a good search string. Also, see the section on system resource problems in the NIS+ and FNS Administration Guide. mount: /dev/dsk/variable is already mounted, /variable is busy, or... ===================================================================== While trying to mount a filesystem, the mount(1M) command received a "Device busy" (EBUSY) error code.There are several possible reasons: this /dev/dsk filesystem is already mounted on a different directory, the busy path name is the working directory of an active process, or the system has exceeded its maximum number of mount points (unlikely). Run /etc/mount to see if the filesystem is already mounted. If not, check to see if any shells are active in the busy directory (did the user cd into the directory?), or if any processes in the ps(1) listing are active in that directory. If the reason for the error message isn't obvious, try using a different directory for the mount point. mount: giving up on: /variable ============================== An existing server did not respond to an NFS mount request, so after retrying a number of times (default1000), the mount(1M) command has given up. Nonexistent servers or bad mount points produce different messages. If the "RPC: Program not registered" message precedes this one, the requested mount serverprobably did not share (export) any filesystems, so it has no NFS daemons running. Have the superuser on the mount server share(1M) the filesystem, then run /etc/init.d/nfs.server start to begin NFS service. If the requested mount server is down or slow to respond, check to see whether the machine needs repair or rebooting. mount: mount-point /variable does not exist. ============================================ Someone tried to mount a filesystem onto the specified directory, but there is no suchdirectory. If this is the directory name you want,run mkdir(1) to create this directory as a mount point. mount: the state of /dev/dsk/variable is not okay ================================================= The system was unable to mount the filesystem that was specified because the super-block indicates that the filesystem might be corrupted. This is not an impediment for read-only mounts. If you don't need to write on this filesystem, mount(1M) it using the -o ro option. Otherwise, do as one of the message continuation lines suggests and run fsck(1M) to correct the filesystem state and update the super-block. For more information on using fsck, see the section on checking filesystem integrity in the System Administration Guide, Volume I. /net/variable: No such file or directory ======================================== A user tried to change directory (for example with cd) to a network partition on the system specified after /net/, but this host either does not exist or has not shared (exported) any filesystem. To gain access to files on this system, try rlogin(1). To export filesystems from the remote system, become superuser on that system and run the share(1M) command with the appropriate options. If that system is sharing filesystems for the first time, also run /etc/init.d/nfs.server start to begin NFS service. Network is down =============== A transport connection failed because it encountered a dead network. Report this error to the system administrator for the network. If you are the person responsible for this network, check to see why the network is dead and what repairs are necessary. This error results from status information delivered by the underlying communication interface. The symbolic name for this error is ENETDOWN, errno=127. Network is unreachable ====================== An operational error occurred either because there was no route to the network or because negative status information was returned by intermediate gateways or switching nodes. The returned status is not always sufficient to distinguish between a network that is down and a host that is down. See the "No route to host" message. Check the network routers and switches to see if they are disallowing these packet transfers. If they areallowing all packet transfers, check network cablingand connections. The symbolic name for this error is ENETUNREACH, errno=128. NFS getattr failed for server variable: RPC: Timed out ====================================================== This message appears on an NFS client that requested a service from an NFS server whose hardware is failing. Often the message "NFS read failed" appears along with this message. If the server were merely down or slow to respond, the "NFS server not responding" message would appear instead. Data corruption on the server system is possible. Because this message usually indicates server hardware failure, initiate repair procedures as soon as possible. Check the memory modules, disk controllers, and CPU board. For more information on NFS tuning, see chapter on monitoring network performance in the System Administration Guide, Volume II. nfs mount: Couldn't bind to reserved port ========================================= This message appears when a client attempts to NFS mount a filesystem from a server that has more than one Ethernet interface configured on the same physical subnet. Always connect multiple Ethernet interfaces on one router system to different physical subnetworks. nfs mount: mount: variable: Device busy ======================================= This message appears when the superuser attempts to NFS mount on top of an active directory. The busy device is actually the working directory of a process. Determine which shell on the workstation is currently located below the mount point, and change out of that directory. Be wary of subshells (such as su shells) that could be in different working directories while the parents remain below the mount point. NFS mount: /variable mounted OK =============================== While booting, the system failed to mount the directory specified after the first colon, probably because the NFS server involved was down or slow to respond. The mount ran in the background and successfully contacted the NFS server. This is a purely informative message to let you know that the mount process has completed. NFS read failed for server variable =================================== This is generally a permissions problem. Perhaps a directory or file permission was changed while the client held the file open. Perhaps the filesystem's share or netgroup permissions changed. If the server were down or the network saturated, the "NFS server not responding" message would appear instead. Log in to the NFS server and check the permissions of directories leading to the file. Make certain that the filesystem is shared with (exported to) the client experiencing an NFS read failure. For more information, see the chapter on NFS troubleshooting in the NFS Administration Guide. nfs_server: bad getargs for N/N =============================== This message comes from the NFS server when it gets a request with unrecognized or incorrect arguments. Typically, it means the request could not be XDR decoded properly. This can result from corruption of the packet over the network, or from an implementation bug causing the NFS client to improperly encode its arguments. If this message originates from a single client, investigate that machine for NFS client software bugs. If this message appears all over a network, especially accompanied by other networking errors, investigate the network cabling and connectors. NFS server variable not responding still trying =============================================== In mostcases this very common message indicates that the system has requested a service from an NFS server that is either down or extremely slow to respond. In some cases this message indicates that the network link to this NFS server is broken, although usually that condition generates other error messages as well. In a few cases this message indicates NFS client set-up problems. Check the non-responding NFS server to see whether the machine needs repair or rebooting. Encourage your user community to report such problems quickly but only once. Should this message appear when booting a diskless client, make sure that the client's /etc/hosts file and the network naming service (NIS, NIS+, or other /etc/hosts files on the network) have been updated. Formore information, see the chapter on NFS troubleshooting in the NFS Administration Guide. NFS server variable ok ====================== This message is the follow-up to the "NFS server not responding" error. It indicates that the NFS server is back in operation. When an NFS server first comes up, it will be busy fulfilling client requests for a while. Be patient and wait for your client system to respond. Making many extraneous requests only further slows the NFS server response time. nfs umount:variable: is busy ============================= This message appears when the superuser attempts to unmount an active NFS filesystem. The busy point is the working directory of a process. Determine which shell (or process) on the workstation is currently located in the remotely mounted filesystem, and change (cd) out of that directory. Be wary of subshells (such as su shells) that could be in different directories while the parent shells remain in the NFS filesystem. NFS write error on host variable: No space left on device. ========================================================== This console message indicates that an NFS-mounted partition has filled up and cannot accept writing of new data. Unfortunately, software that attempts to overwriteexisting files will usually zero out all data in these files. This is particularly destructive on NFS-mounted /home partitions. Find the user or process that is filling up the filesystem, and get the out-of-control process stopped as soon as you can. Then delete files as necessary to create more space on the filesystem (large core files are good candidates for deletion). Have users write any modified files to local disk if possible. If this error occurs often, redistribute directories to ease demandon this partition. For more information on disk usage, see the System Administration Guide, Volume II. If you are using the AnswerBook, "managing disk use" is a good search string. NFS write failed for server variable: RPC: Timed out ==================================================== This error can occur when a file system is soft-mounted, and server or network response time lags. Any data written to the server during this period could be corrupted. If you intend to write on a filesystem, never specify the soft mount option. Use the default hard mount for all the filesystems that are mounted read-write. For more information, see the chapter on NFS troubleshooting in the NFS Administration Guide. NIS+ authentication failure =========================== This is a Federated Naming Service message. The operation could not be completed because the principal making the request could not be authenticated with the name service involved. Run the nisdefaults(1) command to verify that you are identified as the correct NIS+ principal. Also check that the system has specified the correct public key source. For more information, see the authentication and authorization overview in the NIS+ and FNS Administration Guide. No buffer space available ========================= An operation on a transport endpoint or pipe was not performed because the system lacked sufficient buffer space or because a queue was full. The target system probably ran out of memory or swap space. Any data written during this condition will probably be lost. To add more swap area, use the swap -a command on the target system. Alternatively, reconfigure the target system to have more swap space. As a general rule, wwap space should be two to three times as large as physical memory. The symbolic name for this error is ENOBUFS,errno=132. No child processes ================== This message can appear when an application tries to communicate with cooperating process that do not exist. Restart the parent process so it can create the child processes again. If that doesn't help, this could be the result of programming error; contact the vendor or author of the program for an update. A wait(2) system call was executed by a process that had no existing or unwaited-for child processes. The child processes could have exited prematurely, or might never have been created. The symbolic name for this error is ECHILD, errno=10. No default media available ========================== The volume manager issues this message if a user makes an eject(1) request when the drives containno diskette or CDROM to eject. Insert a diskette or CDROM. If the volume manager is confused and there actually is a diskette or CDROM in a drive, run volcheck to update the volume manager. If the system remains confused, try booting with the -r option to reconfigure devices. No directory! Logging in with home=/ ==================================== The login(1) program could not find the home directory listed in the password file or NIS passwd map, so it deposited the user in the root directory. Check that the user's home directory is mounted and is owned by and accessible to that user. Perhaps the automounter tried to mount the home directory, but the NFS server did not respond quicklyenough. Try listing the files in /home/username. If the NFS server responds to this request, have the user log out and log in again. It is possible that the automounter daemon is not running. Run the ps command to see if automountd is present. If not,run the second command; if it appears to be wedged, run both these commands: # /etc/init.d/autofs stop # /etc/init.d/autofs start When the automounter daemon is running, verify that the /etc/auto_master file has a line like this: /home auto_home Verify that the /etc/auto_home file has a line like this: +auto_home These entries depend on the NIS auto_home map. It is also possible that the NFS server has not shared (exported) this /home directory, or that the NFS daemons on the server have disappeared. For more information on NFS, see the NFS Administration Guide. No message of desired type ========================== An attempt was made to receive a message of a type that does not exist on the specified message queue. See the msgop(2) man page for details. This indicates an error in the System V IPC message facility. Generally the message queue is empty or devoid of the desired message type, while IPC_NOWAIT is set. The symbolic name for this error is ENOMSG, errno=35. No recipients specified ======================= This message comes from the mailx(1) command whenever a user doesn't provide an address in the To: field. See the message "Recipient names must be specified" for details. No record locks available ========================= No more record locks are available. The system lock table is full. The symbolic name for this error is ENOLCK, errno=46. Perhaps a process called fcntl(2) with the F_SETLK or F_SETLKW option, and the system maximum was exceeded. The system contains several different locking subsystems, including fcntl,the NFS lock daemon, and mail locking, all of which can produce this error. Try again later, when more locks might be available. No route to host ================ An operational error occurred because there was no route to the destination host, or because of status information returned by intermediate gateways or switching nodes. The returned status is not always sufficient to distinguish between a host that is down and a network that isdown. See the "Network is unreachable" message. Check the network routers and switches to see if they are disallowing these packet transfers. If they are allowing all packet transfers, check network cabling and connections. The symbolic name for thiserror is EHOSTUNREACH, errno=148. No shell Connection closed =========================== A user has attempted to remote login to the system, and has a valid account name and password, but the shell specified for their account is not available on that system. For example, the seventh field could request the GNUBourne-again shell /bin/bash, which does not exist on standard Solaris distributions. If you have a copy of the requested shell, become superuser and install the missing shell on that system. Otherwise, change the user's password file entry (perhaps only in the NIS+ or NIS passwd map) to specify an available shell such as /bin/csh or /bin/ksh. No space left on device ======================= While writing an ordinary file or creating a directory entry, there was no free space left on the device. The disk, tape, or diskette is full of data. Any data written to that device during this condition will be lost. Remove unneeded files from the hard disk or diskette until there is space for all the data you are writing. It might be advisable to move some directories onto another filesystem and create symbolic links accordingly. When a tape is full, continue on another one, use a higher density setting, or obtain a higher- capacity tape. To create multi-volume tapes or diskettes, use the pax(1) or cpio(1) command; tar(1) is still limited to a single volume. The symbolic name for this error is ENOSPC, errno=28. No such device ============== An attempt was made to apply an operation to an inappropriate device, such as writing to a nonexistent device. Look in the /devices directory to see why this device does not exist, or why the program expects it to exist. The similar "No such device or address" message tends to indicate I/O problems with an existing device, whereas this message tends to indicate a device that does not exist at all. The symbolic name for this error is ENODEV, errno=19. No such device or address ========================= This can occur when a tape drive is off-line or when a device has been powered off or removed from thesystem. For tape drives, make sure the device is connected, powered on, and toggled on-line (if applicable). For disk and CDROM drives, check that the device is connected and powered on. With all SCSI devices, ensure that the target switch or dial is set to the number where the system originally mounted it. To inform the system of a change to the target device number, reboot using the -r (reconfigure) option. This message results from I/O to a special file's subdevice that either does not exist or that exists beyond the limit of the device. The symbolic name for this error is ENXIO, errno=6. No such file or directory ========================= The specified file or directory does not exist. Either the file name or path name was entered incorrectly. Check the file name and path name for correctness and try again. If the specified file or directory is a symbolic link, it probably points to a nonexistent file or directory. The symbolic name for this error is ENOENT, errno=2. no such map in server's domain ============================== A user or an application tried to look up something using Network Information Services (NIS), but NIS has no corresponding database for this request. Make sure the NIS map name is spelled correctly. To see a list of nicknames for the various NIS maps, run the ypcat -x command. To see a full list of the various NIS maps (databases), run the ypwhich -m command. If the NIS service were not running on the current machine, these commands would result in a "can't communicate with ypbind" message. No such process =============== This process cannot be found. The process could have finished execution and disappeared, or it might still be in thesystem under a different numeric ID. Use the ps(1) command tocheck that the process ID you're supplying is correct. No process corresponds to the specified process ID (PID), light- weight process ID, or thread_t. The symbolic name for this error is ESRCH, errno=3. No such user as variable-- cron entries not created =================================================== A file exists in /var/spool/cron/crontabs for the specified user, but this user is not in /etc/passwd or the NIS passwd map. The system cannot create cron entries for nonexistent users. To eliminate this message at boot time, remove the cron file for the nonexistent user, or rename it if the user's login name has changed. If this is a valid user, create an appropriate password entry for this name. Not a directory =============== A non-directory was specified where a directory is required, such as in a path prefix or as an argument to the chdir(2) system call. Look at a listing of all the files in the current directory and try again, specifying a directory instead of a file. The symbolic name for this error is ENOTDIR, errno=20. Not enough space ================ This message indicates that the system is running many large applications simultaneously, and has run out ofswap space (virtual memory). It could also indicate that applications failed without freeing pages from the swap area. Swap space is an area of disk set aside to store portions of applications and data not immediately required in memory. Any data written during this condition will probably be lost. Reinstall or reconfigure the system to have more swap space. A general rule of thumb is that swap space should be two to three times as large as physical memory. Alternatively, use mkfile(1M) and swap(1M) to add more swap area. This example shows how to add 16 MB of virtual memory in the /usr/swap file (any filesystem with enough free space would work): # mkfile 16m /usr/swap # swap -a /usr/swap To make this automatic at boot time, add the following line to the /etc/vfstab file: /usr/swap - - swap - no - In calling the fork(2), exec(2), sbrk(2), or malloc(3C) routine, a program asked for more memory than the system could supply. This is not a temporary condition; swap space is a system parameter. The symbolic name for this error is ENOMEM, errno=12. not found ========= This message indicates that the Bourne shell could not find the program name given as a command. Check the form and spelling of the command line. If that looks correct, echo $PATH to see if the user's search path is correct. When communications are garbled, it is possible to unset a search path to such an extent that only built-in shell commands are available. Here is a command to reset a basic search path: $ PATH=/usr/bin:/usr/ccs/bin:/usr/openwin/bin:. If the search path looks correct, check the directory contents along the search path to see if programs are missing or if directories are not mounted. NOTICE: /variable: out of inodes ================================ The filesystem specified after the first colon probably contains many small files, exceeding the per-filesystem limit for inodes (file information nodes). If many small files were created unintentionally, removing them will resolve the problem. Otherwise, follow these steps to increase filesystem capacity for small files. Make several backup copies of the filesystem on different tapes (for safety), then bring the machine down to single-user mode. Use the newfs(1M) command with the -i option to increase inode density for this filesystem. Here is an example: # newfs -i 1024 /dev/rdsk/partition Finally, restore the filesystem from a backup tape. Note that increasing the inode density slightly reduces total filesystem capacity. Not login shell =============== This message results when a user triesto logout(1) from a shell other than the one started at login time. To quit a non-login shell, use the exit(1) command. Continue doing so until you have logged out. For more general information on the login shell, see the section on customizing your work environment in the Solaris Advanced User's Guide. Not on system console ===================== A user tried to login(1) to a system as the superuser (uid=0, which is not necessarily root) from a terminal other than the console. Login to that system as a normal user, then run su(1M) to become superuser. To allow superuser logins from any terminal, comment out the CONSOLE line in /etc/default/login (this is not recommended for security reasons). Not owner ========= Either an ordinary user tried to do something reserved for the superuser, or the user tried to modify a file in a way restricted to the file's owner or to the superuser. Switch user to root and try again. The symbolic name for this error is EPERM, errno=1. Not supported ============= This version of the system does not support the feature requested, although future versions of the system might provide support. This is generally not a system message from the kernel, but an error returned by an application. Contact the vendor or author of the application for an update. The symbolic name for this error is ENOTSUP, errno=48. operation failed [error 185], unknown group error 0, variable ============================================================= When you use admintool to add a user to a newly-created group, admintool issues this error. Apply patch 101384-05 to fix bug ID 1151837 and to provide a workaround for bug ID 1153087. Operation not applicable ======================== This error indicates that no system support exists for some function that the application requested. Ask the system vendor for an upgrade, or contact the vendoror author of the application for an update. This message indicates that no system support exists for an operation. Many modules set this error when a programming function is not yet implemented. If you are writing a program that produces this message while calling a system library, try to find and use an alternative library function. Future versions of the system might support this operation; check system release notes for further information. The symbolic name for this error is ENOSYS, errno=89. out of memory ============= Hundreds of different programs can produce this message when the system is running many large applications simultaneously. This message usually means that the system has run out of swap space (virtual memory). See the message "Not enough space" for details. Any data written during this condition will probably be lost. PARTIALLY ALLOCATED INODE I=N CLEAR? ===================================== During phase 1, fsck(1M) found that the specified inode was neither allocated nor unallocated. The reason is probably that the system crashed in the middle of a sync(2) or write(2) operation. Should you answer yes to this question, "UNALLOCATED" messages might result during phase 2, if any directory entries point to this inode. If you are being careful, exit fsck(1M) and run ncheck(1M) (specifying the inode number after the -i option) to determine which file or directory is involved here. You might be able restore this file or directory from another system. It is also possiblethat fsck will copy this file to the lost+found directory in a later phase. For more information, see the chapter on checking filesystem integrity in the System Administration Guide, Volume I. passwd.org_dir: NIS+ servers unreachable ======================================== This is the first of three messages thatan NIS+ client prints when it cannot locate an NIS+ server on the network. See the message "hosts.org_dir: NIS+ servers unreachable" for details. Password does not decrypt secret key for unix.uid@variable ========================================================== This message appears at login time when a user's password is not identical to the user's keylogin network password. When a system is running NIS+, the login program firstperforms UNIX authentication, and then attempts a keylogin(1) for secure RPC authentication. To gain credentials for secure RPC, users can run keylogin (after login) and type in their secret key. To stop this message from appearing at login time, users can run the chkey -p command and set their network password to bethe same as their NIS+ password. If a user doesn't remember the network password, the system administrator should delete and re-create the user's credentials table entry so the user can establish a new network password with chkey. Permission denied ================= An attempt was made to access a file in a way forbidden by the protection system. Check the ownership and protection mode of the file (with a long listing from the ls-l command) to see who is allowed to access the file. Then change the file or directory permissions as needed. The symbolic name for this error is EACCES, errno=13. Please specify a recipient. =========================== With mailtool, this message comes up in a dialog box whenever a user tries to deliver a message with no address in the To: field. See the message "Recipient names must be specified" for details. Protocol not supported ====================== The requested networking protocol hasnot been configured into the system, or no implementation for it exists. (A protocol is a formal description of the messages to be exchanged and the rules to be followed when systems exchange information.) Verify that the protocol is in the /etc/inet/protocols file and in the NIS protocols map, if applicable. If the protocol is not listed, and you want to permit its use, configure the protocol as documented or as required. The symbolic name for this error is EPROTONOSUPPORT, errno=120. Protocol wrong type for socket ============================== This message indicates either application programming error, or badly configured protocols. Make sure that the /etc/protocols file corresponds number-for- number with the NIS protocols map. It it does, ask the vendor or author of the application for an update. A protocol was specified that does not support the semantics of the socket type requested. This amounts to a request for an unsupported type of socket. Look at the source code that made this socket request and check that it requested one of the types specifiedin /usr/include/sys/socket.h. The symbolic name for this error is EPROTOTYPE, errno=98. Read error from network: Connection reset by peer ================================================= This message appears when a user is remotely logged into a machine that crashes or gets rebooted during the rlogin(1) or rsh(1) session. Any data changes that were not saved are probably lost. Sometimes this message appears only when the user types something, even though the system went down hours before. Try torlogin again, perhaps after waiting a few minutes for the system to reboot. Read-only file system ===================== Files and directories on filesystems that are mounted read-only cannot be changed. If you only modify these files and directoriesoccasionally, rlogin(1) to the servers from which the filesystems are mounted and change the files or directories there. If you change these files and directories frequently, mount(1M) the filesystems read/write. The symbolic name for this error is EROFS, errno=30. rebooting... ============ This message appears on the console to indicate that the machine is booting, either after the superuser issued a reboot command, or after a system panic if the EEPROM's watchdog-reboot? variable is set to true. Allow the machine to boot itself. In case of a system panic, look above this message for other indications of what went wrong. Recipient names must be specified ================================= Somebody sent mail without a valid recipient in the To: field, so sendmail could not deliver the mail message. Using mail(1), the recipient's address might have been specified using spaces or non-alphanumeric characters. The mailtool(1)and mailx(1) commands try to prevent this by issuing "Please specify a recipient" or "No recipients specified" messages instead. If there is at least one valid recipient, each invalid recipient address will generate a "User unknown" message. Look in the sender's dead.letter file for the automatically saved message, andhave the originator send it again, this time specifying a recipient. For more information about sendmail, see the Mail Administration Guide. Reset tty pgrp from N to N ========================== The C shell sometimes issues this message when it clears away the window process group after the user exits the window system. This can happen when the window system doesn't clean up after itself. Proceed with your work. This message is purely informational. Resource temporarily unavailable ================================ This indicates that the fork(2) system call failed because the system's process table is full, or that a system call failed because of insufficient memory or swap space. It is also possible that a user is not allowed to create anymore processes. Simply waiting often gives the system time to free resources. However if this message occurs often on a system, reconfigure the kernel and allow more processes. To increase the size of the process table in Solaris 2.x, increase the value of maxusers in the /etc/system file. The default maxusers value is the amount of main memory in MB, minus 2. If one user is not allowed to create any more processes, that user has probably exceeded the memorysize limit; see the limit(1) man page for details. The symbolic name for this error is EAGAIN, errno=11. Result too large ================ This is a programming error or a data input error. Ask the program's author to fix this condition. This indicates an attempt to evaluate a mathematical programming function at a point where its value would overflow or underflow. The value of a programming function in the math package (3M) is not representable within machine precision. This could occur after floating point overflow or underflow (either single or double precision), or after total loss of numeric significance in Bessel functions. Note that this message can indicate "Result too small" in the case of floating pointunderflow. To help pinpoint a program's math errors, use the matherr(3M) facility. The symbolic name for this error is ERANGE, errno=34. rmdir: variable: Directory not empty ==================================== The rmdir(1) command can remove empty directories, only. The directory whose name appears after the first colon in the message still contains some files or directories. Use rm(1) instead of rmdir. To remove this directory and everything underneath it, use the rm -ir command to recursively descend the directory, being asked if you want to delete each element. To remove the directory and all its contents without being asked for approval, use the rm -r command. ROOT LOGIN /dev/console ======================= This syslog message indicates that someone has logged in as root on the system console. If you have just logged in as root, don't worry. If this is not you, consider the possibility of a security breach. The best site-wide policy is for all system administrators to su instead oflogging in as root. ROOT LOGIN /dev/pts/N FROM variable =================================== This syslog message indicates that someone has remote logged in as root on a pseudo-terminal from the system specified after the FROM keyword. For security reasons, it is a bad idea to allow root logins from anywhere besides the console. To restrict superuser logins to the console, remove the comment from the CONSOLE line in /etc/default/login. rx framing error ================ Usually this error indicates a hardware problem. Check the Ethernet cabling and connectors to locate a problem. A framing error occurs when the Ethernet I/O driver receives a non-integral unit of octets, such as 63 bytes and then 3 bits. (Ethernet specifies the use of octets.) Framing errors are caused by corruption of the starting or ending frame delimiters. These can be corrupted by some violation of the encoding scheme. Framing errors are a subset of CRC errors, which are usually caused by anomalies on the physical media.An "alignment/framing error" is a type of CRC error where octet boundaries do not line up. SCSI bus DATA IN phase parity error =================================== The most common cause of this problem is unapproved hardware. Some SCSI devices for thePC market do not meet the high I/O speed requirements for the UNIX market. Other possible causes of this problem are improper cabling or termination, and power fluctuations. Data corruption is possible but unlikely to occur, because this parity error prevents data transfer. Check that all SCSI devices on the bus are Sun approved hardware. Then verify that all cables are no longer than six meters, total, and that all SCSI connections are properly terminated. If power fluctuations are occuring, invest in an uninterruptible power supply. SCSI transport failed: reason 'reset' ===================================== This message indicates that the system sent data over the SCSI bus, but the data never reached its destination because of a SCSI bus reset. The most common cause of this condition is conflicting SCSI targets.Data corruption is possible but unlikely to occur, because this failure prevents data transfer. Verify that all cables are no longer than six meters, total, and that all SCSI connections are properly terminated. If power surges are a problem, acquire a surge suppressor or uninterruptible power supply. A machine's internal disk drive is usually SCSI target 3. Make sure that external and secondary disk drives are targeted to 1, 2, or 0, and do not conflict with each other. Also make sure that tape drives are targeted to 4 or 5, and CD drives to 6, avoiding any conflict with each other or with disk drives. If the targeting of the internal disk drive is in question, power off the machine, remove all external drives, turn the power on, and from the PROM monitor run the probe-scsi-all or probe-scsi command. If SCSI device targeting is acceptable, memory configuration could be the problem, especially for machines with the sun4c architecture. Ensure that high-capacity memory chips (such as 4MB SIMMs) are in lower banks, while lower-capacity memory chips (such as 1MB SIMMs) are in the upper banks. Note that SPARC systems do not always support third party CDROM drives, and might generate a similar "unknown vendor" error message. Check with the CDROM vendor for specific configuration requirements. Some third party disk drives have a read-ahead cache that interferes with Solaris device drivers. Make sure that any existing read-ahead cache facility is turned off.  For more information on SCSI targets, see the section on device naming conventions in the Solaris 1.x to Solaris 2.x Transition Guide. If you are using the AnswerBook, "scsi targets" is a good search string. Segmentation Fault ================== Segmentation faults usually result from programming error. This message is usually accompanied by a core dump, except on read- only filesystems. To see which program produced a core file, run either the file(1) command or the adb (1) command. The following examples show the output of the file and adb commands on a core file from the dtmail program. $ file core core: ELF 32-bit MSB core file SPARC Version 1, from `dtmail' $ adb core core file = core -- program `dtmail' SIGSEGV 11: segmentation violation ^D (use Control-d to quit the adb rogram) Ask the vendor or author of this program for a debugged version. A process has received a signal indicating that it attempted to access an area of memory that is protected or that does not exist. The two most common causes of segmentation faults are attempting to dereference a null pointer or indexing past the bounds of an array. sendmail[N]: NOQUEUE: SYSERR: net hang reading from variable ============================================================ This is a sendmail message that appears on the console and in the log file /var/adm/messages. If this message occurs once for a particular user, it is possible that a mail message from this user ends with a partial line (having no terminating newline character). If this message appears frequently or at busy times, especially along with other networking errors, it could indicate network problems. Check the user's mail spool file to see if a message ends without a newline character. If so, talk with the user and determine how to prevent the problem from occurring again. If these messages are the result of network problems, you could try moving the mail spool directory to another machine with a faster network interface. During the SMTP receipt of DATA phase, a message-terminating period on a line of its own never arrived, so sendmail timed out and produced this error. setmnt: Cannot open /etc/mnttab for writing =========================================== The system is having problems writing to /etc/mnttab. It is possible that the filesystem containing /etc is mounted read- only, or is not mounted at all. Check that this file exists and is writable by root. If so, ensure that the /etc filesystem has been mounted, and is mounted read-write rather than read-only. share_nfs: /home: Operation not applicable ========================================== This message usually indicates that the system has a local filesystem mounted on /home, which is where the automounter usually mounts users' home directories. When a systemis running the automounter, do not mount local filesystems on the /home directory. Mount them on another directory, such as /disk2, which on most systems you will have to create.You could also change the automounter auto_home entry, but that is a more difficult solution. Soft error rate (N%) during writing was too high ================================================ This message from the SCSI tape drive appears when Exabyteor DAT tapes generate too many soft (recoverable) errors. It is followed bythe advisory "Please, replace tape cartridge" message. Soft errors are an indication that hard errors could soon occur, causing data corruption. First clean the tape head witha cleaning tape as recommended by the manufacturer. If that doesn't work, replace the tape cartridge. You might need to replace the tape drive if the problem still occurs with new tape cartridges. Soft error rate (retries = N) during writing was too high ========================================================= This message from the SCSI tape drive appears when Archive tapes generate too many soft (recoverable) errors. It is followed by the advisory "Periodic head cleaning required and/or replace tape cartridge" message. Soft errors are an indication that hard errors couldsoon occur, causing data corruption. First clean the tape head with a cleaning tape as recommended by the manufacturer. If that doesn't work, replace the tape cartridge. Youmight need to replace the tape drive if the problem still occurs with new tape cartridges. Stale NFS file handle ===================== A file or directory that was opened by an NFS client was either removed or replaced on the server. If you were editing this file, write it to a local filesystem instead. Try remounting the filesystem on top of itself or shutting down any client processes that refer to stale file handles. If neither of these solutions works, reboot the system. The original vnode isno longer valid. The only way to get rid of this error is to force the NFS server and client to renegotiate file handles. The symbolic name for this error is ESTALE, errno=151. statd: cannot talk to statd at variable ======================================= This message comes from the NFS status monitor daemon statd, which provides crash recovery services for the NFS lock daemon lockd. The message indicates that statd has left old references in the /var/statmon/sm and /var/statmon/sm.bak directories. After a user has removed or modified a host in the hosts database, statd might not properly purge files in these directories, which results in its trying to communicate with a nonexistent host. Remove the file named variable (where variable is the hostname) from both the /var/statmon/sm and /var/statmon/sm.bak directories. Then kill the statd daemon and restart it. If that doesn't get rid of the message, kill and restart lockd as well. If that doesn't work, reboot the machine at your convenience. stty: TCGETS: Operation not supported on socket =============================================== This message results when a user tries to remote copy with rcp(1) or remote shell with rsh(1) from one machine to another, but has an stty(1) command in the remote The solution is to move the stty command to the user's .login (or equivalent) file. Alternatively, execute the stty command in .cshrc only when the shell is interactive. Here is a test to do just that: if ($?prompt) stty ... The rcp andrsh commands make a connection using sockets, which do not support stty's TCGETS ioctl. su: No shell ============ This message indicates that someone changed the default login shell for root to a program missing from the system. For example, the final colon-separated field in /etc/passwd could have been changed from /sbin/sh to/usr/bin/bash, which does not exist in that location. Possibly an extra space was appended at the end of line. The outcome is that you cannot login as root or switch user to root, and so cannot directly fix this problem. The only solution is to reboot the system from another source, then edit the password file to correct this problem. Invoke sync(1M) several times, then halt the machine by typing Stop-A or by pressing the reset button. Reboot single-user from CDROM, the net, or diskette, such as by typing boot cdrom -s at the ok prompt. After the system comes up and gives you a # prompt, mount the device corresponding to the original / partition somewhere, such as with a mount(1M) command similar to the one below. Then run an editor on the newly-mounted system password file (use ed(1) if terminal support is lacking): # mount /dev/dsk/c0t3d0s0 /mnt # ed /mnt/etc/passwd Use the editor to change the password file's root entry to call an existing shell, such as /usr/bin/csh or /usr/bin/ksh. To keep the "No shell" problem from happening, habitually use admintool or /usr/ucb/vipw to edit the password file. These tools make it difficult to change password entries in ways that make the system unusable. su: 'su root' failed for variable on /dev/pts/N =============================================== The user specified after "for" tried to become superuser, but typed the wrong password. If the user is supposed to know the root password, wait to see if the correct password is supplied. If the user is not supposed to know the root password, ask why he or she is attempting to become superuser. su: 'su root' succeeded for variable on /dev/pts/N ================================================== The user specified after "for" just became superuser by typing the root password. If the user is supposed to know the root password, this message is purely informational. If the user is not supposed to know the root password, change this password immediately and ask how the user learned it. syncing file systems... ======================= This indicates that the kernel is updating the super-blocks before taking the system down, to ensure filesystem integrity. This message appears after a halt(1M) or reboot (1M) command. It can also appear after a system panic, in which case the system might contain corrupted data. If you just halted or rebooted the machine, don't worry-- this message is normal. In case of a system panic, look up the panic messages that appear above this one. Your system vendor might be able to help diagnose the problem. So that you can describe the panic to the vendor, either leave your system in its panicked state or be sure that you can reproduce the problem. Numbers that sometimes display after the three dots in the message show the count of dirty pages that are being written out. Numbers in brackets show an estimate of the number of busy buffers in the system. syslog service starting. ======================== During system reboot, this message might appear and theboot seems to hang. After starting syslogd(1M) service, the system runs /etc/rc2.d/S75cron, which in turn calls ps(1). Sometimes after an abrupt system crash /dev/bd.off becomes a link to nowhere, causing the ps command to hang indefinitely. Reboot single user (for example with boot -s) and run ls -l /dev/bd* to see if this is the problem. If so, remove /dev/bd.off, then run bdconfig off or reboot with the -r (reconfigure) option. This is the most commonly reported situation that causes ps to hang. tar: /dev/rmt/0: No such file or directory ========================================== The default tape device /dev/rmt/0, or possibly the device specified by the TAPE environment variable, is not currently connected to the system, is not configured, or its hardware symbolic link is broken. List the files in the /dev/rmt directory to see which tape devices are currently configured. If none are configured, ensure that a tape device is correctly attached to the system, and reboot with the -r option to reconfigure devices. If tape devices other than /dev/rmt/0 are configured, you could specify one of them after the -f option of tar(1). tar: directory checksum error ============================= This error message from tar(1) indicates that the checksum of the directory and the files it has read from tape does not match the checksum advertised in the header block. Usually this indicates the wrong blocking factor, although it could indicate corrupt data on tape. To resolve this problem, make certain that the blocking factor you specify on the command line (after -b) matches the blocking factor originally specified. If in doubt, leave out the block size and let tar determine it automatically. If that doesn't help, tape data could be corrupted. tar: tape write error ===================== A physical write error has occurred on the tar(1) output file, which is usually a tape, although it could be a diskette or disk file. Look on the system console, where the device driver should provide the actual error condition. This might be a write- protected tape, a physical I/O error, an end-of-tape condition, or a File too large limitation. In the case of write-protectedtapes, enable the write switch. For physical I/O errors, the best course of action is to replace the tape with a new one. For end-of-tape conditions, try using a higher density if the device supports one, or use cpio(1) or pax (1) for their multi-volume support., When encountering File too large limitations, use the parent shell'slimit(1) or ulimit facility to increase the maximum file size. For more information on tar tapes, see the section on copying UFS files in the System Administration Guide,Volume I. Text is lost because the maximum edit log size has been exceeded. ================================================================= This message appears at the beginning of a cmdtool(1) session after 100,000 characters have gone by in the scrolling window. Clicking on the top rectangle of the scrollbar might display this message. No data were lost, but the user cannot scroll back before this wraparound point. To increase the maximum size of the Command Tool log file, use cmdtool with the-M option, specifying more than 100,000 bytes. THE FOLLOWING FILE SYSTEM(S) HAD AN UNEXPECTED INCONSISTENCY: ============================================================ At boot time the /etc/rcS script runs the fsck(1M) command to check the integrity of filesystems marked "fsck" in /etc/vfstab. If fsck cannot repair a filesystem automatically, it interrupts the boot procedure and produces this message. When fsck gets into this state, it cannot repair filesystems without losing one or more files, so it wants to defer this responsibility to you, the administrator. Data corruption has probably already occurred. First run fsck -n on the filesystem, to see how many and what type of problems exist. Then run fsck again to repair the filesystem. If you have a backup of the filesystem, you can generally answer "y" to all the fsck questions. It's a good idea to keep a record of all problematic files and inode numbers for later reference. To run fsck yourself, specify options as recommended by the boot script. For example: # fsck /dev/rdsk/c0t4d0s0 Usually, files lost during fsck repair were created just before a crash or power outage, and cannot be recovered. If important files are lost, you can recover them from backup tapes. If you don't havea backup, ask an expert to run fsck for you. For more information, see the sectionon checking filesystem integrity in the System Administration Guide, Volume I. The SCSI bus is hung. Perhaps an external device is turned off. =============================================================== This message appears near the beginning of rebooting, immediately after a "Boot device: ..." message, and then the system hangs. The problem is conflicting SCSI targets for a non-boot device. Having an external device turned off is unlikely to cause this problem. See the message "Boot device: /iommu/sbus/variable/variable/sd@3,0" for a solution. For more information, see the section on halting and booting in the System Administration Guide, Volume I. THE SYSTEM IS BEING SHUT DOWN NOW !!! ===================================== This message means the system is going down immediately and it's too late to save any changes. This message is often preceded by messages telling you that the system is going down in 15 minutes, 10 minutes, and so on. When you see these initial broadcast shutdown messages, save all your work, send any e-mail you're working on, and close your files. Fortunately vi sessions are automatically saved for later recovery, but many otherapplications have no crash protection mechanism. Data loss is likely. For more information on shutting down the system, see the System Administration Guide, Volume I. If you are using the AnswerBook, "halting the system" is a good search string. The system will be shut down in N minutes ========================================= Thismessage from the system shutdown(1M) script informs you that the superuser is taking down the system. Save all changes now or your work will be lost. Write out any files you were changing, send any e-mail messages you were composing, and close your files. For more information on shutting down the system, see the System Administration Guide, Volume I. If you are using the AnswerBook, "halting the system" is a good search string. This mail file has been changed by another mail reader. ======================================================= This message appears in a pop-up dialog box whenever you start mailtool(1) while another mail reader has the inbox locked. A question follows: "Do you wish to ask that mail reader to save the changes?" You are given three choices. If you choose "Save Changes" mailtool will request the other mail reader to relinquish its lock and write out any changes it has made to your inbox. If you choose "Ignore" mailtool will read your inbox without locking it. If you choose "Cancel" mailtool will exit. Timeout waiting for ARP/RARP packet =================================== This problem can occur while booting from the net, and indicates a network connection problem. Make sure the Ethernet cable is connected to the network. Check that this system has an entry in the NIS ethers map or locally on the boot server. Then check the IP address of the server and the client to make sure they are on the same subnet. Local /etc/hosts files must agree with each other and withthe NIS hosts map. If those are not causing the problem, go to the system's PROM monitor ok prompt and run test net to test the network connection. (On older PROM monitors, use test-net instead.) If the network test fails, check the Ethernet port, card, fuse, and cable, replacing them if necessary. Also check the twisted pair port to make sure it is patched to the correct subnet. For more information on packets, see SPARC: Installing Solaris Software. If you are using the AnswerBook, "ARP/RARP" isa good search string. Too many links ============== An attempt was made to create more than the maximum number of hard links (LINK_MAX, by default 32767) to a file. Because each subdirectory is a link to its parent directory, the same error results from trying to create too many subdirectories. Check to see why there are so many links to the same file. To get more than the maximum number of hard links, use symbolic links instead. The symbolic name for this error is EMLINK, errno=31. Too many open files =================== A process has too many files open at once. The system imposes a per-process soft limit on open files, OPEN_MAX (usually 64), which can be increased, and a per-process hard limit (usually 1024), which cannot be increased. You can control the soft limit from the shell. In the C shell, use the limit command to increase the number of descriptors. In the Bourne or Korn shells, use the ulimit command with the -n option to increase the number of file descriptors. If the window system refuses to start new applications because of this error, increase the open file limit in your login shell before starting the window system. The symbolic name for this error is EMFILE, errno=24. umount: warning: /variable not in mnttab ======================================== This message results when the superuser attempts to unmount a filesystem that is not mounted. Note that subdirectories of filesystems,such as /var, cannot be unmounted. Run the mount(1M) or df(1M) command to see what filesystems are mounted. If you really want to unmount one of them, specify the existing mount point. Unable to install/attach driver 'variable' ========================================== These messages appear in /var/adm/messages at boot time, when the system tries to load drivers for devices the machine does not have. Despite the alarmist tone, this message is intended as purely informational. You probably don't want all these device drivers, because they make your system kernel larger, requiring more memory. undefined control ================= This message, prefaced by the file name and line number involved, is from the C preprocessor /usr/ccs/lib/cpp, and indicates a line starting with a sharp (#) but not followed by a valid keyword such as define or include. A piece of software might be running the C preprocessor on an initialization file that you thought was interpreted by a shell. In most shells, the sharp (#) indicates a comment. The C preprocessor considers comments to be anythingbetween /* and */ delimiters. Unmatched ` =========== This message from the C shell csh(1) indicates that a user typed a command containing a backquote symbol (`) without a closeing backquote. Similar messages result from an unmatched single quote (') or an unmatched double quote ("). Other shells generally give a continuation prompt when a command line contains an unmatched quote symbol. Correct the command line and try again. To continue typing on another line, give the C shell a backslash right before the newline. UNREF FILE I=i OWNER=o MODE=m SIZE=s MTIME=t ============================================= CLEAR? ====== During phase 4, fsck(1M) discovered that the specified file was orphaned because the inode had no record of its pathname. In other words, the file was not connected into any directory. Answer yes to reconnect the file into the lost+found directory. Then contact the file's owner to ask whether they want it back, and where they want you to place it. For more information, see the chapter on checking filesystem integrity in the System Administration Guide, Volume I. Use "logout" to logout. ======================= This C shell message might come as a surprise to Bourne or Korn shell users accustomed to logging out with a Control-d. When ignoreeof is set, the C shell requires users to logout by typing logout or exit. Write any modified files to disk before exiting. /usr/openwin/bin/xinit: connection to X server lost =================================================== This means that the xinit(1) program, which sets up X11 resources and starts a window manager, failed to locate the X server process. Perhaps the user interrupted window system startup, or exited abnormally from OpenWindows (for example, by killing processes or by rebooting). It is possible that the X server crashed. Data loss is possible in some cases. Depending on process timing, this message might be normal when OpenWindows exits during a system reboot. The only solution is to exit and restart OpenWindows. You do not need to reboot the system unless it hangs and fails to give you a console prompt. To exit OpenWindows, select Workspace->Exit. To restart OpenWindows, type openwin at the system prompt. Value too large for defined data type ===================================== The user ID or group ID of an IPC object or file system object was too large to be stored in an appropriate member of the caller-provided structure. Run the application on a newer system, or ask the program's author to fix this condition. This error occurs only on systems that support a larger range of user or group ID values than a declared member structure can support. This condition usually occurs because the IPC or file system object resides on a remote machine with a larger value of type uid_t, off_t, or gid_t than that of the local system. The symbolic name for this error is EOVERFLOW, errno=79. WARNING: Clock gained N days-- CHECK AND RESET THE DATE! ======================================================== Each workstation contains an internal clock powered by a rechargeable battery. After the system is halted and turned off, the internal clock continues to keep time. When the system is powered on and reboots, the system notices that the internal clock has gained time since the workstation was halted. In most cases, especially if the power has been off for less than a month, the internal clock keeps the correct time, and you do not have to reset the date. Use the date(1) command to check the date andtime on your system. If the date or time is wrong, become superuser and use the date(1) command to reset them. WARNING: No network locking on variable: contact adminto install server change ===================================== The Solaris 2.x mount(1M) command issues this message whenever it mounts a filesystem that doesn't have NFS locking, such as a standard SunOS 4.1.x exported filesytem. Data loss is possible in applications that depend on locking. On the remote SunOS 4.1.x system, install the appropriate rpc.lockd jumbo patch to implement NFS locking. For SunOS 4.1.4, install patch #102264; for SunOS 4.1.3, install patch #100075; for earlier 4.1 releases, install patch #101817. WARNING: processorlevel 4 interrupt not serviced ================================================= This message is basically a diagnostic from the SCSI driver. Especially on machineswith the sun4c architecture, it can appear on the console every 10 minutes or so. To reduce the frequency of this message, add this line near the bottom of the /etc/system file and reboot: set esp:esp_use_poll_loop=0 You might also see this message repeatedly after manually removing a CD when it was busy. Don't do this! To get the system back to normal, reboot the system with the -r (reconfigure) option. WARNING: /tmp: File system full, swap space limit exceeded ========================================================== The system swap area (virtual memory) has filled up. You needto reduce swap space consumption by killing some processes or possibly by rebooting the system. See the message "Not enough space" for information about increasingswap space. WARNING: TOD clock not initialized-- CHECK AND RESET THE DATE! ========================================================-===== This message indicates that the Time Of Day (TOD) clock reads zero, so its time is the beginning of the UNIX epoch: midnight 31 December 1969. On a brand-new system, the manufacturer might have neglected to initialize the system clock. On older systems it is more likely that the rechargeable battery has run out and requires replacement. First replace the batteryaccording to the manufacturer's instructions. Then become superuser and use the date(1) command to set the time and date. On SPARC systems the clock is powered by the same battery as the NVRAM, so a dead battery also causes loss of the machine's Ethernet address and host ID, which are more serious problems for networked systems. WARNING:Unable to repair the / filesystem. Run fsck ==================================================== This message comes at boot time from the /etc/rcS script whenever it gets a bad return code from fsck(1) after checking a filesystem. The message recommends an fsck command line, and instructs you to exit the shell when done to continue booting. Then the script places the system in single-user mode so fsck can be run effectively. See "/dev/rdsk/variable: UNEXPECTED INCONSISTENCY" for information about repairing UFS filesystems. See "THE FOLLOWING FILE SYSTEM(S) HAD AN UNEXPECTED INCONSISTENCY" for information about repairing non-UFS filesystems. Watchdog Reset ============== This fatal error usually indicates some kind of hardware problem. Data corruption on the system is possible. Look for some other message that might help diagnose the problem. By itself, a watchdog reset doesn't provide enough information; because traps are disabled, all information has been lost. If all that appears on the console is an ok prompt, issue the PROM command below to view the final messages that occurred just before system failure: ok f8002010 wector p Yes, that word iswector, not vector. The result is a display of messages similar to those produced by the dmesg(1M) command. These messages can be useful in finding the cause of system failure. This message doesn't come from the kernel, but from the OpenBoot PROM monitor, a piece of Forth software that gives you the ok prompt before you boot UNIX. If the CPU detects a trap when traps are disabled (an unrecoverable error), it signals a watchdog. The OpenBoot PROM monitor detects the watchdog, issues this message, and brings down the system. Watchdog Reset, Rebooting. ========================== See the message "Watchdog Reset" for details. This rebooting message occurs under the same conditions, but when the EEPROM's watchdog-reboot? variable is set to true, causing the machine to automatically reboot itself. Data corruption on the system is possible. Who are you? ============ Many networking programs can print this message, including from(1B), lpr(1B), lprm(1B), mailx(1), rdist(1), sendmail(1M), talk(1), and rsh(1). The command prints this message when it cannot locate a password file entry for the current user. This might occur if a user logged in just before the superuser deleted that user's password entry, or if the network naming service fails for a user who has no entry in the local password file. If a user's password file entry was accidentally deleted, restore it from backups or from another password file. If a user's login name or user ID was changed, ask that user to logout and login again. If the network naming service failed, check the NIS server(s) and repair or reboot as necessary. There is a known problem (bug 1138025) with starting hundreds of rsh processes on another machine. This message appears because rsh hangs while binding to a reserved port, and responds too slowly to interact with the network naming service. Window Underflow ================ This message often occurs at boot time, sometimes along with a "Watchdog Reset" error. It comes from the OpenBoot PROM monitor, which was passed a processor trap from the hardware. This error indicates that some programtried to access a SPARC register window that wasn't accessible from the processor. On some system architectures, specifically sun4c, the problem could be that different capacity memory chips are mixed together. Someone might have placed 1MB SIMMs in the same bank with 4MB SIMMs. If this is so, rearrange the memory chips. Make sure to put higher-capacity SIMMs in the first bank(s), and lower- capacity SIMMs inthe remaining bank(s); never mix different capacity SIMMs in the same bank. The problem could also be that cache memory on the motherboard has gone bad and needs replacement. If main memory is installed correctly, try swapping the motherboard. The best way to isolate the problem is to look at the %pc register to see where it got its arguments from, and why the arguments were bad. If you can reproduce the condition causing this message, your system vendor might be able to help diagnose the problem. X connection to variable:0.0 broken (explicit kill or server shutdown). ================= This means that the client has lost its connection to the X server. The "0.0" represents the display device, which is usually the console. This message can appear when a user is running an X application on a remote system with the DISPLAY set back to the original system and the remote system's X server disappears, perhaps because someone exited X windows orrebooted the machine. It sometimes appears locally when a user exits the window system. Dataloss is possible if applications were killed before saving files. Try to run the application again in a few minutes after the system has rebooted and the window system is running. xinit: not found ================ OpenWindows was probably not installed properly, and the openwin(1) program could not find xinit(1) to start up the X windows system. If the user is running another version of X windows, such as the MIT X11 distribution, the startx program serves the same function as xinit. Check the PATH environment variable to make sure it contains the appropriate X windows install directory. Verify that xinit is in this directory as an executable program. XIO: fatal IO error 32 (Broken pipe) on X server "variable:0.0" =============================================================== This means that I/O with the X server has been broken. The "0.0" represents the display device, which is usually the console. This message can appear when a user is running Display PostScript applications and the X server disappears or the client is shut down. Data loss is possible if applications disappeared before saving files. Try to run the application again in a few minutes after the system has rebooted and the window system is running. Xlib: Client is not authorized to connect to Server =================================================== See the message "Xlib: connection to ... refused by server" for details. Xlib: connection to "variable:0.0" refused by server ==================================================== This message is immediately followed by the "Xlib: Client is not authorized to connect to Server" message. These messages indicate that an X windows application tried to run on the X server specified inside double quotes, which did not allow the request. The "0.0" represents the display device, which is usually the console. If no server name appears, the superuser probably tried to run an X application on the current machine in an X session that was owned by somebody else. To allow this client to connect to the X server, run xhost +clientname on the X server system. Only the owner of the current X session (who is not necessarily the superuser) isallowed to run the xhost command. If somebody else is running X windows on the server, ask them to log out and then start your own X session on that server; remote X connections are usually allowed for the same user ID. xterm: fatal IO error 32 (Broken Pipe) or KillClient on X server variable:0.0" ============= This means that xterm(1) has lost its connection to the X server. The "0.0" represents the display device, which is usually the console. This message can appear when a user is running xterm and the X server disappears or the client gets shut down. Data loss is possible if applications were killed before saving files. Try to run the terminal emulator again in a few minutes after the system has rebooted and the window system is running. XView warning: Cannot load font set 'variable' (Font Package) ============================================================= This message from the XView library warns that a requested font is not installed on the X server. Often multiple warnings appear about the same font. The set of available fonts can vary from release to release. To see which fonts are available on the X server, run the xlsfonts(1) program. Then specify another font name that you see in the output of xlsfonts. Sometimes it is possible to locate a similar font from a different vendor. There are two packages of X windowsfonts: the common but not required fonts (SUNWxwcft), and the optional fonts (SUNWxwoft). Run pkginfo(1) to see if both these packages are installed, and add them to the system as you wish. ypbind[N]: NIS server for domain "variable" OK ============================================== This message appears after an "NIS server not responding" message to indicate that ypbind(1M is able to communicate with an NIS server again. Proceed with your work. This message is purely informational. ypbind[N]: NIS server not responding for domain "variable"; still trying ========================= This means that the NIS client daemon ypbind(1M) cannot communicate with an NIS server for the specified domain. This message appears when a workstation running the NIS naming service has become disconnected from the network, or when NIS servers are down or extremely slow to respond. If other NIS clients are behaving normally, check the Ethernet cabling on the workstation that is getting this message. On SPARC machines, disconnected network cabling also produces a series of "no carrier" messages. On x86 machines, the above message might be your only indication that network cabling is disconnected. If many NIS clients on the network are giving this message, go to the NIS server in question and reboot or repair as necessary. To locate the NIS server for a domain, run the ypwhich(1) command. When the server machine comes back in operation, NIS clients give an "NIS server for domain OK" message. For more information about ypbind, see the section on administering secure NFS in the NFS Administration Guide. ypwhich: can't communicate with ypbind ====================================== This message from the ypwhich(1) command indicates that the NIS binder process ypbind(1M) is not running on the local machine. If the system is not configured to use NIS, this message is normal and expected. Configure the system to use NIS if necessary. If the system is configured to use NIS, but the ypbind process is not running, invoke the following command to start it up: # /usr/lib/netsvc/yp/ypbind -broadcast zsN: silo overflow ================== This message means that the Zilog 8530 character input silo (or serial portFIFO) overflowed before it could be serviced. The zs(4S) driver, which talks to a Zilog Z8530 chip, is reporting that the FIFO (holding about two characters) has been overrun. The number after zs shows which serial port experienced an overflow: zs0 - tty serial port 0 (/dev/ttya) zs1 - tty serial port 1 (/dev/ttyb) zs2 - keyboard port (/dev/kbd) zs3 - mouse port (/dev/mouse) Silo overflows indicate that data in the respective serial port FIFO has been lost. However, consequences of silo overflows might be negligible if the overflows occur infrequently, if data loss is not catastrophic, or if data can be recovered or reproduced. For example, although a silo overflow on the mouse driver (zs3) indicates that the system could not process mouse events quickly enough, the user can perform mouse motions again. Similarly, lost data from a silo overflow on a serial port with a modem connection transferring data using uucp(1C) will be recovered when uucp discovers the loss of data and requests retransmission of the corrupted packet. Frequent silo overflow messages can indicate a zs hardware FIFO problem, a serial driver software problem, or abnormal data or system activity. For example, the system ignores interrupts during system panics, so mouse and keyboard activity result in silo overflows. If the serial ports experiencing silo overflows are not being used, a silo overflow could indicate the onset of a hardware problem. Another type of silo overflow is one that occurs during reboot when an HDLC line is connected to any of the terminal ports. For example, an X.25 network could be sending frames before the kernel has been told to expect them. Such overflow messages can be ignored. >>>> PART II <<<<: ================== Error Message interpretation See below for a list of common error messages. Traps and interrupts can be blocked by a kernel thread's signal mask, or they can trigger an exception handling routine. In the absence of such a routine or mask, the process is terminated. Traps Traps are syncronous messages generated by the process or its underlying kernel thread. Examples include SIGSEGV, SIGPIPE and SIGSYS. They are delivered to the process that caused the signal. Trap messages can be discovered in a number of places, including error logs, adb output, and console messages. Sun provides a couple of files that can help determine the type of trap encountered: /usr/include/sys/trap.h (software traps) /usr/include/v7/sys/machtrap.h (hardware traps, 32 bit) /usr/include/v9/sys/machtrap.h (hardware traps, 64 bit) ECC (Error Checking and Correcting) interrupts are reported as traps when a bit error is corrected. These, while they do not crash the system, are usually a signal that the memory chip in question needs to be replaced. Critical errors include things like fan/temperature warnings or power loss that require immediate attention and shutdown. Fatal errors are hardware errors where proper system function cannot be guaranteed. These result in a watchdog reset. Bus Errors A bus error is issued to the processor when it references a location that cannot be accessed. Illegal address: (usually a software failure) Instruction fetch/Data load: (device driver bug) DVMA: (on an Sbus system) Synchronous/asynchronous data store MMU: (Memory Management Unit: can be hardware or software, but frequently are system board problems.) Interrupts These notify the CPU of external device conditions that are asynchronous with normal operation. They can be delivered to the responsible process or kernel thread. In Solaris, interrupts are handled by dedicated interrupt-handling kernel threads, which use mutex locks and semaphores. The kernel will block interrupts in a few exceptional circumstances, such as during the process of acquiring a mutex lock protecting a sleep queue. Device done or ready. Error detected. Power on/off. Watchdog Reset Watchdog resets can be caused by hardware or software issues. See the watchdog reset page for information on how to troubleshoot watchdog resets. Error Message List A complete (or even reasonably complete) listing of error messages on Solaris is beyond the scope of this site. For that matter, the nature of an evolving operating system may put it beyond the scope of any reasonably sized page. Maybe a wiki? If someone has such a resource, let me know and I will link to it. Having said that, this page contains a list of several of the most common error messages. Where I have been able to identify a usual cause for an error message, I have included that. There are several sources that contain listings of error messages that are useful for debugging purposes. One of the best resources is the Solaris Common Messages and Troubleshooting Guide released by Sun with Solaris 8. Since this is a better resource than I could provide for Solaris up through 8, I have focused on Solaris 10. (There is obviously a lot of overlap.) The SunSolve web site is available to anyone with a Sun service contract. Its search feature can be used to look up key words in an error message to look for current bug reports and patches that may resolve them. This page does not provide a listing of bug reports or patches to apply for given error messages in certain conditions. This page is intended as a supplement to Sunsolve, not a replacement. The Intro(2) man page contains an introduction to system calls and error numbers. The information comes from the errno.h include file. Several include files contain at least basic information about different kinds of error messages: /usr/include/sys/errno.h (error messages, including abbreviations and numbers seen in truss output.) /usr/include/sys/trap.h (software traps) /usr/include/v7/sys/machtrap.h (hardware traps, 32 bit) /usr/include/v9/sys/machtrap.h (hardware traps, 64 bit) These messages are alphabetized by the first non-variable portion of the message. Wording may vary slightly between Solaris versions or even patch levels. If you run across common messages not on this list, feel free to make a comment to the Solaris Troubleshooting blog. Accessing a corrupted shared library (ELIBBAD): exec(2) was unable to load a required static shared library. The most common cause for this is a corrupted library. Address already in use (EADDRINUSE): The protocol does not permit using an address that is already in use. This error indicates a software programming bug. Address family not supported by protocol family (EAFNOSUPPORT): The protocol does not support the requested address. This indicates a software programming bug. Arg list too long (E2BIG): The argument list includes both the argument list and the environment variable settings. The most common cause for this problem is that so many environment variables are set that it exceeds the size of the argument buffer used by exec(2). The easiest solution may be to unset some environment variables in the calling shell. Argument out of domain (EDOM): This error appears when an improper argument is submitted to a math package programming function. (For example, an attempt to take a square root of a negative number would probably yield this error.) It may be helpful to use matherr(3M) to diagnose the problem, or the programmer may need to implement argument-checking before the function is called. Arguments too long: This is a C shell message indicating that more than 1706 arguments follow a command. This may happen if globbing is applied to a large number of objects (eg rm * in a directory of more than 1706 objects). Temporarily switching to Bourne shell may resolve the problem, since Bourne shells dynamically allocate space for arguments. Assertion failed: This is a result of an assert(3C) debugging command that the programmer inserted into the program. The output will include an expression, a source file number and a code line number. The information may be useful in examining the source code. Attachment point not found: Use cfgadm to list available attachment points. Check the physical connection to the desired device. Attempting to link in more shared libraries than system limit (ELIBMAX): The executable requires more static libraries than the current system limit. authentication receive failed: Initiator unable to receive authentication information. Verify network connectivity to storage device and authentication server. authentication transmit failed: Initiator unable to transmit authentication information. Verify network connectivity to storage device and authentication server. Bad address (EFAULT): A function taking pointer argument has been passed an invalid address. This may result from supplying the wrong device or option to a command, or it may be the result of a programming bug. Bad file number (EBADF): The file descriptor references a file that is either not open or is open for a conflicting purpose. (eg, a read(2) is specified against a file that is open for write(2) or vice-versa.) This is a programming bug. Bad module/chip: This error message usually indicates a memory module or chip that is associated with parity errors. This is a hardware fault. BAD SUPER BLOCK: Check the Trap 3E entry below to see if there are possible hardware or SCSI configuration causes for this problem. It may be possible to boot from alternate super blocks. If there is no current backup, boot from a CD and back up the raw partition with ufsdump or another similar utility. Solaris 10's 6/06 release includes enhancements to fsck to automatically find and repair bad superblocks. This option should only be used to repair filesystems that were created with mkfs or newfs. For older systems, an alternate superblock can frequently be found with a newfs -N /dev/rdsk/c#t#d#s# command while booted from a CD. (Note the -N option. Running this command without this option may mess things up beyond repair.) fsck can be run against an alternate superblock with fsck -o b=superblock /dev/rdsk/c#t#d#s# If there is a lot of output, it may be necessary to choose the -y option to avoid having to answer a ton of prompts. We may need to try several alternate superblocks before finding a working one. Once we are done, we need to re-install the bootblock: cd /usr/platform/`arch -k`/lib/fs/ufs /usr/sbin/installboot ./bootblk /dev/rdsk/c#t#d#s# BAD TRAP: The causes for bad traps include system text errors, data access faults, data alignment errors or some types of user software traps. These can indicate either a hardware fault or a mismatch between the hardware and its software configuration. They may also indicate a CPU with an obsolete firmware. Bad traps usually result in a panic, sync, dump, reboot cycle. The kernel traceback message on the console will frequently indicate the hardware component that generated the bad trap. If the configuration for this component is correct, it will need to be replaced (or at least reseated). /bin/sh: ... too big: This Bourne shell message is a variant of Not enough space. Check that message for steps to take. Block device required (ENOTBLK): A raw device was specified where a block device is required. Broken pipe (EPIPE): No reading process was available to accept a write on the other end of a pipe. This can happen when the reading process (the process after the pipe) exits suddenly. Bus Error: I/O was attempted to a device that is unavailable or does not exist. See Bus Error above. Cannot access a needed shared library (ELIBACC): Either the library does not exist, the LD_LIBRARY_PATH variable does not include the library, or the user is not permissioned to use it. The library in question can usually be pinned down with truss. Cannot assign requested address (EADDRNOTAVAIL): The requested address is not on the current machine. Cannot exec a shared library directly (ELIBEXEC): You can't execute shared libraries directly. This error indicates a software bug. Cannot install bootblock: On an x86 system, this error typically appears when a newfs and restore operation was carried out without performing a installboot before installing the OS. It may be possible to install the bootblock from the CD drive in single-user mode (note that Sun does not guarantee this procedure): cd /usr/platform/`arch -k`/lib/fs/ufs installboot ./pboot ./bootblk /dev/rdsk/c#t#d#s# Cannot send after transport endpoint shutdown (ESHUTDOWN): The transport endpoint has been shut down, so data was unable to be sent. The solution is usually to restore the endpoint and re-run the transfer. (We may need to troubleshoot why the remote endpoint became unavailable.) can't accept: Initiator does not accept the specified data of the given format. Consult storage device documentation to look for compatibility information for the server hardware and OS. can't accept ... in security stage: Device responded with unsupported login information during login security phase. Verify storage device authentication settings. Consult storage device documentation to look for compatibility information for the server hardware and OS. can't find environment variable: The specified environment variable has not been set. Check for a typo and/or verify that the variable has been set. Can't invoke /etc/init: The init binary is missing or corrupted during a reboot. We may be able to complete the boot by copying init from a CDROM during a CDROM reboot. capacity of this LUN is too large: SCSI partitions must be less than 2TB. Channel number out of range (ECHRNG): A stream head attempted to open a minor device that is in use or does not exist. We need to make sure that the stream device exists, along with an appropriate number of minor devices, and that it matches the hardware configuration. It may be necessary to schedule jobs differently to allow for limited system resources. check boot archive content: If SMF does not start up on its own, this message in response to svcs -x may indicate a failure of svc:/system/boot-archive:default To resolve this problem, select the Solaris failsafe archive option in the GRUB boot menu during the next reboot. The failsafe boot option provides instructions for rebuilding the boot archive. Once that is complete, the boot can be continued by clearing the SMF boot archive with the svcadm clear boot-archive command. Command not found: This is a C shell error message that means exactly what it says. It typically means that the command was misspelled or does not live on the PATH. Communication error on send (ECOMM): The link between machines breaks after data is sent, but before the confirmation is received. Component system is busy, try again: failed to offline: cfgadm attempted to remove or replace a device with a mounted file system, swap area or configured dump device. Unmount the file system, remove the swap and/or disable the dump device, then retry the cfgadm command. See the cfgadm(1M) man page. Configuration operation invalid: invalid transition: The incorrect device may have been specified, or there may be a problem with the device or its seating. Use cfgadm to check the receptacle and its state. The card may need to be reseated. Connection refused (ECONNREFUSED): The target machine actively refused the connection. The service may not be active, or there may be restrictions on connections (such as the hosts.allow and hosts.deny in TCP wrappers). Connection reset (ECONNRESET): The target system forcibly closed an existing connection. This typically happens as a result of a reboot or a timeout. Connection timed out (ETIMEOUT): The target host is unreachable due to network problems or the system being down. Core dumped: A core file (image of software memory at the time of failure) has been taken. See Core File Management. Corrupt label: This happens if cylinder 0 has been overwritten, usually by a database using a raw partition including cylinder 0. The best solution is to back everything up and repartition the disk with cylinder 0 either not in any partition or at least in a partition with a filesystem (such as UFS) that respects cylinder 0. cpio: Bad magic number/header: The cpio archive has become corrupted. We can try to recover whatever we can by using the cpio -k command. Cross-device link (EXDEV): Hard links are not permitted across different filesystems. Use a soft link instead. Data access exception: Mismatch between the operating system and disk storage hardware. This can be due to mis-seated DIMMs or disk problems, so it makes sense to try to identify any hardware problems. Usually, the operating system (and perhaps filesystem) will need to be upgraded to deal with the newer hardware. DataDigest=... is required, can't accept: Device returned an improperly processed DataDigest. Verify that storage device digest settings are compatible with the initiator. Data Fault: This is a particular type of bad trap that indicates a configuration text or data access fault. See BAD TRAP above. Deadlock situation detected/avoided (EDEADLK): A potential deadlock over a system resource (usually a lock) was detected and avoided. The software should be examined to see if it can be made more resilient. Destination address required (EDESTADDRREQ): An address was omitted from an operation that requires one. /dev/fd/#: cannot open: Indicates that the file descriptor file system (fdfs) is not mounted correctly. In most cases, the problem is that it is mounted either nosuid or not at all. The file descriptor file system should have the following options in the vfstab: fd - /dev/fd fd - no - Device busy (EBUSY): A hard drive or removable media failed to unmount or eject due to an active process using them. The fuser command allows us to see what processes are using the filesystem or even kill them with a command like: fuser -ck /mountpoint (Make sure that you know what processes are running on a filesystem before killing them.) DIMMs Manufacturer Mismatch: DIMMs in the system are not on the hardware compatibility list. Directory not empty: This is an error from rmdir which means exactly what it says. Non-empty directories cannot be removed. (If a process is holding a file open, it is possible to track down the culprit by looking for the inode of the file in question (ls -i filename) in pfiles output.) Disc quota exceeded (EDQUOT): A user's disk quota has been exceeded. Some of the user's files can be removed or the quotas can be increased with edquota. Disk# not unique: This error is displayed if there are multiple EEPROM devalias entries for a disk. At the ok> prompt, the values of the aliases can be shown with ok> printenv the aliases can be reset with ok> nvunalias disk# ok> nvalias disk# device-path dquot table full: The UFS quota table needs to be increased in size. This is done by increasing ndquot in /etc/system and rebooting. ndquot defaults to (maxusers x 40)/4 + max_nprocs dr in progress: This error may occur if a SCSI unconfigure operation fails while only partially completed. The controller may need to be reconfigured with cfgadm driver not attached: No driver currently attached to the specified device because no device exists at the node or the device is not in use. This may or may not mean that a proper driver is not installed. Make sure that the driver is installed and properly configured. empty RADIUS shared secret: The RADIUS shared secret needs to be set. Error 88 (EILSEQ): This is an illegal byte sequence error. Multiple characters have been provided where only one is expected. Error code 2: access violation: This error is due to a permissioning or pathing error on a tftp get. Error: missing file arg (cm3): A filename was not included in an sccs command that requires one. error opening dir: The specified path may not be a directory. error writing name when booting: /etc/nodename must contain exactly one line with the name of the system and no blanks or returns. esp0: data transfer overrun: This error appears when we attempt to mount a CD drive with an 8192 block size as opposed to the Sun-standard 512 block size. Check with the drive manufacturer to see if the block size can be switched. ether_hostton: Bad file number/Resource temporarily unavailable: These messages may be a result of a mis-matched nodename file. Make sure that the /etc/nodename entry matches the corresponding /etc/hostname.interface and /etc/inet/hosts files. Event not found: The shell reports that a command matching the request cannot be found in the history buffer for the shell session. The history command shows the current contents of the history buffer. Exec format error (ENOEXEC): This error usually means that the software was compiled for an architecture other than the one on which it finds itself. This may also happen if an expected binary compatibility package is not installed. The file command displays the expected architecture for the binary. Failed to initialize adapter: If the adapter has been correctly identified, this means that the configuration of the adapter is incorrect. In particular, make sure to check the DMA settings. Failed to receive login response: Initiator failed to receive a login Payload Data Unit (PDU) across the network. Verify that the network connection is working. Failed to transfer login: Initiator failed to transfer a login Payload Data Unit (PDU) across the network. Verify that the network connection is working. Fast access mmu miss: This is usually due to a hardware problem. Memory is a possible culprit, as are the system board and CPU. Check PROM Monitor Diagnostics for hardware diagnostics on OBP/Sparc systems. File descriptor in bad state (EBADFD): The requested file descriptor does not refer to an open file or it refers to a file descriptor that is restricted to another purpose. (For example, a read request is made to a file descriptor that is open for writing only.) File exists (EEXISTS): An existing file was targeted for a command that would have overwritten it improperly. For example, there may have been a request to overwrite a file while the csh noclobber option is set, or there may have been a request to set a link to the name of an existing file. File locking deadlock (EDEADLOCK): Two processes deadlocked over a resource, such as a lock. This is a software programming bug. File name too long (ENAMETOOLONG): The referenced file name is longer than the limit specified in /usr/include/limits.h. File system full: The file system is full. (Error messages sometimes mean what they say.) If the message occurs during a login, the problem is likely the filesystem that includes the utmpx file (usually /var). File too large (EFBIG): The file size has grown past what is allowed by the protocol or filesystem in question, or exceeds the resource limit (rlimit) for file size. The resource limit can be checked by running ulimit -a in Bourne or Korn shells or limit in C shell. Check the Resource Management page for additional information on managing resource limits. Giving up: In the context of a SCSI command, this means that the timeout has been exceeded. This is usually due to a hardware or connection problem, but it can be caused by contention on the SCSI channel, or even a mis-match in timeout settings between the OS and the device in question. Hardware address trying to be our address: Either we have two systems on our network with the same IP address, or we have snooping enabled on a device on the network. Host is down (EHOSTDOWN): A connection attempt failed because the target system was unavailable. HeaderDigest=... is required, can't accept: Device returned an improperly processed HeaderDigest. Verify that storage device digest settings are compatible with the initiator. Host name local configuration error: sendmail wants to have a fully qualified domain name for the local host. It is good practice to include a fully qualified domain name in the hosts file entry for the local server. Hypertransport Sync Flood occurred on last boot: Uncorrectable ECC error caused the last reboot. For x64 systems, check the service processor's System Event Log and BIOS log to identify the culprit. Identifier removed (EIDRM): There is a problem accessing a file associated with messaging, semaphores or shared memory. Check the msgctl(2), semctl(2) or shmctl(2) man page for more details. ieN Ethernet jammed: The number of successive failed transmission attempts has exceeded the threshold. Check whether the network is saturated or check for other network problems. ieN no carrier: The carrier detect pin died during a packet transmission, resulting in a dropped packet. Check for loose connections and otherwise check the network. If pipe/FIFO, don't sleep in stream head (ESTRPIPE): There is a problem with the STEAMS connection. ifconfig: bad address: Check /etc/hostname.* to make sure that the entries match the hosts file. When this error occurs early in the boot process, make sure that the filesystem containing hostname.* and hosts is online at that stage of the boot process. If "files" is not the first entry in the "hosts" line of /etc/nsswitch.conf, the hostname lookup will not be possible until the interface comes online. ifconfig: no such interface: Make sure that the /etc/hostname.interface file exists. Illegal instruction: This error message means exactly what it says. This may come about because the binary is not compiled for this architecture (see "Exec format error" above), or it may come as a result of trying to run a data file as a program. If this appears during a boot, it means that the system is trying to boot from a non-boot device, that the boot information has become corrupted, or that the boot information is meant for a different architecture. Illegal seek (ESPIPE): There is a problem with a pipe in the statement. A workaround suggested by Sun is to redirect the output of the source command to a scratch file, then process the file. Initiator could not be successfully authenticated: Verify CHAP and/or RADIUS settings, as appropriate. Initiator is not allowed access to the given target: Verify initiator name, masking and provisioning. initiator name is required: The initiator name is improperly configured. Interrupted system call (EINTR): An signal (like an interrupt or quit) was received before the system call had completed. (If we try to resume, we may error out as a result of this condition.) Invalid argument (EINVAL): System cannot interpret a supplied parameter. Depending on the context, this may be an indication that the object named by the parameter is not set up properly. Invalid null command: This may indicate that there were two pipes in a row ("||") in the referenced command. I/O error (EIO): This references a physical I/O fault. Depending on the context, it makes sense to replace the removable media, check all connections, run diagnostics on the referenced hardware or fsck the filesystem. If this error occurs during a write, we must assume that the data is corrupt. Is a directory (EISDIR): We tried to treat a directory like a file. iSCSI service or target is not currently operational: Run diagnostics on the storage device hardware; check storage device software configuration. Kernel read error: savecore is unable to read the kernel data structures to produce a crash dump. This may indicate a hardware problem, especially a memory problem. This problem may accompany a BAD TRAP error. Killed: This may happen as a result of a memory allocation attempt where either there is insufficient swap space or the stack and data segment size are in conflict. A "Killed" message may also appear when a program is sent a SIGKILL by other means, such as a kill command. kmem_free block already free: This is a software programming bug, probably in a device driver. ld.so.1 fatal: can't set protection on segment: Sun reports a case where this error occurred due to a lack of swap space. ld.so.1 complained because there was no segment on which to set protections. ld.so.1 fatal: open failed: No such file or directory: The linker was unable to find the shared library in question. Make sure that LD_LIBRARY_PATH is set properly. ld.so.1 fatal: relocation error: referenced symbol not found: The symbol referenced by the specified application was not found. This error most frequently occurs after installations or upgrades of shared libraries. ldd -d on the application will show its dependencies. Depending on the nature of the conflict, it may be resolvable by changing the LD_LIBRARY_PATH or installing an appropriate version of the shared library. Link has been severed (ENOLINK): The connection to a remote machine has been severed, either by the remote process dying or a network problem. Login incorrect: This error means that an appropriate username and password pair was not entered. This may be due to a problem with the passwd and shadow file, the naming service, or the user forgetting login credentials. login redirection failed: Storage device attempted to redirect initiator to an invalid destination. Verify storage device redirection settings. Memory Configuration Mismatch: Can be caused by damaged or unsupported DIMMs, or by running non-identical DIMMs within the same bank. Message too long (EMSGSIZE): A message was sent that was larger than the internal message buffer. Miscellaneous iSCSI initiator errors: Check the initiator. Missing parameters (e.g, iSCSI initiator and/or target name): Verify that the initiator and target name are properly specified. mount: ...already mounted... (EBUSY): Either the filesystem is mounted elsewhere, an active process has its working directory inside the mount point or the maximum number of mounts has been exceeded. mount: giving up on...: The remote mount request was unsuccessful for more than the threshold number of retries. Check the network connection and make sure that the NFS server is sharing the directory to the client as expected. mount: mount-point...does not exist: The directory specified as the mount point does not exist. mount: the state of /dev/dsk/... is not okay: The filesystem should either be mounted read-only or fsck-ed. Network dropped connection because of reset (ENETRESET): The remote host crashed or rebooted. Network is down (ENETDOWN): A transport connection failed due to a dead network. Network is unreachable (ENETUNREACH): Either there is no route to the network, or negative status information was received from intermediate network devices. NFS getattr failed for server...RPC: Timed out: The NFS server has failing hardware. (For a server that is slow to respond, the NFS server not responding message would appear instead.) nfs mount: Couldn't bind to reserved port: The NFS server has multiple network cards bound to the same subnet. nfs mount: mount:...Device busy: An active process has a working directory inside the mount point. NFS mount:...mounted OK: A backgrounded mount completed successfully. This may be an indication that the server response is poor, since otherwise the mount would have completed immediately and not required backgrounding. NFS read failed for server: This is a permissions problem error message. In addition to checking the permissions on the NFS server, make sure that the permissions underneath the mount are acceptable. (Mount points should have 755 permissions to avoid odd permissioning behavior on mounted filesystems.) nfs_server: bad getargs: The arguments are unrecognized or incorrect. This may be an indication of a network problem, or it may indicate a software configuration problem on the client. NFS server ... not responding: The network connection to the NFS server is either slow or broken. NFS server ... ok: The network connection to the NFS server has been restored. This is a followup to NFS server ... not responding. nfs umount: ... is busy: An active process has a working directory inside the specified NFS mount. See the Device busy error message. NFS write error on host ... No space left on device: If an NFS mount runs out of space, attempts to write to files on the share may corrupt or zero out those files. NFS write failed for server ... RPC: Timed out: The filesystem is soft mounted, and response time is inadequate. Sun recommends that writable filesystems not be soft-mounted, as it can lead to data corruption. No carrier-cable disconnected or hub disabled?: This error may manifest due to a physical networking problem or a configuration issue. No child processes (ECHILD): An application attempted to communicate with a cooperating process that does not exist. Either the child exited improperly or failed to start. No default media available: Drives contain no floppy or CD media to eject. No directory! Logging in with home=/: The home directory either does not exist or is not permissioned such that the user can use it. If home directories are automounted, it may be necessary to troubleshoot the automounter. no driver found for device: A driver has been disabled while the device is still attached. Depending on the type of device, cfgadm, drvconfig, devfsadm or a reconfiguration reboot (boot -r) may be required. Check the System Administration Guide: Devices and File Systems document. No message of desired type (ENOMSG): Something attempted to receive a message of a type that does not exist on the message queue. See the msgsnd(2) and msgrcv(2) man pages. No record locks available (ENOLCK): Any of several different locking subsystems, including fcntl(2), NFS lockd and mail, may yield this message when no more locks are available. No route to host (EHOSTUNREACH): In practice, this message is not distinguishable from Network is unreachable. No shell Connection closed: The shell specified for the user is either unavailable or illegal. Make sure it is listed in /etc/shells and that it exists. It may be necessary to change the passwd entry for this user to assign a valid shell. No space left on device (ENOSPC): The disk, tape or diskette is full. No such device (ENODEV): An operation was attempted on an inappropriate or nonexistent device. Make sure that it exists in /devices and /dev. The drvconfig or boot -r commands can be used to regenerate many /devices entries. No such device or address (ENXIO): I/O has been attempted to a device that does not exist or that exists beyond the limits of the device. Make sure that the device in question is powered up and connected properly, including the correct SCSI ID. No such file or directory (ENOENT): The file or path name does not exist on the system. Make sure that the relevant filesystems are mounted and that the expected files and/or directories exist. No such process (ESRCH): The process does not exist on the system. It may have finished prior to the attempt to reference it. No such user ... cron entries not created: Even though a file exists in /var/spool/cron/crontabs for this username, the username is not present in the passwd database. No utmpx entry: The filesystem containing the utmpx file is full. This may need to be resolved in single-user mode, since logins will not be permitted. Not a data message (EBADMSG): Data has come to the head of a STREAMS queue that cannot be processed. See the man pages for read(2), getmsg(2) and ioctl(2). Not a directory (ENOTDIR): A non-directory was specified as an argument where a directory is required. Not a stream device (ENOTSTR): The file descriptor used as a target for the putmsg(2) or getmsg(2) is not a STREAMS device. Not a UFS filesystem: The boot device is improperly defined. For x86, boot the system with the Configuration Assistant/boot CD and identify the disk from which to boot. For PROM-based systems, set the boot-device properly in the PROM environment variables. Not enough space (ENOMEM): Insufficient swap space available. Not found: The specified command could not be found. Check the spelling and the PATH. Not login shell: Use exit to get out of non-login shells. (The logout command can only be used from login shells.) Not on system console: Direct root logins are only permitted on the system console unless otherwise specified in /etc/default/login. Not owner (EPERM): Action attempted that can only be performed by object owner or the superuser. Not supported (ENOTSUP): A requested application feature is not available in the current version, though it may be expected in a future release. Object is remote (EREMOTE): We tried to share a resource not on the local machine. Operation already in progress (EALREADY): An operation was already in progress on a non-blocking object. Operation canceled (ECANCELED): The asynchronous operation was canceled before completion. Operation not applicable (ENOSYS): No system support exists for this operation. Operation not supported on transport endpoint (EOPNOTSUPP): Tried to accept a connection on a datagram transport endpoint. Operation now in progress (EINPROGRESS): Operation in progress on a non-blocking object. Option not supported by protocol (ENOPROTOOPT): A bad option or level was specified. Out of memory: System is running out of virtual memory (including swap space). See "Not enough space" as well. Out of stream resources (ENOSR): No STEAMS queues or no STREAMS head data structures available during a STREAMS open. Overlapping swap volume: Make sure that the additional swap volumes have unique names. Package not installed (ENOPKG): The attempted system call belongs to a package that is not installed on this system. Paired DIMMs Mismatch: Checksum mismatch between two DIMMs in a pair. Can be caused by damaged or non-identical DIMMs. Panic - boot: Could not mount filesystem: (During a Jumpstart) The Jumpstart boot process is unable to get to the install image. Make sure that the Jumpstart configurations and file shares are correct. Panic ... valloc'd past tmpptes: May occur if maxusers is set to an absurdly high number. It should not be set past the number of MB of RAM or 4096, whichever is smaller. Permission denied (EACCES): The attempted file access is forbidden due to filesystem permissions. Protocol family not supported (EPFNOSUPPORT): The protocol has not been implemented on this system. Protocol not supported (EPROTONOSUPPORT): The protocol has not been configured for this system. Check the protocols database (/etc/inet/protocols by default). Protocol wrong type for socket (EPROTOTYPE): Application programming error or misconfigured protocols. The requested protocol does not support the requested socket type. Make sure that the protocols database matches with the corresponding entries in /usr/include/sys/socket.h. quotactl: open Is a directory: A directory named "quota" can cause edquota to fail. Such directories should be renamed. RADIUS packet authentication failed: Re-set the RADIUS shared secret. Read error from network: Connection reset by peer: The remote system crashed or rebooted during an rsh or rlogin session. Read-only file system (EROFS): We can't change stuff on filesystems that are mounted read-only. received invalid login response: Storage device response was unexpected. Verify initiator authentication settings. Requested iSCSI version range is not supported by the target: The initiator's iSCSI version is not supported by the target storage device. Check the compatibility lists. See if firmware or driver upgrades would be sufficient. Requested ITN does not exist at this address: The iSCSI target name (ITN) is not accessible. Verify the initiator discovery information and storage device configuration. Requested ITN has been removed and no forwarding address is provided: The requested iSCSI target name is no longer accessible. Verify the initiator discovery information and storage device configuration. Resource temporarily unavailable (EAGAIN): fork(2) cannot create a new process due to a lack of resources. These resources may include limits on active processes (see the Resource Management page) or a lack of swap space. Restartable system call (ESTART): The system call has been interrupted in a restartable state. Result too large (ERANGE): This is a programming or data input error. The result of a calculation is not representable in the defined data type. The matherr(3M) facility may be helpful in debugging the problem. ROOT LOGIN ...: Someone has just logged in as root or su-ed to root. RPC: Program not registered: Make sure that the requested service is available. rx framing error: This error usually indicates a problem with the network hardware. Framing errors are types of CRC errors, which are usually caused by physical media problems. SCSI bus DATA IN phase parity error: This is a problem related to SCSI hardware or connections. It may have to do with hardware that is not qualified for attachment to Sun servers, connections with cables that are flaky or too long (total length more than 6 meters), bad terminators or flaky power supplies. See the SCSI transport failed: reason 'reset' message as well. SCSI transport failed: reason 'reset': The system sent data that was never received due to a SCSI reset. This may occur due to conflicting SCSI IDs, hardware that is not qualified for attachment to Sun servers, connections with cables that are flaky or too long (total length more than 6 meters), bad terminators or flaky power supplies. These issues have also been observed on systems where the highest capacity DIMMs are not in the lowest numbered slots. Disk arrays wth read-ahead caches can sometimes also cause this problem; turn off the caching to see if the problem goes away. Non-obvious SCSI ID conflicts may be diagnosed using the PROM monitor probe-scsi-all command. (See OBP Command Line Diagnostics for more details.) These errors may also happen when the SCSI device and the server are set to different SCSI timeout thresholds. Segmentation Fault: These can be produced as a result of programming errors or improperly set rlimit resource settings. (See Resource Management for how to check and adjust resource settings.) Segmentation faults are an indication that the program has attempted to access an area of memory that is protected or does not exist. Programming causes for segmentation faults include dereferencing a null pointer and indexing past the bounds of an array. setmnt: Cannot open /etc/mnttab for writing: The system is unable to write to /etc/mnttab. This may be caused by the /etc directory being mounted read-only (which can happen during certain types of boot problems). share_nfs: /home: Operation not applicable: A local filesystem is mounted on /home, which is usually reserved for use by the automounter. skipping LIST command - no active base: A LIST command is present without an associated BASE command. (cachefspack) Socket type not supported (ESOCKTNOSUPPORT): The socket type's support has not been configured for this system. Soft error rate ... during writing was too high: The number of soft errors on a tape device have exceeded the threshold. It may be due to a dirty head, bad media or a faulty tape drive. Software caused connection abort (ECONNABORTED): The connection was aborted within the local host machine. Stale NFS file handle (ESTALE): The file or directory on the NFS server is no longer available. It may have been removed or replaced. A remount may be needed to force a renegotiation of file handles. statd: cannot talk to statd: statd has left remnants in the /var/statmon/sm and /var/statmon/sm.bak directories. Files named after inactive hosts should be removed, and statd and lockd should be restarted. su: No shell: The default shell for root is improper. It may have been set to a nonexistent program or an illegal shell. This problem has been known to occur when an extra space is appended to the "root" line of the passwd file. The passwd file will need to be repaired while booted from CDROM or network. syncing file system: The kernel is updating the superblocks before taking the system down or in the wake of a panic. System booting after fatal error FATAL: This can be caused by UPA address parity errors, Master queue overflows or DTAG parity errors. This is going to be due to a bad CPU or possibly a bad system board. tar: ...: No such file or directory: The specified target (which defaults to TAPE) is not available. This may be due to a hardware problem with the tape drive or connections, or to a misspecified target. tar: directory checksum error: The checksum of the files read from tape do not match the checksum in the header block. This may be due to an incorrectly specified block size or a bad piece of tape media. tar: tape write error: A physical write error has occurred on the tar target. Target hardware or software error: Run diagnostics on the storage device hardware; check storage device software configuration. Target has insufficient session, connection or other resources: Check storage device settings. Check with storage device vendor to see if resource settings can be increased or capacity can be otherwise increased. target protocol group tag mismatch: Initiator and target had a Target Portal Group Tag (TPGT) mismatch. Verify TPGT discovery settings on initiator and storage device. Text file busy (ETXTBSY): An attempt was made to execute a file that was open for writing. The SCSI bus is hung: The likely cause is a conflict in SCSI target numbers. See the SCSI transport failed: reason 'reset' message as well. Timeout waiting for ARP/RARP packet: Indicates a network connection problem while booting from the network. This problem can sometimes be observed on subnets containing multiple servers willing to answer a RARP request, which can result in a server without a bootparams file receiving a request. (We have had good luck moving Jumpstart targets to an isolated subnet for initial installations.) Timer expired: The timer for a STREAMS ioctl has expired. The cause is device specific, and may be related to a flaky hardware, driver failure or an inappropriately short timeout threshold. Too many links (EMLINK): A file has too many hard links associated with it. Use soft links instead. Too many open files (EMFILE): A process has exceeded the limit on the number of open files per process. (See the Resource Management page for methods to monitor and manage these limits.) Transport endpoint is already connected (EISCONN): Connection request made on an already connected transport endpoint. Transport endpoint is not connected (ENOTCONN): The endpoint is not connected and/or an address was not specified. Trap 3E: These are caused by a bad boot disk superblock. This may have been caused by a failing disk, faulty disk connections, software misconfiguration or duplicate SCSI addresses. Check the possible hardware and SCSI configuration issues before attempting to recover the superblock using the methods listed under BAD SUPER BLOCK above. Too Many Arguments: This is a variant of the C shell's Arguments too long message, except that this time the problem may be the number rather than the length of arguments. unable to connect to target: Initiator unable to establish a network connection. This message typically accompanied by an error number from /usr/include/sys/errno.h. unable to get shared objects: The executable may be corrupt or in an unrecognized format. unable to initialize authentication: Verify that initiator authentication settings are properly configured. unable to make login pdu: Initiator could not make a login Payload Data Unit (PDU) based on the initiator and storage device settings. Reset target login parameters and other settings as required. unable to schedule enumeration: Initiator unable to enumerate the LUNs on the target. LUN enumeration can be forced via the devfsadm -i iscsi command. unable to set [authentication|ipsec|password|remote authentication|username]: Verify that initiator authentication settings are properly configured. uname: error writing name when booting: /etc/nodename must contain exactly one line with the name of the system and no blanks or returns. Unknown service: Either the service is not listed in the services database (/etc/services by default), or the permissions for the services database are set so that the user cannot read it. Value too large for defined data type (EOVERFLOW): Argument improperly formatted for the structure allocated to it. WARNING: /tmp: File system full, swap space limit exceeded: Virtual memory has filled up. A reboot is recommended after we have figured out which process is hogging all the memory and/or swap, since the system may be in an unstable state. WARNING: TOD clock not initialized: It is likely that the system clock's battery is dead. Watchdog Reset: This usually indicates a hardware problem. (See the Watchdog Resets page for a complete discussion.) Window Underflow: These errors sometimes accompany a trap, especially at boot time. Some program attempted access of a register window that was not accessible from that processor. These errors may occur when differently sized DIMMs are improperly used together, or when cache memory has gone bad. If mismatched memory is not the problem, the CPU or system board will need to be replaced. wrong magic number: See "Corrupt label" above. you are not authorized to use: A configuration file (eg at.deny or cron.deny) forbids access to this service. >>>> PART 3 <<<<: ================= Booting problems poses serious challenge to the system administrators as system is down and no one can use it . This article tries to cover some of the general booting problems and their possible solutions to enable understand the problem cause and bring the system up very quickly. Following are some of the booting issues ,error messages their meaning and possible solutions 1) Booting in single user mode and mounting root disk . 2) Making boot device alias 3) "Timeout waiting for ARP/RARP packet"? error message. 4) "The file just loaded does not appear to be executable" error message. 5) "bootblk: can't find the boot program" error message. 6) "boot: cannot open kernel/unix" error message . 7) "Error reading ELF header"? error message . 8) "Cannot open '/etc/path_to_inst'" error message. 9) "Can't stat /dev/rdsk/c0t3d0s0" error message . 10) Next Steps 1.Booting in single user mode and mounting root hard disk. Most important step in diagnosing the booting problems is booting the system in single user mode and examining the hard disk for possible errors & work out the corrective measure. Single user mode can be achieved by any of the following methods :- ok> boot -s ;from root disk ok> boot net -s ;from network ok>boot cdrom -s ;from cdrom Rebooting with command: cdrom -s Configuring the /devices directory Configuring the /dev directory | INIT: SINGLE USER MODE # # fsck /dev/rdsk/c0t3d0s0 # mount /dev/dsk/c0t3d0s0 /mnt Perform the required operation on mounted disk , now accessible through /mnt ,& unmount the hard disk after you are done ; # umount /mnt # reboot 2.Making boot device alias In case system can not boot from primary disk and it is needed to make another boot disk to access the data , nvalias command is used . nvalias command makes the device alias and assigns an alternate name to a physical disk. Physical address of target disk is required which can be had by show-disk command on ok>. ok> nvalias disk7 /iommu@f,e0000000/sbus@f,e0001000/dma@3,81000/esp@3,80000/sd2,0 The new aliased disk can be named as boot disk or can be used for booting by refering its name . ok> setenv boot-device disk7 ok>reset or ok> boot disk7 3."Timeout waiting for ARP/RARP packet"? At ok> type printenv and look for these parameters . boot-device disk mfg-switch? false diag-switch? false if you see "boot-device net " or true value for the other two parameter change it to the values above. In case you wants to boot from network make sure your client is properly configured in boot server and network connections & configuration are proper. 4."The file just loaded does not appear to be executable." Boot block on the hard disk is corrupted .Boot the system in single user mode with cdrom and reinstall boot block . #installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s0 5."bootblk: can't find the boot program" boot block can not find the boot programe - ufsboot in Solaris .Either ufsboot is missing or corrupted . In such cases it can be restored from the cdrom after booting from cdrom & mounting the hard disk # cp /platform/`uname -i`/ufsboot /mnt/platform/`uname -i` 6."boot: cannot open kernel/unix" Kernel directory or unix kernel file in this directory is not found .Probably deleted during fsck or deleted by mistake .Copy it from the cdrom or restore from the backup tape. # cp /platform/`uname -i`/kernel/unix /mnt/platform/`uname -i`/kernel 7."Error reading ELF header."? Kernel directory or unix kernel file in this directory is corrupted.Copy it from the cdrom or restore from the backup tape. # cp /platform/`uname -i`/kernel/unix /mnt/platform/`uname -i`/kernel 8."Cannot open '/etc/path_to_inst'" System can not find the /etc/path_to_install file .It might be missing or corrupted and needs to be rebuild. To rebuild this file boot the system with -ar option : ok>boot -ar Press enter to select default values for the questions asked during booting and select yes to rebuild /etc/path_to_install The /etc/path_to_inst on your system does not exist or is empty. Do you want to rebuild this file [n]? y system will continue booting after rebuilding the file. 9."Can't stat /dev/rdsk/c0t3d0s0" When booted from cdrom and done fsck the root partition comes out to be fine but on booting from root disk this error occurs. The device name for / is missing from /dev/dsk directory and to resolve the issue /dev & /devices directories has to be restored from root backup tapes . >>>> PART 4 <<<< ================ -- Numbers and Symbols ***** FILE SYSTEM WAS MODIFIED ***** Cause This comment from the fsck(1M) command tells you that it changed the file system it was checking. Action If fsck(1M) was checking the root file system, reboot the system immediately to avoid corrupting the / partition. If fsck(1M) was checking a mounted file system, unmount that file system and run fsck(1M) again, so that work done by fsck(1M) is not undone when in-memory file tables are written out to disk. ** Phase 1-- Check Blocks and Sizes Cause The fsck(1M) command is checking the file system shown in the messages that are displayed before this one. The first phase checks the inode list, finds bad or duplicate blocks, and verifies the inode size and format. Action If more than a dozen errors occur during this important phase, you might want to restore the file system from backup tapes. Otherwise, it is fine to proceed with fsck(1M). See Also For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume 1. ** Phase 1b-- Rescan For More DUPS Cause The fsck(1M) command detected duplicate blocks while checking a file system, so fsck(1M) is rescanning the file system to find the inode that originally claimed that block. Action If fsck(1M) executes this optional phase, you will see additional DUP/BAD messages in phases 2 and 4. See Also For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume 1. ** Phase 2-- Check Pathnames Cause The fsck(1M) command is checking a file system, and fsck(1M) is now removing directory entries pointing to bad inodes that were discovered in phases 1 and 1b. This phase might ask you to remove files, salvage directories, fix inodes, reallocate blocks, and so on. Action If more than a dozen errors occur during this important phase, you might want to restore the file system from backup tapes. Otherwise it is fine to proceed with fsck(1M). See Also For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume 1. ** Phase 3-- Check Connectivity Cause The fsck(1M) command is checking a file system, and fsck(1M) is now verifying the integrity of directories. You might be asked to adjust, create, expand, reallocate, or reconnect directories. Action You can usually answer "yes" to all these questions without harming the file system. See Also For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume 1. ** Phase 4-- Check Reference Counts Cause The fsck(1M) command is checking a file system, and fsck(1M) is now checking link count information obtained in phases 2 and 3. You might be asked to clear or adjust link counts. Action You can usually answer "yes" to all these questions without harming the file system. See Also For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume 1. ** Phase 5-- Check Cyl groups Cause The fsck(1M) command is checking a file system, and fsck(1M) is now checking the free-block and used-inode maps. You might be asked to salvage free blocks or summary information. Action You can usually answer "yes" to all these questions without harming the file system. See Also For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume 1. @@ Cause This message is about how to fix the common @@token sendmail errors. There are instances when you receive email bounce messages because of syntax errors complaining that it does not know how to send email to @@token. Probably a site is NOT running NIS and is generating these errors or is talking to another site that is generating the errors and then passing the email on to your site. This happens because a single token is changed into a null ("") token. As a result, ruleset 3 (S3) changes null tokens into @@token. There are two key issues here. First, you do not want to be the host responsible for generating these errors, and, second, you do not want to pass along any errors that were generated by other hosts. Action To fix this problem, modify rules S3 and S22. (You'll only have S22, if using main.cf.) First, so you do not cause these errors, comment out the invert aliases rule in S22: S22 R$*<@LOCAL>$* $:$1 #R$-<@$-> $:$>3${Z$1@$2$} invert aliases R$*<@$+.$*>$* $@$1<@$2.$3>$4 already ok R$+<@$+>$* $@$1<@$2.$m>$3 tack on our domain R$+ $@$1<@$w.$m> tack on our full name Next, so you do not pass on errors caused by other hosts, modify ruleset S3 from: S3 # handle "from:<>" special case R$*<>$* $@@ turn into magic token To: S3 # handle "from:<>" special case R$*<>$* $@$n turn into magic token 29a00 illegal instruction Cause When trying to boot a client from a boot/jumpstart server to install or upgrade a workstation, it fails with the following message: boot net - install Rebooting with command: net - install Boot device: /iommu/sbus/ledma@f, 400010/le@f, 8c0000 File and args: - install 29a00 Illegal Instruction (0) ok Action The problem lies in the /tftpboot directory of the boot server. Confirm that the HOSTID and HOSTID.ARCH files are linked to the correct inetboot.* file for your architecture. The following is an example of how a symbolic link should look: # cd /tftpboot # ls -l 81971904* 81971904 -> inetboot.sun4m.Solaris_2.4 81971904.SUN4M -> inetboot.sun4m.Solaris_2.4 If the entries are not correct, remove the entry for the particular client in this directory, using rm_install_client or rm_client commands, and re-add the client with the add_install_client(1M) or add_client command or through Solstice giving the correct architecture. 451 timeout waiting for input during source Cause When sendmail(1M) reads from anything that might time out, such as an SMTP connection, it sets a timer to the value of the r processing option before reading begins. If the read does not complete before the timer expires, this message appears and reading stops. (Usually this happens during RCPT.) The mail message is then queued for later delivery. Action If you see this message often, increase the value of the r processing option in the /etc/mail/sendmail.cf file. If the timer is already set to a large number, look for hardware problems, such as poor network cabling or connections. See Also For more information about setting the timer, see the section describing the sendmail(1M) configuration options in the System Administration Guide, Volume 3. If you are using AnswerBook online documentation, the term "timeouts" is a good search string. 501 MAIL FROM: unrecognized address: @@hostname Cause A Sun machine running Sendmail 8.6 is used as a mailhost to send mail to the Internet in an environment that has MS Mailexchanger or a cc:Mail gateway. Mail from the MS exchange/cc:Mail gateway for the Internet is relayed to the mailhost, which actually delivers the mail. The mail from the Internet is accepted on the mailhost and forwarded to the MS exchanger/cc:mail gateway. The postmaster on the mailhost sees bounced messages with error messages, such as the following: The original message was received at Thu, 29 May 1997 12:30:41 -0700 from artemis [206.189.46.3] ----- The following addresses had delivery problems ----- (unrecoverable error) ----- Transcript of session follows ----- ... while talking to cc: >>> MAIL From: >>> 501 MAIL FROM: unrecognized address: 554 Remote protocol error When analyzed, this mail turns out to be mail that has bounced from the Internet (for any reason) and was on its way back to the MS Exchange/cc:Mail gateway by the mailhost. The MS Exchange/cc:Mail gateway does not want to accept the mail because the "MAIL FROM:" address does not stick to the standards. @@hostname is an illegal SMTP address. Sendmail does not have a restriction on sender's address; however, other SMTP gateways, which need to translate the address to their native address formats, are rather strict in adhering to the SMTP address format and would not accept the address in the @@hostname format. Another situation: The user with cc:Mail sends mail to the Internet, and, due to one of many possible errors (user not found, host not found, and so forth), the message is sent back to the sender (bounces back). When a message is sent back, its recipient`s address is replaced by the sender's address and the sender's address is erased (contains only "<>"). When the bounced sender's address goes through ruleset 3 and then 11 on the user's mail gateway (as it has to return it to the cc:Mail gateway, which is in the local domain => mailer=ether), it is transformed to @@mail-gateway-name. Action Insert the following line in the S11 ruleset after the line starting with R$=D&: R@ $@mailer_daemon<@$w> for @@hostname problem After the insertion, S11 looks like this: S11 R$*<@$+>$* $1<@$2>$3 already ok R$=D $@$1<@$w> tack on my hostname R@ $@mailer_daemon<@$w> for @@hostname problem R$+ $@$1<@$m> tack on my mbox hostname 550 hostname... Host unknown Cause This sendmail(1M) message indicates that the destination host machine, specified by the portion of the address after the at-sign (@), was not found during domain naming system (DNS) lookup. Action Use the nslookup(1M) command to verify that the destination host exists in that or other domains, perhaps with a slightly different spelling. Failing that, contact the intended recipient and ask for a proper address. Sometimes this return message indicates that the intended host is inoperable, rather than unknown. If a DNS record contains an unknown alternate host, and the primary host is inoperable, sendmail(1M) returns a "Host unknown" message from the alternate host. [This is a known sendmail(1M) version 8.6.7 bug.] For uucp(1C) mail addresses, the "Host unknown" message probably means that the destination host name is not listed in the /etc/uucp/Systems file. See Also For information on how sendmail(1M) works, see the System Administration Guide, Volume 3 550 Security server failed to perform requested command Cause While using the 3.x FW-1 FTP Security Server, the user sees the following error message when trying to use FTP get or put commands: 550 Security server failed to perform requested command Action FW-1's FTP Security Server sends a pwd command prior to any data connection command (such as get, put, ls), since it needs to know the current directory for purposes such as logging, virus inspection, and resources. FW-1 assumes that these commands are blocked whenever the pwd command is blocked. Therefore, do not disable pwd on your FTP server. 550 username... User unknown Cause This sendmail(1M) message indicates that the intended recipient, specified by the portion of the address before the at-sign (@), could not be located on the destination host machine. Action Check the email address and try again, perhaps with a slightly different spelling. If this does not work, contact the intended recipient and ask for a proper address. See Also For information on how sendmail(1M) works, see the System Administration Guide, Volume 3. 554 hostname... Local configuration error Cause This sendmail(1M) message usually indicates that the local host is trying to send mail to itself. Action Check the value of the $j macro in the /etc/mail/sendmail.cf file to ensure that this value is a fully qualified domain name. Technical Notes When the sending system provides its host name to the receiving system (in the SMTP HELO command), the receiving system compares its name to the sender's name. If these are the same, the receiving system issues this error message and closes the connection. The name provided in the HELO command is the value of the $j macro. See Also For information on how sendmail(1M) works, see the System Administration Guide, Volume 3. "A" A command window has exited because its child exited. Cause The argument to a cmdtool(1) or a shelltool(1) window looks like it is supposed to be a command, but the system cannot find the command. Action To run this command inside a cmdtool(1) or a shelltool(1), make sure the command is spelled correctly and is in your search path. If necessary, use a full path name. If you intended this argument as an option setting, use a minus sign (-) at the beginning of the option. Technical Notes Both the cmdtool(1) and the shelltool(1) are OpenWindows terminal emulators. access violation unknown host IP address Cause Solstice backup utility fails and displays the following error: access violation unknown host IP address on Networker 4.2.2. This error is usually caused by a corrupted host name in the host NIS/NIS+ map/table. Action Check the Networker client configuration for an incorrect host name. If all else fails, as a workaround, add the entry to /etc/hosts. Accessing a corrupted shared library Cause The system is trying to exec(2) an a.out that requires that it be linked in a static shared library, and exec(2) could not load the static shared library. The static shared library is probably corrupted. Technical Notes The symbolic name for this error is ELIBBAD, errno=84. Address already in use Cause The user attempted to use an address already in use, and the protocol does not allow this. Technical Notes The symbolic name for this error is EADDRINUSE, errno=125. Address family not supported by protocol family Cause An address incompatible with the requested protocol was used. Technical Notes The symbolic name for this error is EAFNOSUPPORT, errno=124. admintool: Received communication service error 4 Cause AdminTool could not start a display method, because a remote procedure, which had been called, timed out; therefore, it could not send the request. You receive this error when admintool(1M) tries to access the NIS or NIS+ tables and networking is not enabled. Action Verify the system network status with ifconfig -a to make sure the system is connected to the network. Make sure the Ethernet cable is connected and the system is configured to run NIS or NIS+. Advertise error Cause This error is RFS specific. It occurs when users try to advertise a resource already advertised, try to stop RFS while there are resources still advertised, or try to forceably unmount a resource that is still advertised. Technical Notes The symbolic name for this error is EADV, errno=68. answerbook: XView error: NULL pointer passed to xv_set Cause The AnswerBook navigator window comes up, but the document viewer window does not. This message appears on the console, and the message Could not start new viewer appears in the navigator window. This situation indicates that you have an unknown client or a problem with the network naming service. Action Run the ypmatch(1) or nismatch(1) command to determine if the client host name is in the host's map. If not, add it to the NIS hosts map on the NIS master server. Then, make sure the /etc/hosts file on the client contains an IP address and entry for that host name, which is followed by loghost. -------------------------------------------------------------------------------- Note - Reboot, if you changed the /etc/hosts file. -------------------------------------------------------------------------------- Check that the ypmatch(1) or nismatch(1) client hosts command returns the same IP host address as in the /etc/hosts file. Finally, quit all existing AnswerBooks and restart. See Also For more information on the NIS hosts map, see the section on the default search criteria in the NIS+ and FNS Administration Guide. If you are using AnswerBook online documentation, "NIS hosts map" is a good search string. apdb: Resource temporarily unavailable Cause This error can occur when attempting to add or remove AP databases with the apdb command. Action From /var/adm/messages you find the reason for the apdb command failure, as shown below: Jan 15 14:00:51 Starfire2 apd[683]: /etc/system: could not find: * End AP database info (do not edit) Jan 15 14:00:52 Starfire2 apd[683]: failed to patch the system file! Unfortunately, this error from the netcon session does not get an echo to the console; therefore, it can easily be missed. To correct it, simply edit the /etc/system file so that it has the correct comments before and after setting ap:apdb_dblist. See below: * Begin AP database info (do not edit) set ap:apdb_dblist="sd:5 sd:8" * End AP database info (do not edit) Arg list too long Cause The system could not handle the number of arguments given to a command or program when it combined those arguments with the environment's exported shell variables. The argument list limit is the size of the argument list plus the size of the environment's exported shell variables. Action The easiest solution is to reduce the size of the parent process environment by unsetting extraneous environment variables. (See the man page for the shell you are using to find out how to list and change your environment variables.) Then run the program again. Technical Notes An argument list longer than ARG_MAX bytes was presented to a member of the exec(2) family of system calls. The symbolic name for this error is E2BIG, errno=7. Argument out of domain Cause This message is a programming error or a data input error. Action Ask the program's author to fix this condition or to supply data in a different format. Technical Notes This indicates an attempt to evaluate a mathematical programming function at a point where its value is not defined. The argument of a programming function in the math package is out of the domain of the function. This could happen when taking the square root, power, or log of a negative number, when computing a power to a non-integer, or when passing an out-of-range argument to a hyperbolic programming function. To help pinpoint a program's math errors, use the matherr(3M) facility. The symbolic name for this error is EDOM, errno=33. Arguments too long Cause This C shell error message indicates that too many arguments follow a command. For example, this can happen by invoking rm * in a huge directory. The C shell cannot handle more than 1706 arguments. Action Temporarily start a Bourne shell with sh(1) and run the command again. The Bourne shell dynamically allocates command line arguments. Return to your original shell by typing exit. assertion failed: string, file name, line int Cause An unexpected condition in the program has occurred. Action Contact the vendor or author of the program to ask why it failed. If you have the source code for the program, you can look at the file and line number where the assertion failed. This might give you an idea of how to run the program differently. Technical Notes This message is the result of a diagnostic macro called assert(3C) that a programmer inserted into the specified line of a source file. The untrue expression precedes the file name and line number. Attempting to link in more shared libraries than system limit Cause The system is trying to exec(2) an a.out that requires more static shared libraries than is allowed on the current configuration of the system. Technical Notes The symbolic name for this error is ELIBMAX, errno=86. automount[int]: name: Not a directory Cause The file specified after the first colon is not a valid mount point, because it is not a directory. Action Ensure that the mount point is a directory and not a regular file or a symbolic link. automountd[int]: server hostname responding Cause This automounter message indicates that the system tried to mount a file system from an NFSTM server that is either down or extremely slow to respond. In some cases, this message indicates that the network link to the NFS server is broken, although that condition produces other error messages as well. Action If you are the system administrator responsible for the non-responding NFS server, check to see whether the machine needs repair or rebooting. Encourage your user community to report such problems quickly, but only once. When the NFS server is back in operation, the automounter can access the requested file system. See Also For more information on NFS failures, see the section on NFS troubleshooting in the System Administration Guide, Volume 3. If you are using AnswerBook online documentation, a good search string is "NFS Service." "B" Bad address Cause The system encountered a hardware fault in attempting to access a parameter of a programming function. Action Check the address to see if it resulted from supplying the wrong device or option to a command. If that is not the problem, contact the vendor or author of the program for an update. Technical Notes This error could occur any time a function that takes a pointer argument is passed an invalid address. Because processors differ in their ability to detect bad addresses, on some architectures, passing bad addresses can result in undefined behaviors. The symbolic name for this error is EFAULT, errno=14. BAD/DUP FILE I=i OWNER=o MODE=m SIZE=s MTIME=t CLEAR? Cause While checking inode link counts during phase 4, fsck(1M) found a file (or directory) that either does not exist or exists somewhere else. Action To clear the inode of its reference to this file or directory, answer "yes." With the -p (preen) option, fsck(1M) automatically clears bad or duplicate file references. Answering "yes" to this question seldom causes a problem. Bad file number Cause Generally this message is a program error, not a usage error. Action Contact the vendor or author of the program for an update. Technical Notes Either a file descriptor refers to no open file, or a read(2)--or a write(2)--request is made to a file that is open only for writing or reading. The symbolic name for this error is EBADF, errno=9. block no. BAD I=inode no. Cause Upon detecting an out-of-range block, fsck(1M) prints the bad block number and its containing inode (after I=). Action In fsck(1M) phases 2 and 4, you decide whether or not to clear these bad blocks. Before committing to repair with fsck(1M), you could determine which file contains this inode by passing the inode number to the ncheck(1M) command: # ncheck -i inum filesystem See Also For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume 1. BAD_MESSAGE (error code 100) from X.400 Cause In this situation, X.400 software had been working without problems. Suddenly, the message exchanges failed in ma_start_delivery(). It was returning an error code of 100 (BAD_MESSAGE). The ma_start_delivery() call fails when trying to exchange a file of more than 900 bytes. Action X.400 was restarted with the wrong umask. To fix, set the umask to 0022 and restart the software. bad module/chip at: position Cause This message from the memory management system often appears with parity errors and indicates a bad memory module or chip at the position listed. Data loss is possible, if the problem occurs other than at boot time. Action Replace the memory module or chip at the indicated position. Refer to the vendor's hardware manual for help finding this location. Bad request descriptor Cause This message is apparently only used in NIS+ to indicate corrupted or missing tables. Technical Notes The symbolic name for this error is EBADR, errno=51. BAD SUPER BLOCK: string Cause This message from fsck(1M) indicates that a file system's super block is damaged beyond repair and must be replaced. At boot time (with the -p option) this message is prefaced by the file system's device name. After this message comes the actual damage recognized (see Action). Unfortunately, fsck(1M) does not print the number of the damaged super block. Action The most common cause of this error is overlapping disk partitions. Do not immediately rerun fsck(1M) as suggested by the lines that display after the error message. First, make sure that you have a recent backup of the file system involved; if not, try to back up the file system now using ufsdump(1M). Then, run the format(1M) command, select the disk involved, and print out the partition information. # format : N > partition > print Note whether the overlap occurs at the beginning or end of the file system involved. Then, run newfs(1M) with the -N option to print out the file system parameters, including the location of backup super blocks. # newfs -N /dev/dsk/device Select a super block from a non-overlapping area of the disk, but note that in most cases you have only one chance to select the proper replacement super block, which fsck(1M) soon propagates to all the cylinders. If you select the wrong replacement super block, data corruption will probably occur, and you will have to restore from backup tapes. After you select a new super block, provide fsck(1M) with the new master super block number: # fsck -o b=NNNN /dev/dsk/device Technical Notes Specific reasons for a damaged super block include: a wrong magic number, an out-of-range number of cylinder groups (NCG) or cylinders per group (CPG), the wrong number of cylinders, a preposterously large super block size, and trashed values in super block. These reasons are generally not meaningful, because a corrupt super block is usually extremely corrupt. See Also For more information on bad super blocks, see the sections on restoring bad super blocks in the System Administration Guide, Volume 1. If you are using AnswerBook online documentation, "super block" is a good search string. BAD TRAP Cause A bad trap can indicate faulty hardware or a mismatch between hardware and its configuration information. Data loss is possible if the problem occurs other than at boot time. Action If you recently installed new hardware, verify that the software was correctly configured. Check the kernel traceback displayed on the console to see which device generated the trap. If the configuration files are correct, you probably have to replace the device. In some cases, the bad trap message indicates a bad or down-rev CPU. Technical Notes A hardware processor trap occurred, and the kernel trap handler was unable to restore the system state. This message is a fatal error that usually precedes a panic, after which the system performs a sync, dump, and reboot. The following conditions can cause a bad trap: a system text or data access fault, a system data alignment error, or certain kinds of user software traps. /bin/sh: file: too big Cause This Bourne shell message indicates a classic "no memory" error. While trying to load the program specified after the first colon, the shell noticed that the system ran out of virtual memory (swap space). Action For information on reconfiguring your system to add more swap space, refer to "Not enough space". Block device required Cause A raw (character special) device was specified where a block device was required, such as during a call to the mount(1M) command. Action To see which block devices are available, use ls -l to look in /devices. Then specify a block device instead of a character device. Block device modes start with a b, whereas raw character device modes start with a c. Technical Notes The symbolic name of this error is ENOTBLK, errno=15. Boot device: /iommu/sbus/directory/directory/sd@3,0 Cause This message always appears at the beginning of rebooting. If there is a problem, the system hangs, and no other messages appear. This condition is caused by conflicting SCSI targets for the boot device, which is almost always target 3. Action The boot device is usually the machine's internal disk drive, target 3. Make sure that external and secondary disk drives are targeted to 1, 2, or 0, and do not conflict with each other. Also make sure that the tape drives are targeted to 4 or 5, and CD drives to 6, avoiding any conflict with each other or with the disk drives. You can set a device's target number using push-button switches or a dial on the back near the SCSI cables. If the targeting of the internal disk drive is in question, check it by powering off the machine, removing all external drives, turning the power on, and running the probe-scsi-all or probe-scsi command from the PROM monitor. Broadcast Message from root (pts/int) on server [date] Cause This message from the wall(1M) command is transmitted to all users logged into a system. You could see it during a rlogin(1) or telnet(1) session, or on terminals connected to a timesharing system. Action Carefully read the broadcast message. Often this broadcast is followed by a shutdown warning. For details about system shutdown, refer to "The system will be shut down in int minutes". See Also For more information on bringing down the system, see the section on halting the system in the System Administration Guide, Volume 1. If you are using AnswerBook online documentation, "halting the system" is a good search string. Broken pipe Cause This condition is often normal, and the message is merely informational (as when piping many lines to the head(1) program). The condition occurs when a write on a pipe does not find a reading process. This usually generates a signal to the executing program, but this message displays when the program ignores the signal. Action Check the process at the end of the pipe to see why it exited. Technical Notes The symbolic name of this error is EPIPE, errno=32. Bus Error Cause A process has received a signal indicating that it attempted to perform I/O to a device that is restricted or that does not exist. This message is usually accompanied by a core dump, except on read-only file systems. Action Use a debugger to examine the core file and determine what program fault or system problem led to the bus error. If possible, check the program's output files for data corruption that might have occurred before the bus error. Technical Notes Bus errors can result from either a programming error or device corruption on your system. Some common causes of bus errors are: invalid file descriptors, unreasonable I/O requests, bad memory allocation, misaligned data structures, compiler bugs, and corrupt boot blocks. "C" Cannot access a needed shared library Cause The system is trying to exec(2) an a.out that requires a static shared library, and the static shared library does not exist or the user does not have permission to use it. Technical Notes The symbolic name for this error is ELIBACC, errno=83. Cannot allocate colormap entry for "string" Cause This message from libXt (X Intrinsics library) indicates that the system color map was full, even before the color name specified in quotes was requested. Some applications can continue after this message. Other applications, such as workspace properties color, fail to come up when the color map is full. Action Exit the programs that make heavy use of the color map, then restart the failed application and try again. Cannot assign requested address Cause An attempt was made to create a transport endpoint with an address not on the current machine. Technical Notes The symbolic name for this error is EADDRNOTAVAIL, errno=126. Cannot bind to domain domainname: can't communicate with ypbind Cause While running the ypinit -m script for the setup of an NIS Master Server, you get this error message. Action You could be using the wrong nsswitch template for /etc/nsswitch.conf. During setup, you should be using /etc/nsswitch.files as the name services switch template. After setup is complete, you would then want to use /etc/nsswitch.nis. Do the following to verify that you are using nsswitch.files: # head /etc/nsswitch.conf # --> # /etc/nsswitch.files: If you are not using the nsswitch.files, copy it over as shown below: # cp /etc/nsswitch.files /etc/nsswitch.conf Run the ypinit -m script, again. Cannot boot after install, error that points to an .rc file Cause The user completes the installation of the Solaris 2.6 IA software. Upon reboot, the user gets an error referencing an .rc file (example: 11045.rc). This file has probably been deleted or placed in a different directory. As the Solaris software looks for this file during the bootup sequence and cannot find it, the system hangs, because it cannot complete the boot process. Action During the installation process, there is an option to save the configuration assistant choices to a file. The error is pointing to the saved configuration file. The user was never supposed to have the option to save these choices to a file. Users should exit the setup after making their choices. If the users do save these choices to a file and if this file gets deleted or moved, the system hangs during the boot process. To solve this problem, the user boots in single user mode. From the # prompt, the user should do the following: cd /platform/i86pc/boot/solaris/machines Delete all files in this directory. Reboot the system. This corrects the problem and allows the Solaris software to complete loading. cannot change passwd, not correct passwd Cause While running yppasswd(1) and trying to change a user's password, the system responded with this message: cannot change passwd, not correct passwd. Also, the user was getting yppasswd user string does not exist on the server console, but by running ypcat passwd | grep user it returns the user name. It was verified that yppasswdd(1M) was running. Action Check the passwd(4) file with pwck(1M) and verify that yppasswdd(1M) is running on the right server. Then verify where the passwd(4) file is located and, if changed, check that yppasswdd(1M) has the location in the process line. The password located in /etc/yp should read /usr/lib/yp/rpc.yppasswdd -D /etc/yp. The -D option with the passwd files directory location tells yppasswdd(1M) where to update and verify password changes. cannot establish nfs service over /dev/tcp: transport setup problem Cause During boot strap of a SunOS 2.5.2 system, nfsd(1M) displays the following: netdir_getbyname (transport tcp, host/serv \1/nfs), No such file or directory Cannot establish NFS service over /dev/tcp: transport setup problem. The problem: The NIS maps have been populated from older systems, and the nfs/tcp entry of the services map is missing. (The user is running NIS+, but this problem can also occur with NIS.) Action Either put a files entry before the nis or nisplus in the services line of the /etc/nsswitch.conf file, or, better, merge the changes to the services file into the services map. It is a good idea to always merge in the new entries to /etc/services, /etc/inet/protocols, and /etc/rpc into their respective maps whenever a new OS is installed. Cannot exec a shared library directly Cause The system is attempting to exec(2) a shared library, directly. Technical Notes The symbolic name for this error is ELIBEXEC, errno=87. Cannot find SERVER hostname in network database Cause A brief description: the user is on a different subnet and is running permanent licenses: ultra1(50)% cc -o hello hello.c License Error : Cannot find the license server (fry) in the network database for product(Sun WorkShop Compiler C) Cannot find SERVER hostname in network database (-14,7) cc: acomp failed for hello.c ultra1(51)% Action Check the following: Make sure that the server is up and running. Make sure that the server is in the /etc/hosts file of the client system by typing: ping servername. Make sure the license daemon on the server is running. Make sure there is an elementary license file on the client: cd /etc/opt/licenses more sunpro.loc Make sure there are only text license files, such as sunpro.lic.1 in the sunpro,loc directory. For the client check, see below: % cd /etc % more nsswitch.conf | grep hosts hosts: nis [NOTFOUND=return] files This means that it is using the NIS server to look up the IP address. If it is set first for nis and the /etc/hosts file has the server listed by name, change the line to hosts: files nis Then, see if it can be found. If not, try truss and snoop to see what is happening. cannot install bootblock Cause In this case, the user installs the Solaris IA software on the Intel platform and the install seems fine. When the system is rebooted after the installation, the user receives the above error message at startup. At this point, the user cannot gain access to the system. Action This error occurs when you use the fdisk utility in the Solaris operating environment, do a newfs, and then do a restore, but forget to do the install for the boot block. When you do a newfs and then a restore operation, you need to perform an installboot before installing the OS. Otherwise, you get the above error. There is no guarantee, but the installboot procedure might or might not work after booting into single user mode from the CD-ROM. To install the UFS boot block and partition the boot program on slice 2 of target 0 on controller 1 of the platform, where the command is being run, use the following: # installboot /usr/platform/uname -i/lib/fs/ufs/pboot \ /usr/platform/uname -i/lib/fs/ufs/bootblk /dev/rdsk/c1t0d0s2 Cannot open FCC file Cause When trying to send mail by Netscape, this message is displayed. Netscape is trying to save the outbound message to a file that has been specified by the user, but does not exist. Action To correct this problem do the following: go to options Mail and News Preferences, then go to Compose. A template pops up. There is a section that specifies where to save outgoing mail and news files. Make sure that these files exist or remove them from the template, if you do not care about logging which messages are sent through Netscape. Cannot send after transport endpoint shutdown Cause A request to send data was disallowed, because the transport endpoint has already been shut down. Technical Notes The symbolic name for this error is ESHUTDOWN, errno=143. can't communicate with ypbind Cause ypcat passwd returns with the error message, can't communicate with ypbind, but ypbind is running. ls -l /var/yp/binding/ypbind.pid -r-------- 1 root root 3 Dec 1 07:40 ypbind.pid umask for root is set to 077. Action Set umask for root back to 022. /var/yp/binding/ypbind.pid must be readable by all groups. Refer to the following example: ls -l /var/yp/binding/ypbind.pid -r--r--r-- 1 root root 3 Dec 1 07:40 ypbind.pid Can't create public message device (Device busy) Cause This message comes from the lp(1) print scheduler, indicating that it is either extremely busy or hanging. Action If print jobs are coming out of the printer in question, wait until they are finished and then resubmit this print job. If you see this message again, the lp(1) system is probably hanging. For a procedure to clear the queue, refer to "lp hang". Technical Notes If lp(1) is unable to create a device for printer messages, the message FIFO could already be in use or could be locked by another print job. See Also For more information on the print scheduler, see the section on administrating printers in the System Administration Guide, Volume 2. Can't invoke /etc/init, error int Cause This message can appear while a system is booting, indicating that the init(1M) program is missing or corrupted. Note that /etc/init is a symbolic link to /sbin/init. Action Do the following: Boot the mini-root so you can replace init(1M). Halt the machine by typing Stop-A or by pressing the reset button. Reboot as a single user from the CD-ROM, the net, or a diskette. For example, type boot cdrom -s at the ok prompt to boot from a CD-ROM. After the system comes up and gives you a # prompt, mount the device corresponding to the original root (/) partition somewhere, with a command similar to the mount(1M) command, as shown below: # mount /dev/dsk/c0t3d0s0 /mnt # cp /sbin/init /mnt/sbin/init # reboot Then copy the init(1M) program from the mini-root to the original root (/) partition. Reboot the system. If this does not work, other files might be corrupted, and you might need to reinstall the entire system. Technical Notes The error number is 2 if /sbin/init is missing, or 8 if /sbin/init has an incorrect executable format. This message is usually followed by a panic: icode message. The system tries to reboot itself, but goes into a loop, because rebooting is impossible without init(1M). See Also For more information on booting the system, see the section on halting and booting the system in the System Administration Guide, Volume 1. can't open /dev/rdsk/string: (null): UNEXPECTED INCONSISTENCY Cause In the SunOSTM 4.1.x release, this message indicated that the device containing the /dev file system has become disconnected. A particular response from the Solaris operating environment has not been defined. can't synchronize with hayes Cause This message sometimes appears when using a modem that the system regards as a "Hayes" type modem, which includes most modems manufactured today. The message can be caused by incorrect switch settings, by poor cable connections, or by not turning the modem on. Action Check that the modem is on and that the cables between the modem and your system are securely connected. Check the internal and external modem switch settings. If necessary, turn the modem off and then on again. cd: Too many arguments Cause The C shell's cd(1) command takes only one argument. Either more than one directory was specified, or a directory name containing a space was specified. Directory names with spaces are easy to create with File Manager. Action Use only one directory name. To change to a directory whose name contains spaces, enclose the directory name in double (") or single (') quotes, or use File Manager. Channel number out of range Cause The system has run out of stream devices. This error results when a stream head attempts to open a minor device that does not exist or is currently in use. Action Check that the stream device in question exists and was created with an appropriate number of minor devices. Make sure that the hardware corresponds to this configuration. If the stream device configuration is correct, try again later when more system resources might be available. Technical Notes The symbolic name for this error is ECHRNG, errno=37. chmod: ERROR: invalid mode Cause This message from the chmod(1) command indicates a problem in the first non-option argument. Action If you are specifying a numeric file mode, you can provide any number of digits (although only the final one-to-four are considered), but all digits must be between 0 and 7. If you are specifying a symbolic file mode, use the syntax provided in the chmod(1) usage message to avoid the "invalid mode" error message: Usage: chmod [ugoa][+-=][rwxlstugo] file ... Some combinations of symbolic key letters produce no error message, but fail to have any effect. The first group, [ugoa], is truly optional. The second group, [+-=], is mandatory for chmod(1) to have an effect. The third group, [rwxlstugo], is also mandatory for effect and can be used in combination when that combination does not conflict. Command not found Cause The C shell could not find the program you gave as a command. Action Check the form and spelling of the command line. If that looks correct, use echo $path to see if the user's search path is correct. When communications are garbled, it is possible to unset a search path to such an extent that only built-in shell commands are available. Below is a command to reset a basic search path: % set path = (/usr/bin /usr/ccs/bin /usr/openwin/bin .) If the search path looks correct, check the directory contents along the search path to see if programs are missing or if directories are not mounted. See Also For more information about the C shell, see csh(1). Communication error on send Cause This error occurs when the current process is waiting for a message from a remote machine, but the link connecting the machines breaks. Technical Notes The symbolic name for this error is ECOMM, errno=70. config error: mail loops back to myself. Cause User sees this message when sending mail: # dle@g3... Connecting to g3.xyz.edu. (ether)... 220 xyz.edu Sendmail SMI-8.6/SMI-SVR4 ready at Wed, 7 Jan 1998 14:28:20 -0600 >>> HELO xyz.edu 250 xyz.edu Hello g1.xyz.edu [129.106.16.1], pleased to meet you xyz.edu config error: mail loops back to myself >>> QUIT 221 g1.xyz.edu closing connection dle@g3... Local configuration error Saving message in /dead.letter /dead.letter... Sent The sending system (see line 220) and the receiving system (see the HELO line) both think they are known as "xyz.edu." Action Edit the sendmail.cf file as follows: Type the official host name. For the domain, you have choices: If you want the gateway machine to identify itself as the domain, use Dj$m; if you want the gateway machine to appear to be inside the domain, use Dj$w.$m; and if you are using sendmail.mx (or have a fully-qualified host name), use Dj$w. Uncomment Dj$w.$m and comment Dj$m. This gives each system a unique name. $w is the system host name, and $m is the domain. connect from hostIP to callit(ypserv): request from non-local host Refer to "connect from hostIP to callit(ypserv): request from unauthorized host". connect from hostIP to callit(ypserv): request from unauthorized host Cause An example of a message from SunOS: Jan 5 14:45:37 host1 portmap[86]: connect from 158.175.36.135 to callit(ypserv): request from unauthorized host Other possiblities for the end portion of the error message include: request from unprivileged port request from non-local host request not forwarded In the Solaris operating environment, the error might look similar to the following: Jan 5 14:45:37 host1 rpcbind[86]: refused connect from 158.175.36.135 to callit(ypserv) In all cases, the ypserv part of the message might actually be any RPC service, such as mount or nfs or status. Action The user has a replacement portmap or rpcbind. The version is enhanced to add access controls, and the error in question is reporting an access violation. The replacements are third-party and are not supported by Sun. The user must locate the access control configuration files and change them to the desired access controls. connect from hostIP to callit(ypserv): request from unprivileged port Refer to "connect from hostIP to callit(ypserv): request from unauthorized host". connect from hostIP to callit(ypserv): request not forwarded Refer to "connect from hostIP to callit(ypserv): request from unauthorized host". Connection closed. Cause When using rlogin(1), this message can appear under the following circumstances: If the remote host cannot create a process for this user If the user takes too long to type the correct password If the user interrupts the network connection If the remote host goes down Data loss is possible if files were modified and not saved before the connection closed. Action Try again. If the other system has gone down, wait for it to reboot first. Connection closed by foreign host. Cause When a user applies telnet(1) to another system, this message can appear under the following circumstances: If the user takes too long to type the correct password If the remote host cannot create a login for this user If the remote host goes down or terminates the connection Data loss is possible if files were modified and not saved before the connection closed. Action Try again. If the other system has gone down, wait for it to reboot first. [Connection closed. Exiting] Cause After using the talk(1) command to communicate with another user, the other person enters an interrupt (usually Control-C), and this message appears on your screen. Action Sending an interrupt is the usual way of exiting the talk program. The talk(1) session is over, and you can return to your work. Connection refused Cause No connection could be made because the target machine actively refused it. This happens either when trying to connect to an inactive service or when a service process is not present at the requested address. Action Activate the service on the target machine, or start it up again if it has disappeared. If, for security reasons, you do not intend to provide this service, inform the user community, possibly suggesting an alternative. Technical Notes The symbolic name for this error is ECONNREFUSED, errno=146. Connection reset by peer Cause A connection was forcibly closed by a peer. This is normally due to a remote host connection loss from a timeout or a reboot. Technical Notes The symbolic name for this error is ECONNRESET, errno=131. Connection timed out Cause This error occurs either when the destination host is down or when problems in the network cause a loss in transmission. Action Do the following: Check the operation of the host system, for example by using ping(1M) and ftp(1). Repair or reboot as necessary. If the above does not solve the problem, check the network cabling and connections. Technical Notes No connection was established in a specified time. A connect or send request failed because the destination host did not properly respond after a reasonable interval. (The time-out period is dependent on the communication protocol.) The symbolic name for this error is ETIMEDOUT, errno=145. console login: ^J^M^Q^K^K^P Cause This error usually occurs because OpenWindows exited abnormally, leaving the system's keyboard in the wrong mode. The characters that appear when someone attempts to login are garbage transliterations of what someone typed. Action If you are on a SPARCTM system, do the following: Find another machine and remote log in to this system Run the following command: $ /usr/openwin/bin/kbd_mode -a This puts the console back into ASCII mode. -------------------------------------------------------------------------------- Note - kbd_mode is not a windows program; it fixes the console mode. -------------------------------------------------------------------------------- If you are on an IA system, do the following: Log in remotely and start kill the X server or reboot the system Technical Notes The usual reason for this problem occurring is an automated script run from cron(1M) that clears the /tmp directory periodically. Ensure that any such scripts do not remove the /tmp/.X11-pipe or /tmp/.X11-unix directories, or any files in them. core dumped Cause A core(4) file contains an image of memory at the time of software failure and is used by programmers to find the reason for the failure. Action To see which program produced a core(4) file, run either the file(1) command or the adb(1) command. The following examples show the output of the file(1) and adb(1) commands on a core file from the dtmail program. $ file core core: ELF 32-bit MSB core file SPARC Version 1, from `dtmail' $ adb core core file = core -- program `dtmail' SIGSEGV 11: segmentation violation ^D (use Control-d to quit the program) Ask the vendor or author of this program for a debugged version. Technical Notes Some signals, such as SIGQUIT, SIGBUS, and SIGSEGV, produce a core dump. See the signal(5) man page for a complete list. If you have the source code for the program, you can try compiling it with cc -g, and debugging it yourself using dbx or a similar debugger. The where directive of dbx provides a stack trace. On mixed networks, it can be difficult to discern which machine architecture produced a particular core dump, since adb(1) on one type of system generally cannot read a core(4) file from another type of system and can produce an unrecognized file message. Run adb(1) on various machine architectures until you find the right one. See Also For information on saving and viewing crash information, see the System Administration Guide, Volume 2. If you are using AnswerBook online documentation, "system crash" is a good search string. corrupt label - wrong magic number or corrupt label or corrupt label - label checksum failed Cause After a power cycle, the machine displays either of the following error messages: corrupt label - label checksum failed corrupt label - wrong magic number format(1M) displayed the following: 0 unassigned wm 0 0 (0/0/0) 0 1 unassigned wm 0 0 (0/0/0) 0 2 backup wm 0 - 5460 4.2G (5460/0/0) 4154160 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 - 2730 2.1G (0/0/0) 0 7 unassigned wm 2730-5460 2.1G (0/0/0) 0 The disks were using raw partitions beginning at block 0 (cylinder 0). The disk label (VTOC) is kept on the block 0 of cylinder 0. The label eventually gets overwritten by database programs using raw partitions, if the raw partition begins at cylinder 0. (UNIXr file systems avoid this area of the partition.) Action As a workaround, do the following: Go into format(1M) and get the backup label using the backup command. Relabel the disk using this backup label. You should then be able to access the disk. Backup the data on this disk. Go back to the disk and relabel it, starting the raw partition at cylinder 1. (This loses one cylinder, but prevents corrupting the VTOC.) Label again. Restore the data from your backup. could not grant slave pty Cause User gets the error message could not grant slave pty when attempting a telnet(1), rlogin(1), or rsh(1) session (anything that requires a shell) or when trying to bring up an x-term. Action The user's file permissions were set wrong on /usr/lib/pt_chmod. The user had: # ls -la /usr/lib/pt_chmod ---s--x--x 1 bin bin 3120 May 3 1996 The permissions should be: # ls -la /usr/lib/pt_chmod ---s--x--x 1 root bin 3120 May 3 1996 -------------------------------------------------------------------------------- Note - The owner should be root; the user had bin as the owner. Also, the setuid bit must be set. -------------------------------------------------------------------------------- By using chown root pt_chmod, the problem was corrected. Could not initialize tooltalk (tt_open): TT_ERR_NOMP Cause Various desktop tools display or print this message when the ttsession(1) process is not available. The ToolTalk service generally tries to restart ttsession(1), if it is not running. Thus, this error indicates that the ToolTalk service is either not installed or is not installed correctly. Action Verify that the ttsession(1) command exists in /usr/openwin/bin or /usr/dt/bin. If this command is not present, ToolTalk is not installed correctly. The packages constituting ToolTalk are the runtime SUNWtltk, developer support SUNWtltkd, and the manual pages SUNWtltkm. CDE ToolTalk packages have the same names with ".2" appended. Technical Notes The full TT_ERR_NOMP message string reads as follows: "No ttsession(1) is running, probably because tt_open(3) has not been called yet. If this is returned from tt_open(3), it means ttsession(1) could not be started, which generally means ToolTalk is not installed on the system." Could not open ToolTalk Channel Cause This error message is displayed while attempting to remotely run workshop. Action Do the following: Make sure workshop is no longer running. In the telnet/rlogin session window, type: /bin/ps -ef | grep ttsession. If one is running in the system that belongs to the telnet user, type kill pid_of_ttsession. In the telnet rlogin session, type /usr/dt/bin/ttsession -s -d machine_telnetting_from:0.0. Start workshop. Could not start new viewer Cause This message appears in the AnswerBook navigator window, along with an XView error message on the console. Action For details, refer to "answerbook: XView error: NULL pointer passed to xv_set". Could not start NFS service for any protocol. Exiting Cause The following errors occur at boot time: /usr/lib/nfs/nfsd[478]: t_bind to wrong address /usr/lib/nfs/nfsd[478]: t_bind to wrong address /usr/lib/nfs/nfsd[478]: Cannot establish NFS service over /dev/udp: transport setup problem. /usr/lib/nfs/nfsd[478]: Cannot establish NFS service over /dev/udp: transport setup problem. /usr/lib/nfs/nfsd[478]: t_bind to wrong address /usr/lib/nfs/nfsd[478]: t_bind to wrong address /usr/lib/nfs/nfsd[478]: Cannot establish NFS service over /dev/tcp: transport setup problem. /usr/lib/nfs/nfsd[478]: Cannot establish NFS service over /dev/tcp: transport setup problem. /usr/lib/nfs/nfsd[478]: Could not start NFS service for any protocol. Exiting. /usr/lib/nfs/nfsd[478]: Could not start NFS service for any protocol. Exiting. In this situation, a backup copy of the S15nfs.server script in /etc/rc3.d was made. However, the backup copy was renamed to S15nfs.server.BAK. Since the backup copy starts with a upper case "S," it was also executed at boot time. The errors occurred when a second NFSD was attempted. Action If a backup copy of any startup script is made, it should be renamed with a lower case "s," so as not to be executed at boot. cpio: Bad magic number/header. Cause A cpio(1) archive has either become corrupted or was written out with an incompatible version of cpio(1). Action Use the -k option to cpio(1) to skip I/O errors and corrupted file headers. This might permit you to extract other files from the cpio(1) archive. To extract files with corrupted headers, try editing the archive with a binary editor such as emacs(1). Each cpio(1) file header contains a filename as a string. See Also For more information on magic numbers, see magic(4). cpio : can't read input : end of file encountered prior to expected end of archive. Cause This message appears when trying to read a multi-volume floppy in bar format using the following command: # cpio -id -H bar -I /dev/diskette0 Action kill /usr/sbin/vold by running /etc/init.d/volmgt stop and use the device name /dev/rfd0. Cross-device link Cause An attempt was made to make a hard link to a file on another device, such as on another file system. Action Establish a symbolic link using ln -s instead. Symbolic links are permitted across file system boundaries. Technical Notes The symbolic name for this error is EXDEV, errno=18. "D" data access exception Cause This message appears when running an old version of the operating system that does not support new hardware or when running an operating system that is not configured for new hardware. It can also be the result of an incorrectly installed DSIMMs or a disk problem. Action Upgrade your operating system to a version that supports the new hardware or machine architecture. See Also For more information on upgrades, see the section describing system and device configuration in the Solaris Transition Guide. Data fault Cause This error is a kind of BAD TRAP that usually causes a system panic. When this message appears after a BAD TRAP message, a system text or data access fault probably occurred. [See the message BAD TRAP for more information.] In the absence of a BAD TRAP message, this message might indicate a user text or data access fault. Data loss is possible, if the problem occurs other than at boot time. Action Make sure the machine can reboot, then check the log file /var/adm/messages for hints about what went wrong. Deadlock situation detected/avoided Cause A programming deadlock situation was detected and avoided. Action If the system had not detected and avoided a deadlock, a piece of software would have hung. Run the program again. The deadlock might not reoccur. Technical Notes This error usually relates to file and record locking, but can also apply to mutexes, semaphores, condition variables, and read/write locks. The symbolic name for this error is EDEADLK, errno=45. See Also See the section on deadlock handling in the System Interface Guide. See also the section on avoiding deadlock in the Multithreaded Programming Guide. Destination address required Cause A required address was omitted from an operation on a transport endpoint. Destination address required. Technical Notes The symbolic name for this error is EDESTADDRREQ, errno=96. destination component full Cause Solstice backup is reporting destination component full. This message appears when a manual operation is performed on the jukebox/autochanger (for example, physically unloading the tape drive by means of the buttons on the autochanger, rather than using SBU to unmount the volume). This operation causes SBU to lose track of the status of the media in the autochanger. Action The following command should resolve the problem: /usr/sbin/nsr/nsrjb -H. /dev/fd/int: /dev/fd/int: cannot open Cause setuid and setgid shell scripts refuse to run. They return an error message similar to /dev/fd/3: /dev/fd/3: cannot open. (The number following /dev/fd/ is not necessarily 3.) The first line of the script properly starts a shell, and the file system containing the script is not mounted with the nosuid option. Running truss on the shell script reveals that a call to open(2) is failing with error number 6 (ENXIO): open("/dev/fd/3", O_RDONLY) Err#6 ENXIO Action setuid and setgid shell scripts use the file descriptors in /dev/fd. The contents of /dev/fd are a file descriptor file system (FDFS) and have no connection with floppy disks! Ensure that the fdfs is mounted as /dev/fd. Before the machine is next rebooted, the following line should appear in /etc/vfstab, exactly like this (with no initial comment symbol): fd - /dev/fd fd - no - It might be possible to remount /dev/fd without rebooting by running the following as root: # mount fd /dev/fd Otherwise, to make setuid/setgid shell scripts available, the machine must be rebooted after editing /etc/vfstab as detailed above. Some administrators, unaware of what /dev/fd is for, comment out the entry in /etc/vfstab that mounts the FDFS (file descriptor file system). This can go unnoticed until an attempt is made to run a setuid or setgid shell script. /dev/rdsk/c0t6d0s2: No such file or directory Cause When attempting to eject a CD-ROM on a Ultra 450 system, the eject cdrom command fails, displaying the error message. This happens when the CD-ROM is on controller 1, not 0. When using the eject(1) command, the CD-ROM "nickname" equates to /dev/rdsk/c0t6d0s2. On an Ultra 450, the CD-ROM equates to /dev/rdsk/c1t6d0s2. Therefore, using cdrom does not work. Action Use the following command instead: # eject cdrom0 If volume manager /usr/sbin/vold is not running, you can use the following: # eject /dev/rdsk/c1t6d0s2 -------------------------------------------------------------------------------- Note - Make sure that the front panel of the system is unobstructed so the CD-ROM tray is not blocked. Otherwise, the eject(1) command appears to hang since the tray is trying to open, but is physically blocked. -------------------------------------------------------------------------------- Device busy Cause An attempt was made to mount a device that was already mounted or to unmount a device containing an active file (such as an open file, a current directory, a mount point, or a running program). This message also occurs when trying to enable accounting that is already enabled. Action To unmount a device containing active processes, close all the files under that mount point, quit any programs started from there, and change directories out of that hierarchy. Then try to unmount again. Technical Notes Mutexes, semaphores, condition variables, and read/write locks set this error condition to indicate that a lock is held. The symbolic name for this error is EBUSY, errno=16. device busy Cause If you perform an eject cdrom and then receive the above message, it could be due to a number of problems. Below is a list of things that you can check and do to permit ejection of the CD from the device. Action Step A: Ensure that the current directory is not somewhere in the CD: % cd %eject cdrom Step B: As root: # cd /etc/init.d # ./volmgt stop # eject cdrom If this works, then try: # ./volmgt start If this does not work, go to step C. Step C: As root: # fuser /cdrom Kill any processes you feel you have already terminated. A note of caution: If this is an NFS-mounted CD-ROM and there are other users who access this drive, make sure you know what process you are killing and why. # ./volmgt stop # ps -ef | grep vold If vold still is running, kill the process. # eject cdrom If this does not work, then: # cd /vol Make sure that dev, dsk, rdsk, rmt are in the directory. If not, probably your /vol directory is corrupt and a reboot might be needed for proper rebuild. Step D: The last three options are: Reboot. If the CD drive is external to the system, try power cycling the drive and pressing the eject button. If all else fails and the CD-ROM is external, on the right hand side of the eject button is a small hole into which you can insert a small straight device which forces manual ejection of the caddy. /dev/rdsk/string: CAN'T CHECK FILE SYSTEM. Cause The system cannot automatically clean (preen) this file system because it appears to be set up incorrectly or is having hard-disk problems. This message asks that you run fsck(1M) manually, since data corruption might already have occurred. Action Run fsck to clean the file system in question. For proper procedures, refer to "/dev/rdsk/string: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.". /dev/rdsk/string: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. Cause During a boot, the /etc/rcS script runs the fsck(1M) command to check the integrity of file systems marked "fsck" in /etc/vfstab. If fsck(1M) cannot repair a file system automatically, it interrupts the boot procedure and produces this message. When fsck(1M) gets into this state, it cannot repair a file system without losing one or more files, so it wants to defer this responsibility to you, the administrator. Data corruption has probably already occurred. Action First run fsck -n on the file system, to see how many and what type of problems exist. Then run fsck(1M) again to repair the file system. If you have a recent backup of the file system, you can generally answer "y" to all the fsck(1M) questions. It is a good idea to keep a record of all problematic files and inode numbers for later reference. To run fsck(1M) yourself, specify options as recommended by the boot script. For example: # fsck /dev/rdsk/c0t4d0s0 Usually the files lost during fsck(1M) repair are those that were created just before a crash or power outage, and they cannot be recovered. If you lose important files, you can recover them from backup tapes. If you do not have a backup, ask an expert to run fsck(1M) for you. See Also For more information on file checking, see the section on checking file system integrity in the System Administration Guide, Volume 1. Directory not empty Cause The directory operation that was attempted, such as directory removal with rmdir(1), can be performed only on an empty directory. Action To remove the directory, first remove all the files that it contains. A quick way to remove a non-empty directory hierarchy is with the rm -r command. Technical Notes The symbolic name for this error is ENOTEMPTY, errno=93. Disc quota exceeded Cause The user's disk limit has been exceeded on a user file system, usually because a file was just created or enlarged beyond the limit. This almost always refers to a magnetic disk, and not to an optical disc. Any data created after this condition occurs can be lost. Action The user can delete files to bring disk usage under the limit, or the server administrator can use the edquota(1M) command to increase the user's disk limit. Technical Notes The symbolic name for this error is EDQUOT, errno=49. disk does not appear to be prepared for encapsulation Cause When attempting to encapsulate the root disk during vxinstall, the user gets this error message. The disk was sliced properly for encapsulation; however, the prtvtoc command was non-executable, because the permissions had been changed. diskN not unique Cause During boot, the system displays disk0 not unique. The error happens before the kernel loads. Action There are more than one devalias entries for disk0. Use devalias at the OK prompt to see the entries. To remove the duplicate, run the following command at the OK prompt: nvunalias disk0 and reset the system. dlopen (libxfn.so) failed Cause The SUNWfns package was left out of the End User Cluster. If only this cluster is installed and automounter is used, it fails with the above message. libxfn.so is the shared library for the Federated Naming System. Action Install package SUNWfns from of the distribution CD. driver is already installed Cause The SunPCTM 4.1 package and then necessary patches (102924) were added. When trying to run sunpc_install, the user got the above error message. prtconf(1M) shows that the driver is not attached, and modinfo(1M) displays 4 modules. After removing the package, backing out the patch, and reinstalling, the user still received the same error message. Action SunPC had previously been installed on the system. When removing the package with the pkgrm(1M) command, not all components were removed, because pkgrm(1M) is not aware of changes made by the sunpc_install script. To resolve this problem it is necessary to remove sections in the files pertaining to SunPC: /etc/devlink.tab, /etc/driver_aliases, and /etc/rc2.d/S10storekernname, and then reinstall the package. dtmail: cannot open mailfile on 2.5.1 /var/mail server Cause /var/mail is mounted onto client machine A, which is running CDE 1.2 (the Solaris 2.6 release), from machine B, a server running the Solaris 2.5.1 release. OpenWindow's mailtool can read/write mailfiles on the server without any problems. However, CDE's dtmail does not open the mailbox. Action The bug's permissions and ownership have to be checked. The mail directory should have the following permissions: skywalker$ ls -lad /var/mail drwxrwsrwt 3 root mail 512 Feb 10 14:40 /var/mail/ while the mailbox itself should look something like this: -rw------- 1 zvinakis mail 3206838 Feb 19 11:51 /var/mail/zvinakis If the directory's permissions are not set properly, issue these commands on the mail server: chmod a+t /var/mail chmod g+s /var/mail If the permissions (or group) are not correct on the mailbox itself, using "joe" as an example mailbox, type: chgrp mail /var/mail/joe To change the permissions, type: chmod 600 /var/mail/joe DUMP: Cannot open dump device `/dev/rdsk/c2t0d0s1': Permission denied Cause When using ufsdump(1M) as user sys (UID 3) on a disk drive in an SSA, the ufsdump(1M) command fails with this message. Action Six-hundred (600) permissions were created on the SSD "instance path" for a disk drive in an SSA. For a non-root user to read them, there should have been 0640. For example, if you see this: # ls -lL /dev/rdsk/c2t0d0s1 crw------- 1 root sys 192,241 Jul 10 1996 /dev/rdsk/c2t0d0s1 Change it to this: crw-r----- 1 root sys 192,241 Jul 10 1996 /dev/rdsk/c2t0d0s1 You might also want to add the following line: ssd:* 0640 root sys to the /etc/minor_perm file, so subsequently added arrays do not have the same problem. dumptm: Cannot open `/dev/rmt/string': Device busy Cause During file system backup, the dump program cannot open the tape drive, because some other process is holding it open. Action Find the process that has the tape drive open, and either kill(1) the process or wait for it to finish. # ps -ef | grep /dev/rmt # kill -9 processID DUP/BAD I=i OWNER=o MODE=m SIZE=s MTIME=t FILE=f REMOVE? Cause During phase 1, fsck(1M) found duplicate blocks or bad blocks associated with the file or directory specified after FILE= whose inode number appears after I= (with other information). Action To remove this file or directory, answer "yes." If you have to remove more than a few files in this manner, data can be lost. Therefore, it might be preferable to restore the file system from backup tapes. See Also For more information on checking file systems, see the section on checking file system integrity in the System Administration Guide, Volume 1. int DUP I=int Cause Upon detecting a block that is already claimed by another inode, fsck(1M) prints the duplicate block number and its containing inode (after I=). Action In fsck(1M) phases 2 and 4, you decide whether or not to clear these bad blocks. Before committing to repair with fsck(1M), you could determine which file contains this inode by passing the inode number to the ncheck(1M) command: # ncheck -iinum filesystem See Also For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume 1. "E" Encapsulation of root disk is not supported on systems with old PROM versions Cause When encapsulating the root disk with Volume Manager, this error message is printed. Action This error message probably has nothing at all to do with the user's system PROM version. It most likely is related to the fact that the file /dev/vx/config (and the pseudo device that it is linked to) does not exist on the system. A few things could contribute to this file not being created: Make sure these lines are in the /etc/system file: forceload: drv/vxdmp (only needed for SEVM 2.5 and above) forceload: drv/vxio forceload: drv/vxspec Make sure the vx entries are in the /etc/name_to_major file. grep vx /etc/name_to_major This should come back with 2 or 3 lines (vxio and vxspec, also vxdmp, if running SEVM 2.5 and above). The major number values might be different from machine to machine; however, if the entries are in there, that should be sufficient. If you have not performed a boot -r since doing a pkgadd to the Volume Manager software, this might have contributed to the problem. ENOMEM The available data space is not large enough to accommodate the shared memory segment Cause ENOMEM errors occur after 80 segments have been allocated by Lotus Notes. Action The design and implementation of the Solaris ISM (intimate shared memory)--which limits the number of shared memory segments that can be attached to a particular process--caused the ENOMEM failures to the Lotus Notes application. There is a limit because all shared memory segments are attached in the intimate shared memory (ISM) mode by a system variable that is set in the shmsys:share_page_table system file. When a shared memory segment is attached in ISM mode, the OS locks that segment into physical memory and arranges the virtual/physical address mappings such that only one copy of the mapping information is shared among all attaching processes. To accomplish this, the OS requires that the virtual starting address of the segment be aligned on a 16 Mbytes (hex 0x1000000) = 16777216-bytes address boundary. The NULL address lets the system decide what virtual address the segment should be attached to. The system also assigns addresses at 0x3000000 apart, unless forced to attach addresses at 0x1000000 apart. A sun4d could create and attach up to 220 1-Mbyte ISM segments, and a sun4m could create and attach up to 235 1-Mbyte ISM segments, providing the segments were 0x1000000 apart. Having established that ISM is the cause of the limit, below are some options: First, the limit only gives Lotus Notes the ability to attach a total of 80 Mbytes of shared memory. By increasing the segment size to 10 Mbyte, as Lotus has already recommended, 8 ISM segments can handle the load previously needing 80 1-Mbyte segments. The load could conceivably grow to 800 Mbytes now without running into the ISM addressing limit. Second, the share_page_table (ISM) flag could be turned off. This would give a sun4m the ability to create in excess of 3000 1-Mbyte segments. The problem here is that ISM does improve the performance of shared memory accesses, and, if the user intends to move up to 2.5.1, ISM is required to get around another set of problems related to shared memory loads of this kind. Third, Lotus could change the Notes server so that it kept track of the attach addresses and always attached at 0x1000000 boundary addresses, instead of having the system default to the 0x3000000 address boundary. This would allow a Notes server to grow to 235 segments on a sun4m. error 15 initializing Cause It is caused by a bad /boot or 4.1 on ss2 - level 15 interrupt. Error 76 Cause This error is RFS-specific. The server is telling the client that a process has transferred back from mount point. Technical Notes The symbolic name for this error is EDOTDOT, errno=76. Error 88 Cause This error is caused by an illegal byte sequence. Action You need to handle multiple characters as a single character. Technical Notes The symbolic name for this error is EILSEQ, errno=88. error code 2: access violation Cause The user receives this message when trying to do a tftp get. Action Do not use a relative path when using tftp. For example: tftp> get /tftpboot/testfile fails, and tftp> get testfile succeeds. error: DPS has not initialized or server connection failed Cause This message appears when trying to run AnswerBook on a generic X11 window server or on a generic X terminal. Action Running AnswerBook requires Display PostScript (DPS), or a NeWS server, or the Adobe DPS NS remote display software. Additionally, a complete LaserWriter II Type-1 font set (including Palatino) should be installed on the X server. To find out if the X server has DPS, run xdpyinfo(1) to verify the presence of an "Adobe-DPS-Extension" line. X servers without this line do not know about DPS. Error: Error adding OS service Solaris 2.6 sparc sun4u: Cause While trying to add OS services to a newly installed Solaris 2.6 environment and using Solstice Adminsuite 2.3, the process fails with the following error message: Error: Error adding OS service Solaris 2.6 sparc sun4u: inconsistent revision, installed package SUNWpppk revision 3.0.1 does not match revision 11.6.0,REV=1997.07.15.21.46 for sparc architecture. This error is caused by the optional Solstice PPP 3.0.1 packages from the "Solaris Server Intranet Extension" CD-ROM installed on the system. Action As a workaround, remove the PPP 3.0.1 packages and replace them with the PPP packages from the Solaris 2.6 release CD-ROM. For example: # pkgrm SUNWlicsw SUNWlit SUNWpppk SUNWpppm SUNWpppr SUNWppps SUNWpppu : : {package remove info} : # cd /cdrom/cdrom0/s0/Solaris_2.6/Product # pkgadd -d . SUNWapppr SUNWapppu SUNWpppk : : {package add info} : Then, use Adminsuite to add the OS services, which should then work without error. -------------------------------------------------------------------------------- Note - If the Solstice PPP 3.0.1 package is configured and currently in use on the system, the user should save any of the previously entered PPP configuration information for restoration after the OS services have been installed. (pkgrm(1M) the 3 PPP packages installed from the 2.6 CD release, and againpkgadd(1M) all of the PPP packages from the Intranet Extension CD-ROM, then redo the configuration.) If the Solstice PPP 3.0.1 package was not used on the system, there is no reason to reinstall it. Use /usr/bin/pkginfo to check the installed packages. -------------------------------------------------------------------------------- This is documented in Chapter 9 of the Solaris Server Intranet Extension Installation and Release Notes Solaris 2.6 manual. Error Host Unknown: Cause In this case, the user is on Windows 95, running PC-NFS pro2.0. The user uses ping(1M) to reach another computer on the network. ping(1M) returns Host Unknown. This happens when name services are not set up correctly. Action Click the Windows 95 Start button, click Programs, click PC-NFSpro, then click Configuration. Click TCP/IP and make sure all settings are entered correctly. If NIS is enabled, click Configure NIS and make sure the NIS domain and server names are correct. If DNS is enabled, click Configure DNS and make sure the DNS domain and server names are correct. Click edit hosts and add the name and IP address of the machine you are trying to ping(1M), along with the authentication server. If you make any changes, click OK, then click Save and Exit on the Configuration dialog box. Shut down and restart Windows 95. ERROR: missing file arg (cm3) Cause An attempt was made to run some sccs(1) operation that requires a file name, such as create, edit, delget, or prt. Action Supply the appropriate file name after the SCCS operation. ERROR [SCCS/s.string]: `SCCS/p.string' nonexistent (ut4) Cause An attempt was made to sccs(1) edit or sccs get a file that was not yet under SCCS control. Action Run sccs(1) create on that file to place it under SCCS control. ERROR [SCCS/s.string]: writable `string' exists (ge4) Cause An attempt was made to sccs(1) edit a file that is writable, probably because it was already checked out. Action Run sccs(1) info to see who has the file checked out. If it is you, go ahead and edit it. If it is somebody else, ask that person to check-in the file. Error: you don't have a license to run this program Cause The user tries to mount the /export file system with Volume Manager 2.1.1 and gets this message. Action Run vxserial -p to print the available Volume Manager licenses in the system. Also, check the /etc/vfstab file to make sure that the file system is not a vxfs file system. esp0: data transfer overrun Cause When a user tries to mount a CD-ROM on a third-party CD drive, mount(1M) fails with the above error, followed by the sr0: SCSI transport failed message. The CD drive probably comes from a vendor unknown to the system. Action Third-party CD drives generally have an 8192 block size, as opposed to the 512 block size on supported Sun drives. Check with the vendor to see if any special configuration is possible to allow the drive to operate on a Sun workstation. ether_hostton errors from cb_reset Cause You issue cb_reset on an SSP and get the following: cb_reset Resetting host snax-cb0... warning: ether_hostton(SrcHost:beer): Bad file number warning: ether_hostton(SrcHost:beer): Bad file number warning: ether_hostton(SrcHost:beer): Bad file number Resetting host snax-cb1... warning: ether_hostton(SrcHost:beer): Resource temporarily unavailable warning: ether_hostton(SrcHost:beer): Resource temporarily unavailable warning: ether_hostton(SrcHost:beer): Resource temporarily unavailable snax-cb0 is ready... snax-cb1 is ready... The cb_reset actually completes, but the error messages are annoying. Action /etc/nodename is probably incorrect. The following details are from a machine getting this error message. Note that /etc/nodename contains an alias to the real name of the SSP. To correct the problem, edit /etc/nodename to match the true name and reboot. # cat /etc/nodename beer # cat /etc/hostname.qfe0 snax-ssp # cat /etc/hosts 127.0.0.1 localhost 129.153.49.179 snax-ssp beer loghost # cat /etc/ethers 8:0:20:87:58:a5 snax-ssp beer Event not found Cause This C shell message indicates that a user tried to repeat a command from the history list, but that command or number does not exist in the list. Action Run the C shell history(1) command to display recent events in the history list. If a user often tries to run commands that have disappeared from the history list, make the list longer by setting history(1) to a higher value. See Also For more information about the C shell, see csh(1). EXCESSIVE BAD BLKS I=int CONTINUE? Cause During phase 1, fsck(1M) found more than 10 bad (out-of-range) blocks associated with the specified inode number. Action With this many bad blocks, it might be preferable to restore the file system from backup tapes. See Also For more information on bad blocks, see the section on checking file system integrity in the System Administration Guide, Volume 1. If you are using AnswerBook online documentation, "bad blocks" is a good search string. EXCESSIVE DUP BLKS I=int CONTINUE? Cause During phase 1, fsck(1M) found more than 10 duplicate (previously claimed) blocks associated with the specified inode number. Action With this many duplicate blocks, it might be preferable to restore the file system from backup tapes. See Also For more information on blocks, see the section on checking file system integrity in the System Administration Guide, Volume 1. If you are using AnswerBook online documentation, "bad blocks" is a good search string. Exec format error Cause This often happens when trying to run software compiled for different systems or architectures, such as when executing the programs on a SunOS 4.1 system, or when trying to execute SPARC-specific programs on an IA machine. This error can also occur if the Binary Compatibility Package was not installed. Action Make sure that the software matches the architecture and system you are using. The file(1) command can help you determine the target architecture. If you are using SunOS 4.1 software on a later release, make sure that the Binary Compatibility Package is installed. You can check for it using this command: $ pkginfo | grep SUNWbcp Technical Notes A request was made to execute a file that, although it has the appropriate permissions, does not start with a valid format. The symbolic name for this error is ENOEXEC, errno=8. See Also See the a.out(4) man page for a description of executable files. "F" failed to initialize adapter Cause When using an Adaptec AHA-154x Cx SCSI HBA during installation of the IA release, you might see a message during the MDB device probe that says failed to initialize adapter after the probe has correctly identified the card. There are a variety of reasons for this error, but in all cases the error is because of misconfiguring the card. Action To correct the problem, press Ctrl-A during boot to enter the 154x BIOS configuration utility. Choose the Configure/View Host Adapter Settings option, then press the F6 key to return the adapter to its factory default settings. After doing this, reconfigure the adapter using the instructions contained in the IA Device Configuration Guide or Driver Update Guide, if applicable. It is especially important that the adapter be configured to use DMA 6. Note that it must be changed from the default of DMA 5. Failed to Load Security Policy: Invalid argument Cause While installing a policy from the GUI (or the command line) the following error message is displayed: default.W: Security Policy Script generated into default.pf default: Compiled OK. Installing Security Policy default on all.all@lab-netra Failed to Load Security Policy: Invalid argument <-------------- !! Installing Security Policy on localhost(localhost) failed If you truss the policy load, you receive the following: truss -o /tmp/truss -f -vall -rall -wall /etc/fw/bin/fw /etc/fw/conf/default.W The following is near the end of the truss: 1226: open("/dev/fw0", O_RDWR|O_NONBLOCK) = 7 1226: ioctl(7, 0xC0C07A18, 0xEFFFBCA0) Err#22 EINVAL This problem is caused by someone "plumbing" or configuring a new Ethernet interface after Firewall-1 has already started (that is, plumbing an interface by hand after the system has been booted). Action This error can be resolved by configuring the interface to configure automatically at boot time (for example, by creating a /etc/hostname.qe0 file) and rebooting the system. The following is another solution: /etc/fw/bin/fwstop # Stop firewall modinfo | grep fw # Get kernel module ID 85 f5e19000 3cc0c 51 1 fw (fw) modunload -i 85 # Unload kernel module /etc/fw/bin/fwstart # Restart firewall The policy installs correctly now with the following: # ./fw load ../conf/default.W default.W: Security Policy Script generated into default.pf default: Compiled OK. fast access mmu error Cause The user receives this message while trying to boot the Ultra over the network by using the FDDI 5.0 card. Action Do the following: Setenv auto-boot? to false. Reset the system. Boot the FDDI card. fbconsole: ioctl SRIOCSREDIR: Device Busy. Cause When starting OpenWindows from the command line, the following error message is echoed on the Solaris "Welcome" screen: fbconsole: ioctl SRIOCSREDIR: Device Busy Once inside OpenWindows, the following message is displayed in the background windows and when starting cmdtool -C: SYSTEM WARNING: Object 0x340f8, Device busy, ioctl SRIOCSREDIR returned -1, attempt to make tty the console failed (Tty package) Action OpenWindows was probably started in the background (using the "&"). Exit OpenWindows, and run the command in foreground: /usr/openwin/bin/openwin If this does not help, then perhaps some daemon or process is "holding" the console. Type the command: fuser /dev/console. A list of process IDs is returned. Examine these processes to determine if an application has hold of the console (using the ps(1) command helps). fd0: unformatted diskette or no diskette in the drive Cause This message appears on the system console to indicate that the floppy driver fd(4) could not read the label on a diskette. Usually this is either because a new diskette has not yet been formatted, or a formatted diskette has become corrupted. This message often appears along with read failed and bad format messages after volcheck(1) has been run. Action If you are certain that the diskette contains no data, run fdformat -d to format the diskette in DOS format. (You can also format a diskette in UFS format if you like, although then it cannot be transported to most other systems.) When the diskette is formatted, you can write on it, if it has not been corrupted beyond repair. File descriptor in bad state Cause Either a file descriptor refers to no open file or a read request was made to a file that is open only for writing. Technical Notes The symbolic name for this error is EBADFD, errno=81. File exists Cause The name of an existing file was mentioned in an inappropriate context. For example, establishing a link to an existing file, or overwriting an existing file are not allowed when the csh(1) noclobber option is set. Action Look at the names of files in the directory, then try again with a different name or after renaming or removing the existing file. Technical Notes The symbolic name for this error is EEXIST, errno=17. File locking deadlock Cause This is a programming problem and, in some cases, is unavoidable. Action All a user can do is restart the program and hope deadlock does not reoccur. Technical Notes In the file locking subsystem, two processes tried to modify some lock at the same time. In the multi-threading subsystem, two threads became deadlocked and could not continue. When a program using the threads library encounters this error, it should restart the deadlocked threads. The symbolic name for this error is EDEADLOCK, errno=56. File name too long Cause The specified file name has too many characters. Action If a file name or path name component is too long, devise a shorter name. If the total path name is longer than PATH_MAX characters, first change to an intermediate directory, then specify a shorter path name. Newly created data will be lost unless written to another file with a shorter name. Technical Notes In a UFS or NFS-mounted UFS file system, the length of a path name component exceeds MAXNAMLEN (255) characters, or the total length of the path name exceeds PATH_MAX (1024) characters. In a System V file system, the length of a path name component exceeds NAME_MAX (14) characters while no-truncation mode is in effect. These values are defined in the /usr/include/limits.h file. The symbolic name for this error is ENAMETOOLONG, errno=78. file system full Cause This error message is seen during a login. The login fails with the message No utmpx entry. See Also Refer to "No utmpx entry". FILE SYSTEM STATE IN SUPERBLOCK IS WRONG; FIX? Cause The fsck(1M) command has just checked a file system, and has determined that the file system is clean. The file system's super block, however, still thinks the file system is "dirty" in some way. Action If you believe that the file system is adequately repaired, answer "yes" to mark the file system as clean. Technical Notes Different "dirty" file system types are listed in /usr/include/sys/fs/ufs_fs.h, and include FSACTIVE, FSBAD, FSFIX, FSLOG, and FSSUSPEND. See Also For more information on super blocks, see the section on checking file system integrity in the System Administration Guide, Volume 1. If you are using AnswerBook online documentation, "bad super block" is a good search string. File table overflow Cause The kernel file table is full, because too many files are open on the system. Temporarily, no more files can be opened. New data created under this condition will probably be lost. Action Simply waiting often gives the system time to close files. However, if this message occurs often, reconfigure the kernel to allow more open files. To increase the size of the file table, increase the value of MAXUSERS in the /etc/system file. The default MAXUSERS value is the amount of main memory in Mbytes, minus 2. Technical Notes The symbolic name for this error is ENFILE, errno=23. File too large Cause The file size exceeded the limit specified by ulimit(1), or the file size exceeds the maximum supported by the file system. New data created under this condition can probably be lost. Action In the C shell, use the limit(1) command to see or set the default file size. In the Bourne or Korn shells, use the ulimit -a command. Even when the shells claim that the file size is unlimited, in fact the system limit is FCHR_MAX (usually 1 Gbyte). Technical Notes The symbolic name for this error is EFBIG, errno=27. filemgr: mknod: Permission denied Cause File Manager issues this message and fails to come up whenever the /tmp/.removable directory is owned by another user and is not in 1777 mode. This can happen, for example, when multiple users share a workstation. Action Have the original owner use chmod(1) to change the mode of this file back to 1777, its default creation mode. Rebooting the workstation also resolves this problem. Technical Notes This is a known problem that was fixed in the Solaris 2.4 release. FREE BLK COUNT(S) WRONG IN SUPERBLK SALVAGE? Cause During phase 5, fsck(1M) detected that the actual number of free blocks in the file system did not match the super block's free block count. The df(1M) command accesses this free block count when measuring file system capacity. Action Generally you can answer "yes" to this question without harming the file system. See Also For more information on super blocks, see the section on checking file system integrity in the System Administration Guide, Volume 1. If you are using AnswerBook online documentation, "bad super block" is a good search string. fsck & ufsdump - cannot read block/sector errors Cause If you have received the following messages from fsck(1M): CANNOT READ: BLK 196896 CONTINUE? y THE FOLLOWING SECTORS COULD NOT BE READ: 196896 196897 196898 196899 Or the following warnings from ufsdump(1M): DUMP: Warning - cannot read sector 164016 of /dev/vx/rdsk/newdg/vol02 DUMP: Warning - cannot read sector 164017 of /dev/vx/rdsk/newdg/vol02 DUMP: Warning - cannot read sector 164018 of /dev/vx/rdsk/newdg/vol02 It could be that the size of this file system in this volume does not match the size of the regular file system. Action To check this, follow the example below: Run the command: # fstyp -v /dev/vx/rdsk/newdg/vol02 | head -30 | grep ncg to print the following line (disregard any error or warning messages you might get): ncg 25 size 102400 blocks 95983 Disregard everything but the number after the word size. This number tells you the file system is 102,400 Kbytes in length. Next, find out the size of the volume. Run the command: # vxprint -g newdg -vt vol02 which prints: V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX v vol02 fsgen ENABLED ACTIVE 163840 SELECT From this, you can see the volume is 163,840 sectors (divide this number by 2 to get it into Kbytes) or 81,920 Kbytes. As you can see from this example, the volume (80 Mbytes) is much smaller than the file system (100 Mbytes). This should be rectified immediately to avoid or minimize data loss. To resolve this problem, back up the data as best you can, then either create a new volume or newfs this one and restore the data. This problem can also occur on a DiskSuite metadevice. The difference is that you need to check the size of the metadevice using the metastat command. The metastat command shows the size of the metadevice in sectors, just like the vxprint does. fsck: Can't open /dev/dsk/string Cause The fsck(1M) command cannot open the disk device, because although a similar file system exists, the partition specified does not. Action Run the mount(1M) or the format(1M) command to see what file systems are configured on the machine. Then run fsck(1M) again on an existing partition. fsck: Can't stat /dev/dsk/string Cause The fsck(1M) command cannot open the disk device, because the specified file system does not exist. Action Run the mount(1M) or the format(1M) command to see what file systems are configured on the machine. Then run fsck(1M) again on an existing file system. ftp: ftp/tcp: unknown service Cause The user received this error while using no naming service. The services file looked fine. The user could FTP as root, but not as a normal user. Action The permissions on the /etc/services file were wrong. To correct the problem, the user changed them to read access for everyone (644). fw_ipinput: q fc5fddc0:illegal interface Cause The FW-1 kernel module displays this error message when a new network interface has been added to the FW-1 system while fwd is running. Action To resolve this problem, run the following to reinstall the FW kernel and the security policy: # fw ctl uninstall # fw ctl install # fw fetch localhost FW1: log message queue is full Cause The console reports FW1: Log message queue is full. The message log is a queue that keeps all the firewall's event logs until FW-1 finishes processing them. If too many logs arrive, the buffer is full and the message FW-1: log message queue is full appears. It usually happens on loaded systems or firewalls that handle many network connections. Action Below are some suggestions to stop this warning message: Reduce the amount of logging in the security policy. -------------------------------------------------------------------------------- Note - ACCOUNTING logging is very heavy. Reducing logging from LONG to SHORT also helps. -------------------------------------------------------------------------------- Increase the internal memory allocated to the FW kernel module. The default amount of memory is 524K. To increase to 1Mbyte, add the statement below to /etc/system and reboot: set fw:fwhmem=0x100000 Set the Excessive Log Grace Period to 0. This is set through Properties -> Logging and Alerting. You must then reinstall the security policy for the change to take affect. The drawback for setting the Excessive Log Grace Period to 0: Your log now includes similar packets received at approximately the same time. When it was not zero, they were hidden (see Managing FireWall-1 Using the OpenLook GUI, p. 104). Thus, no packet disappears from the log, so your log might be a little bit bigger, but apart from that, no problem. Use Renice fwd for a higher priority. The default priority of the FW daemon is 0 (like most processes). To raise the priority you must give a negative priority, depending on the load on your system. See the man page on nice(1) for more information. fwm: no license Cause Firewall-1 version 2.1 produces this message when the fwstart command is issued or when fwm is started from the command line. There are two possible reasons for this: When a firewall module is installed without a control station on the same machine, the messages are displayed on the console (under UNIX) or in the event log (under WinNT). The messages might be legitimate. You might find that fwm has not started and you cannot do some crucial tasks. One possible problem: The license might be issued for the wrong host ID. Action Make sure the license daemon is running on the server. Then, consider the following cases: Case one: As a workaround, ignore the present messages and get an upgrade to 2.1c or above. Case two: To check for a misassigned license, run the command hostid(1). Your hostid is displayed. Next, run the command fw printlic to see output similar to the following: This is FireWall-1 Version 2.1 Type Expiration Features id-649f152b never stdlight The first field should list the correct hostid. Also check the expiration date and the features. A list of what is included with the features is provided in INFODOC 13215. If you find any inconsistencies, call the Sun License and Password Center and get a license reissued. Have you host ID and serial number ready. fwskip_parse_headers: invalid peer n Cause In Firewall-1, the connections encrypted with SKIP are dropped at certain times, specifically near the top of the hour. For example, connections will be dropped from 10:55 to 11:15, then continue working normally until 11:55. These error messages appear on the console in pairs: fwskip_parse_headers: invalid peer n fw_skip_decrypt: cannot parse headers These error messages are referring to the n counter. The n counter is the absolute number of hours in GMT time. It is included in the SKIP calculations as a safeguard against a playback attack. If the 2 hosts or firewalls exchanging encrypted packets are not in sync with respect to GMT time, they have different n counters and these errors appear. Action Keep the clocks on the encrypting hosts within one hour of each other, GMT time. "G" giving up Cause This message appears in the SCSI log to indicate that a read or write operation has been retried until it timed out. With SCSI disk the time-out period is usually 30 seconds; with tape, the period is usually 20 attempts. Time-out periods are generally coded into the drivers. Action Check that all SCSI devices are connected and powered on. Make sure that SCSI target numbers are correct and not in conflict. Verify that all cables are no longer than a total of six meters, and that all SCSI connections are properly terminated. Technical Notes The scsi_log(9F) routine usually displays messages on the system console and in the /var/adm/messages file. Run the dmesg(1M) command to see the most recent message buffer. Graphics Adapter device /dev/fb is of unknown type Cause The /dev/fb driver is either missing or corrupted. Action For details, refer to "InitOutput: Error loading module for /dev/fb". group.org_dir: NIS+ servers unreachable Cause This is the second of three messages that an NIS+ client prints when it cannot locate an NIS+ server on the network. Action For details, refer to "hosts.org_dir: NIS+ servers unreachable". "H" hang console Cause Console hangs, but all other operations are working, including rlogin(1) and telnet(1). Rebooting the system (by way of a remote shell) clears the problem. This problem occurs if another window is opened with the -C option, causing the console to hang. The other window could be another cmdtool window, shelltool window, or even an xterm window. Only one console window can be active at a time. Action The window/process that is causing the problem can be located by using the ps(1) command (auxw options might be necessary). The process can then be killed. Eliminate the console window running with -C, and control returns to the real console. Machine hung in reboot process: when the user is booting the machine, it hangs at checking file systems. As a possible workaround, do the following: Boot miniroot from tape or CD-ROM. Type: mkdir mnt. Mount the root partition to some mount point (/mnt). Change the directory to /mnt/dev. Make sure the console is located in the mnt/dev directory. If not, make the device std (MAKEDEV std). Halt the system and reboot. /home/string: No such file or directory Cause An attempt was made to change to a user's home directory, but either that user does not exist or the user's file server has not shared (exported) that file system. Action To check on the existence of a particular user, run the ypmatch(1) or nismatch(1) command, specifying the user name and then the passwd(4) map. To export file systems from the remote file server, become superuser on that system and run the share(1M) command with the appropriate options. If that system is sharing (exporting) file systems for the first time, also invoke /etc/init.d/nfs.server start to begin NFS service. See Also For more information on sharing file systems, see the share_nfs(1M) man page. Host is down Cause A transport connection failed because the destination host was down. For example, mail delivery was attempted over several days, but the destination machine was not available during any of these attempts. Action Report this error to the system administrator for the host. If you are the person responsible for this system, check to see if the machine needs repair or rebooting. Technical Notes This error results from status information delivered by the underlying communication interface. If there is no known connection to the host, a different message usually results. For details, refer to "No route to host". The symbolic name for this error is EHOSTDOWN, errno=147. host name configuration error Cause This is an old sendmail(1M) message, which replaced I refuse to talk to myself and is now replaced by the Local configuration error message. Action For details, refer to "554 hostname... Local configuration error". hosts.org_dir: NIS+ servers unreachable Cause This is the third of three messages that an NIS+ client prints when it cannot locate an NIS+ server on the network. Action If other NIS+ clients are behaving normally, check the Ethernet cabling on the workstation showing this message. Note the following differences between architectures: On SPARC machines, disconnected network cabling also produces a series of no carrier messages. On IA machines, the NIS+ messages might be the only indication that network cabling is disconnected. If many NIS+ clients on the network are giving this message, go to the NIS+ server in question and reboot or repair it, as necessary. When the server machine is back in operation, NIS+ clients give an NIS server for domain OK message. "I" I can't read your attachments. What mailer are you using? Cause The SunView mailtool(1) and prior 3.3 OpenWindows mailtool(1) produce this message when they cannot cope with an attachment. The attachment is probably in MIME (multipurpose internet mail extensions) format, using base64 encoding. Action To read a mail message containing MIME attachments, use mailtool(1) from a system running at least the Solaris 2.3 release. If you are running an earlier version of the Solaris environment, rlogin(1) to a system running a later version, set the DISPLAY environment variable back to the first system, and run mailtool remotely. If those options prove impossible, ask the originator to send the message again using mailtool(1), or using the CDE dtmail compose File->SendAs->SunMailTool option. Technical Notes Standard MIME attachments with base64 encoding, for example, produce this message and fail to display in older mailtool(1)s. See Also Look into using metamail, available on the Internet, which allows you to send and receive MIME attachments. Identifier removed Cause This message indicates an error in a System V IPC facility. Most likely a file associated with messaging, semaphores, or shared memory was deleted from the file system where it had been created. Technical Notes This error is returned to processes that resume execution after the removal of an identifier from the file system's name space. See msgctl(2), semctl(2), and shmctl(2) for details. The symbolic name for this error is EIDRM, errno=36. ie0: Ethernet jammed Cause This message can appear on SPARCservers or IA machines with an Intel 82586 Ethernet chip. It indicates that 16 successive transmission attempts failed, causing the driver to give up on the current packet. Action If this error occurs sporadically or at busy times, it probably means that the network is saturated. Wait for network traffic to clear. If bottlenecks arise frequently, think about reconfiguring the network or adding subnets. Another possible cause of this message is a noise source somewhere in the network, such as a loose transceiver connection. Use snoop(1M) or a similar program to isolate the problem area, then check and tighten network connectors as necessary. ie0: no carrier Cause This message can appear on SPARCservers or IA machines with an Intel 82586 Ethernet chip. It indicates that the chip has lost input to its carrier detect pin while trying to transmit a packet, causing the packet to be dropped. Action Check that the Ethernet connector is not loose or disconnected. Other possible causes include an open circuit somewhere in the network and noise on the carrier detect line from the transceiver. Use snoop(1M) or a similar program to isolate the problem area, then check the network connectors and transceivers, as needed. If pipe/FIFO, don't sleep in stream head Cause This is a streams pipe error (not externally visible). Technical Notes The symbolic name for this error is ESTRPIPE, errno=92. ifconfig: bad address Cause System fails to boot with this error message: ifconfig: bad address. When coming up to multi-user ifconfig -a, it indicates the following: le0: flags=863 mtu 1500 inet 0.0.0.0 netmask 0 Once up, if this command succeeds, then all is well: # ifconfig le0 inet hostname Action Check /etc/hostname.* for a possible bad entry. /etc/hosts was linked to /var/named/hosts and /var was a separate file system. Until system comes up in multi-user to mount /var, host name could not be resolved to proper IP address. ifconfig bad address le0 Cause The user installed the recommended 2.5.1 patches. When booting, rootuser.sh presented the following errors: ifconfig bad address le0 le0 arp - revarp failed no rarp replies bad address hme0 hme0 auto-revarp failed: no rarp replies received. The IP address of interface is set to 0.0.0.0. System fails to resolve host IP address from /etc/host and no other RARP servers responded to the system's request for its IP address. Action If dns [NOTFOUND=return] appears before files in /etc/nsswitch.conf, ifconfig complains at boot-time about bad address. In some cases this can cause the boot to fail. ifconfig: host name bad space address Cause When the system is booted, this error message is displayed. The /etc/nsswitch.conf file had the following entries for the hosts line: hosts: dns nis [NOTFOUND=return] files Action Move files to the first entry in the list. Now, when the system boots, it resolves the interface names from the /etc/hosts file. ifconfig: SIOCGIFFLAGS: hme0: no such interface Cause If you just installed hme interface and are now manually configuring it, you could receive this error message when running the following: ifconfig hme0 inet ipaddr netmask + broadcast + -trailers up Action If there is no hostname.hme0 file, then the startup scripts do not execute the ifconfig hme0 plumb command. The user can either create the hostname.hme0 file or issue the ifconfig hme0 plumb command manually before attempting to configure the interface. Illegal Instruction Cause A process has received a signal indicating that it attempted to execute an instruction that is not allowed by the kernel. This usually results from running programs compiled for a slightly different machine architecture. This message is usually accompanied by a core dump, except on read-only file systems. Action If you are booting from a CD-ROM or from the net, check Readme files to make sure you are using an image appropriate for your machine architecture. Run df(1M) to make sure there is enough swap space on the system; too little swap space can cause this error. If you recently upgraded your CPU to a new architecture, replace your operating system with one that supports the new architecture (an operating system upgrade might be required). Technical Notes Sometimes this condition results from a programming error, such as when a program attempts to execute data as instructions. This condition can also indicate device file corruption on your system. Illegal instruction "0xhex" was encountered at PC 0xhex Cause The machine is trying to boot from a non-boot device, or from a boot device for a different hardware architecture. Action If you are booting from the net, check Readme files to make sure you are using a boot image for that architecture. If you are booting from disk, make sure the system is looking at the right disk, which is usually SCSI target 3. If these solutions fail, connect a CD drive to the system and boot from CD-ROM. Illegal seek Cause In this instance, using a pipe (|) on the command line does not work. Action Rather than using a pipe on the command line, redirect the output of the first program into a file and run the second program on that file. Technical Notes A call to lseek(2) was issued to a pipe. This error condition can also be fixed by altering the program to avoid using lseek(2). The symbolic name for this error is ESPIPE, errno=29. Image Tool: Unable to open XIL Library. Cause This message follows multiple multi-line XilDefaultErrorFunc errors, indicating that ImageTool could not locate the X Imaging Library. Many OpenWindows and CDE deskset programs require XIL. Action Run pkginfo(1) to determine what packages are installed on the system. If the following packages are not present, install them from the CD-ROM or over the net: SUNWxildg, SUNWxiler, SUNWxilow, and SUNWxilrt. Inappropriate ioctl for device Cause This is a programming error. Action Ask the program's author to fix this condition. The program needs to be changed so it employs a device driver that can accept special character device controls. Technical Notes The ioctl(2) system call was given as an argument for a file that is not a special character device. This message replaces the traditional, but puzzling Not a typewriter message. The symbolic name for this error is ENOTTY, errno=25. INCORRECT BLOCK COUNT I=int (should be int) CORRECT? Cause During phase 1, fsck(1M) determined that the specified inode pointed to a number of bad or duplicate blocks. The block count should be corrected to the actual number shown. Action Generally you can answer "yes" to this question without harming the file system. See Also For more information on bad blocks, see the section on checking file system integrity in the System Administration Guide, Volume 1. index failed:full:index preceded by saveset name Cause This is a server that has several clients. It seems that when the backup kicks off, many of the savesets fail with the message listed below: godzilla index failed:full:index * godzilla:index 2 retries attempted * godzilla:index sh: save: not found Action Edit the /etc/init.d/networker file and change the nsrexecd startup line to include a -p option to specify this command search path: (/usr/sbin/nsr/nsrexecd -s masters -p /usr/sbin/nsr ) > /dev/console inetd[int]: execv /usr/sbin/in.uucpd: No such file or directory Cause This message indicates that the Internet services daemon, inetd(1M), tried to start up the UUCP service without the UUCP daemon existing on the system. Action The SUNWbnuu package must be installed before the machine can run UUCP. Run pkgadd(1M) to install this package from the distribution CD-ROM or over the network. inetd[int]: string/tcp: unknown service Cause This message indicates that the Internet services daemon, inetd(1M), could not locate the TCP service specified after the first colon. Action Check the current machine's /etc/services file, and the NIS services map, to see if the service is described. To start this service, add an appropriate entry into the /etc/services file and possibly the services map as well. Note that NIS+ does not consult the local /etc/services file unless you put files right after nisplus on the services line of the system's /etc/nsswitch.conf file. If you do not want to start this service, edit the system's /etc/inetd.conf file and delete the entry that tries to start it up. See Also For more information about NIS+, see the NIS+ and FNS Administration Guide. inetd[int]: string/udp: unknown service Cause This message indicates that the Internet services daemon, inetd(1M), could not locate the UDP service specified after the first colon. Action For a solution, refer to "inetd[int]: string/tcp: unknown service". inetd: Too many open files Cause This message can appear when someone runs a command from the shell or uses a third-party application. The sar(1) command does not indicate that the system-wide open file limit has been exceeded. The probable cause of this message is that the shell limit has been exceeded. The default open file limit is 64, but it can be raised to 256. Action For a solution, refer to "Too many open files". INIT: Cannot create /var/adm/utmpx Cause This console message indicates that init(1M) cannot write in the /var directory, which is usually part of the / (root) file system. Some other messages follow, and the system usually comes up single-user. The problem is often that / or /var is mounted read-only. Sometimes a brief power outage leaves the system believing that many file systems are still mounted. Action If /var is a separate file system on the machine and is not yet mounted, mount it now. If the file system containing /var is mounted read-only, remount it read-write with a command similar to this: # mount -o rw,remount / Then type Control-D and try to bring up the system multi-user. If that fails, the root file system is probably corrupted. Run fsck(1M) on the root file system, halt the machine, power cycle the CPU, and wait for the system to reboot. Should this problem still occur, restore the root file system from backup tapes, or re-install the system from net or CD-ROM to replace the root file system. InitOutput: Error loading module for /dev/fb Cause This fatal X server error message indicates that /dev/fb, the "dumb frame buffer," is either missing or corrupted. It is usually followed by a giving up message and a few xinit(1) errors. Action If other devices on the system are working correctly, the most likely reason for this error is that the SUNWdfb package was removed or never installed. Insert the installation CD-ROM, change to the Solaris_2.* directory, and run the following command to install the packages SUNWdfbh and SUNWdfb (for your machine architecture): pkgadd -d . If other devices on the system are not working correctly, the system might have a corrupt /devices directory. Halt the system and boot using the -r (reconfigure) option. The system will run fsck(1M) if the /devices file system is corrupted, most likely fixing the problem. insertion failed: a problem with the filesystem has been detected: filesystem is probably full Cause With the use of automounter, ls -l of an automounted directory is giving the above error. This is a pop-up error message that forces you to press continue. However, the ls -l does not work properly. Action Do a df -k to see if the /var directory is completely full. Since the /var/statmon directory contains the locks for NFS, the automount fails if the /var is completely full. After the /var directory is reduced to less than 100% of the automount point, ls -l should work properly. Interrupted system call Cause The user issued an interrupt signal (usually Control-C) while the system was in the middle of executing a system call. When network service is slow, interrupting cd(1) to a remote-mounted directory can produce this message. Action Proceed with your work; this message is strictly informational. Technical Notes An asynchronous signal (such as interrupt or quit), which a program was set up to catch, occurred during an internal system call. If execution is resumed after processing the signal, it will appear as if the interrupted programming function returned this error condition, so the program might exit with an incorrect error message. The symbolic name for this error is EINTR, errno=4. Invalid argument Cause An invalid parameter was specified that the system cannot interpret. For example, trying to mount an uncreated file system, printing without sufficient system support, or providing an undefined signal to a signal(3C) library function can all produce this message. Action If you see this message when you are trying to mount a file system, make sure that you have run newfs(1M) to create the file system. If you see this message when you are trying to read a diskette, make sure that the diskette was properly formatted with fdformat(1), either in DOS format, pcfs(7FS), or as a UFS file system. If you see this message while you are trying to print, make sure that the print service is configured correctly. Technical Notes The symbolic name for this error is EINVAL, errno=22. Invalid null command Cause This C shell message results from a command line with two pipes (|) in a row or from a pipe without a command afterwards. Action Change the command line so that each pipe is followed by a command. Invalid_SS_JWS_HOME:no C:\\lib\basicframe.properties Cause The user was running WinNT 4.0 and received this error message when trying to launch Java WorkshopTM. Action Loaded software from marimba company was removed from the user's system. The product was castanet. Afterwards, the JWS worked without problems. Apparently, the product SunTM Tuner came loaded with JDKTM, and this conflicted with JWS. See www.marimba.com for more details on marimba products. Another possible solution: Double-click jws.exe within the C:\Java-WorkShop\jws\intel-win32\bin\ folder. I/O error Cause Some physical Input/Output error has occurred. If the process was writing a file at the time, data corruption is possible. Action First, find out which device is experiencing the I/O error. If the device is a tape drive, make sure a tape is inserted into the drive. When this error occurs with a tape in the drive, it is likely that the tape contains an unrecoverable bad spot. If the device is a floppy drive, an unformatted or defective diskette could be at fault. Format the diskette, or obtain a replacement. If the device is a hard disk drive, you might need to run fsck(1M) and possibly even reformat the disk. Technical Notes In some cases this error might occur on a call following the one to which it actually applies. The symbolic name for this error is EIO, errno=5. IP: Hardware address '08:00:20:xx:xx:xx' trying to be our address xxx.xxx.xxx.xxx! Cause The above message appears in /var/adm/messages. This can happen, for example, when the ATM lane device is set to promiscuous mode by running snoop -d lane0. Action Do not let the ATM lane device run in promiscuous mode and do not ignore the warning about it. Technical Notes A broadcast over ATM LAN Emulation is emulated by the broadcast and the unknown server (BUS) for the emulated LAN. If the Sun command transmits its ARP request, some switch implementations for LANE repeat the ARP request over the bus_forward channel, so that it can be seen on the local interface, again: ----- ATM AAL5 Header ----- Packet 1 arrived at 12:12:30.42 Packet size=66 bytes TRANSMIT : VC=75 LANE Data Frame Type=0x0806 (ARP) ARP: ----- ARP/RARP Frame ----- ARP: ARP: Hardware type = 1 ARP: Protocol type = 0800 (IP) ARP: Length of hardware address = 6 bytes ARP: Length of protocol address = 4 bytes ARP: Opcode 1 (ARP Request) ARP: Sender's hardware address = 8:0:20:82:8f:91 ARP: Sender's protocol address = 192.168.31.54, lab054-lane0 ARP: Target hardware address = ? ARP: Target protocol address = 192.168.31.50, lab050-lane0 ARP: ----- ATM AAL5 Header ----- Packet 2 arrived at 12:12:30.42 Packet size=66 bytes RECEIVE : VC=76 LANE Data Frame Type=0x0806 (ARP) ARP: ----- ARP/RARP Frame ----- ARP: ARP: Hardware type = 1 ARP: Protocol type = 0800 (IP) ARP: Length of hardware address = 6 bytes ARP: Length of protocol address = 4 bytes ARP: Opcode 1 (ARP Request) ARP: Sender's hardware address = 8:0:20:82:8f:91 ARP: Sender's protocol address = 192.168.31.54, lab054-lane0 ARP: Target hardware address = ? ARP: Target protocol address = 192.168.31.50, lab050-lane0 ARP: Now the request is answered: ----- ATM AAL5 Header ----- Packet 3 arrived at 12:12:30.42 Packet size=66 bytes RECEIVE : VC=84 LANE Data Frame Type=0x0806 (ARP) ARP: ----- ARP/RARP Frame ----- ARP: ARP: Hardware type = 1 ARP: Protocol type = 0800 (IP) ARP: Length of hardware address = 6 bytes ARP: Length of protocol address = 4 bytes ARP: Opcode 2 (ARP Reply) ARP: Sender's hardware address = 8:0:20:8c:4e:f0 ARP: Sender's protocol address = 192.168.31.50, lab050-lane0 ARP: Target hardware address = 8:0:20:82:8f:91 ARP: Target protocol address = 192.168.31.54, lab054-lane0 ARP: Normally, the reflected ARP Request is suppressed. If the lane device is set to promiscuous mode, all packets are passed to upper layers, and so the upper instances receive Sun's own packet and raise this message: Feb 10 12:12:30 sissi unix: IP: Hardware address '08:00:20:82:8f:91' trying to be our address 192.168.031.054! Is a directory Cause An attempt was made to read or write a directory as if it were a file. Action Look at a listing of all the files in the current directory and try again, specifying a file instead of a directory. Technical Notes The symbolic name for this error is EISDIR, errno=21. "J" java.lang.UnsatisfiedLinkError: Cause When trying to start Java Workshop 2.0 (or some other Java applications), the following error is displayed: java.lang.UnsatisfiedLinkError: setCursor at sun.awt.motif.MComponentPeer.initialize(Compiled Code) at sun.awt.motif.MTextAreaPeer.initialize(Compiled Code) at sun.awt.motif.MComponentPeer.(Compiled Code) at sun.awt.motif.MTextAreaPeer.(Compiled Code) at sun.awt.motif.MToolkit.createTextArea(Compiled Code) Action The LD_LIBRARY_PATH is probably set up to include a Java lib directory that does not quite match the java bin command used. For example, in the Solaris 2.6 release LD_LIBRARY_PATH = /usr/openwin/lib results in Java Workshop running properly. But setting LD_LIBRARY_PATH = /usr/java/lib:/usr/openwin/lib results in the error being displayed, since Java Workshop uses its own version of JDK and the startup process picks up a mixture of versions. To resolve, include /usr/java/lib in your LD_LIBRARY_PATH, since it is needed only in rare circumstances (like when you are using the Java Invocation API). "K" kernel read error Cause This message appears when savecore(1M), if activated, tries to copy a debugging image of kernel memory to disk, but cannot read various kernel data structures correctly. Generally, this occurs after a system panic has corrupted the main memory. Data corruption on the system is possible. Action Look at the kernel error messages that preceded this one to try to determine the cause of the problem. Error messages such as BAD TRAP usually indicate faulty hardware. Until the problem that caused the kernel panic is resolved, a kernel core image cannot be saved for debugging. killed Cause A process, which attempts to allocate large amounts of memory either as an array or by using malloc, fails when launched by the shell. This problem has been seen while allocating 240,000,000 elements as either an array of doubles or using malloc to allocate the 1,920,000,000 bytes of space. Action This can have one of two causes. Resolve it accordingly. 1. Lack of swap space Try running the program as root on the console; if it runs, this is not the problem. 2. Stack size and data segment size are in conflict If the stack size is set too large, this can conflict with the data segment, and the process cannot be started. Setting the stack size to the default value of 8192 resolves this problem and allows the programs to start. Killed Cause This message is strictly informational. If the killed process was writing a file, some data might be lost. Action Continue with your work. Technical Notes This message from the signal handler or various shells indicates that a process has been terminated with a SIGKILL. However, if you do not see this message and cannot terminate a process with a SIGKILL, you might have to reboot the machine to remove that process. kmem_free block already free Cause This is a programming error, probably from a device driver. Action Determine which driver is giving this message and contact the vendor for a software update, as this message indicates a bug in the driver. Technical Notes This message is from the DDI programming function kmem_free(9F), which releases a block of memory at address addr of size siz that was previously allocated by the DDI function kmem_alloc(9F). Both addr and siz must correspond to the original allocation. If you have source code for the driver, follow kmem_alloc(9F) and kmem_free(9F) in the code to make sure they allocate and free the same chunk of memory. "L" last message repeated int times Cause This message comes from syslogd(1M), the facility that prints messages on the console and records them in /var/adm/messages. To reduce the log size and minimize buffer usage, syslog collapses any identical messages it sees during a 20 second period, then prints this message with the number of repetitions. Action Look above this message to see which message was repeated so often. Then consider the repeated message and take action accordingly. If repeated log entries such as su ... failed appear, consider the possibility of a security breach. late initialization error Cause Netscape enterprise server 2.0 receives these error messages from the daemon: late initialization error start up failure no such file or directory system will not connect to port 80 Action This is a file permission problem caused by someone changing the UID for the httpd user in /etc/passwd. Change UID in /etc/passwd to the correct UID. ld.so.1 fatal: can't set protection on segment Cause Applications have recently begun to fail with this error, ld.so.1 fatal: can't set protection on segment. The failures are random. Action This was happening because of the recent introduction of a rogue application that consumed most of the swap space on the system. The other applications, which failed randomly, were doing so because of having insufficient swap space to run. The error from ld.so.1 occurred because there was no segment on which to set the protections. ld.so.1: string: fatal: string: can't open file: errno=2 Cause This message is produced in releases earlier than Solaris 2.5.1. It is not produced in releases after Solaris 2.5.1. For more information about the cause, refer to "ld.so.1: string: fatal: string: open failed: No such file or directory". It has the same cause. Action For the resolution, refer to "ld.so.1: string: fatal: string: open failed: No such file or directory". Their resolutions are the same. See Also For more information about the Linker, see the Linker and Libraries Guide. ld.so.1: string: fatal: string: open failed: No such file or directory Cause This message is produced in releases after Solaris 2.5.1. It is not produced in releases before Solaris 2.5.1. This message indicates that the runtime linker, ld.so.1(1), while running the program specified after the first colon, could not find the shared object specified after the third colon. (A shared object is sometimes called a dynamically linked library.) Action As a workaround, set the environment variable LD_LIBRARY_PATH to include the location of the shared object in question. For example: /usr/dt/lib:/usr/openwin/lib Better yet, if you have access to source code, recompile the program using the -Rpath loader option. Using LD_LIBRARY_PATH slows down performance. See Also For more information about the Linker, see the Linker and Libraries Guide. ld.so.1: string: fatal: relocation error: string: string: referenced symbol not found Cause This message is produced in releases after the Solaris 2.5.1. It is not produced in the Solaris 2.5.1 or earlier releases. The message from the runtime linker ld.so.1(1) indicates that in trying to execute the application given after the first colon, the specified symbol could not be found for relocation. The message goes on to say in what file the symbol was referenced. Because this is a fatal error, the application terminates with this message. Action Run the ldd -d command on the application to show its shared object dependencies and symbols that are not found. Probably your system contains an old version of the shared object that should contain this symbol. Contact the library vendor or author for an update. Technical Notes This error does not necessarily occur when you first bring up an application. It could take months to develop, if ordinary use of the application seldom references the undefined symbol. See Also For more information about the Linker, see the Linker and Libraries Guide. ld.so.1: string: fatal: relocation error: symbol not found: string Cause This message is produced in the Solaris 2.5.1 release and earlier. It is not produced in releases after the Solaris 2.5.1. Refer to "ld.so.1: string: fatal: relocation error: string: string: referenced symbol not found". It has the same cause. Action For a resolution, refer to "ld.so.1: string: fatal: relocation error: string: string: referenced symbol not found". Their resolutions are the same. Technical Notes This error does not necessarily occur when you first bring up an application. It could take months to develop, if ordinary use of the application seldom references the undefined symbol. See Also For more information about the Linker, see the Linker and Libraries Guide. le0: Memory error! Cause This message indicates that the network interface encountered an access time-out from the CPU's main memory. There is probably nothing wrong except system overload. Action If the system is busy with other processes, this error can occur frequently. If possible, try to reduce the system load by quitting applications or killing some processes. Technical Notes The Lance Ethernet chip timed out while trying to acquire the bus for a DVMA transfer. Most network applications wait for a transfer to occur, so generally no data gets lost. However, data transfer might fail after too many time-outs. See Also For more information about the Lance Ethernet chip, see the le(7D) man page. le0: No carrier-- cable disconnected or hub link test disabled? Cause Stand-alone machines with no Ethernet port connection get this error when the system tries to access the network. If the Ethernet cable is connected, this message could result from a mismatch between the machine's NVRAM settings and the Ethernet hub settings. Action If this message is continuous, try to save any work to a local disk. When a machine is configured as a networked system, it must be plugged into the Ethernet with a twisted pair J45 connector. If the Ethernet cable is plugged in, find out whether or not the Ethernet hub does a link integrity test. Then become superuser to check and possibly set the machine's NVRAM. If the hub's link integrity test is disabled, set this variable to false. # eeprom | grep tpe tpe-link-test?=true # eeprom 'tpe-link-test?=false' The default setting is true. If for some reason tpe-link-test? was set to false, and the hub's link integrity test is enabled, reset this variable to true. le0: No carrier-- transceiver cable problem? Cause Stand-alone machines with no Ethernet port connection get this error when the system tries to access the network. Action If this message is continuous, try to save any work to a local disk. When a machine is configured as a networked system, it must be plugged into the Ethernet with either a twisted pair J45 connector or thicknet 10Base-T connector (depending on the building's Ethernet cable type). Technical Notes Older workstations have a thicknet connection on the back, instead of a twisted pair Ethernet connection; therefore, they require a thicknet to the twisted pair transceiver to translate between cabling types. level 15 interrupt Cause This error occurred on an SS20. .lib section in a.out corrupted Cause This occurred while trying to exec(2) an a.out(4), which requires that a static shared library be linked in. Also, there was erroneous data in the .lib section of the a.out(4). The .lib section tells exec(2) which static shared libraries are needed. The a.out(4) is probably corrupted. Technical Notes The symbolic name for this error is ELIBSCN, errno=85. LINK COUNT FILE I=i OWNER=o MODE=m SIZE=s MTIME=t COUNT... ADJUST? Cause During phase 4, fsck(1M) determined that the inode's link count for the specified file is wrong and asks if you want to adjust it to the value given. Action Generally you can answer "yes" to this question without harming the file system. See Also For more information on fsck(1M), see the section on checking file system integrity in the System Administration Guide, Volume 1. Link has been severed Cause This error occurs when the connection to a remote machine is gone, for example after a remote procedure call is interrupted. Technical Notes The symbolic name for this error is ENOLINK, errno=67. LL105W: Protocol error detected. Cause This error message comes from LifelineTM Mail, an unbundled PC compatibility application. Most likely, someone set up a user account without a password. Action To solve this problem, assign the user a password. ln: cannot create /dev/fb: Read-only filesystem Cause During device reconfiguration at boot time, the system cannot link to the frame buffer because /dev is on a read-only file system. Action Check that /dev/fb is a symbolic link to the hardware frame buffer, such as cgsix(7D) or tcx(7D). Ensure that the file system containing /dev is mounted read-write. lockd[int]: create_client: no name for inet address 0xhex Cause This lock daemon message usually indicates that the NIS hosts.byname and hosts.byaddr maps are not coordinated. Action Wait a short time for the maps to synchronize. If they do not, take steps to coordinate them. See Also For information on updating NIS data, see the section on NIS maps in the NIS+ and FNS Administration Guide. If you are using AnswerBook online documentation, "hosts.byaddr" is a good search string. log_get: len is not a multiple of 4 from FW-1 Cause The Firewall-1TM log contains this message. It is logged when one of the log files is somehow damaged, usually after a power outage or violent reboot of the system. Action Try the following workaround: # fwstop # rename fw.log, fw.alog, fw.vlog # fwstart Login incorrect Cause This message from the login(1) program indicates an incorrect combination of login name and password. There is no way to tell whether the problem comes from the login name, the password, or both. Other programs such as ftp(1), rexecd(1M), sulogin(1M), and uucp(1C) also give this error under similar conditions. Action Check the /etc/passwd file and the NIS or NIS+ passwd map on the local system to see if an entry exists for this user. If a user has simply forgotten the password, su(1M) and set a new one with the passwd(1) username command. This command automatically updates the NIS+ passwd map, but with NIS you will need to coordinate the update with the passwd map. The Login incorrect problem can also occur with older versions of NIS when the user name has more than eight characters. If this is the case, edit the NIS password file, change the user name to have eight or fewer characters, and then remake the NIS passwd map. If you cannot log in to the system as root, despite knowing the proper password, it is possible that the /etc/passwd file is corrupted. Try to log in as a regular user and su(1M) to root. If that does not work, see the message su: No shell and follow most of the instructions given there. Instead of changing the default shell, make the password field blank in /etc/shadow. lp hang Cause On a print server, the queue continues to grow but nothing comes out of the printer. The printer daemon is hung. Action Below is a simple procedure for flushing a hung printing queue: Login or switch user to root. Issue the reject(1M) printername command to make sure no one sends any job to the printer. Turn the power off to the printer. If the active job appears to be causing the hang, remove it from the print queue with the cancel(1) jobnumber command and ask the owner to requeue that print job. Shut down the print queue with the /usr/lib/lpshut command. Remove the lock file /var/spool/lp/SCHEDLOCK and the temporary files /var/spool/lp/tmp/*/*. Turn the printer back on. Restart the print queue with the /usr/lib/lpsched command. See Also For more information on print queuing, see the System Administration Guide, Volume 2. If you are using AnswerBook online documentation, "print server" is a good search string. "M" Machine is not on the network Cause This error is remote file sharing (RFS) specific. It occurs when users try to advertise, unadvertise, mount, or unmount remote resources while the machine has not properly started a network connect. Technical Notes The symbolic name for this error is ENONET, errno=64. Mail Tool is confused about the state of your Mail File. Cause This message appears in a pop-up dialog box whenever you ask mailtool(1) to access messages after another mail reader has modified your inbox. A request follows: Please Quit this Mail Tool. Action Click continue to close the dialog box, then exit mailtool(1). If you continue trying to read mail, messages deleted by the other mail reader will never appear, and mailtool(1) will fail to see any new messages. mail: Your mailfile was found to be corrupted (Content-length mismatch). Cause This message comes from mail(1) or mailx(1) whenever it detects messages with a different content length than advertised. The mail(1) program tells you which message might be truncated or might have another message concatenated to it. Two common causes of content length mismatches are the simultaneous use of different mail readers (such as mail(1) and mailtool(1)), or the use of a mail reading program (or an editor) that does not update the content-length field after altering a message. Action The mailx(1) program can usually recover from this error and delineate mail message boundaries correctly. Pay close attention to the message that might be truncated or combined with another message, and to all messages after that one. If a mail file becomes hopelessly corrupted, run it through a text editor to eliminate all Content-Length lines, and ensure that each message has a From (no colon) line for each message, preceded by a blank line. To avoid mail file corruption, exit from mailtool(1) without saving changes when you are currently running mail(1) or mailx(1). mailtool: Can't create dead letter: Permission denied Cause An attempt was made to send a message with mailtool(1) from a directory where the user does not have write permission, and the user's home directory is currently unavailable. Action Change to another directory and start mailtool(1) again, or use chmod(1) to change permissions for the directory (if possible). mailtool: Could not initialize the Classing Engine Cause When a user runs mailtool(1) on a remote machine, setting the DISPLAY environment back to the local machine, this message might appear inside a dialog box window. The message also indicates that the Classing Engine must be installed to use Attachments. This problem occurs because rlogin(1) does not propagate the user's environment. Action Exit mailtool(1) and set your OPENWINHOME environment variable to /usr/openwin. Then run mailtool(1) again. The error message does not appear, and you can now use Attachments. Technical Notes Classing Engine is a new name for Tool Talk. Earlier versions of mailtool(1) said Tool Talk: TT_ERR_NOMP instead of Classing Engine. Management Server is VPN while client is NON-VPN Cause When the Windows GUI (fwpolicy) is started in Firewall-1 3.0 and the login process is initiated, the error message window pops up displaying this message. Action The Firewall-1 GUI packages SUNWfwgui and SUNWfweui were installed in the incorrect order. First, remove the packages using pkgrm(1M). Next, install the SUNWfwgui and, then, the SUNWfweui in that order to resolve the error message. file name may contain holes - can't swap on it. Cause A swap file was created with the following command: # mkfile -nv 50m /ab/swap_50mb When the user tried to add the file with # swap -a /ab/swap_50mb it failed with this message: /ab/swap_50mb may contain holes - can't swap on it. /ab/swap_50mb: Error 0 Action Starting with the Solaris 2.0 release, -n works only when the file is to be used by the NFS system. Local swap files cannot be created with the -n option. mbuf map full Cause This error has to do with mbuf allocation. Memory address alignment Cause This message can occur when printing large files on a SPARCprinterTM attached to a SPARCstation 2. Action Replace the SPARCstation 2 CPU with one that is at the most recent dash level. memory leaks Cause An application uses up more and more memory, until all swap space is exhausted. Action Third-party software can help identify memory leaks in their applications. If you suspect that you have a memory leak, you can use sar(1) to check on the Kernel Memory Allocation (KMA). Any driver or module that uses KMA resources, but does not specifically return the resources before it exits, can create a memory leak. See Also For more information on memory leaks, see the section on monitoring system activity in the System Administration Guide, Volume 2. If you are using AnswerBook online documentation, "displaying disk usage" is a good search string. Also, see the section on system resource problems in the NIS+ and FNS Administration Guide. Message too long Cause A message sent on a transport provider was larger than the internal message buffer or some other network limit. Technical Notes The symbolic name for this error is EMSGSIZE, errno=97. mount: /dev/dsk/string is already mounted, /string is busy, or... Cause While trying to mount a file system, the mount(1M) command received a "Device busy" (EBUSY) error code. Several possible reasons are: this /dev/dsk file system is already mounted on a different directory, the busy path name is the working directory of an active process, or the system has exceeded its maximum number of mount points (unlikely). Action Run /etc/mount to see if the file system is already mounted. If not, check to see if any shells are active in the busy directory (did the user switch to the directory by using cd(1)?), or if any processes in the ps(1) listing are active in that directory. If the reason for the error message is not obvious, try using a different directory for the mount point. mount: giving up on: /string Cause An existing server did not respond to an NFS mount request, so after retrying a number of times (default 1000), the mount(1M) command has ceased. Nonexistent servers or bad mount points produce different messages. Action If the RPC: Program not registered message precedes this one, the requested mount server probably did not share (export) any file systems, so it has no NFS daemons running. Have the superuser on the mount server run share(1M) on the file system, then run /etc/init.d/nfs.server start to begin NFS service. If the requested mount server is down or slow to respond, check whether the machine needs repair or rebooting. mount: mount-point /string does not exist. Cause Someone tried to mount a file system onto the specified directory, but there is no such directory. Action If this is the directory name you want, run mkdir(1) to create this directory as a mount point. mount: the state of /dev/dsk/string is not okay Cause The system was unable to mount the file system that was specified because the super block indicates that the file system might be corrupted. This is not an impediment for read-only mounts. Action If you do not need to write on this file system, run mount(1M) on it using the -o ro option. Otherwise, do as one of the message continuation lines suggests and run fsck(1M) to correct the file system state and update the super-block. See Also For more information on using fsck(1M), see the section on checking file system integrity in the System Administration Guide, Volume 1. Multihop attempted Cause This error occurs when users try to access remote resources that are not directly accessible. Technical Notes The symbolic name for this error is EMULTIHOP, errno=74. "N" Name not unique on network Cause The given log name is not unique. Technical Notes The symbolic name for this error is ENOTUNIQ, errno=80. named [pid]: hostname.domainname has CNAME and other data (illegal) Cause This error message is displayed on the DNS server. Action This error indicates that an alias (CNAME) is associated with another type of DNS record. The DNS system allows you to set up an alias to a system using the CNAME record. See the following example: alias1 IN CNAME host1.domain1. The alias alias1 cannot appear in any other type of record. Only the actual name of the host can be used. So, if you wanted to use this host as a mail exchanger, the record alias1 IN MX 10 host2.domain1. would be illegal and would produce the error. Instead, you should use: host1 IN MX 10 host2.domain1. This remedy applies to all types of records, including HINFO and A records. Also, this error might occur without explicitly setting the left side of a record. The DNS system defaults the left side to the last given left side. So you might have the following in a named database file: host1 IN A 123.124.125.126 IN HINFO Sun Solaris alias1 IN CNAME host1.domain1. IN MX 10 host2.domain1. In this fragment, an implied alias1 is in the left side of the MX record. If the alias was added after the database was in use for a while, the error would suddenly occur. The MX record was legal until the CNAME was added in front of it. This example could be fixed either by reversing the order of the MX and CNAME records, or explicitly giving the host1 in the left side of the MX record. /net/string: No such file or directory Cause A user tried to change directory--for example with cd(1)--to a network partition on the system specified after /net/, but this host either does not exist or has not shared (exported) any file system. Action To gain access to files on this system, try rlogin(1). To export file systems from the remote system, become superuser on that system and run the share(1M) command with the appropriate options. If that system is sharing file systems for the first time, also run /etc/init.d/nfs.server start to begin the NFS service. Network dropped connection because of reset Cause The host you were connected to crashed and rebooted. Technical Notes The symbolic name for this error is ENETRESET, errno=129. Network is down Cause A transport connection failed because it encountered a dead network. Action Report this error to the system administrator for the network. If you are the person responsible for this network, check why the network is dead and what repairs are necessary. Technical Notes This error results from status information delivered by the underlying communication interface. The symbolic name for this error is ENETDOWN, errno=127. Network is unreachable Cause An operational error occurred either because there was no route to the network or because negative status information was returned by intermediate gateways or switching nodes. The returned status is not always sufficient to distinguish between a network that is down and a host that is down. See the No route to host message. Action Check the network routers and switches to see if they are disallowing these packet transfers. If they are allowing all packet transfers, check network cabling and connections. Technical Notes The symbolic name for this error is ENETUNREACH, errno=128. NFS getattr failed for server string: RPC: Timed out Cause This message appears on an NFS client that requested a service from an NFS server that has failing hardware. Often the message NFS read failed appears along with this message. If the server were merely down or slow to respond, the NFS server not responding message would appear instead. Data corruption on the server system is possible. Action Because this message usually indicates server hardware failure, initiate repair procedures as soon as possible. Check the memory modules, disk controllers, and CPU board. See Also For more information on NFS tuning, see the chapter on monitoring network performance in the System Administration Guide, Volume 2. nfs mount: Couldn't bind to reserved port Cause This message appears when a client attempts to use NFS to mount a file system from a server that has more than one Ethernet interface configured on the same physical subnet. Action Always connect multiple Ethernet interfaces on one router system to different physical subnetworks. nfs mount: mount: string: Device busy Cause This message appears when the superuser attempts to NFS mount on top of an active directory. The busy device is actually the working directory of a process. Action Determine which shell on the workstation is currently located below the mount point, and change that directory. Be wary of subshells (such as su(1M) shells) that could be in different working directories while the parents remain below the mount point. NFS mount: /string mounted OK Cause While booting, the system failed to mount the directory specified after the first colon, probably because the NFS server involved was down or slow to respond. The mount ran in the background and successfully contacted the NFS server. Action This is strictly an informative message to notify you that the mount process has completed. NFS mounted callog file Unsupported. Cause After installing the Solaris 2.6 software on a system, when users try to start their calendars either with CDE's calendar manager (/usr/dt/bin/dtcm) or OpenWindows' calendar (/usr/openwin/bin/cm), they see this dialog box: Calendar :Informational - NFS mounted callog file Unsupported. Your default startup Calendar file appears to be NFS mounted or a symlink to the same. This is Not Supported. Continue The following error is displayed in the console window when the Continue button is clicked: date time host rpc.cmsd[pid]: rpc.cmsd : NFS mounted callog file Not Supported - user@host date time host rpc.cmsd[pid]: rpc.cmsd : NFS mounted callog file Not Supported - user@host The calendars would have worked under the Solaris software versions including and prior to 2.5.1, however. Action It has long been known that NFS-mounted calendars are not supported. The calendar can be corrupted when more than one person uses the calendar at the same time. If two rpc.cmsd daemons write to the callog file at the same time, the file becomes corrupt. However, two rpc.cmsd daemons could be run simultaneously on the Solaris 2.5.1 release, even though this is not a supported configuration. With the Solaris 2.6 release, this concurrency is no longer an option. rpc.cmsd does not allow the user to start a calendar that is NFS-mounted and produces the previous error message. NFS read failed for server string Cause This message generally indicates a permissions problem. Perhaps a directory or file permission was changed while the client kept the file open. Perhaps the file system's share or netgroup permissions changed. If the server were down or the network overloaded, the NFS server not responding message would appear instead. Action Log in to the NFS server and check the permissions of directories leading to the file. Make certain that the file system is shared with (exported to) the client experiencing an NFS read failure. See Also For more information, see the chapter on NFS troubleshooting in the System Administration Guide, Volume 3. nfs_server: bad getargs for int/int Cause This message comes from the NFS server when it receives a request with unrecognized or incorrect arguments. Typically, it means the request could not be XDR decoded properly. This error can result from corruption of the packet over the network, or from an implementation bug causing the NFS client to encode its arguments improperly. Action If this message originates from a single client, investigate that machine for NFS client software bugs. If this message appears throughout a network, especially accompanied by other networking errors, investigate the network cabling and connectors. NFS server string not responding still trying Cause In most cases this common message indicates that the system has requested a service from an NFS server that is either down or extremely slow to respond. In some cases this message indicates that the network link to this NFS server is broken, although usually that condition generates other error messages as well. In a few cases this message indicates NFS client setup problems. Action Check the non-responding NFS server for the need for machine repair or rebooting. Encourage your user community to report such problems quickly but only once. See Also For more information, see the chapter on NFS troubleshooting in the System Administration Guide, Volume 3. NFS server string ok Cause This message is the follow-up to the NFS server not responding error. It indicates that the NFS server is again operating. Action When an NFS server first starts, it is busy fulfilling client requests for a while. Be patient and wait for your client system to respond. Making many extraneous requests only further slows the NFS server response time. NFS string failed for server string: error int (string) Cause The failed NFS operation could be any one of the following: getattr, setattr, lookup, access, readlink, read, write, create, mkdir, symlink, mknod, remove, rmdir, rename, link, readdir, readdir+, fsstat, fsinfo, pathconf, or commit. See Also For more information on NFS, see the System Administration Guide, Volume 3. nfs umount: string: is busy Cause This message appears when the superuser attempts to unmount an active NFS file system. The busy point is the working directory of a process. Action Determine which shell (or process) on the workstation is currently located in the remotely mounted file system, and change--cd(1)--out of that directory. Be wary of subshells (such as su(1M) shells) that could be in different directories while the parent shells remain in the NFS file system. NFS write error on host string: No space left on device. Cause This console message indicates that an NFS-mounted partition has filled up and cannot accept writing of new data. Unfortunately, software that attempts to overwrite existing files will usually zero-out all data in these files. This is particularly destructive on NFS-mounted /home partitions. Action Find the user or process that is filling up the file system, and stop the out-of-control process as soon as you can. Then delete files as necessary to create more space on the file system (large core(4) files are good candidates for deletion). Have users write any modified files to local disk if possible. If this error occurs often, redistribute directories to ease the demand on this partition. See Also For more information on disk usage, see the System Administration Guide, Volume 2. If you are using AnswerBook online documentation, "managing disk use" is a good search string. NFS write failed for server string: RPC: Timed out Cause This error can occur when a file system is soft mounted, and server or network response time lags. Any data written to the server during this period could be corrupted. Action If you intend to write on a file system, never specify the soft-mount option. Use the default hard mount for all the file systems that are mounted read-write. See Also For more information, see the chapter on NFS troubleshooting in the System Administration Guide, Volume 3. NIS+ authentication failure Cause This is a Federated Naming Service message. The operation could not be completed because the principal making the request could not be authenticated with the name service involved. Action Run the nisdefaults(1) command to verify that you are identified as the correct NIS+ principal. Also check that the system has specified the correct public key source. See Also For more information, see the authentication and authorization overview in the NIS+ and FNS Administration Guide. nis_cachemgr: Error in reading NIS cold start file : '/var/nis/NIS_COLD_START' Cause After installing patches 104331-04 and 103612-33, nis_cachemgr(1M) failed to start. The symptoms are as follows during the reboot: Sep 11 16:34:00 nis_cachemgr: Error in reading NIS cold start file : '/var/nis/NIS_COLD_START' Additionally, nis_cachemgr(1M) is not running after login. Trussing nis_cachemgr(1M) showed that it is reading /var/nis/NIS_COLD_START and immediately reporting an error. Neither reinitializing the client nor copying NIS_COLD_START helps. Action This error is a timing problem. Put a sleep(1) before the NIS+ initialization in /etc/init.d/rpc, after rpc.bind has been started. rpc.bind is slow initializing and needs a few extra seconds before nis_cachemgr(1M) takes effect. No buffer space available Cause An operation on a transport endpoint or pipe was not performed because the system lacked sufficient buffer space or because a queue was full. The target system probably ran out of memory or swap space. Any data written during this condition is probably lost. Action To add more swap area, use the swap -a command on the target system. Alternatively, reconfigure the target system to have more swap space. As a general rule, swap space should be two to three times as large as physical memory. Technical Notes The symbolic name for this error is ENOBUFS, errno=132. No child processes Cause This message can appear when an application tries to communicate with a cooperating process that does not exist. Action Restart the parent process so it can create the child processes again. If that does not help, this error could be the result of a programming error; contact the vendor or author of the program for an update. Technical Notes A wait(2) system call was executed by a process that had no existing or unwaited-for child processes. The child processes could have exited prematurely, or might never have been created. The symbolic name for this error is ECHILD, errno=10. No default media available Cause The volume manager issues this message if a user makes an eject(1) request when the drives contain no diskette or CD-ROM to eject. Action Insert a diskette or CD-ROM. If the volume manager is confused and a diskette or CD-ROM is actually in a drive, run volcheck(1) to update the volume manager. If the system remains confused, try booting with the -r option to reconfigure devices. No directory! Logging in with home=/ Cause The login(1) program could not find the home directory listed in the password file or NIS passwd(4) map, so it deposited the user in the root directory. Action Check that the user's home directory is mounted and is owned by and accessible to that user. Perhaps the automounter tried to mount the home directory, but the NFS server did not respond quickly enough. Try listing the files in /home/username. If the NFS server responds to this request, have the user log out and log in again. The automounter daemon might not be running. Run the ps(1) command to see if automountd(1M) is present. If not, run the second command; if it appears to be wedged, run both these commands: # /etc/init.d/autofs stop # /etc/init.d/autofs start When the automounter daemon is running, verify that the /etc/auto_master file has a line like this: /home auto_home Verify that the /etc/auto_home file has a line like this: +auto_home These entries depend on the NIS auto_home map. Also, the NFS server might not have shared (exported) this /home directory, or the NFS daemons on the server might have disappeared. See Also For more information on NFS, see the System Administration Guide, Volume 3. No message of desired type Cause An attempt was made to receive a message of a type that does not exist on the specified message queue. See the msgsnd(2) and msgrcv(2) man pages for details. Action This message indicates an error in the System V IPC message facility. Generally the message queue is empty or devoid of the desired message type while IPC_NOWAIT is set. Technical Notes The symbolic name for this error is ENOMSG, errno=35. No recipients specified Cause This message comes from the mailx(1) command whenever a user does not provide an address in the To: field. Action For details, refer to "Recipient names must be specified". No record locks available Cause No more record locks are available. The system lock table is full. Action Try again later, when more locks might be available. Technical Notes The symbolic name for this error is ENOLCK, errno=46. Perhaps a process called fcntl(2) with the F_SETLK or F_SETLKW option, and the system maximum was exceeded. The system contains several different locking subsystems, including fcntl(2), the NFS lock daemon, and mail locking. All subsystems can produce this error. No route to host Cause An operational error occurred because there was no route to the destination host, or because of status information returned by intermediate gateways or switching nodes. The returned status is not always sufficient to distinguish between a host that is down and a network that is down. Refer to "Network is unreachable". Action Check that the network routers and switches are not disallowing these packet transfers. If they are allowing all packet transfers, check network cabling and connections. Technical Notes The symbolic name for this error is EHOSTUNREACH, errno=148. No shell Connection closed Cause A user has attempted a remote login to the system, and has a valid account name and password, but the shell specified for the account is not available on that system. Action If you have a copy of the requested shell, become superuser and install the missing shell on that system. Otherwise, change the user's password file entry--perhaps only in the NIS+ or NIS passwd(4) map--to specify an available shell such as /bin/csh or /bin/ksh. No space left on device Cause While writing an ordinary file or creating a directory entry, there was no free space left on the device. The disk, tape, or diskette is full of data. Any data written to that device during this condition can be lost. Action Remove unneeded files from the hard disk or diskette until there is space for all the data you are writing. You also might move some directories onto another file system and create symbolic links accordingly. When a tape is full, continue on another one, use a higher-density setting, or obtain a higher-capacity tape. To create multi-volume tapes or diskettes, use the pax(1) or cpio(1) command; tar(1) is still limited to a single volume. Technical Notes The symbolic name for this error is ENOSPC, errno=28. No such device Cause An attempt was made to apply an operation to an inappropriate device, such as writing to a nonexistent device. Action Check the /devices directory to find out why this device does not exist, or why the program expects it to exist. The similar No such device or address message tends to indicate I/O problems with an existing device, whereas this message tends to indicate a device that does not exist at all. Technical Notes The symbolic name for this error is ENODEV, errno=19. No such device or address Cause This error can occur when a tape drive is offline or when a device has been powered off or removed from the system. Action For tape drives, make sure the device is connected, powered on, and toggled online (if applicable). For disk and CD-ROM drives, check that the device is connected and powered on. With all SCSI devices, ensure that the target switch or dial is set to the number where the system originally mounted it. To inform the system of a change to the target device number, reboot using the -r (reconfigure) option. Technical Notes This message results from I/O to a special file's subdevice that either does not exist or that exists beyond the limit of the device. The symbolic name for this error is ENXIO, errno=6. No such file or directory Cause The specified file or directory does not exist. Either the file name or path name was entered incorrectly. Action Check the file name and path name for correctness and try again. If the specified file or directory is a symbolic link, it probably points to a nonexistent file or directory. Technical Notes The symbolic name for this error is ENOENT, errno=2. no such map in server's domain Cause A user or an application tried to look up something using Network Information Services (NIS), but NIS has no corresponding database for this request. Action Check the following: Make sure the NIS map name is spelled correctly. To see a list of nicknames for the various NIS maps, run the ypcat -x command. To see a full list of the various NIS maps (databases), run the ypwhich -m command. If the NIS service was not running on the current machine, these commands would result in this message: "can't communicate with ypbind". No such process Cause This process cannot be found. The process could have finished execution and disappeared, or it might still be in the system under a different numeric ID. Action Use the ps(1) command to check that the process ID you are supplying is correct. Technical Notes No process corresponds to the specified process ID (PID), lightweight process ID, or thread_t. The symbolic name for this error is ESRCH, errno=3. No such user as string-- cron entries not created Cause A file exists in /var/spool/cron/crontabs for the specified user, but this user is not in /etc/passwd or the NIS passwd(4) map. The system cannot create cron(1M) entries for nonexistent users. Action To eliminate this message at boot time, remove the cron file for the nonexistent user, or rename it if the user's login name has changed. If this is a valid user, create an appropriate password entry for this name. No utmpx entry Cause During login, file system full errors are seen and the login fails with the message No utmpx entry. This error is caused by a full file system. The system has no space to write its utmpx (login information) entry. Action To correct this condition the system must be booted into single user mode. Then clear (do not delete) these files: /var/adm/utmp and /var/adm/utmpx. This can be done by typing: #cat /dev/null > /var/adm/utmp #cat /dev/null > /var/adm/utmpx These commands zero-out the files but keep them with the correct permissions. In some cases, after clearing these files, the /var file system might still be full. In this case type: du -askd /var |sort -nr |more This command gives you a listing of the files from largest to smallest in the /var file system. To create space you can zero these files: /var/cron/log, /var/spool/lp/logs, and /var/adm/messages. You can also check /.wastebasket for large files to delete. no valid fm license Cause The firewall gives you this error when the proper module is not updated. Action When you run the VPN version, you need to use the module fwmodvpn 5.x.o. To make the update, you can follow these steps: # fwstop # cd $FWDIR/modules # mv fwmod.5.x.o old.fwmod.5.x.o # ln -s fwmodvpn.5.x.o fwmod.5.x.o # fw putlic 0 0-0-0 0 # For Firewall-1 2.x) # fw putlic -K # 3.x Firewall) # fwstart no VTOC Cause In this case, the user installs the Solaris 2.6 IA software and receives this error when rebooting the system. Other error messages refer to not having a default boot device configured, but this is the usual error message. This error leaves the system unusable; the user cannot boot. Action The user needs to do the following: Insert the Solaris 2.6 software CD in the drive. Boot with the Device Configuration Assistant diskette. Select the CD-ROM to boot when presented with the available devices. Type b -s when asked to select either Interactive or Jumpstart to boot as a single user. At the # prompt, type the following: # mount /dev/dsk/cxdxpx /a (where "x" is information from your system) # TERM=at386; export TERM # cd /a/platform/i86pc/boot/solaris/devicedb In this directory is a file called master. BEFORE EDITING this file, make a backup copy. After it is backed up, view the master file in vi. Look for the term ata.bef and replace it with the word none. Run touch /reconfigure and then reboot the system. (The command boot -r, reboot -- -r also works.) Not a data message Cause During a read(2), getmsg(2), or ioctl(2) I_RECVFD call to a STREAMS device, some data has come to the head of the queue that cannot be processed. That data depends on the call: read(2) -- Controls information or passes a file descriptor getmsg(2) -- Passes a file descriptor ioctl(2) -- Controls data information Technical Notes The symbolic name for this error is EBADMSG, errno=77. Not a directory Cause A non-directory was specified where a directory is required, such as a path prefix or an argument to the chdir(2) call. Action Look at a listing of all the files in the current directory and try again, specifying a directory instead of a file. Technical Notes The symbolic name for this error is ENOTDIR, errno=20. Not a stream device Cause A putmsg(2) or getmsg(2) system call was attempted on a file descriptor that is not a STREAMS device. Technical Notes The symbolic name for this error is ENOSTR, errno=60. Not enough space Cause This message indicates that the system is running many large applications simultaneously and has run out of swap space (virtual memory). It could also indicate that applications failed without freeing pages from the swap area. Swap space is an area of disk set aside to store portions of applications and data not immediately required in memory. Any data written during this condition is probably lost. Action Reinstall or reconfigure the system to have more swap space. A general rule is that swap space should be two to three times as large as physical memory. Alternatively, use mkfile(1M) and swap(1M) to add more swap area. This example shows how to add 16 Mbytes of virtual memory in the /usr/swap file (any file system with enough free space would work): # mkfile 16m /usr/swap # swap -a /usr/swap To make this reconfiguration automatic at boot time, add the following line to the /etc/vfstab file: /usr/swap - - swap - no - Technical Notes When calling the fork(2), exec(2), sbrk(2), or malloc(3C) routine, a program asked for more memory than the system could supply. This is not a temporary condition; swap space is a system parameter. The symbolic name for this error is ENOMEM, errno=12. not found Cause This message indicates that the Bourne shell could not find the program name given as a command. Action Check the form and spelling of the command line. If that data looks correct, do a echo $PATH to see if the user's search path is correct. When communications are garbled, it is possible to unset a search path to such an extent that only built-in shell commands are available. Below is a command to reset a basic search path: $ PATH=/usr/bin:/usr/ccs/bin:/usr/openwin/bin:. If the search path looks correct, check the directory contents along the search path for missing programs or directories that are not mounted. Not login shell Cause This message results when a user tries to use the logout(1) command from a shell other than the one started at login time. Action To quit a non-login shell, use the exit(1) command. Continue doing so until you have logged out. See Also For more general information on the login shell, see the section on customizing your work environment in the Solaris Advanced User's Guide. Not on system console Cause A user tried to use the login(1) command to a system as the superuser (uid=0, which is not necessarily root) from a terminal other than the console. Action Log in to that system as a normal user, then run su(1M) to become superuser. To allow superuser logins from any terminal, comment out the CONSOLE line in /etc/default/login (this is not recommended for security reasons). Not owner Cause Either an ordinary user tried to do something reserved for the superuser, or the user tried to modify a file in a way restricted to the file's owner or to the superuser. Action Switch user to root and try again. Technical Notes The symbolic name for this error is EPERM, errno=1. Not supported Cause This version of the system does not support the feature requested, although future versions of the system might provide support. Action This is generally not a system message from the kernel, but an error returned by an application. Contact the vendor or author of the application for an update. Technical Notes The symbolic name for this error is ENOTSUP, errno=48. NOTICE: /string: out of inodes Cause The file system specified after the first colon probably contains many small files, exceeding the per-file system limit for inodes (file information nodes). Action If many small files were created unintentionally, remove them to resolve the problem. Otherwise, follow these steps to increase file system capacity for small files: Make several backup copies of the file system on different tapes (for safety). Change the machine to single-user mode. Use the newfs(1M) command with the -i option to increase inode density for this file system. The following is an example: # newfs -i 1024 /dev/rdsk/partition Restore the file system from a backup tape. -------------------------------------------------------------------------------- Note - Increasing the inode density slightly reduces the total file system capacity. -------------------------------------------------------------------------------- NOTICE: vxvm: unexpected status on close Cause Every time the system boots (or is shut down), the message is displayed on the console. Sometimes the following message is also displayed on the console and in the /var/adm/messages file: WARNING: /iommu@0,10000000/sbus@0,10001000/SUNW,soc@2,0/SUNW,pln@a0000000,74127a/ssd@4,2 (ssd22): Error for Command: Error Level: Fatal Requested Block: 0 Error Block: 0 Vendor: CONNER Serial Number: 93081LPT Sense Key: Aborted Command ASC: 0xb3 (), ASCQ: 0x0, FRU: 0x0 WARNING: /iommu@0,10000000/sbus@0,10001000/SUNW,soc@2,0/SUNW,pln@a0000000,74127a/ssd@4,2 (ssd22): ssd_synchronize_cache failed (5) Action In a High Availability system with NVRAM, this error would be caused by unprocessed data in a NVRAM cache of the active logical host that has been down and started again later. Because of the possibility of error, NVRAM should not be used in an HA system. The problem can be solved in this case by removing the NVRAM on the HA system. In a non-HA system, this error can also be caused by stale data in the NVRAM cache. (The example commands that follow assume the controller for the array is c1.) To fix for a non-HA system: Turn off all fast writes on this array and sync any remaining pending writes: # ssaadm fast_write -d c1 # ssaadm sync_cache c1 When you sync the fast writes to the array, all pending writes are physically made to the disks. Anything that is left in the cache is stale; thus, it is safe to purge it. Run this command: # ssaadm purge c1 Turn on the fast writes for the disks. This command might be different on your system, depending on the disks where you want fast writes enabled and the types of fast writes you want: # ssaadm fast_write -s -e c1 nsrck: SYSTEM error, more space needed to compress [client] index, 8.1 MB required Cause In networker, you cannot use the Remove Oldest Cycle feature because the /nsr file system is too full to perform a remove. An error message appears in the console window indicating that the file system is full. Action Stop the networker daemons so that some of the indexes can be moved. In the SunOS 5 system, use /etc/init.d/networker stop. In the SunOS 4 system, use ps -ef | grep nsr and kill(1) the processes. Find a file system with enough space to move one of the client's indexes. Only one of the client's indexes should be moved, not the networker server's index. To find the size of a client's index, go to /nsr/index/clientname/db and list the contents using ls -l. The database file can be large (possibly over 500 Mbytes). Move the contents of a client's index to the other file system and check that /nsr has freed the space to use. You might need to unmount and remount /nsr, or even to reboot to designate the space freed by the move, as available. After the space is available, restart the daemons. Open nwadmin. Under Clients--Indexes, select a client and use Remove Oldest Cycle to free more space. Use Reclaim Space to reclaim the space from the removed cycles. After a few of the old cycles have been removed, enough space should be in the file system to move the removed client's index back. Stop the daemons, and move the client's index back to /nsr/index/clientname. Restart the daemons. Remove the oldest cycles for the client that was just moved. Tweaking of the browse policy and retention policy might be necessary to prevent this situation from happening in the future. Otherwise, as long-term solutions, add more hard disk and run growfs, or move /nsr to a drive with more space on it. "O" Object is remote Cause This error occurs when users try to share a resource that is not on the local machine, or try to mount/unmount a device or path name that is on a remote machine. Technical Notes The symbolic name for this error is EREMOTE, errno=66. ok Cause This is the OpenBoot PROM monitor prompt. From this prompt, you can boot the system (from disk, CD-ROM, or net), or you can use the go command to continue where you left off. Action If you suddenly see this prompt, look at the messages above it to see if the system crashed. If no other messages appear, and you just typed Stop-A or plugged in a new keyboard, type go to continue. You might need to Refresh the window system from its Workspace Menu. Technical Notes Never invoke sync from the prompt without first running the fsck(1M) command, especially if the file system has changed. open: no such device or address from FW-1 Cause The FW-1 has been installed on a disk other than the default root disk. If the Default Filter option is set (allowing a default filter to be automatically installed during boot), FW-1 tries to load the default security policy from $FWDIR, but the partition that contains $FWDIR is not yet mounted. This mismatch causes this error. Action To work around this problem, follow these steps: # cp /$FWDIR/modules/fwmod.5.x.0 /etc/fw.boot/ # cp /$FWDIR/modules/fw.mkdev /etc/fw.boot/ # cp /$FWDIR/modules/fw.conf /etc/fw.boot/ Go to /usr/kernel/drv and change the links as follows: fw -> /etc/fw.boot/fwmod.5.x.0 fw.conf -> /etc/fw.boot/fw.conf Operation already in progress Cause An operation was attempted on a non-blocking object that already had an operation in progress. Technical Notes The symbolic name for this error is EALREADY, errno=149. Operation canceled Cause The associated asynchronous operation was canceled before completion. Technical Notes The symbolic name for this error is ECANCELED, errno=47. operation failed [error 185], unknown group error 0, string Cause When you use admintool to add a user to a newly created group, admintool issues this error. Action Apply patch 101384-05 to fix bug ID 1151837 and to provide a workaround for bug ID 1153087. Operation not applicable Cause This error indicates that no system support exists for a function that the application requested. Action Ask the system vendor for an upgrade, or contact the vendor or author of the application for an update. Technical Notes This message indicates that no system support exists for an operation. Many modules set this error when a programming function is not yet implemented. If you are writing a program that produces this message, while calling a system library, find and use an alternative library function. Future versions of the system might support this operation; check system release notes for further information. The symbolic name for this error is ENOSYS, errno=89. Operation not supported on transport endpoint Cause As an example, this error could occur when trying to accept a connection on a datagram transport endpoint. Technical Notes The symbolic name for this error is EOPNOTSUPP, errno=122. Operation now in progress Cause An operation that takes a long time to complete (such as a connect) was attempted on a non-blocking object. Technical Notes The symbolic name for this error is EINPROGRESS, errno=150. /opt/bin/jws: /solaris/bin/locate_dirs: not found Cause This error message occurs if you try to start Java Workshop by linking from /opt/bin/jws to /opt/SUNWjws/JWS/sparc-S2/bin/jws. Typing the full path name works, but typing jws gives this error. Action This error occurs because /opt/bin/jws is not /opt/SUNWjws/JWS/sparc-S2/bin/jws, which is a script that runs another script: $_SS_JWS_HOME/solaris/bin/locate_dirs. /opt/bin/jws is not setting $_SS_JWS_HOME correctly. Remove it from the path and replace it with /opt/SUNWjws/JWS/sparc-S2/bin/jws. Then, which jws can return /opt/SUNWjws/JWS/sparc-S2/bin/jws. Option not supported by protocol Cause A bad option or level was specified when getting or setting options for a protocol. Technical Notes The symbolic name for this error is ENOPROTOOPT, errno=99. out of memory Cause Hundreds of different programs can produce this message when the system is running many large applications simultaneously. This message usually means that the system has run out of swap space (virtual memory). Action For details, refer to "Not enough space". Any data written during this condition is probably lost. Out of stream resources Cause During a STREAMS open, either no STREAMS queues or no STREAMS head data structures were available. This is a temporary condition; you might recover from it if other processes release resources. Technical Notes The symbolic name for this error is ENOSR, errno=63. overlapping swap volume Cause After creating volumes in rootdg to be used as additional swap and adding these to the /etc/vfstab file, an error message is displayed at boot time that indicates overlapping swap volumes. Action Change the names of these volumes to read swap1, swap2, and so forth. If you still get this message after making the previous change, edit the /sbin/swapadd script. Find the line: c=`$SWAP -l | grep -c '\\<'${special}'\>'` and change it to: c=`$SWAP -l | grep -c ''${special}''` "P" Package not installed Cause This error occurs when a user attempts to use a system call from a package that has not been installed. Technical Notes The symbolic name for this error is ENOPKG, errno=65. page_create: invalid flag Cause This error occurs after a vxvm upgrade. In this case, the user had the drivers (vxio and vxspec) for the Solaris 2.5.1 software and not for the Solaris 2.6 software. This condition was verified by using ls -l /kernel/drv/*vx*. Action Execute a pkgrm or re-install VXVM 2.4 and re-encapsulate the root. Panic Cause A system panics and crashes when a program exercises an operating system bug. Although the crash might seem unfriendly to a user, the sudden stop actually safeguards the system and its data from further corruption. In addition to stopping the operating system, the panic routine copies the memory contents in use to a dump device, recording critical information about the current state of the CPU from which the panic routine was called. Because the primary swap device is usually the default dump device, the primary swap device should be large enough to hold a complete image of memory. The system tries to reboot after the memory image is saved. If the system does not reboot successfully, consider these possibilities: Catastrophic hardware failure, such as faulty memory or a crashed disk Major kernel configuration faults, such as an unstable device driver Major kernel-tuning errors, such as a too-large value for MAXUSERS Data corruption, including corruption of the operating system files Manual intervention needed, as when fsck(1M) expects answers to its queries Action To find out why a system crashed, you can look in the /var/adm/message* log files. Of these methods, using savecore(1M) is the most informative. The savecore(1M) command transfers the system crash dump image generated by the panic routine from the dump device to a file system. The image can then be analyzed with a debugger, such as adb(1). See Also Correctly setting up savecore(1M) and interpreting its results can be difficult. For more information about debugging system panics, refer to Panic! UNIX System Crash Dump Analysis by Chris Drake and Kimberley Brown (ISBN 0-13-149386-8). panic -boot: Could not mount filesystem Cause The first problem comes from the following jumpstart error: 2ec00 RPC: Can't decode result. whoami RPC call failed with rpc status: 2 panic - boot: Could not mount filesystem. program terminated ok Normally, this error occurs when the boot process is unable to get to the install image. Additionally, other users have the same error message, with an additional message: 'Timeout waiting for ARP/RARP packet...' Action To solve the first problem: Check how the dfstab(4) (/etc/dfs/dfstab on the install image NFS server) looks: share -F nfs -o ro,anon=o /jumpstart-dir Run share(1M) command on the installed image NFS server, to make sure it is shared properly. Check /etc/bootparams file on the net install server. Look for entries with incorrect boot path. Make sure that /usr/sbin/rpc.bootparamd is running on the boot server. If necessary, kill and restart it. Check /etc/ethers on the boot server for duplicate or conflicting entries. At the prompt, run test net /test-net and/or watch net /watch-net to test the network connectivity. As a workaround for the second problem, check the nsswitch.conf(4) file. If some of the entries point to NIS, such as: rpc nis files hosts nis files ethers nis files bootparams files nis change all of these entries to files first: rpc files nis hosts files nis ethers files nis bootparams files nis -------------------------------------------------------------------------------- Note - You might have to update these files manually if they do not contain information on the client machine you are trying to jumpstart. -------------------------------------------------------------------------------- Then, remove the client with rm_install_client(1M), remove the contents of tftpboot, and again add the client: add_install_client -c /jumpstart-dir/profiles 'client name' 'arch' Panic on cpu 0: valloc'd past tmpptes Cause The machine is an SS20 with 256 Mbytes of RAM, an FDDI interface, and a single CPU. It is running Online Disksuite for mirroring and striping. The following recommended kernel patches were installed: 102517-03 102436-02 102394-02 102516-06 After their installation, the machine was rebuilt to allow for the new patches to be implemented. However, the machine panicked immediately after loading the kernel with this error message. Action The kernel was rebuilt with a new MAXUSERS value of 96, and this kernel enabled the machine to boot properly. Technical Notes Information directly related to this situation was not available; however, there was a description of another type of panic that was related to seg_u. In that description, the MAXUSERS value was set too large, causing the kernel to overrun table space. Furthermore, the value of MAXUSERS varies among the different architectures and the different revisions of the OS and is directly related to the amount of physical RAM in the system in an inverse proportion. Further investigation revealed that the value of MAXUSERS was set to 128. Based on the related information, it seems that the panic was due to valloc attempting to define memory space in excess of the value of tmpptes. PARTIALLY ALLOCATED INODE I=int CLEAR? Cause Probably the system crashed in the middle of a sync(2) or write(2) operation, and during phase 1, fsck(1M) found that the specified inode was neither allocated nor unallocated. Action If any directory entries point to this inode and you answer "yes" to this question, phase 2 might get UNALLOCATED messages. Carefully exit fsck(1M) and run ncheck(1M)--specifying the inode number after the -i option--to determine which file or directory is involved. You might be able to restore this file or directory from another system. fsck(1M) also might copy this file to the lost+found directory in a later phase. See Also For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume 1. passwd: Changing password for string Cause The following lines are put into /etc/nsswitch.conf: passwd: compat passwd_compat: nis Then, when passwd is run, it fails as follows: server1% passwd passwd: Changing password for khh server1% -------------------------------------------------------------------------------- Note - passwd exits before a password is entered. -------------------------------------------------------------------------------- Action In the man page for passwd, you see the following: If all requirements are met, by default, the passwd(1) command consults /etc/nsswitch.conf to determine which repositories need a password update. It searches the passwd(4) and passwd_compat entries. The sources (repositories) associated with these entries are updated. However, the supported password update configurations are limited to the following five cases. Failure to comply with the configurations prevents users from logging in to the system. passwd: files passwd: files nis passwd: files nisplus passwd: compat (==> files nis) passwd: compat (==> files nisplus) passwd_compat: nisplus -------------------------------------------------------------------------------- Note - The passwd(1) man page does NOT say that you can use the line: passwd_compat: nis. passwd(1) works exactly as described in the man page. -------------------------------------------------------------------------------- passwd (SYSTEM): System error: repository out of range Cause When trying to lock a user account and using nispasswd with the -l option in the Solaris 2.6 release, you get this error: passwd (SYSTEM): System error: repository out of range. Action Use passwd -r nisplus -l username instead. passwd.org_dir: NIS+ servers unreachable Cause This is the first of three messages that an NIS+ client prints when it cannot locate an NIS+ server on the network. Action For details, refer to "hosts.org_dir: NIS+ servers unreachable". Password does not decrypt secret key for unix.uid@string Cause This message appears at login when a user's password is not identical to the user's keylogin(1) network password. When a system is running NIS+, the login program first performs UNIX authentication, and then attempts a keylogin(1) for secure RPC authentication. Action To gain credentials for secure RPC, users can run keylogin(1) (after login) and type their secret key. To stop this message from appearing at time of login, users can run the chkey -p command and set their network password to be the same as their NIS+ password. If a user does not remember the network password, the system administrator should delete and re-create the user's credentials table entry so the user can establish a new network password with chkey(1). password file busy - try again later. Cause On a SunOS system running NIS (YP), the user runs yppasswdd(1M)and the system reports this error. On the NIS Master server, this error is in the messages file from rpc.yppasswdd: password file busy - try again. This error is caused superficially by the existence of a lock file, /var/yp/passwd.ptmp. Removing this file allows yppasswdd to run to completion, but subsequent invocations still fail with the same error message. The root cause is that yppasswdd has the-m option, which says to run make to push the maps out to the slave servers. In this situation, a problem occurred in pushing the maps to a slave server; the push would hang. Thus, the push was never completed, and the lock file was never removed. This was tested by doing the following: #cd /var/yp #make passwd passwd is up to date #touch passwd #make passwd From here, the make remakes the map, but then hangs on the push to the slave. Action To fix the root cause, find out why the map does not push. In this situation, it was a routing issue; however, the remedy could lie elsewhere. pdbadmin start node fails cluster_establish join not allowed Cause The user created a disk group, but forgot to make it shared. After it was made a shared disk group, the user attempted to start the second node (which had not been rebooted). pdbadmin start node on second pdb node failed with this repeated message until it finally timed out: return from cluster_establish is join not allowed now retrying cluster_establish Action You can either reboot the second node or run vxdctl enable. pdbadmin start node now works. Permission denied Cause An attempt was made to access a file in a way forbidden by the protection system. Action Check the ownership and protection mode of the file (with a long listing from the ls -l command) to see who is allowed access to the file. Then change the file or directory permissions, as needed. Technical Notes The symbolic name for this error is EACCES, errno=13. Please specify a recipient. Cause With mailtool(1), this message comes up in a dialog box whenever a user tries to deliver a message with no address in the To: field. Action For details, refer to "Recipient names must be specified". Protocol error Cause A protocol error occurred. This error is device specific, but is generally not related to a hardware failure. Technical Notes The symbolic name for this error is EPROTO, errno=71. protocol error, string closed connection Cause rlogin(1) fails on a machine with the SunOS system installed. Action Check the permissions in in.rlogind on the machine you are trying to connect to. The permissions should look like this: -rwxr-xr-x 1 root staff 16384 Jan 20 1994 /usr/sbin/in.rlogind Check the login line in the /etc/inetd.conf file. It should look like the following: login stream tcp nowait root /usr/sbin/in.rlogind in.rlogind Check /etc/passwd to see if an invalid login shell has been substituted in the entry for the login ID. Protocol family not supported Cause The protocol family has not been configured into the system or no implementation for it exists. This is used for the Internet protocols. Technical Notes The symbolic name for this error is EPFNOSUPPORT, errno=123. Protocol not supported Cause The requested networking protocol has not been configured into the system, or no implementation for it exists. (A protocol is a formal description of the messages to be exchanged and the rules to be followed when systems exchange information.) Action Verify that the protocol is in the /etc/inet/protocols file and in the NIS protocols map, if applicable. If the protocol is not listed, and you want to permit its use, configure the protocol as documented or as required. Technical Notes The symbolic name for this error is EPROTONOSUPPORT, errno=120. Protocol wrong type for socket Cause This message indicates either an application programming error, or badly configured protocols. Action Make sure that the /etc/protocols file corresponds number-for-number with the NIS protocols(4) map. If it does, ask the vendor or author of the application for an update. Technical Notes A protocol was specified that does not support the semantics of the socket type requested. This protocol amounts to a request for an unsupported type of socket. Look at the source code that made this socket request and check that it requested one of the types specified in /usr/include/sys/socket.h. The symbolic name for this error is EPROTOTYPE, errno=98. "Q" quotactl: open Is a directory Cause When using edquota to set user limits, the command displays this error. edquota updates all quota files that are on a mounted file system. A directory named quotas causes it to fail. Action In one of the mounted file systems is a directory named quotas. To fix the problem, move the directory from the mounted file system and rename or delete it. For example: If you have /usr/quotas/old_info, the directory /usr/quotas will cause edquota to fail. Either move /usr/quotas to /usr/old_quotas or delete the directory. "R" Read error from network: Connection reset by peer Cause This message appears when a user logs in remotely to a machine that crashes or is rebooted during the rlogin(1) or rsh(1) session. Any data changes that were not saved are probably lost. Sometimes this message appears only when the user types some data, even though the system failed hours before. Action Try to rlogin(1) again, perhaps after waiting a few minutes for the system to reboot. Reading configuration data Cause In this situation, the user loaded SunPC 4.1 on a SPARCstation 5 machine. The Solaris 2.5 operating environment is patched to the Solaris 2.5.1. The user also has a SunPC accelerator card installed. When starting SunPC, the user gets this error message on the SunPC splash screen. If the user clicks anywhere in the screen, the whole console locks. The user has to move to another machine and use rlogin and then kill the SunPC process. In an effort to resolve the problem, the user had installed and removed SunPC and the 102924-25 patch with the same results. The user also removed the accelerator card, performed a boot -r and still SunPC 4.1 hung at the splash screen. The following error was found in the /var/adm file: modrput() sdos_mbsigolint failed -1 Action In this situation, the user had wiped the operating system off the SPARCstation 5 machine and, at that point, was not sure which patches had been applied. The user installed a copy of the Solaris 2.5.1 software and, then, performed the SunPC installation. That solved the problem. SunPC worked without the Accelerator card. The user added the Accelerator card, performed a boot -r, and ran SunPC with no problems. Read-only file system Cause Files and directories on file systems that are mounted read-only cannot be changed. Action If you only modify these files and directories occasionally, use rlogin(1) to log in to the servers of the mounted file systems and change the files or directories from there. If you change these files and directories frequently, use mount(1M) to make the file systems read-write. Technical Notes The symbolic name for this error is EROFS, errno=30. rebooting... Cause This message appears on the console to indicate that the machine is booting, either after the superuser issued a reboot(1M) command, or after a system panic, if the EEPROM's watchdog-reboot? variable is set to true. Action Allow the machine to boot itself. In case of a system panic, look above this message for other indications of what went wrong. Recipient names must be specified Cause Someone sent mail without a valid recipient in the To: field. Thus, sendmail(1M) could not deliver the mail message. Using mail(1), the recipient's address might have been specified using spaces or non-alphanumeric characters. The mailtool(1) and mailx(1) commands try to prevent such problems by issuing Please specify a recipient or No recipients specified messages instead. If at least one valid recipient exists, each invalid recipient address will generate a User unknown message. Action Look in the sender's dead.letter file for the automatically saved message, and have the originator send it again; this time the sender specifies a recipient. See Also For more information about sendmail(1M), see the System Administration Guide, Volume 3. refused connect from hostIP to callit(ypserv) Refer to "connect from hostIP to callit(ypserv): request from unauthorized host". Reset tty pgrp from int to int Cause The C shell sometimes issues this message when it clears away the window process group after the user exits the window system. This clearing can happen when the window system does not clean up after itself. Action Proceed with your work. This message is only informational. Resource temporarily unavailable Cause This error indicates that the fork(2) system call failed because the system's process table is full, or that a system call failed because of insufficient memory or swap space. Also, a user might not be allowed to create more processes. Action Simply waiting often gives the system time to free resources. However, if this message occurs often on a system, reconfigure the kernel and allow more processes. To increase the size of the process table, increase the value of MAXUSERS in the /etc/system file. The default MAXUSERS value is the amount of main memory in Mbytes, minus 2. If one user is not allowed to create any more processes, that user has probably exceeded the memory size limit; see the limit(1) man page for details. Technical Notes The symbolic name for this error is EAGAIN, errno=11. Restartable system call Action Restart the interrupted system call. Technical Notes The symbolic name for this error is ESTART, errno=91. Result too large Cause This is a programming error or a data input error. Action Ask the program's author to fix this condition. Technical Notes This error indicates an attempt to evaluate a mathematical programming function at a point where its value would overflow or underflow. The value of a programming function in the math package (3M) is not representable within machine precision. This error could occur after floating point overflow or underflow (either single or double precision), or after total loss of numeric significance in Bessel functions. This message can indicate Result too small in the case of floating point underflow. To help pinpoint a program's math errors, use the matherr(3M) facility. The symbolic name for this error is ERANGE, errno=34. rlogin: no directory! connection closed Cause When a user tries to remotely log in to a machine, the user gets this error. The machine that the user was trying to access with rlogin(1) had permissions of 700 on its root directory. The permissions on root should be 755. After the permissions on the root file system were changed to 755, the user was able to proceed farther when attempting to execute an rlogin, but it still failed with the following: Last login: Fri Aug 29 10:24:43 from machinename no shell connection closed Action The machine that the user was trying to access with rlogin had the permissions set to 700 on both the root and /usr/bin directories. For both directories, the permissions should be 775. Once the user changed the permissions to 775, rlogin(1) was successful. Also, check the user's passwd(1) entry in the NIS/NIS+ map. A login shell such as /usr/dist/exe/tcsh or /net/lab/.../csh could cause the failure because of NFS mount permission. rmdir: string: Directory not empty Cause The rmdir(1) command can only remove empty directories. The directory with the name appearing after the first colon in the message still contains some files or directories. Action Use rm(1) instead of rmdir(1). To remove this directory and everything underneath it, use the rm -ir command to descend the directory recursively, and respond to requests to delete each element. To remove the directory and all its contents without prompts for approval, use the rm -r command. ROOT LOGIN /dev/console Cause This syslog message indicates that someone has logged in as root on the system console. Action If you have just logged in as root, take no action. If you are not root, consider the possibility of a security breach. The best site-wide policy is for all system administrators to use su(1M) instead of logging in as root. ROOT LOGIN /dev/pts/int FROM string Cause This syslog message indicates that someone has logged in remotely as root on a pseudo-terminal from the system specified after the FROM keyword. Action For security reasons, it is a bad practice to allow root logins from anywhere other than the console. To restrict superuser logins to the console, remove the comment from the CONSOLE line in /etc/default/login. route: socket: Protocol not supported Cause During a boot, this error is displayed and the multicast is not configured. Action An inittab(4) from a previous release of the operating environment was used. Thus, the following entry, which is required for the route command in the Solaris 2.6 release, was missing from /etc/inittab. ap::sysinit:/sbin/soconfig -f /etc/sock2path By default, this is the second entry in the file. After this entry was added, the multicast configured at boot time without error. RPC: Program not registered Cause Check the rpc.bynumber NIS map. rx framing error Cause Usually this error indicates a hardware problem. Action Check the Ethernet cabling and connectors to locate a problem. Technical Notes A framing error occurs when the Ethernet I/O driver receives a non-integral unit of octets, such as 63 bytes and then 3 bits. (Ethernet specifies the use of octets.) Framing errors are caused by corruption of the starting or ending frame delimiters. These delimiters can be corrupted by some violation of the encoding scheme. Framing errors are a subset of CRC errors, which are usually caused by anomalies on the physical media. An alignment/framing error is a type of CRC error where octet boundaries do not align. "S" save: SYSTEM error, Arg list too long Cause The save fails with this error because the database (index) file for the client is greater than 2 Gbytes. With the Solaris 2.6 release and SBU 5.0.1 this is no longer a problem. Action However, with earlier versions of the Solaris software you need to open nwadmin -> indexes -> select appropriate client -> select appropriate fs -> remove oldes cycle -> reclaim space. You might have to repeat a few times to reclaim enough space. The indexes can be re-created later, if necessary, by using a scanner. SCSI bus DATA IN phase parity error Cause The most common cause of this problem is unapproved hardware. Some SCSI devices for the PC market do not meet the high I/O speed requirements for the UNIX market. Other possible causes of this problem are improper cabling or termination, and power fluctuations. Data corruption is possible, but unlikely to occur, because this parity error prevents data transfer. Action Check that all SCSI devices on the bus are Sun-approved hardware. Then verify that all cables measure no longer than six meters total and that all SCSI connections are properly terminated. If power fluctuations are occurring, invest in an uninterruptible power supply. SCSI transport failed: reason 'reset' Cause This message indicates that the system sent data over the SCSI bus, but the data never reached its destination because of a SCSI bus reset. The most common cause of this condition is conflicting SCSI targets. Data corruption is possible, but unlikely to occur, because this failure prevents data transfer. Action Verify that all cables measure no longer than six meters total and that all SCSI connections are properly terminated. If power surges are a problem, acquire a surge suppressor or an uninterruptible power supply. A machine's internal disk drive is usually SCSI target 3. Make sure that external and secondary disk drives are targeted to 1, 2, or 0, and do not conflict with each other. Also, make sure that tape drives are targeted to 4 or 5, and CD drives to 6, avoiding any conflict with each other or with disk drives. If the targeting of the internal disk drive is in question, power off the machine, remove all external drives, turn on the power, and from the PROM monitor run the probe-scsi-all or probe-scsi command. If SCSI device targeting is acceptable, memory configuration could be the problem. Ensure that high-capacity memory chips (such as 4-Mbyte SIMMs) are in lower banks, while lower-capacity memory chips (such as 1-Mbyte SIMMs) are in the upper banks. SPARC systems do not always support third-party CD-ROM drives, and can generate a similar unknown vendor error message. Check with the CD-ROM vendor for specific configuration requirements. Some third-party disk drives have a read-ahead cache that interferes with the Solaris device drivers. Make sure that any existing read-ahead cache facility is turned off. See Also For more information on SCSI targets, see the section on device naming conventions in the Solaris Transition Guide. If you are using AnswerBook online documentation, "SCSI targets" is a good search string. Security exception on host string. USER ACCESS DENIED. Cause When trying to create a user with Adminsuite by placing the home directory on a system remote from the NIS+ server, the user gets this error message: Security exception on host hostname. USER ACCESS DENIED. The user identity (555)username was received, but that user is not authorized to execute the requested functionality on this system. Is this user a member of an appropriate security group on this system ? (Function: class directory method create_dir) The user can use rsh(1) to access the remote machine and create a home directory on the system. Action The user was not in the system administration group NIS+ tables. # niscat group.org_dir | grep sysadmin sysadmin::14: Add the user name to the system administration group. Segmentation Fault Cause Segmentation faults usually come from a programming error. This message is usually accompanied by a core dump, except on read-only file systems. Action To see which program produced a core(4) file, run either the file(1) command or the adb(1) command. The following examples show the output of the file(1) and adb(1) commands on a core file from the dtmail program. $ file core core: ELF 32-bit MSB core file SPARC Version 1, from `dtmail' $ adb core core file = core -- program `dtmail' SIGSEGV 11: segmentation violation ^D (use Control-d to quit the adb rogram) Ask the vendor or author of this program for a debugged version. Technical Notes A process has received a signal indicating that it attempted to access an area of memory that is protected or that does not exist. The two most common causes of segmentation faults are attempting to dereference a null pointer or indexing past the bounds of an array. sendmail[]: can't lookup data via name server "dns" or sendmail[]: can't lookup data via name server "nis" Cause The following entry in the /etc/nsswitch.conf file, sendmailvars: dns nis files, causes the messages to appear in the console window. Action The sendmailvars database can be used only with local files and/or NIS+. If you do not have this database setup, the default sendmailvars entry should look as follows in the /etc/nsswitch.conf file: sendmailvars: files sendmail[init]: NOQUEUE: SYSERR(root): Cannot bind to domain : no such map in server's domain: Bad file number Cause The user is running NIS and receives this error on several NIS machines. Action Check the following: For the system(s) not working, make sure there is a /var/yp/nicknames file. Also, make sure that this file contains this entry: aliases mail.aliases On one of the systems not working, execute the following: ypcat aliases You will probably get this message: no such map in servers domain. Do a ypwhich to see which NIS server the system is bound to. Next, go to that server and verify that the mail.aliases map is missing from /var/yp/domainname. This map must either be created or copied over from one of the NIS servers that contains the map. sendmail[int]: NOQUEUE: SYSERR: net hang reading from string Cause This is a sendmail(1M) message that appears on the console and in the log file /var/adm/messages. If this message occurs once for a particular user, a mail message from this user might end with a partial line (having no terminating newline character). If this message appears frequently or at busy times, especially along with other networking errors, it could indicate network problems. Action Check the user's mail spool file to see if a message ends without a newline character. If so, talk with the user and determine how to prevent the problem from occurring again. If these messages are the result of network problems, you could try moving the mail spool directory to another machine with a faster network interface. Technical Notes During the SMTP receipt of DATA phase, a message-terminating period on a line of its own never arrived. sendmail(1M) timed out and produced this error. Service wouldn't let us acquire selection Cause This message indicates that the OpenWindows selection service failed to seize the requested selection from /tmp/winselection. Consider the following diagnostics: the requested selection could be 0 for unknown, 1 for caret, 2 for primary, 3 for secondary, or 4 for clipboard. The result could be 0 for failure, 2 for nonexistent, 3 for did not have, 4 for wrong rank, 5 for continued, 6 for cancelled, or 7 for unrecognized. setmnt: Cannot open /etc/mnttab for writing Cause The system is having problems writing to /etc/mnttab. The file system containing /etc might be mounted read-only, or not mounted at all. Action Check that this file exists and is writable by root. If so, ensure that the /etc file system has been mounted, and is mounted read-write, rather than read-only. share_nfs: /home: Operation not applicable Cause This message usually indicates that the system has a local file system mounted on /home, which is where the automounter usually mounts users' home directories. Action When a system is running the automounter, do not mount local file systems on the /home directory. Mount them on another directory, such as /disk2, which on most systems you have to create. You could also change the automounter auto_home entry, but that is a more difficult solution. Signal 8 error Cause In this case, the user gets a Signal 8 error during installation--right after starting Openwindows--and installation stops. Action Shut down the system "gracefully," and, as it is rebooting, place a ZIP drive cartridge (blank or used) in the ZIP drive. Begin the normal installation of the Solaris IA software. It is not possible to continue the existing installation of the Solaris software by putting a cartridge in the ZIP drive after receiving this error. When the Solaris software checks all of your hardware, it thinks the ZIP drive is just another hard drive and attempts to read from it. If there is no cartridge in the drive, then you receive the signal 8 error. If the Solaris software installation "sees" a cartridge in the ZIP drive, it reads from it, even if there is no data on the cartridge, and then continues. SIMS license error: licenses invalid Cause This is a license internet mail server problem. The user is installing a departmental version of SIMS 3.1 on a Pentium 2 PC that is running the Solaris 2.6 IA release. The system is using a JavaTM interface and keeps getting the above error. The two license files from the license center are: SERVER server DAEMON lic.SUNW /etc/opt/licenses/lic.SUNW INCREMENT SLAPD.1 lic.SUNW 1.000 08-Mar-1998 1 SERVER nwlab4 727a2b6a 7588 DAEMON suntechd /etc/opt/licenses/suntechd /etc/opt/licenses/daemon_options INCREMENT sun.mail.mbox suntechd 3.100 08-Mar-1998 100 Action Merge the two license files together and delete the extra SERVER line. Slice c0t1d0s0 is too small to contain 1 replicas Cause When trying to add a state replica using metatool to cylinder 0 of a disk, the following error message appears: Your attempt to attach metastate database replicas on slice "c?t?d?s?" failed for the following reason: Slice c?t?d?s? is too small to contain 1 replicas. This is because metatool masks out the very first cylinder to protect the disk label. On disksuite v4.1, metatool does allow adding the databases to cylinder 0 on 2.1Gbyte disks or larger. Action As a workaround, start at cylinder 1 (not cylinder 0) or use the command line (metadb -a). snmpdx: bind() failed on udp on 161 [errno: address already in use] 125 snmpdx dmid: unable to connect to snmpdx Cause The user is running the Solaris 2.6 release with a Cisco FDDI card and is receiving the above error. Action In the Solaris 2.6 software a startup script is included in /etc/rc3.d that starts snmpdx (which uses port 161). You receive the error message because the FDDI SNMP agent is running, and it has already claimed port 161. Two solutions are: Move the snmpdx start-up script mv /etc/rc3.d/S76snmpdx /etc/rc3.d/s76snmpdx so that snmpdx does not start. Check if the FDDI can use a different port, other than 161. Socket type not supported Cause The support for the socket type has not been configured into the system or no implementation for it exists. Technical Notes The symbolic name for this error is ESOCKTNOSUPPORT, errno=121. Soft error rate (int%) during writing was too high Cause This message from the SCSI tape drive appears when Exabyte or DAT tapes generate too many soft (recoverable) errors. It is followed by the advisory Please, replace tape cartridge message. Soft errors are an indication that hard errors could soon occur, causing data corruption. Action First, clean the tape head with a cleaning tape, as recommended by the manufacturer. If that remedy does not work, replace the tape cartridge. If the problem persists, you might need to replace the tape drive with new tape cartridges. Software caused connection abort Cause A connection abort occurred internally to your host machine. Technical Notes The symbolic name for this error is ECONNABORTED, errno=130. Srmount error Cause This error is RFS specific. It occurs when an attempt is made to stop RFS while resources are still mounted by remote machines, or when a resource is readvertised with a client list that does not include a remote machine with the resource currently mounted. Technical Notes The symbolic name for this error is ESRMNT, errno=69. Stale NFS file handle Cause A file or directory that was opened by an NFS client was either removed or replaced on the server. Action If you were editing this file, write it to a local file system instead. Try remounting the file system on top of itself or shutting down any client processes that refer to stale file handles. If neither of these solutions works, reboot the system. Technical Notes The original vnode is no longer valid. The only way to remove this error is to force the NFS server and client to renegotiate file handles. The symbolic name for this error is ESTALE, errno=151. start up failure no such file or directory Refer to "late initialization error". statd: cannot talk to statd at string Cause This message comes from the NFS status monitor daemon statd(1M), which provides crash recovery services for the NFS lock daemon lockd(1M). The message indicates that statd(1M) has left old references in the /var/statmon/sm and /var/statmon/sm.bak directories. After a user has removed or modified a host in the hosts database, statd(1M) might not properly purge files in these directories, which results in its trying to communicate with a nonexistent host. Action Remove the file named variable (where variable is the host name) from both the /var/statmon/sm and /var/statmon/sm.bak directories. Then kill the statd(1M) daemon and restart it. If that does not get rid of the message, kill and restart lockd(1M) as well. If that remedy does not work, reboot the machine at your convenience. stty: TCGETS: Operation not supported on socket Cause This message occurs when a user tries to use remote copy with rcp(1) or remote shell with rsh(1) from one machine to another, but has an stty(1) command in the remote .cshrc file. This error creates failure for the rcp(1) or rsh(1) command. Action The solution is to move the invocation of the stty(1) command to the user's .login (or equivalent) file. Alternatively, execute the stty(1) command in .cshrc only when the shell is interactive. You could perform the following test: if ($?prompt) stty ... Technical Notes The rcp(1) and rsh(1) commands make a connection using sockets, which do not support stty(1)'s TCGETS ioctl. su: No shell Cause This message indicates that someone changed the default login shell for root to a program that is missing from the system. For example, the final colon-separated field in /etc/passwd could have been changed from /sbin/sh to /usr/bin/bash, which does not exist in that location. Possibly an extra space was appended at the end of the line. The outcome is that you cannot login as root or switch user to root, and, thus, cannot directly fix this problem. Action The only solution is to reboot the system from another source, then edit the password file to correct this problem. Invoke sync(1M) several times, then halt the machine by typing Stop-A or by pressing the reset button. Reboot as single-user from CD-ROM, the net, or diskette, such as by typing boot cdrom -s at the prompt. After the system starts and gives you a # prompt, mount the device corresponding to the original root partition somewhere, such as with a mount(1M) command similar to the one that follows. Then run an editor on the newly mounted system password file (use ed(1) if terminal support is lacking): # mount /dev/dsk/c0t3d0s0 /mnt # ed /mnt/etc/passwd Use the editor to change the password file's root entry to call an existing shell, such as /usr/bin/csh or /usr/bin/ksh. Technical Notes To keep the No shell problem from happening, habitually use admintool or /usr/ucb/vipw to edit the password file. These tools make it difficult to change password entries in ways that make the system unusable. su: 'su root' failed for login on /dev/pts/int Cause The user specified by login tried to become superuser, but typed the wrong password. Action If the user is supposed to know the root password, wait to see if the correct password is supplied. If the user is not supposed to know the root password, ask why he or she is attempting to become superuser. su: 'su root' succeeded for login on /dev/pts/int Cause The user specified by login just became superuser by typing the root password. Action If the user is supposed to know the root password, this message is only informational. If the user is not supposed to know the root password, change this password immediately and ask how the user learned it. SunPC may NOT run correctly as root Cause With SunPC 4.1 and the 102924 jumbo patch installed, a user (who is not root) attempts to run SunPC and receives the following error message: SunPC may NOT run correctly as root. Please run in user mode. SunPC script is exiting The user's primary group ID is probably root. For example: $ /usr/bin/id uid=33650(gruff) gid=0(root) Action Change the user's primary group to another group, such as 10, and, because the user still needs to be in the root group, add the root group to the user's secondary group list. syncing file systems... Cause This message indicates that the kernel is updating the super-blocks before taking the system down to ensure file system integrity. This message appears after a halt(1M) or reboot(1M) command. It can also appear after a system panic, in which case the system might contain corrupted data. Action If you just halted or rebooted the machine, take no action. This message is normal. In case of a system panic, look up the panic messages. Your system vendor might be able to help diagnose the problem. So that you can describe the panic to the vendor, either leave your system in its panicked state or be sure that you can reproduce the problem. Technical Notes Numbers that sometimes display after the three dots in the message show the count of dirty pages that are being written out. Numbers in brackets show an estimate of the number of busy buffers in the system. syslog service starting. Cause During system reboot, this message might appear and the boot seemingly hangs. After starting syslogd(1M) service, the system runs /etc/rc2.d/S75cron, which in turn calls ps(1). Sometimes after an abrupt system crash /dev/bd.off becomes a link to nowhere, causing the ps(1) command to hang indefinitely. Action Reboot as a single user (for example with boot -s) and run ls -l /dev/bd* to see if this is the problem. If so, remove /dev/bd.off, then run bdconfig off or reboot with the -r (reconfigure) option. This is the most commonly reported situation that causes ps(1) to hang. System booting after fatal error FATAL Cause The system reboots automatically. Afterward, the messages file contains System booting after fatal error FATAL. The message is issued during a reboot after the system detects a hardware error. The following can cause this response: UPA address parity error, Master queue overflows, DTAG parity errors, E-Cache tag parity errors, and Coherence errors. Action Use prtdiag(1M) to help identify failed hardware components. The errors indicate that you either have a bad CPU module or a bad system board. SYSTEM error, Arg list too long Cause When trying to back up a client with networker, the following error occurs: * heaven.com:/export/heaven2 save: SYSTEM error, Arg list too long * heaven.com:/export/heaven2 save: Cannot open save session with heaven.com * heaven.com:/export/heaven3 1 retry attempted * heaven.com:/export/heaven3 save: SYSTEM error, Arg list too long * heaven.com:/export/heaven3 save: Cannot open save session with heaven.com Action An error like this is due to an index file (/nsr/index/clientname) that is greater than 2 Gbytes in Solstice backup revisions less than 5.0.1. In 5.0.1 the indexes are segmented so this error should no longer be a problem. In any revision of Solstice backup this error can also be due to a corrupt client index. If so, running the following command might resolve the problem: # nsrck -F clientname If this remedy does not fix the problem, shut down the networker daemons, remove the client index, and restart the daemons. The backup should then run fine. system hang Cause 4.1.3C Sbus cards suffered a system freeze. SYSTEM HANGS DURING BOOT Cause When the user boots a system, it hangs after the following boot messages: root on, swap on, and dump on. After the system displays these messages, the LEDs flash and the system hangs. This is due to an earlier fsck that deleted devices under the /dev directory. Check for the /dev/console device and, if it is missing, create one. system will not connect to port 80 Refer to "late initialization error". "T" tar: /dev/rmt/0: No such file or directory Cause The default tape device /dev/rmt/0 or possibly the device specified by the TAPE environment variable is not currently connected to the system, is not configured, or its hardware symbolic link is broken. Action List the files in the /dev/rmt directory to see which tape devices are currently configured. If none are configured, ensure that a tape device is correctly attached to the system, and reboot with the -r option to reconfigure devices. If tape devices other than /dev/rmt/0 are configured, you could specify one of them after the -f option of tar(1). tar: directory checksum error Cause This error message from tar(1) indicates that the checksum of the directory and the files it has read from tape does not match the checksum advertised in the header block. Usually this message indicates the wrong blocking factor, although it could indicate corrupt data on tape. Action To resolve this problem, make certain that the blocking factor you specify on the command line (after -b) matches the blocking factor originally specified. If in doubt, leave out the block size and let tar(1) determine it automatically. If that remedy does not help, the tape data could be corrupted. tar: tape write error Cause A physical write error has occurred on the tar(1) output file, which is usually a tape, although it could be a diskette or disk file. Look on the system console, where the device driver should provide the actual error condition. The condition might be a write-protected tape, a physical I/O error, an end-of-tape condition, or a file-too-large limitation. Action In the case of write-protected tapes, enable the write switch. For physical I/O errors, replace the tape with a new one. For end-of-tape conditions, try using a higher density, if the device supports one, or use cpio(1) or pax(1) for their multi-volume support. When encountering the file-too-large limitations, use the parent shell's limit(1) or ulimit(1) facility to increase the maximum file size. See Also For more information on tar tapes, see the section on copying UFS files in the System Administration Guide, Volume 1. Text file busy Cause This error can occur when an attempt was made to execute a pure-procedure program that is currently open for writing. It also occurs when attempting to open for writing or to remove a pure-procedure program being executed. (This message is obsolete.) Technical Notes The symbolic name for this error is ETXTBSY, errno=26. Text is lost because the maximum edit log size has been exceeded. Cause This message appears at the beginning of a cmdtool(1) session after 100,000 characters have scrolled by. Clicking the top rectangle of the scrollbar might display this message. No data were lost, but the user cannot scroll back before this wraparound point. Action To increase the maximum size of the Command Tool log file, use cmdtool -M, specifying more than 100,000 bytes. tftpd: nak: Transport endpoint is already connected Cause After configuring an Autoclient (Autoclient 2.1 - Solstice Adminsuite 2.3), particularly on a Solaris 2.6 environment, you might get a similar error message on your Server from /dev/console and/or from /var/adm/messages: tftpd: nak: Transport endpoint is already connected A subsequent boot net by the Autoclient hangs. For example: Boot Device:... File and Args... -------------------------------------------------------------------------------- Note - This error message is difficult to decipher. Also, at this early point in the autoclient's boot, there is a minimum record of the event. To troubleshoot this problem, a snoop of the client, run from another system on the client's subnet, is necessary. -------------------------------------------------------------------------------- Action A change was made in the Solaris 2.6 in.tftpd to use sendto(), instead of send(). Because the Solaris 2.5.1 environment uses send() as opposed to sendto(), one workaround would be to copy in.tftpd from a Solaris 2.5.1 to the Solaris 2.6 environment. Another workaround would be to troubleshoot from the server the nonexistent file that it is trying to receive by doing a snoop of the client. For example (assuming you are using an onboard Ethernet interface): # snoop autoclient_name or # snoop ethernet_address_of_autoclient_name In this case, you might get a Trivial File Transfer Protocol (TFTP) read similar to the following: 81911ED4.SUN4C TFTP Error: access violation The error tells you that something is wrong within your /tftpboot directory. For an AUTOCLIENT: The problem lies in the /tftpboot directory of the boot server. Confirm that the HOSTID and HOSTID.ARCH files are linked to the correct inetboot file for your architecture. This is a correct entry for a sun4m system: 81971904 -> inetboot.sun4m.Solaris_2.4 81971904.SUN4M -> inetboot.sun4m.Solaris_2.4 This is an incorrect entry for a sun4m system: C753002F -> inetboot.axil4m.Solaris_2.5.1 C753002F.AXIL4M -> inetboot.axil4m.Solaris_2.5.1 If they are not correct, remove the entry for that particular client in this directory and again add the client with the add_install_client script or through the Solstice tool. For a JUMPSTART client: The Error: access violation from the server to the client might be an indication that the wrong kernel architecture has been specified in the add_install_client command line. On the server, type these commands: # cd /cdrom/cdrom0/s0 # ./add_install_client host_name correct_architecture The add_install_client script cleans out the incorrect architecture and sets up the install server with the correct architecture to boot the client. If a problem arises using add_install_client, use ./rm_install_client and ./add_install_client with the correct architecture. All other follow the same path of checking the /tftpboot directory. THE FOLLOWING FILE SYSTEM(S) HAD AN UNEXPECTED INCONSISTENCY: Cause At boot time the /etc/rcS script runs the fsck(1M) command to check the integrity of file systems marked fsck in /etc/vfstab. If fsck(1M) cannot repair a file system automatically, it interrupts the boot procedure and produces this message. When fsck(1M) gets into this state, it cannot repair file systems without losing one or more files, so it defers this responsibility to you, the administrator. Data corruption has probably already occurred. Action First run fsck -n on the file system to see how many and what type of problems exist. Then run fsck(1M) again to repair the file system. If you have a backup of the file system, you can generally answer "y" to all the fsck(1M) questions. It is a good practice to keep a record of all problematic files and inode numbers for later reference. To run fsck(1M) yourself, specify options as recommended by the boot script. For example: # fsck /dev/rdsk/c0t4d0s0 Usually, files lost during fsck(1M) repair were created just before a crash or power outage, and cannot be recovered. If important files are lost, you can recover them from backup tapes. If you do not have a backup, ask an expert to run fsck(1M) for you. See Also For more information, see the section on checking file system integrity in the System Administration Guide, Volume 1. The SCSI bus is hung. Perhaps an external device is turned off. Cause This message appears near the beginning of rebooting, immediately after a Boot device: ... message. Then, the system hangs. The problem is conflicting SCSI targets for a non-boot device. Having an external device turned off is unlikely to cause this problem. Action For a solution, refer to "Boot device: /iommu/sbus/directory/directory/sd@3,0". See Also For more information, see the section on halting and booting in the System Administration Guide, Volume 1. THE SYSTEM IS BEING SHUT DOWN NOW !!! Cause This message means the system is going down immediately, and it is too late to save any changes. Action This message is often preceded by messages telling you that the system is going down in 15 minutes, 10 minutes, and so on. When you see these initial broadcast shutdown messages, save all your work, send any email you are working on, and close your files. Fortunately, vi(1) sessions are automatically saved for later recovery, but many other applications have no crash protection mechanism. Data loss is likely. See Also For more information on shutting down the system, see the System Administration Guide, Volume 1. If you are using AnswerBook online documentation, "halting the system" is a good search string. The system will be shut down in int minutes Cause This message from the system shutdown(1M) script informs you that the superuser is taking down the system. Action Save all changes now or your work will be lost. Write out any files you were changing, send any email messages you were composing, and close your files. See Also For more information on shutting down the system, see the System Administration Guide, Volume 1. If you are using AnswerBook online documentation, "halting the system" is a good search string. This gateway does not support Unix Password. Cause While using Firewall v2.0, the following sequence happens: # telnet firewall-machine Trying 192.29.174.60 ... Connected to firewall-machine Escape character is '^]'. CheckPoint FireWall-1 authenticated Telnet server running on firewall-machine Login: testuser This gateway does not support Unix Password. Action Under Network Objects, edit the Gateway object Host Properties Auth Schemes and select UNIX Password. UNIX Password is not checked by default as it is considered an unsecure method of authentication. This mail file has been changed by another mail reader. Cause This message appears in a pop-up dialog box whenever you start mailtool(1) while another mail reader has the inbox locked. A question follows: Do you wish to ask that mail reader to save the changes? You are given three choices. Action If you choose Save Changes, mailtool(1) requests the other mail reader to relinquish its lock and write out any changes it has made to your inbox. If you choose Ignore, mailtool(1) reads your inbox without locking it. If you choose Cancel, mailtool(1) exits. Timeout waiting for ARP/RARP packet Cause This problem can occur while booting from the net, and indicates a network connection problem. Action Make sure the Ethernet cable is connected to the network. Check that this system has an entry in the NIS ethers(4) map or locally on the boot server. Then check the IP address of the server and the client to make sure they are on the same subnet. Local /etc/hosts files must agree with one another and with the NIS hosts(4) map. If those conditions are not causing the problem, go to the system's PROM monitor ok prompt and run test net to test the network connection. (On older PROM monitors, use test-net instead.) If the network test fails, check the Ethernet port, card, fuse, and cable, replacing them if necessary. Also check the twisted pair port to make sure it is patched to the correct subnet. See Also For more information on packets, see SPARC: Installing Solaris Software. If you are using AnswerBook online documentation, "ARP/RARP" is a good search string. Timer expired Cause The timer set for a STREAMS ioctl call has expired. The cause of this error is device specific and could indicate either a hardware or software failure, or perhaps a time-out value that is too short for the specific operation. The status of the ioctl(2) operation is indeterminate. This is also returned in the case of _lwp_cond_timedwait(2) or cond_timedwait(3THR). Technical Notes The symbolic name for this error is ETIME, errno=62. token ring hangs Cause 4.1.3C Sbus cards suffered a system freeze. Too many links Cause An attempt was made to create more than the maximum number of hard links (LINK_MAX, by default 32767) to a file. Because each subdirectory is a link to its parent directory, the same error results from trying to create too many subdirectories. Action Check why the file has so many links to it. To get more than the maximum number of hard links, use symbolic links instead. Technical Notes The symbolic name for this error is EMLINK, errno=31. Too many open files Cause A process has too many files open at once. The system imposes a per-process soft limit on open files, OPEN_MAX (usually 64), which can be increased, and a per-process hard limit (usually 1024), which cannot be increased. Action You can control the soft limit from the shell. In the C shell, use the limit(1) command to increase the number of descriptors. In the Bourne or Korn shells, use the ulimit -n command to increase the number of file descriptors. If the window system refuses to start new applications because of this error, increase the open-file limit in your login shell before starting the window system. Technical Notes The symbolic name for this error is EMFILE, errno=24. Transport endpoint is already connected Cause A connect request was made on an already connected transport endpoint; or, a sendto(3XNET) or sendmsg(3XNET) transport endpoint specified a destination when already connected. Technical Notes The symbolic name for this error is EISCONN, errno=133. Transport endpoint is not connected Cause A request to send or receive data was disallowed because the transport endpoint is not connected and (when sending a datagram) no address was supplied. Technical Notes The symbolic name for this error is ENOTCONN, errno=134. TRAP 3E Cause The Ultra system fails to boot with TRAP 3E. The system sometimes also displays bad magic number errors. This error is caused by a bad super block on the boot disk. Which, in turn, could have been caused by a SCSI configuration problem. Action To fix: Check the SCSI bus for illegal configuration, bad cables, and duplicate SCSI addresses. Boot from CD-ROM as single user. OK boot cdrom -sw Attempt to fsck(1M) boot disk. This could fail with a super block error. # fsck /dev/rdsk/device Find the locations of alternate super blocks. BE SURE TO USE AN UPPERCASE -N. For example: # newfs -N /dev/rdsk/c0t0d0s0 /dev/rdsk/c0t0d0s0: 2048960 sectors in 1348 cylinders of 19 tracks, 80 sectors 1000.5MB in 85 cyl groups (16 c/g, 11.88MB/g, 5696 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 24432, 48832, 73232, 97632, 122032, 146432, 170832, 195232, 219632, 244032, 268432, 292832, 317232, 341632, 366032, 390432, 414832, 439232, 463632, 488032, 512432, 536832, 561232, 585632, 610032, 634432, 658832, 683232, 707632, 732032, 756432, 778272, 802672, 827072, 851472, 875872, 900272, 924672, 949072, 973472, 997872, 1022272, 1290672, ... Using an alternate super block, run fsck(1M) on the disk. You might have to try more than one alternate super block to make this to work. Pick a couple from the beginning, the middle, and the end. # fsck -o b= /dev/rdsk/c0t0d0s0 The boot block is probably bad too. Restore it while you are booted from the CD-ROM. # /usr/sbin/installboot /usr/platform/architecture/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0 Reboot the operating environment. # reboot "U" ufsdump 4mm commands Cause Dump syntax was used with autoloader. umount: warning: /string not in mnttab Cause This message occurs when the superuser attempts to unmount a file system that is not mounted. Subdirectories of file systems, such as /var, cannot be unmounted. Action Run the mount(1M) or df(1M) command to see which file systems are mounted. If you really want to unmount one of them, specify the existing mount point. Unable to connect to license server. Inconsistent encryption code. Cause The user receives this error message, and only the IP address of the machine has changed. Action The IP address defined with ifconfig(1M) must match that in /etc/hosts. That is, if you change the machine's IP address with ifconfig(1M), you must also change the machine's entry in the /etc/hosts file. For machines with multiple interfaces, you must check and possibly update /etc/hostname.*. unable to get pty! Cause When trying to open a Terminal window (dtterm) in CDE, a pop-up window appears stating, Unable to get pty! dtterm is not able to open /dev/pts/int (where int is an integer). The user cannot open this file because grantpt(3C) failed to change the permissions on the file. grantpt(3C) failed because the binary /usr/lib/pt_chmod is not setuid root. The permissions on /usr/lib/pt_chmod must be 4111. Action To restore the correct permissions to pt_chmod, use the following command (as root): # chmod 4111 /usr/lib/pt_chmod Unable to install/attach driver 'string' Cause These messages appear in /var/adm/messages at boot time, when the system tries to load drivers for devices the machine does not have. Action This message is strictly informational. You probably do not want all these device drivers because they make your system kernel larger, requiring more memory. Unable to open nwrecover, Error: nwrecover: NSR: please start a server on client_name Cause While trying to open the graphical recovery interface by running nwrecover from the client, this error was displayed. Action In this case, multiple networker servers existed and nwrecover could not determine which network server to use for the client. The server can be specified to the nwrecover command with the -s option. nwrecover -c client_name -s server_name -s server_name sets the NetWorker server, and -c client_name sets the NetWorker client index. uname: error writing name when booting Cause The system cannot bootstrap. Action Boot from the CD-ROM and check /etc/nodename. The file must contain exactly one line with the name of the system. No blank or other lines are allowed. undefined control Cause This message, prefaced by the file name and line number involved, is from the C preprocessor /usr/ccs/lib/cpp and indicates a line starting with a pound-sign (#) but not followed by a valid keyword (such as define or include). Action A piece of software might be running the C preprocessor on an initialization file that you thought was interpreted by a shell. In most shells, the sharp (#) indicates a comment. The C preprocessor considers comments to be anything between /* and */ delimiters. unknown host exception: unknown host Cause The user tries to install Sun Directory Services 1.0 using the Java front end. During the installation, an error occurs: unknown host exception: unknown host. Then the Services displays the host name with domain name appended twice. Action The user had the following line in /etc/nsswitch.conf: hosts: dns files. By changing the line to point first to files and then to DNS, hosts: files dns, the problem was resolved. Other considerations: This error could also happen if you are using a fully qualified host name. Make sure your host name does not have the domain appended. If you use a fully qualified host name, the domain is appended twice. Also, verify that the domain name specified in /etc/resolv.conf is a reachable domain. Unmatched ` Cause This message from the C shell csh(1) indicates that a user typed a command containing a backquote symbol (`) without a closing backquote. Similar messages occur from an unmatched single quote (') or an unmatched double quote ("). Other shells generally give a continuation prompt when a command line contains an unmatched quote symbol. Action Correct the command line and try again. To continue typing on another line, give the C shell a backslash right before the newline. UNREF FILE I=i OWNER=o MODE=m SIZE=s MTIME=t CLEAR? Cause During phase 4, fsck(1M) discovered that the specified file was orphaned because the inode had no record of its path name. In other words, the file was not connected with any directory. Action Answer "yes" to reconnect the file into the lost+found directory. Then contact the file's owner to ask if you should send it back, and where to place it. See Also For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume 1. UnsatisfiedLinkError Cause A user was able to use a demo version only when dialed-in to an Internet provider. The user further noted that this Java error message occurred when trying to load library pages without a connection. Action The Java WorkShop package relies on the Java Development Kit to provide networking services. There could be two possible problems: The JDK/VM tries to load net.dll, which then loads wsock32.dll as its socket services. The winsocket program might have done something with the system socket DLLs and might have broken the JDK net.dll, which could explain the UnsatisfiedLinkError. When JDK creates a ServerSocket or Socket object, it tries to resolve the local host name by calling gethostbyaddr(), which eventually queries the DNS on the Win95/NT, if the user has a DNS entry configured for the TCP/IP. (This normally results in a "Dialup dialog" coming up.) For the first problem: If the winsocket program renames/moves the wsock32.dll or winsock.dll, the resolution includes modifying the JDK. For the second problem: To avoid the DNS query, add an entry to your %WinDir%\HOSTS file. Refer to the Java WorkShop release notes for more details. Use "logout" to logout. Cause This C shell message might come as a surprise to Bourne or Korn shell users accustomed to logging out with a Control-D. Action When ignoreeof is set, the C shell requires users to log out by typing logout(1) or exit(1). Write any modified files to disk before exiting. user unknown Cause When trying to mail to a user, the error Username... User unknown is displayed. The user is on the same system. Action Check for a typographical error in the entered email address. Otherwise, the user could be aliased to a nonexistent email address in /etc/mail/aliases or the user's .mailrc file. You cannot mail to a user that has capital letters in its name. sendmail(1M) converts all the capital letters to lowercase before attempting to find the user. Because UNIX is case sensitive, it finds no user name on the system with all lowercase letters, so it displays the User unknown message. As a workaround, make sure all user names are composed of only lowercase letters. /usr/dt/bin/rpc.ttdbserverd:Child Status' changed Cause While running CDE, the error in the console or /var/adm/messages file was as follows: Oct 19 04:41:00 darkcastle last message repeated 393 times Oct 19 04:41:01 darkcastle inetd[120]: /usr/dt/bin/rpc.ttdbserverd:Child Status Changed Action Create the following soft links: ln -s /usr/openwin/bin/rpc.ttdbserver /usr/dt/bin/rpc.ttdbserver ln -s /usr/openwin/bin/rpc.ttdbserverd /usr/dt/bin/rpc.ttdbserverd /usr/openwin/bin/xinit: connection to X server lost Cause This error means that the xinit(1) program, which sets up X11 resources and starts a window manager, failed to locate the X server process. Perhaps the user interrupted window system startup, or exited abnormally from OpenWindows (for example, by killing processes or by rebooting). The X server might have crashed. Data loss is possible in some cases. Depending on the process timing, this message might be normal when the OpenWindows environment exits during a system reboot. Action The only solution is to exit and restart the OpenWindows environment. You do not need to reboot the system unless it hangs and fails to give you a console prompt. To exit the OpenWindows environment, select Workspace->Exit. To restart the OpenWindows environment, type openwin(1) at the system prompt. /usr/ucb/cc: language optional software package not installed Cause While compiling some code for BSD compatibility, the error occurred after invoking usr/ucb/cc. The unbundled compiler SPARCworks Professional C product was installed in /opt. /usr/ucb/cc is a script that checks for the file /usr/ccs/bin/ucbcc and, if found, invokes it with appropriate library flags for BSD-compatibility compilation. /usr/ucb/cc is part of the package SUNWscpu. /usr/ccs/bin/ucbcc is supposed to be a symbolic link to /opt/SUNWspro/bin/acc, which is created during the installation of the unbundled C compiler, SPROcc. Action Verify that you have the essential OS-bundled Developer packages, SUNWscpu, SUNWbtool, and the unbundled C compiler, SPROcc. However, in this case, /usr/ccs/bin/ucbcc was missing on the user's system. Evidently, somehow this link was removed. Solve the problem by creating a new symbolic link: # ln -s /opt/SUNWspro/bin/acc /usr/ccs/bin/ucbcc Invoke usr/ucb/cc to verify this remedy worked. The following commands are used to identify which packages contain the particular components involved: craterlake% grep ucb/cc /var/sadm/install/contents /usr/ucb/cc f none 0555 bin bin 3084 50323 814621113 *SUNWscpu craterlake% ls -l /usr/ucb/cc -r-xr-xr-x 1 bin bin 3084 Oct 25 1995 /usr/ucb/cc craterlake% file !$ file /usr/ucb/cc /usr/ucb/cc: executable /usr/bin/sh script craterlake% grep ucbcc /var/sadm/install/contents /usr/ccs/bin/ucbcc=/opt1/40/SUNWspro/SC4.0/bin/acc s none SPROcc SPROcc.2 SPROcc.5 craterlake% file /usr/ccs/bin/ucbcc /usr/ccs/bin/ucbcc: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped craterlake% ls -l /usr/ccs/bin/ucbcc lrwxrwxrwx 1 root other 31 Aug 23 1996 /usr/ccs/bin/ucbcc -> /opt1/40/SUNWspro/SC4.0/bin/acc UX: userdel: error: Cannot update system files login cannot be deleted Cause This error is displayed when using userdel to delete a user, userdel -r userid and the root (/) file system is full. Action Free up some space on the root (/) file system. "V" Value too large for defined data type Cause The user ID or group ID of an IPC object or file system object was too large to be stored in an appropriate member of the caller-provided structure. Action Run the application on a newer system, or ask the program's author to fix this condition. Technical Notes This error occurs only on systems that support a larger range of user or group ID values than a declared member structure can support. This condition usually occurs because the IPC or file system object resides on a remote machine with a larger value of type uid_t, off_t, or gid_t than that of the local system. The symbolic name for this error is EOVERFLOW, errno=79. Volume Manager reports error: Configuration daemon can't speak protocol version Cause While attempting to run vxva (the volume manager GUI) with an upgrade from VXVM 2.0 or 2.1 to VXVM 2.3, you receive this message: Volume Manager reports error: Configuration daemon can't speak protocol version This message indicates that there is a version mismatch between the version of the volume manager daemon, vxconfigd, and the GUI, vxva, that you are trying to run. For example, you are running the 2.3 version of vxconfigd, and trying to run an old (2.1) version of vxva. Most likely you are using the wrong path for vxva. For versions 2.1 and below of vxva, the binary can be found in /opt/vxva/bin; but starting with 2.1.1, the location was changed to /opt/SUNWvxva/bin. If you did not remove the old SUNWvxva package before installing the new 2.3 version (which is normal, since you do not NEED to remove the old package), you probably still have the old /opt/vxva/bin in your $PATH, and, thus, you are attempting to run the older version of vxva. Action Run the newer vxva program: /opt/SUNWvxva/bin/vxva. If that remedy does work and you do not get the error message, remove /opt/vxva/bin/vxva from your path statement or remove the old version of vxva and create a symbolic link to the new version with the following two commands: # rm /opt/vxva/bin/vxva # ln -s /opt/SUNWvxva/bin/vxva /opt/vxva/bin/vxva Volume too large for defined data type Cause This error occurred when trying to open a database file that was greater than 2 Gbytes in size. You should be able to do this, because the Solaris 2.6 release supports file sizes greater than 2 Gbytes. Action It is true that the Solaris 2.6 software supports file sizes greater than 2 Gbytes, but to open a file of that size, you must use a new version of the standard calls. There are 64-bit versions of most system calls and libc functions. For example: open64 instead of open. See Also Refer to the lf64(5) man page. vxconfigd error: segmentation fault Cause When the system boots, the vxconfigd fails to start. It fails with a segmentation fault (core dump). vxconfigd error: segmentation fault [ vxvm warning: _illegal vminor encountered ] Action Check the date on the system using date(1) (/bin/date or /usr/bin/date). If the date on the system is old (like 1970) or far out in the future (like 2010), vxconfigd core dumps. Change the date on the system using /bin/date or /usr/bin/date and vxconfigd starts without problems. vxfs filesystems not mounting Cause In this case, the user was unable to mount and was getting uncorrectable error messages from mountall. Below is the individual mount report: mount: You don't have a license to run this program However, vxserial -p showed the following: Feature name: CURRSET [95] Number of licenses: 1 (non-floating) Expiration date: Sun Jan 18 03:00:00 1998 (22.8 days from now) Release Level: 20 Machine Class: All Feature name: RAID [96] Number of licenses: 1 (non-floating) Expiration date: Sun Jan 18 03:00:00 1998 (22.8 days from now) Release Level: 20 Machine Class: All Action Use vxfsserial -p to see the state of the vxfs license. In this case, it had expired. Unexpired vxfsserial -p output looks similiar to the following: Feature name: VXFS [80] Number of licenses: 1 (non-floating) Expiration date: No expiration date Release Level: 22 Machine Class: 934986342 vxvm:vxslicer:ERROR unsupported disk layout Cause When trying to encapsulate a disk you receive this error. Action You must meet the minimum requirements to encapsulate a disk: You must have two free, zero-length, slices on the disk (no cylinders should be assigned to these slices). You must have two free cylinders on the disk. These two cylinders must not be in use by any slice other than slice two. The two free cylinders must be located at the beginning or end of the drive. "W" WARNING: add_spec: No major number for sf Cause The system prints the following warning message while booting: SunOS Release 5.5.1 Version Generic_103640-03 [UNIX(R) System V Release 4.0] Copyright (c) 1983-1996, Sun Microsystems, Inc. WARNING: add_spec: No major number for sf The sf(7D) driver is specific for a Sun Enterprise Network Array (SENA), also known as a "photon." Action If no SENA is attached to the system, the message can be safely ignored. To stop seeing the message, comment out the last line in /kernel/drv/ssd.conf that references sf(7D). If you do this, and then later attach a SENA to your system, remember to uncomment this line again. warning:cachefs:invalid cache version Cause While running the Solaris 2.5.1 release and using Adminsuite2.3/Autoclient2.1, the user added 5 autoclients. During startup of the clients, the user received this error message. Action The /kernel/fs/cachefs files between server and client are different versions. Cachefs versions on the server and the client should be the same as shown in the following: On the server: # cd /kernel/fs # ls -al cachefs -rwxr-xr-x 1 root sys 229396 Jul 15 1997 cachefs* On the client: # cd /export/root/clientname/kernel/fs # ls -al cachefs -rwxr-xr-x 1 root sys 229396 Jul 15 1997 cachefs* solution: load patch 104849-02 or higher To solve the problem, load patch 104849-02 or higher. WARNING: Clock gained int days-- CHECK AND RESET THE DATE! Cause Each workstation contains an internal clock powered by a rechargeable battery. After the system is halted and turned off, the internal clock continues to keep time. When the system is powered on and reboots, the system notices that the internal clock has gained time since the workstation was halted. Action In most cases, especially if the power has been off for less than a month, the internal clock keeps the correct time, and you do not have to reset the date. Use the date(1) command to check the date and time on your system. If the date or time is wrong, become superuser and use the date(1) command to reset them. Warning: Could not find matching rule in rules.ok Cause After an upgrade to the Solaris 2.5.1 release, jumpstart fails with this message: Checking rules.ok file... Warning: Could not find matching rule in rules.ok This message can occur even if the rules file is known to work, or, after review, it appears to be fine, and the check script has been run. Action Remove the rule keyword, network, from the rule file and run the check, again. Jumpstart should run without error. WARNING: FAN FAILURE check if fans are still spinning Cause A SPARCcenterTM 2000/2000E might get one of these error messages, WARNING: FAN FAILURE check if fans are still spinning or WARNING: FAN FAILURE still sensed, displayed on the console screen at any time, with a record of the event in /var/adm/messages. Action The error itself is descriptive and self-explanatory, and you might suspect that a hardware problem occurred with the system's blower or fan assembly located at the top-most rear of the system cabinet. Upon further investigation you note that the blower is indeed spinning at a good rate. Given that, you should then check to see if the "AC Dist to Blower to Filter to Keyswitch Harness" plug/adapter is plugged in correctly. Two cable assemblies connect the blower assembly to the unit's power supply. One is the "power supply" cable and the other is the "AC Dist to Blower to Filter to Keyswitch Harness." Once the harness is securely connected, you see another message, NOTICE: FAN RECOVERED, logged on the system's console screen, or, if missed, it is in /var/adm/messages. WARNING: FAN FAILURE still sensed Refer to "WARNING: FAN FAILURE check if fans are still spinning". WARNING: No network locking on string: contact admin to install server change Cause The mount(1M) command issues this message whenever it mounts a file system that does not have NFS locking, such as a standard SunOS 4.1 exported file sytem. Data loss is possible in applications that depend on locking. Action On the remote SunOS 4.1 system, install the appropriate rpc.lockd jumbo patch to implement NFS locking. For the SunOS 4.1.4 system, install patch #102264; for the SunOS 4.1.3 system, install patch #100075; for earlier 4.1 releases, install patch #101817. WARNING: processor level 4 interrupt not serviced Cause This message is basically a diagnostic from the SCSI driver. It can appear on the console every 10 minutes or so. Action To reduce the frequency of this message, add this line near the bottom of the /etc/system file and reboot: set esp:esp_use_poll_loop=0 Technical Notes You might also see this message repeatedly after manually removing a CD when it was busy. Do not do this! To return the system to normal, reboot the system with the -r (reconfigure) option. WARNING: /tmp: File system full, swap space limit exceeded Cause The system swap area (virtual memory) has filled up. You need to reduce swap space consumption by killing some processes or possibly by rebooting the system. Action For information about increasing swap space, refer to "Not enough space". WARNING: TOD clock not initialized-- CHECK AND RESET THE DATE! Cause This message indicates that the Time Of Day (TOD) clock reads zero, so its time is the beginning of the UNIX epoch: midnight, 31 December 1969. On a brand-new system, the manufacturer might have neglected to initialize the system clock. On older systems it is more likely that the rechargeable battery has run out and requires replacement. Action First replace the battery according to the manufacturer's instructions. Then become superuser and use the date(1) command to set the time and date. On some systems the clock is powered by the same battery as the NVRAM, so a dead battery also causes loss of the machine's Ethernet address and host ID, which are more serious problems for networked systems. WARNING: Unable to repair the / filesystem. Run fsck Cause This message comes at boot time from the /etc/rcS script whenever it gets a bad return code from fsck(1M) after checking a file system. The message recommends an fsck(1M) command line, and instructs you to exit the shell when done to continue booting. Then the script places the system in single-user mode so fsck(1M) can be run effectively. Action For information about repairing UFS file systems, refer to "/dev/rdsk/string: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.". For information about repairing non-UFS file systems, refer to "THE FOLLOWING FILE SYSTEM(S) HAD AN UNEXPECTED INCONSISTENCY:". WARNING: vxvm:vxio: Illegal vminor encountered Cause In this case, the message occurred during booting. The system was sharing an SSA1XX with an identical system. The user was also getting an error in disk group configuration copies during booting. The identical system was booting up fine--without error messages. vxconfigd died. A vxprivutil scan of one of the disks indicated the following: diskid: 880409237.1043.system_that_comes_up hostid: none Action The user quickly applied a vxinstall on both systems: first, on the system that did not successfully boot, and then on the system that did. The user had to run a custom vxinstall, selecting only the disks desired for each system. Technical Notes -------------------------------------------------------------------------------- Note - The following attempt to resolve the problem failed. vxiod set 10 vxconfigd -m disable vxdctl init hostname vxdctl enable -------------------------------------------------------------------------------- Watchdog Reset Cause This fatal error usually indicates some kind of hardware problem. Data corruption on the system is possible. Action Look for some other message that might help diagnose the problem. By itself, a watchdog reset does not provide enough information; because traps are disabled, all information has been lost. If all that appears on the console is an ok prompt, issue the following PROM command to view the final messages that occurred just before system failure: ok f8002010 wector p Yes, that word is wector, not vector. The result is a display of messages similar to those produced by the dmesg(1M) command. These messages can be useful in finding the cause of system failure. Technical Notes This message does not come from the kernel, but from the OpenBoot PROM monitor, a piece of Forth software that gives you the ok prompt before you boot UNIX. If the CPU detects a trap when traps are disabled (an unrecoverable error), it signals a watchdog. The OpenBoot PROM monitor detects the watchdog, issues this message, and shuts down the system. Who are you? Cause Many networking programs can print this message, including from(1B), lpr(1B), lprm(1B), mailx(1), rdist(1), sendmail(1M), talk(1), and rsh(1). The command prints this message when it cannot locate a password file entry for the current user. This error might occur if a user logged in just before the superuser deleted that user's password entry, or if the network naming service fails for a user who has no entry in the local password file. Action If a user's password file entry was accidentally deleted, restore it from backups or from another password file. If a user's login name or user ID was changed, ask that user to log out and log in again. If the network naming service failed, check the NIS server(s) and repair or reboot as necessary. Technical Notes A known problem exists with starting hundreds of rsh(1) processes on another machine. This message appears because rsh(1) hangs while binding to a reserved port and responds too slowly to interact with the network naming service. Window Underflow Cause This message often occurs at boot time, sometimes along with a Watchdog Reset error. It comes from the OpenBoot PROM monitor, which was passed a processor trap from the hardware. This error indicates that some program tried to access a register window that was not accessible from the processor. Action On some system architectures the problem could be that different capacity memory chips are mixed together. Someone might have placed 1-Mbyte SIMMs in the same bank with 4-Mbyte SIMMs. If this is so, rearrange the memory chips. Make sure to put higher-capacity SIMMs in the first bank(s), and lower-capacity SIMMs in the remaining bank(s); never mix different capacity SIMMs in the same bank. The problem could also be that cache memory on the motherboard has gone bad and needs replacement. If main memory is installed correctly, try swapping the motherboard. Technical Notes The best way to isolate the problem is to look at the %pc register to see where it got its arguments, and why the arguments were bad. If you can reproduce the condition causing this message, your system vendor might be able to help diagnose the problem. "X" X connection to string:0.0 broken (explicit kill or server shutdown). Cause This error means that the client has lost its connection to the X server. The "0.0" represents the display device, which is usually the console. This message can appear when a user is running an X application on a remote system with the DISPLAY set back to the original system and the remote system's X server disappears, perhaps because someone exited X windows or rebooted the machine. It sometimes appears locally when a user exits the window system. Data loss is possible if applications were killed before saving files. Action Try to run the application again in a few minutes after the system has rebooted and the window system is running. xinit: not found Cause The OpenWindows environment was probably not installed properly, and the openwin(1) program could not find xinit(1) to start the X windows system. If the user is running another version of X windows, such as the MIT X11 distribution, the startx program serves the same function as xinit(1). Action Check the PATH environment variable to make sure it contains the appropriate X windows install directory. Verify that xinit(1) is in this directory as an executable program. XIO: fatal IO error 32 (Broken pipe) on X server "string:0.0" Cause This error means that I/O with the X server has been broken. The 0.0 represents the display device, which is usually the console. This message can appear when a user is running Display PostScript applications and the X server disappears or the client is shut down. Data loss is possible, if applications disappeared before saving files. Action Try to run the application again in a few minutes after the system has rebooted and the window system is running. Xlib: connection to "string:0.0" refused by server Cause This message is immediately followed by the Xlib: Client is not authorized to connect to Server message. These messages indicate that an X windows application tried to run on the X server specified inside double quotes, which did not allow the request. The 0.0 represents the display device, which is usually the console. If no servername appears, the superuser probably tried to run an X application on the current machine in an X session that was owned by somebody else. Action To allow this client to connect to the X server, run xhost(1) +clientname on the X server system. Only the owner of the current X session (who is not necessarily the superuser) is allowed to run the xhost(1) command. If somebody else is running X windows on the server, ask them to log out and then start your own X session on that server; remote X connections are usually allowed for the same user ID. Xlib: extension "GLX" missing on display "0.0" Cause Install the OpenGLr 1.0 software and test the configuration by running /usr/openwin/demo/GL/ogl_install_check, which provides the following results: # ./ogl_install_check Xlib: extension "GLX" missing on display "0.0". Xlib: extension "GLX" missing on display "0.0". Xlib: extension "GLX" missing on display "0.0". can't find visual Action First check that the installation has worked correctly by running the package check utility on the runtime package: pkgchk SUNWglrt. This should result in an error message like this: ERROR: /usr/openwin/server/etc/OWconfig file size <187> expected <5423> actual file cksum <14394> expected <27045> actual (The numbers might be different, but there should be only one file.) If other errors occur, re-install OpenGL, especially the SUNWglrt package. Assuming that is fine, look at the process owner for the Xsun process using the following: # ps -aef | grep Xsun | grep -v grep nobody 20022 225 0 11:36:22 ? 0:34 /usr/openwin/bin/Xsun :0 -nobanner If the owner is not root, that is most likely the problem. There is a permissions issue loading the graphic pipelines. If you are using CDE, ensure that the Xservers file has this form: :0 Local local_uid@console root /usr/openwin/bin/Xsun :0 -nobanner The Xservers file can be found in /usr/dt/config, if you have not done any customization. Otherwise, it can more than likely be found in /etc/dt/config/. Additional arguments after the -nobanner option are acceptable. Another way of proving this is to run the OpenWindows environment from the command line as root. It ensures that the Xsun process is owned by root. Another possibility is that the system is NOT a Creator 3D. You can only run OpenGL 1.0 on an Ultra machine with a Creator 3D graphics card. If you install this application on an Ultra machine with a Creator framebuffer and NOT a Creator 3D, you see these same error messages. xntpd: clnt_dg_create: out of memory Cause At boot time, the error occurs after configuring NTP. Except for the error, everything seems to be working properly. Action As a workaround, move the script for xntpd from S74xntpd to S77xntpd, so it starts after S76nscd. xterm: fatal IO error 32 (Broken Pipe) or KillClient on X server "string:0.0" Cause This error means that xterm(1) has lost its connection to the X server. The 0.0 represents the display device, which is usually the console. This message can appear when a user is running xterm and the X server disappears or the client is shut down. Data loss is possible if applications were killed before saving files. Action Try to run the terminal emulator again in a few minutes after the system has rebooted and the window system is running. XView warning: Cannot load font set 'string' (Font Package) Cause This message from the XView library warns that a requested font is not installed on the X server. Often multiple warnings are displayed for the same font. The set of available fonts can vary from release to release. Action To see which fonts are available on the X server, run the xlsfonts(1) program. Then specify another font name that you see in the output of xlsfonts(1). Sometimes you can locate a similar font from a different vendor. Technical Notes Two packages of X windows fonts are: the common but not required fonts (SUNWxwcft), and the optional fonts (SUNWxwoft). Run pkginfo(1) to see if both packages are installed, and add them to the system as you desire. "Y" yp_all RPC clnt_call (transport level) failure Cause At random times, a slave NIS server has a problem that causes ypbind(1M) to report ypserver not responding, and the machine must be rebooted. The syslog file contains the following: Dec 14 07:11:03 rahab syslog: yp_all - RPC clnt_call (transport level) failure: RPC: Unable to receive; An event requires attention Action As a workaround, increase the file descriptor limit in the yp startup script, /etc/rc2.d/S71rpc. Add this command to the script before ypserv is started: ulimit -n 256 ypbind[int]: NIS server for domain "string" OK Cause This message appears after an NIS server not responding message to indicate that ypbind(1M) is able to communicate with an NIS server again. Action Proceed with your work. This message is strictly informational. ypbind[int]: NIS server not responding for domain "string"; still trying Cause This means that the NIS client daemon ypbind(1M) cannot communicate with an NIS server for the specified domain. This message appears when a workstation running the NIS naming service has become disconnected from the network, or when NIS servers are down or extremely slow to respond. Action If other NIS clients are behaving normally, check the Ethernet cabling on the workstation that is getting this message. Note the following differences between architectures: On SPARC machines, disconnected network cabling also produces a series of no carrier messages. On IA machines, the NIS+ messages might be the only indication that network cabling is disconnected. If many NIS clients on the network are giving this message, go to the NIS server in question and reboot or repair as necessary. To locate the NIS server for a domain, run the ypwhich(1) command. When the server machine returns to operation, NIS clients give an NIS server for domain OK message. See Also For more information about ypbind(1M), see the section on administering secure NFS in the System Administration Guide, Volume 3. ypserv[int]: restarting resolv server. old one not responding Cause In this instance, the NIS Server, which had been upgraded from version 2.5.1 to version 2.6, was repeating this error message every ten minutes. Also, the Server was less frequently repeating the following message: rpc.nisd_resolv[7472]: svc_getreqset: no transport handle for fd2 The SUNWypu and SUNWypr packages had been installed. Action Install Patch-ID# 105552-01. Also, set B= in the Makefile. Run make again to recreate the maps on the following: #B=-b B=You might also need to remove the -d option from the ypserv command in the /usr/lib/netsvc/yp/ypstart script. Then, you must reboot the machine. ypwhich: can't communicate with ypbind Cause This message from the ypwhich(1) command indicates that the NIS binder process ypbind(1M) is not running on the local machine. Action If the system is not configured to use NIS, this message is normal and expected. Configure the system to use NIS if necessary. If the system is configured to use NIS, but the ypbind(1M) process is not running, invoke the following command to start it up: # /usr/lib/netsvc/yp/ypbind -broadcast "Z" zsint: silo overflow Cause This message means that the Zilog 8530 character input silo (or serial port FIFO) overflowed before it could be serviced. The zs(7D) driver, which talks to a Zilog Z8530 chip, is reporting that the FIFO (holding about two characters) has been overrun. The number after zs(7D) shows which serial port experienced an overflow: zs0 - tty serial port 0 (/dev/ttya) zs1 - tty serial port 1 (/dev/ttyb) zs2 - keyboard port (/dev/kbd) zs3 - mouse port (/dev/mouse) Action Silo overflows indicate that data in the respective serial port FIFO have been lost. However, the consequences of silo overflows might be negligible if the overflows occur infrequently, if data loss is not catastrophic, or if data can be recovered or reproduced. For example, although a silo overflow on the mouse driver (zs3) indicates that the system could not process mouse events quickly enough, the user can perform mouse motions again. Similarly, lost data from a silo overflow on a serial port with a modem connection transferring data using uucp(1C) is recovered when uucp(1C) discovers the loss of data and requests retransmission of the corrupted packet. Frequent silo overflow messages can indicate a zs(7D) hardware FIFO problem, a serial driver software problem, or abnormal data or system activity. For example, the system ignores interrupts during system panics, so mouse and keyboard activity result in silo overflows. If the serial ports experiencing silo overflows are not being used, a silo overflow could indicate the onset of a hardware problem. Technical Notes Another type of silo overflow is one that occurs during reboot, when an HDLC line is connected to any of the terminal ports. For example, an X.25 network could be sending frames before the kernel has been told to expect them. Such overflow messages can be ignored. ############################################################## SECTION 7: Some Solaris threads dealing on errors: ############################################################## ------- Note: ------- thread: TNS 12546, 12560, 00516, Solaris Error 13 $ lsnrctl start erp11i LSNRCTL for Solaris: Version 10.2.0.3.0 - Production on 30-DEC-2008 17:16:23 Copyright (c) 1991, 2006, Oracle. All rights reserved. Starting /erp11i/oracle/10.2.0/bin/tnslsnr: please wait... TNSLSNR for Solaris: Version 10.2.0.3.0 - Production System parameter file is /erp11i/oracle/10.2.0/network/admin/erp11i_erp11i/listener.ora Log messages written to /erp11i/oracle/10.2.0/network/admin/erp11i.log Error listening on: (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCerp11i)) TNS-12546: TNS:permission denied TNS-12560: TNS:protocol adapter error TNS-00516: Permission denied Solaris Error: 13: Permission denied Listener failed to start. See the error message(s) above... I did a truss lsnrctl start erp11i and found this in the result: uname(0xFFFFFFFF7F2DACC8) = 1 access("/var/tmp/.oracle", F_OK) = 0 chmod("/var/tmp/.oracle", 01777) Err#1 EPERM [ALL] so_socket(PF_UNIX, SOCK_STREAM, 0, "", SOV_DEFAULT) = 4 access("/var/tmp/.oracle/sEXTPROCerp11i", F_OK) = 0 connect(4, 0xFFFFFFFF7FFF7AE0, 110, SOV_DEFAULT) Err#146 ECONNREFUSED access("/var/tmp/.oracle/sEXTPROCerp11i", F_OK) = 0 pollsys(0x00000000, 0, 0xFFFFFFFF7FFF7910, 0x00000000) = 0 close(4) = 0 so_socket(PF_UNIX, SOCK_STREAM, 0, "", SOV_DEFAULT) = 4 connect(4, 0xFFFFFFFF7FFF7AE0, 110, SOV_DEFAULT) Err#146 ECONNREFUSED access("/var/tmp/.oracle/sEXTPROCerp11i", F_OK) = 0 pollsys(0x00000000, 0, 0xFFFFFFFF7FFF7910, 0x00000000) = 0 close(4) = 0 so_socket(PF_UNIX, SOCK_STREAM, 0, "", SOV_DEFAULT) = 4 connect(4, 0xFFFFFFFF7FFF7AE0, 110, SOV_DEFAULT) Err#146 ECONNREFUSED access("/var/tmp/.oracle/sEXTPROCerp11i", F_OK) = 0 I checked the ownership of /var/tmp/.oracle/sEXTPROCerp11i : $ ls -ld /var/tmp/.oracle/sEXTPROCerp11i srwxrwxrwx 1 oraprod dbaprod 0 Oct 25 20:05 /var/tmp/.oracle/sEXTPROCerp11i The correct owner for this instance was oraerp:dbaerp $ file /var/tmp/.oracle/sEXTPROCerp11i /var/tmp/.oracle/sEXTPROCerp11i: socket Because this socket is owned by oraprod:dbaprod, the socket can't be accessed by oraerp. The simple solution is to login as oraerp: sudo -u oraerp -i rm /var/tmp/.oracle/sEXTPROCerp11i exit sudo -u oraerp $ lsnrctl start erp11i LSNRCTL for Solaris: Version 10.2.0.3.0 - Production on 30-DEC-2008 18:10:00 Copyright (c) 1991, 2006, Oracle. All rights reserved. Starting /erp11i/oracle/10.2.0/bin/tnslsnr: please wait... TNSLSNR for Solaris: Version 10.2.0.3.0 - Production System parameter file is /erp11i/oracle/10.2.0/network/admin/erp11i_erp11i/listener.ora Log messages written to /erp11i/oracle/10.2.0/network/admin/erp11i.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCerp11i))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tsgsd1003.energy.ge.com)(PORT=1589))) Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCerp11i)) STATUS of the LISTENER ------------------------ Alias erp11i Version TNSLSNR for Solaris: Version 10.2.0.3.0 - Production Start Date 30-DEC-2008 18:10:01 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /erp11i/oracle/10.2.0/network/admin/erp11i_erp11i/listener.ora Listener Log File /erp11i/oracle/10.2.0/network/admin/erp11i.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCerp11i))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=erp11i.justanexample.com)(PORT=1589))) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "erp11i" has 1 instance(s). Instance "erp11i", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully The issue stands resolved after this. ------- Note: ------- thread: Q: solaris error BAD SUPER BLOCK -------------------------------------------------------------------------------- I want mount a disk. I have this error. I'm trying to correct with the superblock but i have the same error. Look my procedure. bash-2.03# fsck -F ufs /dev/rdsk/c0t1d0s0 Alternate super block location: 9423392. ** /dev/rdsk/c0t1d0s0 BAD SUPER BLOCK: MAGIC NUMBER WRONG USE AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; bash-2.03# newfs -N /dev/rdsk/c0t1d0s0 /dev/rdsk/c0t1d0s0: 17682084 sectors in 4924 cylinders of 27 tracks, 133 sectors 8633.8MB in 308 cyl groups (16 c/g, 28.05MB/g, 3392 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 57632, 115232, 172832, 230432, 288032, 345632, 403232, 460832, 518432, 576032, 633632, 691232, 748832, 806432, 864032, 921632, 979232, 1036832, bash-2.03# fsck -F ufs -o b=32 /dev/rdsk/c0t1d0s0 Alternate super block location: 32. ** /dev/rdsk/c0t1d0s0 BAD SUPER BLOCK: NUMBER OF DIRECTORIES OUT OF RANGE USE AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; eg. fsck [-F ufs] -o b=# [special ...] where # is the alternate super block. SEE fsck_ufs(1M). bash-2.03# fsck -F ufs -o b=57632 /dev/rdsk/c0t1d0s0 Alternate super block location: 57632. ** /dev/rdsk/c0t1d0s0 BAD SUPER BLOCK: MAGIC NUMBER WRONG USE AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; eg. fsck [-F ufs] -o b=# [special ...] where # is the alternate super block. SEE fsck_ufs(1M). bash-2.03# fsck -F ufs -o b=17468960 /dev/rdsk/c0t1d0s0 Alternate super block location: 17468960. ** /dev/rdsk/c0t1d0s0 BAD SUPER BLOCK: MAGIC NUMBER WRONG USE AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; eg. fsck [-F ufs] -o b=# [special ...] where # is the alternate super block. SEE fsck_ufs(1M). A: ------- Note: ------- thread: Bug ID 6401066 Synopsis "IRQ 10 is shared with different levels" is misleading or incorrect. State 11-Closed:Will Not Fix (Closed) Category:Subcategory kernel:ddi Keywords opensolaris Responsible Engineer Surya Prakki Reported Against snv_28 Duplicate Of Introduced In Commit to Fix Fixed In Release Fixed Related Bugs Submit Date 20-MAR-2006 Last Update Date 24-MAR-2009 Description Category driver Sub-Category aac Description I get a message during booting: Warning: IRQ 10 is shared by different drivers with different levels ... The message suggests that the system may not perform efficiently. So I started to investigate. Maybe mixture of edge-triggered or level-triggered. I originally thought this is a good warning, but meaning not clear enough. As I checked the PC using a different installaion of linux, I found that the IRQ is shared with three devices. Intell EtherExpress 100. Adaptec AHA29160 and a USB interface card (that uses VIA.) All of them, however, seem to use level-triggered interrupt (low-level trigger). So the message doesn't seem to be quite correct. (Or is it the case, that solaris's driver for these cards try to impose different polarity for interrupt detection !?) Frequency Always Regression No Steps to Reproduce As above. Always the message appears during booting. Expected Result Correct Interrupt configuration detection. Actual Result It seems that Solaris 10 nv detects the interrupt configuration in a slightly incorrect manner?! Error Message(s) Test Case Workaround Submitter wants to work on bug No Additional configuration information ------- Note: ------- Bug ID 6271471 Synopsis libaio hang because of missing AIONOTIFY to kernel thread State 10-Fix Delivered (Fix available in build) Category:Subcategory library:libaio Keywords AIONOTIFY | aio_suspend | no-s9+ Responsible Engineer Surya Prakki Reported Against Duplicate Of Introduced In Commit to Fix solaris_8 Fixed In s8patch Release Fixed solaris_8(s8patch) Related Bugs 6310825 Submit Date 17-MAY-2005 Last Update Date 24-MAR-2009 Description See comments. xxxxx@xxxxx 2005-05-17 09:07:07 GMT Work Around N/A ------- Note: ------- This is a list of the 25 bugs with the most votes. This list is compiled on a daily basis, so there may be discrepancies between the vote counts in the list below and the vote counts shown in the individual bug detail pages. Votes Bug ID Synopsis 647 4244499 ZipEntry() does not convert filenames from Unicode to platform 358 4109888 Semantics of external process is not defined in JLS 198 4265778 Java2D incorrectly renders objects with large coordinates 158 4071957 (reflect) Method.invoke access control does not understand inner class scoping 151 4717969 (process) Control-C does not end forked Java process (w2k, wnt) 144 4957990 PermHeap bloat in and only in server VM 138 6434149 (cl) ClassLoader.loadClass() throws java.lang.ClassNotFoundException: [Ljava.lang.String; in JDK 6.0 127 4330950 Lost newly entered data in the cell when resizing column width 119 6245070 JMStudio doesn't playback any .avi file correctly, video always fail 90 6635462 D3D: REGRESSION: XOR rendering is extremly slow 80 6203567 NameService resolving in Applet causes AccessControlException and deadlock 80 6372808 JFileChooser takes a long time to instantiate, at least the first time 77 4171239 File.deleteOnExit() does not work on open files (win32) 76 4816922 No way to set drag icon: TransferHandler.getVisualRepresentation() is not used 76 4723383 Incomplete RTF support in javax.swing.text.rtf.RTFEditorKit 75 4787931 System property "user.home" does not correspond to "USERPROFILE" (win) 75 4743225 Size of JComboBox list is wrong when list is populated via PopupMenuListener 72 6262392 Problem with dismissing dialogs on CDE with XToolkit 69 6429812 NPE after calling JTable.updateUI() when using a header renderer + XP L&F 67 4770092 (process) Process.destroy does not kill multiple child processes 62 4290274 (timer) java.util.Timer.scheduleAtFixedRate() fails if the system time is changed 54 4677493 REGRESSION: java.sql.Timestamp.getTime() returns wrong value with GMT 50 6506617 Keyboard-lock in swing program on Linux box 50 6476706 Error AGENT_ERROR_NO_JNI_ENV printed sometimes to console when JVM finishes 48 4267450 (cal) API: Need public API to calculate, format and parse "year of week" ------- Note: ------- Bad magic number Bad magic number error indicates the system is mostly likely having trouble accessing VTOC (Volumne Table of Contents) This just indicates that the partition is in a strange state. What to do when you saw bad magic number errors in Solaris? If you know the alternate superblocks, then you can fsck the partition. If you don't know the alternate superblocks and created the partition using newfs command, then you can use the "-N" option to print out the superblocks without actually recreate the file system. For example: newfs -N /dev/rdsk/c0t0d0s0 "format" tool might be able to correctly label the disk with valid VTOC. Relabel your disks essentially repartition the disks and existing data will be lost. A recommended approach is to run analyze feature in format utility. Analyze will try to verify or repair a bad sector on a disk. Please note that bad magic number errors doesn't always translate to bad sectors. The physical disk might be working perfectly without errors. ------ Note: ------ 03/04/2009: Solaris Releases The following Solaris releases are currently shipping or no longer shipping but still supported by Sun. -------------------------------------------------------------------------------- Most Current Release Solaris 10 Operating System (OS) As with earlier versions, several Solaris 10 update releases are planned to come out prior to the next Solaris version. The latest update release is Solaris 10 10/08. Note 1: Previous versions of Solaris 10 are no longer necessary as the latest release includes support for all Solaris 10 supported platforms and includes important enhancements not found in earlier releases. Note 2: Certain systems or configurations may still require or recommend use of the previous Solaris 10 updates which are still available for download as DVD (SPARC, x64/x86) or CD (SPARC, x64/x86) images: Solaris 10 3/05 SPARC DVD SPARC CD x64/x86 DVD x64/x86 CD Solaris 10 1/06 SPARC DVD SPARC CD x64/x86 DVD x64/x86 CD Solaris 10 6/06 SPARC DVD SPARC CD x64/x86 DVD x64/x86 CD Solaris 10 11/06 SPARC DVD SPARC CD x64/x86 DVD x64/x86 CD Solaris 10 8/07 SPARC DVD SPARC CD x64/x86 DVD x64/x86 CD Solaris 10 5/08 SPARC DVD SPARC CD x64/x86 DVD x64/x86 CD -------------------------------------------------------------------------------- Other Shipping Releases Solaris 9 Operating Environment The latest update is Solaris 9 9/05. A special version, Solaris 9 9/05 HW is available in both DVD or CD downloads to support new SPARC systems: Sun Ultra 25 and 45 Workstations and Sun Fire V215, V245 and V445 servers. To purchase applicable licenses, please contact Sun. -------------------------------------------------------------------------------- Non-Shipping Releases that are Supported Solaris 8 Operating Environment The latest update is Solaris 8 2/04. The Solaris 8 Operating Environment stopped shipping on February 16, 2007 and is currently at the Vintage Phase I support level. Transition to Vintage Phase II support level will be on March 31, 2009 End of service life will be March 31, 2012 For further information, please see: http://www.sun.com/software/solaris/support/sol8.xml Solaris 7 Operating Environment The latest update is Solaris 7 11/99. The Solaris 7 Operating Environment stopped shipping on August 15, 2003 and is currently at the Vintage Phase II support level. End-of-support will be August 15, 2008. ------ Note: ------ ------ Note: ------ ------ Note: ------ ############################################################## SECTION 8: GENERIC: FILESYSTEM ERRORS: ############################################################## ---------------------------------------------------------------------------------------- Note 1.1 : Possible way how to save files from A corrupt directory Works on OS : all unix probable message : ksh: Invalid file system control data detected: ---------------------------------------------------------------------------------------- >>>> Question: Anybody recognize this? This directory seems to be missing the ".", I can't umount, can't remove the directory, can't copy a good directory over it, etc. spiderman# cd probes spiderman# pwd /opt/diagnostics/probes spiderman# ls -la ls: 0653-341 The file . does not exist. spiderman# cd .. spiderman# ls -la probes ls: probes: Invalid file system control data detected. total 0 spiderman# spiderman# fuser /opt /opt: spiderman# umount /opt umount: 0506-349 Cannot unmount /dev/hd10opt: The requested resource is busy. spiderman# umount /dev/hd10opt umount: 0506-349 Cannot unmount /dev/hd10opt: The requested resource is busy. spiderman# fsck /opt ** Checking /dev/hd10opt (/opt) MOUNTED FILE SYSTEM; WRITING SUPPRESSED; Checking a mounted filesystem does not produce dependable results. ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames DIRECTORY CORRUPTED (NOT FIXED) DIRECTORY CORRUPTED (NOT FIXED) Directory /diagnostics/probes, '.' entry is missing. (NOT FIXED) Directory /diagnostics/probes, '..' entry is missing. (NOT FIXED) ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts link count directory I@98 owner=bin mode$0755 sizeQ2 mtime=May 13 14:54 2005 count 3 should be 2 (NOT ADJUSTED) link count directory I@99 owner=bin mode$0755 size24 mtime=Jan 10 13:45 2005 count 2 should be 1 (NOT ADJUSTED) Unreferenced file IA06 owner=bin mode0555 sizee56 mtime=Jul 07 14:25 2004 (NOT RECONNECTED) Unreferenced file IA06 (NOT CLEARED) Unreferenced file IA07 owner=bin mode0555 size)12 mtime=Jul 07 14:25 2004 (NOT RECONNECTED) etc.... >>>> Answer: Some good news here. Yes, your directory is hosed, but the important things is that all a directory is a repository for storing inode numbers and associated (human readable) file names. Since fsck is so nicely generating all of those now currently inaccessible inode numbers, a find command can be used to move them into a new directory. Once the old directory is empty, you can (hopefully) rm -r it. Here's what you need to do. a) Get all the inode numbers generated from your fsck b) put them into a variable (e.g. lost_inodes="4099 4106....etc." c) Make a target directory for the lost inodes to be moved into: mkdir /tmp/recovery d) cd into your problem File System: cd /opt d) Run a loop using find: for i in ${lost_inodes} do find . -inum ${i} mv * /tmp/recovery \; echo "Moved and recovered inode # ${i}" done That should do it. Let me know if it works ok! BTW, the new "file name" should be the inode number of the file. You will have to rename the files as needed. Note that this mehod saved the files from the corrupt directory. ---------------------------------------------------------------------------------------- Note 1.2 : A superblock issue Works on OS : all unix probable message : probably fsck gives you a message disks : local disks, most likely not SAN ---------------------------------------------------------------------------------------- >>>> Method 1: Use this command in case the superblock is corrupted. This will restore the BACKUP COPY of the superblock to the CURRENT copy. # dd count=1 bs=4k skip=31 seek=1 if=/dev/hd4 of=/dev/hd4 (hd4 is an example) # fsck /dev/hd4 2>&1 | tee /tmp/fsck.errors OR >>>>> Method 2: If you have a dirty superblock you might try to do "fsck". If this does not work try the following (This procedure does not promise 100% success). (The following example relats to a bad filesystem in slv4.0) 1. Copy the original Superblock into a file (calld sd0 in /tmp - places can be changed): dd if=/dev/rslv4.0 of=/tmp/sb0 bs=4k count=1 skip=1 Note: if=Input File, of=Output file, bs=Block Size. 2. Copy the backup Superblock into a file (calld sd1 in /tmp - places can be changed): dd if=/dev/rslv4.0 of=/tmp/sb1 bs=4k count=1 skip=31 3. Copy the Backup Superblock file over the original Superblock: dd if=/tmp/sb1 of=/dev/rslv4.0 bs=4k seek=1 4. Do "fsck" again on this filesystem Note: If you want to restore the original Superblock, do: dd if=/tmp/sb0 of=/dev/rslv4.0 bs=4k seek=1 ---------------------------------------------------------------------------------------- Note 1.3 : A superblock issue Works on OS : AIX probable message : probably fsck gives you a message disks : local disks, most likely not SAN ---------------------------------------------------------------------------------------- >>>> Method 1: -- Fixing a corrupted magic number in the file system superblock. If the superblock of a file system is damaged, the file system cannot be accessed. You can fix a corrupted magic number in the file system superblock. Most damage to the superblock cannot be repaired. The following procedure describes how to repair a superblock in a JFS file system when the problem is caused by a corrupted magic number. If the primary superblock is corrupted in a JFS2 file system, use the fsck command to automatically copy the secondary superblock and repair the primary superblock. In the following scenario, assume /home/myfs is a JFS file system on the physical volume /dev/lv02. The information in this how-to was tested using AIXr 5.2. If you are using a different version or level of AIX, the results you obtain might vary significantly. 1. Unmount the /home/myfs file system, which you suspect might be damaged, using the following command: # umount /home/myfs 2. To confirm damage to the file system, run the fsck command against the file system. For example: # fsck -p /dev/lv02 If the problem is damage to the superblock, the fsck command returns one of the following messages: fsck: Not an AIXV5 file system OR Not a recognized filesystem type 3. With root authority, use the od command to display the superblock for the file system, as shown in the following example: # od -x -N 64 /dev/lv02 +0x1000 Where the -x flag displays output in hexadecimal format and the -N flag instructs the system to format no more than 64 input bytes from the offset parameter (+), which specifies the point in the file where the file output begins. The following is an example output: 0001000 1234 0234 0000 0000 0000 4000 0000 000a 0001010 0001 8000 1000 0000 2f6c 7633 0000 6c76 0001020 3300 0000 000a 0003 0100 0000 2f28 0383 0001030 0000 0001 0000 0200 0000 2000 0000 0000 0001040 In the preceding output, note the corrupted magic value at 0x1000 (1234 0234). If all defaults were taken when the file system was created, the magic number should be 0x43218765. If any defaults were overridden, the magic number should be 0x65872143. 4. Use the od command to check the secondary superblock for a correct magic number. An example command and its output follows: # od -x -N 64 /dev/lv02 +0x1f000 001f000 6587 2143 0000 0000 0000 4000 0000 000a 001f010 0001 8000 1000 0000 2f6c 7633 0000 6c76 001f020 3300 0000 000a 0003 0100 0000 2f28 0383 001f030 0000 0001 0000 0200 0000 2000 0000 0000 001f040 Note the correct magic value at 0x1f000. 5. Copy the secondary superblock to the primary superblock. An example command and output follows: # dd count=1 bs=4k skip=31 seek=1 if=/dev/lv02 of=/dev/lv02 dd: 1+0 records in. dd: 1+0 records out. Use the fsck command to clean up inconsistent files caused by using the secondary superblock. For example: # fsck /dev/lv02 2>&1 | tee /tmp/fsck.errs For more information The fsck and od command descriptions in AIX 5L Version 5.3 Commands Reference, Volume 4 AIX Logical Volume Manager from A to Z: Introduction and Concepts, an IBM Redbook AIX Logical Volume Manager from A to Z: Troubleshooting and Commands, an IBM Redbook "Boot Problems" in Problem Solving and Troubleshooting in AIX 5L, an IBM Redbook OR >>>>> Method 2: If you experience a dirty superblock, which causes a filesystem to be not mountable, you can use backup copy of superblock to copy it over the corrupted one. With little unix experience it can be a tough task, because the steps required are as follows: - boot from bootable media (install cd/tape, mksysb tape) - access rootvg before mounting fs - fsck -y on corrupted fs's - logform on logdevice - dd count=1 bs=4k skip=31 seek=1 if=/dev/ of=/dev/ ---------------------------------------------------------------------------------------- Note 1.3 : A superblock issue Works on OS : Solaris probable message : probably fsck gives you a message disks : local disks, most likely not SAN ---------------------------------------------------------------------------------------- >>>> Method 1: Boot from OK prompt to single user mode, for example from CDROM OK boot cdrom -sw Attempt to fsck(1M) boot disk. This could fail with a super block error. # fsck /dev/rdsk/device Find the locations of alternate super blocks. BE SURE TO USE AN UPPERCASE -N. For example: # newfs -N /dev/rdsk/c0t0d0s0 /dev/rdsk/c0t0d0s0: 2048960 sectors in 1348 cylinders of 19 tracks, 80 sectors 1000.5MB in 85 cyl groups (16 c/g, 11.88MB/g, 5696 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 24432, 48832, 73232, 97632, 122032, 146432, 170832, 195232, 219632, 244032, 268432, 292832, 317232, 341632, 366032, 390432, 414832, 439232, 463632, 488032, 512432, 536832, 561232, 585632, 610032, 634432, 658832, 683232, 707632, 732032, 756432, 778272, 802672, 827072, 851472, 875872, 900272, 924672, 949072, 973472, 997872, 1022272, 1290672, ... Using an alternate super block, run fsck(1M) on the disk. You might have to try more than one alternate super block to make this to work. Pick a couple from the beginning, the middle, and the end. # fsck -o b= /dev/rdsk/c0t0d0s0 The boot block is probably bad too. Restore it while you are booted from the CD-ROM. # /usr/sbin/installboot /usr/platform/architecture/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0 Reboot the operating environment. # reboot OR: >>>>> Method 2: #newfs -N /dev/rdsk/ (like c0t0d0s7) it will generate the identical superblock. then run....... #fsck -o b=535952 /dev/rdsk/ (like c0t0d0s7) OR: >>>>>>> Method 3: Restore a Bad Superblock (Solaris 8,9 and 10) February 25, 2008 by sun4u Become superuser or assume an equivalent role. Determine whether the bad superblock is in the root (/), /usr, or /var file system and select one of the following: If the bad superblock is in either the root (/), /usr, or /var file system, then boot from the network or a locally connected CD. From a locally-connected CD, use the following command: ok boot cdrom -s From the network where a boot or install server is already setup, use the following command: ok boot net -s If the bad superblock is not in either the root (/), /usr, /var file system, change to a directory outside the damaged file system and unmount the file system. # umount /mount-point Caution - Be sure to use the newfs -N in the next step. If you omit the -N option, you will destroy all of the data in the file system and replace it with an empty file system. Display the superblock values by using the newfs -N command. # newfs -N /dev/rdsk/device-name Provide an alternate superblock by using the fsck command. # fsck-F ufs -o b=block-number /dev/rdsk/device-name The fsck command uses the alternate superblock you specify to restore the primary superblock. You can always try 32 as an alternate block. Or, use any of the alternate blocks shown by the newfs -N command. Restoring a Bad Superblock (Solaris 8, 9, and 10 Releases) The following example shows how to restore the superblock copy 5264. # newfs -N /dev/rdsk/c0t3d0s7 /dev/rdsk/c0t3d0s7: 163944 sectors in 506 cylinders of 9 tracks, 36 sectors 83.9MB in 32 cyl groups (16 c/g, 2.65MB/g, 1216 i/g) super-block backups (for fsck -b #) at: 32, 5264, 10496, 15728, 20960, 26192, 31424, 36656, 41888, 47120, 52352, 57584, 62816, 68048, 73280, 78512, 82976, 88208, 93440, 98672, 103904, 109136, 114368, 119600, 124832, 130064, 135296, 140528, 145760, 150992, 156224, 161456, # fsck-F ufs -o b=5264 /dev/rdsk/c0t3d0s7 Alternate superblock location: 5264. ** /dev/rdsk/c0t3d0s7 ** Last Mounted on ** Phase 1- Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 36 files, 867 used, 75712 free (16 frags, 9462 blocks, 0.0% fragmentation) ***** FILE SYSTEM WAS MODIFIED ***** # ---------------------------------------------------------------------------------------- Note 1.4 : A superblock issue Works on OS : Linux ext2 filesystem probable message : probably fsck gives you a message disks : local disks, most likely not SAN ---------------------------------------------------------------------------------------- DAMAGED SUPERBLOCK If a filesystem check fails and returns the error message "Damaged Superblock" you're lost . . . . . . . or not ? Well, not really, the damaged "superblock" can be restored from a backup. There are several backups stored on the harddisk. But let me first have a go at explaining what a "superblock"is. A superblock is located at position 0 of every partition, contains vital information about the filesystem and is needed at a filesystem check. The information stored in the superblock are about what sort of fiesystem is used, the I-Node counts, block counts, free blocks and I-Nodes, the numer of times the filesystem was mounted, date of the last filesystem check and the first I-Node where / is located. Thus, a damaged superblock means that the filesystem check will fail. Our luck is that there are backups of the superblock located on several positions and we can restore them with a simple command. The usual ( and only ) positions are: 8193, 32768, 98304, 163840, 229376 and 294912. ( 8193 in many cases only on older systems, 32768 is the most current position for the first backup ) You can check this out and have a lot more info about a particular partition you have on your HD by: # dumpe2fs /dev/hda5 You will see that the primary superblock is located at position 0, and the first backup on position 32768. O.K. let's get serious now, suppose you get a "Damaged Superblock" error message at filesystem check ( after a power failure ) and you get a root-prompt in a recovery console, then you give the command: # e2fsck -b 32768 /dev/hda5 don't try this on a mounted filesystem It will then check the filesystem with the information stored in that backup superblock and if the check was successful it will restore the backup to position 0. Now imagine the backup at position 32768 was damaged too . . . then you just try again with the backup stored at position 98304, and 163840, and 229376 etc. etc. until you find an undamaged backup ( there are five backups so if at least one of those five is okay it's bingo ! ) So next time don't panic . . just get the paper where you printed out this Tip and give the magic command # e2fsck -b 32768 /dev/hda5 ---------------------------------------------------------------------------------------- Note 1.5 : Root filesystem full or nearly full Works on OS : most unixes ---------------------------------------------------------------------------------------- Always take care that the "/" root filesystem does not get near 100% full. Potential problems 1. Some systems will not boot anymore in the normal multi-user way 2. On many systems new logons are not possible anymore 3. Some apps write or create unamed pipes "somewhere" in the root fs: they may stall or even crash Remarks on 2: This is caused by a full file system and the system has no space to write its utmpx (login info) entry. To get around this condition the system must be booted up into single user mode, or you may need to boot from CDROM or from network etc.. Then you might be able to clear logfiles under /var/.. Or just increase the / filesystem with some additional space. ############################################################## SECTION 9: GENERIC: HOW TO REMOVE A WEIRD FILE: ############################################################## ---------------------------------------------------------------------------------------- Note 2.1 : You cannot rm a file in the "normal" way, or How to Delete or Remove Files With Inode Number Works on OS : all unix ---------------------------------------------------------------------------------------- >>>>>> Question: How can I remove a bizarre, irremovable file from a directory? I've tried every way of using /bin/rm and nothing works." >>>>>> Answer: In some rare cases a strangely-named file will show itself in your directory and appear to be un-removable with the rm command. Here is will the use of ls -li and find with its -inum [inode] primary does the job. Let's say that ls -l shows your irremovable as -rw------- 1 smith smith 0 Feb 1 09:22 ?*?*P Type: ls -li to get the index node, or inode. 153805 -rw------- 1 smith smith 0 Feb 1 09:22 ?*?^P The inode for this file is 153805. Use find -inum [inode] to make sure that the file is correctly identified. % find -inum 153805 -print ./?*?*P Here, we see that it is. Then used the -exec functionality to do the remove. . % find . -inum 153805 -print -exec /bin/rm {} \; Note that if this strangely named file were not of zero-length, it might contain accidentally misplaced and wanted data. Then you might want to determine what kind of data the file contains and move the file to some temporary directory for further investigation, for example: % find . -inum 153805 -print -exec /bin/mv {} unknown.file \; Will rename the file to unknown.file, so you can easily inspect it. Another way to remove strangely-named files is to use "ls -q" or "cat -v" to show the special characters, and then use shell's globbing mechanism to delete the file. $ ls -????*'? $ ls | cat -v -^B^C?^?*' $ rm ./-'^B'* -- achieved by typing control-V control-B $ ls the argument given to rm is a judicious selection of glob wildcards (*'s) and sufficient control characters to uniquely identify the file. The leading "./" is useful when the file begins with a hyphen. These binary name files are caused by: * accidental cut-and-pastes to shell prompts - especially when you paste something of the form: "junk > garbage" because the shell creates the file "garbage" before trying to execute the command "junk" * filesystem corruption (in which case touching the filesystem any more can really stuff things up) If you discover that you have two files of the same name, one of the files probably has a bizarre (and unprintable) character in its name. Most probably, this unprintable character is a backspace. For example: $ ls filename filename $ ls -q filename fl?ilename $ ls | cat -v filename fl^Hilename ---------------------------------------------------------------------------------------- Note 2.2 : You cannot rm a file in the "normal" way, or How to Delete or Remove Files With Inode Number Works on OS : all unix Same problem as noted in note 2.1. ---------------------------------------------------------------------------------------- An inode identifies the file and its attributes such as file size, owner, and so on. A unique inode number within the file system identifies each inode. But, why to delete file by an inode number? Sure, you can use rm command to delete file. Sometime accidentally you creates filename with control characters or characters which are unable to be input on a keyboard or special character such as ?, * ^ etc. Removing such special character filenames can be problem. Use following method to delete a file with strange characters in its name: Please note that the procedure outlined below works with Solaris, FreeBSD, Linux, or any other Unixish oses out there: Find out file inode First find out file inode number with any one of the following command: stat {file-name} OR ls -il {file-name} Use find command to remove file: Use find command as follows to find and remove a file: find . -inum [inode-number] -exec rm -i {} \; When prompted for confirmation, press Y to confirm removal of the file. Let us try to delete file using inode number. (a) Create a hard to delete file name: $ cd /tmp $ touch "\+Xy \+\8" $ ls (b) Try to remove this file with rm command: $ rm \+Xy \+\8 (c) Remove file by an inode number, but first find out the file inode number: $ ls -ilOutput: 781956 drwx------ 3 viv viv 4096 2006-01-27 15:05 gconfd-viv 781964 drwx------ 2 viv viv 4096 2006-01-27 15:05 keyring-pKracm 782049 srwxr-xr-x 1 viv viv 0 2006-01-27 15:05 mapping-viv 781939 drwx------ 2 viv viv 4096 2006-01-27 15:31 orbit-viv 781922 drwx------ 2 viv viv 4096 2006-01-27 15:05 ssh-cnaOtj4013 781882 drwx------ 2 viv viv 4096 2006-01-27 15:05 ssh-SsCkUW4013 782263 -rw-r--r-- 1 viv viv 0 2006-01-27 15:49 \+Xy \+\8Note: 782263 is inode number. (d) Use find command to delete file by inode: Find and remove file using find command, type the command as follows: $ find . -inum 782263 -exec rm -i {} \; Note you can also use add \ character before special character in filename to remove it directly so the command would be: $ rm "\+Xy \+\8" If you have file like name like name "2005/12/31" then no UNIX or Linux command can delete this file by name. Only method to delete such file is delete file by an inode number. Linux or UNIX never allows creating filename like 2005/12/31 but if you are using NFS from MAC OS or Windows then it is possible to create a such file. OR read this thead: Become superuser or assume an equivalent role. Determine whether the bad superblock is in the root (/), /usr, or /var file system and select one of the following: If the bad superblock is in either the root (/), /usr, or /var file system, then boot from the network or a locally connected CD. From a locally-connected CD, use the following command: ok boot cdrom -s From the network where a boot or install server is already setup, use the following command: ok boot net -s If the bad superblock is not in either the root (/), /usr, /var file system, change to a directory outside the damaged file system and unmount the file system. # umount /mount-point Caution - Be sure to use the newfs -N in the next step. If you omit the -N option, you will destroy all of the data in the file system and replace it with an empty file system. Display the superblock values by using the newfs -N command. # newfs -N /dev/rdsk/device-name Provide an alternate superblock by using the fsck command. # fsck-F ufs -o b=block-number /dev/rdsk/device-name The fsck command uses the alternate superblock you specify to restore the primary superblock. You can always try 32 as an alternate block. Or, use any of the alternate blocks shown by the newfs -N command. Restoring a Bad Superblock (Solaris 8, 9, and 10 Releases) The following example shows how to restore the superblock copy 5264. # newfs -N /dev/rdsk/c0t3d0s7 /dev/rdsk/c0t3d0s7: 163944 sectors in 506 cylinders of 9 tracks, 36 sectors 83.9MB in 32 cyl groups (16 c/g, 2.65MB/g, 1216 i/g) super-block backups (for fsck -b #) at: 32, 5264, 10496, 15728, 20960, 26192, 31424, 36656, 41888, 47120, 52352, 57584, 62816, 68048, 73280, 78512, 82976, 88208, 93440, 98672, 103904, 109136, 114368, 119600, 124832, 130064, 135296, 140528, 145760, 150992, 156224, 161456, # fsck-F ufs -o b=5264 /dev/rdsk/c0t3d0s7 Alternate superblock location: 5264. ** /dev/rdsk/c0t3d0s7 ** Last Mounted on ** Phase 1- Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 36 files, 867 used, 75712 free (16 frags, 9462 blocks, 0.0% fragmentation) ***** FILE SYSTEM WAS MODIFIED ***** # ############################################################## SECTION 10: GENERIC: HINTS ON UNDELETE A FILE: ############################################################## --------------------------------------------------------------------------------------- Note 1: ---------------------------------------------------------------------------------------- http://www.cyberciti.biz/tips/linuxunix-recover-deleted-files.html Using grep (traditional UNIX way) to recover files Use following grep syntax: grep -b 'search-text' /dev/partition > file.txt OR grep -a -B[size before] -A[size after] 'text' /dev/[your_partition] > file.txt Where, -i : Ignore case distinctions in both the PATTERN and the input files i.e. match both uppercase and lowercase character. -a : Process a binary file as if it were text -B Print number lines/size of leading context before matching lines. -A: Print number lines/size of trailing context after matching lines. To recover text file starting with "nixCraft" word on /dev/sda1 you can try following command: # grep -i -a -B10 -A100 'nixCraft' /dev/sda1 > file.txt Next use vi to see file.txt. This method is ONLY useful if deleted file is text file. If you are using ext2 file system, try out recover command. . ---------------------------------------------------------------------------------------- Note 2: ---------------------------------------------------------------------------------------- Bring back deleted files with lsof By Michael Stutz on November 16, 2006 (8:00:00 AM) Briefly, a file as it appears somewhere on a Linux filesystem is actually just a link to an inode, which contains all of the file's properties, such as permissions and ownership, as well as the addresses of the data blocks where the file's content is stored on disk. When you rm a file, you're removing the link that points to its inode, but not the inode itself; other processes (such as your audio player) might still have it open. It's only after they're through and all links are removed that an inode and the data blocks it pointed to are made available for writing. This delay is your key to a quick and happy recovery: if a process still has the file open, the data's there somewhere, even though according to the directory listing the file already appears to be gone. This is where the Linux process pseudo-filesystem, the /proc directory, comes into play. Every process on the system has a directory here with its name on it, inside of which lies many things -- including an fd ("file descriptor") subdirectory containing links to all files that the process has open. Even if a file has been removed from the filesystem, a copy of the data will be right here: /proc/process id/fd/file descriptor To know where to go, you need to get the id of the process that has the file open, and the file descriptor. These you get with lsof, whose name means "list open files." (It actually does a whole lot more than this and is so useful that almost every system has it installed. If yours isn't one of them, you can grab the latest version straight from its author.) Once you get that information from lsof, you can just copy the data out of /proc and call it a day. This whole thing is best demonstrated with a live example. First, create a text file that you can delete and then bring back: $ man lsof | col -b > myfile Then have a look at the contents of the file that you just created: $ less myfile You should see a plaintext version of lsof's huge man page looking out at you, courtesy of less. Now press Ctrl-Z to suspend less. Back at a shell prompt make sure your file is still there: $ ls -l myfile -rw-r--r-- 1 jimbo jimbo 114383 Oct 31 16:14 myfile $ stat myfile File: `myfile' Size: 114383 Blocks: 232 IO Block: 4096 regular file Device: 341h/833d Inode: 1276722 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1010/ jimbo) Gid: ( 1010/ jimbo) Access: 2006-10-31 16:15:08.423715488 -0400 Modify: 2006-10-31 16:14:52.684417746 -0400 Change: 2006-10-31 16:14:52.684417746 -0400 Yup, it's there all right. OK, go ahead and oops it: $ rm myfile $ ls -l myfile ls: myfile: No such file or directory $ stat myfile stat: cannot stat `myfile': No such file or directory $ It's gone. At this point, you must not allow the process still using the file to exit, because once that happens, the file will really be gone and your troubles will intensify. Your background less process in this walkthrough isn't going anywhere (unless you kill the process or exit the shell), but if this were a video or sound file that you were playing, the first thing to do at the point where you realize you deleted the file would be to immediately pause the application playback, or otherwise freeze the process, so that it doesn't eventually stop playing the file and exit. Now to bring the file back. First see what lsof has to say about it: $ lsof | grep myfile less 4158 jimbo 4r REG 3,65 114383 1276722 /home/jimbo/myfile (deleted) The first column gives you the name of the command associated with the process, the second column is the process id, and the number in the fourth column is the file descriptor (the "r" means that it's a regular file). Now you know that process 4158 still has the file open, and you know the file descriptor, 4. That's everything you have to know to copy it out of /proc. You might think that using the -a flag with cp is the right thing to do here, since you're restoring the file -- but it's actually important that you don't do that. Otherwise, instead of copying the literal data contained in the file, you'll be copying a now-broken symbolic link to the file as it once was listed in its original directory: $ ls -l /proc/4158/fd/4 lr-x------ 1 jimbo jimbo 64 Oct 31 16:18 /proc/4158/fd/4 -> /home/jimbo/myfile (deleted) $ cp -a /proc/4158/fd/4 myfile.wrong $ ls -l myfile.wrong lrwxr-xr-x 1 jimbo jimbo 24 Oct 31 16:22 myfile.wrong -> /home/jimbo/myfile (deleted) $ file myfile.wrong myfile.wrong: broken symbolic link to `/home/jimbo/myfile (deleted)' $ file /proc/4158/fd/4 /proc/4158/fd/4: broken symbolic link to `/home/jimbo/myfile (deleted)' So instead of all that, just a plain old cp will do the trick: $ cp /proc/4158/fd/4 myfile.saved And finally, verify that you've done good: $ ls -l myfile.saved -rw-r--r-- 1 jimbo jimbo 114383 Oct 31 16:25 myfile.saved $ man lsof | col -b > myfile.new $ cmp myfile.saved myfile.new No complaints from cmp -- your restoration is the real deal. Incidentally, there are a lot of useful things you can do with lsof in addition to rescuing lost files. ---------------------------------------------------------------------------------------- Note 3: ---------------------------------------------------------------------------------------- Recover Deleted Files Files on Unix may be deleted, but still held open by another process. While most Unix would require a utility to read a file by the filesystem and inode(5) number, the special /proc filesystem on Linux allows the recovery of deleted but held open files: Use lsof(1) to discover the deleted file, and record the Process ID (PID) and File Descriptor (FD) open to this file. Recover the file: cp /proc/$PID/fd/$FD /var/tmp/recovered The deleted file should appear as a broken symbolic link under the /proc/$PID/fd directory. Despite this, /proc still allows the file to be copied elsewhere. For related information, see how to debug Unix systems. ---------------------------------------------------------------------------------------- Note 4: ---------------------------------------------------------------------------------------- HOWTO recover deleted files on an Linux ext3 file system Please see: http://www.xs4all.nl/~carlo17/howto/undelete_ext3.html Or see Tom Pycke, Recovering Files in Linux, available at www.recover.source.net/linux For Linux ext2 file system: 1. R-Linux undelete utility: Take a look here: http://3d2f.com/tags/undelete/recover/unix/ 2. The ext2 file system has an addon program called e2undel[1] which allows file undeletion, although the similar ext3 file system does not support that kind of undeletion. 3. Also, mabe the following "unrm" can be of help on Linux: http://freshmeat.net/projects/unrm/ Another "unrm" pointer: http://staff.washington.edu/dittrich/talks/blackhat/tct/man/man1/unrm.1.html ---------------------------------------------------------------------------------------- Note 5: ---------------------------------------------------------------------------------------- Possible AIX undelete tool: http://www.compunix.com/products.html http://www.compunix.com/prod/analyse.html http://www.compunix.com/eval/list.html For AIX and JFS: http://www.phase2.net/2008/03/04/aix-recovering-a-deleted-file-undelete/ When you are really good with the fsdb tool (included in AIX), you might be able to recover files yourself. See another note in this document for an example of using fsdb. See man page for fsdb or http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds2/fsdb.htm ---------------------------------------------------------------------------------------- Note 6: ---------------------------------------------------------------------------------------- 1. Solaris Recovery: -- Kernel Recovery for Solaris Sparc Kernel Recovery for Solaris Sparc is a do-it-yourself data recovery software. Software performs read-only scan, which helps you to recover your important data in minutes. File System supported for recovery is UFS File system. http://www.download.com/Kernel-Recovery-for-Solaris-Sparc/3000-2248_4-10578170.html http://www.download3k.com/Press-Launch-of-Kernel-Recovery-for-Solaris-SPARC.html http://www.tucows.com/preview/505583 http://www.programurl.com/kernel-recovery-for-solaris-sparc.htm Nucleus Technologies.com: http://www.nucleustechnologies.com -- Other Solaris Data Recovery Software: http://solaris-data-recovery-software.qarchive.org/ 2. R-Tools technology: Undelete tool for Linux and Solaris: http://www.data-recovery-software.net/ ---------------------------------------------------------------------------------------- Note 7: ---------------------------------------------------------------------------------------- For AIX and JFS filesystem: an undelete program Not tested by writer of this document: /***************************************************************************** * rsb.c - Read Super Block. Allows a jfs superblock to be dumped, inode * table to be listed or specific inodes data pointers to be chased and * dumped to standard out (undelete). * * Phil Gibbs - Trinem Consulting (pgibbs@trinem.co.uk) ****************************************************************************/ #include #include #include #include #include #include #include #include #define FOUR_MB (1024*1024*4) #define THIRTY_TWO_KB (1024*32) extern int optind; extern int Optopt; extern int Opterr; extern char *optarg; void PrintSep() { int k=80; while (k) { putchar('-'); k--; } putchar('\n'); } char *UserName(uid_t uid) { char replystr[10]; struct passwd *res; res=getpwuid(uid); if (res->pw_name[0]) { return res->pw_name; } else { sprintf(replystr,"%d",uid); return replystr; } } char *GroupName(gid_t gid) { struct group *res; res=getgrgid(gid); return res->gr_name; } ulong NumberOfInodes(struct superblock *sb) { ulong MaxInodes; ulong TotalFrags; if (sb->s_version==fsv3pvers) { TotalFrags=(sb->s_fsize*512)/sb->s_fragsize; MaxInodes=(TotalFrags/sb->s_agsize)*sb->s_iagsize; } else { MaxInodes=(sb->s_fsize*512)/sb->s_bsize; } return MaxInodes; } void AnalyseSuperBlock(struct superblock *sb) { ulong TotalFrags; PrintSep(); printf("SuperBlock Details:\n-------------------\n"); printf("File system size: %ld x 512 bytes (%ld Mb)\n", sb->s_fsize, (sb->s_fsize*512)/(1024*1024)); printf("Block size: %d bytes\n",sb->s_bsize); printf("Flags: "); switch (sb->s_fmod) { case (char)FM_CLEAN: break; case (char)FM_MOUNT: printf("mounted "); break; case (char)FM_MDIRTY: printf("mounted dirty "); break; case (char)FM_LOGREDO: printf("log redo failed "); break; default: printf("Unknown flag "); break; } if (sb->s_ronly) printf("(read-only)"); printf("\n"); printf("Last SB update at: %s",ctime(&(sb->s_time))); printf("Version: %s\n", sb->s_version?"1 - fsv3pvers":"0 - fsv3vers"); printf("\n"); if (sb->s_version==fsv3pvers) { TotalFrags=(sb->s_fsize*512)/sb->s_fragsize; printf("Fragment size: %5d ",sb->s_fragsize); printf("inodes per alloc: %8d\n",sb->s_iagsize); printf("Frags per alloc: %5d ",sb->s_agsize); printf("Total Fragments: %8d\n",TotalFrags); printf("Total Alloc Grps: %5d ", TotalFrags/sb->s_agsize); printf("Max inodes: %8ld\n",NumberOfInodes(sb)); } else { printf("Total Alloc Grps: %5d ", (sb->s_fsize*512)/sb->s_agsize); printf("inodes per alloc: %8d\n",sb->s_agsize); printf("Max inodes: %8ld\n",NumberOfInodes(sb)); } PrintSep(); } void ReadInode( FILE *in, ulong StartInum, struct dinode *inode, ulong InodesPerAllocBlock, ulong AllocBlockSize) { off_t SeekPoint; long BlockNumber; int OffsetInBlock; static struct dinode I_NODES[PAGESIZE/DILENGTH]; ulong AllocBlock; ulong inum; static off_t LastSeekPoint=-1; AllocBlock=(StartInum/InodesPerAllocBlock); BlockNumber=(StartInum-(AllocBlock*InodesPerAllocBlock))/ (PAGESIZE/DILENGTH); OffsetInBlock=(StartInum-(AllocBlock*InodesPerAllocBlock))- (BlockNumber*(PAGESIZE/DILENGTH)); SeekPoint=(AllocBlock)? (BlockNumber*PAGESIZE)+(AllocBlock*AllocBlockSize): (BlockNumber*PAGESIZE)+(INODES_B*PAGESIZE); if (SeekPoint!=LastSeekPoint) { sync(); fseek(in,SeekPoint,SEEK_SET); fread(I_NODES,PAGESIZE,1,in); LastSeekPoint=SeekPoint; } *inode=I_NODES[OffsetInBlock]; } void DumpInodeContents( long inode, FILE *in, ulong InodesPerAllocBlock, ulong AllocBlockSize, ulong Mask, ulong Multiplier) { struct dinode DiskInode; ulong SeekPoint; char Buffer[4096]; ulong FileSize; int k; int BytesToRead; ulong *DiskPointers; int NumPtrs; ReadInode( in, inode, &DiskInode, InodesPerAllocBlock, AllocBlockSize); FileSize=DiskInode.di_size; if (FileSize>FOUR_MB) { /* Double indirect mapping */ } else if (FileSize>THIRTY_TWO_KB) { /* Indirect mapping */ SeekPoint=DiskInode.di_rindirect & Mask; SeekPoint=SeekPoint*Multiplier; DiskPointers=(ulong *)malloc(1024*sizeof(ulong)); fseek(in,SeekPoint,SEEK_SET); fread(DiskPointers,1024*sizeof(ulong),1,in); NumPtrs=1024; } else { /* Direct Mapping */ DiskPointers=&(DiskInode.di_rdaddr[0]); NumPtrs=8; } for (k=0;k<=NumPtrs && FileSize;k++) { SeekPoint=(DiskPointers[k] & Mask); SeekPoint=SeekPoint*Multiplier; BytesToRead=(FileSize>sizeof(Buffer))?sizeof(Buffer):FileSize; fseek(in,SeekPoint,SEEK_SET); fread(Buffer,BytesToRead,1,in); FileSize=FileSize-BytesToRead; write(1,Buffer,BytesToRead); } } void DumpInodeList( FILE *in, ulong MaxInodes, ulong InodesPerAllocBlock, ulong AllocBlockSize) { long inode; struct dinode DiskInode; struct tm *TimeStruct; printf(" Inode Links User Group Size ModDate\n"); printf("-------- ----- -------- -------- -------- -------\n"); for (inode=0;inode<=MaxInodes;inode++) { ReadInode( in, inode, &DiskInode, InodesPerAllocBlock, AllocBlockSize); if (DiskInode.di_mtime) { TimeStruct=localtime((long *)&DiskInode.di_mtime); printf("%8d %5d %8s %8s %8d %02d/%02d/%4d\n", inode, DiskInode.di_nlink, UserName(DiskInode.di_uid), GroupName(DiskInode.di_gid), DiskInode.di_size, TimeStruct->tm_mday, TimeStruct->tm_mon, TimeStruct->tm_year+1900); } } } void ExitWithUsageMessage() { fprintf(stderr,"USAGE: rsb [-i inode] [-d] [-s] \n"); exit(1); } main(int argc,char **argv) { FILE *in; struct superblock SuperBlock; short Valid; long inode=0; struct dinode DiskInode; ulong AllocBlockSize; ulong InodesPerAllocBlock; ulong MaxInodes; ulong Mask; ulong Multiplier; int option; int DumpSuperBlockFlag=0; int DumpFlag=0; while ((option=getopt(argc,argv,"i:ds")) != EOF) { switch(option) { case 'i': /* Inode specified */ inode=atol(optarg); break; case 'd': /* Dump flag */ DumpFlag=1; break; case 's': /* List Superblock flag */ DumpSuperBlockFlag=1; break; default: break; } } if (strlen(argv[optind])) in=fopen(argv[optind],"r"); else ExitWithUsageMessage(); if (in) { fseek(in,SUPER_B*PAGESIZE,SEEK_SET); fread(&SuperBlock,sizeof(SuperBlock),1,in); switch (SuperBlock.s_version) { case fsv3pvers: Valid=!strncmp(SuperBlock.s_magic,fsv3pmagic,4); InodesPerAllocBlock=SuperBlock.s_iagsize; AllocBlockSize= SuperBlock.s_fragsize*SuperBlock.s_agsize; Multiplier=SuperBlock.s_fragsize; Mask=0x3ffffff; break; case fsv3vers: Valid=!strncmp(SuperBlock.s_magic,fsv3magic,4); InodesPerAllocBlock=SuperBlock.s_agsize; AllocBlockSize=SuperBlock.s_agsize*PAGESIZE; Multiplier=SuperBlock.s_bsize; Mask=0xfffffff; break; default: Valid=0; break; } if (Valid) { if (DumpSuperBlockFlag==1) { AnalyseSuperBlock(&SuperBlock); } MaxInodes=NumberOfInodes(&SuperBlock); if (DumpFlag==1) { if (inode) DumpInodeContents(inode,in,InodesPerAllocBlock,AllocBlockSize,Mask,Multiplier); else DumpInodeList(in,MaxInodes,InodesPerAllocBlock,AllocBlockSize); } } else { fprintf(stderr,"Superblock - bad magic number\n"); exit(1); } } else { fprintf(stderr,"couldn't open "); perror(argv[optind]); exit(1); } } ---------------------------------------------------------------------------------------- Note 8: ---------------------------------------------------------------------------------------- http://wiki.yak.net/592 HOWTO rescue deleted Linux files | undelete | unremove | unrm | rm -v Here's how we rescued a LaTeX *.tex file that was accidentally removed on a Linux box. Stop doing anything else on the system. The idea is to use the disk as little as possible. (We stopped short of killing idle daemons, because we didn't want them scribbling stuff in log files. ) Know the first few bytes of the file you want. Hopefully they are fairly unique. The LaTeX document we wanted began with the characters "\document", so we used that pattern. Write a program that will read each sector from the raw partition (you must be root) (assuming 512 byte sectors is safest) and see if it begins with the pattern. If not, it loops and reads the next 512 bytes... If it finds it, it saves that sector and some fixed amount of following sectors (we did 600 more sectors, which is 300 KBytes) in a rescue file. Save probably twice as long a file as you think you're looking for. Save them to an extra partition -- or invoke "scp" or something to save them on another machine. (Usually ext2 & ext3 store files contiguously on disk -- especially if they are not too big & are written all at once.) The following TCL script did the job. Make it open the exact partition you want to scan. It needs another partition to write the rescue files to. grope.tcl # # This is in the language Tcl. # Usage: # tclsh scriptname < /dev/hda1 (the partition with the deleted file) # # Notice: change the MOUNT below to a different partition! # # Also fix the "string match" pattern -- we used \document for a LaTeX document. # # Occasinally sector numbers are written out, to indicate progress. # ( 1 sector == 512 bytes == 0.5KBytes ) set i 0 set n 0 fconfigure stdin -translation binary -encoding binary while true { set x [read stdin 512 ] if {$x==""} break if {[string match {\\document*} $x ]} { incr i puts stderr "SAVING $i" set f [open /WRITABLE_MOUNT_TO_SAVE_FILES_IN_GOES_HERE/rescue.$i w] fconfigure $f -translation binary -encoding binary puts -nonewline $f $x puts -nonewline $f [read stdin [expr 600*512] ] close $f } incr n if { ($n % 200000)==0 } { puts -nonewline stderr $n. } } Use "less" to examine the rescue files to see if you can find your data. Also the "strings" command is very good about extracting ASCII text portions. Even better, if you have physical access to the machine, shut down the system IMMEDIATELY and physically install its disk as an extra drive in another unix box. Do your scanning of the raw disk from there. (In our recent case, we didn't have access to this box.) Or boot a KNOPPIX CD (which will not write to any partitions unless you specifically mount them writeable from a root shell.) I've also used this kind of technique to rescue JPEG files from a digital camera's Compact Flash with a corrupted FAT file system. We wrote a program that started a new rescue file every time it found "JFIF" as the first 4 bytes of a sector, even if it was still saving the previous rescue file. We completely rescued about 3/4 of the images this way, and fragments of more. Obviously the data you are rescuing must be important enough to warrent this much trouble with no guarentee of successfull results. Your file could always have been overwritten, or it could be fragmented so you don't find the pieces. But the couple of times I've had to do this (for someone else's data!) we've had pretty good success. ---------------------------------------------------------------------------------------- Note 9: special case: text file edited with vi ---------------------------------------------------------------------------------------- If the file that was deleted, was a text file, and recently edited by vi, then there still might be a version available on your system. On most unix systems, vi keep tracks of former versions. Check /var/preserve/username (or similar directory: vi -r ) or a similar directory, depending on the unix version, where there still might exist a recent version of your text file. ---------------------------------------------------------------------------------------- Note 10: ---------------------------------------------------------------------------------------- Subject: Undelete of a file on AIX, using fsdb. Remark : Quite an elaborate procedure but it seems to work for small files. Important: Be carefull in using fsdb. Document: http://www.phase2.net/2008/03/04/aix-recovering-a-deleted-file-undelete/ -- Contents repeated here: This is a document I wrote a while back for work that I thought I would release in hopes that some people out there would find it useful. Preferably, you have a backup of the file system that you can use. If not, the filesystem you are about to try to to recover a file on must meet these requirements: No new files have been created on the filesystem. No files have been extended. The filesystem is able to be unmounted. It is a JFS filesystem, not JFS2 If so, then please, drink a few more beers and continue, but before you do. BACKUP THE CURRENT FILESYSTEM! Also, note that if you are dealing with a directory that has been deleted and would like to recover both the directory and the files under that directory, you should try Recovering a Deleted Directory ( a document I have yet to post.. ). It follows many of the same steps, but has some very important differences. Do not try and use this procedure to recover deleted directories and the files that were contained within them. You will mess up. Before we begin, I need to note a few things. I take no responsibility if this screws up your system. Use this at your own risk. Also, the example presented here is an actual representation of me recovering a deleted file, this is not just made up numbers. Also, this only works on jfs filesystems, not jfs2. The jfs2 fsdb is much different and I haven't had a chance to play with it to determine the proper way of doing this. Now that I've said that, we can begin. We'll use an example directory with some example files. Our directory is called /test and our filesystem is testlv, otherwise known as /dev/testlv. In our example, our Junior System Admin, Myron, has accidentally deleted a perl script called testfile.pl and needs to recover it. Note: If you are performing this operation on a filesystem while in maintenance mode, do NOT use option 1 when asked on how to mount the filesystems. ALWAYS use option 2, which specifies to start a shell before mounting the filesystems. Otherwise, the system will force a fsck -y on the filesystem and delete your files. Step 1. First, run this command: ls -id /testOutput: [test:/]# ls -id /test 2 /test/ This informs us that the inode for the directory /test is 2. Record this for future use. Step 2. Unmount /test umount /test Output: None We must unmount the directory. We don't want anyone to try and use it while we are attempting to restore the file. Step 3 Now we'll start up the filesystem debugger. fsdb /dev/testlv Output: [test:/]# fsdb /dev/testlv File System: /dev/testlv File System Size: 193200128 (512 byte blocks) Disk Map Size: 1660 (4K blocks) Inode Map Size: 831 (4K blocks) Fragment Size: 4096 (bytes) Allocation Group Size: 16384 (fragments) Inodes per Allocation Group: 8192 Total Inodes: 12075008 Total Fragments: 24150016 This starts the filesystem debugger on our testlv filesystem. Step 4 Now we look at our inode number. 2i Output: 2i i#: 2 md: d-g-rwxr-xr-x ln: 4 uid: 3 gid: 3 szh: 0 szl: 512 (actual size: 512) a0: 0x25d a1: 0x00 a2: 0x00 a3: 0x00 a4: 0x00 a5: 0x00 a6: 0x00 a7: 0x00 at: Mon Jan 10 11:19:17 2005 mt: Mon Jan 10 11:11:26 2005 ct: Mon Jan 10 11:11:26 2005 The INODE in the command is the inode number we recorded in step #1. This will display the inode information for the directory. The field a0 contains the block number of the directory. The following steps assume only field a0 is used. If a value appears in a1, etc, it may be necessary to repeat steps #5 and #6 for each block until the file to be recovered is found. Step 5 Move to the block a0b Output: a0b 0x000025d000 : 0x00000000 (0) This moves to the block pointed to by field "a0? of this inode. Step 6 Now we need to print out some data. p256c Output: p256c 0x000025d000: \0 \0 \0 \? \0 \? \0 \? . \0 \0 \0 \0 \0 \0 \? 0x000025d010: \0 \? \0 \? . . \0 \0 \0 \0 \0 \? \0 \? \0 \n 0x000025d020: l o s t + f o u n d \0 \0 \0 \0 \0 \? 0x000025d030: \0 $ \0 \? m e m _ r e p o r t _ 2 0x000025d040: 0 0 4 1 1 0 1 . d m p . g z \0 \0 0x000025d050: \0 \0 \0 \? \0 \s \0 \? o r a s c r a t 0x000025d060: c h . c p i o . g z \0 \0 \0 \0 \0 \? 0x000025d070: \0 ( \0 \s u s e r _ a c t i v i t 0x000025d080: y _ 2 0 0 4 1 1 0 1 . d m p . g 0x000025d090: z \0 \0 \0 \0 \0 \0 \? \0 , \0 ! u s e r 0x000025d0a0: _ a c t i v i t y _ d e t _ 2 0 0x000025d0b0: 0 4 1 1 0 1 . d m p . g z \0 \0 \0 0x000025d0c0: \0 \? ` \0 \? @ \0 \? E C R 1 X \0 \0 \0 0x000025d0d0: \0 \0 \0 \? \? 0 \0 \? t e s t f i l e 0x000025d0e0: . p l \0 \? \0 \a t e s t d i r \0 0x000025d0f0: j d u c k o . t x t \0 \0 \0 \0 \0 \? The command p256c stands for `print 256 bytes in character mode'. You could type `p128c' and it would print 128 bytes in character mode and so on. The beginning left column is the address of the first character in that row. The important thing in this output is to find which line the file to be recovered is on. Our file ( testfile.pl ) is located on line 0x000025d0d0. Next, we have to find the address of the first character of our filename. To do this, starting at 0, count in hexidecimal until you reach the first character of the filename. In our example, the `t' of testfile.pl is at address 0x000025d0d8. Record this address. If you cannot find your filename here, issue the command again. It will print the next 256 bytes in character mode. Do this until you find your filename. Here's a layout to help you in figuring out how we got the address: Address: 0 1 2 3 4 5 6 7 8 9 A B C D E F 0x000025d0d0: \0 \0 \0 \? \? 0 \0 \? t e s t f i l eStep 7 Reset our position. a0b Output: a0b 0x000025d000 : 0x00000000 (0) This resets our position back to the beginning of the a0 block. This is necessary whenever you want to reprint out the byte data. Remember, however, that if you had to use the `p' command many times to find your filename, you will probably have to use it many times each time you reset back to the beginning. Step 8 Print our data in decimal p256e Output: p256e 0x000025d000: 0 2 12 1 11776 0 0 2 0x000025d010: 12 2 11822 0 0 16 20 10 0x000025d020: 27759 29556 11110 28533 28260 0 0 17 0x000025d030: 36 26 28005 27999 29285 28783 29300 24370 0x000025d040: 12336 13361 12592 12590 25709 28718 26490 0 0x000025d050: 0 18 28 18 28530 24947 25458 24948 0x000025d060: 25448 11875 28777 28462 26490 0 0 19 0x000025d070: 40 29 30067 25970 24417 25460 26998 26996 0x000025d080: 31071 12848 12340 12593 12337 11876 28016 11879 0x000025d090: 31232 0 0 20 44 33 30067 25970 0x000025d0a0: 24417 25460 26998 26996 31071 25701 29791 12848 0x000025d0b0: 12340 12593 12337 11876 28016 11879 31232 0 0x000025d0c0: 18 24576 320 5 17731 21041 22528 0 0x000025d0d0: 0 21 304 11 29797 29556 26217 27749 0x000025d0e0: 11888 27648 288 7 29797 29556 25705 29184 0x000025d0f0: 27236 30051 27503 11892 30836 0 0 23 0x000025d100: 260 16 27233 28005 29549 24947 29537 29281 0x000025d110: 11892 30836 0 0 0 0 0 0 0x000025d120: 0 0 0 0 0 0 0 0 0x000025d130: 0 0 0 0 0 0 0 0 0x000025d140: 0 0 0 0 0 0 0 0 The command `p256e' stands for `print 256 bytes in decimal word format'. This output can be helpful and confusing at the same time. First, find the beginning address that our file name is on. In our example, this was 0x000025d0d0. The line in decimal format reads: 0x000025d0d0: 0 21 304 11 29797 29556 26217 27749 For each file, assume the following: {ADDRESS}: x x x x x x x x x | | | | |---- filename -----| inode # --+----+ | | | +-- filename length record LENGTH --+ Note that the inode # may begin on any part of the line. The reason we print the data in decimal format is to help us determine where in the line the inode number is. There are several ways to help you do this, here are some: Count the number of characters in your filename, then try and find that number in our address line. ( eg: There are 11 characters in the filename `testfile.pl'. ) You can see on our line there is a matching number 11. Recount to the address 0x000025d0d8, assuming each column represents two numbers. The first column is 0 and 1. The second column is 2 and 3, then 4 and 5, etc. When you reach the column that matches your address, go back one column. The number in this column should match up with your filename length. Unless, of course, your filename is over 255 characters. Once you are sure you have the the correct column for your filename length, you are going to count back three more columns. This should put at the first column of the inode number. We'll use our example decimal line to explain this more: 0x000025d0d0: 0 21 304 11 29797 29556 26217 27749 Like we mentioned before, testfile.pl is 11 characters. We find a matching number 11 in the 4th column. That means that the column with `304' is our record length field and the 0 and 21 columns make up our inode. Now, that we know which columns our inode is in ( columns 1 and 2 ), we must translate this number into our real inode number. Step 9 Reset our position again. a0b Output: a0b 0x000025d000 : 0x00000000 (0) Again, we have to reset our position back to the beginning because this time, we're going to print the information in hex. Step 10 Print our data in hex. p256x Output: p256x 0x000025d000: 0000 0002 000C 0001 2E00 0000 0000 0002 0x000025d010: 000C 0002 2E2E 0000 0000 0010 0014 000A 0x000025d020: 6C6F 7374 2B66 6F75 6E64 0000 0000 0011 0x000025d030: 0024 001A 6D65 6D5F 7265 706F 7274 5F32 0x000025d040: 3030 3431 3130 312E 646D 702E 677A 0000 0x000025d050: 0000 0012 001C 0012 6F72 6173 6372 6174 0x000025d060: 6368 2E63 7069 6F2E 677A 0000 0000 0013 0x000025d070: 0028 001D 7573 6572 5F61 6374 6976 6974 0x000025d080: 795F 3230 3034 3131 3031 2E64 6D70 2E67 0x000025d090: 7A00 0000 0000 0014 002C 0021 7573 6572 0x000025d0a0: 5F61 6374 6976 6974 795F 6465 745F 3230 0x000025d0b0: 3034 3131 3031 2E64 6D70 2E67 7A00 0000 0x000025d0c0: 0012 6000 0140 0005 4543 5231 5800 0000 0x000025d0d0: 0000 0015 0130 000B 7465 7374 6669 6C65 0x000025d0e0: 2E70 6C00 0120 0007 7465 7374 6469 7200 0x000025d0f0: 6A64 7563 6B6F 2E74 7874 0000 0000 0017 0x000025d100: 0104 0010 6A61 6D65 736D 6173 7361 7261 0x000025d110: 2E74 7874 0000 0000 0000 0000 0000 0000 0x000025d120: 0000 0000 0000 0000 0000 0000 0000 0000 0x000025d130: 0000 0000 0000 0000 0000 0000 0000 0000 0x000025d140: 0000 0000 0000 0000 0000 0000 0000 0000 First, we find the line that begins with our address 0x000025d0d0. There it is! 0x000025d0d0: 0000 0015 0130 000B 7465 7374 6669 6C65 Next, find the two columns that we know our inode is in. For us, that's column 1 and 2. Column 1 is all 0's, so we can disregard it. Column 2, however, is 0015. Open up a calculator and translate 15 from hexidecimal to decimal. As you can see, this number turns into 21, which is our real inode number. Some of you may be asking why we just didn't use the inode number from the decimal output in step 8. The reason is because it always isn't always this easy. Take, for example, the address above ours. The directory ECR1X is on this address. Its inode number, like ours, is in columns 1 and 2. However, if you compare the lines between hexidecimal and decimal, you can immediately see the difference. Decimal: 0x000025d0c0: 18 24576 Hex: 0x000025d0c0: 0012 6000 If you translate 12600 from hexidecimal to decimal, the output is 1204224, which is the correct inode number for the ECR1X directory. If you can figure out how to translate 18 24576 into 1204224, please let me know and I'll update this document. In any case, we now know the inode number of the missing file. We're close to recovery! Step 11 We go to our new inode number 21i Output: 21i i#: 21 md: f---rw-r--r-- ln: 0 uid: 0 gid: 3 szh: 0 szl: 45 (actual size: 45) a0: 0xeff a1: 0x00 a2: 0x00 a3: 0x00 a4: 0x00 a5: 0x00 a6: 0x00 a7: 0x00 at: Mon Jan 10 14:16:40 2005 mt: Mon Jan 10 14:16:48 2005 ct: Mon Jan 10 14:16:53 2005 From this output, you can see that we have a file. Step 12 21i.ln=1 Output: 21i.ln=1 0x0000020a88 : 0x00000001 (1) This sets the link count of the file back to 1. You can verify this by reissuing the command from step #11 and noticing that the `ln' field has incremented. 21i i#: 21 md: f---rw-r--r-- ln: 1 uid: 0 gid: 3 szh: 0 szl: 45 (actual size: 45) a0: 0xeff a1: 0x00 a2: 0x00 a3: 0x00 a4: 0x00 a5: 0x00 a6: 0x00 a7: 0x00 at: Mon Jan 10 14:16:40 2005 mt: Mon Jan 10 14:16:48 2005 ct: Mon Jan 10 14:16:53 2005 We have now told the filesystem that the link count for inode 21 should be 1. This means that there should be a filename pointing at this inode. This basically reverses what the OS actually does when deleting files. It doesn't actually erase the file data, instead, it unlinks the filename from its inode number, effectively preventing you from seeing the data. Step 13 Quit. q Output: q [test:/]# This quits out of the fsdb. Step 14 Fsck our volume fsck /dev/testlv Output: [test:/]# fsck /dev/testlv ** Checking /dev/rtestlv (/test) ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts Unreferenced file I=21 owner=root mode=100644 size=45 mtime=Jan 10 14:16 2005 ; RECONNECT? y ** Phase 5 - Check Inode Map Bad Inode Map; SALVAGE? y ** Phase 5b - Salvage Inode Map ** Phase 6 - Check Block Map Bad Block Map; SALVAGE? y ** Phase 6b - Salvage Block Map 18 files 21893872 blocks 171306256 free ***** Filesystem was modified ***** This does a filesystem check on /dev/testlv. As you can see, it finds an inode claiming it is linked to, but no file that links to it. We answer `y' to tell it to reconnect the inode to a filename, effectively giving us our file back! Step 15 Remount our directory. mount /test Output: None We must remount our filesystem to get back at our file. Step 16 Go into lost and found. It's where all lost little kiddies go. Duh. cd /test/lost+found Output: None Our file is now located in lost+found. If you do an `ls' in this directory, you will see something like the following: [test:/test/lost+found]# ls -l total 8 -rw-r-r- 1 root sys 45 Jan 10 14:16 21 And if we cat the file 21, we get the following: [test:/test/lost+found]# cat 21 #!/usr/bin/perl print "this is a test\n"; Ta-da! It's Myron's missing perl script! As a final aside, I will say that there may be different and much better ways of recovering files on AIX, however, this is the way I constructed from notes I found on various mailing lists and a few days of fooling around with it. So if you see some mistakes in this document or have some suggestions for better ways of doing this, please, let me know! I will happily update this document with better information as it is provided. I hope this helps some of you who have to deal with certain people who accidentally delete files on your systems. Nothing beats a good backup but when you don't have one of those, this can always be used as a fallback. ---------------------------------------------------------------------------------------- Note 11: ---------------------------------------------------------------------------------------- Subject: Undelete of a file on AIX, using fsdb. http://faqs.cs.uu.nl/na-dir/aix-faq/part1.html Contents repeated here: RECOVERING REMOVED FILES AND DIRECTORIES IN A FILESYSTEM If a file is Deleted from the system, the filesytem blocks composing that file still exist, but are no longer allocated. As long as no new files are created or existing files extended within the same filesystem, the blocks will remain untouched. It is possible to reallocate the blocks to the previous file using the "fsdb" command (filesystem debugger). MAKE A BACKUP OF THE ENTIRE FILESYSTEM BEFORE PERFORMING THESE STEPS!!! ELSE ( BANG !!!!! ). It is possible to send a mail for have some informations ... Bernard.Kozyra@bull.net Steps to recover a deleted file ------------------------------- 1) "ls -id {dir}" (where dir is directory where file resided) Record INODE number for next step. 2) Unmount the filesystem. 3) "fsdb /{Mountpoint}" or "fsdb /dev/{LVname}" (where Mountpoint is the filesystem mount point, and LVname is the logical volume name of the filesystem) 4) "{INODE}i" (where INODE is the inode number recorded in step 1) This will display the inode information for the directory. The field a0 contains the block number of the directory. The following steps assume only field a0 is used. If a value appears in a1, etc, it may be necessary to repeat steps #5 and #6 for each block until the file to be recovered is found. 5) "a0b" (moves to block pointed to by field "a0" of this inode) 6) "p128c" (prints 128 bytes of directory in character format) Look for missing filename. If not seen, repeat this step until filename is found. Record address where filename begins. Also record address where PRIOR filename begins. If filename does not appear, return to step #5, and selecting a1b, a2b, etc. Note that the address of the first field is shown to the far left. Increment the address by one for each position to the right, counting in octal. 7) "a0b" (moves to block pointed to by field "a0" of this inode) If the filename was found in block 1, use a1b instead, etc. 8) "p128e" (prints first 128 bytes in decimal word format) Find the address of the file to recover (as recorded in step 6) in the far left column. If address is not shown, repeat until found. 9) Record the address of the file which appeared immediately PRIOR to the file you want to recover. 10) Find the ADDRESS of the record LENGTH field for the file in step #9 assuming the following format: {ADDRESS}: x x x x x x x x x x ... | | | | |-------- filename ------| inode # --+----+ | | | +-- filename length record LENGTH --+ Note that the inode number may begin at any position on the line. Note also that each number represents two bytes, so the address of the LENGTH field will be `{ADDRESS} + (#hops * 2) + 1' 11) Starting with the first word of the inode number, count in OCTAL until you reach the inode number of the file to be restored, assuming each word is 2 bytes. 12) "0{ADDRESS}B={BYTES}" (where ADDRESS is the address of the record LENGTH field found in step #10, and BYTES is the number of bytes [octal] counted in step #11) 13) If the value found in the LENGTH field in step #10 is greater than 255, also type the following: "0{ADDRESS-1}B=0" (where ADDRESS-1 is one less than the ADDRESS recorded in step #10) This is necessary to clear out the first byte of the word. 14) "q" (quit fsdb) 15) "fsck {Mountpoint}" or "fsck /dev/{LVname}" This command will return errors for each recovered file asking if you wish to REMOVE the file. Answer "n" to all questions. For each file that is listed, record the associated INODE number. 16) "fsdb /{Mountpoint}" or "fsdb /dev/{LVname}" 17) {BLOCK}i.ln=1 (where BLOCK is the block number recoded in step #15) This will change the link count for the inode associated with the recovered file. Repeat this step for each file listed in step #15. 18) "q" (quit fsdb) 19) "fsck {Mountpoint}" or "fsck /dev/{LVname}" The REMOVE prompts should no longer appear. Answer "y" to all questions pertaining to fixing the block map, inode map, and/or superblock. 20) If the desired directory or file returns, send money to the author of this document. ---------------------------------------------------------------------------------------- Note 12: ---------------------------------------------------------------------------------------- This note has some interresting feautures. You can't use it for all types of un-delete, but maybe you want to take a look. Original: http://lde.sourceforge.net/UNERASE.txt Here the contents is repeated: I imagine that most of the people initially using this package will be the ones who have recently deleted something. After all, that's what finally inspired me to learn enough about the different file systems to write this package. Undelete under unix really isn't that hard, it really only suffers the same problems that DOS undelete does which is -- you can't recover data that someone else has just overwritten. If you are quick and have very few users on your system there is a good chance that the data will be intact and you can go ahead with a successful undelete. I don't recommend using this package to undelete your /usr/bin directory or really any directory, but if you have trashed a piece of irreplaceable code or data, undelete is where it's at. If you can reinstall or have recent backups I'd recommend you try them. But it's up to you, besides, sometimes playing with lde/undelete for a while is a lot more fun than going back and recoding a few hours worth of lost work. Before I tell you how to undelete stuff, have a look at doc/minix.tex (or the ps or dvi version). Even if you aren't using a minix file system, read it carefully, it will get you used to the terms and the general idea behind things here. These are the steps for a successful undelete: ######################### STEP ONE ################################## Unmount the partition which has the erased file on it. If you want to, you can remount it read-only, but it isn't necessary. NOTE: lde does some checks to see if the file system is mounted, but it does not check if it was mounted read-only. Some functions will be deactivated for any (read-only or read/write) mounted partition. ######################### STEP TWO ################################## Figure out what you want to undelete. If you know what kind of file you are looking for (tar file, compressed file, C file), finding it will be a lot easier. There are a few ways to look for file data. lde supports a type search and a string search for data at the beginning of a file. Currently, the supported types include gz (gzip), tgz (tarred gzip file), and script (those beginning with "#!/"). ---- EXAMPLE ---- String search (search for a PKzip file - starts with PK, -O 0 not required): lde -S PK -O 0 /dev/hda1 String search (search for JPEG files - JIFF starts at byte 6): lde -S JIFF -O 6 /dev/hda1 Type search (search for a gzipped tar file): lde -T tgz /dev/hda1 ------------------- When searching by type, you can also include the filename; the desired pattern will be extracted from the file. You should specify an offest (-O) and length (-L) when using this option. This option was included to make generalized searches easier. You can find pattern, length, and offset information in /etc/magic which you can use to generate your own template files, or specify lengths and offsets so that existing files may be used as templates. ---- EXAMPLE ---- Type search (search for core file - see /etc/magic to determine -O/-L): lde -T /proc/kcore -O 216 -L 4 /dev/hda1 ----------------- If you add --recoverable to the command line, it will check to see if another active inode uses any blocks in this inode. If no blocks are marked used by another inode, "recovery possible" will be printed. If blocks are used by another file "recovery NOT possible" will be printed to the screen. You may still be able to get some data back even when it reports that recovery is not possible. To get an idea of how many blocks are in use, you will have to check its recoverablilty from lde via its curses interface. ---- EXAMPLE ---- ./lde --paranoid -T script --ilookup --recoverable /dev/hda5 ---- OUTPUT ---- Paranoid flag set. Opening device "/dev/hda5" read-only. User requested autodetect filesystem. Checking device . . . Found ext2fs on device. Match at block 0x107, check inode 0xB, recovery possible. Match at block 0x421E7, no unused inode found. ----------------- When you run lde in these mode, it will report a block (and inode if you are lucky and used the --ilookup flag) where a match was found. Take this inode number and go to step (3). If lde doesn't report anything on its own, or the search detailed above does not suit your needs, you can use grep to search the partition for data and pipe it through lde which will attempt to find a block and inode again. The recommended procedure (all this can go on one line, the '\' indicates continuation) is: grep -b SEARCH DEVICE | awk '{FS = ":" } ; {print $1 }' | \ lde ${LDE_OPT} --grep DEVICE A shell script (crash_recovery/grep-inode) is included that will do this for you. grep-inode [grep_options] search_string device ---- EXAMPLE ---- grep-inode -i MyDevelopment.h /dev/hda1 ----------------- If none of these search methods are productive, you can page through the disk with an editor (emacs /dev/hda2) or the preferred choice might be to page through it with lde. Fire up lde and go into block mode (hit 'b') then use PG_UP/PG_DN to flip through all the blocks until you find one you like. Hitting '^R' while displaying the block will attempt to find an inode which references the block. ######################## STEP THREE ################################# If you have an inode number, things are looking good. Go into inode mode and display this inode. Then hit 'R' (use capital 'R') to copy the inode information to the recovery block list and enter recovery mode. Now hit 'R' again and lde will prompt you for a file name (you can include a full path). Make sure you write it to a FILE SYSTEM OTHER THAN THE ONE WHICH THE DELETED FILE RESIDES ON or you will probably overwrite it as you go. One day, when lde supports disk writes, it will be able to undelete the file to its original location, but for now this is safer. The recovered file will be a little larger than the original as the last block will be padded with zeroes (or whatever was on the disk at the end of the last block). If you did find an inode for the deleted file, you can copy its old size to the new inode by using lde to edit the two inodes (don't use lde's copy/paste as it will copy the entire inode and undo all the work you just did to restore the file). ###################### OTHER OPTIONS ################################ If you were unable to find an intact inode, things are going to be tough. You will have to find all the blocks in the file in order. If your disk is relatively unfragmented, you can hopefully find everything in order or close by at least. Currently, you have to tag all the direct blocks, then find the indirect blocks and tag them. If the indirect block was wiped or you are unable to find it, you've got a lot of work to do. You can copy individual blocks one at a time to the recovery file by using 'w' in block mode. Display the next block in the file, hit 'w', then enter the filename (if you hit enter, the last filename will be reused and the block will be appended to the file). lde will always ask if you want to append, overwrite, or cancel when a file exists. You can override this by setting the append flag from the flags menu ('f' from most modes). If you find any type of indirect block, you can copy it to the recovery inode in its corresponding position and recover a whole bunch of blocks at once. Leave the direct blocks filled with zeros. Another option is to use dd. Real programmers still probably use emacs and dd to hack a fs. ;) If you know there are a bunch (one or more) of contiguous blocks on the disk, you can use the unix command dd to copy them from the device to a file. ---- EXAMPLE ---- To copy blocks 200-299 from the device /dev/hda1 to /home/recover/file1: dd if=/dev/hda1 of=/home/recover/file1 bs=1024 count=100 skip=200 if input file or device of output file or device bs blocksize (will be 1024 for most linux fs's) count number of blocks to copy skip number of blocks to skip from the start of the device ----------------- Read the dd man page for more info. #################### ABOUT INDIRECT BLOCKS ########################## [ Mail from to an lde user ] > 1 - install a routine that lets you read what the indirect blocks > are pointing to in the chain, I mean, I know that file X has 2 > indirect blocks but what blocks do these point to and how do I find > out? This is hard to describe, but if you have figured out how to use inode mode any you are looking at the blocklist contained in that inode (it should list all the direct blocks and the 1x, 2x, and 3x indirect blocks), when you hit 'B' when the cursor is sitting on the 1x indirect block, it will take you to that block in block mode, then each entry in that block (most likely each entry is 4 bits -- as in the ext2 fs) points to another block in the chain. I.E. INDIRECT BLOCK: 0x000200 Now look at block 0x000200 0000: 01 00 00 00 02 00 00 00 : 04 04 04 00 10 01 00 00 This would indicate the the next 4 blocks in the file are 0x00000001, 0x00000002, 0x00040404, 0x00000110 The same is true for double indirect blocks, but the double indirect blocks contains pointers to more indirect block which you must then look up as above. That was a pretty lousy explaination, someday I do plan to add a feature where you may view all the blocks in a file without doing the indirect indexing yourself. For now, lde is mostly a crutch for last ditch efforts at file recovery, but I'm glad if people find other uses for it. ################# RECOVERING WITHOUT INODES ####################### [ This is mail to a person who was unable to find an inode, it gives some last ditch suggestions before giving up. ] In a perfect world, or on a virgin disk, everything would be sequential. But with things like unix and (network) file sharing, many people can write to the disk at the same time, so the blocks can get interleaved. Also depending on the free space situation of the disk, the two free blocks may not exist sequentially on the disk. Also, there are file "holes" in ext2 where there are block pointers of zero on the disk. Normally an indirect block would point to 256 direct blocks, but with zero entries it may be less than this. If things are perfect, here is how I imagine your disk is layed out: Direct blocks 1-9: you already know where these are and they are in that tiny recovery file (9k). These were not sequential, so it makes me wonder if the rest of the bytes will be layed out in order. Indirect block: This takes up one block and ideally your data would start right after it. 256 blocks of data: 2x indirect block: Should only have one entry, pointing to the next block on the disk indirect block: pointed to by the 2xindirect block 88 blocks of data: So my last ditch recommendation is to use dd to copy the blocks off the disk and then cat all the dd'ed files together. 0x5e65e - 0x5e660 | 0x61a72 | 0x5e661 +-- These are the direct blocks, you could 0x61ad4 | use the lde recovered file instead of 0x5e662 - 0x5e664 | dd + cat. 0x5e665 - 0x5e764 - 256 blocks of data 0x5e750 - 0x5e7a8 - 88 blocks of data Things look bad becuse the numbers are out of sequence (those 256 blocks of data should end right before the 2x indirect block at 0x5e74 there's 0x10 blocks unaccounted for (maybe this is just some of the ext2 file system data which is dispersed about the disk -- it could fall anywhere in that data range if it's there). So try: ---- EXAMPLE ---- lde (recover direct blocks to /home/recover/block1) dd if=/dev/sdb1 of=/home/recover/block2 bs=1024 count=256 skip=386661 dd if=/dev/sdb1 of=/home/recover/block3 bs=1024 count=88 skip=386896 cat block.1 block2 block3 > access_file.dos ----------------- #################### TRIPLE INDIRECT BLOCKS ######################### [ This is a response to one persons request for immediate help recovering a very large file -- the stuff about the triple block having _three_ entries was specific to this persons problem. In general though, the triple indirect block will not have very many entries, so this method might be viable until I get things together and write in the triple indirect block support. ] lde allows you to append a single block to the recover file (use 'w' from block mode) -- you can page through the triple indirect blocks to figure out the block order and then write each block to the recover file. I.e. after piecing things together from the triple indirect block, you should have a list of all the blocks in the file, now display the first block on the screen, write it to the file, display the second block, write it to the file . . . I really don't think it's worth it for 145,000 blocks though. The semi-automated way to do this is to make some fake inodes. The triple indirect inode should be pretty empty - maybe 3 entires. Each of these entries points to a double indirect block. Solution: 1) Recover any direct/indirect/double indirect blocks in the original inode to a file. Do this with lde. 2) Look at the triple indirect block. It should have 3 entries. Write down the 3 double indirect blocks listed here. 3) Use the recover mode fake inode, fill in all entires with zeroes. Now fill in the 1st double indirect block that you wrote down in step 2 in the slot for the 2x indirect block. 4) Execute a recover, dump it to a file, say "file1". Repeat step 3 with the other two double indirect inodes from step 2. 5) Now you should have 4 files, catenate them all together and with any luck, it will un-tar. ---------------------------------------------------------------------------------------- Note 13: ---------------------------------------------------------------------------------------- >>> Some tools or info that might be usefull: 1. Midnight Commander is GNU (free) software that runs on UNIX based operating systems. At the time of writing, the undelete feature only works on ext2 filesystems. Midnight Commander can be obtained at http://www.ibiblio.org/mc/ 2. Opensource forensic: http://www.opensourceforensics.org/tools/unix.html 3. R-Linux, recovery and undelete tool for Ext2 fs http://3d2f.com/tags/undelete/recover/unix/ 4. http://foremost.sourceforge.net/ Also take a look at Tom Pycke, Recovering Files in Linux, available at www.recover.source.net/linux 5. R-Linux 1.0 Data Recovery and Undelete Tool for Ext2FS (Linux) file system. http://www.supershareware.com/info/r-linux.html 6. Compunix AIX undelete tool: http://www.compunix.com/prod/analyse.html http://www.compunix.com/eval/list.html 7. Check out a tool called "Lazarus" which can work in combination with unrm 8. For Linux (ext2, ext3 fs) and Solaris (ufs fs) R-Tools technology: Undelete tool for Linux and Solaris: http://www.data-recovery-software.net/ 9. Solaris undelete tools: -- Kernel Recovery for Solaris Sparc http://www.download.com/Kernel-Recovery-for-Solaris-Sparc/3000-2248_4-10578170.html http://www.download3k.com/Press-Launch-of-Kernel-Recovery-for-Solaris-SPARC.html http://www.tucows.com/preview/505583 http://www.programurl.com/kernel-recovery-for-solaris-sparc.htm Nucleus Technologies.com: http://www.nucleustechnologies.com -- Other Solaris Data Recovery Software: http://solaris-data-recovery-software.qarchive.org/ R-Tools technology: Undelete tool for Linux and Solaris: http://www.data-recovery-software.net/ 10. General info on undelete intentions on ext2 fs: http://amadeus.uprm.edu/~undelete/Presentacion.html 11. Patents on undelete feature in Unix (requires a change in how inodes are freed) http://www.patentstorm.us/patents/6615224.html http://www.freepatentsonline.com/6615224.html ############################################################## SECTION 11: GENERIC: SIMPLE EXAMPLES ON USING dd, od: ############################################################## ---------------------------------------------------------------------------------------- Note 1: ---------------------------------------------------------------------------------------- You already have seen some examples of using the dd and od commands. These commands are available on almost all unix versions. They are extremely powerfull, and could be very dangerous also, if not used properly. Because you can dump any diskblock, or blocks from tape, to any output, with possible conversion of data, you might even recover data which would otherwise be considered as lost. The following article is very instructive on how to use the dd command. http://www.codecoffee.com/tipsforlinux/articles/036.html >> How and when to use the dd command? In this article, Sam Chessman explains the use of the dd command with a lot of useful examples. This article is not aimed at absolute beginners. Once you are familiar with the basics of Linux, you would be in a better position to use the dd command. The ' dd ' command is one of the original Unix utilities and should be in everyone's tool box. It can strip headers, extract parts of binary files and write into the middle of floppy disks; it is used by the Linux kernel Makefiles to make boot images. It can be used to copy and convert magnetic tape formats, convert between ASCII and EBCDIC, swap bytes, and force to upper and lowercase. For blocked I/O, the dd command has no competition in the standard tool set. One could write a custom utility to do specific I/O or formatting but, as dd is already available almost everywhere, it makes sense to use it. Like most well-behaved commands, dd reads from its standard input and writes to its standard output, unless a command line specification has been given. This allows dd to be used in pipes, and remotely with the rsh remote shell command. Unlike most commands, dd uses a keyword=value format for its parameters. This was reputedly modeled after IBM System/360 JCL, which had an elaborate DD 'Dataset Definition' specification for I/O devices. A complete listing of all keywords is available from GNU dd with $ dd --help Some people believe dd means ``Destroy Disk'' or ``Delete Data'' because if it is misused, a partition or output file can be trashed very quickly. Since dd is the tool used to write disk headers, boot records, and similar system data areas, misuse of dd has probably trashed many hard disks and file systems. In essence, dd copies and optionally converts data. It uses an input buffer, conversion buffer if conversion is specified, and an output buffer. Reads are issued to the input file or device for the size of the input buffer, optional conversions are applied, and writes are issued for the size of the output buffer. This allows I/O requests to be tailored to the requirements of a task. Output to standard error reports the number of full and short blocks read and written. Example 1 A typical task for dd is copying a floppy disk. As the common geometry of a 3.5" floppy is 18 sectors per track, two heads and 80 cylinders, an optimized dd command to read a floppy is: Example 1-a : Copying from a 3.5" floppy dd bs=2x80x18b if=/dev/fd0 of=/tmp/floppy.image 1+0 records in 1+0 records out The 18b specifies 18 sectors of 512 bytes, the 2x multiplies the sector size by the number of heads, and the 80x is for the cylinders-- a total of 1474560 bytes. This issues a single 1474560-byte read request to /dev/fd0 and a single 1474560 write request to /tmp/floppy.image, whereas a corresponding cp command cp /dev/fd0 /tmp/floppy.image issues 360 reads and writes of 4096 bytes. While this may seem insignificant on a 1.44MB file, when larger amounts of data are involved, reducing the number of system calls and improving performance can be significant. This example also shows the factor capability in the GNU dd number specification. This has been around since before the Programmers Work Bench and, while not documented in the GNU dd man page, is present in the source and works just fine, thank you. To finish copying a floppy, the original needs to be ejected, a new diskette inserted, and another dd command issued to write to the diskette: Example 1-b : Copying to a 3.5" floppy dd bs=2x80x18b < /tmp/floppy.image > /dev/fd0 1+0 records in 1+0 records out Here is shown the stdin/stdout usage, in which respect dd is like most other utilities. Example 2 The original need for dd came with the 1/2" tapes used to exchange data with other systems and boot and install Unix on the PDP/11. Those days are gone, but the 9-track format lives. To access the venerable 9-track, 1/2" tape, dd is superior. With modern SCSI tape devices, blocking and unblocking are no longer a necessity, as the hardware reads and writes 512-byte data blocks. However, the 9-track 1/2" tape format allows for variable length blocking and can be impossible to read with the cp command. The dd command allows for the exact specification of input and output block sizes, and can even read variable length block sizes, by specifying an input buffer size larger than any of the blocks on the tape. Short blocks are read, and dd happily copies those to the output file without complaint, simply reporting on the number of complete and short blocks encountered. Then there are the EBCDIC datasets transferred from such systems as MVS, which are almost always 80-character blank-padded Hollerith Card Images! No problem for dd, which will convert these to newline-terminated variable record length ASCII. Making the format is just as easy and dd again is the right tool for the job. Example 2 : Converting EBCDIC 80-character fixed-length record to ASCII variable-length newline-terminated record dd bs=10240 cbs=80 conv=ascii,unblock if=/dev/st0 of=ascii.out 40+0 records in 38+1 records out The fixed record length is specified by the cbs=80 parameter, and the input and output block sizes are set with bs=10240. The EBCDIC-to-ASCII conversion and fixed-to-variable record length conversion are enabled with the conv=ascii,noblock parameter. Notice the output record count is smaller than the input record count. This is due to the padding spaces eliminated from the output file and replaced with newline characters. Example 3 Sometimes data arrives from sources in unusual formats. For example, every time I read a tape made on an SGI machine, the bytes are swapped. The dd command takes this in stride, swapping the bytes as required. The ability to use dd in a pipe with rsh means that the tape device on any *nix system is accessible, given the proper rlogin setup. Example 3 : Byte Swapping with Remote Access of Magnet Tape rsh sgi.with.tape dd bs=256b if=/dev/rmt0 conv=swab | tar xvf - The dd runs on the SGI and swaps the bytes before writing to the tar command running on the local host. Example 4 Murphy's Law was postulated long before digital computers, but it seems it was specifically targeted for them. When you need to read a floppy or tape, it is the only copy in the universe and you have a deadline past due, that is when you will have a bad spot on the magnetic media, and your data will be unreadable. To the rescue comes dd, which can read all the good data around the bad spot and continue after the error is encountered. Sometimes this is all that is needed to recover the important data. Example 4 : Error Handling dd bs=265b conv=noerror if=/dev/st0 of=/tmp/bad.tape.image Example 5 The Linux kernel Makefiles use dd to build the boot image. In the Alpha Makefile /usr/src/linux/arch/alpha/boot/Makefile, the srmboot target issues the command: Example 5 : Kernel Image Makefile dd if=bootimage of=$(BOOTDEV) bs=512 seek=1 skip=1 This skips the first 512 bytes of the input bootimage file (skip=1) and writes starting at the second sector of the $(BOOTDEV) device (seek=1). A typical use of dd is to skip executable headers and begin writing in the middle of a device, skipping volume and partition data. As this can cause your disk to lose file system data, please test and use these applications with care. ---------------------------------------------------------------------------------------- Note 2: ---------------------------------------------------------------------------------------- od Command Purpose Displays files in a specified format. dump files in octal and other formats Syntax To Display Files Using a Type-String to Format the Output od [ -v ] [ -A AddressBase ] [ -N Count ] [ -j Skip ] [ -t TypeString ... ] [ File ... ] type is a string of one or more of the below type indicator characters. If you include more than one type indicator character in a single type string or use this option more than once, od writes one copy of each output line using each of the data types that you specified, in the order that you specified. a named character c ASCII character or backslash escape d signed decimal f floating point o octal u unsigned decimal x hexadecimal C char S short I int L long For floating point (f): F float D double L long double Examples: >> To display a file in octal, a page at a time, enter: od a.out | pg This command displays the a.out file in octal format and pipes the output through the pg command. >> To translate a file into several formats at once, enter: od -t cx a.out > a.xcd This command writes the contents of the a.out file, in hexadecimal format ( x) and character format ( c), into the a.xcd file. >> To start displaying a file in the middle (using the first syntax format), enter: od -t acx -j 100 a.out This command displays the a.out file in named character ( a), character ( c), and hexadecimal ( x) formats, starting from the 100th byte. >> To start in the middle of a file (using the second syntax format), enter: od -bcx a.out +100. This displays the a.out file in octal-byte ( -b), character ( -c), and hexadecimal ( -x) formats, starting from the 100th byte. The . (period) after the offset makes it a decimal number. Without the period, the output would start from the 64th (100 octal) byte. % dir | od -c | more % cat my_file | od -c |more % od my_file |more Comparison of different outputs: >> Show 16 first characters from a binary file (/bin/sh) as ASCII characters or backslash escapes (octal): % od -N 16 -c /bin/sh output: 0000000 177 E L F 001 001 001 \0 \0 \0 \0 \0 \0 \0 \0 \0 >> Show the same binary as named ASCII characters: % od -N 16 -a /bin/sh output: 0000000 del E L F soh soh soh nul nul nul nul nul nul nul nul nul >> Show the same binary as short hexcadecimals: % od -N 16 -t x1 /bin/sh output: 0000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 >> Show the same binary as octal numbers: % od -N 16 /bin/sh output: % 0000000 042577 043114 000401 000001 000000 000000 000000 000000 ############################################################## SECTION 12: MOUNTING A CD DEVICE: ############################################################## AIX: ---- # mount -r -v cdrfs /dev/cd0 /cdrom Solaris: -------- # mount -r -F hsfs /dev/dsk/c0t6d0s2 /cdrom HPUX: ----- mount -F cdfs -o rr /dev/dsk/c1t2d0 /cdrom SuSE Linux: ----------- # mount -t iso9660 /dev/cdrom /cdrom # mount -t iso9660 /dev/cdrom /media/cdrom Redhat Linux: ------------- # mount -t iso9660 /dev/cdrom /media/cdrom Other commands on Linux: ------------------------ Sometimes on some Linux, and some scsi CDROM devices, you might try # mount /dev/sr0 /mount_point # mount -t iso9660 /dev/sr0 /mount_point ############################################################## SECTION 13:COMMANDS TO RETREIVE SYSTEM INFO: ############################################################## Memory: ------- AIX: bootinfo -r lsattr -E -l mem0 lsattr -E -l sys0 -a realmem svmon -G vmstat -v vmo -L or use a tool as "topas" or "nmon" (these are utilities) Linux: cat /proc/meminfo /usr/sbin/dmesg | grep "Physical" free (the free command) HP: /usr/sam/lbin/getmem grep MemTotal /proc/meminfo /etc/dmesg | grep -i phys wc -c /dev/mem or us a tool as "glance", like entering "glance -m" from prompt (is a utility) Solaris: /usr/sbin/prtconf | grep "Memory size" Tru64: /bin/vmstat -P | grep "Total Physical Memory" Swap: ----- AIX: lsps -a (or lsps -s) pstat -s HP: /usr/sbin/swapinfo -a Solaris: /usr/sbin/swap -l Linux: /sbin/swapon -s cat /proc/swaps cat /proc/meminfo cpu: ---- HP: ioscan -kfnC processor getconf CPU_VERSION getconf CPU_CHIP_TYPE model AIX: lparstat (-i) prtconf | grep proc pmcycles -m lsattr -El procx (x is 0,2, etc..) lscfg | grep proc pstat -S Linux: cat /proc/cpuinfo Solaris: psrinfo -v prtconf psrset -p prtdiag OS version: ----------- HP: uname -a Linux: cat /proc/version Solaris: uname -a cat /etc/release (or other way to view that file, like "more /etc/release") Tru64: /usr/sbin/sizer -v AIX: oslevel -r lslpp -h bos.rte AIX firmware: lsmcode -c display the system firmware level and service processor lsmcode -r -d scraid0 display the adapter microcode levels for a RAID adapter scraid0 lsmcode -A display the microcode level for all supported devices prtconf shows many setting including memory, firmware, serial# etc.. Notes about Power 4 or 5 lpars: ------------------------------- For AIX: The uname -L command identifies a partition on a system with multiple LPARS. The LPAR id can be useful for writing shell scripts that customize system settings such as IP address or hostname. The output of the command looks like: # uname -L 1 lpar01 The output of uname -L varies by maintenance level. For consistent output across maintenance levels, add a -s flag. For illustrate, the following command assigns the partition number to the variable "lpar_number" and partiton name to "lpar_name". For HP-UX: Use commands like "parstatus" or "getconf PARTITION_IDENT" to get npar information. patches: -------- AIX: Is a certain fix (APAR) installed? instfix -ik APAR_number instfix -a -ivk APAR_number To determine your platform firmware level, at the command prompt, type: lscfg -vp | grep -p Platform The last six digits of the ROM level represent the platform firmware date in the format, YYMMDD. HP: /usr/sbin/swlist -l patch swlist | grep patch Linux: rpm -qa Solaris: showrev -p pkginfo -i package_name Tru64: /usr/sbin/dupatch -track -type kit Netcards: --------- AIX: lsdev -Cc adapter lsdev -Cc adapter | grep ent lsdev -Cc if lsattr -E -l ent1 ifconfig -a Solaris: prtconf -D / prtconf -pv / prtconf | grep "card" prtdiag | grep "card" svcs -x ifconfig -a (up plumb) Network sniffing: ----------------- Here are a few short descriptions, and examples, of usefull network trace / dump commands. -- Solaris: snoop command examples: For example, if we want to observe traffic between systems alpha and beta we can use the following command: # snoop alpha,beta To enable data captures from the snoop output without losing packets while writing to the screen, send the snoop output to a file. For example: # snoop -o /tmp/snooper -V 128.50.1.250 To snoop a specific port: # snoop -o port xxx -- AIX: tcpdump command examples: # tcpdump port 23 # tcpdump -i en0 A good way to use tcpdump is to save the network trace to a file with the -w flag and then analyze the trace by using different filtering options together with the -r flag. The following example show how to run a basic tcpdump network trace, saving the output in a file with the -w flag (on a Ethernet network interface): # tcpdump -w /tmp/tcpdump.en0 -i en0 To limit the number of traced packets, use the -c flag and specify the number, such as in the following example that traces the first 128 packets (on a token-ring network interface): # tcpdump -c 128 -w /tmp/tcpdump.tr0 -i tr0 iptrace command examples: To start the iptrace daemon with the System Resource Controller (SRC), # startsrc -s iptrace -a "/tmp/nettrace" To stop the iptrace daemon with SRC enter the following: # stopsrc -s iptrace To record packets coming in and going out to any host on every interface, enter the command in the following format: # iptrace /tmp/nettrace The recorded packets are received on and sent from the local host. All packet flow between the local host and all other hosts on any interface is recorded. The trace information is placed into the /tmp/nettrace file. To record packets received on an interface from a specific remote host, enter the command in the following format: # iptrace - i en0 -p telnet -s airmail /tmp/telnet.trace The packets to be recorded are received on the en0 interface, from remote hostairmail, over the telnet port. The trace information is placed into the /tmp/telnet.trace file. To record packets coming in and going out from a specific remote host, enter the command in the following format: # iptrace -i en0 -s airmail -b /tmp/telnet.trace The packets to be recorded are received on the en0 interface, from remote host airmail. The trace information is placed into the /tmp/telnet.trace file. -- HPUX: nettl command: Initialize the tracing/logging facility: # nettl -start Logging is enabled for all subsystems as determined by the /etc/nettlgen.conf file. Log messages are sent to a log file whose name is determined by adding the suffix .LOG000 to the log file name specified in the /etc/nettlgen.conf configuration file. To stop the tracing facility: # nettl -stop Turn on inbound and outbound PDU tracing for the transport and session (OTS/9000) subsystems and send binary trace messages to file /var/adm/trace.TRC000. # nettl -traceon pduin pduout -entity transport session \ -file /var/adm/trace Session using nettl and the formatter netfmt: 1. Capture packets nettl -tn all -e ns_ls_ip -tm 99999 -size 1024 -f some-raw-capture-file 2. Reproduce problem. 3. Turn off trace: nettl -tf -e all 4. Create formatter filter file. Example: filter tcp_sport 6699 filter tcp_dport 6699 5. Filter the packets: 5.1 "Long" display netfmt -Nlnc filter-file -f some-raw.capture > formatted.out 5.2 "One-liner" display netfmt -Nln1Tc filter-file -f some-raw.capture > one-liner.out -- Restart inetd, nfs: -- ------------------- Starting and stopping NFS: -------------------------- On all unixes, a number of daemons should be running in order for NFS to be functional, like for example the rpc.* processes, biod, nfsd and others. Once nfs is running, and in order to actually "share" or "export" your filesystem on your server, so remote clients are able to mount the nfs mount, in most cases you should edit the "/etc/exports" file. -- AIX: The following subsystems are part of the nfs group: nfsd, biod, rpc.lockd, rpc.statd, and rpc.mountd. The nfs subsystem (group) is under control of the "resource controller", so starting and stopping nfs is actually easy # startsrc -g nfs # stopsrc -g nfs Or use smitty. -- Redhat Linux: # /sbin/service nfs restart # /sbin/service nfs start # /sbin/service nfs stop -- On some other Linux distros # /etc/init.d/nfs start # /etc/init.d/nfs stop # /etc/init.d/nfs restart -- Solaris: If the nfs daemons aren't running, then you will need to run: # /etc/init.d/nfs.server start -- HP-UX: Issue the following command on the NFS server to start all the necessary NFS processes (HP): # /sbin/init.d/nfs.server start Or if your machine is only a client: # cd /sbin/init.d # ./nfs.client start Restart or refresh inetd after you have edited "inetd.conf": ------------------------------------------------------------ After you have edited "/etc/inetd.conf", for example, to enable or disable some service, you need to restart, or refresh inetd, to read the new configuration information. To let inetd to reread the configfile: -- AIX: # refresh -s inetd -- HPUX: # /usr/sbin/inetd -c -- Solaris: # /etc/init.d/inetd stop # /etc/init.d/inetd start # pkill -HUP inetd # The command will restart the inetd and reread the configuration. -- RedHat / Linux # service xinetd restart or # /etc/init.d/inetd restart --------------------------------------------------------------------------------- Note: How to get a "reaonable" view on memory consumption of a process in UNIX: --------------------------------------------------------------------------------- With using just the command line, or some free utils. In general not so easy to answer, because of the "sub components" you might distinguish in memory occupation. For example, do you mean RSS, real, shared, virtual, paging, including all libraries loaded, etc..? -- Some people like to use the ps command with some special flags, like ps -vg ps auxw # or ps auxw | sort -r +3 |head -10 (top users) But those commands seems not so very satisfactory, and not "complete" in their output. -- There are some great common utilities like topas, nmon, top etc.., or tools specific to a certain Unix, like SMC for Solaris. No bad word on those tools, because they are great. But some people think that they are not satisfactory on the subject of memory consumption of a process (although they show a lot of other interesting information). -- Some other ways might be: # procmap pid (in e.g. AIX) # pmap -x pid (in e.g. Solaris) Those tools also show a "total" memory usage, which is a good indicator. For example: # pmap -x $$ 492328: -ksh Address Kbytes RSS Anon Locked Mode Mapped File 00010000 192 192 - - r-x-- ksh 00040000 8 8 8 - rwx-- ksh 00042000 40 40 8 - rwx-- [ heap ] FF180000 680 680 - - r-x-- libc.so.1 FF23A000 24 24 - - rwx-- libc.so.1 FF240000 8 8 8 - rwx-- libc.so.1 FF280000 576 576 - - r-x-- libnsl.so.1 FF310000 40 40 - - rwx-- libnsl.so.1 FF31A000 24 16 - - rwx-- libnsl.so.1 FF350000 16 16 - - r-x-- libmp.so.2 FF364000 8 8 - - rwx-- libmp.so.2 FF380000 40 40 - - r-x-- libsocket.so.1 FF39A000 8 8 - - rwx-- libsocket.so.1 FF3A0000 8 8 - - r-x-- libdl.so.1 FF3B0000 8 8 8 - rwx-- [ anon ] FF3C0000 152 152 - - r-x-- ld.so.1 FF3F6000 8 8 8 - rwx-- ld.so.1 FFBFC000 16 16 8 - rw--- [ stack ] -------- ------- ------- ------- ------- total Kb 1856 1848 48 - This gives you a reasonable idea on memory consumption of a pid. You can also try: # svmon -G # svmon -U # svmon -P -t 10 (top 10 users) # svmon -U steve -l (memory stats for user steve) But svmon is not available on all unixes. The following might also be helpfull (not on all unixes): # ls -l /proc/{pid}/as # prstat -a -s rss And ps can give some info as well # ps -ef | egrep -v "STIME|$LOGNAME" | sort +3 -r | head -n 15 # ps au ------------------------------ Note: Show aioservers in AIX: ------------------------------ # lsattr -El aio0 autoconfig available STATE to be configured at system restart True fastpath enable State of fast path True kprocprio 39 Server PRIORITY True maxreqs 4096 Maximum number of REQUESTS True maxservers 10 MAXIMUM number of servers per cpu True minservers 1 MINIMUM number of servers True # pstat -a | grep -c aios 20 # ps -k | grep aioserver 331962 - 0:15 aioserver 352478 - 0:14 aioserver 450644 - 0:12 aioserver 454908 - 0:10 aioserver 565292 - 0:11 aioserver 569378 - 0:10 aioserver 581660 - 0:11 aioserver 585758 - 0:17 aioserver 589856 - 0:12 aioserver 593954 - 0:15 aioserver 598052 - 0:17 aioserver 602150 - 0:12 aioserver 606248 - 0:13 aioserver 827642 - 0:14 aioserver 991288 - 0:14 aioserver 995388 - 0:11 aioserver 1007616 - 0:12 aioserver 1011766 - 0:13 aioserver 1028096 - 0:13 aioserver 1032212 - 0:13 aioserver What are aioservers in AIX5?: With IO on filesystems, for example if a database is involved, you may try to tune the number of aioservers (asynchronous IO) AIX 5L supports asynchronous I/O (AIO) for database files created both on file system partitions and on raw devices. AIO on raw devices is implemented fully into the AIX kernel, and does not require database processes to service the AIO requests. When using AIO on file systems, the kernel database processes (aioserver) control each request from the time a request is taken off the queue until it completes. The kernel database processes are also used with I/O with virtual shared disks (VSDs) and HSDs with FastPath disabled. By default, FastPath is enabled. The number of aioserver servers determines the number of AIO requests that can be executed in the system concurrently, so it is important to tune the number of aioserver processes when using file systems to store Oracle Database data files. - Use one of the following commands to set the number of servers. This applies only when using asynchronous I/O on file systems rather than raw devices: # smit aio # chdev -P -l aio0 -a maxservers='128' -a minservers='20' - To set asynchronous IO to `Available': # chdev -l aio0 -P -a autoconfig=available You need to restart the Server: # shutdown -Fr aio on Linux distro's: On some Linux distro's, Oracle 9i/10g supports asynchronous I/O but it is disabled by default because some Linux distributions do not have libaio by default. For Solaris, the following configuration is not required - skip down to the section on enabling asynchronous I/O. On Linux, the Oracle binary needs to be relinked to enable asynchronous I/O. The first thing to do is shutdown the Oracle server. After Oracle has shutdown, do the following steps to relink the binary: su - oracle cd $ORACLE_HOME/rdbms/lib make -f ins_rdbms.mk async_on make -f ins_rdbms.mk ioracle ---------------------------------- Note: The ipcs and ipcrm commands: ---------------------------------- The "ipcs" command is really a "listing" command. But if you need to intervene in memory structures, like for example if you need to "clear" or remove a shared memory segment, because a faulty or crashed application left semaphores, memory identifiers, or queues in place, you can use to "ipcrm" command to remove those structures. Example ipcrm command usage: ---------------------------- Suppose an application crashed, but it cannot be started again. The following might help, if you happened to know which IPC identifier it used. Suppose the app used 47500 as the IPC key. Calcultate this decimal number to hex which is, in this example, B98C. No do the following: # ipcs -bm | grep B89C This might give you, for example, the shared memory identifier "50855977". Now clear the segment: # ipcrm -m 50855977 It might also be, that still a semaphore and/or queue is still "left over". In that case you might also try commands like the following example: ipcs -q ipcs -s # ipcrm -s 2228248 (remove semaphore) # ipcrm -q 5111883 (remove queue) Note: in some cases the "slibclean" command can be used to clear unused modules in kernel and library memory. Just give as root the command: # slibclean Other Example: -------------- If you run the following command to remove a shared memory segment and you get this error: # ipcrm -m 65537 ipcrm: 0515-020 shmid(65537) was not found. However, if you run the ipcs command, you still see the segment there: # ipcs | grep 65537 m 65537 0x00000000 DCrw------- root system If you look carefully, you will notice the "D" in the forth column. The "D" means: D If the associated shared memory segment has been removed. It disappears when the last process attached to the segment detaches it. So, to clear the shared memory segment, find the process which is still associated with the segment: # ps -ef | grep process_owner where process_owner is the name of the owner using the shared segment Now kill the process found from the ps command above # kill -9 pid Running another ipcs command will show the shared memory segment no longer exists: # ipcs | grep 65537 Example ipcrm -m 65537 ----------------------------------------- Note : Show patches, version, systeminfo: ----------------------------------------- Solaris: ======== showrev: -------- #showrev Displays system summary information. #showrev -p Reports which patches are installed sysdef and dmesg: ----------------- The follwing commands also displays configuration information # sysdef # dmesg versions: --------- ==> To check your Solaris version: # uname -a or uname -m # cat /etc/release # isainfo -v ==> To check your AIX version: # oslevel # oslevel -r tells you which maintenance level you have. >> To find the known recommended maintenance levels: # oslevel -rq >> To find all filesets lower than a certain maintenance level: # oslevel -rl 5200-06 >> To find all filesets higher than a certain maintenance level: # oslevel -rg 5200-05 >> To list all known recommended maintenance and technology levels on the system, type: # oslevel -q -s Known Service Packs ------------------- 5300-05-04 5300-05-03 5300-05-02 5300-05-01 5300-05-00 5300-04-CSP 5300-04-03 5300-04-02 5300-04-01 5300-03-CSP >> Example: 5300-02 is TL 02 5300-02-04 is TL 02 and SP 04 5300-02-CSP is TL 02 and CSP for TL 02 (and there won't be anymore SPs because when you see a CSP it is because the next TL has been released. In this case it would be TL 03). >> How can I determine which fileset updates are missing from a particular AIX level? To determine which fileset updates are missing from 5300-04, for example, run the following command: # oslevel -rl 5300-04 >> What SP (Service Pack) is installed on my system? To see which SP is currently installed on the system, run the oslevel -s command. Sample output for an AIX 5L Version 5.3 system, with TL4, and SP2 installed would be: # oslevel -s 5300-04-02 >> Is a CSP (Concluding Service Pack) installed on my system? To see if a CSP is currently installed on the system, run the oslevel -s command. Sample output for an AIX 5L Version 5.3 system, with TL3, and CSP installed would be: # oslevel -s 5300-03-CSP ==> To check your HP machine: # model 9000/800/rp7410 : machine info on AIX How do I find out the Chip type, System name, Node name, Model Number etc.? The uname command provides details about your system. uname -p Displays the chip type of the system. For example, powerpc. uname -r Displays the release number of the operating system. uname -s Displays the system name. For example, AIX. uname -n Displays the name of the node. uname -a Displays the system name, nodename,Version, Machine id. uname -M Displays the system model name. For example, IBM, 7046-B50. uname -v Displays the operating system version uname -m Displays the machine ID number of the hardware running the system. uname -u Displays the system ID number. Architecture: ------------- To see if you have a CHRP machine, log into the machine as the root user, and run the following command: # lscfg | grep Architecture or use: # lscfg -pl sysplanar0 | more The bootinfo -p command also shows the architecture of the pSeries, RS/6000 # bootinfo -p chrp ------------------------------------------------------------ Note: some usefull commands on Linux and AIX (and other OS): ------------------------------------------------------------ -- Linux: ========= -- Show your OS version: # cat /proc/version # uname -a -- Show the open files that a process uses: # pfiles pid -- Show the jobs that are scheduled (in the account you use) from cron: # crontab -l -- What are the standard mounted filesystems: That's defined in "/etc/fstab" # cat /etc/fstab -- Which processes are using a certain filesystem? # fuser -c /filesystem # We mean the "mountpoint", like for example "/apps/oracle" -- Show memory usage of a process: # pmap -d pid # (Most important options: -x Show the extended format; -d Show the device format.) # (And pid is the process-id, as visible in the command "ps -ef".) -- Show system memory: # cat /proc/meminfo # /usr/sbin/dmesg | grep "Physical" # free # (the free command) -- Swap usage: # cat /proc/swaps # Above 60%-70% it's getting scary # cat /proc/meminfo -- cpu info: # cat /proc/cpuinfo -- user and process limits: Sometimes, when a process runs under some account, and it fails for no immediate reason, it might be worth checking the "ulimit" of that account (like max filesize, max open files, number of files etc..) use it under that account as: # ulimit (-a) -- Show processtree of parent and children: # pstree pid # on some distros ptree is implemented -- Show the system error report / error log: # cat /var/log/messages | more (# more will ensure that not all contents scroll at your screen "at once", until the end is reached) -- Determine the type of a file (e.g. is it ascii, or another type of file?) # file file_name # (the command is really named "file") -- Show free/used space of the filesystems: # df -m # m in MB; k in KB If there are many filesystems, you might want to see just the top 5 that are the lowest on free space: # df -k |awk '{print $4,$7}' |grep -v "Filesystem" | sort -n | tail -5 -- How to become another user, or possibly root: # su - accountname # (switch to that accountname like "su - albert") # su - # (switch to root) # if the sudo utility is implemented, you might try the command "sudo -l" to see what you might execute. -- Carefull!! How to kill a process "the hard way"? # kill -9 PID # carefull, don't kill the wrong one; not recommended unless you don't have a choice. -- Carefull!! How to kill all your processes "the hard way", all at once? # kill -9 -1 # very carefull; not recommended unless you don't have a choice. # killall # implemented on some distros. very carefull; not recommended unless you don't have a choice. -- Show your uid (userid) and gid (groupid): # id -- refreshing (restarting) inetd after modifying "/etc/inetd.conf" # service xinetd restart # depending on the distro, like RedHat # /etc/init.d/inetd restart -- To show the init runlevel: # who -r -- Show uptime of system plus average load (15 minutes) # uptime -- Show the last logged on users: account name & pts & date (history since last restart) # last | more -- AIX: ======= -- Show your AIX version: # oslevel -r -- Show the jobs that are scheduled (in the account you use) from cron: # crontab -l -- What are the standard mounted filesystems?: That's defined in "/etc/filesystems" # cat /etc/filesystems | more -- Which processes are using a certain filesystem? # fuser -c /filesystem # We mean the "mountpoint", like for example /appl/oracle -- Show memory usage of a process: # procmap pid # pid is the process-id, as visible in the command "ps -ef" -- Show the open files that a process uses: # pfiles pid # also take a look at the "lsof" command: man lsof -- Show system memory: # bootinfo -r # lsattr -E -l mem0 # lsattr -E -l sys0 -a realmem # svmon -G # vmstat -v # vmo -L # ( lots of output ) # svmon -U -g -t 10 # ( top 10 users paging space) -- Swap usage: # lsps -s # more than 60%-70% used? It get's really scary. More than 75% used? Oh boy! # pstat -s -- cpu info: # lparstat (-i) # prtconf | grep proc # pmcycles -m # lscfg | grep proc # pstat -S -- ulimit: Sometimes, when a process runs under some ones credentials, and it fails for no immediate reason, it might be worth checking the "ulimit" of that account (like max filesize, max open files, number of files etc..) use it under that account as: # ulimit -a -- Show process tree of parent and children: # proctree pid # Tip: take a look at the "proc tools" on AIX -- Show the system error report / error log: # errpt # or "errpt | more" # errpt -aj | more # view details of an error record. ERRID is the 1st identifier in such a record. -- Determine the type of a file (e.g. is it ascii, or another type of file?) # file file_name # (yes..., the command is really "file") -- Show free/used space of the filesystems: # df -m # m in MB; k in KB; g in GB If there are many filesystems, you might want to see just the top 5 that have the lowest on free space: # df -k |awk '{print $4,$7}' |grep -v "Filesystem" | sort -n | tail -5 -- How to become another user, or possibly root: # su - accountname # (switch to that accountname like "su - albert") # su - # (switch to root) # if the sudo utility is implemented, you might try the command "sudo -l" to see what you might execute. -- Carefull!! How to kill a process "the hard way"? # kill -9 PID # carefull, don't kill the wrong one; not recommended unless you don't have a choice. -- Carefull!! How to kill all your processes "the hard way", all at once? # kill -9 -1 # be very carefull; not recommended unless you don't have a choice. # killall # be very carefull; not recommended unless you don't have a choice. -- Show your uid (userid) and gid (groupid): # id -- refresh inetd after modifying "/etc/inetd.conf": # refresh -s inetd -- Show the last logged on users + date (history since last restart): # last | more -- To show the init runlevel: # who -r -- Show uptime of system plus average load (15 minutes): # uptime -- Clean memory with ipcrm (be carefull): # ipcrm -m 50855977 # (clear memory segment, identfied by example id 50855977; Be carefull) # ipcrm -s 2228248 # (remove semaphore, identfied by example id 2228248; Be carefull) # ipcrm -q 5111883 # (remove queue, identfied by example id 5111883; Be carefull) ) # (see man pages ipcrm) -- To clear out unused system modules (currently unused modules in kernel and library memory): # slibclean ############################################################## SECTION 14: Various errors: ############################################################## ------ Note: ------ JVM problems and AIX Environment Variables in relation to Java: =============================================================== Default Behavior of Java on AIX This section describes the settings as they are right now. These settings may, and in most cases will, change over time. The README or SDK Guide accompanying the SDK are always the most up-to-date references for such settings. Java uses the following environment settings: AIXTHREAD_SCOPE=S This setting is used to ensure that each Java thread maps 1x1 to a kernel thread. The advantage of this approach is seen in several places; a notable example is how Java exploits Dynamic Logical Partitioning (DLPAR); when a new CPU is added to the partition, a Java thread can be scheduled on it. This setting should not be changed under normal circumstances. AIXTHREAD_COND_DEBUG, AIXTHREAD_MUTEX_DEBUG and AIXTHREAD_RWLOCK_DEBUG These flags are used for kernel debugging purposes. These may sometimes be set to OFF. If not, switching them off can provide a good performance boost. LDR_CNTRL=MAXDATA=0x80000000 This is the default setting on Java 1.3.1, and controls how large the Java heap can be allowed to grow. Java 1.4 decides the LDR_CNTRL setting based on requested heap. See Getting more memory in AIX for your Java applications for details on how to manipulate this variable. JAVA_COMPILER This decides what the Just-In-Time compiler will be. The default is jitc, which points to the IBM JIT compiler. It can be changed to jitcg for the debug version of JIT compiler, or to NONE for switching the JIT compiler off (which in most cases is the absolute worst thing you can do for performance). IBM_MIXED_MODE_THRESHOLD This decides the number of invocations after which the JVM JIT-compiles a method. This setting varies by platform and version; for example, it is 600 for Java 1.3.1 on AIX. Note 1: ------- About o_maxdata and LDR_CNTRL: ... space for the native heap. Moving the fence down allows the native heap to grow, while reducing shared memory. For a setting of o_maxdata = N, the fence is placed at 0x30000000+N. For several good reasons, it is recommended to set o_maxdata to a value that is the start of a particular segment, such as 0xn0000000. In this case, the fence sits between segments 2+n and 3+n, which translates to n segments for the native heap, and 10-n segments for shared memory. o_maxdata=8: 8 seg for native, 2 seg for shared o_maxdata=7: 7 seg for native, 3 seg for shared o_maxdata=6: 6 seg for native, 4 seg for shared o_maxdata=5: 5 seg for native, 5 seg for shared o_maxdata=4: 4 seg for native, 6 seg for shared o_maxdata=3: 3 seg for native, 7 seg for shared * o_maxdata=2: 2 seg for native, 8 seg for shared By default, o_maxdata is set to 0x80000000, leaving 2 GB for native heap and 512 MB for shared memory. If you attempt to allocate a Java heap larger than 1 GB, it fails because Java tries to use shared memory for heap, and there is only 512 MB of shared memory available. If you set IBM_JAVA_MMAP_JAVA_HEAP in the environment and try to allocate a heap larger than 512 MB, JVM will be unable to allocate the heap. The solution is to adjust o_maxdata in such a way that the size of shared memory grows large enough to accommodate the Java heap. The next section shows you how to do this. So how do you go to a larger Java heap? You need to change o_maxdata to increase the amount of shared memory address space. You can use the following calculations to come up with the appropriate value for o_maxdata. Supposing you need a maximum heap size of J bytes, you would invoke Java as java -mxJ If J is less than 1 GB, and IBM_JAVA_MMAP_JAVA_HEAP is not set, the default setup will suffice. If J is > 1 GB, or if IBM_JAVA_MMAP_JAVA_HEAP is set, use o_maxdata = 0xn0000000 where n = (10 - ceil(J/256M)) or 8 whichever is smaller. The function ceil rounds up the argument to the next integer. For example, if you need to allocate 1500 MB of heap, we have n = (10 - ceil(1500M/256M)) = (10 - 6) = 4. If you set o_maxdata = 0x40000000, you will be able to allocate the needed size of heap. To change o_maxdata, set the following environment variable: LDR_CNTRL=MAXDATA= The above example would set the following environment variable: LDR_CNTRL=MAXDATA=0x40000000 To verify that your calculation is accurate, you can try the following commands: $ export LDR_CNTRL=MAXDATA=0x40000000 $ java -mx1500m -version Setting the IBM_JAVA_MMAP_JAVA_HEAP variable # export IBM_JAVA_MMAP_JAVA_HEAP=true So, if you need to enhance memory for Websphere 5.x 32 bits, put the following lines into the startServer.sh script, or in /prj/was/omgeving.rc: export LDR_CNTRL=MAXDATA=0xn0000000 export IBM_JAVA_MMAP_JAVA_HEAP=true try: export AIXTHREAD_SCOPE=S export AIXTHREAD_MUTEX_DEBUG=OFF export AIXTHREAD_RWLOCK_DEBUG=OFF export AIXTHREAD_COND_DEBUG=OFF export LDR_CNTRL=MAXDATA=0x40000000 export IBM_JAVA_MMAP_JAVA_HEAP=TRUE or export IBM_JAVA_MMAP_JAVA_HEAP=true export LDR_CNTRL=MAXDATA=0x80000000 or export IBM_JAVA_MMAP_JAVA_HEAP=true export LDR_CNTRL=MAXDATA=0x80000000 ------ Note: ------ Hi I need help because, i have rp7410 with two npar, (first npar only 11.23)(second npar (vpar1 an vpar2, but on vpar1 i have ignite server)a also i have assign DVD drive to second npar,now i have reinstall first npar and i looking information how can i reinstall my first npar from Ignite server,if it is possible and how can I do it because when i try do it i have information: //Main Menu: Enter command or menu > bo lan 9.156.xx.yy INSTALL BCH Directed Boot Path: 0/0/8/0/0/4/0. Do you wish to stop at the ISL prompt prior to booting? (y/n) >> y Initializing boot Device. Boot IO Dependent Code (IODC) Revision 4 IODC ENTRY_INIT failed. Error Status: -4 The IODC for this boot device was unable to provide text describing the failure. IODC ENTRY_INIT[Return Messages] failed. Error Status: -2 0x0000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0x0004 0000000000000000 0000000000000000 0000000000000000 0000000000000000 // Today and also instaled vpar (vparboot -p vpar1n1 -I 9.156.xx,yy,/opt/ignite/boot/Rel_B.11.23/WINSTALL) from Ignite (golden_image) and i havn,t any problem Please help me, Slawek Note: If you are the author of this question and wish to assign points to any of the answers, please login first.For more information on assigning points ,click here Sort Answers By: Date or Points Eric SAUBIGNAC Feb 26, 2008 09:05:25 GMT 6 pts -------------------------------------------------------------------------------- Bonjour Slawek, As usually with ignite you must check some basic things : - are both npar on the same subnet - on the vpar ignite server, how is configured the file /etc/opt/ignite/instl_boottab - do you find those lines in /etc/inetd.conf : tftp dgram udp wait root /usr/lbin/tftpd tftpd\ /opt/ignite\ /var/opt/ignite instl_boots dgram udp wait root /opt/ignite/lbin/instl_bootd instl_bootd Eric Slawek Ksiazek Feb 26, 2008 09:23:09 GMT N/A: Question Author -------------------------------------------------------------------------------- Thanks for answer If I boot from BCH how can I check lan settings ?Thanks Slawek Daniel Parkes Feb 26, 2008 10:30:01 GMT 7 pts -------------------------------------------------------------------------------- If you don't have any system installed on that npar you will have to boot from dvd and then check your parameters. If you have so installed on that npar, boot it up and you can check out network, after testing the network if you have the 1st npar on a different subnet,try the bootsys command from the ignite server, check it out: man bootsys bootsys reboot and install clients using Ignite ------ Note: ------ Hi, I am using server rx7620 [itanium]for nPar and vPar creation. For deploying image on vPars from ignite server, I give an entry in bootptab for network configuration. Is there any way I can specify the image to be used from ignite, what hostname to be given, how the file system should be in advance so that I need not intervene the process of booting after I issue a "vparboot -p vparname -I" from an existing vPar. Is there any way to specify all the above information already somewhere in Ignite server from where it can pick it up automatically, something like "AUTO" file for default OS image. Any help will be appreciated. Thanks in advance. Note: If you are the author of this question and wish to assign points to any of the answers, please login first.For more information on assigning points ,click here Sort Answers By: Date or Points Steven E. Protter Aug 7, 2008 18:31:48 GMT Unassigned -------------------------------------------------------------------------------- Shalom, Standard Ignite rules apply. 1) The vpar needs network a disk and must be on the same subnet as the ignite server or connect through a boot helper. 2)I suggest booting the vpar via the console and then issuing the standard Ignite client command. boot lan.192.168.10.20 install SEP Torsten. Aug 7, 2008 19:02:41 GMT Unassigned -------------------------------------------------------------------------------- Correction for SEP's step 2: # vparboot -p target_partition -I You can either use the client or server interface to configure the values or modify the server config files - see http://docs.hp.com/en/IUX willsfrazer Sep 8, 2008 11:06:33 GMT N/A: Question Author -------------------------------------------------------------------------------- For me it's kind of a first time deployment of OS on subsequent vpar so i do not have any OE on target vPar. It's just a kind of bare metal from subsequent vPar's point of view. My problem is how do I drive expect interface of Ignite UI as using those tabs and delete and back spaces for file system configuration are not getting through using expect. Any way to specify all that already and get Ignite read it to proceed without requiring any input at UI and target being without any OE prior to this installation which means I have a vpar2 to be deployed with HP UX which is just a set of some hardware resources without having any OE and all what I have is an up and running vPar1 on the same nPar as vPar2 is + ignite server and access to MP console. Now how do I automate it [Ignite UI is not being driven for file system configuration] I can still use expect for root user specification and keep the hostname modification for post installation. But how abt defalut os image to be picked up from Ignite and file system specification. Any suggestions... ------- Note: ------- 0301-150 bosboot: Invalid or no boot device specified! -------------------------------------------------------------- == Technote: APAR status Closed as program error. Error description On a system, that does not have tape support installed, running mkszfile will show the following error: 0301-150 bosboot: Invalid or no boot device specified. Local fix Install device support for scsi tape devices. Problem summary Error message when creating backup if devices.scsi.tape.rte not installed even if the system does not have a tape drive. Problem conclusion Redirect message to /dev/null. Temporary fix Ignore message. Comments APAR information APAR number IY52551 IY95261 Reported component name AIX 5L POWER V5 Reported component ID 5765E6200 Reported release 520 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2004-01-12 Closed date 2004-01-12 Last modified date 2004-02-27 == Technote: APAR status Closed as program error. Error description If /dev/ipldevice is missing, mksfile will show the bosboot usage statement. 0301-150 bosboot: Invalid or no boot device specified! Local fix Problem summary If /dev/ipldevice is missing, mksfile will show the bosboot usage statement. 0301-150 bosboot: Invalid or no boot device specified! Problem conclusion Do not run bosboot against /dev/ipldevice. Temporary fix Comments APAR information APAR number IY95261 Reported component name AIX 5.3 Reported component ID 5765G0300 Reported release 530 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2007-02-22 Closed date 2007-02-22 Last modified date 2007-06-06 APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Publications Referenced Fix information Fixed component name AIX 5.3 Fixed component ID 5765G0300 == thread: Q: > > Someone out there knows the fix for this one; if you get a moment, would you > mind giving me the fix? > > > # mksysb -i /dev/rmt0 > > /dev/ipldevice not found > A: The ipldevice file is probably deleted from your /dev directory, or point to wrong entry. The '/dev/ipldevice' file is (re)created in boot time 2nd phase. For additional information look into /sbin/rc.boot script... The ipldevice entry type is hardlink. Usually point to /dev/rhdiskN, assuming that boot device is hdiskN. Check your system and you should got similar ... find /dev -links 2 -ls .... 8305 0 crw------- 2 root system 14, 1 Feb 20 2005 /dev/rhdisk0 8305 0 crw------- 2 root system 14, 1 Feb 20 2005 /dev/ipldevice ... (The first cloumn of the output is the inode number) So, you can recreate the wrong, or missing ipdevice file. 'bootinfo -b' says the physical boot device name. For exapmle: ln -f /dev/rhdisk0 /dev/ipldevice I hope this will solve your bosboot problem. Q: I was installing Atape driver and noticed bosboot failure when installp calls bosboot with /dev/ipldevice. Messages below: 0503-409 installp: bosboot verification starting... 0503-497 installp: An error occurred during bosboot verification processing. Inspection of /dev showed no ipldevice file I was able to easily recreate the /dev/ipldevice using ln /dev/rhdisk0 /dev/ipldevice then successfully install the Atape driver software. After reboot /dev/ipldevice is missing again???. Environment is p5 520 AIX 5.3 ML1 mirrored internal drives hdisk0 and hdisk1 in rootvg I have 5.3 ML2 (but have not applied yet) I don't see any APAR's in ML2 regarding /dev/ipldevice problems. A: Are you using EMC disk? There is a known problem with the later Powerpath versions where the powerpath startup script removes the /dev/ipldevice file if there is more than one device listed in the bootlist. A: Yes, running EMC PowerPath 4.3 for AIX, with EMC Clariion CX600 Fibre disks attached to SAN. I always boot from, and mirror the OS on IBM internal disks. We order 4 internal IBM drives. Two for primary OS and mirror, the other two for alt_disk and mirrors. Thanks for the tip. I will investigate at EMC Powerlink site for fix. I know PowerPath 4.4 for AIX is out, but still pretty new. A: ipldevice is a link to the rawdevice (rhdisk0 , not hdisk0) -----Original Message----- From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of Robert Miller Sent: Wednesday, April 07, 2004 6:13 PM To: aix-l@Princeton.EDU Subject: Re: 64 Bit Kernel It may be one of those odd IBMisms where they want to call something a certain name so they put it in as a link to the actual critter... Looking on my box, the /dev/ipldevice has the same device major and minor numbers as hdisk0 - tho it is interesting that ipldevice is a character device, where a drive is usually a block device: mybox:rmiller$ ls -l /dev/ipl* crw------- 2 root system 23, 0 Jan 15 2002 /dev/ipldevice mybox:rmiller$ ls -l /dev/hdisk0 brw------- 1 root system 23, 0 Sep 13 2002 /dev/hdisk0 A: > Hi, > AIX 5.3 > I have a machine where /dev/ipldevice doesn't exit > I can reboot it safely ? > How I can I re-create it ? > Thanks in advance I did this today, and there is probably a more accepted way. I made a hard link from my rhdiskX device to /dev/ipldevice. If your boot device is /dev/hdisk0, then the command line would be as follows: ln /dev/rhdisk0 /dev/ipldevice Again, there is probably a more acceptable way to achieve this, but it worked for me. == thread: how to recover from an invalid or no boot device error in AIX Description When running the command "bosboot -ad /dev/ipldevice" in IBM AIX, you get the following error: 0301-150 bosboot: Invalid or no boot device specified! A device specified with the bosboot -d command is not valid. The bosboot command was unable to finish processing because it could not locate the required boot device. The installp command calls the bosboot command with /dev/ipldevice. If this error does occur, it is probably because /dev/ipldevice does not exist. /dev/ipldevice is a link to the boot disk. To determine if the link to the boot device is missing or incorrect : 1) Verify the link exists: # ls -l /dev/ipldevice ls: 0653-341 The file /dev/ipldevice does not exist. 2) In this case, it does not exist. To identify the boot disk, enter "lslv -m hd5". The boot disk name displays. # lslv -m hd5 hd5:N/A LP PP1 PV1 PP2 PV2 PP3 PV3 0001 0001 hdisk4 0001 hdisk1 In this example the boot disk name is hdisk4 and hdisk1. 3) Create a link between the boot device indicated and the /dev/ipldevice file. Enter: # ln /dev/boot_device_name /dev/ipldevice (An example of boot_device_name is rhdisk0.) In my case, I ran: # ln /dev/rhdisk4 /dev/ipldevice 4) Now run the bosboot command again: # bosboot -ad /dev/ipldevice Example lslv -m hd5; ln /dev/rhdisk4 /dev/ipldevice; bosboot -ad /dev/ipldevice Other mksysb errors on AIX 5.3: --------------------------------------- It turns out, that on AIX 5.3, on certain ML/TL levels (below TL 6), an mksysb error turns up, if you have other volume groups defined other than rootvg, while there is NO filesystem created on those Volume groups. Solution: create a filesystem, even only a "test" or "dummy" filesystem, on those VG's. >> thread 1: Q: Hi can't find any information about "backup structure of volume group, vios". included service: "savevgstruct vgname" working with errors: # lsvg rootvg vg_dev datavg_dbs # /usr/ios/cli/ioscli savevgstruct vg_dev Creating information file for volume group vg_dev.. Some error messages may contain invalid information for the Virtual I/O Server environment. cat: 0652-050 Cannot open /tmp/vgdata/vg_dev/fs_data_tmp. # ls -al /tmp/vgdata/vg_dev/ total 16 drwxr-xr-x 2 root staff 256 Apr 02 08:38 . drwxrwxr-x 5 root system 256 Apr 02 08:20 .. -rw-r--r-- 1 root staff 2002 Apr 02 08:35 filesystems -rw-r--r-- 1 root staff 1537 Apr 02 08:35 vg_dev.data # oslevel -r 5300-05 # df -k | grep tmp /dev/hd3 1310720 1309000 1% 42 1% /tmp A: I had this issue as well with VIO 1.3. I called IBM support about it and it is a known issue. The APAR is IY87935. The fix will not be released until AIX 5.3 TL 6, which is due out in June. It occurs when you run savevgstruct on a user defined volume group that contains volumes where at least one does not have a filesystem defined on it. The workaround is to define a filesystem on every volume in the user defined volume group. >> thread 2: IBM APAR Note: http://www-1.ibm.com/support/docview.wss?uid=isg1IY87935 IY87935: MKVGDATA/SAVEVG CAN FAIL APAR status Closed as program error. Error description The mkvgdata command when executed on a volume group that does not have any mounted filesystems: # savevg -f /home/vgbackup -i vg00 Creating information file for volume group vg00..cat: 0652-050 Cannot open /tmp/vgdata/vg00/fs_data_tmp. /usr/bin/savevg 33 : BACKUPSHRINKSIZE = 16 + FSSHRINKSIZE : 0403-009 The specified number is not valid for this command. Local fix Problem summary The mkvgdata command when executed on a volume group that does not have any mounted filesystems: # savevg -f /home/vgbackup -i vg00 Creating information file for volume group vg00..cat: 0652-050 Cannot open /tmp/vgdata/vg00/fs_data_tmp. /usr/bin/savevg 33 : BACKUPSHRINKSIZE = 16 + FSSHRINKSIZE : 0403-009 The specified number is not valid for this command. Problem conclusion Check variable. Temporary fix Comments APAR information APAR number IY87935 Reported component name AIX 5.3 Reported component ID 5765G0300 Reported release 530 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2006-08-09 Closed date 2006-08-09 ------- Note: ------- Recovery of the root filesystem on Solaris: =========================================== Restoring the root (/) File System -- To restore the / (root) file system, boot from the Solaris CD-ROM and then run ufsrestore. If / (root), /usr, or the /var file system is unusable because of some type of corruption the system will not boot. The following procedure demonstrates how to restore the / (root) file system which is assumed to be on boot disk c0t0d0s0. 1. Insert the Solaris 8 Software CD 1, and boot the CD-ROM with the single-user mode option. ok boot cdrom -s 2. Create the new file system structure. # newfs /dev/rdsk/c0t0d0s0 3. Mount the file system to an empty mount point directory, /a and change to that directory. # mount /dev/dsk/c0t0d0s0 /a # cd /a 4. Restore the / (root) file system from its backup tape. # ufsrestore rf /dev/rmt/0 Note - Remember to always restore a file system starting with the level 0 backup tape and continuing with the next lowest level tape up through the highest level tape. 5. Remove the restoresymtable file. # rm restoresymtable 6. Install the bootblk in sectors 1-15 of the boot disk. Change to the directory containing the bootblk, and run the installboot command. # cd /usr/platform/`uname -m`/lib/fs/ufs # installboot bootblk /dev/rdsk/c0t0d0s0 7. Unmount the new file system. # cd / # umount /a 8. Use the fsck command to check the restored file system. # fsck /dev/rdsk/c0t0d0s0 9. Reboot the system. # init 6 10. Perform a full backup of the file system. For example: # ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s0 Note - Always back up the newly created file system, as ufsrestore repositions the files and changes the inode allocation. Restoring the /usr and /var File Systems -- To restore the /usr and /var file systems repeat the steps described above, except step 6. This step is required only when restoring the (/) root file system. To restore a regular file system, (for example, /export/home, or /opt) back to disk, repeat the steps described above, except steps 1, 6, and 9. Example # newfs /dev/rdsk/c#t#d#s# # mount /dev/dsk/c#t#d#s# /mnt # cd /mnt # ufsrestore rf /dev/rmt/# # rm restoresymtable # cd / # umount /mnt # fsck /dev/rdsk/c#t#d#s# # ufsdump 0uf /dev/rmt/# /dev/rdsk/c#t#d#s# ------- Note: ------- thread 1: Q: Has anyone seen these errors before? We're running 6239 fc cards on a CX600. AIX level is 52-03 with the latest patches for devices.pci.df1000f7 as well. I didn't know that these adapters still used devices.pci.df1000f7 as part of their device driver set, but aparently they do. We're mostly seeing ERR4s on bootup and occassionaly throughout the day. They're TEMP but should I be concerned about this? Any help would be greatly appreciated! LABEL: SC_DISK_ERR4 IDENTIFIER: DCB47997 A: DISK_ERR_4 are simply bad-block relocation errors. They are quite normal. However, I heard that if you get more than 8 in an 8-hour period, you should get the disk replaced as it is showing signs of impending failure. thread 2: Q: > Has anyone corrected this issue? SC_DISK_ERR2 with EMC Powerpath = > filesets listed below? I am using a CX-500.=20 > A: got those errors before using a CX700 and it turned out to be a firmware problem on the fibre adapter, model 6259. EMC recommended the 92X1 firmware and to find out IBM found problems with timeouts to the drives and recommended going back a level to 81X1. A: We have the same problem as well. EMC say its a firmware error on the FC adapters A: This is how to fix these errors, downgrading firware is not recommended. Correcting SCSI_DISK_ERR2's in the AIX Errpt Log - Navisphere Failover Wizard 1. In the Navisphere main screen, select tools and then click the Failover Setup Wizard. Click next to continue. 2. From the drop-down list select the host server you wish to modify and click next 3. Highlight the CX-500 and click next 4. Under the specify settings box be sure to select 1 for the failover setting and disable for array commpath. Click next to process. 5. The next screen is the opportunity to review your selections (host, failover mode and array commpath); click next to commit 6. The following screen displays a warning message to alert you are committing these changes. Click yes to process. 7. Next login to the AIX command prompt as root and perform the following commands to complete stopping the SCSI_DISK_ERR2. a. lsdev -Cc disk | grep LUNZ (Filter for disks with LUNZ in the description) b. rmdev -dl hdisk(#)'s (Note the disks and remove them from the ODM) c. errclear 0 (Clear the AIX system error log) d. cfgmgr -v (Attempt to re-add the LUNZ disks) e. lsdev -Cc disk | grep LUNZ (Double check to make sure the LUNZ disk does not add itself back to the system after the cfgmgr command) f. errpt -a (Monitor the AIX error log to insure the SCSI_DISK_ERR2's are gone) Task Complete... E87EF1BE 0512150008 P O dumpcheck The largest dump device is too small. ------------------------------------------------------------------------------ Problems with errpt: -------------------- Invalid log, or other problems thread 1: Q: Hello ... the 'errpt' Command tells me: 0315-180 logread: UNEXPECTED EOF 0315-171 Unable to process the error log file /var/adm/ras/errlog. 0315-132 The supplied error log is not valid: /var/adm/ras/errlog. # ls -l /var/adm/ras/errlog -rw-r--r-- 1 root system 0 Jun 14 17:31 /var/adm/ras/errlog How can I fix this problem? A: /usr/lib/errstop # stop logging rm /var/adm/ras/errlog # get rid of that log. /usr/lib/errdemon # restart the daemon, creating a new error log. Some err identifiers that can sometimes be hard to trace to their true sources: =============================================================================== Take a look at those errpt entries: -------------------------------------------------------------------------- ERRPT ENTRY 1: -------------- LABEL: CORE_DUMP IDENTIFIER: C69F5C9B Date/Time: Thu Jan 15 02:00:45 MET 2009 Sequence Number: 999 Machine Id: 00CC94EE4C00 Node Id: srv1 Class: S Type: PERM Resource Name: SYSPROC Description SOFTWARE PROGRAM ABNORMALLY TERMINATED Probable Causes SOFTWARE PROGRAM User Causes USER GENERATED SIGNAL Recommended Actions CORRECT THEN RETRY Failure Causes SOFTWARE PROGRAM Recommended Actions RERUN THE APPLICATION PROGRAM IF PROBLEM PERSISTS THEN DO THE FOLLOWING CONTACT APPROPRIATE SERVICE REPRESENTATIVE Detail Data SIGNAL NUMBER 11 USER'S PROCESS ID: 1298680 FILE SYSTEM SERIAL NUMBER 57 INODE NUMBER 37134 CORE FILE NAME /var/core/core.1298680.15010044 PROGRAM NAME BS_sear STACK EXECUTION DISABLED 0 COME FROM ADDRESS REGISTER PROCESSOR ID hw_fru_id: 1 hw_cpu_id: 9 ADDITIONAL INFORMATION ?? ?? Unable to generate symptom string. (or as another example of the last lines, where you can see the "program name") PROGRAM NAME opmn STACK EXECUTION DISABLED 0 COME FROM ADDRESS REGISTER PROCESSOR ID hw_fru_id: 0 hw_cpu_id: 2 ADDITIONAL INFORMATION strlen 0 pmStrdup 14 Symptom Data REPORTABLE 1 INTERNAL ERROR 0 SYMPTOM CODE PCSS/SPI2 FLDS/opmn SIG/11 FLDS/strlen VALU/0 FLDS/pmStrdup -------------------------------------------------------------------------- POSSIBLE EXPLANATION: ===================== http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.security/doc/security/stack_exec_disable.htm AIXr has enabled the stack execution disable (SED) mechanism to disable the execution of code on a stack and select data areas of a process. By disabling the execution and then terminating, an infringing program, the attacker is prevented from gaining root user privileges through a buffer overflow attack. While this feature does not stop buffer overflows, it provides protection by disabling the execution of attacks on buffers that have been overflowed. Beginning with the POWER4T family of processors, you can use a page-level execution enable and/or disable feature for the memory. The AIX SED mechanism uses this underlying hardware support for implementing a no-execution feature on select memory areas. Once this feature is enabled, the operating system checks and flags various files during the executable programs. It then alerts the operating system memory manager and the process managers that the SED is enabled for the process being created. The select memory areas are marked for no-execution. If any execution occurs on these marked areas, the hardware raises an exception flag and the operating system stops the corresponding process. The exception and application termination details are captured through the AIX error log events. SED is implemented mainly through the sedmgr command. The sedmgr command permits control of the systemwide SED mode of operation as well as setting the executable file based SED flags. SED modes and monitoring The stack execution disable (SED) mechanism in AIXr is implemented through systemwide mode flags, as well as individual executable file-based header flags. While systemwide flags control the systemwide operation of the SED, file level flags indicate how files should be treated in SED. The buffer overflow protection (BOP) mechanism provides for four systemwide modes of operation: -- off The SED mechanism is turned off and no process is marked for SED protection. --select Only a select set of files are enabled and monitored for SED protection. The select set of files are chosen by reviewing the SED related flags in the executable program binary headers. The executable program header enables SED related flags to request to be included in the select mode. -- setidfiles Permits you to enable SED, not only for the files requesting such a mechanism, but all the important setuid and setgid system files. In this mode, the operating system not only provides SED for the files with the request SED flag set, but also enables SED for the executable files with the following characteristics (except the files marked for exempt in their file headers): .SETUID files owned by root .SETGID files with primary group as system or security -- all All executable programs loaded on the system are SED protected except for the files requesting an exemption from SED mode. Exemption related flags are part of the executable program headers. The SED feature on AIX also provides the ability to monitor instead of stopping the process when an exception happens. This systemwide control permits a system administrator to check for breakdowns and issues in the system environment by monitoring it before the SED is deployed in the production systems. The sedmgr command provides an option that permits you to enable SED to monitor files instead of stopping the processes when exceptions occur. The system administrator can evaluate whether an executable program is doing any legitimate stack execution. This setting works in conjunction with the systemwide mode set using the -c option. When the monitor mode is turned on, the system permits the process to continue operating even if an SED-related exception occurs. Instead of stopping the process, the operating system logs the exception in the AIX error log. If SED monitoring is off, the operating system stops any process that violates and raises an exception per SED facility. Any changes to the SED mode systemwide flags requires that you restart the system for the changes to take effect. All of these types of events are audited. -------------------------------------------------------------------------- ERRPT ENTRY 2: -------------- LABEL: SRC IDENTIFIER: E18E984F Date/Time: Fri Jan 16 09:31:33 MET 2009 Sequence Number: 1513 Machine Id: 00C503AC4C00 Node Id: heilbot Class: S Type: PERM Resource Name: SRC Description SOFTWARE PROGRAM ERROR Probable Causes APPLICATION PROGRAM Failure Causes SOFTWARE PROGRAM Recommended Actions PERFORM PROBLEM RECOVERY PROCEDURES Detail Data SYMPTOM CODE 0 SOFTWARE ERROR CODE -9053 ERROR CODE 2 DETECTING MODULE 'tellsrc.c'@line:'87' FAILING MODULE Duplicates Number of duplicates 3 Time of first duplicate Fri Jan 16 09:31:18 MET 2009 Time of last duplicate Fri Jan 16 09:31:33 MET 2009 POSSIBLE EXPLANATIONS: ====================== In entry 2, we see the identifier E18E984F, and "SOFTWARE ERROR CODE -9053", and "Detecting module tellsrc.c@line:87". tellsrc.c'@line:'87' http://www-01.ibm.com/support/docview.wss?uid=isg1IZ03064 IZ03064: VARYONVG -C FAILS WITH "GSCHILD:CANNOT REGISTER WITH DRIVER APPLIES TO AIX 5300-07 APAR status Closed as program error. Error description "varyonvg -c" fails to varyon concurrent volume group and reports the following error message: tellclvmd: request failed rc = -9014 [UNKNOWN rc] 0516-1334 varyonvg: The command /usr/sbin/tellclvmd returned an error. errpt logs following entry: LABEL: SRC IDENTIFIER: E18E984F Class: S Type: PERM Resource Name: SRC Description SOFTWARE PROGRAM ERROR Probable Causes APPLICATION PROGRAM Failure Causes SOFTWARE PROGRAM Recommended Actions PERFORM PROBLEM RECOVERY PROCEDURES Detail Data SYMPTOM CODE 0 SOFTWARE ERROR CODE -9053 ERROR CODE 74 DETECTING MODULE 'srcmstr.c'@line:'529' FAILING MODULE Local fix This problem occurs when multiple "varyonvg -nc" commands are performed together. By serializing these commands, this can be avoided. Problem summary Multiple varyonvg -c processes will all create threads in the gsclvmd daemon. With certain timing, these threads can interfere with eachothers global variables and possibly cause varyonvg to fail. Problem conclusion Privatize variables so mutliple vgs coming online can't interfere with eachother. Temporary fix Comments 5200-10 - use AIX APAR IZ05735 5300-06 - use AIX APAR IZ02334 5300-07 - use AIX APAR IZ03064 APAR information APAR number IZ03064 Reported component name AIX 5.3 Reported component ID 5765G0300 Reported release 530 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2007-08-14 Closed date 2007-09-04 Last modified date 2007-12-06 APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Publications Referenced Fix information Fixed component name AIX 5.3 Fixed component ID 5765G0300 error INTRPPC_ERR: ------------------ LABEL: INTRPPC_ERR IDENTIFIER: 853015D6 Date/Time: Sun Mar 22 00:27:49 MET 2009 Sequence Number: 1515 Machine Id: 00C503AC4C00 Node Id: starboss Class: H Type: UNKN Resource Name: sysplanar0 Resource Class: planar Resource Type: sysplanar_rspc Location: Description UNDETERMINED ERROR Probable Causes SYSTEM I/O BUS SOFTWARE PROGRAM ADAPTER DEVICE Recommended Actions PERFORM PROBLEM DETERMINATION PROCEDURES Detail Data BUS NUMBER 9001 00C0 INTERRUPT LEVEL 0009 0001 Number of Occurrences 0000 0001 Possible explanations: ---------------------- thread 1: IY58847: INTRPPC_ERR ERRORS IN ERROR LOGS A fix is available Download fix packs APAR status Closed as program error. Error description INTRPPC_ERR errors were observed in the error log while customer ran a testcase as mentioned in the defect. Local fix Problem summary INTRPPC_ERR errors were observed in the error log while customer ran a testcase, which brings up and down the phxentdd interface in a infinite loop. A ping is executed using the ip address associated with this interface. Problem conclusion A simple code change to ignore the interrupts while driver is in closing state. Temporary fix Comments APAR information APAR number IY58847 Reported component name AIX 5L FOR POWE Reported component ID 5765E6100 Reported release 510 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2004-07-13 Closed date 2004-07-13 Last modified date 2004-10-29 APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Publications Referenced Fix information Fixed component name AIX 5L FOR POWE Fixed component ID 5765E6100 Applicable component levels R510 PSY U477721 UP04/10/29 I 1000 thread 2: > > I've recently started getting INTRPCC_ERR's on an old (but important!) > > aix 4.3 box. They dont seem to correspond to anything else and the > > box seems to be working normally. I found a way to lookup the BUS > > NUMBER via odmget -q value= CuAt, but that didn't return anything > > for me. Also looking for the interrupt number via lsresource didn't > > give any matches either. And diag/Advanced Diagnostics/Problem > > Determination didn't find any trouble. > > > Any other suggestions on how to track this down? > > > Thanks, > > > LABEL: INTRPPC_ERR > > IDENTIFIER: DADF69E4 > > > Date/Time: Wed Jul 11 08:51:41 > > Sequence Number: 735309 > > Machine Id: 000247824C00 > > Node Id: scully > > Class: H > > Type: UNKN > > Resource Name: SYSINTR > > Resource Class: NONE > > Resource Type: NONE > > Location: NONE > > > Description > > UNDETERMINED ERROR > > > Probable Causes > > SYSTEM I/O BUS > > SOFTWARE PROGRAM > > ADAPTER > > DEVICE > > > Recommended Actions > > PERFORM PROBLEM DETERMINATION PROCEDURES > > > Detail Data > > BUS NUMBER > > 0000 00C0 > > INTERRUPT LEVEL > > 0000 0005 > > convert the bus number from hex, then look for that value in `ls -l / > dev` .... but it is more than likely a device driver issue rather than the device itself. thread 3: Here's how to map the error information to a specific adapter. Let's do that first. >Detail Data >BUS NUMBER >0000 00C0 >INTERRUPT LEVEL >0000 0005 Example: Detail Data BUS NUMBER 0000 00C0 INTERRUPT LEVEL 0000 0003 lsresource -al pci0 | grep 0x000000C0 --> O pci0 0x8d5c_5 0x000000c0 - 0x000000df lsresource -al pci0 | grep 3 | grep bus_intr_lvl --> N sa1 bus_intr_lvl 3 Note: lsresource command example: --------------------------------- selalbe@starboss:/home/beab_krn/selalbe $ lsresource -al pci0 TYPE DEVICE ATTRIBUTE S G CURRENT B pci0 0xda40_1 0x0000000080080000 - 0x00000000800bffff B pci0 0xdfa8_1 0x0000000080000000 - 0x000000008003ffff B ent0 busmem 0x0000000080120000 - 0x000000008013ffff B ent0 rom_mem 0x00000000800c0000 - 0x00000000800fffff B ent1 busmem 0x0000000080100000 - 0x000000008011ffff B ent1 rom_mem 0x0000000080040000 - 0x000000008007ffff O pci0 0xda40_0 0x00000000000df800 - 0x00000000000df83f O pci0 0xdfa8_0 0x00000000000dfc00 - 0x00000000000dfc3f I ent0 busintr 249 (A1) I ent1 busintr 250 (A1) ------- Note: ------- diag command: ------------- Whenever a hardware problem occurs in AIX, use the diag command to diagnose the problem. The diag command is the starting point to run a wide choice of tasks and service aids. Most of the tasks/service aids are platform specific. To run diagnostics on the scdisk0 device, without questions, enter: # diag -d scdisk0 -c ------- Note: ------- System dumps: ------------- A system dump is created when the system has an unexpected system halt or system failure. In AIX 5L the default dump device is /dev/hd6, which is also the default paging device. You can use the sysdumpdev command to manage system crash dumps. The sysdumpdev command changes the primary or secondary dump device designation in a system that is running. The primary and secondary dump devices are designated in a system configuration object. The new device designations are in effect until the sysdumpdev command is run again, or the system is restarted. If no flags are used with the sysdumpdev command, the dump devices defined in the SWservAt ODM object class are used. The default primary dump device is /dev/hd6. The default secondary dump device is /dev/sysdumpnull. Examples To display current dump device settings, enter: sysdumpdev -l To designate logical volume hd7 as the primary dump device, enter: sysdumpdev -p /dev/hd7 To designate tape device rmt0 as the secondary dump device, enter: sysdumpdev -s /dev/rmt0 To display information from the previous dump invocation, enter: sysdumpdev -L To permanently change the database object for the primary dump device to /dev/newdisk1, enter: sysdumpdev -P -p /dev/newdisk1 To determine if a new system dump exists, enter: sysdumpdev -z If a system dump has occurred recently, output similar to the following will appear: 4537344 /dev/hd7 To designate remote dump file /var/adm/ras/systemdump on host mercury for a primary dump device, enter: sysdumpdev -p mercury:/var/adm/ras/systemdump A : (colon) must be inserted between the host name and the file name. To specify the directory that a dump is copied to after a system crash, if the dump device is /dev/hd6, enter: sysdumpdev -d /tmp/dump This attempts to copy the dump from /dev/hd6 to /tmp/dump after a system crash. If there is an error during the copy, the system continues to boot and the dump is lost. To specify the directory that a dump is copied to after a system crash, if the dump device is /dev/hd6, enter: sysdumpdev -D /tmp/dump This attempts to copy the dump from /dev/hd6 to the /tmp/dump directory after a crash. If the copy fails, you are prompted with a menu that allows you to copy the dump manually to some external media. Starting a system dump: ----------------------- If you have the Software Service Aids Package installed, you have access to the sysdumpstart command. You can start the system dump by entering: # sysdumpstart -p You can also use: # smit dump Notes regarding system dumps: ----------------------------- The_Nail wrote: > I handle several AIX 5.1 servers and some of them warns me (via errpt) > about a lack of disk space for the dumpcheck ressource. > Here is a copy of the message : > > Description > The copy directory is too small. > > Recommended Actions > Increase the size of that file system. > > Detail Data > File system name > /var/adm/ras > > Current free space in kb > 7636 > Current estimated dump size in kb > 207872 > I guess /dev/hd6 is not big enough to contain a system dump. So how > can i change that? The error message tells you something else. Read it, and you will understand! > How can i configure a secondary susdump space in case the primary > would be unavailable? sysdumpdev -s /dev/whatever > What does "copy directory /var/adm/ras" mean? That's where the crash dump will be put when you reboot after the crash. /dev/hd6 will be needed for other purposes (paging space), so you cannot keep your system dump there. And that file system is too small to contain the dump, that's the meaning of the error message. You have two options: - increase the /var file system (it should have ample free space anyway). - change the dump directory to something where you have more space: sysdumpdev -D /something/in/rootvg/with/free/space Yours, Laurenz Albe Suppose you find the following error: $ errpt IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION F89FB899 0822150005 P O dumpcheck The copy directory is too small This message is the result of a dump device check. You can fix this by increasing the size of your dump device. If you are using the default dump device (/dev/hd6) then increase your paging size or go to smit dump and "select System Dump Compression". Myself, I don't like to use the default dump device so I create a sysdumplv and make sure I have enough space. To check space needed go to smit dump and select "Show Estimated Dump Size" this will give you an idea about the size needed. The copy directory is whatever sysdumpdev says it is. Run sysdumpdev and you will get something like #sysdumpdev primary /dev/hd6 secondary /dev/sysdumpnull copy directory /var/adm/ras forced copy flag TRUE always allow dump FALSE dump compression ON # sysdumpdev -e 0453-041 Estimated dump size in bytes: 57881395 Divide this number by 1024. This is the free space that is needed in your copy directory. Compare it to a df -k or divide this number by 512. This is the free space that is needed in your copy directory. Compare it to a df Suppose you find the following error: selalbe@wijting:/home/beab_krn/selalbe $ errpt IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION E87EF1BE 0309150009 P O dumpcheck The largest dump device is too small. thread: do sysdumpdev -l you should see both primary and secondary dump devices from this you need to ensure that these are big enough to hold a system dump so type sysdumpdev -e to get an estimate on the dump size and resize your dump devices accordingly. Try to increase these above the value you have if it is a new system allow for growth of the system and give it plenty of space if possible thread: ------- Note: ------- Notes on SDD and SDDPCM: ======================== Note 1: ------- thread Q +A: > I've been reading IBM web sites and PDF manuals and still can't decide > on exactly how to upgrade my AIX 4.3.3 machine to AIX 5.2 and have my > ESS SDD vpath disks visible and working when I'm done. > > Has someone done this? Can you comment on my proposed method here? Yes, I've done this. > What I think I need to do is this: > > 1. Do the migration installation from 4.3.3 to 5. Question: Do I need to > do anything to my ESS disks BEFORE migrating? Unmount? Vary off volume > groups? Export volume groups? Yes to all of the above, prior to upgrade. Uninstall SDD software. > 2. After the migration, and reboot, I understand that the ESS disks will > not "be there", since the migration does not upgrade the SDD (subsystem > device driver) does NOT get upgraded. Question: Is this true? Yes, the datapath devices will be gone because you deleted the SDD software; IIRC, that is part of the un-install process. After your upgrade, install SDD just like the first time. This will get you your hdisks and vpaths back, though not necessarily with the same numbers; have a 'lsvpcfg' from before your upgrade to cross-reference your new setup to. 'importvg' the VG(s) one at a time, using one of the hdisk's which constitute the vpath, then run 'hd2vp' on the VG. That will convert the VG back to using the vpath's. Note: IIRC, If I Recall/Remember Correctly > > 3. Vary off all ESS volume groups, if I shouldn't have done this back in > step 1. > > 4. Remove all the "datapath devices", via: rmdev -dl dpo -R > > 5. Uninstall the 4.3 version of the SDD. > > 6. Install the 5.2 version of the SDD. > > 7. Install the latest PTF of the 5.2 SDD, that they call version > 1.5.1.3. > > 8. Reboot. > > > If you can tell me how to make this procedure more nearly correct, I'd > greatly appreciate it. Note 2: ------- thread Q + A: > > I need a quick refresher here. I've got a HACMP (4.4) cluster with SAN- attached > ESS storage. SDD is installed. Can I add volumes to one of these volume groups on > the fly, or does HA need to be down? It's been awhile since I have done this and I > can't quite remember if I have to jump through any hoops. Thanks for the help. Should be relatively easy with no downtime required. 1) acquire the new disks on primary node (where the VG is in service) with: cfgmgr -Svl fcs0 - repeat this for all fcs adapters in system 2) convert hdisks to vpaths, note use the smit screens for this because the commands have changed from version to version. 3) add vpaths to VG with: extendvg4vp vgname vpath# 4) create LVs/filesystems on the vpaths. 5) break VG/scsi locks so that other systems can see the disks with: varyonvg -b -u vgname 6) perform steps 1 & 2 for all failover nodes in the cluster. 7) refresh the VG definitions on all the failover nodes with: importvg -L vgname vpath# 8) reestablish disk locks on service node with: varyonvg vgname 9) add new filesystems to HA configuration. 10) synchronise HA resources to the cluster. Note 3: ------- From IBM Doc SC30-4131-00: hd2vp and vp2hd SDD provides two conversion scripts, hd2vp and vp2hd. The hd2vp script converts a volume group from supported storage device hdisks to SDD vpath devices, and the vp2hd script converts a volume group from SDD vpath devices to supported storage device hdisks. Use the vp2hd program when you want to configure your applications back to original supported storage device hdisks, or when you want to remove SDD from your AIX host system. The syntax for these conversion scripts is as follows: hd2vp vgname vp2hd vgname vgname Specifies the volume group name to be converted. Note 4: ------- thread Q: Hi There, I want to add a vpath to running hacmp cluster with HACMP 5.1 on AIX 5.2 with Rotating Resource Group. If anyone has done it before then can provide a step by step procedure for this. Do i need to stop and start HACMP for this? A: On Vg active node : #extendvg4vp vg00 vpath10 vpath11 #smitty chfs ( Increase the f/s as required ) #varyonvg -bu vg00 ( this is to un-lock the vg) On Secondary node where vg is not active : # cfgmgr -vl fscsi0 ( fscsi1 and fcs0 and fcs1 ) Found new vpaths # chdev -l vpath10 -a pv=yes ( for vpath11 also ) # lsvg vg00|grep path ( just note down any one vpath which is from this o/p-for e.g vpath0 ) # importvg vg00 vpath0 Once its fine...go to Primary Node # varyonvg vg00 ( Locking the VG ) Regards Note 5: ------- > HI, > Is there a way to know dependencies between devices. > For example, > hdisk2 is attached to fscsi0 which in turn is attached to fcs0 > I have found nothing in lsdev's man > Do I have to look in the odm directly > I need this in order to improve a script This is a good question and the lsdev man page should be burned in front of the building where they develop and document AIX in Austin, TX, for not answering it for you. After all, you bothered to read the damn thing; why didn't it tell you? $ /usr/sbin/lsdev -Cc adapter -F 'name parent' ppa0 isa0 sa0 isa0 sa1 isa0 sa2 isa0 siokma0 isa0 fda0 isa0 scsi0 pci0 ent0 pci0 cxpa0 pci0 ent1 pci0 mga0 pci1 ent2 pci1 scsi1 pci2 sioka0 siokma0 sioma0 siokma0 ent3 pci0 There's also the lsparent command. Regards, Actually, I have the same question as Frederic and you have not quite answered it. Sure, lsdev can tell you that "hdisk5" is matched to "fcs0" . . . but what tells you that "fcs0" in turn matches to "fscsi0"? And if "hdisk126" matches to adapter "fchan1", how do I determine what that matches to? I've checked all of the various lsxxxx commands but can't find this bit of info. ONCE AGAIN the answer pops up just moments after announcing to the world that "there's no way to do that" and "I've looked everywhere and tried everything". Herewith the output from the necessary commands, with extraneous lines removed: # lsdev -C -c disk -F 'name location' hdisk0 11-08-00-2,0 hdisk1 11-08-00-4,0 hdisk2 3A-08-01 hdisk3 3A-08-01 hdisk4 27-08-01 hdisk5 27-08-01 # lsdev -C -c driver -F 'name location' fscsi0 27-08-01 fscsi1 3A-08-01 # lsdev -C -c adapter -F 'name location' scsi0 11-08 scsi1 11-09 fcs0 27-08 mg20 2D-08 fcs1 3A-08 # Obviously it is a simply matter to match disk to adapter to driver by the location of each object. After that I can easily sprintf(pathname, "/dev/%s", driver); fp = open(pathname, O_RDONLY | O_NDELAY); ioctl(fp, SCIOINQU, &info); to get the scsi inquiry buffer. Note 6: ------- thread Q: where to fidnd a guide for the adapter (described all its states, LED blinkging/lighting) Adapter is cabled by SAN guys, they double checked it and when I run: rmdev -Rl fcs0 cfgmgr -l fcs0 lsattr -El fscsi0 -l attach I don't see "switch" but "none". thx in advance. A: Did you check SAN Switch Zoning? Regards, Do something like: rmdev -Rdl fscsi0 rmdev -dl fcnet0 rmdev -l fcs0 cfgmgr -l fcs0 rmdev -Rdl fscsi0 rmdev -Rdl fscsi1 rmdev -l fcs1 This way, the FC adapter re-negociates an FC fabric logon. HTH, I had already done something similiar but it didn't helped: # lsslot -c slot|grep fcs0 U787B.001.DNWFFM5-P1-C4 Logical I/O Slot pci4 fcs0 # rmdev -dl pci4 -R fcnet0 deleted fscsi0 deleted fcs0 deleted pci4 deleted # cfgmgr Method error (/usr/lib/methods/cfgefscsi -l fscsi0 ): 0514-061 Cannot find a child device. # lsattr -El fscsi0 -a attach attach none How this adapter is CONNECTED False the second FC is connected ok: # lsattr -El fscsi1 -a attach attach switch How this adapter is CONNECTED False # thx anyway, I will ask my SAN team to check cables once more. Note 7: ------- thread hdisk and vpath correspondance for IBM SAN (shark) Description Correspondance between phsical disks: 4 hdisk = 1 vpath = 1 physical disk To remove all vpaths run the command: # rmdev -dl dpo -R To remove all fibre channel disks (2 cards in this example): # rmdev -dl fscsi0 -R # rmdev -dl fscsi1 -R To recreate the hdisks run the command: # cfgmgr -vl fcs0 # cfgmgr -vl fcs1 To recreate the vpaths run the command: # cfallvpath To delete a device run this command: # rmdev -l fcs1 -d Example rmdev -dl dpo -R ; rmdev -dl fscsi0 -R ; cfgmgr -vl fcs0 ; cfallvpath Note 8: ------- Technote (FAQ) Problem When non-root AIX users issue SDD datapath commands, the "No device file found" message results. Cause AIX SDD does not distinguish between file not found and invalid permissions. Solution Login as the root user or "su" to root user and re-execute command in order to obtain the desired SDD datapath command output. Note 9: ------- (thread ibm site) Question: Hi, I have an AIX 5.3 server running with 2 FCs. One on a DS8300 and one on a DS4300. On the server, i have a filesystems that is mounted and active (hdisks are from the DS8300). I can access it fine, write, delete etc... Yet, when i do a "datapath query adapter" i get the following : # datapath query adapter Active Adapters :1 Adpt# Name State Mode Select Errors Paths Active 0 fscsi0 NORMAL ACTIVE 4111177 0 32 0 I would expect to see my 32 paths Active. I checked another server that has a similar configuration (though it only has 1 FC) and i can see 32 Paths, 32 Active... Is it because of the other FC being connected to a DS4300? Answer: Hi. The reason is that the vpaths are not part of a varied on volume group. If you do a 'datapath query device' you should find all the paths will be state=closed. If the vpaths are being used by a volume group, do a varyonvg xxxx. Then display the datapath and the paths should be active. Question: Hi. THanks, but as i mentionned in my original post, the VG is varied on and the FS is mounted. I ran the datapath command after i i varyonvg bkpvg and mount /backup. I then dumped a DB within the FS, deleted and everything else works...yet datapath query adapter shows no Active paths...weird... Question: Hi. What version of SDD? What does 'datapath query device' say? Answer: Version of SDD is 1.6.0.5 And a datapath query device shows : ... DEV#: 14 DEVICE NAME: vpath14 TYPE: 2107900 POLICY: Optimized SERIAL: 75AYYV111B7 =========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk40 CLOSE NORMAL 147989 0 1 fscsi0/hdisk23 CLOSE NORMAL 0 0 DEV#: 15 DEVICE NAME: vpath15 TYPE: 2107900 POLICY: Optimized SERIAL: 75AYYV111B8 =========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk41 CLOSE NORMAL 155256 0 1 fscsi0/hdisk24 CLOSE NORMAL 0 0 yet, as i mentionned, my FS /backup is mounted and accessible... Note 10: -------- thread Q: Hi All, I am having problems on a p570 on which there are 3 HBA cards. 2 of the HBAs are connected via a SAN switch to an ESS 800. It appears only one of the "paths" to the ESS 800 is working As I only have one set of view of the disks on the ESS. Running cfgmgr on the adapter gives the following error. I have tried removing fscsi0 then unconfiguring fcs0, Then reconfiguring fcs0 but I still get the same error. Any ideas? Is there some command/utility I can run to verify The state of ths HBA? Thank you. bash-3.00# cfgmgr -l fcs0 Method error (/usr/lib/methods/cfgefscsi -l fscsi0 ): 0514-061 Cannot find a child device. bash-3.00# 0514-061 Cannot find a child device A: HI I have had the same problem using HDS SAN devices. AT that time I did not have the corect version off the device driver for the fiber cards in P570. For aix 5.2 devices.pci.df1000fa >= 5.2.0.40 For aix 5.3 devices.pci.df1000f7 >= 5.3.0.10 /HGA Note 11: -------- Greetings: The "0514-061 Cannot find a child device" is common when the FC card is either not attached to a FC device, or if it is attached, then I would look at the polarity of the cable ie. (tx -> rx and rx -> tx) NOT (tx -> tx and rx -> rx) cfgmgr is attempting to configure the FC device it is connected to (child device) but is unable to see it. In this context, device would be some sort of FC endpoint, not just a switch or director. I would make sure the FC card has connectivity to a FC device, not just the fabric and re-run cfgmgr. -=Patrick=- "Vincent D'Antonio, III" on 02/19/2003 01:51:24 PM Please respond to IBM AIX Discussion List To: aix-l@Princeton.EDU cc: (bcc: Patrick Bigelbach/DSS) Subject Re: Cannot cfgmgr on a new FC Put in your OS cd in the cdrom drive and run: cfgmgr -vi /dev/cd0 this should load any filesets you need for the adapter if they are not already there. You should the adapter in lsdev -Cc adapter | grep fs. HTH Vince -----Original Message----- From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of Calderon, Linda Sent: Wednesday, February 19, 2003 10:12 AM To: aix-l@Princeton.EDU Subject: Cannot cfgmgr on a new FC I am trying to connect a new HBA on a P660 to a switch for a SAN. This HBA has not been used previously, newly cabled etc. I issued the following commands and receive the following errors: * rmdev -Rdl fsc1 0514-519 The following device was not found in the customized device configuration database: name 'fcs1' * cfgmgr 0514-061 Cannot find a child device Looking for ideas as to root cause. Note 12: -------- thread Q: Hi All AIXers, I am trying to add some vpath to Current Volume Group (which is on vpath)and i am getting this error Method Error (/usr/lib/methods/chgvpath): 0514-047 Cannot access a device 0516-1182 extendvg open failure on vpath3 0516-792 extendvg: Unable to estend a Volume Group Do anybody have any idea about this error. I never seen this error before. Thanks A: James, If you're adding a vpath to a volume group that has other vpaths, you will need to use extendvg4vp instead of extendvg. Hope this helps! Note 13: -------- On Vg active node : #extendvg4vp vg00 vpath10 vpath11 #smitty chfs ( Increase the f/s as required ) #varyonvg -bu vg00 ( this is to un-lock the vg) On Secondary node where vg is not active : # cfgmgr -vl fscsi0 ( fscsi1 and fcs0 and fcs1 ) Found new vpaths # chdev -l vpath10 -a pv=yes ( for vpath11 also ) # lsvg vg00|grep path ( just note down any one vpath which is from this o/p-for e.g vpath0 ) # importvg vg00 vpath0 Once its fine...go to Primary Node # varyonvg vg00 ( Locking the VG ) Regards Note 14: -------- thread How to add a a new PV into an existing concurrent mounted VG. The PMR action plan suggests: - stop of the resource group - varyoffvg dummyvg - varyonvg -nc dummyvg - extendvg4vp dummyvg vpath0 - start of the resource group as a backup action - restart of the cluster - extendvg4vp dummyvg vpath0 - start of the resource group After a spech with the Country IBM referent we modify the action plan in: - stop of the cluster - varyoffvg dummyvg - varyonvg dummyvg dummyvg should remain Enhanced Concurrent Capable, but I mount it in normal mode to do the extentions - extendvg4vp dummyvg vpath0 - importvg -L dummyvg disk on the other node of the cluster - varyoffvg dummyvg - cluster verification & syncro - start of the cluster Anyway before applying the modified action plan I try to follow the original one, but with unpredictable return codes. With some vpaths works, with someothers halfworks (update the VGDA, but not the odm), with others return the original error. In my opinion there is an high probability that the cause is in gsclvmd... So, a bit disappointed, I applied the modified plan. All works and the extendvg4vp enlarged the dummyvg... My machines are too downlevel and very full of lacks :-( After that my curiosity pulls me to try the next step: mirrorvg -s -c 2 dummyvg vpath0 vpath1 0516-1509 : VGDA corruption: physical partition info for this LV is invalid. 0516-842 : Unable to make logical partition copies for logical volume. 0516-1199 mirrorvg: Failed to create logical partition copies for logical volume dummylv. 0516-1200 mirrorvg: Failed to mirror the volume group Now, IBM support is working for analyze this new issue...... Regards. Note 15: cfgmgr method errors: ------------------------------ 1: == APAR status Closed as program error. Error description Users of the 64bit kernel may observe an error when cfgmgr is invoked at runtime in the cfgsisscsi or cfgsisioa config methods. Following is an example: # cfgmgr Method error (/usr/lib/methods/cfgsisscsi -l sisscsia0 ): 0514-061 Cannot find a child device. The error occurs in the cfgsisscsi or cfgsisioa routines which automatically update the microcode on the adapter if it is found to be at a level lower than the minimum supported microcode level. If the adapter was previously unconfigured, the adapter will remain in the Defined state. A system reboot should make it Available. APAR information APAR number IY48873 Reported component name AIX 5L POWER V5 Reported component ID 5765E6200 Reported release 520 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2003-09-19 Closed date 2003-09-19 Last modified date 2003-10-24 Note 16: cfgmgr method errors: ------------------------------ Q: cfgmgr error-- devices are reported twice Asked by kuntal_acharyy... on 11/28/2005 6:15:00 AM I have an IBM DS4400 with two EXP 700s expansion units connected to a pSeries 650 with AIX 5.1.I have created two logical drives in the storage unit.When i run "cfgmgr" to recognise the new raw physical volume each disk is reported twice. hdisk4 Available 1n-08-01 1742 (700) Disk Array Device hdisk5 Available 1n-08-01 1742 (700) Disk Array Device hdisk6 Available 11-08-01 1742 (700) Disk Array Device hdisk7 Available 11-08-01 1742 (700) Disk Array Device There is an error message while running cfgmgr: Method error (/etc/methods/cfgfdar -l dar0 ): 0514-002 Cannot initialize the ODM. cfgmgr: 0514-621 WARNING: The following device packages are required for device support but are not currently installed. devices.scsi What may have cause the problem ? How ca I solve this problem? Any advice is truly welcome. A: hi, I had met the same problem just as yours. 3 LPARs(AIX 5300-02) on a p570 connect FastT600(Ds4300) with 2 HBA cards each, using SAN fibre switch. 2 of the LPARs reported hdisk twice, and 1 of them reported normally. And I found that the HBA cards on the normal one are in the PCI Slots belong to different BUSs, and the HBA cards on unnormal ones are in the same BUSs. Then I changed HBA cards to different BUSs' slots, deleted all the dar dac and HBA cards in the system, and cfgmgr at last. The problem got solved. I guess there must be some thing wrong with the BUS design. Some one told me that he solved the problem by install the last patch (AIX 5300-03). So my advice is that you should chang the HBA cards to differet slots, clear the system and cfgmgr. Or maybe update your AIX with the last patch. Just try and tell me the result. Good luck! Note 17: cfgmgr method errors: ------------------------------ ed.malina@uvm.edu (Ed) wrote in message news:... > I deleted a scsi device from my 4.3.3 configuration with the following > command: > rmdev -l scsi2 -dR > > The device is a dual channel ultra scsi 3 card. I deleted it to try > to resolve some performance problems with a drawer connected to the > device. Incidentally, scsi3 which is the other side of the dual > channel card, is working fine. > > When I try to reconfigure the device with: > cfgmgr -v -lscsi2 > > I get the following error: > > Method error (/usr/lib/methods/cfgncr_scsi -l scsi2 ): > 0514-034 The following attributes do not have valid values: > > Any thoughts on how to fix it? For the timebeing I can't reboot the > machine. Would a reboot be able to resolve the problem if there is no > other solution? > > Thanks! > -- Ed #>> Ed, what you probably should do is run the cfgmgr comand without the device name behind it. Because you deleted the scsi device with the options -dR you also removed any child devices. try this: cfgmgr -v Note 18: cfgmgr method errors: ------------------------------ Q: Hi... Does someone know what to do with an SDD driver which can't detect vpaths from an ESS F20 but hdisks are already available on AIX? showvpath, cfgvpath, datapath query commands don't display or found anything By the way, rebooting the system didn't help I accept any suggestions. Regards Luis A. Rojas A: Thank you all for your suggestions I solve the problem using the hd2vp command which converts the logical hdisk to its related vpath. And Wal? !.. vpaths suddenly were recognized by cfgvpath command. I don't know why this happened, but, everything is OK now. To those people with similar problems, please check these following commands: dpovgfix, hd2vp, vp2hd Best Regards Note 19: fget_config: --------------------- how to show the current state and volume (hdisk) ownership in a IBM DS4000 Description The fget_config command shows the current state and volume (hdisk) ownership. To display controllers and hdisks that are associated with a specified DS4000 (dar): # fget_config To display the state of each controller in a DS4000 array, and the current path that is being used for I/O for each hdisk: # fget_config -A Example fget_config -A Note 20: -------- Q: dpovgfix, hd2vp, vp2hd Asked by RandallGoff on 1/23/2007 9:38:00 AM What filesets do dpovgfix, hd2vp and vp2hd belong to. I installed my sdd driver and can see everything but can't find these commands. A: They are part of your SDD drivers. You probably installed the devices.xxx filesets. Did you also install the host attachment script... the ibm2105 filesets? Note 21: -------- thread Q: Hi I have several AIX LPARS running on SVC controlled disks. Right now i have SDD SW 1.6.1.2. After configuration i have some vpath devices that can be managed using the datapath command. Now in a recent training of SVC i was asked to install the new SDDPCM driver in order to get some of the benefits of this SW driver. SDDPCM does not use the concept of vpath anymore, instead a hdisk device object is created. This object has definitions and attributes in ODM files. Recently i had to change a faulty HBA under SDD drivers. I was able to: 1- datapath query device: in order to check hdisk devices belonging to the faulty adaptr. 2- datapath query adapter: in order to check the faulty adapter. 3- datapath set adapter XX offline: in order to put the faulty HAB offline. 4- datapath remove adapter XX 5- Used the diag Hot Plug option to remove the PCI-x HBA and install a new one. Configured the system and modified the corresponden zone. How to do the same with SDDPCM even when there's no concept of vpath anymore. Thanks in advanced A: Hello , You can do the same with sddpcm , either using the MPIO commands or smitty screens , smitty devices ---> MPIO devices there you can list paths , remove paths , adapters. IN the SDD user guide there is a complete section describing what you can do , but same functions you use for the vpath , you can use for sddpcm. Here is the link for the latest user guide http://www-1.ibm.com/support/docview.wss?rsP3&con text=ST52G7&dc=DA490&dc=DA4A30&dc=DA480&dc=D700&dc =DA410&dc=DA4A20&dc=DA460&dc=DA470&dc=DA400&uid=ss g1 S7000303&loc=en_US&cs=utf-8&lang=en Note 22: -------- thread Q: Greetings: Has anyone encountered the 0516-1182 ( mkvg: Open Failure on vpath ) or 0516-826 ( mkvg: Unable to create volume group ) errors while trying to create a new volume group ? I attempted to create a new volume group using a couple of newly added vpath devices and received those errors. Any help will be greatly appreciated. Thanks in advance. Jay. A: Hi If using vpath devices then you can confirm that you can open any given device by running: datapath query device and confirm there's no error in the HBA communications. Also you can review the errpt reports in order to look for VPATH OPEN messages. You can also use the lquerypr command in order to check for SCSI reservations in the SAN box previously set by another host (in case of a cluster). Hope this helps Example lquerypr output # lquerypr -Vh /dev/hdisk12 connection type: fscsi1 open dev: /dev/hdisk12 Attempt to read reservation key... Attempt to read registration keys... Read Keys parameter Generation : 52 Additional Length: 32 Key0 : c8ca9d09 Key1 : c8ca9d09 Key2 : c8cabd09 Key3 : c8cabd09 Reserve Key provided by current host = c8cabd09 Not reserved. Note 23: -------- thread Q: All, I'm in the process of preparing for our upcoming disaster recovery exercise which is happening in a few weeks. Our plan is to create one big volume group, instead of a bunch of little ones like we have in our production environment, to try and save some time. My question is, is there a way to script using a for/next loop to assign each hdisk/vpath when creating a new volume group instead of going into smit and assigning them one by one by hand? The hdisks will be sequential and will probably be over a hundred in number so you can imagine how tedious this will be. Also, this will need to be bigvg enabled. Any of you scripters out there have any suggestions? Thanks for your help in advance! A: Create the VG >mkvg -B -y datavg vpathN Extend it for i in `lspv | grep vpath | grep None | awk '{print #1}'` do extendvg datavg $i done That would assign all unused vpaths to the VG. BTW Use the vpath and not the hdisk. You could add a count into it to limit the number of disks you assign. Note 24: -------- thread Q: Is anyone aware of a problem if i do a cfgmgr -vl dp0 and once the vpaths are made it shows as vpathxx none None and then i add the vpath to VG #extendvg VGname vpathxx Does this create a problem ? A: it sound like the vpath is showing correctly after cfgmgr so thats OK. But you need to use extendvg4vp and not just extendvg Do a 'smitty vg' and choose 'Add a Data Path Volume to a Volume Group' Once its added to a VG then it will show more info in lspv Note 25: cfgmgr Method error (/usr/sbin/fcppcmmap > /etc/essmap.out): --------------------------------------------------------------------- Method error (/usr/sbin/fcppcmmap > /etc/essmap.out): 0514-001 System error: Note 26: mkpath, lspath commands: --------------------------------- Examples mkpath: --To define and configure an already defined path between scsi0 and the hdisk1 device at SCSI ID 5 and LUN 0 (i.e., connection 5,0), enter: # mkpath -l hdisk1 -p scsi0 -w 5,0 The system displays a message similar to the following: path available --To configure an already defined path from 'fscsi0' to fiber channel disk 'hdisk1', the command would be: # mkpath -l hdisk1 -p fscsi0 The message would look similar to: path available --To only add to the Customized Paths object class a path definition between scsi0 and the hdisk1 disk device at SCSI ID 5 and LUN 0, enter: # mkpath -d -l hdisk1 -p scsi0 -w 5,0 The system displays a message similar to the following: path defined Examples lspath: lspath displays information about paths to an MultiPath I/O (MPIO) capable device. Examples of displaying path status: -- To display the status of all paths to hdisk1 with column headers, enter: # lspath -H -l hdisk1 The system will display a message similar to the following: status device parent enabled hdisk1 scsi0 disabled hdisk1 scsi1 missing hdisk1 scsi2 -- To display, without column headers, the set of paths whose operational status is disabled, enter: # lspath -s disabled The system will display a message similar to the following: disabled hdisk1 scsi1 disabled hdisk2 scsi1 disabled hdisk23 scsi8 disabled hdisk25 scsi8 --To display the set of paths whose operational status is failed, enter: # lspath -s failed The system will display a message similar to the following: failed hdisk1 scsi1 failed hdisk2 scsi1 failed hdisk23 scsi8 failed hdisk25 scsi8 -- To display in a user-specified format, without column headers, the set of paths to hdisk1 whose path status is available enter: # lspath -l hdisk1 -s available -F"connection:parent:path_status:status" The system will display a message similar to the following: 5,0:scsi0:available:enabled 6,0:scsi1:available:disabled Note that this output shows both the path status and the operational status of the device. The path status simply indicates whether the path is configured or not. The operational status indicates how the path is being used with respect to path selection processing in the device driver. Only paths with a path status of available also have an operational status. If a path is not currently configured into the device driver, it does not have an operational status. Examples of displaying path attributes: --If the target device is a SCSI disk, to display all attributes for the path to parent scsi0 at connection 5,0, use the command: # lspath -AHE -l hdisk10 -p scsi0 -w "5,0" The system will display a message similar to the following: attribute value description user_settable weight 1 Order of path failover selection true Note 26: About FastT and DS Storage: ------------------------------------ IBM TotalStorager FAStT has been renamed IBM TotalStorage DS4000 series DS4100 formerly FAStT100 DS4300 formerly FAStT600 DS4300 Turbo formerly FAStT600 Turbo DS4400 formerly FAStT700 DS4500 formerly FAStT900 Note 27: from GPFS FAQ: ----------------------- Q20: What's the difference between using an ESS with or without SDD or SDDPCM installed on the host? A20: The use of SDD or SDDPCM gives the AIX host the ability to access multiple paths to a single LUN within an ESS. This ability to access a single LUN on multiple paths allows for a higher degree of data availability in the event of a path failure. Data can continue to be accessed within the ESS as long as there is at least one available path. Without one of these installed, you will lose access to the LUN in the event of a path failure. However, your choice of whether to use SDD or SDDPCM impacts your ability to use single-node quourm: Single-node quorum is not supported if SDD is installed. Single-node quorum is support if SDDPCM is installed. To determine the GPFS disk support guidelines for SDD and SDDPCM for your cluster type, see Q3: What disk support guidelines must be followed when running GPFS in an sp cluster type? Q6: What disk support guidelines must be followed when running GPFS in an rpd cluster type? Q9:What are the disk support guidelines that must be followed when running GPFS in an hacmp cluster type Note 28: changing attributes of a fcs0 device: ---------------------------------------------- Examples: # chdev -l fscsi0 -a fc_err_recov=fast_fail # chdev -l fscsi0 -a dyntrk=yes Display attributes: # lsattr -El fscsi0 attach switch How this adapter is CONNECTED False dyntrk no Dynamic Tracking of FC Devices True fc_err_recov fast_fail FC Fabric Event Error RECOVERY Policy True scsi_id 0x741113 Adapter SCSI ID False sw_fc_class 3 FC Class for Fabric True Note 29: Flash alerts: ---------------------- IBM Flash Alert on AIX migration with vpaths: --------------------------------------------- http://www-1.ibm.com/support/docview.wss?rs=540&context=ST52G7&uid=ssg1S1002295&loc=en_US&cs=utf-8&lang=en All hdisks and vpath devices must be removed from host system before upgrading to SDD host attachment script 32.6.100.21 and above. All MPIO hdisks must be removed from host system before upgrading to SDDPCM host attachment script 33.6.100.9. Flash (Alert) Abstract When upgrading from SDDPCM host attachment script devices.fcp.disk.ibm2105.mpio.rte version 33.6.100.8 or below to 33.6.100.9, all SDDPCM MPIO hdisks must be removed from the AIX host system before the upgrade. When upgrading from SDD host attachment script ibm2105.rte version 32.6.100.18 or below to 32.6.100.21 or later, all AIX hdisks and SDD vpath devices must be removed from the AIX host system before the upgrade. Content Please note that this document contains the following sections: Problem description, symptoms, and information SDD/host attachment upgrade procedures Recovery procedures should the ODM become corrupted Recovery procedures should the associations become corrupted Procedures for upgrading if rootvg is on an ESS disk - Problem description, symptoms, and information: Starting with SDDPCM host attachment script devices.fcp.disk.ibm2105.mpio.rte version 33.6.100.9 and SDD host attachment script ibm2105.rte version 32.6.100.21, ESS FCP devices are configured as "IBM MPIO FC 2105" for MPIO devices, and "IBM FC 2105" for ESS devices. This information can be seen in the "lsdev -Cc disk" output. Prior to these host attachment script versions, ESS FCP devices were configured as "IBM MPIO FC 2105XXX" for MPIO devices and "IBM FC 2105XXX" for ESS devices, where 'XXX' is the ESS device module, such as F20 or 800. If a host system is upgraded without removing all of the hdisks first, then the AIX host system ODM will be corrupted. Additionally, if all he hdisks are removed without removing all SDD vpath devices, then the associations between an SDD vpath device and its hdisks may be corrupted because the hdisk's device minor number may change after reconfiguration. The ODM corruption may look something like the following in the "lsdev -Cc disk" output: # lsdev -Cc disk lsdev: 0514-521 Cannot find information in the predefined device configuration database for the customized device hdisk1. lsdev: 0514-521 Cannot find information in the predefined device configuration database for the customized device hdisk2. lsdev: 0514-521 Cannot find information in the predefined device configuration database for the customized device hdisk3. lsdev: 0514-521 Cannot find information in the predefined device configuration database for the customized device hdisk4. lsdev: 0514-521 Cannot find information in the predefined device configuration database for the customized device hdisk5. lsdev: 0514-521 Cannot find information in the predefined device configuration database for the customized device hdisk6. lsdev: 0514-521 Cannot find information in the predefined device configuration database for the customized device hdisk7. lsdev: 0514-521 Cannot find information in the predefined device configuration database for the customized device hdisk8. hdisk0 Available 10-60-00-8,0 16 Bit SCSI Disk Drive hdisk1 Available 20-60-01 N/A hdisk2 Available 20-60-01 N/A hdisk3 Available 20-60-01 N/A hdisk4 Available 20-60-01 N/A hdisk5 Available 20-60-01 N/A hdisk6 Available 20-60-01 N/A hdisk7 Available 20-60-01 N/A hdisk8 Available 20-60-01 N/A - SDD/host attachment upgrade procedures: In order to prevent ODM corruption and vpath/hdisk association corruption, all hdisks and SDD vpath devices must be removed prior to the upgrade. The following procedure should be used when you want to upgrade: - AIX OS only* - Host attachment + AIX OS* - SDD + AIX OS* - Host attachment + SDD - Host attachment only - SDD + Host attachment + AIX OS* * Upgrading the AIX OS will always require you to install the SDD which corresponds to the new AIX OS level. To upgrade SDD only, follow the procedure in the SDD User's Guide. 1. Ensure rootvg is on local scsi disks. If this is not possible, see "Procedures for upgrading if rootvg is on an ESS disk" below. 2. Stop all applications running on SDD Volume Groups/File Systems. 3. Unmount all File Systems of SDD volume group. 4. Varyoff all SDD volume groups. 5. If upgrading OS, save output of lspv command to remember pvids of VGs. 6. If upgrading OS, export volume groups with exportvg. 7. Remove SDD vpath devices with rmdev command. 8. Remove 2105 hdisk devices with rmdev command. 9. If upgrading OS, run 'stopsrc -s sddsrv' to stop sddsrv daemon. 10. If upgrading OS, uninstall SDD. 11. If required, upgrade ibm2105.rte. The recommended version is 32.6.100.18 if support for ESS model 750 is not needed. Version 32.6.100.21 is required to support ESS model 750. 12. If upgrading OS, migrate AIX OS level. 13. If OS upgraded, boot to new AIX level with no disk groups online except rootvg, which is on local scsi disks. /* reboot will automatically start at the end of migration */ 14. If OS upgraded, install SDD for the new OS level. Otherwise, if required, upgrade SDD. 15. If OS not upgraded, configure hdisks with the 'cfgmgr -vl fcsX' command. 16. Configure SDD vpath devices by running 'cfallvpath'. 17. If OS upgraded, use lspv command to find out one physical volume which has a pvid matching the previous SDD VG's pv. Example: =================================================== Previous lspv output (from step 4): hdisk0 000bc67da3945d3c None hdisk1 000bc67d531c699f rootvg active hdisk2 none None hdisk3 none None hdisk4 none None hdisk5 none None hdisk6 none None hdisk7 none None hdisk8 none None hdisk9 none None hdisk10 none None hdisk11 none None hdisk12 none None hdisk13 none None hdisk14 none None hdisk15 none None hdisk16 none None hdisk17 none None hdisk18 none None hdisk19 none None hdisk20 none None hdisk21 none None vpath0 000bc67d318fb8ea SDDVG0 vpath1 000bc67d318fde50 SDDVG1 vpath2 000bc67d318ffbb0 SDDVG2 vpath3 000bc67d319018f3 SDDVG3 vpath4 000bc67d319035b2 SDDVG4 Current lspv output (from this step): hdisk0 000bc67da3945d3c None hdisk1 000bc67d531c699f rootvg active hdisk2 000bc67d318fb8ea None hdisk3 000bc67d318fde50 None hdisk4 000bc67d318ffbb0 None hdisk5 000bc67d319018f3 None hdisk6 000bc67d319035b2 None hdisk7 000bc67d318fb8ea None hdisk8 000bc67d318fde50 None hdisk9 000bc67d318ffbb0 None hdisk10 000bc67d319018f3 None hdisk11 000bc67d319035b2 None hdisk12 000bc67d318fb8ea None hdisk13 000bc67d318fde50 None hdisk14 000bc67d318ffbb0 None hdisk15 000bc67d319018f3 None hdisk16 000bc67d319035b2 None hdisk17 000bc67d318fb8ea None hdisk18 000bc67d318fde50 None hdisk19 000bc67d318ffbb0 None hdisk20 000bc67d319018f3 None hdisk21 000bc67d319035b2 None vpath0 none None vpath1 none None vpath2 none None vpath3 none None vpath4 none None In this case, hdisk2, hdisk7, hdisk12, and hdisk17 from the current lspv output has the pvid which matches the pvid of SDDVG0 from the previous lspv output. So, use either hdisk2, hdisk7, hdisk12, or hdisk17 to import the volume group with the name SDDVG0 18. Run hd2vp on all SDD volume groups. 19. Vary on all SDD volume groups. 20. Mount all file system back. - Recovery procedures should the ODM become corrupted: If the host system's ODM is already corrupted as a result of upgrading without removing the hdisks, please contact IBM Customer Support at 1-800-IBM-SERV to request a script to fix the corrupted ODM. - Recovery procedures should the associations become corrupted: If vpath/hdisk association corruption has occurred because hdisks were removed without removing SDD vpath devices, all SDD vpath devices must be removed and reconfigured in order to correct this corrupted association. - Procedures for upgrading if rootvg is on an ESS disk: If rootvg is on an ESS device and cannot be moved to local scsi disks, all hdisks cannot be removed prior to the upgrade. In this case, the following procedure should be used to upgrade the SDD host attachment script to version 32.6.100.21 or later: . Contact IBM Customer Support at 1-800-IBM-SERV to request a script to fix the corrupted ODM referenced above. . Without removing ESS hdisks, use smitty to upgrade the SDD host attachment script on the host system. . Immediately run the script to fix the corrupted ODM on the host system. . Run bosboot on the host system. . Reboot the host system so that the hdisks can be configured with the new ODM attributes. . Return to the "SDD/host attachment upgrade procedures" above and follow the appropriate upgrade steps now that the SDD host attachment script upgrade is complete. This issue only occurs when upgrading to devices.fcp.disk.ibm2105.mpio.rte version 33.6.100.9 and SDD host attachment script ibm2105.rte version 32.6.100.21 and above. IBM Flash Alert: SDD 1.6.2.0 requires minimum AIX code levels; possible 0514-035 error: --------------------------------------------------------------------------------------- Flash (Alert) Abstract SDD 1.6.2.0 requires minimum AIX code levels. Not upgrading to correct AIX version and level can result in 0514-035 error when attempting removal of dpo or vpath device Content Starting from SDD version 1.6.2.0, a unique ID attribute is added to SDD vpath devices, in order to support AIX5.3 VIO future features. AIX device configure methods have been changed in both AIX52 TL8 and AIX53 TL4 for this support. Following are the requirements for this version of SDD with: AIX5.2 and AIX5.3: AIX52 TL8 & above with PTF U804193 (IY76991) AIX53 TL4 & above with PTF U804397 (IY76997) Please view 1.6.2.0 readme for further details If upgraded to SDD 1.6.2.0 and above without first upgrading AIX to the levels listed above the following error will be experienced when attempting to remove any vpath devices using the: # rmdev -dl dpo -R or the # rmdev -dl vpathX command. Method error (/usr/lib/methods/ucfgdevice): 0514-035 Cannot perform the requested function because of missing predefined information in the device configuration database. Solution: 1) Upgrade AIX to correct level and ptf, or 2) Contact SDD support at 1-800-IBM-SERV for steps to clean up ODM to allow for downgrading the SDD level from 1.6.2.0, if unable to upgrade AIX to a newer technology level. Note 30: -------- Suppose the following happens: # rmdev -dRl fcs0 fcnet0 deleted fscsi0 deleted fcs0 deleted # cfgmgr Method error (/usr/lib/methods/cfgefscsi -l fscsi0 ): 0514-061 Cannot find a child device. root@n5114l02:/root# adapter checked with several commands connection with san seems impossible. root@n5114l02:/root#lsattr -El fscsi0 attach none How this adapter is CONNECTED False dyntrk no Dynamic Tracking of FC Devices True fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True scsi_id Adapter SCSI ID False sw_fc_class 3 FC Class for Fabric True Note 31: -------- IY83872: AFTER CHVG -T, VG IS IN INCONSISTENT STATE A fix is available Obtain fix for this APAR APAR status Closed as program error. Error description #--------------------------------------------------- chvg -t renumber pvs that have pv numbers greater than maxpvs with the new factor. chvg -t is only updating the new pv_num in lvmrec and not updating the VGDA. chvg -t leaves the vg is inconsistent state and any changes to vg may get unpredictable results like a system crash. Local fix Problem summary #--------------------------------------------------- chvg -t renumber pvs that have pv numbers greater than maxpvs with the new factor. chvg -t is only updating the new pv_num in lvmrec and not updating the VGDA. chvg -t leaves the vg is inconsistent state and any changes to vg may get unpredictable results like a system crash. Problem conclusion Fix chvg -t to update the VGDA with the new pv number. Add a check in hd_kextendlv to make sure that the pvol we are trying to access is not null. Temporary fix Comments APAR information APAR number IY83872 Reported component name AIX 5.3 Reported component ID 5765G0300 Reported release 530 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2006-04-11 Closed date 2006-04-11 Last modified date 2006-05-03 APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Publications Referenced Fix information Fixed component name AIX 5.3 Fixed component ID 5765G0300 Applicable component levels R530 PSY U805071 UP06/05/03 I 1000 Note 32: ======== ESB-2008.0267 -- [AIX] -- AIX Logical Volume Manager buffer overflow -------------------------------------------------------------------------------- Date: 14 March 2008 AusCERT Reference #: ESB-2008.0267 Click here for printable version Click here for PGP verifiable version -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =========================================================================== AUSCERT External Security Bulletin Redistribution ESB-2008.0267 -- [AIX] AIX Logical Volume Manager buffer overflow 14 March 2008 =========================================================================== AusCERT Security Bulletin Summary --------------------------------- Product: AIX 5.2 AIX 5.3 Publisher: IBM Operating System: AIX Impact: Root Compromise Access: Existing Account Original Bulletin: http://www14.software.ibm.com/webapp/set2/subscriptions/pqvcmjd?mode=18&ID=4169 - --------------------------BEGIN INCLUDED TEXT-------------------- - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 IBM SECURITY ADVISORY First Issued: Tue Jan 22 14:02:18 CST 2008 | Updated: Tue Mar 11 12:55:14 CDT 2008 | IZ10828 availablity updated =============================================================================== VULNERABILITY SUMMARY VULNERABILITY: AIX Logical Volume Manager buffer overflow PLATFORMS: AIX 5.2, 5.3 SOLUTION: Apply the fix or workaround as described below. THREAT: A local attacker may execute arbitrary code with root privileges. CERT VU Number: n/a CVE Number: n/a =============================================================================== DETAILED INFORMATION I. OVERVIEW The AIX Logical Volume Manager provides a suite of utilities for AIX logical volume management features and functions. The primary fileset for the AIX Logical Volume Manager is 'bos.rte.lvm'. In addition, AIX provides another suite of utilities for concurrent logical volume management across multiple hosts. The primary fileset for the AIX Concurrent Logical Volume Manager is 'bos.clvm.enh'. Several imporant commands provided by these filesets for performing various logical volume management tasks have been identified as containing buffer overflow vulnerabilities. II. DESCRIPTION Buffer overflow vulnerabilities exist in the 'bos.rte.lvm' and 'bos.clvm.enh' fileset commands listed below. A local attacker may execute arbitrary code with root privileges because the commands are setuid root. The local attacker must be a member of the 'system' group to execute these commands. The following 'bos.rte.lvm' commands are vulnerable: /usr/sbin/lchangevg /usr/sbin/ldeletepv /usr/sbin/putlvodm /usr/sbin/lvaryoffvg /usr/sbin/lvgenminor The following 'bos.clvm.enh' command is vulnerable: /usr/sbin/tellclvmd III. IMPACT The successful exploitation of this vulnerability allows a non-privileged user to execute code with root privileges. IV. PLATFORM VULNERABILITY ASSESSMENT To determine if your system is vulnerable, execute the following command: lslpp -L bos.rte.lvm bos.clvm.enh The following fileset levels are vulnerable: AIX Fileset Lower Level Upper Level ------------------------------------------------ bos.rte.lvm 5.2.0.0 5.2.0.107 bos.rte.lvm 5.3.0.0 5.3.0.61 bos.clvm.enh 5.2.0.0 5.2.0.105 bos.clvm.enh 5.3.0.0 5.3.0.60 V. SOLUTIONS A. APARS IBM provides the following fixes: AIX Level APAR number Availability ----------------------------------------------------- 5.2.0 IZ00559 (available now) | 5.2.0 IZ10828 05/07/2008 5.3.0 IY98331 (available now) 5.3.0 IY98340 (available now) 5.3.0 IY99537 (available now) Subscribe to the APARs here: http://www.ibm.com/support/docview.wss?uid=isg1IZ00559 http://www.ibm.com/support/docview.wss?uid=isg1IZ10828 http://www.ibm.com/support/docview.wss?uid=isg1IY98331 http://www.ibm.com/support/docview.wss?uid=isg1IY98340 http://www.ibm.com/support/docview.wss?uid=isg1IY99537 By subscribing, you will receive periodic email alerting you to the status of the APAR, and a link to download the fix once it becomes available. B. FIXES Fixes are available. The fixes can be downloaded via ftp from: ftp://aix.software.ibm.com/aix/efixes/security/lvm_ifix.tar The link above is to a tar file containing this signed advisory, fix packages, and PGP signatures for each package. The fixes below include prerequisite checking. This will enforce the correct mapping between the fixes and AIX Technology Levels. AIX Fileset AIX Level Fix and Interim Fix ----------------------------------------------------------------- bos.lvm.rte 5200-08 IZ10828_08.071212.epkg.Z bos.lvm.rte 5200-08 IZ00559_8a.071212.epkg.Z bos.clvm.enh 5200-08 IZ00559_8b.071212.epkg.Z bos.lvm.rte 5200-09 IZ10828_09.071212.epkg.Z bos.lvm.rte 5200-09 IZ00559_9a.071211.epkg.Z bos.clvm.enh 5200-09 IZ00559_9b.071211.epkg.Z bos.lvm.rte 5200-10 IZ10828_10.071212.epkg.Z bos.lvm.rte 5200-10 bos.rte.lvm.5.2.0.107.U bos.clvm.enh 5200-10 bos.clvm.enh.5.2.0.107.U bos.lvm.rte 5300-05 IY98331_05.071212.epkg.Z bos.lvm.rte 5300-05 IY99537_05.071212.epkg.Z bos.lvm.rte 5300-05 IY98340_5a.071211.epkg.Z bos.clvm.enh 5300-05 IY98340_5b.071211.epkg.Z bos.lvm.rte 5300-06 bos.rte.lvm.5.3.0.63.U bos.clvm.enh 5300-06 bos.clvm.enh.5.3.0.61.U To extract the fixes from the tar file: tar xvf lvm_ifix.tar cd lvm_ifix Verify you have retrieved the fixes intact: The checksums below were generated using the "sum", "cksum", "csum -h MD5" (md5sum), and "csum -h SHA1" (sha1sum) commands and are as follows: sum filename ------------------------------------ 14660 17 IY98331_05.071212.epkg.Z 26095 9 IY98340_5a.071211.epkg.Z 40761 8 IY98340_5b.071211.epkg.Z 10885 16 IY99537_05.071212.epkg.Z 24909 10 IZ00559_8a.071212.epkg.Z 64769 9 IZ00559_8b.071212.epkg.Z 65110 10 IZ00559_9a.071211.epkg.Z 25389 9 IZ00559_9b.071211.epkg.Z 26812 26 IZ10828_08.071212.epkg.Z 55064 26 IZ10828_09.071212.epkg.Z 55484 26 IZ10828_10.071212.epkg.Z 03885 157 bos.clvm.enh.5.2.0.107.U 30581 128 bos.clvm.enh.5.3.0.61.U 48971 1989 bos.rte.lvm.5.2.0.107.U 64179 2603 bos.rte.lvm.5.3.0.63.U cksum filename ------------------------------------------- 3121912357 16875 IY98331_05.071212.epkg.Z 107751313 9190 IY98340_5a.071211.epkg.Z 1129637178 7735 IY98340_5b.071211.epkg.Z 4019303479 16201 IY99537_05.071212.epkg.Z 1791374386 9289 IZ00559_8a.071212.epkg.Z 3287090389 8299 IZ00559_8b.071212.epkg.Z 565672617 9294 IZ00559_9a.071211.epkg.Z 257555679 8302 IZ00559_9b.071211.epkg.Z 3930477686 26525 IZ10828_08.071212.epkg.Z 1199269029 26533 IZ10828_09.071212.epkg.Z 358657844 26480 IZ10828_10.071212.epkg.Z 3753492719 160768 bos.clvm.enh.5.2.0.107.U 4180839749 131072 bos.clvm.enh.5.3.0.61.U 3765659627 2036736 bos.rte.lvm.5.2.0.107.U 3338925192 2665472 bos.rte.lvm.5.3.0.63.U csum -h MD5 (md5sum) filename ---------------------------------------------------------- 73bcf7604dd13f26a7500e45468ff5f7 IY98331_05.071212.epkg.Z 5f32179fc2156bb6e29e775aa7bff623 IY98340_5a.071211.epkg.Z 7c47e56cadabcba0a105ffa7fc1d40fc IY98340_5b.071211.epkg.Z ef3e4512c3b55091893ce733c707e1a2 IY99537_05.071212.epkg.Z db04be33e56169b6a8e8fd747e6948da IZ00559_8a.071212.epkg.Z 553f31ccf6a265333938d81eeae6dabc IZ00559_8b.071212.epkg.Z 2921b9d2a3dbd84591d60fddf0663798 IZ00559_9a.071211.epkg.Z 93ce34dec8f4fa9681a2c7c86be065fc IZ00559_9b.071211.epkg.Z e6b0a4a91ba197de0005bd800f06ba4e IZ10828_08.071212.epkg.Z 602a8c777cc27e51c3d3dbfa8ebd69be IZ10828_09.071212.epkg.Z b84a5cae03921d30675e522da29da1aa IZ10828_10.071212.epkg.Z 2aa4b9b43ca55f74b0fac6be7bc48b66 bos.clvm.enh.5.2.0.107.U 844e1f2ef9d388d2ddd8cf3ef6251f06 bos.clvm.enh.5.3.0.61.U 0c73aa8f0211c400455feaa6fb8a95c4 bos.rte.lvm.5.2.0.107.U 1b5a08eabe984d957db9a145e2a4fd06 bos.rte.lvm.5.3.0.63.U csum -h SHA1 (sha1sum) filename ------------------------------------------------------------------ d9929214a4d85b986fb2e06c9b265c768c7178a9 IY98331_05.071212.epkg.Z 0f5fbcdfbbbf505366dad160c8dec1c1ce75285e IY98340_5a.071211.epkg.Z cf2cda3b8d19b73d06b69eeec7e4bae192bec689 IY98340_5b.071211.epkg.Z 9d8727b5733bc34b8daba267b82864ef17b7156f IY99537_05.071212.epkg.Z e7a366956ae7a08deb93cbd52bbbbf451d0f5565 IZ00559_8a.071212.epkg.Z 1898733cdf6098e4f54ec36132a03ebbe0682a7e IZ00559_8b.071212.epkg.Z f68c458c817f99730b193ecbd02ae24b9e51cc67 IZ00559_9a.071211.epkg.Z 185954838c439a3c7f8e5b769aa6cc7d31123b59 IZ00559_9b.071211.epkg.Z 6244138dc98f3fd16928b2bbcba3c5b4734e9942 IZ10828_08.071212.epkg.Z 98bfaf44ba4bc6eba452ea074e276b8e87b41c9d IZ10828_09.071212.epkg.Z 2a9c0dd75bc79eba153d0a4e966d930151121d45 IZ10828_10.071212.epkg.Z 96706ec5afd792852350d433d1bf8d8981b67336 bos.clvm.enh.5.2.0.107.U 91f6d3a4d9ffd15d258f4bda51594dbce7011d8a bos.clvm.enh.5.3.0.61.U 4589a5bca998f437aac5c3bc2c222eaa51490dab bos.rte.lvm.5.2.0.107.U 3449afd795c24594c7a0c496f225c7148b4071ab bos.rte.lvm.5.3.0.63.U To verify the sums, use the text of this advisory as input to csum, md5sum, or sha1sum. For example: csum -h SHA1 -i Advisory.asc md5sum -c Advisory.asc sha1sum -c Advisory.asc These sums should match exactly. The PGP signatures in the tar file and on this advisory can also be used to verify the integrity of the fixes. If the sums or signatures cannot be confirmed, contact IBM AIX Security at security-alert@austin.ibm.com and describe the discrepancy. C. FIX AND INTERIM FIX INSTALLATION IMPORTANT: If possible, it is recommended that a mksysb backup of the system be created. Verify it is both bootable and readable before proceeding. To preview a fix installation: installp -a -d . -p all To install a fix package: installp -a -d . -X all Interim fixes have had limited functional and regression testing but not the full regression testing that takes place for Service Packs; thus, IBM does not warrant the fully correct functionality of an interim fix. Interim fix management documentation can be found at: http://www14.software.ibm.com/webapp/set2/sas/f/aix.efixmgmt/home.html To preview an interim fix installation: emgr -e ipkg_name -p # where ipkg_name is the name of the # interim fix package being previewed. To install an interim fix package: emgr -e ipkg_name -X # where ipkg_name is the name of the # interim fix package being installed. VI. WORKAROUNDS There are two workarounds available. A. OPTION 1 Change the permissions of these commands to remove the setuid bit using the following commands: chmod 500 /usr/sbin/lchangevg chmod 500 /usr/sbin/ldeletepv chmod 500 /usr/sbin/putlvodm chmod 500 /usr/sbin/lvaryoffvg chmod 500 /usr/sbin/lvgenminor chmod 500 /usr/sbin/tellclvmd NOTE: chmod will disable functionality of these commands for all users except root. B. OPTION 2 (AIX 6.1, AIX 5.3 TL6 and TL7) Use the File Permissions Manager (fpm) command to manage setuid and setgid programs. fpm documentation can be found in the AIX 6 Security Redbook at: http://www.redbooks.ibm.com/abstracts/sg247430.html An fpm level of high will remove the setuid bit from the affected commands. For example: fpm -l high -p # to preview changes fpm -l high # to execute changes NOTE: Please review the documentation before execution. fpm will disable functionality of multiple commands for all users except root. VII. OBTAINING FIXES AIX security related fixes can be downloaded from: ftp://aix.software.ibm.com/aix/efixes/security AIX fixes can be downloaded from: http://www.ibm.com/eserver/support/fixes/fixcentral/main/pseries/aix NOTE: Affected customers are urged to upgrade to the latest applicable Technology Level and Service Pack. VIII. CONTACT INFORMATION If you would like to receive AIX Security Advisories via email, please visit: http://www14.software.ibm.com/webapp/set2/subscriptions/pqvcmjd Comments regarding the content of this announcement can be directed to: security-alert@austin.ibm.com To request the PGP public key that can be used to communicate securely with the AIX Security Team you can either: A. Send an email with "get key" in the subject line to: security-alert@austin.ibm.com B. Download the key from a PGP Public Key Server. The key ID is: 0xA6A36CCC Please contact your local IBM AIX support center for any assistance. eServer is a trademark of International Business Machines Corporation. IBM, AIX and pSeries are registered trademarks of International Business Machines Corporation. All other trademarks are property of their respective holders. IX. ACKNOWLEDGMENTS IBM discovered and fixed this vulnerability as part of its commitment to secure the AIX operating system. ------- Note: ------- AIX: DESCRIPTOR AREA'S: ------------------ - 1. VOLUME GROUP DESCRIPTOR AREA, VGDA Global to the VG: The VGDA, located at the beginning of each physical volume, contains information that describes all the LV's and all the PV's that belong to the VG of which that PV is a member. The VGDA makes a VG selfdescribing. An AIX System can read the VGDA on a disk, and from that, can determine what PV's and LV's are part of this VG. There are one or two copies per disk. - 2. VOLUME GROUP STATUS AREA, VGSA Tracks the state of mirrorred copies. The VGSA contains state information about physical partitions and physical volumes. For example, the VGSA knows if one PV in a VG is unavailable. Each PV has at least one VGDA/VGSA. The number of VGDA's contained on a single disk varies according to the number of disks in the VG. - 3. LOGICAL VOLUME CONTROL BLOCK, LVCB Contains LV attributes (policies, number of copies). The LVCB is located at the start of every LV. It contains information about the logical volume. You can however, use the mklv command with the -T option, to request that the LVCB will not be stored in the beginning of the LV. With Scalable VG's, LVCM info is no longer stored in the first user block of any LV. All relevant LVCM info is kept in the VGDA. The lqueryvg command: --------------------- The lqueryvg command reads the VGDA from a specified disk in a VG. Example: # lqueryvg -p hdisk1 -At # lqueryvg -Atp hdisk0 -p: which PV -A: show all available information -t: show descriptive tags Example: #lqueryvg -Atp hdisk0 Max LVs: 256 PP Size: 25 Free PPs: 468 LV count: 20 PV count: 2 Total VGDAs: 3 Conc Allowed: 0 MAX PPs per PV 1016 MAX PVs: 32 Conc Autovaryo 0 Varied on Conc 0 Logical: 00c665ed00004c0000000112b7408848.1 hd5 1 00c665ed00004c0000000112b7408848.2 hd6 1 00c665ed00004c0000000112b7408848.3 hd8 1 00c665ed00004c0000000112b7408848.4 hd4 1 00c665ed00004c0000000112b7408848.5 hd2 1 00c665ed00004c0000000112b7408848.6 hd9var 1 00c665ed00004c0000000112b7408848.7 hd3 1 00c665ed00004c0000000112b7408848.8 hd1 1 00c665ed00004c0000000112b7408848.9 hd10opt 1 00c665ed00004c0000000112b7408848.10 hd7 1 00c665ed00004c0000000112b7408848.11 hd7x 1 00c665ed00004c0000000112b7408848.12 beheerlv 1 00c665ed00004c0000000112b7408848.13 varperflv 1 00c665ed00004c0000000112b7408848.14 loglv00 1 00c665ed00004c0000000112b7408848.15 db2_server_v8 1 00c665ed00004c0000000112b7408848.16 db2_var_v8 1 00c665ed00004c0000000112b7408848.17 db2_admin_v8 1 00c665ed00004c0000000112b7408848.18 db2_adminlog_v8 1 00c665ed00004c0000000112b7408848.19 db2_dasscr_v8 1 00c665ed00004c0000000112b7408848.20 db2_Fixpak10 1 Physical: 00c665edb74079bc 2 0 00c665edb7f2987a 1 0 Total PPs: 1022 LTG size: 128 HOT SPARE: 0 AUTO SYNC: 0 VG PERMISSION: 0 SNAPSHOT VG: 0 IS_PRIMARY VG: 0 PSNFSTPP: 4352 VARYON MODE: 0 VG Type: 0 Max PPs: 32512 The lquerypv command: --------------------- ------- How do I find out what the maximum supported logical track group (LTG) size of my hard disk? You can use the lquerypv command with the -M flag. The output gives the LTG size in KB. For instance, the LTG size for hdisk0 in the following example is 256 KB. /usr/sbin/lquerypv -M hdisk0 256 ------ run lquerypv -h core 6b0 to find the executable (probably man, but man may have called something else in the background) then run dbx path_/to_/executable core and run the subcommand dbx> where and paste the stack output, should be able to find it from there. also paste the level of fileset you are on for the executable lslpp -w /path_/to_/executable -> this will give fileset_name lslpp -l fileset_name ------- Wie l,sst sich ein Storage Lock auf einer SAN-Disk brechen? Endlich die ersehnte SAN-Disk bekommen und dann das, es l,sst sich keine Volume Group darauf anlegen. # mkvg -f vpath100 gibt einen I/O Error. Was tun? H"chstwahrscheinlich befindet sich noch ein Lock auf der SAN-Disk. Dies l,sst sich mit dem Befehl # lquerypv -ch /dev/vpath100 aufbrechen und die Volume Group kann angelegt werden. ------- # lquerypv -h /dev/hdisk9 80 10 00000080 00001155 583CD4B0 00000000 00000000 |...UX<..........| # lquerypv -h /dev/hdisk1 00000000 C9C2D4C1 00000000 00000000 00000000 |................| 00000010 00000000 00000000 00000000 00000000 |................| 00000020 00000000 00000000 00000000 00000000 |................| 00000030 00000000 00000000 00000000 00000000 |................| 00000040 00000000 00000000 00000000 00000000 |................| 00000050 00000000 00000000 00000000 00000000 |................| 00000060 00000000 00000000 00000000 00000000 |................| 00000070 00000000 00000000 00000000 00000000 |................| 00000080 00C665ED B7F2987A 00000000 00000000 |..e....z........| 00000090 00000000 00000000 00000000 00000000 |................| 000000A0 00000000 00000000 00000000 00000000 |................| 000000B0 00000000 00000000 00000000 00000000 |................| 000000C0 00000000 00000000 00000000 00000000 |................| 000000D0 00000000 00000000 00000000 00000000 |................| 000000E0 00000000 00000000 00000000 00000000 |................| 000000F0 00000000 00000000 00000000 00000000 |................| # lquerypv -h /dev/hdisk0 80 10 root@zd93l12:/root#lquerypv -h /dev/hdisk0 80 10 00000080 00C665ED B74079BC 00000000 00000000 |..e..@y.........| The getlvcb command: -------------------- The LVCB stores attributes of a LV. The getlvcb command reads the LVCB of a specified LV. Displays a formatted output of the data in the LVCB of a LV. Example: # getlvcb -At hd2 # getlvcb -TA hd3 Displays the information held in the LVCB of LV hd3. The putlvcb command: -------------------- Writes the control block information (only the specified fields) into block 0 of a logical volume (LVCB). # putlvcb -t jfs lvdata writes the LV type jfs to the LVCB of LV lvdata. ------- Note: ------- AIX: Fixing ODM problems on a VG which is not the rootvg: ==================================================== In the following examle, the VG is called "myvg" consisting of the Physical Volume hdisk3. 1. Unmount all filesystems in that VG first, otherwise you cannot varyoff the VG. Then varyoff the VG. # varyoffvg myvg 2. Now remove the complete information of that VG from ODM. The VGDA and LVCB on the actual disks are NOT touched by the exportvg command. # exportvg myvg 3. Now import the VG and create new ODM objects associated with that VG: # importvg -y myvg hdisk3 You only need to specify one intact PV of the VG in the above command. Any disk in the VG will have a VGDA which contains all neccessary information. The importvg command reads the VGDA and LVCB on that disk and creates completely new ODM entries. Fixing ODM problems on the rootvg: ================================== rvgrecover: ----------- You can try to use the "rvgrecover" shell script. The rootvg cannot be varied off, like an ordinary VG, so the solution from the former section cannot be used. But the script "rvgrecover" issues a series of odmdelete statements, just like exportvg does. At the end of the script, an importvg is done. The importvg command, reads the VGDA and LVCB from the boot disk, resulting in new ODM entries. The rvgrecover script has the following contents: Reinitializing the rootvg Volume Group To reinitialize the rootvg volume group, copy the shell script to /bin/rvgrecover and run the following to make that file executable: chmod +x /bin/rvgrecover Then run: /bin/rvgrecover Use the following shell script to reinitialize the ODM entries for the rootvg volume group: PV=/dev/ipldevice # PV=hdisk0 VG=rootvg cp /etc/objrepos/CuAt /etc/objrepos/CuAt.$$ cp /etc/objrepos/CuDep /etc/objrepos/CuDep.$$ cp /etc/objrepos/CuDv /etc/objrepos/CuDv.$$ cp /etc/objrepos/CuDvDr /etc/objrepos/CuDvDr.$$ lqueryvg -Lp $PV | awk '{ print $2 }' | while read LVname; do odmdelete -q "name = $LVname" -o CuAt odmdelete -q "name = $LVname" -o CuDv odmdelete -q "value3 = $LVname" -o CuDvDr done odmdelete -q "name = $VG" -o CuAt odmdelete -q "parent = $VG" -o CuDv odmdelete -q "name = $VG" -o CuDv odmdelete -q "name = $VG" -o CuDep odmdelete -q "dependency = $VG" -o CuDep odmdelete -q "value1 = 10" -o CuDvDr odmdelete -q "value3 = $VG" -o CuDvDr importvg -y $VG $PV # ignore lvaryoffvg errors varyonvg $VG redefinevg: ----------- redefinevg Command Purpose Redefines the set of physical volumes of the given volume group in the device configuration database. Syntax redefinevg { -d Device | -i Vgid } VolumeGroup Description During normal operations the device configuration database remains consistent with the Logical Volume Manager (LVM) information in the reserved area on the physical volumes. If inconsistencies occur between the device configuration database and the LVM, the redefinevg command determines which physical volumes belong to the specified volume group and re-enters this information in the device configuration database. The redefinevg command checks for inconsistencies by reading the reserved areas of all the configured physical volumes attached to the system. Note: To use this command, you must either have root user authority or be a member of the system group. Flags -d Device The volume group ID, Vgid, is read from the specified physical volume device. You can specify the Vgid of any physical volume belonging to the volume group that you are redefining. -i Vgid The volume group identification number of the volume group to be redefined. Example To redefine rootvg physical volumes in the Device Configuration Database, enter a command similar to the following: # redefinevg -d hdisk0 rootvg synclvodm: ---------- synclvodm Command Purpose Synchronizes or rebuilds the logical volume control block, the device configuration database, and the volume group descriptor areas on the physical volumes. Syntax synclvodm [ -v ] VolumeGroup [ LogicalVolume ... ] Description During normal operations, the device configuration database remains consistent with the logical volume manager information in the logical volume control blocks and the volume group descriptor areas on the physical volumes. If for some reason the device configuration database is not consistent with Logical Volume Manager information, the synclvodm command can be used to resynchronize the database. The volume group must be active for the resynchronization to occur (see varyonvg). If logical volume names are specified, only the information related to those logical volumes is updated. Attention: Do not remove the /dev entries for volume groups or logical volumes. Do not change the device configuration database entries for volume groups or logical volumes using the object data manager. Note: To use this command, you must either have root user authority or be a member of the system group. Flags -v verbose Example To synchronize the device configuration database with the logical volume manager information for rootvg, enter the following: synclvodm rootvg How to Replace a Disk?: ======================= 1. Short version for normal VG (not rootvg) and the disk is working: -------------------------------------------------------------------- extendvg VolumeGroupName hdiskY migratepv hdiskX hdiskY reducevg -d VolumeGroupName hdiskX 2. More Detail: --------------- 2.1 The disk is mirrored: ------------------------- 1. Remove all copies from the disk: # unmirrorvg vg_name hdiskX 2. Remove disk from VG: # reducevg vg_name hdiskX 3. Remove disk from ODM: # rmdev -l hdiskX -d 4. Add new disk to the system. 5. Add the new disk to the VG: # extendvg vg_name hdiskY 6. Create new copies: # mirrorvg vg_name # syncvg vg_name 2.2 The disk was not mirrored, or you want to replace a working disk: --------------------------------------------------------------------- 1. Add the new disk to the system. 2. Add the disk to the VG: # extendvg vg_name hdiskY 3. Migrate old disk to new disk: # migratepv hdiskX hdiskY 4. Remove old disk from VG: # reducevg vg_name hdiskX 5. Remove old disk from ODM: # rmdev -l hdiskX -d 2.3 Replace the disk in the rootvg: ----------------------------------- 1. Add the new disk to the system. 2. Add the disk to the VG: # extendvg rootvg hdiskY 3. The diskX contains hd5? If so: # migratepv -l hd5 hdiskX hdiskY # bosboot -ad /dev/hdiskY # chpv -c hdiskX # bootlist -m normal hdiskY If hdiskX contains the primary dump device, you must deactivate it: # sysdumpdev -p /dev/sysdumpnull 4. Migrate old disk to new disk: # migratepv hdiskX hdiskY If the primary dump device has been deactivated, activate it again # sysdumpdev -p /dev/hdX 5. Remove old disk from VG: # reducevg rootvg hdiskX 6. Remove old disk from ODM: # rmdev -l hdiskX -d ------- Note: ------- IY94101: J2_DMAP_CORRUPT ERROR REPORT AFTER SHRINKING JFS2 FILESYSTEM APAR status Closed as program error. Error description After shrinking a filesystem, J2_DMAP_CORRUPT reports appear in the error report and some file creates/writes fail with "Invalid file system control data detected". Local fix Problem summary Problem conclusion Temporary fix Comments APAR information APAR number IY94101 Reported component name AIX 5.3 Reported component ID 5765G0300 Reported release 530 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2007-01-26 Closed date 2007-01-29 Last modified date 2007-05-25 APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Publications Referenced Fix information Fixed component name AIX 5.3 Fixed component ID 5765G0300 ------- Note: ------- Q: Since applying ML7 for AIX 5.1 I have been getting file corruption error messages on a particular filesystem and the only way to fix it is to umount the filesystem and fsck it. I thought it might be a hardware problem but now it is also happening on another machine I put the ML7 on and it is happening to the same filesystem (one machine is a test server of the other). The only unique thing about the filesystem is that it is not in rootvg and it is large -1281228 1024-blocks. Has anyone heard of this? Below is the error I am getting: LABEL: JFS_META_CORRUPTION IDENTIFIER: 684A365B Date/Time: Tue Apr 26 13:45:26 EDT Sequence Number: 2023 Machine Id: 0000F11F4C00 Node Id: XX00 Class: U Type: UNKN Resource Name: SYSPFS Resource Class: NONE Resource Type: NONE Location: NONE VPD: Description FILE SYSTEM CORRUPTION Probable Causes INVALID FILE SYSTEM CONTROL DATA Recommended Actions PERFORM FULL FILE SYSTEM RECOVERY USING FSCK UTILITY OBTAIN DUMP CHECK ERROR LOG FOR ADDITIONAL RELATED ENTRIES Failure Causes ADAPTER HARDWARE OR MICROCODE DISK DRIVE HARDWARE OR MICROCODE SOFTWARE PROGRAM STORAGE CABLE LOOSE, DEFECTIVE, OR UNTERMINATED Recommended Actions CHECK CABLES AND THEIR CONNECTIONS INSTALL LATEST ADAPTER AND DRIVE MICROCODE INSTALL LATEST STORAGE DEVICE DRIVERS IF PROBLEM PERSISTS, CONTACT APPROPRIATE SERVICE REPRESENTATIVE Detail Data FILE NAME xix_lookup.c LINE NO. 300 MAJOR/MINOR DEVICE NUMBER 0026 0006 ADDITIONAL INFORMATION 4A46 5345 426E 8C46 0000 000E 0000 001D 0003 0610 0000 0000 0000 0000 0000 0002 164D A330 0001 86D3 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 --------------------------------------------------------------------------- LABEL: JFS_FSCK_REQUIRED IDENTIFIER: CD546B25 Date/Time: Tue Apr 26 13:45:26 EDT Sequence Number: 2022 Machine Id: 0000F11F4C00 Node Id: XX00 Class: O Type: INFO Resource Name: SYSPFS Description FILE SYSTEM RECOVERY REQUIRED Recommended Actions PERFORM FULL FILE SYSTEM RECOVERY USING FSCK UTILITY Detail Data MAJOR/MINOR DEVICE NUMBER 0026 0006 FILE SYSTEM DEVICE AND MOUNT POINT /dev/lv04, /opt/egate Q: How can I remove a bizarre, irremovable file from a directory? I've tried every way of using /bin/rm and nothing works." A: In some rare cases a strangely-named file will show itself in your directory and appear to be un-removable with the rm command. Here is will the use of ls -li and find with its -inum [inode] primary does the job. Let's say that ls -l shows your irremovable as -rw------- 1 smith smith 0 Feb 1 09:22 ?*?*P Type: ls -li to get the index node, or inode. 153805 -rw------- 1 smith smith 0 Feb 1 09:22 ?*?^P The inode for this file is 153805. Use find -inum [inode] to make sure that the file is correctly identified. % find -inum 153805 -print ./?*?*P Here, we see that it is. Then used the -exec functionality to do the remove. . % find . -inum 153805 -print -exec /bin/rm {} \; Note that if this strangely named file were not of zero-length, it might contain accidentally misplaced and wanted data. Then you might want to determine what kind of data the file contains and move the file to some temporary directory for further investigation, for example: % find . -inum 153805 -print -exec /bin/mv {} unknown.file \; Will rename the file to unknown.file, so you can easily inspect it. Another way to remove strangely-named files is to use "ls -q" or "cat -v" to show the special characters, and then use shell's globbing mechanism to delete the file. $ ls -????*'? $ ls | cat -v -^B^C?^?*' $ rm ./-'^B'* -- achieved by typing control-V control-B $ ls the argument given to rm is a judicious selection of glob wildcards (*'s) and sufficient control characters to uniquely identify the file. The leading "./" is useful when the file begins with a hyphen. These binary name files are caused by: * accidental cut-and-pastes to shell prompts - especially when you paste something of the form: "junk > garbage" because the shell creates the file "garbage" before trying to execute the command "junk" * filesystem corruption (in which case touching the filesystem any more can really stuff things up) If you discover that you have two files of the same name, one of the files probably has a bizarre (and unprintable) character in its name. Most probably, this unprintable character is a backspace. For example: $ ls filename filename $ ls -q filename fl?ilename $ ls | cat -v filename fl^Hilename More on Filesystem errors (1): ------------------------------ Q: Hi all, I have a error message complaining about filesystem being full. but df does not sure any filesystem being full. The error report gives me the major/minor number: 0027/0004 I went to /dev dir, and searched for the numbers, but it turns out to be ptyp4. Why is that? What does this mean? Any suggestion? A: Those numbers are reported in hex, the actual major/minor #'s are 39 and 4 A: Convert the errpt #'s to hex. The use ls -l to find them. Q: Hi, I get a error concerning a filesystem. Now I have 2 questions: - What is the way to find out which filesystems is concerned? - What can I do? Because all fs have unused space. I cannot find any fs with 100% in use. LABEL: J2_FS_FULL IDENTIFIER: CED6B4B5 Date/Time: Mon Dec 27 12:49:35 NFT Sequence Number: 3420 Machine Id: 00599DDD4C00 Node Id: srvdms0 Class: O Type: INFO Resource Name: SYSJ2 Description UNABLE TO ALLOCATE SPACE IN FILE SYSTEM Probable Causes FILE SYSTEM FULL Recommended Actions INCREASE THE SIZE OF THE ASSOCIATED FILE SYSTEM REMOVE UNNECESSARY DATA FROM FILE SYSTEM USE FUSER UTILITY TO LOCATE UNLINKED FILES STILL REFERENCED Detail Data JFS2 MAJOR/MINOR DEVICE NUMBER 002B 000B A: 002b is 2*16+11 -->43 ls -l /dev|grep 43, 000b is 11 --> look for 43, 11 Date: Wed, 29 Dec 2004 11:06:27 +0000 To: aix-l@Princeton.EDU Q: Subject Re: error concerning filesystem [Virus checked] Hi Holger, A small query...how did you arrive at this figure of 43 from the error code. The decimal value of B is 11 but I could not understand the 2*16.. can you please exp this.... A: The major/minor numbers (002B 000B) are in hex: hex abcd = a*16^3+b*16^2+c*16^1+d therefore hex 002B=0*16^3+0*16^2+2*16^1+11=2*16+11 AIX superblock issues: ---------------------- -- Hint 1 for AIX: -- --------------- thread: Use this command in case the superblock is corrupted. This will restore the BACKUP COPY of the superblock to the CURRENT copy. # dd count=1 bs=4k skip=31 seek=1 if=/dev/hd4 of=/dev/hd4 # fsck /dev/hd4 2>&1 | tee /tmp/fsck.errors Note: fuser Identifies processes using a file or file system # fuser -u /dev/hd3 Sample output: /dev/hd3: 2964(root) 6615c(root) 8465(casado) 11290(bonner) -- Hint 2 for AIX: -- --------------- http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.howtos/doc/howto/HT_baseadmn_badmagnumber.htm Fixing a corrupted magic number in the file system superblock If the superblock of a file system is damaged, the file system cannot be accessed. You can fix a corrupted magic number in the file system superblock. Most damage to the superblock cannot be repaired. The following procedure describes how to repair a superblock in a JFS file system when the problem is caused by a corrupted magic number. If the primary superblock is corrupted in a JFS2 file system, use the fsck command to automatically copy the secondary superblock and repair the primary superblock. In the following scenario, assume /home/myfs is a JFS file system on the physical volume /dev/lv02. The information in this how-to was tested using AIXr 5.2. If you are using a different version or level of AIX, the results you obtain might vary significantly. 1. Unmount the /home/myfs file system, which you suspect might be damaged, using the following command: # umount /home/myfs 2. To confirm damage to the file system, run the fsck command against the file system. For example: # fsck -p /dev/lv02 If the problem is damage to the superblock, the fsck command returns one of the following messages: fsck: Not an AIXV5 file system OR Not a recognized filesystem type 3. With root authority, use the od command to display the superblock for the file system, as shown in the following example: # od -x -N 64 /dev/lv02 +0x1000 Where the -x flag displays output in hexadecimal format and the -N flag instructs the system to format no more than 64 input bytes from the offset parameter (+), which specifies the point in the file where the file output begins. The following is an example output: 0001000 1234 0234 0000 0000 0000 4000 0000 000a 0001010 0001 8000 1000 0000 2f6c 7633 0000 6c76 0001020 3300 0000 000a 0003 0100 0000 2f28 0383 0001030 0000 0001 0000 0200 0000 2000 0000 0000 0001040 In the preceding output, note the corrupted magic value at 0x1000 (1234 0234). If all defaults were taken when the file system was created, the magic number should be 0x43218765. If any defaults were overridden, the magic number should be 0x65872143. 4. Use the od command to check the secondary superblock for a correct magic number. An example command and its output follows: # od -x -N 64 /dev/lv02 +0x1f000 001f000 6587 2143 0000 0000 0000 4000 0000 000a 001f010 0001 8000 1000 0000 2f6c 7633 0000 6c76 001f020 3300 0000 000a 0003 0100 0000 2f28 0383 001f030 0000 0001 0000 0200 0000 2000 0000 0000 001f040 Note the correct magic value at 0x1f000. 5. Copy the secondary superblock to the primary superblock. An example command and output follows: # dd count=1 bs=4k skip=31 seek=1 if=/dev/lv02 of=/dev/lv02 dd: 1+0 records in. dd: 1+0 records out. Use the fsck command to clean up inconsistent files caused by using the secondary superblock. For example: # fsck /dev/lv02 2>&1 | tee /tmp/fsck.errs For more information The fsck and od command descriptions in AIX 5L Version 5.3 Commands Reference, Volume 4 AIX Logical Volume Manager from A to Z: Introduction and Concepts, an IBM Redbook AIX Logical Volume Manager from A to Z: Troubleshooting and Commands, an IBM Redbook "Boot Problems" in Problem Solving and Troubleshooting in AIX 5L, an IBM Redbook Linux superblock issues: ------------------------ 1. DAMAGED SUPERBLOCK If a filesystem check fails and returns the error message "Damaged Superblock" you're lost . . . . . . . or not ? Well, not really, the damaged "superblock" can be restored from a backup. There are several backups stored on the harddisk. But let me first have a go at explaining what a "superblock"is. A superblock is located at position 0 of every partition, contains vital information about the filesystem and is needed at a fielsystem check. The information stored in the superblock are about what sort of fiesystem is used, the I-Node counts, block counts, free blocks and I-Nodes, the numer of times the filesystem was mounted, date of the last filesystem check and the first I-Node where / is located. Thus, a damaged superblock means that the filesystem check will fail. Our luck is that there are backups of the superblock located on several positions and we can restore them with a simple command. The usual ( and only ) positions are: 8193, 32768, 98304, 163840, 229376 and 294912. ( 8193 in many cases only on older systems, 32768 is the most current position for the first backup ) You can check this out and have a lot more info about a particular partition you have on your HD by: CODE # dumpe2fs /dev/hda5 You will see that the primary superblock is located at position 0, and the first backup on position 32768. O.K. let's get serious now, suppose you get a "Damaged Superblock" error message at filesystem check ( after a power failure ) and you get a root-prompt in a recovery console, then you give the command: CODE # e2fsck -b 32768 /dev/hda5 don't try this on a mounted filesystem It will then check the filesystem with the information stored in that backup superblock and if the check was successful it will restore the backup to position 0. Now imagine the backup at position 32768 was damaged too . . . then you just try again with the backup stored at position 98304, and 163840, and 229376 etc. etc. until you find an undamaged backup ( there are five backups so if at least one of those five is okay it's bingo ! ) So next time don't panic . . just get the paper where you printed out this Tip and give the magic command CODE # e2fsck -b 32768 /dev/hda5 ------- Note: ------- XXX LABEL: LVM_SA_PVMISS IDENTIFIER: F7DDA124 Date/Time: Fri Jan 30 17:25:44 MET 2009 Sequence Number: 1079 Machine Id: 00CC94EE4C00 Node Id: srv1 Class: H Type: UNKN Resource Name: LVDD Resource Class: NONE Resource Type: NONE Location: Description PHYSICAL VOLUME DECLARED MISSING Probable Causes POWER, DRIVE, ADAPTER, OR CABLE FAILURE Detail Data MAJOR/MINOR DEVICE NUMBER 8000 0011 0000 0001 SENSE DATA 00CC 94EE 0000 4C00 0000 011D B976 A0BF 00CC 94EE DAE4 754C 0000 0000 0000 0000 ------- Note: ------- case 1: LABEL: SCAN_ERROR_CHRP IDENTIFIER: BFE4C025 Date/Time: Thu Apr 2 10:28:37 ZOM 2009 Sequence Number: 1083 Machine Id: 00CDA84C4C00 Node Id: srv1 Class: H Type: PERM Resource Name: sysplanar0 Resource Class: planar Resource Type: sysplanar_rspc Location: Description UNDETERMINED ERROR Failure Causes UNDETERMINED Recommended Actions RUN SYSTEM DIAGNOSTICS. Detail Data PROBLEM DATA 0644 00E0 0000 0698 9E00 8E00 0000 0000 0000 0000 4942 4D00 5048 0030 0100 DD00 2009 0402 0824 5933 2009 0402 0824 5976 4500 010A 0000 0000 0000 0000 0000 0000 5046 70BE 5046 70BE 5548 0018 0100 DD00 2303 2000 0000 E500 0000 A800 0000 0000 case 2: LABEL: INTRPPC_ERR IDENTIFIER: 853015D6 Date/Time: Sun Mar 22 00:27:49 MET 2009 Sequence Number: 1515 Machine Id: 00C503AC4C00 Node Id: heilbot Class: H Type: UNKN Resource Name: sysplanar0 Resource Class: planar Resource Type: sysplanar_rspc Location: Description UNDETERMINED ERROR Probable Causes SYSTEM I/O BUS SOFTWARE PROGRAM ADAPTER DEVICE Recommended Actions PERFORM PROBLEM DETERMINATION PROCEDURES Detail Data BUS NUMBER 9001 00C0 INTERRUPT LEVEL 0009 0001 Number of Occurrences 0000 0001 ------- Note: ------- LABEL: FSCSI_ERR4 IDENTIFIER: 3074FEB7 Date/Time: Sat Mar 28 21:01:31 MET 2009 Sequence Number: 1597429 Machine Id: 0005A21CD700 Node Id: goofy Class: H Type: TEMP Resource Name: fscsi0 Resource Class: driver Resource Type: efscsi Location: U787F.001.DPM2D71-P1-C5-T1 Description ADAPTER ERROR Probable Causes ADAPTER HARDWARE OR CABLE ADAPTER MICROCODE FIBRE CHANNEL SWITCH OR FC-AL HUB Failure Causes ADAPTER CABLES AND CONNECTIONS DEVICE Recommended Actions PERFORM PROBLEM DETERMINATION PROCEDURES CHECK CABLES AND THEIR CONNECTIONS VERIFY DEVICE CONFIGURATION Detail Data SENSE DATA 0000 0000 0000 00AF 0000 0902 0200 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 003D 001B 0000 0000 003F 001B 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 402F 0000 0032 0002 0000 0000 0000 0000 0203 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0003 5006 0484 52A5 BB6C 5006 0484 52A5 BB6C 0200 0000 0000 0000 0000 0000 0000 0000 0000 0000 2D6B 3000 ------- Note: ------- LABEL: NONE_DUMP IDENTIFIER: A63BEB70 Date/Time: Mon Nov 10 15:27:23 MET 2008 Sequence Number: 4598 Machine Id: 00C503AC4C00 Node Id: goofy Class: U Type: NONE Resource Name: SYSPROC Resource Class: NONE Resource Type: NONE Location: Detail Data 0000 000B 0000 0000 000C 60D6 0000 001A 0000 00A0 0000 0000 2F76 6172 2F63 6F72 652F 636F 7265 2E38 3131 3232 322E 3130 3134 3237 3233 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 6B63 7000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 6663 6C6F 7365 2039 380A 6361 7467 6574 7320 3144 300A 6361 7467 6574 7320 3144 300A 5F58 4465 6661 756C 7420 3438 0A5F 5849 4F45 7272 6F72 2032 430A 785F 7265 6164 5F35 3820 4230 0A5F 5852 6561 6420 3143 0A5F 5845 7665 6E74 7351 2033 4130 0A58 4576 656E 7473 5175 2035 380A 4669 6E64 496E 7075 7420 3838 0A5F 5874 5761 6974 466F 2033 4543 0A58 7441 7070 4E65 7874 2031 3734 0A58 7441 7070 4D61 696E 2034 380A 3F3F 0A3F 3F0A 3F3F 0A3F 3F0A 3F3F 0A5F 5F73 7461 7274 2038 430A Symptom Data REPORTABLE 1 INTERNAL ERROR 0 SYMPTOM CODE PCSS/SPI2 FLDS/kcp SIG/11 FLDS/fclose VALU/98 FLDS/__start ------- Note: ------- LABEL: CONSOLE IDENTIFIER: 7F88E76D Date/Time: Thu Mar 26 07:36:12 MET 2009 Sequence Number: 545 Machine Id: 00CC696E4C00 Node Id: fint Class: S Type: PERM Resource Name: console Description SOFTWARE PROGRAM ERROR Probable Causes SOFTWARE PROGRAM Failure Causes SOFTWARE PROGRAM Recommended Actions REVIEW DETAILED DATA Detail Data USER'S PROCESS ID: 192716 DETECTING MODULE conwrite FAILING MODULE UIO_WRITE RETURN CODE 5 ERROR CODE 0 ------- Note: ------- LABEL: LVM_MWCWFAIL IDENTIFIER: 41BF2110 Date/Time: Fri Jan 30 14:58:11 MET 2009 Sequence Number: 476 Machine Id: 00CC696E4C00 Node Id: goofy Class: H Type: UNKN Resource Name: LVDD Resource Class: NONE Resource Type: NONE Location: Description MIRROR WRITE CACHE WRITE FAILED Detail Data MAJOR/MINOR DEVICE NUMBER 8000 0011 0000 0001 BLOCK NUMBER 2 ERROR CODE AS DEFINED IN sys/errno.h 5 SENSE DATA 00CC 696E 0000 4C00 0000 011D AE6F 59DF 00CC 696E 082E 051E 0000 0000 0000 0000 ------- Note: ------- LABEL: CORE_DUMP IDENTIFIER: C69F5C9B Date/Time: Tue Mar 31 02:00:41 ZOM 2009 Sequence Number: 203 Machine Id: 00CC696E4C00 Node Id: goofy Class: S Type: PERM Resource Name: SYSPROC Description SOFTWARE PROGRAM ABNORMALLY TERMINATED Probable Causes SOFTWARE PROGRAM User Causes USER GENERATED SIGNAL Recommended Actions CORRECT THEN RETRY Failure Causes SOFTWARE PROGRAM Recommended Actions RERUN THE APPLICATION PROGRAM IF PROBLEM PERSISTS THEN DO THE FOLLOWING CONTACT APPROPRIATE SERVICE REPRESENTATIVE Detail Data SIGNAL NUMBER 11 USER'S PROCESS ID: 360584 FILE SYSTEM SERIAL NUMBER 27 INODE NUMBER 28967 CORE FILE NAME /var/core/core.360584.31000041 PROGRAM NAME BS_sear STACK EXECUTION DISABLED 0 COME FROM ADDRESS REGISTER PROCESSOR ID hw_fru_id: 1 hw_cpu_id: 8 ADDITIONAL INFORMATION ?? ?? Unable to generate symptom string. ------- Note: ------- Q: LABEL: TS_NIM_ERROR_STUCK_ IDENTIFIER: 3D32B80D Date/Time: Sat Mar 28 16:30:19 MET 2009 Sequence Number: 1157 Machine Id: 00CC94EE4C00 Node Id: vleet Class: S Type: PERM Resource Name: topsvcs Description NIM thread blocked Probable Causes A thread in a Topology Services Network Interface Module (NIM) process was blocked Topology Services NIM process cannot get timely access to CPU User Causes Excessive memory consumption is causing high memory contention Excessive disk I/O is causing high memory contention Recommended Actions Examine I/O and memory activity on the system Reduce load on the system Tune virtual memory parameters Call IBM Service if problem persists Failure Causes Excessive virtual memory activity prevents NIM from making progress Excessive disk I/O traffic is interfering with paging I/O Recommended Actions Examine I/O and memory activity on the system Reduce load on the system Tune virtual memory parameters Call IBM Service if problem persists Detail Data DETECTING MODULE rsct,nim_control.C,1.39.1.22,5947 ERROR ID 6BUfAx.98Yn7/79N1Nr9GF0................... REFERENCE CODE Thread which was blocked receive thread Interval in seconds during which process was blocked 86 Interface name rhdisk4 A: IZ02759: TOPOLOGY SERVICES NIM COMMAND RECEIVE THREAD TOO SENSITIVE TO NIM_ERROR_STUCK CAUSED BY A CLOCK CHANGE. A fix is available Obtain fix for this APAR APAR status Closed as program error. Error description The Topology Services NIM threads have always complained of being blocked if the clock is moved forward by 7-10 seconds or more (depending on the thread). Error Label: TS_NIM_ERROR_STUCK_ER Error ID: 3D32B80D Normally the length of time stuck reported is about the same as the amount of time the clock was moved forward. However lately the Command Receive thread has been seen in some cases to report 10-12 seconds of blockage from a very small (1-2 second) change in time. This was first reported as a result of an xntpd clock adjustment, but can be recreated with the date command. Thread which was blocked command receive thread Interval in seconds during which process was blocked 11 Interface name en4 Local fix ignore error. Problem summary A recent change to certain internal timers in the command receive thread of the Network Interface Modules makes that thread complain of being stuck (for 10 seconds or more) when the clock jumps for any interval of a second or more. Problem conclusion The blockage threshold has been adjusted for the command receive thread to eliminate this problem. Note that all NIM threads will complain of being stuck when the clock jumps for a significant time (at least 6 seconds, greater than that in most cases), and that will not change with this fix. This only eliminates one of the threads being much more sensitive to a time change than the rest. Temporary fix Comments APAR information APAR number IZ02759 Reported component name RSCT/RMC Reported component ID 5765F07AP Reported release 247 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2007-08-10 Closed date 2007-08-24 Last modified date 2007-09-26 APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: IZ03716 A: I've seen something more on this topic. I've seen that xnptd is running on our servers, but they're not syncronized. So on one server I've stopped the xntpd service and executed manually ntpdate against the time server (a windows server). The server has syncronised the date/hour, and some new "NIM thread blocked" errors have just appeared in errpt. Q: the problem is that there are so many "sometimes" in this situation sometimes only a disk-heartbeat is blocked sometimes only a network-heartbeat is blocked sometimes both sometimes there is one entry in errlog... i ignore it sometimes there are 3-4 errors 2 days ago 2 nodes of the same cluster were starting to log those errors every node reported nim_threads blocked for 40 seconds finally they didnt see each other anymore... standby took over but primary didnt notice... when that situation went away a dms was triggered this cluster is a 64 cpu p595 how can 4 (nim-)threads be blocked for 40 seconds on a system having 64 (physical) cpus??? it is NOT a ntp problem. time is in sync and is syncronized 2 times a day with ntpdate/cron (you can easily trigger this error in errpt by giving a kill -17 to the hats-proc, waiting 30 seconds and give a kill -19 to it. so ntp could be a problem... but isnt) once when this error came I was logged in one the node and hat a vmstat running root@sbpsgava01:/root > errpt|head IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3D32B80D 1030182208 P S topsvcs NIM thread blocked 3D32B80D 1030182208 P S topsvcs NIM thread blocked --> error at 18:22 now look at vmstat-output: System configuration: lcpu=12 mem=28672MB ent=6.00 kthr memory page faults cpu time ----------- --------------------- --------------------------------- --- ------------------ ----------------------- -------- r b p avm fre fi fo pi po fr sr in sy cs us sy id wa pc ec hr mi se 1 1 0 4387395 2332220 53 35 0 0 68 821 69 10613 445 9 1 89 2 0.59 9.9 18:18:03 2 4 0 4387482 2332188 16 139 0 0 96 1035 205 6263 659 4 1 94 1 0.33 5.6 18:19:03 2 1 0 4389805 2330376 38 70 0 0 63 723 117 6636 513 10 1 87 1 0.71 11.9 18:20:03 3 1 0 4392562 2327118 12 47 0 0 28 314 79 7237 450 3 1 95 0 0.27 4.5 18:21:03 6 1 0 4388433 2331413 23 53 0 0 52 634 90 6105 499 3 1 95 1 0.29 4.8 18:22:03 5 1 0 4377480 2342374 46 46 0 0 74 1055 102 3373 551 4 1 94 1 0.32 5.3 18:23:03 2 1 0 4388646 2330929 132 56 0 0 156 2203 122 16122 596 12 1 82 4 0.84 13.9 18:24:03 2 1 0 4391073 2328497 81 44 0 0 104 1632 139 22069 647 13 2 82 3 0.94 15.7 18:25:03 1 1 0 4395142 2324464 108 30 0 0 119 1667 102 18325 564 13 1 82 4 0.87 14.4 18:26:03 2 1 0 4362831 2356799 88 34 0 0 104 1655 103 10019 503 7 1 88 3 0.51 8.5 18:27:03 6 physical cpu. 12 logical. only 6 running and 1 blocked process at 18:22. 94 % idle!! so the often heard response from ibm to this problem (that goes "there were too much load on the system") cannot convince me -----Original Message----- From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of Stefan.Gocke@xxxxxxxxxxx Sent: Tuesday, February 24, 2009 2:38 PM To: aix-l@xxxxxxxxxxxxx Subject: Re: NIM thread blocked Hello Holger, this most ofthenly comes from the disk-heartbeat when backup runs. Is the NIM-THREAD blocked from the disk-heartbeat or the LAN heartbeat? Does it occur on all interfaces? then it's time to really do something. And there is an old error in some releases/ptfs of HACMP that had a problem when the automatic cluster verify runs. I've seen cluster where 400 hdisks had this error. It happend when the automatic verification from the node NOT haveing the the disks ran verification. That was an error in programming, not a real error. If you ran manual verification it didn't happen. When this occurs, the system did not give the CPU to the heartbeat process to write it's heartbeat, because a higher priority thread was blocking access to that device. If it happens often - I normally suggest to add another fiberchannel adapter (if disk heartbeat). As long as all other hearbeats are working normally and if it's just sporadic .... ignore for now and monitor that it doesn't happen too often. Regards. Stefan -- -----Original Message----- Date: Tue, 24 Feb 2009 13:35:24 +0100 Subject: NIM thread blocked From: Holger van Koll To: aix-l@xxxxxxxxxxxxx Hello, on about 60 systems (proably all that have hacmp running) I get entries in errpt like these: 3D32B80D 16-02-09 00:05 P S topsvcs NIM thread blocked Details in errlog tell that those nim-threads (one per heartbeat) have been blocked for a certain amount of time, can be 5 seconds, can be 50. When I look at performance-logging tools (like patrol or even simple vmstat commands that were running) I see that those commands have been blocked for approximately the same amount of time. So, something on some of my nodes prevents tasks to be executed. The nodes vary from 64 cpu p595 to partitions with 0.5 cpu. The errors come without and regularity. One night 5 come. Then its quiet for days or weeks. Does anybody have an idea or at least a similar situation? Regs, A: ------- Note: ------- ------- Note: ------- ------- Note: ------- ------- Note: ------- ------- Note: ------- ------- Note: ------- ------- Note: ------- ############################################################## SECTION 15: Filesystems and Logical Volume Management: ############################################################## Traditional filesystems in Solaris: =================================== >>>> A few traditional filesystem commands: =========================================== The UFS filesystem has always been the most popular fs on Solaris. Ofcourse, when the newer ZFS filesystem became available, it has been rapidly adopted. We will frst take a look at a few classical commands, that you would typically use on a UFS filesystem. Ofcourse, many "listing commands" like for example, df (to show what's used and what is free space), can be used on ZFS as well. But creating an fs on ZFS goes absolutly different from what you can find in section 29.1 Checks on the filesystems in Solaris: ------------------------------------- 1. used space etc.. # df -k, df -h etc.. # du -ks /home/fred Shows only a summary of the disk usage of the /home/fred subdirectory (measured in kilobytes). # du -ks /home/fred/* Shows a summary of the disk usage of each subdirectory of /home/fred (measured in kilobytes). # du -s /home/fred Shows a total summary of /home/fred # du -sg /data Shows a total summary of /data in GB This command shows the diskusage of /dirname in GB # du -g /dirname 2. examining the disklabel # prtvtoc /dev/rdisk/c0t3d0s2 3. format just by itself shows the disks # format # format -> specify disk -> choose partition -> choose print to get the partition table 4. Display information about SCSI devices # cfgadm -al or, from the PROM, commands like probe-scsi What is the CDROM device in Solaris: ------------------------------------ -- pointer 1. If you have a CD put in the drive, and it was automounted, simply use the "df" command to view your filesystems: # df -k or df -h -- pointer 2. From the output of the command # iostat -En you could figure out what logical device name your CDROM has. -- pointer 3. Solaris uses the same naming conventions as used with hardisks, for example the CDROM in the following command # mount -r -F hsfs /dev/dsk/c0t6d0s2 /cdrom means that in this case, the CDROM device is "/dev/dsk/c0t6d0s2" Normally, a CD is automounted on "/cdrom" or "/cdrom/cdrom0" The simplest way to mount CDROM on Solaris is use vold daemon. The vold daemon in Solaris manages the CD-ROM device and automatically performs the mounting similar to how Windows manages CDROMs (but not as transparent or reliable). If CD is detected in drive its should be automatically mounted to the /cdrom/cdrom0 directory. Recovering disk partition information in Solaris: ------------------------------------------------- Use the fmthard command to write the backup VTOC information back to the disk. The following example uses the fmthard command to recover a corrupt label on a disk named /dev/rdisk/c0t3d0s1. The backup VTOC information is in a file named c0t3d0 in the /vtoc directory. # fmthard -s /vtoc/c0t3d0s0 /dev/rdsk/c0t3d0s2 Remember that the format of /dev/(r)dsk/cWtXdYsZ means: W is the controller number, X is the SCSI target number, Y is the logical unit number (LUN, almost always 0), Z is the slice or partition number Make a new filesystem in Solaris: --------------------------------- To create a UFS filesystem on a formatted disk that already has been divided into slices you need to know the raw device filename of the slice that will contain the filesystem. Example: # newfs /dev/rdsk/c0t3d0s7 defaults on UFS on Solaris: blocksize 8192 fragmentsize 1024 one inode for each 2K of diskspace FSCK in Solaris: ---------------- If you just want to determine the state of a filesystem, whether it needs checking, you can use the fsck command while the fs is mounted. Example: # fsck -m /dev/rdsk/c0t0d0s6 The state flag in the superblock of the filesystem you specify is checked to see whether the filesystem is clean or requires checking. If you ommit the device argument, all the filesystems listed in /etc/vfstab with a fsck pass value greater than 0 are checked. Adding a disk in Solaris 2.6, 2.7, 8, 9: ---------------------------------------- In case you have just build in a new disk, its probably best, to first use the probe-scsi command from the OK prompt: ok probe-scsi .. Target 3 Unit 0 Disk Seagate ST446452W 0001 .. Next, do a reconfiguration reboot, with the "boot -r" command: ok boot -r Specifying the -r flag when booting, tells Solaris to reconfigure itself by scanning for new hardware. Once the system is up, check the output for "dmesg" to find kernel messages relating to the new disk. You probably find complaints telling you stuff as "corrupt label - wrong magic number" etc.. That's good, because we now know that the kernel is aware of this new disk. In this example, our disk is SCSI target 3, so we can refer to the whole disks as /dev/rdsk/c0t3d0s2 # slice 2, or partition 2, s2 refers to the whole disk Remember that the format of /dev/(r)dsk/cWtXdYsZ means: W is the controller number, X is the SCSI target number, Y is the logical unit number (LUN, almost always 0), Z is the slice or partition number We now use the format program to partition the disk, and afterwards create filesystems. # format /dev/rdsk/c0t3d0s2 (.. output..) FORMAT MENU: format>label Ready to label disk, continue? y format>partition PARTITION MENU: partition> Once you have created and sized the partitions, you can get a list with the "partition>print" command. Now, for example, you can create a filesystem like in the following command: # newfs /dev/rdsk/c0t3d0s0 devfsadm: --------- As from Solaris 8: devfsadm(1M) maintains the /dev and /devices namespaces. It replaces the previous suite of devfs administration tools including drvconfig(1M) , disks(1M) , tapes(1M) , ports(1M) , audlinks(1M) , and devlinks(1M) . The default operation is to attempt to load every driver in the system and attach to all possible device instances. devfsadm then creates device special files in /devices and logical links in /dev . In other words, the devfsadm command is used to dynamically reconfigure system device tables without having to reboot the system. Examples: # devfsadm -i sd # devfsadm -c tape In the first example, devfsadm configures only those devices supported by the sd driver. In the second example, devfsadm configures only tape devices. >>>> Other notes on filesystems on Solaris: =========================================== There are at least 4 different types of filesystems you can use with Solaris 10 (except for zfs, for the older Solaris 8 and 9 versions). These are: -- UFS The traditional filesystem for Solaris systems. UFS is old technology but it is a stable and fast filesystem. Sun has continuously tuned and improved the code over the years. Solaris 10 (and older ofcouse) can only boot from a UFS root filesystem. In the future, ZFS boot will be available, as it already is in OpenSolaris. But for now, every Solaris system must have at least one UFS filesystem. Note: This "boot-statement" was true at the time of writing. Maybe you read this way after that time, and maybe Solaris can now boot from zfs or other filesystem. -- ZFS We will talk a bit on ZFS in section 29.3 -- VxFS The Veritas filesystem and volume manager have their roots in a fault-tolerant proprietary minicomputer built by Veritas in the 1980s. They have been available for Solaris since at least 1993 and have been ported to AIX and Linux. They are integrated into HP-UX and SCO UNIX, and Veritas Volume Manager code has been used (and extensively modified) in Tru64 UNIX and even in Windows. VxFS has never been part of Solaris but, when UFS was the only option, it was a popular addition. VxVM and VxFS are tightly integrated. Through vxassist, one may shrink and grow filesystems and their underlying volumes with minimal trouble. VxFS can run in single instance mode or in a parallel access/cluster file system mode. This latter mode allows for multiple servers (also known as cluster nodes) to simultaneously access the same file system. When run in this mode, VxFS is referred to as VERITAS Cluster File System. Cluster File System provides cache coherency and POSIX compliance across nodes, so that data changes are atomically seen by all cluster nodes simultaneously. Because Cluster File System shares the same binaries and same on-disk layout as single instance VxFS, moving between cluster and single instance mode is straightforward. -- SAM and QFS QFS is Sun's cluster filesystem, meaning that the same filesystem may be simultaneously mounted by multiple systems. SAM is a hierarchical storage manager; it allows a set of disks to be used as a cache for a tape library. SAM and QFS are designed to work together, but each may be used separately. -- PCFS It's even possible to use the DOS FAT filesystem. -- HSFS Ofcourse, the CDROM HSFS can be used. Maybe the following list will show you what can be used in Solaris: Filesystem Type Device Description UFS Regular Disk Unix Fast filesystem; default in Solaris ZFS Regular Disk The new Regular FS in Solaris 10 VxFS Regular Disk Veritas filesystem QFS Regular Disk QFS filesystem from LSC Inc. pcfs Regular Disk MSDOS FAT and FAT32 filesystem hsfs Regular Disk High Sierra filesystem (CDROM) tmpfs Regular Memory Uses memory and swap nfs Pseudo Network Network filesystem cachefs Pseudo filesystem Uses a local disk as cache for another NFS filesystem autofs Pseudo filesystem Uses a dynamic layout to mount other filesystems specfs Pseudo Device drivers filesystem for the /dev devices procfs Pseudo Kernel /proc filesystem representing processes sockfs Pseudo Network Filesystem of socket connections fifofs Pseudo Files FIFO filesystem If we look at the regular disk based filesystems, the following can be said on the "allocation format": Filesystem Allocation format UFS Block, allocator tries to allocate sequential blocks VxFS Extent based QFS Extent based ZFS Extent based >>>> Some notes on the ZFS filesystem. Solaris 10 ================================================== >>> ZFS Pooled Storage: ----------------------- ZFS uses the concept of storage pools to manage physical storage. Historically, file systems were constructed on top of a single physical device. To address multiple devices and provide for data redundancy, the concept of a "logical volume manager", LVM, was introduced to provide for Volume Groups, and Logical Volumes (which could span multiple disks), and then add a filesystem on such a Logical Volume. This design added another layer of complexity and ultimately prevented certain file system advances, because the file system had no control over the physical placement of data on the virtualized volumes. ZFS eliminates the volume management altogether. Instead of forcing you to create virtualized volumes, ZFS aggregates devices into a storage pool. The storage pool describes the physical characteristics of the storage (device layout, data redundancy, and so on,) and acts as an arbitrary data store from which file systems can be created. File systems are no longer constrained to individual devices, allowing them to share space with all file systems in the pool. You no longer need to predetermine the size of a file system, as file systems grow automatically within the space allocated to the storage pool. When new storage is added, all file systems within the pool can immediately use the additional space without additional work. In many ways, the storage pool acts as a virtual memory system. When a memory DIMM is added to a system, the operating system doesn't force you to invoke some commands to configure the memory and assign it to individual processes. All processes on the system automatically use the additional memory. Everything you hate about managing file systems and volumes is gone: you don't have to use format, and create slices/partitions, use newfs, mount, edit /etc/vfstab, fsck, growfs, metadb, metainit, etc. Meet your new best friends: zpool and zfs. ZFS is easy, so let's get on with it! It's time to create your first pool: # zpool create tank c1t2d0 You now have a single-disk storage pool named tank, with a single file system mounted at /tank. There is nothing else to do. Yes, its really true: The new ZFS file system, tank, can use as much of the disk space as needed, and is automatically mounted at /tank. You can determine if your pool was successfully created by using the zpool list command. # zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT tank 80G 137K 80G 0% ONLINE - Suppose we create a file in /tank and want to see how things looks like: # mkfile 100m /tank/foo # df -h /tank Filesystem size used avail capacity Mounted on tank 80G 100M 80G 1% /tank If you want mirrored storage for mail and home directories, that's easy too: Create the pool: # zpool create tank mirror c1t2d0 c2t2d0 Now lets try to create the "/var/mail" file system: # zfs create tank/mail # zfs set mountpoint=/var/mail tank/mail Create home directories, and mount them all in /export/home/: # zfs create tank/home # zfs set mountpoint=/export/home tank/home At this point, we have "/export/home" present. Now you could even do this: # zfs create tank/home/ahrens ZFS file systems are hierarchical: each one inherits properties from above. In this example, the mountpoint property is inherited as a pathname prefix. That is, tank/home/ahrens is automatically mounted at /export/home/ahrens because tank/home is mounted at /export/home. You don't have to specify the mountpoint for each individual user - you just tell ZFS the pattern. >>> Commit and Rollback semantics: ---------------------------------- ZFS uses a commit and rollback mechanism, to ensure that all data is written completely, and if not, everything is rolled back. You probably know that with former filesystems, that you could choose - for a filesystem without journaling (logging) - or indeed use journaling (or logging). Now you have a third option: using a transactional filesystem, like zfs. ZFS is a transactional file system, which means that the file system state is always consistent on disk. Traditional file systems (with no logging) overwrite data in place, which means that if the machine loses power, for example, between the time a data block is allocated and when it is linked into a directory, the file system will be left in an inconsistent state. Historically, this problem was solved through the use of the fsck command. This command was responsible for going through and verifying file system state, making an attempt to repair any inconsistencies in the process. This problem sometimes caused great pain to administrators and was never guaranteed to fix all possible problems. More recently, file systems have introduced the concept of journaling. The journaling process records action in a separate journal, which can then be replayed safely if a system crash occurs. This process introduces unnecessary overhead, because the data needs to be written twice, and often results in a new set of problems, such as when the journal can't be replayed properly. With a transactional file system, data is managed using copy on write semantics. Data is never overwritten, and any sequence of operations is either entirely committed or entirely ignored. This mechanism means that the file system can never be corrupted through accidental loss of power or a system crash. So, no need for a fsck equivalent exists. While the most recently written pieces of data might be lost, the file system itself will always be consistent. In addition, synchronous data (written using the O_DSYNC flag) is always guaranteed to be written before returning, so it is never lost. >>> Unparalleled Scalability: ----------------------------- ZFS has been designed from the ground up to be a very scalable file system. The file system itself is 128-bit, allowing for 256 quadrillion zettabytes of storage. All metadata is allocated dynamically, so no need exists to pre-allocate inodes or otherwise limit the scalability of the file system when it is first created. All the algorithms have been written with scalability in mind. Directories can have up to 248 (256 trillion) entries, and no limit exists on the number of file systems or number of files that can be contained within a file system. >>> Some more examples: ----------------------- -- To give user ahrens a 10G quota: # zfs set quota=10g tank/home/ahrens -- To give user bonwick a 100G reservation (membership has its privileges): # zfs set reservation=100g tank/home/bonwick -- To automatically NFS-export all home directories read/write: # zfs set sharenfs=rw tank/home -- To scrub all disks and verify the integrity of all data in the pool: # zpool scrub tank -- To replace a flaky disk: # zpool replace tank c2t2d0 c4t1d0 -- To add more space: # zpool add tank mirror c5t1d0 c6t1d0 -- To move your pool from SPARC machine 'sparky' to AMD machine 'amdy': [on sparky] # zpool export tank Physically move your disks from sparky to amdy. [on amdy] # zpool import tank -- Determining if Problems Exist in a ZFS Storage Pool The easiest way to determine if any known problems exist on the system is to use the "zpool status x" command. This command describes only pools exhibiting problems. If no bad pools exist on the system, then the command displays a simple message, as follows: # zpool status -x all pools are healthy Without the x flag, the command displays the complete status for all pools (or the requested pool, if specified on the command line), even if the pools are otherwise healthy. -- Understanding zpool status Output The complete zpool status output looks similar to the following: # zpool status tank pool: tank state: DEGRADED status: One or more devices has been taken offline by the administrator. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Online the device using 'zpool online' or replace the device with 'zpool replace'. scrub: none requested config: NAME STATE READ WRITE CKSUM tank DEGRADED 0 0 0 mirror DEGRADED 0 0 0 c1t0d0 ONLINE 0 0 0 c1t1d0 OFFLINE 0 0 0 errors: No known data errors >>>> Some examples on VxFS: =========================== Example 1: ---------- # mkfs -F vxfs /dev/vx/rdsk/testdg/msvol1 200m version 4 layout 409600 sectors, 204800 blocks of size 1024, log size 1024 blocks unlimited inodes, largefiles not supported 204800 data blocks, 203656 free data blocks 7 allocation units of 32768 blocks, 32768 data blocks last allocation unit has 8192 data blocks Example 2: ---------- We are going to show how to create a mirroring volume and a stripping volume on Veritas Storage Foundation. on Solaris 10. The first step is to check quantity of disks you have available on the server. A simple way to check this on solaris is using format utility: bash-3.00# format Searching for disks.done AVAILABLE DISK SELECTIONS: 0. c1t0d0 /pci@0,0/pci15ad,1976@10/sd@0,0 1. c1t1d0 /pci@0,0/pci15ad,1976@10/sd@1,0 2. c1t2d0 /pci@0,0/pci15ad,1976@10/sd@2,0 3. c1t3d0 /pci@0,0/pci15ad,1976@10/sd@3,0 Also, you can check disks available to Veritas Storage Foundation using vxdisk command: bash-3.00# vxdisk -o alldgs list DEVICE TYPE DISK GROUP STATUS c1t0d0s2 auto:none - - online invalid c1t1d0s2 auto:none - - online invalid c1t2d0s2 auto:none - - online invalid c1t3d0s2 auto:none - - online invalid You can see above that there are 4 disks on the server that are available to Veritas but they have not yet been initialized by Veritas (invalid status). To use a disk on Veritas SF you need to initialize this using Veritas utilities. NOTE: If you are going to use a disk on Veritas, pay attention that you should give this whole disk to Veritas. Disk will be formatted and you will lose all data in the disk when you are allocating a disk to Veritas Storage. In this example the only disk that is in use for O.S Solaris is the first one. (c1t0d0s2). We can use those 3 others disks to add on Veritas Storage. Caution: If for a mistake we add the first disk (c1t0d0s2) to Veritas Storage, it will format the disk and erase Solaris info. We need to pay attention to get the right disks. Let's start allocating (initializing) those 3 disks to solaris: # vxdisksetup -i c1t1d0 # # vxdisksetup -i c1t2d0 # vxdisksetup -i c1t3d0 We have those 3 disks initialized on Veritas, then the next step is to create a Disk Group. >>> Disk Group Disk Group is a collection of disks. Disk Group is very useful for management and isolation purpose. Lets create a DG using only the fist disk initialized on Veritas (c1t1d0). We are using DG1 for the name of Disk Group. # vxdg init DG1 c1t1d0 Check if DG1 was created successfully: # vxdg list NAME STATE ID DG1 enabled,cds 1218633322.13.vrt2 Also, check if the disk is properly assigned to DG1: # vxdisk -o alldgs list DEVICE TYPE DISK GROUP STATUS c1t0d0s2 auto:none - - online invalid c1t1d0s2 auto:cdsdisk c1t1d0 DG1 online c1t2d0s2 auto:cdsdisk - - online c1t3d0s2 auto:cdsdisk - - online Let's add more 2 disks to DG1: # vxdg -g DG1 adddisk c1t2d0s2 c1t3d0s2 Check if the disks are properly assigned to DG1: # vxdisk -o alldgs list DEVICE TYPE DISK GROUP STATUS c1t0d0s2 auto:none - - online invalid c1t1d0s2 auto:cdsdisk c1t1d0 DG1 online c1t2d0s2 auto:cdsdisk c1t2d0 DG1 online c1t3d0s2 auto:cdsdisk c1t3d0 DG1 online At this point we have added 3 disks into Disk Group DG1. Next step we will create 2 different volumes in the DG1. >>> Volumes A volume is a virtual storage that is used as an physical disk. Volume can be composed by many disks and have many layouts. In this example, we are going to create two Volumes: Volume VolS - Stripping layout using c1t1d0 and c1t2d0 disks (RAID 0). Volume VolM - Mirroring layout using c1t2d0 and c1t3d0 (RAID 1). -- To create a Stripping Volume VolS (Size=10m): # vxassist -g DG1 make VolS 10m layout=stripe c1t1d0s2 c1t2d0s2 To check if volume VolS was created successfully: # vxprint -g DG1 TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 dg DG1 DG1 - - - - - - dm c1t1d0 c1t1d0s2 - 159488 - - - - dm c1t2d0s2 c1t2d0s2 - 159488 - - - - dm c1t3d0s2 c1t3d0s2 - 159488 - - - - v VolS fsgen ENABLED 20480 - ACTIVE - - pl VolS-01 VolS ENABLED 20480 - ACTIVE - - sd c1t1d0-01 VolS-01 ENABLED 10240 0 - - - sd c1t2d0s2-01 VolS-01 ENABLED 10240 0 - - - -- To create a Mirroring Volume VolM (Size=10m): # vxassist -g DG1 make VolM 10m layout=mirror c1t2d0s2 c1t3d0s2 To check if Volume VolM was created successfully: # vxprint -g DG1 TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 dg DG1 DG1 - - - - - - dm c1t1d0 c1t1d0s2 - 159488 - - - - dm c1t2d0s2 c1t2d0s2 - 159488 - - - - dm c1t3d0s2 c1t3d0s2 - 159488 - - - - v VolM fsgen ENABLED 20480 - ACTIVE - - pl VolM-01 VolM ENABLED 20480 - ACTIVE - - sd c1t3d0s2-01 VolM-01 ENABLED 20480 0 - - - pl VolM-02 VolM ENABLED 20480 - ACTIVE - - sd c1t2d0s2-02 VolM-02 ENABLED 20480 0 - - - v VolS fsgen ENABLED 20480 - ACTIVE - - pl VolS-01 VolS ENABLED 20480 - ACTIVE - - sd c1t1d0-01 VolS-01 ENABLED 10240 0 - - - sd c1t2d0s2-01 VolS-01 ENABLED 10240 0 - - - Note: You can see above that both Volumes were created successfully. Also, you can note the difference between stripping and mirroring volume layouts. VolM is using two different Plex in differente disks. This means that if you lose one disk (Plex) you still have the data in the other disk (other Plex). It is the main configuration of Mirroring Volumes. VolS is using only one Plex divided in 2 disks. This means that the data will be split in those 2 disks. If you lose one disk you would lose the whole Plex, therefore you would lose the data. This is the main configuration of Stripping Volumes. It does not provide data protection but it is very useful for performance for purpose. Also, you can add those 2 layouts in only one layout that provide data protection and better performance. It is the case of RAID 0 + 1 or RAID 1 + 0. In the next step we will create 2 different Filesystem using those 2 Volumes. >>> Filesystem In this example we will create two filesystem: - Filesystem fsS will use VolS. It will be mounted at /stripe mount point. - Filesystem fsM will use VolM. It will be mounted at /mirror mount point. To create a VxFS filesystem: # mkfs -F vxfs /dev/vx/rdsk/DG1/VolS version 7 layout 20480 sectors, 10240 blocks of size 1024, log size 1024 blocks largefiles supported # mkfs -F vxfs /dev/vx/rdsk/DG1/VolM version 7 layout 20480 sectors, 10240 blocks of size 1024, log size 1024 blocks largefiles supported To mount a VxFS filesystem: # mount -F vxfs /dev/vx/dsk/DG1/VolS /stripe/ # mount -F vxfs /dev/vx/dsk/DG1/VolM /mirror/ Now there are 2 filesystems configured and you can use it at Solaris Mount Point level. Any data written in /stripe directory will be written in the stripping VolS volume. Any data written in /mirror directory will be written in the mirroring VolM volume. Example 3: ---------- Rather than mess with vxmake you can employ vxassist to do all the dirty work. If you have any amount of experience with vxassist you'll know that the more information you can supply to vxassist the better the end product will be. I'm going to use vxassist to build a stripe-pro volume from four disks and I want the volume to be 1G in size: # vxassist -g testdg make stripeprovol 1g layout=stripe-mirror \ testdg01 testdg02 testdg03 testdg04 Pretty kool, huh? Quick, efficient, and poorly named; everything you love about vxassist. I can then go a bit further and explore my sizing options to see how much I can grow my new volume if I need to: # vxassist -g testdg maxgrow stripeprovol Volume stripeprovol can be extended by 282050560 to 284147712 (138744Mb) See? Just like a normal volume. Now comes the beauty part. When you look at that seemingly unmanageable mess of objects above does it really make you want to tear it apart and work on it like you might other "normal" volumes? Probably not. And you'd be wise to feel that way, there are just too many places to get confused or make a mistake when real data is involved. What if you could get back to a more normal point of view? Luckily you can, check this out: # vxassist -g testdg convert stripeprovol layout=mirror-stripe Veritas terminology: In a "typical" RAID0+1 volume configuration, we take several disks and then create a stripe across thoughs disks (the RAID0 part). Then once complete we do this again on a separate set of disks, and then attach that new stripe to the first creating a mirror (the +1 part). We then have a RAID0+1 volume thats ready to have a filesystem put on it. The point of interest with this setup is that we're actually mirroring a complete stripe (and therefore ALL the disks in that stripe) to another stripe (and therefore ALL of it's disks). The problem here is that if for some reason we need to re-sync the volume we'd need to re-sync a full stripe to a full stripe (very timely) which is a nearly tragic proposition if your talking about 50G+. A far more efficient setup would be to mirror each disk to each disk... in other words, to mirror a bunch of disks on a one-to-one basis, and then build a stripe on top of these mirrors. In this case if we need to re-sync due to a disk failure we can simply sync the failed disk to its mirror, instead of the full stripe. This is the power of RAID1+0; the difference between mirroring the stripes (0+1) and stripping the mirrors (1+0). If the terms seem to confuse you, try this for size: RAID0 Striping (VxVM says: stripe) RAID1 Mirroring (VxVM says: mirror) RAID0+1 Striping plus Mirroring (VxVM says: mirror-stripe) Think this: Striped disks, then mirror the stripes RAID1+0 Mirroring plus Striping (VxVM says: stripe-mirror) (Veritas Marketing Dept says: StripePro Think this: Mirrored disks, then stripe on top of the mirrors Concat+Mirror Concatenation plus Mirroring (VxVM says: mirror) Same as RAID1 Mirror+Concat Mirroring plus Concatenation (VxVM says: concat-mirror) (Veritas Marketing Dept says: ConcatPro) Think this: Concatenation on top of mirrored disks. Veritas Default diskgroup: rootdg Default rootdg disk group. Block Device Node /dev/vx/dsk/volume_name Raw Device Node /dev/vx/rdsk/volume_name Other DiskGroups Block Device Node /dev/vx/dsk/diskgroup_name/volume_name Raw Device Node /dev/vx/rdsk/diskgroup_name/volume_name Example 4: ---------- Some more examples: Create Veritas layout on a disk: vxdisksetup -i c1t10d0 Create a disk group on a new disk: vxdg init =c1t10d0 Add disk to an existing disk group: vxdg -g adddisk =c2t0d0 replace addisk with rmdisk to remove a disk Set up a preferred reading plex, this can be useful if we have a sparse plex (plex in RAM): vxvol -g rdpol prefer instead of prefer we can have round or sdeet View configuration: vxprint -th List disks: vxdisk list vxdisk -o alldgs list (shows deported disks) Adding disks while solaris is running: drvconfig (This probes scsi - Solaris) disks (Creates links in /dev - Solaris) prtvtoc (View the vtoc - Solaris) vxdctl enable (Rescan for disks - Veritas) vxdisk list (Shows the disk in error as they are not initalized jet) vxdisksetup (init the disks) To encapsulate use: vxencap -g Export a disk group: vxdg deport vxdg -h deport to export to another host Import a disk group: vxdg import vxdg -C to clear hostid of old host (When failing over in DR situation) vxdg -fC to clear hostid of old host and forcing diskgroup online Destroy a disk group: vxdg destroy Evacuate data from a disk: vxevac -g Create a volume on a diskgroup: vxassist -g make layou=stripe ncols=number of colums stripeunit=size Create a veritas filesystem on this volume: mkfs -F vxfs /dev/vx/rdsk// Delete a volume same as creatiuon but replace make with remove Resize a filesystem: vxresize -g -F If Veritas is ever causing you problems, do the following: Touch /etc/vx/reconfig.d/state.d/install-db edit /etc/system and modify /etc/vfstab to disable VRTS to start up and access the old root partitions vxassist make martin 100m makes a volume called martin using any disk vxassist make martin 100m disk10 makes a volume called martin using disk10 vxassist make martin 100m layout=stripe disk07 disk08 creates a 100mb striped volume called martin using disks7 and 8 vxassist mirror martin disk05 disk06 uses disks5 and 6 ro make a mirror on volume called martin vxassist make martin 50m layout=mirror makes a 50Mb mirror using any 2 disks vxassist make martin 50m layout=mirror disk05 disk06 makes a 50mb mirror using disks 5 and 6 vxassist make martin 50m layout=mirror,stripe disk05 disk06 disk07 disk08 makes a 50Mb stripe using disks5 and 6 mirrored across 7 and 8 vxassist make martin 50m layout=mirror,stripe,log disk05 disk06 disk07 disk08 makes a 50Mb stripe using disks5 and 6 mirrored across 7 and 8 and uses a log subdisk vxassist make martin 100m layout=raid5 makes a 100m raid5 volume /usr/sbin/vxedit -g rootdg rename disk12 disk09 to rename disk12 to disk09 in the rootdg vxedit rm disk10 to remove a greyed out or obsolete disk in this case disk10 or to remove a disk from a diskgroup vxdisk list - to list all disks under vmcontrol vxdisk clearimport c#t#d#s# to allow a disk to be imported after a server crash vxdg -g razadg rmdisk test to remove a disk called test from a dg called razadg vxdg -g razadg adddisk test=c1t3d3 to add disk c1t3d3 to a dg called razadg calling the disk test, use vxdisk list to determine what disks are free :) vxedit -g rootdg set spare=on disk09 sets disk09 in the rootdg as a hotspare. vxmirror rootdisk disk01 mirrors all the volumes on the root disk to disk01 vxassist -g rootdg mirror vol01 disk03 mirrors vol01 (in rootdg) to disk03 vxassist mirror martin will mirror the volume martin to make a mirror manually try /usr/sbin/vxmake -g rootdg sd disk03-01 dm_name=disk03 dm_offset=0 len=81920 to create a subdisk on disk03 callin the subdisk disk03-01 the len 81920 is 81920sectors x 512bytes =40M vxmake plex martin-02 sd=disk03-01 creates a plex called martin-02 using subdisk disk03-01 vxplex att martin martin-02 attaches the plex martin-02 to volume martin to list all volumes on your primary boot disk enter vxprint -t -v -e 'aslist.aslist.sd_disk="boot_disk_name"' vxsd mv disk03-01 disk05-01 moves the contents of subdisk disk03-01 to disk05-01 then moves subdisk disk05-01 into the plex where subdisk disk03-01 once lived, leaving disk03-01 to your mercy :) to make a subdisk vxmake sd disk02-02 disk02,0,8000 this would create a subdisk called disk02-02 at the start of disk02 and would be 8000blocks (4000k) long. if you wanted to create another subdisk on this disk the offset would be 8000 as this is where the next free space would be onthe disk so... vxmake sd disk02-02 disk02,8000,8000 would create another 8000block subdisk. vxdisk rm c#t#d#s2 to remove a disk so it's out of vm control vxdiskadd c#t#d# to add bring a new disk under vm control or you can try... vxdisksetup -i c#t#d# vxvol -g dg volname stop this stops a volume vxedit -rf rm martin removes a volume called martin and plex(es) and subdisks though vxprint -ht volume >>>> AIX devices: ================= In AIX 5.x, the device configuration information is stored in the ODM repository. The corresponding files are in /etc/objrepos /usr/lib/objrepos /usr/share/lib/objrepos There are 2 sections in ODM: - predefined: all of the devices in principle supported by the OS - customized: all devices already configured in the system Every device in ODM has a unique definition that is provided by 3 attributes: 1. Type 2. Class 3. Subclass Information thats stored in the ODM: - PdDv,PdAt, PdCn : Predefined device information - CuDv, CuAt, CuDep : Customized device information - lpp, inventory : Software vital product data - smit menu's - Error log, alog, and dump information - System Resource Controller: SRCsubsys, SRCsubsrv - NIM: nim_attr, nim_object, nim_pdattr There are commands, representing an interface to ODM, so you can add, retrieve, drop and change objects. The following commands can be used with ODM: odmadd, odmdrop, odmshow, odmdelete, odmcreate, odmchange Examples: # odmget -q "type LIKE lv*" PdDv # odmget -q name=hdisk0 CuAt Logical devices and physical devices: ------------------------------------- AIX includes both logical devices and physical devices in the ODM device configuration database. Logical devices include Volume Groups, Logical Volumes, network interfaces and so on. Physical devices are adapters, modems etc.. Most devices are selfconfiguring devices, only serial devices (modems, printers) are not selfconfigurable. The command that configures devices is "cfgmgr", the "configuration manager". When run, it compares the information from the device with the predefined section in ODM. If it finds a match, then it creates the entries in the customized section in ODM. The configuration manager runs every time the system is restarted. If you have installed an adapter for example, and you have put the software in a directory like /usr/sys/inst.images, you can call cfgmgr to install device drivers as well with # cfgmgr -i /usr/sys/inst.images $$ 09-08-00-1,0 u5971-t1-l1-l0 Device information: ------------------- The most important AIX command to show device info is "lsdev". This command queries the ODM, so we can use it to locate the customized or the predifined devices. The main commands in AIX to get device information are: - lsdev : queries ODM - lsattr : gets specific configuration attributes of a device - lscfg : gets vendor name, serial number, type, model etc.. of the device lsdev also shows the status of a device as Available (that is configured) or as Defined (that is predefined). lsdev examples: --------------- If you need to see disk or other devices, defined or available, you can use the lsdev command as in the following examples: # lsdev -Cc tape rmt0 Available 10-60-00-5,0 SCSI 8mm Tape Drive # lsdev -Cc disk hdisk0 Available 20-60-00-8,0 16 Bit LVD SCSI Disk Drive hdisk1 Available 20-60-00-9,0 16 Bit LVD SCSI Disk Drive hdisk2 Available 20-60-00-10,0 16 Bit LVD SCSI Disk Drive hdisk3 Available 20-60-00-11,0 16 Bit LVD SCSI Disk Drive hdisk4 Available 20-60-00-13,0 16 Bit LVD SCSI Disk Drive Note: -C queries the Customized section of ODM, -P queries the Predefined section of ODM. Example if some of the disks are on a SAN (through FC adapters): # lsdev -Cc disk hdisk0 Available Virtual SCSI Disk Drive hdisk1 Available Virtual SCSI Disk Drive hdisk2 Available 02-08-02 SAN Volume Controller MPIO Device (through FC adapter) hdisk3 Available 02-08-02 SAN Volume Controller MPIO Device (through FC adapter) # lsattr -El hdisk2 PCM PCM/friend/sddpcm PCM True PR_key_value none Reserve Key True algorithm load_balance Algorithm True dist_err_pcnt 0 Distributed Error Percentage True dist_tw_width 50 Distributed Error Sample Time True hcheck_interval 20 Health Check Interval True hcheck_mode nonactive Health Check Mode True location Location Label True lun_id 0x0 Logical Unit Number ID False lun_reset_spt yes Support SCSI LUN reset True max_transfer 0x40000 Maximum TRANSFER Size True node_name 0x50050768010029c8 FC Node Name False pvid 00cb5b9e66cc16470000000000000000 Physical volume identifier False q_type simple Queuing TYPE True qfull_dly 20 delay in seconds for SCSI TASK SET FULL True queue_depth 20 Queue DEPTH True reserve_policy no_reserve Reserve Policy True rw_timeout 60 READ/WRITE time out value True scbsy_dly 20 delay in seconds for SCSI BUSY True scsi_id 0x611013 SCSI ID False start_timeout 180 START unit time out value True unique_id 33213600507680190014E30000000000001E204214503IBMfcp Device Unique Identification False ww_name 0x50050768014029c8 FC World Wide Name False lsdev [ -C ][ -c Class ] [ -s Subclass ] [ -t Type ] [ -f File ] [ -F Format | -r ColumnName ] [ -h ] [ -H ] [ -l { Name | - } ] [ -p Parent ] [ -S State ] lsdev -P [ -c Class ] [ -s Subclass ] [ -t Type ] [ -f File ] [ -F Format | -r ColumnName ] [ -h ] [ -H ] Remark: For local attached SCSI devices, the general format of the LOCATION code "AB-CD-EF-GH" is actually "AB-CD-EF-G,H" , the first three sections are the same and for the GH section, the G is de SCSI ID and the H is the LUN. For adapters, only the AB-CD is mentioned in the location code. A location code is a representation of the path to the device, from drawer, slot, connector and port. - For an adapter it is sufficient to have the codes of the drawer and slot to identify the adapter. The location code of an adapter takes the form of AB-CD. - Other devices needs more specification, like a specific disk on a specific SCSI bus. For other devices the format is AB-CD-EF-GH. The AB-CD part then indicates the adapter the device is connected on. - For SCSI devices we have a location code like AB-CD-EF-S,L where the S,L fields identifies the SCSI ID and LUN of the device. To lists all devices in the Predefined object class with column headers, use # lsdev -P -H To list the adapters that are in the Available state in the Customized Devices object class, use # lsdev -C -c adapter -S lsattr examples: ---------------- This command gets the current attributes (-E flag) for a tape drive: # lsattr -El rmt0 mode yes Use DEVICE BUFFERS during writes True block_size 1024 Block size (0=variable length) True extfm no Use EXTENDED file marks True ret no RETENSION on tape change or reset True .. .. (Ofcourse, the equivalent for the above command is for example # lsattr -l rmt0 -E ) To list the default values for that tape device (-D flag), use # lsattr -l -D rmt0 This command gets the attributes for a network adapter: # lsattr -E -l ent1 busmem 0x3cfec00 Bus memory address False busintr 7 Bus interrupt level False .. .. To list only a certain attribute (-a flag), use the command as in the following example: # lsattr -l -E scsi0 -a bus_intr_lvl bus_intr_lvl 14 Bus interrupt level False # lsattr -El tty0 -a speed speed 9600 BAUD rate true You must specify one of the following flags with the lsattr command: -D Displays default values. -E Displays effective values (valid only for customized devices specified with the -l flag). -F Format Specifies the user-defined format. -R Displays the range of legal values. -a Displays for that attribute lscfg examples: --------------- Example 1: This command gets the Vital Product Data for the tape drive rmt0: # lscfg -vl rmt0 Manufacturer...............EXABYTE Machine Type and Model.....IBM-20GB Device Specific(Z1)........38zA Serial Number..............60089837 .. .. -l Name Displays device information for the named device. -p Displays the platform-specific device information. This flag only applies to AIX 4.2.1 or later. -v Displays the VPD found in the Customized VPD object class. Also, on AIX 4.2.1 or later, displays platform specific VPD when used with the -p flag. -s Displays the device description on a separate line from the name and location. # lscfg -vp | grep -p 'Platform Firmware:' # lscfg -vp | grep -p Platform sample output: Platform Firmware: ROM Level.(alterable).......3R040602 Version.....................RS6K System Info Specific.(YL)...U1.18-P1-H2/Y2 Physical Location: U1.18-P1-H2/Y2 The ROM Level denotes the firmware/microcode level Platform Firmware: ROM Level ............. RH020930 Version ................RS6K .. Example 2: The following command shows details about the Fiber Channel cards: # lscfg -vl fcs* (fcs0 for example, is the parent of fsci0) Adding a device: ---------------- Adding a device with cfmgr: --------------------------- To add a device you can run cfgmgr, or shutdown the system, attach the new device and boot the system. There are also many smitty screens to accomplish the task of adding a new device. Adding a device with mkdev: --------------------------- Also the mkdev command can be used as in the following example: # mkdev -c tape -s scsi -t scsd -p scsi0 -w 5,0 where -c Class of the device -s Subclass of the device -t Type of the device. This is a specific attribute for the device -p The parent adapter of the device. You have to specify the logical name. -w You have to know the SCSI ID that you are goiing to assign to the new device. If it's non SCSI, you have to know the port number on the adapter. -a Specifies the device attribute-value pair The mkdev command also creates the ODM entries for the device and loads the device driver. The following command configures a new disk and ensures that it is available as a physical volume. This example adds a 2.2GB disk with a scsi ID of 6 and a LUN of 0 to the scsi3 SCSI bus. # mkdev -c disk -s scsi -t 2200mb -p scsi3 -w 6,0 -a pv=yes This example adds a terminal: # mkdev -c tty -t tty -s rd232 -p sa1 -w 0 -a login=enable -a term=ibm3151 tty0 Available Changing a device with chdev: ----------------------------- Suppose you have just added a new disk. Suppose the cfgmgr has run and detected the disk. Now you run # lspv hdisk1 none none OR hdisk1 0005264d2 none The first field identifies the system-assigned name of the disk. The second field displays the "physical volume id" PVID. If that is not shown, you can use chdev: # chdev -l hdisk2 -a pv=yes Removing a device with rmdev: ----------------------------- Examples: # lsdev -Cc tape rmt0 Available 10-60-00-5,0 SCSI 8mm Tape Drive # rmdev -l rmt0 # -l indicates using the logical device name rmt0 Defined The status have shifted from Available to Defined. # lsdev -Cc tape rmt0 Defined 10-60-00-5,0 SCSI 8mm Tape Drive If you really want to remove it from the system, use the -d flag as well # rmdev -l rmt0 -d To unconfigure the childeren of PCI bus pci1 and all devices under them, while retaining their device definition in the Customized Devices Object Class. # rmdev -p pci1 rmt0 Defined hdisk1 Defined scsi1 Defined ent0 Defined The special device sys0: ------------------------ In AIX 5.x we have a special device named sys0 that is used to manage some kernel parameters. The way to change these values is by using smitty, the chdev command or WSM. Example. To change the maxusersprocesses parameter, you can for example use the Web-based System Manager. You can also use the chdev command: #chdev -l sys0 -a maxuproc=50 sys0 changed Note: In Solaris, to change kernel parameters, you have to edit /etc/system. Device drivers: --------------- Device drivers are located in /usr/lib/drivers directory. >>> filesystem commands AIX: ============================ The Logical Volume Manager LVM: =============================== In AIX, it's common to use a Logical Volume Manager LVM to cross the boundaries posed by traditional disk management. Traditionally, a filesystem was on a single disk or on a single partition. Changing a partionion size was a difficult task. With a LVM, we can create logical volumes which can span several disks. The LVM has been a feature of the AIX operating system since version 3, and it is installed automatically with the Operating System. LVM commands in AIX: -------------------- mkvg (or the mkvg4vp command in case of SAN vpath disks. See section 31.3) cplv rmlv mklvcopy extendvg reducevg getlvcb lspv lslv lsvg mirrorvg chpv migratepv exportvg, importvg varyonvg, varyoffvg And related commands: mkdev chdev rmdev lsdev Volume group: ------------- What a physical disk is, or a physical volume is, is evident. When you add a physical volume to a volume group, the physical volume is partitioned into contiguous equal-sized units of space called "physical partitions". A physical partition is the smallest unit of storage space allocation and is a contiguous space on a physical volume. The physical volume must now become part of a volume group. The disk must be in a available state and must have a "physical volume id" assigned to it. A volume group (VG) is an entity consisting of 1 to 32 physical volumes (of varying sizes and types). A "Big volume group" kan scale up to 128 devices. You create a volume group with the "mkvg" command. You add a physical volume to an existing volume group with the "extendvg" command, you make use of the changed size of a physical volume with the "chvg" command, and remove a physical volume from a volume group with the "reducevg" command. Some of the other commands that you use on volume groups include: list (lsvg), remove (exportvg), install (importvg), reorganize (reorgvg), synchronize (syncvg), make available for use (varyonvg), and make unavailable for use (varyoffvg). To create a VG, using local disks, use the "mkvg" command: mkvg -y -s Typical example: mkvg -y oravg -s 64 hdisk3 hdisk4 mkvg -y appsvg -s 32 hdisk2 mkvg -y datavg -s 64 hdisk3 mkvg -y appsvg -s 32 hdisk3 mkvg -y datavg -s 32 hdisk2 mkvg -y vge1corrap01 -s 64 hdisk2 In case you use the socalled SDD subsystem with vpath SAN storage, you should use the "mkvg4vp" command, which works similar (same flags) as the mkvg command. Types of VG's: ============== There are 3 kinds of VG's: - Normal VG (AIX 5L) - Big VG (AIX 5L) - Scalable VG (as from AIX 5.3) Normal VG: ---------- Number of disks Max number of partitions/disk 1 32512 2 16256 4 8128 8 4064 16 2032 32 1016 Big VG: ------- Number of disks Max number of partitions/disk 1 130048 2 65024 4 32512 8 16256 16 8128 32 4064 64 2032 128 1016 VG Type Max PV's Max LV's Max PP's per VG --------------------------------------------------------------- Normal 32 256 32512 Big 128 512 130048 Scalable 1024 4096 2097152 Physical Partition: =================== You can change the NUMBER of PPs in a VG, but you cannot change the SIZE of PPs afterwards. Defaults: - 4 MB partition size. It can be a multiple of that amount. The Max size is 1024 MB - The default is 1016 PPs per disk. You can increase the number of PPs in powers of 2 per PV, but the number of maximum disks per VG is decreased. #disks max # of PPs / disk 32 1016 16 2032 8 4064 4 8128 2 16256 1 32512 In the case of a set of "normal" internal disks of, for example, 30G or 70G or so, common partition sizes are 64M or 128M. Logical Partition: ------------------ A LP maps to (at least) one PP, and is actually the smallest unit of allocatable space. Logical Volume: --------------- Consists of LPs in a VG. A LV consists of LPs from actual PPs from one or more disks. |-----| | ----| |LP1 | ---> | PP1 | |-----| | ----| |LP2 | ---> | PP2 | |-----| | ----| |.. | hdisk 1 (Physical Volume 1) |.. | |.. | |-----| |---- | |LPn | ---> |PPn | |-----| |---- | |LPn+1| ---> |PPn+1| |-----| |---- | Logical Volume hdisk2 (Physical Volume 2) So, a VG is a collection of related PVs, but you know that actually LVs are created in the VG. For the applications, the LVs are the entities they work with. In AIX, a filesystem like "/data", corresponds to a LV. lspv Command ------------ Purpose: Displays information about a physical volume within a volume group. lspv [ -L ] [ -l | -p | -M ] [ -n DescriptorPhysicalVolume] [ -v VolumeGroupID] PhysicalVolume -p: lists range, state, region, LV names, type and mount points # lspv # lspv hdisk3 # lspv -p hdisk3 # lspv hdisk0 00453267554 rootvg hdisk1 00465249766 rootvg # lspv hdisk23 PHYSICAL VOLUME: hdisk23 VOLUME GROUP: oravg PV IDENTIFIER: 00ccf45d564cfec0 VG IDENTIFIER 00ccf45d00004c0000000104564d2386 PV STATE: active STALE PARTITIONS: 0 ALLOCATABLE: yes PP SIZE: 256 megabyte(s) LOGICAL VOLUMES: 3 TOTAL PPs: 947 (242432 megabytes) VG DESCRIPTORS: 1 FREE PPs: 247 (63232 megabytes) HOT SPARE: no USED PPs: 700 (179200 megabytes) FREE DISTRIBUTION: 00..00..00..57..190 USED DISTRIBUTION: 190..189..189..132..00 # lspv -p hdisk23 hdisk23: PP RANGE STATE REGION LV NAME TYPE MOUNT POINT 1-22 used outer edge u01 jfs2 /u01 23-190 used outer edge u02 jfs2 /u02 191-379 used outer middle u01 jfs2 /u01 380-568 used center u01 jfs2 /u01 569-600 used inner middle u02 jfs2 /u02 601-700 used inner middle u03 jfs2 /u03 701-757 free inner middle 758-947 free inner edge # lspv -p hdisk0 hdisk0: PP RANGE STATE REGION LV NAME TYPE MOUNT POINT 1-1 used outer edge hd5 boot N/A 2-48 free outer edge 49-51 used outer edge hd9var jfs /var 52-52 used outer edge hd2 jfs /usr 53-108 used outer edge hd6 paging N/A 109-116 used outer middle hd6 paging N/A 117-215 used outer middel hd2 jfs /usr 216-216 used center hd8 jfslog N/A 217-217 used center hd4 jfs / 218-222 used center hd2 jfs /usr 223-320 used center hd4 jfs / .. .. Note that in this example the Logical Volumes corresponds to the filesystems in the following way: hd4= /, hd5=boot, hd6=paging, hd2=/usr, hd3=/tmp, hd9var=/var lslv Command ------------ Purpose: Displays information about a logical volume. To Display Logical Volume Information lslv [ -L ] [ -l| -m ] [ -nPhysicalVolume ] LogicalVolume To Display Logical Volume Allocation Map lslv [ -L ] [ -nPhysicalVolume ] -pPhysicalVolume [ LogicalVolume ] # lslv -l lv06 lv06:/backups PV COPIES IN BAND DISTRIBUTION hdisk3 512:000:000 100% 000:218:218:076:000 # lslv lv06 LOGICAL VOLUME: lv06 VOLUME GROUP: backupvg LV IDENTIFIER: 00c8132e00004c0000000106ef70cec2.2 PERMISSION: read/write VG STATE: active/complete LV STATE: opened/syncd TYPE: jfs WRITE VERIFY: off MAX LPs: 512 PP SIZE: 64 megabyte(s) COPIES: 1 SCHED POLICY: parallel LPs: 512 PPs: 512 STALE PPs: 0 BB POLICY: relocatable INTER-POLICY: minimum RELOCATABLE: yes INTRA-POLICY: middle UPPER BOUND: 32 MOUNT POINT: /backups LABEL: /backups MIRROR WRITE CONSISTENCY: on/ACTIVE EACH LP COPY ON A SEPARATE PV ?: yes Serialize IO ?: NO # lslv -p hdisk3 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 1-10 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 11-20 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 21-30 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 31-40 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 41-50 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 51-60 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 61-70 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 71-80 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 81-90 .. .. Also, you can list LVs per VG by running, for example: # lsvg -l backupvg backupvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT loglv02 jfslog 1 1 1 open/syncd N/A lv06 jfs 512 512 1 open/syncd /backups # lsvg -l splvg splvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT loglv01 jfslog 1 1 1 open/syncd N/A lv04 jfs 240 240 1 open/syncd /data lv00 jfs 384 384 1 open/syncd /spl lv07 jfs 256 256 1 open/syncd /apps For a complete storage system, this could yield in for example: -redovg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT redo1lv jfs2 42 42 3 open/syncd /u05 redo2lv jfs2 1401 1401 3 open/syncd /u04 loglv03 jfs2log 1 1 1 open/syncd N/A -db2vg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT db2lv jfs2 600 600 2 open/syncd /db2_database loglv00 jfs2log 1 1 1 open/syncd N/A -oravg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT u01 jfs2 800 800 2 open/syncd /u01 u02 jfs2 400 400 2 open/syncd /u02 u03 jfs2 200 200 2 open/syncd /u03 logfs jfs2log 2 2 1 open/syncd N/A -rootvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT hd5 boot 1 2 2 closed/syncd N/A hd6 paging 36 72 2 open/syncd N/A hd8 jfs2log 1 2 2 open/syncd N/A hd4 jfs2 8 16 3 open/syncd / hd2 jfs2 24 48 2 open/syncd /usr hd9var jfs2 9 18 3 open/syncd /var hd3 jfs2 11 22 3 open/syncd /tmp hd1 jfs2 10 20 2 open/syncd /home hd10opt jfs2 2 4 2 open/syncd /opt fslv00 jfs2 1 2 2 open/syncd /XmRec fslv01 jfs2 2 4 3 open/syncd /tmp/m2 paging00 paging 32 32 1 open/syncd N/A sysdump1 sysdump 80 80 1 open/syncd N/A oralv jfs2 100 100 1 open/syncd /opt/app/oracle fslv03 jfs2 63 63 2 open/syncd /bmc_home And you can list the LVs by PV by running # lspv -l hdiskn lsvg Command: ------------- -o Shows only the active volume groups. -p VG_name Shows all the PVs that belong to the vg_name -l VG_name Shows all the LVs that belong to the vg_name Examples: # lsvg rootvg informixvg oravg # lsvg -o rootvg oravg # lsvg oravg VOLUME GROUP: oravg VG IDENTIFIER: 00ccf45d00004c0000000104564d2386 VG STATE: active PP SIZE: 256 megabyte(s) VG PERMISSION: read/write TOTAL PPs: 1894 (484864 megabytes) MAX LVs: 256 FREE PPs: 492 (125952 megabytes) LVs: 4 USED PPs: 1402 (358912 megabytes) OPEN LVs: 4 QUORUM: 2 TOTAL PVs: 2 VG DESCRIPTORS: 3 STALE PVs: 0 STALE PPs: 0 ACTIVE PVs: 2 AUTO ON: yes MAX PPs per PV: 1016 MAX PVs: 32 LTG size: 128 kilobyte(s) AUTO SYNC: no HOT SPARE: no BB POLICY: relocatable # lsvg -p informixvg informixvg PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk3 active 542 462 109..28..108..108..109 hdisk4 active 542 447 109..13..108..108..109 # lsvg -l rootvg LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT hd5 boot 1 1 1 closed/syncd N/A hd6 paging 24 24 1 open/syncd N/A hd8 jfslog 1 1 1 open/syncd N/A hd4 jfs 4 4 1 open/synced / hd2 jfs 76 76 1 open/synced /usr hd9var jfs 4 4 1 open/synced /var hd3 jfs 6 6 1 open/synced /tmp paging00 paging 20 20 1 open/synced N/A .. .. Suppose we have 70GB disk=70000MB 1016 partitions=> 63 MB per PP extendvg command: ----------------- extendvg VGName hdiskNumber # extendvg newvg hdisk23 How to Add a Disk to a Volume Group? extendvg VolumeGroupName hdisk0 hdisk1 ... hdiskn reducevg command: ----------------- To remove a PV from a VG: # reducevg myvg hdisk23 To remove a VG: Suppose we have a VG informixvg with 2 PV, hdisk3 and hdisk4: # reducevg -d informixvg hdisk4 When you delete the last disk from the VG, the VG is also removed. # reducevg -d informix hdisk3 varyonvg and varyoffvg commands: -------------------------------- When you activate a VG for use, all its resident filesystems are mounted by default if they have the flag mount=true in the /etc/filesystems file. # varyonvg apachevg # varyoffvg apachevg To use this command, you must be sure that none of the logical volumes are opened, that is, in use. mkvg command: ------------- You can create a new VG by using "smitty mkvg" or by using the mkvg command. Use the following command, where s "partition_size" sets the number of megabytes in each physical partition where the partition_size is expressed in units of megabytes from 1 through 1024. The size variable must be equal to a power of 2 (for example 1, 2, 4, 8). The default value is 4. mkvg -y -s As with physical volumes, volume groups can be created and removed and their characteristics can be modified. Before a new volume group can be added to the system, one or more physical volumes not used in other volume groups, and in an available state, must exist on the system. The following example shows the use of the mkvg command to create a volume group myvg using the physical volumes hdisk1 and hdisk5. # mkvg -y myvg -d 10 -s 8 hdisk1 hdisk5 # mkvg -y oravg -d 10 -s 64 hdisk1 mklv command: ------------- To create a LV, you can use the smitty command "smitty mklv" or just use the mklv command by itself. The mklv command creates a new logical volume within the VolumeGroup. For example, all file systems must be on separate logical volumes. The mklv command allocates the number of logical partitions to the new logical volume. If you specify one or more physical volumes with the PhysicalVolume parameter, only those physical volumes are available for allocating physical partitions; otherwise, all the physical volumes within the volume group are available. The default settings provide the most commonly used characteristics, but use flags to tailor the logical volume to the requirements of your system. Once a logical volume is created, its characteristics can be changed with the chlv command. When you create a LV, you also specify the number of LP's, and how a LP maps to PP's. Later, you can create one filesystem per LV. Examples The following example creates a LV "lv05" on the VG "splvg", with two copies (2 PPs) of each LP. In this case, we are mirroring a LP to two PP's. Also, 200 PP's are specified. If a PP is 128 MB is size, the total amount of space of one "mirror" is 25600 MB. # mklv -y lv05 -c 2 splvg 200 The following example shows the use of mklv command to create a new LV newlv in the rootvg and it will have 10 LP's and each LP consists of 2 physical partitions. # mklv -y newlv -c 2 rootvg 10 To make a logical volume in volume group vg02 with one logical partition and a total of two copies of the data, enter: # mklv -c 2 vg02 1 To make a logical volume in volume group vg03 with nine logical partitions and a total of three copies spread across a maximum of two physical volumes, and whose allocation policy is not strict, enter: # mklv -c 3 -u 2 -s n vg03 9 To make a logical volume in vg04 with five logical partitions allocated across the center sections of the physical volumes when possible, with no bad-block relocation, and whose type is paging, enter: # mklv -a c -t paging -b n vg04 5 To make a logical volume in vg03 with 15 logical partitions chosen from physical volumes hdisk5, hdisk6, and hdisk9, enter: # mklv vg03 15 hdisk5 hdisk6 hdisk9 To make a striped logical volume in vg05 with a stripe size of 64K across 3 physical volumes and 12 logical partitions, enter: # mklv -u 3 -S 64K vg05 12 To make a striped logical volume in vg05 with a stripe size of 8K across hdisk1, hdisk2, and hdisk3 and 12 logical partitions, enter: # mklv -S 8K vg05 12 hdisk1 hdisk2 hdisk3 The following example uses a "map file /tmp/mymap1" which list which PPs are to be used in creating a LV: # mklv -t jfs -y lv06 -m /tmp/mymap1 rootvg 10 The setting Strict=y means that each copy of the LP is placed on a different PV. The setting Strict=n means that copies are not restricted to different PVs. The default is strict. # mklv -y lv13 -c 2 failovervg 150 # crfs -v jfs -d lv13 -m /backups2 -a bf=true Another simple example using local disks: # mkvg -y appsvg -s 32 hdisk2 # mkvg -y datavg -s 32 hdisk3 # mklv -y testlv -c 1 appsvg 10 # mklv -y backuplv -c 1 datavg 10 # crfs -v jfs -d testlv -m /test -a bf=true # crfs -v jfs -d backuplv -m /backup -a bf=true mklv -y testlv1 -c 1 appsvg 10 mklv -y testlv2 -c 1 datavg 10 crfs -v jfs -d testlv1 -m /test1 -a bf=true crfs -v jfs -d testlv2 -m /test2 -a bf=true mklv -y testlv1 -c 1 vgp0corddap01 10 mklv -y testlv2 -c 1 vgp0corddad01 10 crfs -v jfs -d testlv1 -m /test1 -a bf=true crfs -v jfs -d testlv2 -m /test2 -a bf=true rmlv command: ------------- # rmlv newlv Warning, all data on logical volume newlv will be destroyed. rmlv: Do you wish to continue? y(es) n(o) y # extendlv command: ----------------- The following example shows the use of the extentlv command to add 3 more LP's to the LP newlv: # extendlv newlv 3 cplv command: ------------- The following command copies the contents of LV oldlv to a new LV called newlv: # cplv -v myvg -y newlv oldlv To copy to an existing LV: # cplv -e existinglv oldlv Purpose Copies the contents of a logical volume to a new logical volume. Syntax To Copy to a New Logical Volume cplv [ -vg VolumeGroup ] [ -lv NewLogicalVolume | -prefix Prefix ] SourceLogicalVolume To Copy to an Existing Logical Volume cplv [ -f ] SourceLogicalVolume DestinationLogicalVolume cplv -e DestinationLogicalVolume [-f] SourceLogicalVolume -e: specifies that the DestinationLogicalVolume already exists. -f: no user confirmation -y: specifies the name to use for the NewLogicalVolume, instead of a system generated name. Description Attention: Do not copy from a larger logical volume containing data to a smaller one. Doing so results in a corrupted file system because some data is not copied. The cplv command copies the contents of SourceLogicalVolume to a new or existing logical volume. The SourceLogicalVolume parameter can be a logical volume name or a logical volume ID. The cplv command creates a new logical volume with a system-generated name by using the default syntax. The system-generated name is displayed. Note: The cplv command can not copy logical volumes which are in the open state, including logical volumes that are being used as backing devices for virtual storage. Flags -f Copies to an existing logical volume without requesting user confirmation. -lv NewLogicalVolume Specifies the name to use, in place of a system-generated name, for the new logical volume. Logical volume names must be unique systemwide names, and can range from 1 to 15 characters. -prefix Prefix Specifies a prefix to use in building a system-generated name for the new logical volume. The prefix must be less than or equal to 13 characters. A name cannot be a name already used by another device. -vg VolumeGroup Specifies the volume group where the new logical volume resides. If this is not specified, the new logical volume resides in the same volume group as the SourceLogicalVolume. Examples To copy the contents of logical volume fslv03 to a new logical volume, type: # cplv fslv03 The new logical volume is created, placed in the same volume group as fslv03, and named by the system. To copy the contents of logical volume fslv03 to a new logical volume in volume group vg02, type: #cplv -vg vg02 fslv03 The new logical volume is created, named, and added to volume group vg02. #To copy the contents of logical volume lv02 to a smaller, existing logical volume, lvtest, without requiring user confirmation, type: cplv -f lv02 lvtest Errors: ------- 0516-746 cplv: Destination logical volume must have type set to copy chlv -t copy lvprj ========================================================================== CASES of usage of cplv command: CASE 1: ------- TITLE : Procedure for moving a filesystem between disks that are in different volume groups using the cplv command. OS LEVEL : AIX 4.x DATE : 25/11/99 VERSION : 1.0 ---------------------------------------------------------------------------- In the following example, an RS6000 has 1 one disk with rootvg on, and has just had a second disk installed. The second disk needs a volume group creating on it and a data filesystem transferring to the new disk. Ensure that you have a full system backup befor you start. lspv hdisk0 00009922faf79f0d rootvg hdisk1 None None df -k Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 8192 1228 86% 1647 41% / /dev/hd2 380928 40984 90% 11014 12% /usr /dev/hd9var 32768 20952 37% 236 3% /var /dev/hd3 28672 1644 95% 166 3% /tmp /dev/hd1 53248 51284 4% 95 1% /home /dev/lv00 200704 110324 46% 1869 4% /home/john /dev/ftplv 102400 94528 8% 32 1% /home/ftp /dev/lv01 114688 58240 50% 59 1% /usr2 In this example the /usr2 filesystem needs to be moved to the new disk drive, freeing up space in the root volume group. 1, Create a data volume group on the new disk (hdisk1), the command below will create a volume group called datavg on hdisk1 with a PP size of 32 Meg:- mkvg -s 32 -y datavg hdisk1 2, Create a jfslog logical volume on the new volume group :- mklv -y datalog -t jfslog datavg 1 3, Initialise the jfslog :- logform /dev/datalog logform: destroy /dev/datalog (y)?y 4, Umount the filesystem that is being copied :- umount /usr2 5, Copy the /usr2 logical volume (lv01) to a new logical volume (lv11) on the new volume group :- cplv -y lv11 -v datavg lv01 cplv: Logical volume lv01 successfully copied to lv11 . 6, Change the /usr2 filesystem to use the new (/dev/lv11) logical volume and not the old (/dev/lv01) logical volume :- chfs -a dev=/dev/lv11 /usr2 7, Change the /usr2 filesystem to use the jfslog on the new volume group (/dev/datalog) :- chfs -a log=/dev/datalog /usr2 8, Mount the filesystem :- mount /usr2 df -k Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 8192 1220 86% 1649 41% / /dev/hd2 380928 40984 90% 11014 12% /usr /dev/hd9var 32768 20952 37% 236 3% /var /dev/hd3 28672 1644 95% 166 3% /tmp /dev/hd1 53248 51284 4% 95 1% /home /dev/lv00 200704 110324 46% 1869 4% /home/john /dev/ftplv 102400 94528 8% 32 1% /home/ftp /dev/lv11 114688 58240 50% 59 1% /usr2 9, Once the filesystem has been checked out, the old logical volume can be removed :- rmfs /dev/lv01 Warning, all data contained on logical volume lv01 will be destroyed. rmlv: Do you wish to continue? y(es) n(o)? y rmlv: Logical volume lv01 is removed. If you wish to copy further filesystems repeat parts 4 to 9. ========================================================================== CASE 2: ------- Doel: ----- Een "move" van het /prj filesystem (met Websphere in /prj/was) op rootvg, naar een nieuw (groter en beter) volume group "wasvg". Het huidige /prj op rootvg, correspondeerd met de LV "prjlv". De nieuw te maken /prj op wasvg, correspondeerd met de LV "lvprj". ROOTVG WASVG -------------- -------------- |/usr (hd2) | | | |.. | | | |/prj (prjlv)|----------->|/prj (lvprj) | |.. | | | -------------- ------------- hdisk0,hdisk1 hdisk12,hdisk13 opm: /prj bevat "/prj/was", en dat is Websphere. Hier maken we geen gebruik van een backup tape. Gebruik het cplv command umount /prj chfs -m /prj_old /prj + mkvg -y wasvg -d 10 -s 128 hdisk12 hdisk13 -- maak VG aan + mklv -y lvprj -c 2 wasvg 400 -- maak LV aan + mklv -y waslog -t jfslog wasvg 1 -- maak een jfslog + logform /dev/waslog -- init de log cplv -e lvprj prjlv chfs -a dev=/dev/lvprj /prj_old -- chfs -a log=/dev/waslog /prj_old chfs -m /prj /prj_old mount /prj ========================================================================== migratepv command: ------------------ Use the following command to move PPs from hdisk1 to hdisk6 and hdisk7 (all PVs must be in 1 VG) # migratepv hdisk1 hdisk6 hdisk7 Use the following command to move PPs in LV lv02 from hdisk1 to hdisk6 # migratepv -l lv02 hdisk1 hdisk6 chvg command: ------------- This example multiplies by 2 the number of PPs: # chvg -t2 datavg chpv command: ------------- The chpv command changes the state of the physical volume in a volume group by setting allocation permission to either allow or not allow allocation and by setting the availability to either available or removed. This command can also be used to clear the boot record for the given physical volume. Characteristics for a physical volume remain in effect unless explicitly changed with the corresponding flag. Examples To close physical volume hdisk03, enter: # chpv -v r hdisk03 The physical volume is closed to logical input and output until the -v a flag is used. To open physical volume hdisk03, enter: # chpv -v a hdisk03 The physical volume is now open for logical input and output. To stop the allocation of physical partitions to physical volume hdisk03, enter: # chpv -a n hdisk03 No physical partitions can be allocated until the -a y flag is used. To clear the boot record of a physical volume hdisk3, enter: # chpv -c hdisk3 How to synchronize stale partitions in a VG?: --------------------------------------------- the syncvg command: syncvg Command Purpose Synchronizes logical volume copies that are not current. Syntax syncvg [ -f ] [ -i ] [ -H ] [ -P NumParallelLps ] { -l | -p | -v } Name ... Description The syncvg command synchronizes the physical partitions, which are copies of the original physical partition, that are not current. The syncvg command can be used with logical volumes, physical volumes, or volume groups, with the Name parameter representing the logical volume name, physical volume name, or volume group name. The synchronization process can be time consuming, depending on the hardware characteristics and the amount of data. When the -f flag is used, a good physical copy is chosen and propagated to all other copies of the logical partition, whether or not they are stale. Using this flag is necessary in cases where the logical volume does not have the mirror write consistency recovery. Unless disabled, the copies within a volume group are synchronized automatically when the volume group is activated by the varyonvg command. Note: For the sycnvg command to be successful, at least one good copy of the logical volume should be accessible, and the physical volumes that contains this copy should be in ACTIVE state. If the -f option is used, the above condition applies to all mirror copies. If the -P option is not specified, syncvg will check for the NUM_PARALLEL_LPS environment variable. The value of NUM_PARALLEL_LPS will be used to set the number of logical partitions to be synchronized in parallel. Examples To synchronize the copies on physical volumes hdisk04 and hdisk05, enter: # syncvg -p hdisk04 hdisk05 To synchronize the copies on volume groups vg04 and vg05, enter: # syncvg -v vg04 vg05 How to Mirror a Logical Volume? : -------------------------------- mklvcopy LogicalVolumeName Numberofcopies syncvg VolumeGroupName To add a copy for LV lv01 on disk hdisk7: # mklvcopy lv01 2 hdisk7 Identifying hotspots: lvmstat command: -------------------------------------- The lvmstat command display statistics values since the previous lvmstat command. # lvmstat -v rootvg -e # lvmstat -v rootvg -C # lvmstat -v rootvg Logical Volume iocnt KB_read KB_wrtn Kbps hd8 4 0 0 0.00 paging01 0 0 0 0.00 .. .. Mirroring a VG: =============== LVM provide a disk mirroring facility at the LV level. Mirroring is the association of 2 or 3 PP's with each LP in a LV. Use the "mklv", or the "mklvcopy", or the "mirrorvg" command. The mklv command allows you to select one or two additional copies for each logical volume. example: To make a logical volume in volume group vg03 with nine logical partitions and a total of three copies spread across a maximum of two physical volumes, and whose allocation policy is not strict, enter: mklv -c 3 -u 2 -s n vg03 9 Mirroring can also be added to an existing LV using the mklvcopy command. The mirrorvg command mirrors all the LV's on a given VG. Examples: - To triply mirror a VG, run # mirrorvg -c 3 myvg - To get default mirroring of the rootvg, run # mirrorvg rootvg - To replace a failed disk in a mirrored VG, run # unmirrorvg workvg hdisk7 # reducevg workvg hdisk7 # rmdev -l hdisk7 -d Now replace the failed disk with a new one and name it hdisk7 # extendvg workvg hdisk7 # mirrorvg workvg mirrorvg command: ----------------- mirrorvg Command Purpose Mirrors all the logical volumes that exist on a given volume group. This command only applies to AIX 4.2.1 or later. Syntax mirrorvg [ -S | -s ] [ -Q ] [ -c Copies] [ -m ] VolumeGroup [ PhysicalVolume ... ] Description The mirrorvg command takes all the logical volumes on a given volume group and mirrors those logical volumes. This same functionality may also be accomplished manually if you execute the mklvcopy command for each individual logical volume in a volume group. As with mklvcopy, the target physical drives to be mirrored with data must already be members of the volume group. To add disks to a volume group, run the extendvg command. By default, mirrorvg attempts to mirror the logical volumes onto any of the disks in a volume group. If you wish to control which drives are used for mirroring, you must include the list of disks in the input parameters, PhysicalVolume. Mirror strictness is enforced. Additionally, mirrorvg mirrors the logical volumes, using the default settings of the logical volume being mirrored. If you wish to violate mirror strictness or affect the policy by which the mirror is created, you must execute the mirroring of all logical volumes manually with the mklvcopy command. When mirrorvg is executed, the default behavior of the command requires that the synchronization of the mirrors must complete before the command returns to the user. If you wish to avoid the delay, use the -S or -s option. Additionally, the default value of 2 copies is always used. To specify a value other than 2, use the -c option. Note: To use this command, you must either have root user authority or be a member of the system group. Attention: The mirrorvg command may take a significant amount of time before completing because of complex error checking, the amount of logical volumes to mirror in a volume group, and the time is takes to synchronize the new mirrored logical volumes. You can use the Volumes application in Web-based System Manager (wsm) to change volume characteristics. You could also use the System Management Interface Tool (SMIT) smit mirrorvg fast path to run this command. Flags -c Copies Specifies the minimum number of copies that each logical volume must have after the mirrorvg command has finished executing. It may be possible, through the independent use of mklvcopy, that some logical volumes may have more than the minimum number specified after the mirrorvg command has executed. Minimum value is 2 and 3 is the maximum value. A value of 1 is ignored. -m exact map Allows mirroring of logical volumes in the exact physical partition order that the original copy is ordered. This option requires you to specify a PhysicalVolume(s) where the exact map copy should be placed. If the space is insufficient for an exact mapping, then the command will fail. You should add new drives or pick a different set of drives that will satisfy an exact logical volume mapping of the entire volume group. The designated disks must be equal to or exceed the size of the drives which are to be exactly mirrored, regardless of if the entire disk is used. Also, if any logical volume to be mirrored is already mirrored, this command will fail. -Q Quorum Keep By default in mirrorvg, when a volume group's contents becomes mirrored, volume group quorum is disabled. If the user wishes to keep the volume group quorum requirement after mirroring is complete, this option should be used in the command. For later quorum changes, refer to the chvg command. -S Background Sync Returns the mirrorvg command immediately and starts a background syncvg of the volume group. With this option, it is not obvious when the mirrors have completely finished their synchronization. However, as portions of the mirrors become synchronized, they are immediately used by the operating system in mirror usage. -s Disable Sync Returns the mirrorvg command immediately without performing any type of mirror synchronization. If this option is used, the mirror may exist for a logical volume but is not used by the operating system until it has been synchronized with the syncvg command. The following is a description of rootvg: - rootvg mirroring When the rootvg mirroring has completed, you must perform three additional tasks: bosboot, bootlist, and reboot. The bosboot command is required to customize the bootrec of the newly mirrored drive. The bootlist command needs to be performed to instruct the system which disk and order you prefer the mirrored boot process to start. Finally, the default of this command is for Quorum to be turned off. For this to take effect on a rootvg volume group, the system must be rebooted. - non-rootvg mirroring When this volume group has been mirrored, the default command causes Quorum to deactivated. The user must close all open logical volumes, execute varyoffvg and then varyonvg on the volume group for the system to understand that quorum is or is not needed for the volume group. If you do not revaryon the volume group, mirror will still work correctly. However, any quorum changes will not have taken effect. rootvg and non-rootvg mirroring The system dump devices, primary and secondary, should not be mirrored. In some systems, the paging device and the dump device are the same device. However, most users want the paging device mirrored. When mirrorvg detects that a dump device and the paging device are the same, the logical volume will be mirrored automatically. If mirrorvg detects that the dump and paging device are different logical volumes, the paging device is automatically mirrored, but the dump logical volume is not. The dump device can be queried and modified with the sysdumpdev command. Remark: ------- Run bosboot to initialize all boot records and devices by executing the following command: bosboot -a -d /dev/hdisk? hdisk? is the first hdisk listed under the PV heading after the command lslv -l hd5 has executed. Secondary, you need to understant that the mirroring under AIX it's at the logical volume level. The mirrorvg command is a hight level command that use "mklvcopy" command. So, all LV created before runing the mirrorvg command are keep synchronised, but if you add a new LV after runing mirrorvg, you need to mirror it manualy using "mklvcopy" . Remark: ------- lresynclv Mirroring the rootvg: --------------------- Method 1: --------- Howto mirror an AIX rootvg The following steps will guide you trough the mirroring of an AIX rootvg. This info is valid for AIX 4.3.3, AIX 5.1, AIX 5.2 and AIX 5.3. Make sure you have an empty disk, in this example its hdisk1 Add the disk to the vg via # extendvg rootvg hdisk1 Mirror the vg via: # mirrorvg -s rootvg Now synchronize the new copies you created: # syncvg -v rootvg As we want to be able to boot from different disks, we need to use bosboot: # bosboot -a As hd5 is mirrored there is no need to do it for each disk. Now, update the bootlist: # bootlist -m normal hdisk1 hdisk0 # bootlist -m service hdisk1 hdisk0 When mirrorvg is executed, the default behavior of the command requires that the synchronization of the mirrors must complete before the command returns to the user. If you wish to avoid the delay, use the -S or -s option. Additionally, the default value of 2 copies is always used. To specify a value other than 2, use the -c option. Method 2: --------- ------------------------------------------------------------------------------- # Add the new disk, say its hdisk5, to rootvg extendvg rootvg hdisk5 # If you use one mirror disk, be sure that a quorum is not required for varyon: chvg -Qn rootvg # Add the mirrors for all rootvg LV's: mklvcopy hd1 2 hdisk5 mklvcopy hd2 2 hdisk5 mklvcopy hd3 2 hdisk5 mklvcopy hd4 2 hdisk5 mklvcopy hd5 2 hdisk5 mklvcopy hd6 2 hdisk5 mklvcopy hd8 2 hdisk5 mklvcopy hd9var 2 hdisk5 mklvcopy hd10opt 2 hdisk5 mklvcopy prjlv 2 hdisk5 #If you have other LV's in your rootvg, be sure to create copies for them as well !! ------------------------------------------------------------------------------ # lspv -l hdisk0 hd5 1 1 01..00..00..00..00 N/A prjlv 256 256 108..44..38..50..16 /prj hd6 59 59 00..59..00..00..00 N/A fwdump 5 5 00..05..00..00..00 /var/adm/ras/platform hd8 1 1 00..00..01..00..00 N/A hd4 26 26 00..00..02..24..00 / hd2 45 45 00..00..37..08..00 /usr hd9var 10 10 00..00..02..08..00 /var hd3 22 22 00..00..04..10..08 /tmp hd1 8 8 00..00..08..00..00 /home hd10opt 24 24 00..00..16..08..00 /opt Method 3: --------- In the following example, an RS6000 has 3 disks, 2 of which have the AIX filesystems mirrored on. The boolist contains both hdisk0 and hdisk1. There are no other logical volumes in rootvg other than the AIX system logical volumes. hdisk0 has failed and need replacing, both hdisk0 and hdisk1 are in "Hot Swap" carriers and therefore the machine does not need shutting down. lspv hdisk0 00522d5f22e3b29d rootvg hdisk1 00522d5f90e66fd2 rootvg hdisk2 00522df586d454c3 datavg lsvg -l rootvg rootvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT hd6 paging 4 8 2 open/syncd N/A hd5 boot 1 2 2 closed/syncd N/A hd8 jfslog 1 2 2 open/syncd N/A hd4 jfs 1 2 2 open/syncd / hd2 jfs 12 24 2 open/syncd /usr hd9var jfs 1 2 2 open/syncd /var hd3 jfs 2 4 2 open/syncd /tmp hd1 jfs 1 2 2 open/syncd /home 1, Reduce the logical volume copies from both disks to hdisk1 only :- rmlvcopy hd6 1 hdisk0 rmlvcopy hd5 1 hdisk0 rmlvcopy hd8 1 hdisk0 rmlvcopy hd4 1 hdisk0 rmlvcopy hd2 1 hdisk0 rmlvcopy hd9var 1 hdisk0 rmlvcopy hd3 1 hdisk0 rmlvcopy hd1 1 hdisk0 2, Check that no logical volumes are left on hdisk0 :- lspv -p hdisk0 hdisk0: PP RANGE STATE REGION LV ID TYPE MOUNT POINT 1-101 free outer edge 102-201 free outer middle 202-301 free center 302-401 free inner middle 402-501 free inner edge 3, Remove the volume group from hdisk0 reducevg -df rootvg hdisk0 4, Recreate the boot logical volume on hdisk1, and reset bootlist:- bosboot -a -d /dev/hdisk1 bootlist -m normal rmt0 cd0 hdisk1 5, Check that everything has been removed from hdisk0 :- lspv hdisk0 00522d5f22e3b29d None hdisk1 00522d5f90e66fd2 rootvg hdisk2 00522df586d454c3 datavg 6, Delete hdisk0 :- rmdev -l hdisk0 -d 7, Remove the failed hard drive and replace with a new hard drive. 8, Configure the new disk drive :- cfgmgr 9, Check new hard drive is present :- lspv 10, Include the new hdisk in root volume group :- extendvg rootvg hdisk? (where hdisk? is the new hard disk) 11, Re-create the mirror :- mirrorvg rootvg hdisk? (where hdisk? is the new hard disk) 12, Syncronise the mirror :- syncvg -v rootvg 13, Reset the bootlist :- bootlist -m normal rmt0 cd0 hdisk0 hdisk1 14, Turn off Quorum checking on rootvg :- chvg -Q n rootvg Method 4: --------- Howto mirror an AIX rootvg The following steps will guide you trough the mirroring of an AIX rootvg. This info is valid for AIX 4.3.3, AIX 5.1, AIX 5.2 and AIX 5.3. Make sure you have an empty disk, in this example its hdisk1 Add the disk to the vg via "extendvg rootvg hdisk1 Mirror the vg via: "mirrorvg rootvg" Adapt the bootlist to add the current disk, the system will then fail to hdisk1 is hdisk0 fails during startup do bootlist -o -m normal this will list currently 1 disk, in this exmaple hdisk0 do bootlist -m normal hdisk0 hdisk1 Run a bosboot on both new disks, this will install all software needed for boot on the disk bosboot -ad hdisk0 bosboot -ad hdisk1 Method 5: --------- Although the steps to mirror volume groups between HP and AIX are incredibly similar, there are enough differences to send me through hoops if/when I ever have to do that. Therefore, the following checklist: 1. Mirror the logical volumes: If you don't care what disks the lvs get mirrored to, execute mirrorvg rootvg Otherwise: for lv in $(lsvg -l rootvg | grep -i open/syncd | \ grep -v dumplv | awk '{print $1}') do mklvcopy ${lv} 1 ${disk} done 2. Change the quorum checking if you did not use mirrorvg: chvg -Q n rootvg 3. Run bosboot on the new drive to copy boot files to it: bosboot ${disk} 4. Update the bootlist with the new drive: bootlist -m normal hdisk0 hdisk1 5. Reboot the system to enable the new quorum checking parameter Method 6: --------- Audience: System Administrators Date: September 25, 2002 Mirroring "rootvg" protects the operating system from a disk failure. Mirroring "rootvg" requires a couple extra steps compared to other volume groups. The mirrored rootvg disk must be bootable *and* in the bootlist. Otherwise, if the primary disk fails, you'll continue to run, but you won't be able to reboot. In brief, the procedure to mirror rootvg on hdisk0 to hdisk1 is 1. Add hdisk1 to rootvg: extendvg rootvg hdisk1 2. Mirror rootvg to hdisk1: mirrorvg rootvg hdisk1 (or smitty mirrorvg) 3. Create boot images on hdisk1: bosboot -ad /dev/hdisk1 4. Add hdisk1 to the bootlist: bootlist -m normal hdisk0 hdisk1 5. Reboot to disable quorum checking on rootvg. The mirrorvg turns off quorum by default, but the system needs to be rebooted for it to take effect. For more information, and a comprehensive procedure see the man page for mirrorvg and Example using mklvcopy: ----------------------- mklvcopy [ -a Position ] [ -e Range ] [ -k ] [ -m MapFile ] [ -s Strict ] [ -u UpperBound ] LogicalVolume Copies [ PhysicalVolume... ] Add a copy of LV "lv01" on disk hdisk7: # mklvcopy lv01 2 hdisk7 The mklvcopy command increases the number of copies in each logical partition in LogicalVolume. This is accomplished by increasing the total number of physical partitions for each logical partition to the number represented by Copies. The LogicalVolume parameter can be a logical volume name or logical volume ID. You can request that the physical partitions for the new copies be allocated on specific physical volumes (within the volume group) with the PhysicalVolume parameter; otherwise, all the physical volumes within the volume group are available for allocation. The logical volume modified with this command uses the Copies parameter as its new copy characteristic. The data in the new copies are not synchronized until one of the following occurs: the -k option is used, the volume group is activated by the varyonvg command, or the volume group or logical volume is synchronized explicitly by the syncvg command. Individual logical partitions are always updated as they are written to. The default allocation policy is to use minimum numbering of physical volumes per logical volume copy, to place the physical partitions belong to a copy as contiguously as possible, and then to place the physical partitions in the desired region specified by the -a flag. Also, by default, each copy of a logical partition is placed on a separate physical volume. Using smitty: ------------- # smit mklv or # smit mklvcopy Using "smit mklv" you can create a new LV and at the same time tell the system to create a mirror (2 or 3 copies) of each LP and which PV's are involved. Using "smit mklvcopy" you can add mirrors to an existing LV. Filesystems in AIX: =================== After a VG is created, you can create filesystems. You can use smitty or the crfs and mkfs command. File systems are confined to a single logical volume. The journaled file system (JFS) and the enhanced journaled file system (JFS2) are built into the base operating system. Both file system types link their file and directory data to the structure used by the AIX Logical Volume Manager for storage and retrieval. A difference is that JFS2 is designed to accommodate a 64-bit kernel and larger files. Run lsfs -v jfs2 to determine if your system uses JFS2 file systems. This command returns no output if it finds only standard file systems. crfs: ----- crfs -v VfsType { -g VolumeGroup | -d Device } [ -l LogPartitions ] -m MountPoint [ -n NodeName ] [ -u MountGroup ] [ -A { yes | no } ] [ -p {ro | rw } ] [ -a Attribute= Value ... ] [ -t { yes | no } ] The crfs command creates a file system on a logical volume within a previously created volume group. A new logical volume is created for the file system unless the name of an existing logical volume is specified using the -d. An entry for the file system is put into the /etc/filesystems file. crfs -v jfs -g(vg) -m(mount point) -a size=(size of fs) -A yes Will create a logical volume on the volume group and create the file system on the logical volume. All at the size stated. Will add entry into /etc/filesystems and will create the mount point directory if it does not exist. - To make a JFS on the rootvg volume group with nondefault fragment size and nondefault nbpi, enter: # crfs -v jfs -g rootvg -m /test -a size=32768 -a frag=512 -a nbpi=1024 This command creates the /test file system on the rootvg volume group with a fragment size of 512 bytes, a number of bytes per i-node (nbpi) ratio of 1024, and an initial size of 16MB (512 * 32768). - To make a JFS on the rootvg volume group with nondefault fragment size and nondefault nbpi, enter: # crfs -v jfs -g rootvg -m /test -a size=16M -a frag=512 -a nbpi=1024 This command creates the /test file system on the rootvg volume group with a fragment size of 512 bytes, a number of bytes per i-node (nbpi) ratio of 1024, and an initial size of 16MB. - To create a JFS2 file system which can support NFS4 ACLs, type: # crfs -v jfs2 -g rootvg -m /test -a size=1G -a ea=v2 - This command creates the /test JFS2 file system on the rootvg volume group with an initial size of 1 gigabyte. The file system will store extended attributes using the v2 format. # crfs -v jfs -g backupvg -m /backups -a size=32G -a bf=true # crfs -v jfs -g oravg -m /filetransfer -a size=4G -a bf=true Extended example: ----------------- The following command creates a JFS filesystem on a previously created LV "lv05". In this example, suppose the LV was created in the following way: # mklv -y lv05 -c 2 splvg 200 In this case, it is clear that we mirror each LP to 2 PP's (because of the -c 2). Now to create a filesystem on lv05, we can use the command # crfs -v jfs -d lv05 -m /spl -a bf=true Note that we did not mentioned the size of the filesystem. This is because we use a previously defined LV with a known size. Notes: 1. The option -a bf=true allows large files [ > 2Gb]; 2. Specifying -m / (like for example "/data") will create the entry in /etc/filesystems for you Some more examples: ------------------- Commands to create VG's: mkvg oravg -d 10 -s 128 hdisk2 hdisk4 mkvg splvg -d 10 -s 128 hdisk3 hdisk5 mkvg softwvg -d 10 -s 128 hdisk6 mkvg backupvg -d 10 -s 128 hdisk7 Set of Create Logical Volume and Filesystem commands: # crfs -v jfs -g -m -a size=xG -a bf=true or # mklv -y -c 2 No_Of_PPs # crfs -v jfs -d -m -a bf=true # mklv -y lv05 -c 2 splvg 300 # crfs -v jfs -d lv05 -m /spl -a bf=true # mklv -y lv06 -c 2 splvg 100 # crfs -v jfs -d lv06 -m /u04 -a bf=true # mklv -y lv02 -c 2 oravg 200 # mklv -y lv03 -c 2 oravg 200 # mklv -y lv04 -c 2 oravg 200 # crfs -v jfs -d lv02 -m /u01 -a bf=true # crfs -v jfs -d lv03 -m /u02 -a bf=true # crfs -v jfs -d lv04 -m /u03 -a bf=true # crfs -v jfs -g backupvg -m /backups -a size=33G -a bf=true # crfs -v jfs -g backupvg -m /data -a size=33G -a bf=true # crfs -v jfs -g softwvg -m /apps -a size=16G -a bf=true # crfs -v jfs -g softwvg -m /software -a size=33G -a bf=true # crfs -v jfs -g softwvg -m /u05 -a size=12G -a bf=true mkfs: ----- The mkfs command makes a new file system on a specified device. The mkfs command initializes the volume label, file system label, and startup block. The Device parameter specifies a block device name, raw device name, or file system name. If the parameter specifies a file system name, the mkfs command uses this name to obtain the following parameters from the applicable stanza in the /etc/filesystems file, unless these parameters are entered with the mkfs command. - To specify the volume and file system name for a new file system, type: # mkfs -lworks -vvol001 /dev/hd3 This command creates an empty file system on the /dev/hd3 device, giving it the volume serial number vol001 and file system name works. The new file system occupies the entire device. The file system has a default fragment size (4096 bytes) and a default nbpi ratio (4096). - To create a file system with nondefault attributes, type: # mkfs -s 8192 -o nbpi=2048,frag=512 /dev/lv01 This command creates an empty 4 MB file system on the /dev/lv01 device with 512-byte fragments and 1 i-node for each 2048 bytes. -To create a large file enabled file system, type: # mkfs -V jfs -o nbpi=131072,bf=true,ag=64 /dev/lv01 This creates a large file enabled JFS file system with an allocation group size of 64 megabytes and 1 inode for every 131072 bytes of disk. The size of the file system will be the size of the logical volume lv01. - To create a file system with nondefault attributes, type: # mkfs -s 4M -o nbpi=2048, frag=512 /dev/lv01 This command creates an empty 4 MB file system on the /dev/lv01 device with 512-byte fragments and one i-node for each 2048 bytes. - To create a JFS2 file system which can support NFS4 ACLs, type: # mkfs -V jfs2 -o ea=v2 /dev/lv01 This command creates an empty file system on the /dev/lv01 device with v2 format for extended attributes. chfs command: ------------- - Example 1: How do I change the size of a filesystem? To increase /usr filesystem size by 1000000 512-byte blocks, type: # chfs -a size=+1000000 /usr - Example 2: To split off a copy of a mirrored file system and mount it read-only for use as an online backup, enter: # chfs -a splitcopy=/backup -a copy=2 /testfs This mount a read-only copy of /testfs at /backup. - Example 3: To change the mount point of a file system, enter: # chfs -m /test2 /test This command changes the mount point of a file system from /test to /test2. - Eaxample 4: # chfs -a size=+20G /data/udb/eidwha2/eddwha2/DATA03 - Example 5: chfs -a size=+5M /opt would do it this way: 1) chfs -m old_filename new_filename 2) umount old_filename 3) mount new_filename To stop or kill access to a fs, use: fuser -xuc /scratch lsfs command: ------------- Displays the characteristics of file systems. Syntax lsfs [ -q ] [ -c | -l ] [ -a | -v VfsType | -u MountGroup| [FileSystem...] ] Description The lsfs command displays characteristics of file systems, such as mount points, automatic mounts, permissions, and file system size. The FileSystem parameter reports on a specific file system. The following subsets can be queried for a listing of characteristics: All file systems All file systems of a certain mount group All file systems of a certain virtual file system type One or more individual file systems The lsfs command displays additional Journaled File System (JFS) or Enhanced Journaled File System (JFS2) characteristics if the -q flag is specified. To show all file systems in the /etc/filesystems file, enter: #lsfs To show all file systems of vfs type jfs, enter: #lsfs -v jfs To show the file system size, the fragment size, the compression algorithm (if any), and the number of bytes per i-node as recorded in the superblock of the root file system, enter: #lsfs -q / SAN connection via SDD, and related commands: ============================================= If you use advanced storage on AIX, the workings on disks and volume groups are a bit different from the traditional ways, using local disks, as described above. You can use SDD or SDDPCM Multipath IO. This section describes SDD. See section 31.5 for SDDPCM. Overview of the Subsystem device driver: ---------------------------------------- The IBM System Storage Multipath Device Driver SDD provides multipath configuration environment support for a host system that is attached to storage devices. It provides: -Enhanced data availability -Automatic path failover and recovery to an alternate path -Dynamic load balancing of multiple paths -Concurrent microcode upgrade. The IBM System Storage Multipath Subsystem Device Driver Path Control Module SDDPCM provides AIX MPIO support. Its a loadable module. During the configuration of supported devices, SDDPCM is loaded and becomes part of the AIX MPIO Fibre Channel protocol device driver. The AIX MPIO-capable device driver with the SDDPCM module provides the same functions that SDD provides. Note that before attempting to exploit the Virtual shared disk support for the Subsystem device driver, you must read IBM Subsystem Device Driver Installation and User's Guide. An SDD implementation is available for AIX, Solaris, HP-UX, some Linux distro's, Windows 200x. An impression about the architecture on AIX can be seen in the following figure: ------------------------------- | Host System | | ------- ------- | | |FC 0 | | FC 1| | | ------- ------- | ------------------------------- | | | | ---------------------------------- ESS | -------- -------- | | |port 0| |port 1| | | -------- \ /-------- | | | \ / | | | | \/ | | | | / \ | | | -----------/ \---------- | | |Cluster 1| |Cluster 2|| | ----------- -----------| | | | | | | | | | | | | | | | | | | | | | O--|--|--|-------| | | | | | lun0| | | | | | | | O--|--|---------| | | | | lun1| | | | | | O--|-----------| | | | lun2| | | | O--------------| | | lun3 | --------------------------------- DPO (Data Path Optimizer) was renamed by IBM a couple years ago- and became SDD (Subsystem Device Driver). When redundant paths are configured to ESS logical units, and the SDD is installed and configured, the AIX(R) lspv command shows multiple hdisks as well as a new construct called a vpath. The hdisks and vpaths represent the same logical unit. You will need to use the lsvpcfg command to get more information. Each SDD vpath device represents a unique physical device on the storage server. Each physical device is presented to the operating system as an operating system disk device. So, essentially, a vpath device acts like a disk. You will see later on that a hdisk is actually a "path" to a LUN, that can be reached either by fscsi0 or fscsi1. Also you will see that a vpath represents the LUN. SDD does not support multipathing to a bootdevice. Support for VIO: ---------------- Starting from SDD version 1.6.2.0, a unique ID attribute is added to SDD vpath devices, in order to support AIX5.3 VIO future features. AIX device configure methods have been changed in both AIX52 TL8 and AIX53 TL4 for this support. Examples: --------- For example, after issuing lspv, you see output similar to this: # lspv hdisk0 000047690001d59d rootvg hdisk1 000047694d8ce8b6 None hdisk18 000047694caaba22 None hdisk19 000047694caadf9a None hdisk20 none None hdisk21 none None hdisk22 000047694cab2963 None hdisk23 none None hdisk24 none None vpath0 none None vpath1 none None vpath2 000047694cab0b35 gpfs1scsivg vpath3 000047694cab1d27 gpfs1scsivg After issuing lsvpcfg, you see output similar to this: # lsvpcfg vpath0 (Avail ) 502FCA01 = hdisk18 (Avail pv ) vpath1 (Avail ) 503FCA01 = hdisk19 (Avail pv ) vpath2 (Avail pv gpfs1scsivg) 407FCA01 = hdisk20 (Avail ) hdisk24 (Avail ) The examples above illustrate some important points: - vpath0 consists of a single path (hdisk18) and therefore will not provide failover protection. Also, hdisk18 is defined to AIX as a physical volume (pv flag) and has a PVID, as you can see from the output of the lspv command. Likewise for vpath1. - vpath2 has two paths (hdisk20 and hdisk24) and has a volume group defined on it. Notice that with the lspv command, hdisk20 and hdisk24 look like newly installed disks with no PVIDs. The lsvpcfg command had to be used to determine that hdisk20 and hdisk24 make up vpath2, which has a PVID. Warning: so be very carefull not to use a hdisk for a "local" VG, if its already used for a vpath. Other Example: -------------- # lspv hdisk0 00c49e8c8053fe86 rootvg active hdisk1 00c49e8c841a74d5 rootvg active -hdisk2 none None -hdisk3 none None vpath0 00c49e8c94c02c15 datavg active vpath1 00c49e8c94c050d4 appsvg active -hdisk4 none None vpath2 00c49e8c2806dc22 appsvg active -hdisk5 none None -hdisk6 none None -hdisk7 none None # lsvpcfg vpath0 (Avail pv datavg) 75BAFX1006C = hdisk2 (Avail ) hdisk5 (Avail ) vpath1 (Avail pv appsvg) 75BAFX1017B = hdisk3 (Avail ) hdisk6 (Avail ) vpath2 (Avail pv appsvg) 75BAFX10329 = hdisk4 (Avail ) hdisk7 (Avail ) # datapath query adapter Active Adapters :2 Adpt# Name State Mode Select Errors Paths Active 0 fscsi0 NORMAL ACTIVE 12611291 0 3 3 1 fscsi1 NORMAL ACTIVE 13375287 0 3 3 # datapath query device Total Devices : 3 DEV#: 0 DEVICE NAME: vpath0 TYPE: 2107900 POLICY: Optimized # this is vpath0 SERIAL: 75BAFX1006C ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk2 OPEN NORMAL 12561763 0 1 fscsi1/hdisk5 OPEN NORMAL 13324883 0 DEV#: 1 DEVICE NAME: vpath1 TYPE: 2107900 POLICY: Optimized SERIAL: 75BAFX1017B ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk3 OPEN NORMAL 28024 0 1 fscsi1/hdisk6 OPEN NORMAL 28847 0 DEV#: 2 DEVICE NAME: vpath2 TYPE: 2107900 POLICY: Optimized SERIAL: 75BAFX10329 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk4 OPEN NORMAL 21672 0 1 fscsi1/hdisk7 OPEN NORMAL 21712 0 # lsattr -El vpath0 active_hdisk hdisk2/75BAFX1006C/fscsi0 Active hdisk False active_hdisk hdisk5/75BAFX1006C/fscsi1 Active hdisk False policy df Scheduling Policy True pvid 00c49e8c94c02c150000000000000000 Physical volume identifier False serial_number 75BAFX1006C LUN serial number False # lsdev -Cc adapter ent0 Available 04-08 10/100/1000 Base-TX PCI-X Adapter (14106902) ent1 Available 06-08 10/100/1000 Base-TX PCI-X Adapter (14106902) fcs0 Available 05-08 FC Adapter fcs1 Available 07-08 FC Adapter sa0 Available LPAR Virtual Serial Adapter sisscsia0 Available 03-08 PCI-X Ultra320 SCSI Adapter # lsattr -El fcs0 bus_intr_lvl 131193 Bus interrupt level False bus_io_addr 0xcfc00 Bus I/O address False bus_mem_addr 0xc0040000 Bus memory address False init_link al INIT Link flags True intr_priority 3 Interrupt priority False lg_term_dma 0x800000 Long term DMA True max_xfer_size 0x100000 Maximum Transfer Size True num_cmd_elems 200 Maximum number of COMMANDS to queue to the adapter True pref_alpa 0x1 Preferred AL_PA True sw_fc_class 2 FC Class for Fabric True # lscfg -lv fcs0 fcs0 U7879.001.DQDKCPR-P1-C2-T1 FC Adapter Part Number.................03N6441 EC Level....................A Serial Number...............1D54508045 Manufacturer................001D Feature Code................280B FRU Number.................. 03N6441 Device Specific.(ZM)........3 Network Address.............10000000C94F91CD ROS Level and ID............0288193D Device Specific.(Z0)........1001206D Device Specific.(Z1)........00000000 Device Specific.(Z2)........00000000 Device Specific.(Z3)........03000909 Device Specific.(Z4)........FF801412 Device Specific.(Z5)........0288193D Device Specific.(Z6)........0683193D Device Specific.(Z7)........0783193D Device Specific.(Z8)........20000000C94F91CD Device Specific.(Z9)........TS1.90X13 Device Specific.(ZA)........T1D1.90X13 Device Specific.(ZB)........T2D1.90X13 Device Specific.(YL)........U7879.001.DQDKCPR-P1-C2-T1 # lsdev -Cc adapter -F 'name parent' ent0 pci4 ent1 pci6 fcs0 pci5 fcs1 pci7 sa0 sisscsia0 pci3 # lsdev -Cc disk -F 'name location' hdisk0 03-08-00-3,0 hdisk1 03-08-00-5,0 hdisk2 05-08-01 ------------------------>| hdisk3 05-08-01 ------------------------>| hdisk4 05-08-01 ------------------------>| hdisk5 07-08-01 | hdisk6 07-08-01 | hdisk7 07-08-01 | vpath0 | vpath1 | vpath2 | | | # lsdev -Cc driver -F 'name location' | dpo | fcnet0 05-08-02 | fcnet1 07-08-02 | fscsi0 05-08-01 <------------------------- fscsi1 07-08-01 iscsi0 scsi0 03-08-00 Please note that, for example, from the above output, that fsci0 can be "linked" to hdisk2, hdisk3 and hdisk4, due to the location code. You can compare that to the output of "datapath query device". Also interesting can be the following: # lsdev -C | grep fc fcnet0 Defined 05-08-02 Fibre Channel Network Protocol Device fcnet1 Defined 07-08-02 Fibre Channel Network Protocol Device fcs0 Available 05-08 FC Adapter fcs1 Available 07-08 FC Adapter # lsdev -C | grep fsc fscsi0 Available 05-08-01 FC SCSI I/O Controller Protocol Device fscsi1 Available 07-08-01 FC SCSI I/O Controller Protocol Device From this, you can see that fcs0 is the "parent" of the child "fsci0". # lsattr -D -l fscsi0 attach none How this adapter is CONNECTED False dyntrk no Dynamic Tracking of FC Devices True fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True scsi_id Adapter SCSI ID False sw_fc_class 3 FC Class for Fabric True # lsattr -D -l fcs0 bus_intr_lvl Bus interrupt level Fals e bus_io_addr 0x00010000 Bus I/O address Fals e bus_mem_addr 0x01000000 Bus memory address Fals e init_link al INIT Link flags True intr_priority 3 Interrupt priority Fals e lg_term_dma 0x800000 Long term DMA True max_xfer_size 0x100000 Maximum Transfer Size True num_cmd_elems 200 Maximum number of COMMANDS to queue to the adapter True pref_alpa 0x1 Preferred AL_PA True sw_fc_class 2 FC Class for Fabric True # datapath query essmap Disk Path P Location adapter LUN SN Type Size LSS Vol Rank C/A S Connection port RaidMode ------- ----- - ----------- ------ ----------- ------------ ---- ---- --- ----- ---- - ----------- ---- -------- vpath0 hdisk2 05-08-01[FC] fscsi0 75BAFX1006C IBM 2107-900 107.5GB 0 108 fff2 02 Y R1-B3-H3-ZC 232 RAID5 vpath0 hdisk5 07-08-01[FC] fscsi1 75BAFX1006C IBM 2107-900 107.5GB 0 108 fff2 02 Y R1-B3-H3-ZA 230 RAID5 vpath1 hdisk3 05-08-01[FC] fscsi0 75BAFX1017B IBM 2107-900 14.3GB 1 123 fff1 0b Y R1-B3-H3-ZC 232 RAID5 vpath1 hdisk6 07-08-01[FC] fscsi1 75BAFX1017B IBM 2107-900 14.3GB 1 123 fff1 0b Y R1-B3-H3-ZA 230 RAID5 vpath2 hdisk4 05-08-01[FC] fscsi0 75BAFX10329 IBM 2107-900 14.3GB 3 41 ffe1 08 Y R1-B3-H3-ZC 232 RAID5 vpath2 hdisk7 07-08-01[FC] fscsi1 75BAFX10329 IBM 2107-900 14.3GB 3 41 ffe1 08 Y R1-B3-H3-ZA 230 RAID5 From this you can see that a hdisk is actually a "path" to a LUN, that can be reached either by fscsi0 or fscsi1. Also you can see that a vpath represents the LUN. # datapath query adaptstats Adapter #: 0 ============= Total Read Total Write Active Read Active Write Maximum I/O: 9595892 4371836 0 0 23 SECTOR: 176489389 138699019 0 0 5128 Adapter #: 1 ============= Total Read Total Write Active Read Active Write Maximum I/O: 10238891 4523508 0 0 24 SECTOR: 188677891 143739157 0 0 5128 # datapath query portmap BAY-1(B1) BAY-2(B2) BAY-3(B3) BAY-4(B4) ESSID DISK H1 H2 H3 H4 H1 H2 H3 H4 H1 H2 H3 H4 H1 H2 H3 H4 ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD BAY-5(B5) BAY-6(B6) BAY-7(B7) BAY-8(B8) H1 H2 H3 H4 H1 H2 H3 H4 H1 H2 H3 H4 H1 H2 H3 H4 ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD 75BAFX1 vpath0 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- Y-Y- ---- ---- ---- ---- ---- 75BAFX1 vpath1 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- Y-Y- ---- ---- ---- ---- ---- 75BAFX1 vpath2 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- Y-Y- ---- ---- ---- ---- ---- Y = online/open y = (alternate path) online/open O = online/closed o = (alternate path) online/closed N = offline n = (alternate path) offline - = path not configured PD = path down Note: 2105 devices' essid has 5 digits, while 1750/2107 device's essid has 7 digits. # datapath query wwpn Adapter Name PortWWN fscsi0 10000000C94F91CD fscsi1 10000000C94F9923 If you need to force the Subsystem Device Driver (SDD), or equivalent driver, to rescan and map the new devices, use the following command at the system prompt: # /usr/sbin/cfgvpath Procedure to make a new lun available to AIX: --------------------------------------------- -Allocate the new lun on the SAN -Run "cfgmgr" -Verify the new vpath/hdisk by running "lsvpcfg" There should be a new vpath and it should be available with no volume group - if not, rerun cfgmgr Create Volume groups with vpaths: --------------------------------- You should use the mkvg4vp command to create Volume Groups. Example: # mkvg4vp -B -t 32 -s 4 -y DB01_RECOV_VG1 vpath4 vpath10 By default, VG's can accommodate up to 255 LV's and 32 PV's. If the -B flag is used on the mkvg or mkvg4vp command, the resulting VG will support up to 512 LV's and 128 PV's. The -s flag, as usual, designates the Partition size. SDD software on AIX: -------------------- Starting with SDD 1.6.1.0, the SDD package for AIX53 is devices.sdd.53.rte and requires AIX53E with APAR IY76997. Starting with SDD 1.6.2.0, the SDD package for AIX52 is devices.sdd.52.rte and requires AIX52M with APAR IY76997. See also in this document: IBM Flash Alert: SDD 1.6.2.0 requires minimum AIX code levels; possible 0514-035 error The SDD installation package installs a number of new commands, like datapath, chgvpath, lsvpcfg etc.. Before installing SDD, you should check firmware levels, and AIX APAR requirements. See the following sites: -- scsi and ESS, and Fiber: www-1.ibm.com/servers/storage/support/ www-1.ibm.com/servers/eserver/support/unixservers/index.html -- AIX APAR: www-03.ibm.com/servers/eserver/support/unixservers/aixfixes.html or, www.ibm.com/servers/eserver/support/pseries/aixfixes.html or, www14.software.ibm.com/webapp/set2/sas/f/genunix3/aixfixes.html SAN connections with SDDPCM MPIO: ================================= This section covers some of the SDDPCM MPIO SAN connections. There are some different commands with this type of connections to SAN storage. The use of SDD or SDDPCM gives the AIX host the ability to access multiple paths to a single LUN within an ESS or SAN. This ability to access a single LUN on multiple paths allows for a higher degree of data availability in the event of a path failure. Data can continue to be accessed within the ESS as long as there is at least one available path. Without one of these installed, you will lose access to the LUN in the event of a path failure. If you have "sdd" installed use the datapath command, and with sddpcm use the pcmpath command. Just as the commands shown in section 31.4, just replace datapath with pcmpath, like # pcmpath query device DEV#: 2 DEVICE NAME: hdisk2 TYPE: 2107900 ALGORITHM: Load Balance SERIAL: 75065711100 ========================================================================== Path# Adapter/Path Name State Mode Select Errors 0 fscsi0/path0 OPEN NORMAL 1240 0 1 fscsi0/path1 OPEN NORMAL 1313 0 2 fscsi0/path2 OPEN NORMAL 1297 0 3 fscsi0/path3 OPEN NORMAL 1294 0 DEV#: 3 DEVICE NAME: hdisk3 TYPE: 2107900 ALGORITHM: Load Balance SERIAL: 75065711101 ========================================================================== Path# Adapter/Path Name State Mode Select Errors 0 fscsi0/path0 CLOSE NORMAL 0 0 1 fscsi0/path1 CLOSE NORMAL 0 0 2 fscsi0/path2 CLOSE NORMAL 0 0 3 fscsi0/path3 CLOSE NORMAL 0 0 DEV#: 4 DEVICE NAME: hdisk4 TYPE: 1750500 ALGORITHM: Load Balance SERIAL: 13AAGXA1101 ========================================================================== Path# Adapter/Path Name State Mode Select Errors 0* fscsi0/path0 OPEN NORMAL 12 0 1 fscsi0/path1 OPEN NORMAL 3787 0 2* fscsi1/path2 OPEN NORMAL 17 0 3 fscsi1/path3 OPEN NORMAL 3822 0 # pcmpath query essmap Some possible errors with pcmpath: root@zd110l04:/root#pcmpath query device Kernel extension sdduserke was not loaded. Errno=8. Please verify SDDPCM device configuration. On a system with SDDPCM, you will see the SDDPCM server daemon, "pcmsrv", running. This process checks available paths and does other checks and monitoring. The process is under control of the resource controller, like for example starting and stopping it goes with # stopsrc -s pcmsrv # startsrc -s pcmsrv The process is started on boot from inittab: # cat /etc/inittab | grep pcmsrv srv:2:wait:/usr/bin/startsrc -s pcmsrv > /dev/null 2>&1 >>>> Filesystems in Linux: ========================== Disks: ====== Linux on x86 systems, have the following (storage) devices: -- Entire harddisks are listed as devices without numbers, such as "/dev/hda" or "/dev/sda". - IDE: /dev/hda is the primary IDE master drive, /dev/hdb is the primary IDE slave drive, /dev/hdc is the secondary IDE master, /dev/hdd is the secondary IDE slave, - SCSI: /dev/sda is the first SCSI interface and 1st device id number etc.. -- Partitions on a disk are referred to with a number such as /dev/hda1 Floppydrive: /dev/fd0 # mount -t auto /dev/fd0 /mnt/floppy # mount -t vfat /dev/fd0 /mnt/floppy # mount /dev/fd0 /mnt/floppy Zipdrive: # insmod ppa # load the module # mount -t vfat /dev/sda /mnt/zip Filesystems: ============ Linux supports a huge number of filesystems, including FAT, JFS, NTFS etc.. But the most common are ext2 and ext3. For the "native" filesystems, we take a look at the following FS's: - ReiserFS A journaled filesystem - Ext2 The most popular filesystem for years. But it does not use a log/jounal, so gradually it becomes less important. - Ext3 Very related to Ext2, but this one supports journaling. An Ext2 filesystem can easily be upgraded to Ext3. Adding a disk in Linux (traditional way, No LVM): ================================================= Suppose you have SCSI card on with a disk is attached. The disk as a whole would be refferred to as "/dev/sda" and the first partition would be referred to as "/dev/sda1". But we have a new disk here. If you cannot find the device files /dev/sda in /dev, you might create it with the /dev/MAKEDEV script: # cd /dev # ./MAKEDEV sda The disk is now ready to be partitioned. In this example, we plan to create 3 partitions, including a swap partition. # fdisk /dev/sda The number of cylinders for this disk is set to .. (.. more output..) Command: The fdisk program is interactive; pressing m displays a list of all its commands. Command: new Command action e extended p primary partition (1-4): 1 (.. more output..) Command: print Device Boot Start End Blocks Id System /dev/sda1 1 255 2048256 83 Linux So we have created our first partition. We now create the swap partition: Command: new Command action e extended p primary partition (1-4): 2 (.. more output..) Command: type Partition number (1-4): 2 Hex code: 82 # which is a Linix swap partition Changed system type of partition 2 to 82 (Linux swap) The third partition can be created in a similar way. We now would like to see a listing of our partitions Command: print Device Boot Start End Blocks Id System /dev/sda1 1 255 2048256 83 Linux /dev/sda2 256 511 2056320 82 Swap /dev/sda3 512 5721 41849325 83 Linux Now, save the label to the disk: Command: write (.. more output..) Ofcourse, we now would like to create the filesystems and the swap. If you want to use the Ext2 filesystem on partition one, use the following command: # mke2fs /dev/sda1 2048256 ( or # mkfs -t ext2 -b 4096 /dev/sda1 ) Lets check the filesystem with fsck: # fsck -f /dev/sda1 A new filesystem can be mounted as soon as the mount point is created. # mkdir /bkroot # mount /dev/sda1 /bkroot Lets now create the swap space: # mkswap -c /dev/sda2 2056320 and activate it using the command: # swapon /dev/sda2 See also section 34.3 for administering swap space on Linux. >>>> Notes about Linux and LVM: =============================== Note 1: ======= -What is RAID and LVM -Initial setup of a RAID-5 array -Initial setup of LVM on top of RAID -Handling a Drive Failure -Common Glitches -Other Useful Resources -Expanding an Array/Filesytem -------------------------------------------------------------------------------- -What is RAID and LVM RAID is usually defined as Redundant Array of Inexpensive disks. It is normally used to spread data among several physical hard drives with enough redundancy that should any drive fail the data will still be intact. Once created a RAID array appears to be one device which can be used pretty much like a regular partition. There are several kinds of RAID but I will only refer to the two most common here. The first is RAID-1 which is also known as mirroring. With RAID-1 it's basically done with two essentially identical drives, each with a complete set of data. The second, the one I will mostly refer to in this guide is RAID-5 which is set up using three or more drives with the data spread in a way that any one drive failing will not result in data loss. The Red Hat website has a great overview of the RAID Levels. There is one limitation with Linux Software RAID that a /boot parition can only reside on a RAID-1 array. Linux supports both several hardware RAID devices but also software RAID which allows you to use any IDE or SCSI drives as the physical devices. In all cases I'll refer to software RAID. LVM stands for Logical Volume Manager and is a way of grouping drives and/or partition in a way where instead of dealing with hard and fast physical partitions the data is managed in a virtual basis where the virtual partitions can be resized. The Red Hat website has a great overview of the Logical Volume Manager. There is one limitation that a LVM cannot be used for the /boot. -------------------------------------------------------------------------------- Initial set of a RAID-5 array I recommend you experiment with setting up and managing RAID and LVM systems before using it on an important filesystem. One way I was able to do it was to take old hard drive and create a bunch of partitions on it (8 or so should be enough) and try combining them into RAID arrays. In my testing I created two RAID-5 arrays each with 3 partitions. You can then manually fail and hot remove the partitions from the array and then add them back to see how the recovery process works. You'll get a warning about the partitions sharing a physical disc but you can ignore that since it's only for experimentation. In my case I have two systems with RAID arrays, one with two 73G SCSI drives running RAID-1 (mirroring) and my other test system is configured with three 120G IDE drives running RAID-5. In most cases I will refer to my RAID-5 configuration as that will be more typical. I have an extra IDE controller in my system to allow me to support the use of more than 4 IDE devices which caused a very odd drive assignment. The order doesn't seem to bother the Linux kernel so it doesn't bother me. My basic configuration is as follows: hda 120G drive hdb 120G drive hde 60G boot drive not on RAID array hdf 120G drive hdg CD-ROM drive The first step is to create the physical partitions on each drive that will be part of the RAID array. In my case I want to use each 120G drive in the array in it's entirety. All the drives are partitioned identically so for example, this is how hda is partitioned: Disk /dev/hda: 120.0 GB, 120034123776 bytes 16 heads, 63 sectors/track, 232581 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 232581 117220792+ fd Linux raid autodetect So now with all three drives with a partitioned with id fd Linux raid autodetect you can go ahead and combine the paritions into a RAID array: # /sbin/mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 \ /dev/hdb1 /dev/hda1 /dev/hdf1 Wow, that was easy. That created a special device /dev/md0 which can be used instead of a physical parition. You can check on the status of that RAID array with the mdadm command: # /sbin/mdadm --detail /dev/md0 Version : 00.90.01 Creation Time : Wed May 11 20:00:18 2005 Raid Level : raid5 Array Size : 234436352 (223.58 GiB 240.06 GB) Device Size : 117218176 (111.79 GiB 120.03 GB) Raid Devices : 3 Total Devices : 3 Preferred Minor : 0 Persistence : Superblock is persistent Update Time : Fri Jun 10 04:13:11 2005 State : clean Active Devices : 3 Working Devices : 3 Failed Devices : 0 Spare Devices : 0 Layout : left-symmetric Chunk Size : 64K UUID : 36161bdd:a9018a79:60e0757a:e27bb7ca Events : 0.10670 Number Major Minor RaidDevice State 0 3 1 0 active sync /dev/hda1 1 3 65 1 active sync /dev/hdb1 2 33 65 2 active sync /dev/hdf1 The important lines to see are the State line which should say clean otherwise there might be a problem. At the bottom you should make sure that the State column always says active sync which says each device is actively in the array. You could potentially have a spare device that's on-hand should any drive should fail. If you have a spare you'll see it listed as such here. One thing you'll see above if you're paying attention is the fact that the size of the array is 240G but I have three 120G drives as part of the array. That's because the extra space is used as extra parity data that is needed to survive the failure of one of the drives. -------------------------------------------------------------------------------- - Initial set of LVM on top of RAID Now that we have /dev/md0 device you can create a Logical Volume on top of it. Why would you want to do that? If I were to build an ext3 filesystem on top of the RAID device and someday wanted to increase it's capacity I wouldn't be able to do that without backing up the data, building a new RAID array and restoring my data. Using LVM allows me to expand (or contract) the size of the filesystem without disturbing the existing data. Anyway, here are the steps to then add this RAID array to the LVM system. The first command pvcreate will "initialize a disk or parition for use by LVM". The second command vgcreate will then create the Volume Group, in my case I called it lvm-raid: # pvcreate /dev/md0 # vgcreate lvm-raid /dev/md0 The default value for the physical extent size can be too low for a large RAID array. In those cases you'll need to specify the -s option with a larger than default physical extent size. The default is only 4MB as of the version in Fedora Core 5. For example, to successfully create a 550G RAID array a size of 2G works well: # vgcreate -s 2G Ok, you've created a blank receptacle but now you have to tell how many Physical Extents from the physical device (/dev/md0 in this case) will be allocated to this Volume Group. In my case I wanted all the data from /dev/md0 to be allocated to this Volume Group. If later I wanted to add additional space I would create a new RAID array and add that physical device to this Volume Group. To find out how many PEs are available to me use the vgdisplay command to find out how many are available and now I can create a Logical Volume using all (or some) of the space in the Volume Group. In my case I call the Logical Volume lvm0. # vgdisplay lvm-raid . . Free PE / Size 57235 / 223.57 GB # lvcreate -l 57235 lvm-raid -n lvm0 In the end you will have a device you can use very much like a plain 'ol parition called /dev/lvm-raid/lvm0. You can now check on the status of the Logical Volume with the lvdisplay command. The device can then be used to to create a filesystem on. # lvdisplay /dev/lvm-raid/lvm0 --- Logical volume --- LV Name /dev/lvm-raid/lvm0 VG Name lvm-raid LV UUID FFX673-dGlX-tsEL-6UXl-1hLs-6b3Y-rkO9O2 LV Write Access read/write LV Status available # open 1 LV Size 223.57 GB Current LE 57235 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:2 # mkfs.ext3 /dev/lvm-raid/lvm0 . . # mount /dev/lvm-raid/lvm0 /mnt # df -h /mnt Filesystem Size Used Avail Use% Mounted on /dev/mapper/lvm--raid-lvm0 224G 93M 224G 1% /mnt -------------------------------------------------------------------------------- - Handling a Drive Failure As everything eventually does break (some sooner than others) a drive in the array will fail. It is a very good idea to run smartd on all drives in your array (and probably ALL drives period) to be notified of a failure or a pending failure as soon as possible. You can also manually fail a partition, meaning to take it out of the RAID array, with the following command: # /sbin/mdadm /dev/md0 -f /dev/hdb1 mdadm: set /dev/hdb1 faulty in /dev/md0 Once the system has determined a drive has failed or is otherwise missing (you can shut down and pull out a drive and reboot to similate a drive failure or use the command to manually fail a drive above it will show something like this in mdadm: # /sbin/mdadm --detail /dev/md0 Update Time : Wed Jun 15 11:30:59 2005 State : clean, degraded Active Devices : 2 Working Devices : 2 Failed Devices : 1 Spare Devices : 0 . . Number Major Minor RaidDevice State 0 3 1 0 active sync /dev/hda1 1 0 0 - removed 2 33 65 2 active sync /dev/hdf1 You'll notice in this case I had /dev/hdb fail. I replaced it with a new drive with the same capacity and was able to add it back to the array. The first step is to partition the new drive just like when first creating the array. Then you can simply add the partition back to the array and watch the status as the data is rebuilt onto the newly replace drive. # /sbin/mdadm /dev/md0 -a /dev/hdb1 # /sbin/mdadm --detail /dev/md0 Update Time : Wed Jun 15 12:11:23 2005 State : clean, degraded, recovering Active Devices : 2 Working Devices : 3 Failed Devices : 0 Spare Devices : 1 Layout : left-symmetric Chunk Size : 64K Rebuild Status : 2% complete . . During the rebuild process the system performance may be somewhat impacted but the data should remain in-tact. -------------------------------------------------------------------------------- - Expanding an Array/Filesytem The answer to how to expand a RAID-5 array is very simple: You can't. I'm used to working with a NetApp Filer where you plug in a drive, type a simple command and that drive was added to the existing RAID array, no muss, no fuss. While you can't add space to a RAID-5 array directly in Linux you CAN add space to an existing Logical Volume and then expand the ext3 filesytem on top of it. That's the main reason you want to run LVM on top of RAID. Before you start it's probably a good idea to back up your data just in case something goes wrong. Assuming you want your data to be protected from a drive failing you'll need to create another RAID array per the instructions above. In my case I called it /dev/md1 so after partitioning I can create the array: # /sbin/mdadm --create --verbose /dev/md1 --level=5 --raid-devices=3 \ /dev/hde1 /dev/hdg1 /dev/hdh1 # /sbin/mdadm --detail /dev/md1 The next couple steps will add the space from the new RAID array to the space available to be used by Logical Volumes. You then check to see how many Physical Extents you have and add them to the Logical Volume you're using. Remember that since you can have multiple Logical Volumes on top of a physical RAID array you need to do this extra step. # vgextend lvm-raid /dev/md1 # vgdisplay lvm-raid . . . Alloc PE / Size 57235 / 223.57 GB Free PE / Size 57235 / 223.57 GB # lvextend -l 57235 lvm-raid -n lvm0 There, you now have a much larger Logical Volume which is using space on two separate RAID arrays. You're not done yet, you now have to extend your filesystem to make use of all that new space. Fortunately this is easy on FC4 and RHEL4 since there is a command to expand a ext3 filesytem without even unmounting it! Be patient, expanding the file system takes a while. # lvdisplay /dev/lvm-raid/lvm0 . . LV Size 447.14 GB . # df /raid-array Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/lvm--raid-lvm0 230755476 40901348 178132400 19% /raid-array # ext2online /dev/lvm-raid1/lvm0 447g Get yourself a sandwich # df /raid-array Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/lvm--raid-lvm0 461510952 40901348 40887876 9% /raid-array Congrats, you now have more space. Now go fill it with something. Note 2: ======= Creating a LVM in Linux I am sure anybody who have used windows (2000 and above) have come across the term dynamic disks. Linux/Unix also have its own dynamic disk management called LVM. What is an LVM ? LVM stands for Logical Disk Manager which is the fundamental way to manage UNIX/Linux storage systems in a scalable manner. An LVM abstracts disk devices into pools of storage space called Volume Groups. These volume groups are in turn subdivided into virtual disks called Logical Volumes. The logical volumes may be used just like regular disks with filesystem created on them and mounted in the Unix/Linux filesystem tree. The logical volumes can span multiple disks. Even though a lot of companies have implemented their own LVM's for *nixes, the one created by Open Software Foundation (OSF) was integrated into many Unix systems which serves as a base for the Linux implementation of LVM. Note: Sun Solaris ships with LVM from Veritas which is substantially different from the OSF implementation. Benefits of Logical Volume Management LVM created in conjunction with RAID can provide fault tolerance coupled with scalability and easy disk management. Create a logical volume and filesystem which spans multiple disks. By creating virtual pools of space, an administrator can create dozens of small filesystems for different projects and add space to them as needed without (much) disruption. When a project ends, he can remove the space a nd put it back into the pool of free space. Note : Before you move to implement LVM's in linux, make sure your kernel is 2.4 and above. Or else you will have to recompile your kernel from source to include support for LVM. LVM Creation To create a LVM, we follow a three step process. Step One : We need to select the physical storage resources that are going to be used for LVM. Typically, these are standard partitions but can also be Linux software RAID volumes that we've created. In LVM terminology, these storage resources are called "physical volumes" (eg: /dev/hda1, /dev/hda2 ... etc). Our first step in setting up LVM involves properly initializing these partitions so that they can be recognized by the LVM system. This involves setting the correct partition type (usually using the fdisk command, and entering the type of partition as 'Linux LVM' - 0x8e ) if we're adding a physical partition; and then running the pvcreate command. # pvcreate /dev/hda1 /dev/hda2 /dev/hda3 # pvscan The above step creates a physical volume from 3 partitions which I want to initialize for inclusion in a volume group. Step Two : Creating a volume group. You can think of a volume group as a pool of storage that consists of one or more physical volumes. While LVM is running, we can add physical volumes to the volume group or even remove them. First initialize the /etc/lvmtab and /etc/lvmtab.d files by running the following command: # vgscan Now you can create a volume group and assign one or more physical volumes to the volume group. # vgcreate my_vol_grp /dev/hda1 /dev/hda2 Behind the scenes, the LVM system allocates storage in equal-sized "chunks", called extents. We can specify the particular extent size to use at volume group creation time. The size of an extent defaults to 4Mb, which is perfect for most uses.You can use the -s flag to change the size of the extent. The extent affects the minimum size of changes which can be made to a logical volume in the volume group, and the maximum size of logical and physical volumes in the volume group. A logical volume can contain at most 65534 extents, so the default extent size (4 MB) limits the volume to about 256 GB; a size of 1 TB would require extents of atleast 16 MB. So to accomodate a 1 TB size, the above command can be rewriten as : # vgcreate -s 16M my_vol_grp /dev/hda1 /dev/hda2 You can check the result of your work at this stage by entering the command: # vgdisplay This command displays the total physical extends in a volume group, size of each extent, the allocated size and so on. Step Three : This step involves the creation of one or more "logical volumes" using our volume group storage pool. The logical volumes are created from volume groups, and may have arbitary names. The size of the new volume may be requested in either extents (-l switch) or in KB, MB, GB or TB ( -L switch) rounding up to whole extents. # lvcreate -l 50 -n my_logical_vol my_vol_grp The above command allocates 50 extents of space in my_vol_grp to the newly created my_logical_vol. The -n switch specifies the name of the logical volume we are creating. Now you can check if you got the desired results by using the command : # lvdisplay which shows the information of your newly created logical volume. Once a logical volume is created, we can go ahead and put a filesystem on it, mount it, and start using the volume to store our files. For creating a filesystem, we do the following: # mke2fs -j /dev/my_vol_grp/my_logical_vol The -j signifies journaling support for the ext3 filesystem we are creating. Mount the newly created file system : # mount /dev/my_vol_grp/my_logical_vol /data Also do not forget to append the corresponding line in the /etc/fstab file: #File: /etc/fstab /dev/my_vol_grp/my_logical_vol /data ext3 defaults 0 0 Now you can start using the newly created logical volume accessable at /data mount point. Next : Resizing Logical Volumes Some more on Linux LVM commands: Linux vgcreate command: ======================= Linux / Unix Command: vgcreate Command Library NAME vgcreate - create a volume group SYNOPSIS vgcreate [-A|--autobackup {y|n}] [-d|--debug] [-h|--help] [-l|--maxlogicalvolumes MaxLogicalVolumes] [-p|--maxphysicalvolumes MaxPhysicalVolumes] [-s|--physicalextentsize PhysicalExtentSize[kKmMgGtT]] [-v|--verbose] [--version] VolumeGroupName PhysicalVolumePath [PhysicalVolumePath...] DESCRIPTION vgcreate creates a new volume group called VolumeGroupName using the block special device PhysicalVolumePath previously configured for LVM with pvcreate(8). OPTIONS -A, --autobackup {y|n} Controls automatic backup of VG metadata after the change (see vgcfgbackup(8)). Default is yes. -d, --debug Enables additional debugging output (if compiled with DEBUG). -h, --help Print a usage message on standard output and exit successfully. -l, --maxlogicalvolumes MaxLogicalVolumes Sets the maximum possible logical volume count. More logical volumes can't be created in this volume group. Absolute maximum is 256. -p, --maxphysicalvolumes MaxPhysicalVolumes Sets the maximum possible physical volume count. More physical volumes can't be included in this volume group. Absolute maximum is 256. -s, --physicalextentsize PhysicalExtentSize[kKmMgGtT] Sets the physical extent size on physical volumes of this volume group. A size suffix (k for kilobytes up to t for terabytes) is optional, megabytes is the default if no suffix is present. Values can be from 8 KB to 16 GB in powers of 2. The default of 4 MB causes maximum LV sizes of ~256GB because as many as ~64k extents are supported per LV. In case larger maximum LV sizes are needed (later), you need to set the PE size to a larger value as well. Later changes of the PE size in an existing VG are not supported. -v, --verbose Display verbose runtime information about vgcreate's activities. --version Display tool and IOP version and exit successfully. EXAMPLES To create a volume group named test_vg using physical volumes /dev/hdk1, /dev/hdl1, and /dev/hdm1 with default physical extent size of 4MB: # vgcreate test_vg /dev/sd[k-m]1 To create a volume group named test_vg using physical volumes /dev/hdk1, and /dev/hdl1 with default physical extent size of 4MB: # vgcreate test_vg /dev/sdk1 /dev/sdl1 NOTE: If you are using devfs it is essential to use the full devfs name of the device rather than the symlinked name in /dev. so: the above could be # vgcreate test_vg /dev/scsi/host1/bus0/target[1-3]/lun0/part1 Linux vgextend command: ======================= Linux / Unix Command: vgextend Command Library NAME vgextend - add physical volumes to a volume group SYNOPSIS vgextend [-A|--autobackup{y|n}] [-d|--debug] [-h|--help] [-v|--verbose] VolumeGroupName PhysicalVolumePath [PhysicalVolumePath...] DESCRIPTION vgextend allows you to add one or more initialized physical volumes ( see pvcreate(8) ) to an existing volume group to extend it in size. OPTIONS -A, --autobackup y/n Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ). Default is yes. -d, --debug Enables additional debugging output (if compiled with DEBUG). -h, --help Print a usage message on standard output and exit successfully. -v, --verbose Gives verbose runtime information about lvextend's activities. Examples # vgextend vg00 /dev/sda4 /dev/sdn1 tries to extend the existing volume group "vg00" by the new physical volumes (see pvcreate(8) ) "/dev/sdn1" and /dev/sda4". Linux pvcreate command: ======================= Linux / Unix Command: pvcreate Command Library NAME pvcreate - initialize a disk or partition for use by LVM SYNOPSIS pvcreate [-d|--debug] [-f[f]|--force [--force]] [-y|--yes] [-h|--help] [-v|--verbose] [-V|--version] PhysicalVolume [PhysicalVolume...] DESCRIPTION pvcreate initializes PhysicalVolume for later use by the Logical Volume Manager (LVM). Each PhysicalVolume can be a disk partition, whole disk, meta device, or loopback file. For DOS disk partitions, the partition id must be set to 0x8e using fdisk(8), cfdisk(8), or a equivalent. For whole disk devices only the partition table must be erased, which will effectively destroy all data on that disk. This can be done by zeroing the first sector with: # dd if=/dev/zero of=PhysicalVolume bs=512 count=1 Continue with vgcreate(8) to create a new volume group on PhysicalVolume, or vgextend(8) to add PhysicalVolume to an existing volume group. OPTIONS -d, --debug Enables additional debugging output (if compiled with DEBUG). -f, --force Force the creation without any confirmation. You can not recreate (reinitialize) a physical volume belonging to an existing volume group. In an emergency you can override this behaviour with -ff. In no case case can you initialize an active physical volume with this command. -s, --size Overrides the size of the physical volume which is normally retrieved. Useful in rare case where this value is wrong. More useful to fake large physical volumes of up to 2 Terabyes - 1 Kilobyte on smaller devices for testing purposes only where no real access to data in created logical volumes is needed. If you wish to create the supported maximum, use "pvcreate -s 2147483647k PhysicalVolume [PhysicalVolume ...]". All other LVM tools will use this size with the exception of lvmdiskscan(8) -y, --yes Answer yes to all questions. -h, --help Print a usage message on standard output and exit successfully. -v, --verbose Gives verbose runtime information about pvcreate's activities. -V, --version Print the version number on standard output and exit successfully. Example Initialize partition #4 on the third SCSI disk and the entire fifth SCSI disk for later use by LVM: # pvcreate /dev/sdc4 /dev/sde >>>> Installing a Cluster filesystem on Linux: ============================================== Suppose, in this example, we have 2 Linux nodes, and we want to create a scsi attached shared disksystem. We plan to use OCFS2 as the Clustered FileSystem. First, we partition the disks to raw volumes. This example uses /dev/sdb (an empty SCSI disk with no existing partitions) to create a single partition for the entire disk (36 GB). We will do this for all disks. Ex: # fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 4427. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sdb: 255 heads, 63 sectors, 4427 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-4427, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-4427, default 4427): Using default value 4427 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks. Now verify the new partition: Ex: # fdisk -l /dev/sdb Disk /dev/sdb: 36.4 GB, 36420075008 bytes 255 heads, 63 sectors/track, 4427 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 4427 35559846 83 Linux Repeat the above steps for each disk to be partitioned. Disk partitioning should be done from one node only. When finished partitioning, run the 'partprobe' command as root on each of the remaining cluster nodes in order to assure that the new partitions are configured. Ex: # partprobe Oracle Cluster File System (OCFS) Release 2 ------------------------------------------- OCFS2 is a general-purpose cluster file system that can be used to store Oracle Clusterware files, Oracle RAC database files, Oracle software, or any other types of files normally stored on a standard filesystem such as ext3. This is a significant change from OCFS Release 1, which only supported Oracle Clusterware files and Oracle RAC database files. Obtain OCFS2 OCFS2 is available free of charge from Oracle as a set of three RPMs: a kernel module, support tools, and a console. There are different kernel module RPMs for each supported Linux kernel so be sure to get the OCFS2 kernel module for your Linux kernel. OCFS2 kernel modules may be downloaded from http://oss.oracle.com/projects/ocfs2/files/ and the tools and console may be downloaded from http://oss.oracle.com/projects/ocfs2-tools/files/. To determine the kernel-specific module that you need, use uname -r. # uname -r 2.6.9-22.ELsmp For this example I downloaded: ocfs2console-1.0.3-1.i386.rpm ocfs2-tools-1.0.3-1.i386.rpm ocfs2-2.6.9-22.ELsmp-1.0.7-1.i686.rpm >>> Install OCFS2 as root on each cluster node # rpm -ivh ocfs2console-1.0.3-1.i386.rpm \ ocfs2-tools-1.0.3-1.i386.rpm \ ocfs2-2.6.9-22.ELsmp-1.0.7-1.i686.rpm Preparing... ########################################### [100%] 1:ocfs2-tools ########################################### [ 33%] 2:ocfs2console ########################################### [ 67%] 3:ocfs2-2.6.9-22.ELsmp ########################################### [100%] Configure OCFS2 Run ocfs2console as root: # ocfs2console Now a Graphical interface will appear: Select Cluster ? Configure Nodes Click on Add and enter the Name and IP Address of each node in the cluster Once all of the nodes have been added, click on Cluster --> Propagate Configuration. This will copy the OCFS2 configuration file to each node in the cluster. You may be prompted for root passwords as ocfs2console uses ssh to propagate the configuration file. Leave the OCFS2 console by clicking on File --> Quit. It is possible to format and mount the OCFS2 partitions using the ocfs2console GUI; however, this guide will use the command line utilities. >>> Enable OCFS2 to start at system boot: As root, execute the following command on each cluster node to allow the OCFS2 cluster stack to load at boot time: /etc/init.d/o2cb enable Ex: # /etc/init.d/o2cb enable Writing O2CB configuration: OK Loading module "configfs": OK Mounting configfs filesystem at /config: OK Loading module "ocfs2_nodemanager": OK Loading module "ocfs2_dlm": OK Loading module "ocfs2_dlmfs": OK Mounting ocfs2_dlmfs filesystem at /dlm: OK Starting cluster ocfs2: OK >>> Create a mount point for the OCFS filesystem As root on each of the cluster nodes, create the mount point directory for the OCFS2 filesystem Ex: # mkdir /u03 >>> Create the OCFS2 filesystem on the unused disk partition: The example below creates an OCFS2 filesystem on the unused /dev/sdc1 partition with a volume label of "/u03" (-L /u03), a block size of 4K (-b 4K) and a cluster size of 32K (-C 32K) with 4 node slots (-N 4). See the OCFS2 Users Guide for more information on mkfs.ocfs2 command line options. Ex: # mkfs.ocfs2 -b 4K -C 32K -N 4 -L /u03 /dev/sdc1 mkfs.ocfs2 1.0.3 Filesystem label=/u03 Block size=4096 (bits=12) Cluster size=32768 (bits=15) Volume size=36413280256 (1111245 clusters) (8889960 blocks) 35 cluster groups (tail covers 14541 clusters, rest cover 32256 clusters) Journal size=33554432 Initial number of node slots: 4 Creating bitmaps: done Initializing superblock: done Writing system files: done Writing superblock: done Writing lost+found: done mkfs.ocfs2 successful >>> Mount the OCFS2 filesystem: Since this filesystem will contain the Oracle Clusterware files and Oracle RAC database files, we must ensure that all I/O to these files uses direct I/O (O_DIRECT). Use the "datavolume" option whenever mounting the OCFS2 filesystem to enable direct I/O. Failure to do this can lead to data loss in the event of system failure. Ex: # mount -t ocfs2 -L /u03 -o datavolume /u03 Notice that the mount command uses the filesystem label (-L u03) used during the creation of the filesystem. This is a handy way to refer to the filesystem without having to remember the device name. To verify that the OCFS2 filesystem is mounted, issue the mount command or run df: # mount -t ocfs2 /dev/sdc1 on /u03 type ocfs2 (rw,_netdev,datavolume) # df /u03 Filesystem 1K-blocks Used Available Use% Mounted on /dev/sdc1 35559840 138432 35421408 1% /u03 The OCFS2 filesystem can now be mounted on the other cluster nodes. To automatically mount the OCFS2 filesystem at system boot, add a line similar to the one below to /etc/fstab on each cluster node: LABEL=/u03 /u03 ocfs2 _netdev,datavolume,nointr 0 0 Create the directories for shared files CRS files mkdir /u03/oracrs chown oracle:oinstall /u03/oracrs chmod 775 /u03/oracrs Database files mkdir /u03/oradata chown oracle:oinstall /u03/oradata chmod 775 /u03/oradata >>>>SWAP space: =============== >>> Solaris: ============ -- View swap space: -- ---------------- The /usr/sbib/swap utility provides a method of adding, deleting, and monitoring the system swap areas used by the memory manager. # swap -l The -l option can be used to list swap space. The system displays information like: swapfile dev swaplo blocks free /dev/dsk/c0t0d0s3 136,3 16 302384 302384 path : the pathname for the swaparea. In this example the pathname is swapfile. dev : the major/minor device number is in decimal if it's a block special device; zeroes otherwise swaplo: the offset in 512 byte blocks where usable swapspace begins blocks: size in 512 byte blocks. The swaplen value can be adjusted as a kernel parameter. free : free 512 byte blocks. The swap -l command does not include physical memory in it's calculation of swap space. # swap -s The -s option can be used to list a summary of the system's virtual swap space. total: 31760k bytes allocated + 5952k reserved = 37712k used, 202928k available These numbers are in 1024 byte blocks. -- Add swap area's: -- ---------------- There are 2 methods available for adding more swap to your system. (1) create a secondary swap partition: (2) create a swapfile in an existing UFS file system (1) Creating a secondary swap partition requires additional unused diskspace. You must use the format coommand to create a new partition and filesystem on a disk. Suppose we have the /data directory currently on slice 5 and is 200MB in size. - free up the /data directory (save the contents to another location ) - unmount /dev/dsk/c0t0d0s5 - use format: Enter partition id tag (unassigned): swap Enter partition permission flags (wm): wu Enter new starting cil(3400): return Enter partition size: return Then label the disk as follows Partition> la Ready to label disk? y - Run the newfs command on that partition to create a fresh filesystem on slice 5 newfs /dev/rdsk/c0t0d0s5 - Make an entry to the /etc/vfstab file - Run the swapadd script to add the swap to your system as follows: /sbin/swapadd - verify that the swap has been added with swap -l (2) The other method to add more swap space is to use the mkfile and swap commands to designate a part of an existing UFS filesystem as a supplementary swap area. You can use it as a temporary solution, or as a solution for longer duration as well, but a swap file is just another file in the filesystem, so you cannot unmount that filesystem while the swapfile is in use. The following steps enable you to add more swap space without repartitioning a disk. - As root, use df -k to locate a suitable filesystem. Suppose /data looks allright for this purpose - Use the mkfile command to add a 50MB swapfile named swapfile in the /data partition. mkfile 50m /data/swapfile - use ls -l /data to verify that the file has been created. Notice that the sticky bit has automatically been set. - Activate the swaparea with the swap command as follows: /usr/sbin/swap -a /data/swapfile - verify that the swap has been added with swap -l The system responds something like this: swapfile dev swaplo blocks free /dev/dsk/c0t0d0s3 136,3 16 302384 302384 /data/swapfile - 16 102384 102384 If this will be a permanent swaparea, add an entry for the swapfile in the vfstab file. /data/swapfile - - swap - no - -- Removing a swapfile: -- -------------------- As root use the swap -d command to remove a swaparea is follows swap -d /dev/dsk/c0t0d0s5 for a swap partition swap -d /data/swapfile for a swapfile Use the swap -l command to verify that the swaparea is gone. Edit the /etc/vfstab file and delete the entry for the swapfile if neccessary. In case of a swapfile, just remove the file with rm /data/swapfile -- Creating a Temporary File System: -- --------------------------------- Create a directory which will serve as the mount point for the TMPFS file system. There is no command such as newfs to create a TMPFS file system before mounting it. The TMPFS file system actually gets created in RAM when you execute the mount command and specify a filesystem type of TMPFS. The following example creates a new directory /export/data and mounts a TMPFS filesystem, limiting it to 25MB. mount -F tmpfs -o size=25m swap /export/data >>>> AIX: ========= The installation creates a default paging logical volume, hd6, on drive hdisk0, also referred as primary paging space. The reports from the "vmstat" and "topas" commands indicate the amount of paging space I/O that is taking place. Showing paging space: --------------------- The lsps -a command provides a snapshot of the current utilization of each of the paging spaces on the system, while the lsps -s command provides a summary of the total active paging space and its current utilization. # lsps -a Page Space Physical Volume Volume Group Size %Used Active Auto Type paging00 hdisk1 rootvg 80MB 1 yes yes lv hd6 hdisk1 rootvg 256MB 1 yes yes lv The /etc/swapspaces file specifies the paging-space devices that are activated by the swapon -a command. A pagingspace is added to this file when its created by the mkps -a command, and removed from the file when rmps is used. You can also try: # pstat -s Managing Paging space: ---------------------- The following commands are used to manage paging space: chps : changes the attributes of a paging space lsps : displays the characteristics of a paging space pstat -s : displays the characteristics of a paging space mkps : creates an additional paging space rmps : removes an inactive paging space swapon : activates a paging space swapoff : deactivates one or more paging spaces Managing Paging behaviour: -------------------------- Note 1: ------- There are several page space allocation policies available in AIXr. - Deferred Page Space Allocation (DPSA) - Late Page Space Allocation (LPSA) - Early Page Space Allocation (EPSA) - Deferred page space allocation The deferred page space allocation policy is the default policy in AIX. Late page space allocation LPSA The AIX operating system provides a way to enable the late page space allocation policy, which means that the disk block for a paging space page is only allocated when the corresponding in-memory page is touched. Early page space allocation EPSA If you want to ensure that a process will not be killed due to low paging conditions, this process can preallocate paging space by using the early page space allocation policy. Choosing between LPSA and DPSA with the vmo command: Using the "vmo -o defps" command enables turning the deferred page space allocation, or DPSA, on or off in order to preserve the late page space allocation policy, or LPSA. Paging space and virtual memory The vmstat command (avm column), ps command (SIZE, SZ), and other utilities report the amount of virtual memory actually accessed because with DPSA, the paging space might not get touched. Note 2: ------- High paging space during online backup on AIX Technote (FAQ) Question During an online backup, you might see a high paging space usage, which will not be released even after online backup completion in DB2r Universal DatabaseT (DB2 UDB) Version 8. This problem does not occur during an offline backup. Cause Paging space usage increases during online database backups on AIXr 5.2 and 5.3. This is an expected behavior from ML4 of AIX 5LT 5.2 and ML1 of AIX 5L 5.3 onwards. During an online database backup operation, file pages are loaded into memory by AIX in order for the backup processes to read them. If DB2 UDB runs out of memory, AIX has to free memory to fit additional file pages into RAM. It does this by writing DB2 UDB shared memory segments out to paging space. When the backup completes, these pages in paging space are not released because they are still in use by the other DB2 UDB processes. They will only be freed when the database is deactivated. Answer To free up paging space without stopping the database, use the AIX tuning parameter lru_file_repage. It affects Virtual Memory Manager (VMM) page replacement. By setting this parameter to 0, you force the system to only free file pages when you run out of memory and to not write working pages out to paging space. This will stop paging use from increasing. To set this parameter to zero, use vmo command. For example: vmo -o lru_file_repage=0 This parameter was introduced in ML4 of AIX5L 5.2 and ML1 of AIX5L 5.3. The default value is 1. Note 3: ------- Warning: this is a trick. trick I have found to "reset" paging is to increase page space by 1 PP and then decrease it by 1 PP. Decreasing the size of paging space causes the S to create a new page space, copy everything to the new space, delete the old recreate it at the new size. You'll need enough free disk space to create a new page space. Note 4: ------- The VM kernel parameters minperm% and maxperm% affect the use of physical memory that can be used for file system caching and govern when computational pages of memory get paged (swapped) to paging space. If these values have been changed recently, that could explain the results that you describe. When the (dynamic) value of numperm% drops below minperm%, it will cause the paging of computational pages to page space. It would be interesting to know if the minperm% and maxperm% values were changed and, if so, what the former and current values are. Note 5: ------- Show paging space usage: # lsps -a # lsps -s Increase paging space: # chps -s 32 hd6 32x32MB where we increased the size of hd6 with 30 LP's. Reducing paging space: # chps -d 1 hd6 where we decreased the size of hd6 with 1 LP. mkps: ----- To Add a Logical Volume for Additional Paging Space mkps [ -a ] [ -n ] [ -t lv ] -s LogicalPartitions VolumeGroup [ PhysicalVolume ] To create a paging space in volume group myvg that has four logical partitions and is activated immediately and at all subsequent system restarts, enter: # mkps -a -n -s 4 myvg To create a paging space in rootvg on hdisk0 # mkps -a -n -s 30 rootvg hdisk0 rmps: ----- Before AIX 5L: Active paging spaces cannot be removed. It must first be made inactive. Use the chps command so the paging space is not used on the next restart. After reboot, the paging space is inactive and can be removed with the rmps command. AIX 51 or later: Use the swapoff command to dynamically deactive the paging space, then use the rmps command. # swapoff /dev/paging03 # rmps paging03 chps: ----- As from AIX 5L you can use the chps -d command, to decrease the size of a paging space, without having to deactive it, then reboot, then remove, and then recreate it with a smaller size. Decrease it with a number of LP's like: # chps -d 2 paging03 chps -a {y|n} paging00 : specifies that the paging space paging00 is active (y) or inactive (n) at subsequent system restarts. chps -s 10 paging02 : adds ten LPs to paging02 without rebooting. chps -d 5 paging01 : removes five LPs from paging01 without rebooting. chps -d 50 hd6 : removes fifty LPs from hd6 without rebooting. List the active paging spaces: ------------------------------ # lsps -a or lsps -s # pg /etc/swapspaces hd6: dev=/dev/hd6 paging00 dev=/dev/paging00 Note on paging on AIX: ---------------------- If the amount of paging space is less than the amount of real memory in the system, it's possible the system will run out of paging space before real memory. This is because AIX performs early allocation of page space. When a page is referenced, real memory and paging space blocks are allocated. If there are less paging space blocks then real memory pages, paging space will be exhaused before all of real memory is consumed. Early allocation algorithm The second operating system's paging-space-slot-allocation method is intended for use in installations where this situation is likely, or where the cost of failure to complete is intolerably high. Aptly called early allocation, this algorithm causes the appropriate number of paging-space slots to be allocated at the time the virtual-memory address range is allocated, for example, with the malloc() subroutine. If there are not enough paging-space slots to support the malloc() subroutine, an error code is set. The early-allocation algorithm is invoked as follows: # export PSALLOC=early This example causes all future programs to be executed in the environment to use early allocation. The currently executing shell is not affected. Early allocation is of interest to the performance analyst mainly because of its paging-space size implications. If early allocation is turned on for those programs, paging-space requirements can increase many times. Whereas the normal recommendation for paging-space size is at least twice the size of the system's real memory, the recommendation for systems that use PSALLOC=early is at least four times the real memory size. Actually, this is just a starting point. Analyze the virtual storage requirements of your workload and allocate paging spaces to accommodate them. As an example, at one time, the AIXwindows server required 250 MB of paging space when run with early allocation. When using PSALLOC=early, the user should set a handler for the following SIGSEGV signal by pre-allocating and setting the memory as a stack using the sigaltstack function. Even though PSALLOC=early is specified, when there is not enough paging space and a program attempts to expand the stack, the program may receive the SIGSEGV signal. Deferred allocation algorithm The third operating system's paging-space-slot-allocation method is the default beginning with AIX 4.3.2 Deferred Page Space Allocation (DPSA) policy delays allocation of paging space until it is necessary to page out the page, which results in no wasted paging space allocation. This method can save huge amounts of paging space, which means disk space. Best to use Deffered. On some systems, paging space might not ever be needed even if all the pages accessed have been touched. This situation is most common on systems with very large amount of RAM. However, this may result in overcommitment of paging space in cases where more virtual memory than available RAM is accessed. To disable DPSA and preserve the Late Page Space Allocation policy, run the following command: # vmo -o defps=0 To activate DPSA, run the following command: # vmo -o defps=1 In general, system performance can be improved by DPSA, because the overhead of allocating page space after page faults is avoided the. Paging space devices need less disk space if DPSA is used >>>> Linux: =========== -- Check the swapspace: # cat /proc/meminfo # cat /proc/swaps # /sbin/swapon -s -- Creating swap space using a partition Create a partition of the proper size using fdisk. Format the partition, for example # mkswap -c /dev/hda4 Enable the swap, for example # swapon /dev/hd4 If you want the swap space enabled after boot, include the appropriate entry into /etc/fstab, for example /dev/hda4 swap swap defaults 0 0 If you need to disable the swap, you can do it with # swapoff /dev/hda4 -- Creating swap space using a swapfile Create a file with the size of your swapfile # dd if=/dev/zero of=/swapfile bs=1024 count=8192 Setup the file with the command # mkswap /swapfile 8192 Enable the swap with the command # swapon /swapfile When you are done using the swapfile, you can turn it off and remove with # swapoff /swapfile # rm /swapfile >>>> Volume group, logical volumes, and filesystem commands in HPUX: ==================================================================== >>>> Filesystems in HPUX: ------------------------- HFS : used at HP-UX < v. 10 VxFS: used at HP-UX >= v. 10 Ofcourse, CDFS (cdroms), and other filesystem types, are supported. HP-UX's implementation of a journaled file system, also known as JFS, is based on the version from VERITAS Software Inc. called VxFS. Up through the 10.0 release of HP-UX, HFS has been the only available locally mounted read/write file system. Beginning at 10.01, you also have the option of using VxFS. (Note, however, that VxFS cannot be used as the root file system.) As compared to HFS, VxFS allows much shorter recovery times in the event of system failure. It is also particularly useful in environments that require high performance or deal with large volumes of data. This is because the unit of file storage, called an extent, can be multiple blocks, allowing considerably faster I/O than with HFS. It also provides for minimal downtime by allowing online backup and administration - that is, unmounting the file system will not be necessary for certain tasks. You may not want to configure VxFS, though, on a system with limited memory because VxFS memory requirements are considerably larger than that for HFS. Basic VxFS functionality is included with the HP-UX operating system software. Additional enhancements to VxFS are available as a separately orderable product called HP "OnlineJFS", product number B5117AA (Series 700) and B3928AA (Series 800). >>>> How to create a filesystem in HP-UX: an outline: ----------------------------------------------------- -- Task 1. Estimate the Size Required for the Logical Volume -- Task 2. Determine If Sufficient Disk Space Is Available for the Logical Volume within Its Volume Group Use the vgdisplay command to calculate this information. vgdisplay will output data on one or more volume groups, including the physical extent size (under PE Size (Mbytes)) and the number of available physical extents (under Free PE). By multiplying these two figures together, you will get the number of megabytes available within the volume group. See vgdisplay(1M) for more information. -- Task 3. Add a Disk to a Volume Group If Necessary If there is not enough space within a volume group, you will need to add a disk to a volume group. To add a disk to an existing volume group, use pvcreate(1M) and vgextend(1M). You can also add a disk by creating a new volume group with pvcreate(1M) and vgcreate(1M). -- Task 4. Create the Logical Volume Use lvcreate to create a logical volume of a certain size in the above volume group. See lvcreate(1M) for details. Use lvcreate as in the following example: Create a logical volume of size 100 MB in volume group /dev/vg03: # lvcreate -L 100 /dev/vg03 -- Task 5. Create the New File System Create a file system using the newfs command. Note the use of the character device file. For example: # newfs -F hfs /dev/vg02/rlvol1 If you do not use the -F FStype option, by default, newfs creates a file system based on the content of your /etc/fstab file. If there is no entry for the file system in /etc/fstab, then the file system type is determined from the file /etc/default/fs. For information on additional options, see newfs(1M). $ cat /etc/default/fs LOCAL=vxfs For HFS, you can explicitly specify that newfs create a file system that allows short file names or long file names by using either the -S or -L option. By default, these names will as short or long as those allowed by the root file system. Short file names are 14 characters maximum. Long file names allow up to 255 characters. Generally, you use long file names to gain flexibility in naming files. Also, files created on other systems that use long file names can be moved to your system without being renamed. When creating a VxFS file system, file names will automatically be long. After creating a filesystem, you need to mount it to make it accesible, for example like: -- Task 6. mount the new local file system: Choose an empty directory to serve as the mount point for the file system. Use the mkdir command to create the directory if it does not currently exist. For example, enter: # mkdir /test Mount the file system using the mount command. Use the block device file name that contains the file system. You will need to enter this name as an argument to the mount command. For example, enter # mount /dev/vg01/lvol1 /test Note: The newfs command is a "friendly" front-end to the mkfs command (see mkfs(1M)). The newfs command calculates the appropriate parameters and then builds the file system by invoking the mkfs command. >>>> HP-UX LVM commands: ======================== -- vgdisplay: -- ---------- Displays information about volume groups. Examples: # vgdisplay # vgdisplay -v vgdatadir -- pvdisplay: -- ---------- Display information about physical volumes within LVM volume group. EXAMPLES Display the status and characteristics of a physical volume: # pvdisplay /dev/dsk/c1t0d0 Display the status, characteristics, and allocation map of a physical volume: # pvdisplay -v /dev/dsk/c2t0d0 # pvdisplay /dev/dsk/c102t9d3 --- Physical volumes --- PV Name /dev/dsk/c43t9d3 PV Name /dev/dsk/c102t9d3 Alternate Link VG Name /dev/vgora_e1atlas_data PV Status available Allocatable yes VGDA 2 Cur LV 2 PE Size (Mbytes) 4 Total PE 1668 Free PE 102 Allocated PE 1566 Stale PE 0 IO Timeout (Seconds) default Autoswitch On -- lvdisplay: -- ---------- Displays information about logical volumes. Examples: # lvdisplay lvora_p0gencfg_apps # lvdisplay -v lvora_p0gencfg_apps # lvdisplay -v /dev/vg00/lvol2 # lvdisplay /dev/vgora_e0etea_data/lvora_e0etea_data --- Logical volumes --- LV Name /dev/vgora_e0etea_data/lvora_e0etea_data VG Name /dev/vgora_e0etea_data LV Permission read/write LV Status available/syncd Mirror copies 1 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 17020 Current LE 4255 Allocated PE 8510 Stripes 0 Stripe Size (Kbytes) 0 Bad block on Allocation strict IO Timeout (Seconds) default -- vgchange: -- --------- Set volume group availability. This command activates or deactivates one or more volume groups as specified by the -a option, namely y or n. Activate a volume group: # vgchange -a y /dev/vg03 Deactivate a volume group: # vgchange -a n /dev/vg03 -- vgcreate: -- --------- /usr/sbin/vgcreate [-f] [-A autobackup] [-x extensibility] [-e max_pe] [-l max_lv] [-p max_pv] [-s pe_size] [-g pvg_name] vg_name pv_path ... The vgcreate command creates a new volume group. vg_name is a symbolic name for the volume group and must be used in all references to it. vg_name is the path to a directory entry under /dev that must contain a character special file named group. Except for the group entry, the vg_name directory should be empty. The vg_name directory and the group file have to be created by the user (see lvm(7)). vgcreate leaves the volume group in an active state. EXAMPLES 1. Create a volume group named /dev/vg00 containing two physical volumes with extent size set to 2 Mbytes. If directory /dev/vg00 exists with the character special file group, the volume group is created: # vgcreate -s 2 /dev/vg00 /dev/dsk/c1d0s2 /dev/dskc2d0s2 2. Create a volume group named /dev/vg01 that can contain a maximum of three logical volumes, with extent size set to 8 Mbytes: # vgcreate -l 3 -s 8 /dev/vg01 /dev/dsk/c4d0s2 3. Create a volume group named /dev/vg00 and a physical volume group named PVG0 with two physical volumes: # vgcreate -g PVG0 /dev/vg00 /dev/dsk/c1d0s2 /dev/dsk/c2d0s2 3. Create a volume group named /dev/vg00 containing two physical volumes with extent size set to 2 MB, from scratch. First, create the directory /dev/vg00 with the character special file called group. mkdir /dev/vg00 mknod /dev/vg00/group c 64 0x030000 The minor number for the group file should be unique among all the volume groups on the system. It has the format 0xNN0000, where NN runs from 00 to ff. The maximum value of NN is controlled by the kernel tunable parameter maxvgs. Initialize the disks using pvcreate(1M). pvcreate /dev/rdsk/c1t0d0 pvcreate /dev/rdsk/c1t2d0 Create the volume group. vgcreate -s 2 /dev/vg00 /dev/dsk/c1t0d0 /dev/dsk/c1t2d0 Note About the "dsk" and "rdsk" notation: ----------------------------------------- Physical volumes are identified by their device file names, for example /dev/dsk/cntndn /dev/rdsk/cntndn Note that each disk has a block device file and a character or raw device file, the latter identified by the r. Which name you use depends on what task you are doing with the disk. In the notation above, the first name represents the block device file while the second is the raw device file. -- Use a physical volume's raw device file for these two tasks only: -> When creating a physical volume. Here, you use the device file for the disk. For example, this might be /dev/rdsk/c3t2d0 if the disk were at card instance 3, target address 2, and device number 0. (The absence of a section number beginning with s indicates you are referring to the entire disk.) -> When restoring your volume group configuration. For all other tasks, use the block device file. For example, when you add a physical volume to a volume group, you use the disk's block device file for the disk, such as /dev/dsk/c5t3d0. -- vgextend: -- --------- Extends a volume group by adding physical volumes to it. Examples: Add physical volumes /dev/dsk/c1d0s2 and /dev/dsk/c2d0s2 to volume group /dev/vg03: # vgextend /dev/vg03 /dev/dsk/c1d0s2 /dev/dsk/c2d0s2 # vgextend vg01 /dev/dsk/c0t4d0 -- pvcreate: -- --------- Creates physical volume for use in a volume group. Examples: # pvcreate -f /dev/rdsk/c1d0s2 # ioscan -fnC disk # pvcreate -f /dev/rdsk/c0t1d0 -- lvcreate: -- --------- Create logical volume in LVM volume group The lvcreate command creates a new logical volume within the volume group specified by vg_name. Up to 255 logical volumes can be created in one volume group SYNOPSIS /etc/lvcreate [-d schedule] {-l logical_extents_number | -L logical_volume_size} [-m mirror_copies] [-n lv_path] [-p permission] [-r relocate] [-s strict] [-C contiguous] [-M mirror_write_cache] [-c vol_group_name Examples: Create a logical volume in volume group /dev/vg02: # lvcreate /dev/vg02 Create a logical volume in volume group /dev/vg03 with nonstrict allocation policy: # lvcreate -s n /dev/vg03 Create a logical volume of size 100 MB in volume group /dev/vg03: # lvcreate -L 100 /dev/vg03 Create a logical volume of size 90 MB striped across 3 disks with a stripe size of 64 KB: # lvcreate -L 90 -i 3 -I 64 /dev/vg03 -- fstyp: -- ------ Determines file system type. SYNOPSIS /usr/sbin/fstyp [-v] special The fstyp command allows the user to determine the file system type of a mounted or unmounted file system. special represents a device special file (for example: /dev/dsk/c1t6d0). The file system type is determined by reading the superblock of the supplied special file. If the superblock is read successfully, the command prints the file system type identifier on the standard output and exits with an exit status of 0. If the type of the file system cannot be identified, the error message unknown_fstyp (no matches) is printed and the exit status is 1. Exit status 2 is not currently returned, but is reserved for the situation where the file system matches more than one file system type. Any other error will cause exit status 3 to be returned. The file system type is determined by reading the superblock of the supplied special file. Examples: Find the type of the file system on a disk, /dev/dsk/c1t6d0: # fstyp /dev/dsk/c1t6d0 Find the type of the file system on a logical volume, /dev/vg00/lvol6: # fstyp /dev/vg00/lvol6 Find the file system type for a particular device file and also information about its super block: # fstyp -v /dev/dsk/c1t6d0 -- mkboot: -- ------- mkboot is used to install or update boot programs on the specified device file. The position on device at which boot programs are installed depends on the disk layout of the device. mkboot examines device to discover the current layout and uses this as the default. If the disk is uninitialized, the default is LVM layout on PA-RISC and Whole Disk on Itanium(R)-based systems. The default can be overridden by the -l, -H, or -W options. Boot programs are stored in the boot area in Logical Interchange Format (LIF), which is similar to a file system. For a device to be bootable, the LIF volume on that device must contain at least the ISL (the initial system loader) and HPUX (the HP-UX bootstrap utility) LIF files. If, in addition, the device is an LVM physical volume, the LABEL file must be present (see lvlnboot(1M) ). For the VERITAS Volume Manager (VxVM) layout on the Itanium-based system architecture, the only relevant LIF file is the LABEL file. All other LIF files are ignored. VxVM uses the LABEL file when the system boots to determine the location of the root, stand, swap, and dump volumes. EXAMPLES Install default boot programs on the specified disk, treating it as an LVM disk: # mkboot -l /dev/dsk/c0t5d0 Use the existing layout, and install only SYSLIB and ODE files and preserve the EST file on the disk: # mkboot -i SYSLIB -i ODE -p EST /dev/rdsk/c0t5d0 Install only the SYSLIB file and retain the ODE file on the disk. Use the Whole Disk layout. Use the file /tmp/bootlf to get the boot programs rather than the default. (The -i ODE option will be ignored): # mkboot -b /tmp/bootlf -i SYSLIB -i ODE -p ODE -W /dev/rdsk/c0t5d0 Install EFI utilities to the EFI partition on an Itanium-based system, treating it as an LVM or VxVM disk: # mkboot -e -l /dev/dsk/c3t1d0 Create AUTO file with the string autofile command on a device. If the device is on an Itanium-based system, the file is created as /EFI/HPUX/AUTO in the EFI partition. If the device is on a PA-RISC system, the file is created as a LIF file in the boot area. # mkboot -a "autofile command" /dev/dsk/c2t0d0 -- bdf: -- ---- Report number of free disk blocks. bdf prints out the amount of free disk space available on the specified filesystem (/dev/dsk/c0d0s0, for example) or on the file system in which the specified file ($HOME, for example) is contained. If no file system is specified, the free space on all of the normally mounted file systems is printed. The reported numbers are in kilobytes. Examples: # bdf oranh300:/home/se1223>bdf | more Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol3 434176 165632 266504 38% / /dev/vg00/lvol1 298928 52272 216760 19% /stand /dev/vg00/lvol8 2097152 1584488 508928 76% /var /dev/vg00/lvol11 524288 2440 490421 0% /var/tmp /dev/vg00/lvucmd 81920 1208 75671 2% /var/opt/universal /dev/vg00/lvol9 1048576 791925 240664 77% /var/adm /dev/vg00/lvol10 2064384 47386 1890941 2% /var/adm/crash /dev/vg00/lvol7 1548288 1262792 283320 82% /usr /dev/vg00/vsaunixlv 311296 185096 118339 61% /usr/local/vsaunix /dev/vg00/lvol4 1867776 5264 1849784 0% /tmp /dev/vg00/lvol6 1187840 757456 427064 64% /opt /dev/vg00/lvol5 262144 34784 225632 13% /home /dev/vg00/lvbeheer 131072 79046 48833 62% /beheer /dev/vg00/lvbeheertmp 655360 65296 553190 11% /beheer/tmp /dev/vg00/lvbeheerlog 524288 99374 398407 20% /beheer/log /dev/vg00/lvbeheerhistlog .. .. # bdf /tmp Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol4 1867776 5264 1849784 0% /tmp -- lvextend: -- --------- Increase number of physical extents allocated to a logical volume. /etc/lvextend {-l logical_extents_number | -L logical_volume_size | -m mirror_copies} lv_path [physical_volume_path ... | physical_vol_group_name...] lvextend increases the number of mirrored copies or the size of the lv_path parameter. The change is determined according to which command options are specified. WARNINGS The -m option cannot be used on HP-IB devices. EXAMPLES - Increase the number of the logical extents of a logical volume to one hundred: # lvextend -l 100 /dev/vg01/lvol3 - Increase the logical volume size to 400 Mbytes: # lvextend -L 400 /dev/vg01/lvol4 Allocate two mirrors (that is, three copies) for each logical extent of a logical volume: # lvextend -m 2 /dev/vg01/lvol5 -- extendfs: -- --------- Extend file system size. /etc/extendfs [-q] [-v] [-s size] special If the original hfs filesystem image created on special does not make use of all of the available space, extendfs can be used to increase the capacity of an hfs filesystem by updating the filesystem structure to include the extra space. The command-line parameter special specifies the character device special file of either a logical volume or a disk partition. If special refers to a mounted filesystem, special must be un-mounted before extendfs can be run (see mount(1M)). The root filesystem cannot be extended using the extendfs command because the root filesystem is always mounted, and extendfs only works on unmounted filesystems. EXAMPLES To increase the capacity of a filesystem created on a logical volume, enter: # umount /dev/vg00/lvol1 # lvextend -L larger_size /dev/vg00/lvol1 # extendfs /dev/vg00/rlvol1 -- fsadm: -- ------ EXAMPLES Convert a HFS file system from a nolargefiles file system to a largefiles file system: # fsadm -F hfs -o largefiles /dev/vg02/lvol1 Display HFS relevant file system statistics: # fsadm -F hfs /dev/vg02/lvol1 -- diskinfo: -- --------- diskinfo - describe characteristics of a disk device SYNOPSIS /etc/diskinfo [-b|-v] character_devicefile DESCRIPTION diskinfo determines whether the character special file named by character_devicefile is associated with a SCSI, CS/80, or Subset/80 disk drive; if so, diskinfo summarizes the disk's characteristics. Example: # diskinfo /dev/rdsk/c31t1d3 SCSI describe of /dev/rdsk/c31t1d3: vendor: IBM product id: 2105800 type: direct access size: 13671904 Kbytes bytes per sector: 512 Notes and further examples on HPUX: =================================== Examples: More on how to create a filesystem on HP-UX: ------------------------------------------------------ Example 1: ---------- Here we repeat the essentials of section 35.2: Task 1. Estimate the Size Required for the Logical Volume Task 2. Determine If Sufficient Disk Space Is Available for the Logical Volume within Its Volume Group Task 3. Add a Disk to a Volume Group If Necessary Task 4. Create the Logical Volume Use lvcreate to create a logical volume of a certain size in the above volume group. See lvcreate(1M) for details. Use lvcreate as in the following example: Create a logical volume of size 100 MB in volume group /dev/vg03: # lvcreate -L 100 /dev/vg03 -- Task 5. Create the New File System Create a file system using the newfs command. Note the use of the character device file. For example: # newfs -F hfs /dev/vg02/rlvol1 -- Task 6. mount the new local file system: Choose an empty directory to serve as the mount point for the file system. Use the mkdir command to create the directory if it does not currently exist. For example, enter: # mkdir /test Mount the file system using the mount command. Use the block device file name that contains the file system. You will need to enter this name as an argument to the mount command. For example, enter # mount /dev/vg01/lvol1 /test Example 2: ---------- This is an example of creating volume group vg01 & logical volume/partion data. Prepare for logical volume creation: root:/> mkdir /dev/vg01 root:/> mknod /dev/vg01/group c 64 0x010000 root:/> pvcreate -f /dev/rdsk/c0t5d0 Physical volume "/dev/rdsk/c0t5d0" has been successfully created. root:/> vgcreate vg01 /dev/dsk/c0t5d0 Volume group "/dev/vg01" has been successfully created. Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf root:/> vgdisplay -v vg01 root:/> lvcreate -L 100 -n data vg01 Logical volume "/dev/vg01/data" has been successfully created with character device "/dev/vg01/rdata". Create HFS file system root:/> newfs -F hfs /dev/vg01/rdata Create Journal or Veritas file system root:/> newfs -F vxfs /dev/vg02/rdata Example 3: ---------- To create a VxFS file system 12288 sectors in size on VxVM volume, enter: # mkfs -F vxfs /dev/vx/rdsk/diskgroup/volume 12288 To use mkfs to create a VxFS file system on /dev/rdsk/c0t6d0: # mkfs -F vxfs /dev/rdsk/c0t6d0 1024 To use mkfs to determine the command that was used to create the VxFS file system on /dev/rdsk/c0t6d0: # mkfs -F vxfs -m /dev/rdsk/c0t6d0 To create a VxFS file system on /dev/vgqa/lvol1, with a Version 4 disk layout and largefiles capability: # mkfs -F vxfs -o version=4,largefiles /dev/vgqa/lvol1 http://www.docs.hp.com/en/B2355-90672/index.html Example 4: ---------- Example: Creating a Logical Volume Using HP-UX Commands To create a logical volume: Select one or more disks. ioscan(1M) shows the disks attached to the system and their device file names. Initialize each disk as an LVM disk by using the pvcreate command. For example, enter # pvcreate /dev/rdsk/c0t0d0 Note that using pvcreate will result in the loss of any existing data currently on the physical volume. You use the character device file for the disk. Once a disk is initialized, it is called a physical volume. - Pool the physical volumes into a volume group. To complete this step: Create a directory for the volume group. For example: # mkdir /dev/vgnn Create a device file named group in the above directory with the mknod command. # mknod /dev/vgnn/group c 64 0xNN0000 The c following the device file name specifies that group is a character device file. The 64 is the major number for the group device file; it will always be 64. The 0xNN0000 is the minor number for the group file in hexadecimal. Note that each particular NN must be a unique number across all volume groups. For more information on mknod, see mknod(1M); for more information on major numbers and minor numbers, see Configuring HP-UX for Peripherals. Create the volume group specifying each physical volume to be included using vgcreate. For example: # vgcreate /dev/vgnn /dev/dsk/c0t0d0 Use the block device file to include each disk in your volume group. You can assign all the physical volumes to the volume group with one command. No physical volume can already be part of an existing volume group. Once you have created a volume group, you can now create a logical volume using lvcreate. For example: # lvcreate /dev/vgnn Using the above command creates the logical volume /dev/vgnn/lvoln with LVM automatically assigning the n in lvoln. When LVM creates the logical volume, it creates the block and character device files and places them in the directory /dev/vgnn. VxFS can, theoretically, support files up to two terabytes in size because file system structures are no longer in fixed locations (see Chapter 2 "Disk Layout"). The maximum size tested and supported on HP-UX 11.x systems is one terabyte. Large files are files larger than two gigabytes in size. NOTE: Be careful when enabling large file capability. Applications and utilities such as backup may experience problems if they are not aware of large files. Creating a File System with Large Files You can create a file system with large file capability by entering the following command: # mkfs -F vxfs -o largefiles special_device size Specifying largefiles sets the largefiles flag, which allows the file system to hold files up to one terabyte in size. Conversely, the default nolargefiles option clears the flag and limits files being created to a size of two gigabytes or less: # mkfs -F vxfs -o nolargefiles special_device size Notes: ------ Note 1: Create a System Mirror Disk: ------------------------------------ This note describes how to configure LVM mirroring of a system disk. In this example the HP server is STSRV1, the primary boot device is SCSI=6 (/dev/dsk/c2t6d0) and the alternative mirrored bootdevice is SCSI=5 (/dev/dsk/c2t5d0). The following commands will do the trick: # ioscan -fnC disk # pvcreate -Bf /dev/rdsk/c2t5d0 # mkboot -l /dev/rdsk/c2t5d0 # mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c2t5d0 # vgextend /dev/vg00 /dev/dsk/c2t5d0 # for P in 1 2 3 4 5 6 7 8 9 10 > do > lvextend -m 1 /dev/vg00/lvol$P /dev/dsk/c2t5d0 > sleep 1 > done Note 2: Create a System Mirror Disk: ------------------------------------ # ioscan -fnC disk Class I H/W Path Driver S/W State H/W Type Description ===================================================================== disk 0 0/0/1/1.2.0 sdisk CLAIMED DEVICE HP 73.4GMAN3735MC /dev/dsk/c1t2d0 /dev/rdsk/c1t2d0 disk 1 0/0/2/0.2.0 sdisk CLAIMED DEVICE HP 73.4GATLAS10K3_73_SCA /dev/dsk/c2t2d0 /dev/rdsk/c2t2d0 Note: c1t2d0 is the boot disk and c2t2d0 is the mirrored disk. 1) Initialize the disk and make it bootable pvcreate -B /dev/rdsk/c2t2d0 Note: the -B parameter tells pvcreate that this will be a bootable disk. 2) Add the physical volume to the volume group vgextend /dev/vg00 /dev/dsk/c2t2d0 3) Use mkboot to place the boot utilities in the boot area and add the AUTO file. mkboot /dev/dsk/c2t2d0 mkboot -a "hpux -lq" /dev/rdsk/c2t2d0 4) Use mkboot to update the AUTO file on the primary boot disk. mkboot -a "hpux -lq" /dev/rdsk/c1t2d0 5) Mirror the stand, root and swap logical volumes lvextend -m 1 /dev/vg00/lvol1 lvextend -m 1 /dev/vg00/lvol2 lvextend -m 1 /dev/vg00/lvol3 Note: LVM will resynchronize the new mirror copies. Repeat the lvextend for all other logical volumes on the boot mirror. lvextend -m 1 /dev/vg00/lvol4 lvextend -m 1 /dev/vg00/lvol5 lvextend -m 1 /dev/vg00/lvol6 lvextend -m 1 /dev/vg00/lvol7 lvextend -m 1 /dev/vg00/lvol8 6) Modify your alternate boot path to point to the mirror copy of the boot disk. Note: Use the Hardware path for your new boot disk. setboot -a 0/0/2/0.2.0 Note 3: Increase a filesystem in HP-UX: --------------------------------------- Example 1: ---------- In this example, you would need to increase the file system size of /var by 10 MB, which actually needs to be rounded up to 12 MB. Increase /var Follow these steps to increase the size limit of /var. - Determine if any space is available for the /dev/vg00: # /sbin/vgdisplay /dev/vg00 The Free PE indicates the number of 4 MB extents available, in this case 79 (equivalent to 316 MB). - Change to single user state: /sbin/shutdown This allows /var to be unmounted. - View mounted volumes: # /sbin/mount You see a display similar to the following: / on /dev/vg00/lvol1 defaults on Sat Mar 8 23:19:19 1997 /var on /dev/vg00/lvol7 defaults on Sat Mar 8 23:19:28 1997 # Determine which logical volume maps to /var. In this example, it is /dev/vg00/lvol7 - Unmount /var: # /sbin/umount /var This is required for the next step, because extendfs can only work on unmounted volumes. If you get a "device busy" error at this point, reboot the system and log on in single-user mode before continuing. - Extend the size of the logical volume: # /sbin/lvextend -L new_size_in_MB /dev/vg00/lvol7 For example, to make this volume 332 MB: # /sbin/lvextend -L 332 /dev/vg00/lvol7 To extend the file system size to the logical volume size: # /sbin/extendfs /dev/vg00/rlvol7 Mount /var: # /sbin/mount /var Go back to the regular init state: init 3 or init 4, or reboot. Example 2: ---------- To increase the capacity of a file system created on a logical volume, enter: # umount /dev/vg00/lvol1 # lvextend -L larger_size /dev/vg00/lvol1 # extendfs -F hfs /dev/vg00/rlvol1 -- For operation like mkfs or extendfs, you should use raw device interface. # mount /dev/vg00/lvol1 mount_directory Example 3: ---------- > > Date: 12/14/99 > Document description: Extending /var, /usr, /tmp without Online JFS > Document id: KBRC00000204 > > > You may provide feedback on this document > > > Extending /var, /usr, /tmp without Online JFS DocId: KBRC00000204 Updated: > 12/14/99 1:14:29 PM > > PROBLEM > Since /var, /usr, /tmp (and sometimes /opt) are always in use by the > operating system, they cannot be unmounted with the umount command. In order > to extend these filesystems, the system must be in single user mode. > > RESOLUTION > This example will show how to extend /usr to 400MB without Online JFS > > > 1.. Backup the filesystem before extending > > > 2.. Display disk information on the logical volume > > lvdisplay -v /dev/vg00/lvol4 | more > > > a.. Make sure this is enough Free PE's to increase this filesystem. > b.. Make sure that allocation is NOT strict/contiguous. > > > 3.. Reboot the machine > > shutdown -r now > > > 4.. When prompted, press "ESC" to interrupt the boot. > > > 5.. Boot from the primary device and invoke ISL interaction. > > bo pri isl > > NOTE: If prompted to interact with ISL, respond "y" > > > 6.. Boot into single user mode > > hpux -is > > NOTE:Nothing will be mounted. > > > 7.. Extend the logical volume that holds the filesystem. > > /sbin/lvextend -L 400 /dev/vg00/lvol4 > > > 8.. Extend the file system. > > /sbin/extendfs -F hfs /dev/vg00/rlvol4 > > NOTE: The use of the character device. > > > 9.. Ensure the filesystem now reports to be the new size > > bdf > > > 10.. Reboot the system to its normal running state. > > shutdown -r now > > > The only thing is that you have to have contiguous lvols to do that. The best way is to do an Ignite make_tape_recovery -i for vg00 and then resize it when you recreate it. If you have vg00 on a seperate disk then it is real easy, the backup can run in the background, and the restore interactive will take about 2.5 hours for a 9GB root disk, you can make the lvols any size you want and it also puts it back in place in order so you save space. Example 4: ---------- The right way to extend a file system with "OnLine jfs" is using the command "fsadm". For example, if you want to extend the fs /mk2/toto in the /dev/vgmk2/lvtoto in from 50Mbytes to 60 you must extend de logical volume # lvextend -L 60 /dev/vgmk2/lvtoto Now use fsadm ( I supose you have vxfs, if you are using hfs is not possible to increase on-line, or at least I don't know how ). # fsadm -F vxfs -b 61440 /mk2/toto You will have your fs increased on line ... be carefull if your fs is 100% occupied the comand fsadm will fail, you need some free space on the file system ( it depends on the fs type, size etc ..). In general, Online jfs should be increased in the following way: lvextend -L ???? /dev/vg??/lvol?? fsadm -F vxfs -b ????? / oranh300:/home/se1223>cat /etc/inittab | grep enab vxen::bootwait:/sbin/fs/vxfs/vxenablef -a Note 4: ------- Extend OnlineJFS licenses on next D&ST servers: aavnh400 oranh503 oranh603 orazh500 orazh601 orazh602 commands are: swagentd -r swinstall -x mount_all_filesystems=false -x enforce_dependencies=true -s hpdepot.ao.nl.abnamro.com:/beheer/depot/OnlineJFS_License OnlineJFS swagentd -k HP-UX errors: Error 23 filetable overflow: ------------------------------------------ Error: 23 is a infamous error, as shown in this thread: thread: Doc ID: Note:1018306.102 Problem Description: ==================== You are backing up your database and are getting the following errors: HP-UX Error 23: file table overflow RMAN-569 file not found LEM-00031 file not found LEM-00033 lempgfm couldn't open message file RMAN indicates that Recovery Manager is complete, however the database and the catalog are not resync'd. Problem Explanation: ==================== Recovery Manager cannot find or open the message file. Search Words: ============= Recovery Manager, LEM-33, LEM-31, RMAN-00569, message file, lempgfm, error 23, HPUX error 23, HP-UX error 23 Solution Description: ===================== You may need to increase the value of the unix kernel parameter 'nfile'. Solution Explanation: ===================== 'nfile' needs to have a value in the thousands for a database server. If this parameter is < 1000, increase it to something like 5000 or greater. If there is enough memory on your system, this parameter can be set to values > 30000. Some HP-UX troubleshooting tips: -------------------------------- Where to get information about problems: dmesg --> provides a finite list of diagnostic messages /var/adm/syslog/syslog.log --> system log /opt/resmon/log/error.log --> /etc/shutdownlog --> shutdown information /etc/rc.log --> system startup log /var/tombstones/ts99 --> crash analysis file cstm - command line support tool manager mstm - menu based support tool manager --> to move to another portion of the screen, such as the drop down menu area Service Processor from a serial console he - help co - return to console mode (exits the program) sl - show log Panic Reboots Check these files for clues: /var/tombstones/ts99 /etc/shutdownlog Bad disk 1. Check the syslog (/var/adm/syslog/syslog.log) looking for disk errors. 2. Check the ioscan (ioscan -fnC disk), looking for NO_HW rather than Claimed. 3. If diaglogd is running then check STM logs (/var/opt/resmon/log/event.log) 4. Check the volume group to see if the disk is listed and whether there is any problem with it's status (vgdisplay -v | more) 5. Check lvmtab to see if the disk is supposed to be in a volume group (strings /etc/lvmtab | more) Filesystem do not mount after a reboot 1. Reactivate the Volume Group --> vgchange -a y /dev/ 2. Remount the filesystems --> mount -a 3. If still no success then perform a filesystem check --> fsck /dev// 4. Remount the filesystems --> mount -a 5. Check to see if all the filesystems are there: a) bdf b) compare with /etc/fstab Filesystem full du -kx / | sort -rn | more du -akx | sort -nr | more Shows directories on the local filesystem and how much space they are taking up NFS mount - Permission Denied 1. Check to see if the format of the /etc/exports file is correct on the server that is the nfs server. 2. exportfs -av to export the filesystem 3. Check the /etc/fstab file on the client to make sure that it is correct 4. /usr/sbin/showmount -e on the client to show what is being exported 5. To bypass the /etc/exports file execute the following on the nfs server: exportfs -i -o rw . NFS Server /etc/rc.config.d/nfsconf --> NFS_SERVER=1 Verify the proper processes are running: /sbin/init.d/nfs.server stop The processes should NOT be running: # ps -ef|grep nfsd # ps -ef|grep rpc.mountd # ps -ef|grep rpc.lockd # ps -ef|grep rpc.statd /sbin/init.d/nfs.server start These processes should be running: # ps -ef|grep nfsd root 3444 1 0 10:39:12 ? 0:00 /usr/sbin/nfsd 4 root 3451 3444 0 10:39:12 ? 0:00 /usr/sbin/nfsd 4 root 3449 3444 0 10:39:12 ? 0:00 /usr/sbin/nfsd 4 root 3445 3444 0 10:39:12 ? 0:00 /usr/sbin/nfsd 4 # ps -ef|grep rpc.mountd root 3485 1 0 10:42:09 ? 0:00 rpc.mountd # ps -ef|grep rpc.lockd root 3459 1 0 10:39:12 ? 0:00 /usr/sbin/rpc.lockd # ps -ef|grep rpc.statd root 3453 1 0 10:39:12 ? 0:00 /usr/sbin/rpc.statd To start a process if it is not running: # ps -ef|grep rpc.mountd # rpc.mountd or /usr/sbin/rpc.mountd # ps -ef|grep rpc.mountd root 3485 1 0 10:42:09 ? 0:00 rpc.mountd /etc/inetd.conf needs to have the proper services active (not commented out) ## # WARNING: The rpc.mountd should now be started from a startup script. # Please enable the mountd startup script to start rpc.mountd. ## #rpc stream tcp nowait root /usr/sbin/rpc.rexd 100017 1 rpc.rexd rpc dgram udp wait root /usr/lib/netsvc/rstat/rpc.rstatd 100001 2-4 rpc.rstatd rpc dgram udp wait root /usr/lib/netsvc/rusers/rpc.rusersd 100002 1-2 rpc.rusersd rpc dgram udp wait root /usr/etc/rpc.mountd 100005 1 rpc.mountd -e rpc dgram udp wait root /usr/lib/netsvc/rwall/rpc.rwalld 100008 1 rpc.rwalld #rpc dgram udp wait root /usr/sbin/rpc.rquotad 100011 1 rpc.rquotad rpc dgram udp wait root /usr/lib/netsvc/spray/rpc.sprayd 100012 1 rpc.sprayd NIC problems: The lanadmin utility provides NIC statistics The nettladmin utility provides packet trace information Replacing a Mirrored Root Disk: Replace the disk Hot swap can be performed while system is up Not hot swappable means the system must be brought down Reboot the system into single user mode shutdown -r 0, unless the system is powered off already, then power it back on interrupt the boot bo pri (or bo alt if the disk that was replaced was the primary boot disk) IPL>hpux -is -lq (;0)/stand/vmunix vgcfgrestore -n /dev/vg00 /dev/rdsk/c?t?d? vgsync /dev/vg00 mkboot /dev/rdsk/c?t?d? mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c?t?d? shutdown -r 0 lvlnboot -v /dev/vg00 to verify that the disk is seen as bootable Software Installation (swinstall, sd, etc) ERROR: "server::/tmp/omni_tmp/packet": You do not have the required permissions to perform this operation. Check permissions using the "swacl" command or see your system administrator for assistance. Or, to manage applications designed and packaged for nonprivileged mode, see the "run_as_superuser" option in the "sd" man page. WARNING: More information may be found in the daemon logfile on this target (default location is server:/var/adm/sw/swagentd.log). Bounce swagentd daemon: /usr/sbin/swagentd -r ############################################################## SECTION 16: Kernel Parameters: ############################################################## ========================= >>>> Simplified Overview: ========================= Simplified overview Kernel parameters Solaris, AIX, Linux: ========================================================== Solaris: -------- The "/etc/system" file: Available for Solaris Operating Environment, the /etc/system file contains definitions for kernel configuration limits such as the maximum number of users allowed on the system at a time, the maximum number of processes per user, and the inter-process communication (IPC) limits on size and number of resources. These limits are important because they affect, for example, DB2, Oracle performance on a Solaris Operating Environment machine. Some examples: set shmsys:shminfo_shmmax=4294967295 set shmsys:shminfo_shmmin=1 set shmsys:shminfo_shmmni=100 set shmsys:shminfo_shmseg=10 set semsys:seminfo_semmni=100 set semsys:seminfo_semmsl=100 set semsys:seminfo_semmns=2500 set semsys:seminfo_semopm=100 set semsys:seminfo_semvmx=32767 .. .. You can use, among others, the "ipcs" command and "adb" command to retrieve kernel parameters and mem info. Some remarks on Shared Memory and Semaphores: - Shared Memory Shared memory provides the fastest way for processes to pass large amounts of data to one another. As the name implies, shared memory refers to physical pages of memory that are shared by more than one process. Of particular interest is the "Intimate Shared Memory" facility, where the translation tables are shared as well as the memory. This enhances the effectiveness of the TLB (Translation Lookaside Buffer), which is a CPU-based cache of translation table information. Since the same information is used for several processes, available buffer space can be used much more efficiently. In addition, ISM-designated memory cannot be paged out, which can be used to keep frequently-used data and binaries in memory. Database applications are the heaviest users of shared memory. Vendor recommendations should be consulted when tuning the shared memory parameters. Solaris 10 only uses the shmmax and shmmni parameters. (Other parameters are set dynamically within the Solaris 10 IPC model.) shmmax (max-shm-memory in Solaris 10+): This is the maximum size of a shared memory segment (ie the largest value that can be used by shmget). Its theoretical maximum value is 4294967295 (4GB), but practical considerations usually limit it to less than this. There is no reason not to tune this value as high as possible, since no kernel resources are allocated based on this parameter. Solaris 10 sets shmmax to 1/4 physical memory by default, vs 512k for previous versions. shmmin: This is the smallest possible shared memory segment size. The default is 1 byte; this parameter should probably not be tuned. shmmni (max-shm-ids in Solaris 10+): Maximum number of shared memory identifiers at any given time. This parameter is used by kernel memory allocation to determine how much size to put aside for shmid_ds structures. Each of these is 112 bytes and requires an additional 8 bytes for a mutex lock; if it is set too high, memory useage can be a problem. The maximum setting for this variable in Solaris 2.5.1 and 2.6 is 2147483648 (2GB), and the default is 100. For Solaris 10, the default is 128 and the maximum is MAXINT. shmseg: Maximum number of segments per process. It is usually set to shmmni, but it should always be less than 65535. Sun documentations suggests a maximum for this parameter of 32767 and a default of 8 for Solaris 2.5.1 and 2.6. - Semaphores Semaphores are a shareable resource that take on a non-negative integer value. They are manipulted by the P (wait) and V (signal) functions, which decrement and increment the semaphore, respectively. When a process needs a resource, a "wait" is issued and the semaphore is decremented. When the semaphore contains a value of zero, the resources are not available and the calling process spins or blocks (as appropriate) until resources are available. When a process releases a resource controlled by a semaphore, it increments the semaphore and the waiting processes are notified. Solaris 10 only uses the semmni, semmsl and semopm parameters. (Other parameters are dynamic within the Solaris 10 IPC model.) semmap: This sets the number of entries in the semaphore map. This should never be greater than semmni. If the number of semaphores per semaphore set used by the application is "n" then set semmap = ((semmni + n - 1)/n)+1 or more. Alternatively, we can set semmap to semmni x semmsl. An undersized semmap leads to "WARNING: rmfree map overflow" errors. The default setting is 10; the maximum for Solaris 2.6 is 2GB. The default for Solaris 9 was 25; Solaris 10 increased the default to 512. The limit is SHRT_MAX. semmni (max-sem-ids in Solaris 10+): Maximum number of systemwide semaphore sets. Each control structure consumes 84 bytes. For Solaris 2.5.1-9, the default setting is 10; for Solaris 10, the default setting is 128. The maximum is 65535 semmns: Maximum number of semaphores in the system. Each structure uses 16 bytes. This parameter should be set to semmni x semmsl. The default is 60; the maximum is 2GB. semmnu: Maximum number of undo structures in the system. This should be set to semmni so that each control structure has an undo structure. The default is 30, the maximum is 2 GB. semmsl (max-sem-nsems in Solaris 10+): Maximum number of semaphores per semaphore set. The default is 25, the maximum is 65535. semopm (max-sem-ops in Solaris 10+): Maximum number of semaphore operations that can be performed in each semop call. The default in Solaris 2.5.1-9 is 10, the maximum is 2 GB. Solaris 10 increased the default to 512. semume: Maximum number of undo structures per process. This should be set to semopm times the number of processes that will be using semaphores at any one time. The default is 10; the maximum is 2 GB. semusz: Number of bytes required for semume undo structures. This should not be tuned; it is set to semume x (1 + sizeof(undo)). The default is 96; the maximum is 2 GB. semvmx: Maximum value of a semaphore. This should never exceed 32767 (default value) unless SEM_UNDO is never used. The default is 32767; the maximum is 65535. semaem: Maximum adjust-on-exit value. This should almost always be left alone. The default is 16384; the maximum is 32767. Linux: ------ Kernel parameters used for system configuration are found in "/etc/sysctl.conf" and on a running system also in "/proc/sys/kernel", where you will find an individual file for each configuration parameter. Because these parameters have a direct effect on system performance and viability, you must have root access in order to modify them. Occasionally, a prerequisite to a package installation requires the modification of kernel parameters. Since each parameter file contains a single line of data consisting of either a text string or numeric values, it is often easy to modify a parameter by simply using the echo command: # echo 2048 > /proc/sys/kernel/msgmax The aforementioned command will set the value of the msgmax parameter to 2048. -- More on the proc File System: The Linux kernel has two primary functions: to control access to physical devices on the computer and to schedule when and how processes interact with these devices. The /proc/ directory contains a hierarchy of special files which represent the current state of the kernel - allowing applications and users to peer into the kernel's view of the system. Within the /proc/ directory, one can find a wealth of information about the system hardware and any processes currently running. In addition, some of the files within the /proc/ directory tree can be manipulated by users and applications to communicate configuration changes to the kernel. Under Linux, all data are stored as files. Most users are familiar with the two primary types of files: text and binary. But the /proc/ directory contains another type of file called a virtual file. It is for this reason that /proc/ is often referred to as a virtual file system. These virtual files have unique qualities. Most of them are listed as zero bytes in size and yet when one is viewed, it can contain a large amount of information. In addition, most of the time and date settings on virtual files reflect the current time and date, indicative of the fact they constantly changing. Virtual files such as interrupts, /proc/meminfo, /proc/mounts, and /proc/partitions provide an up-to-the-moment glimpse of the system's hardware. Others, like /proc/filesystems and the /proc/sys/ directory provide system configuration information and interfaces. For organizational purposes, files containing information on a similar topic are grouped into virtual directories and sub-directories. For instance, /proc/ide/ contains information for all physical IDE devices. Likewise, process directories contain information about each running process on the system. By using the cat, more, or less commands on files within the /proc/ directory, you can immediately access an enormous amount of information about the system. For example, if you want to see what sort of CPU your computer has, type "cat /proc/cpuinfo" and you will see something similar to the following: processor : 0 vendor_id : AuthenticAMD cpu family : 5 model : 9 model name : AMD-K6(tm) 3D+ Processor stepping : 1 cpu MHz : 400.919 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow k6_mtrr bogomips : 799.53 When viewing different virtual files in the /proc/ file system, you will notice some of the information is easily understandable while some is not human-readable. This is in part why utilities exist to pull data from virtual files and display it in a useful way. Some examples of such applications are lspci, apm, free, and top. As a general rule, most virtual files within the /proc/ directory are read only. However, some can be used to adjust settings in the kernel. This is especially true for files in the /proc/sys/ subdirectory. To change the value of a virtual file, use the echo command and a > symbol to redirect the new value to the file. For instance, to change your hostname on the fly, you can type: echo bob.subgenius.com > /proc/sys/kernel/hostname Other files act as binary or boolean switches. For instance, if you type cat /proc/sys/net/ipv4/ip_forward, you will see either a 0 or a 1. A 0 indicates the kernel is not forwarding network packets. By using the echo command to change the value of the ip_forward file to 1, you can immediately turn packet forwarding on. Another command used to alter settings in the /proc/sys/ subdirectory is /sbin/sysctl. -- sysctl: Linux also provides the sysctl command to modify kernel parameters at runtime. Sysctl uses parameter information stored in a file called /etc/sysctl.conf. If, for example, we wanted to change the value of the msgmax parameter as we did above, but this time using sysctl, the command would look like this: # sysctl -w kernel.msgmax=2048 - About the kernel: Finding the Kernel Locate the kernel image on your hard disk. It should be in the file /vmlinuz, or /vmlinux, or /boot/vmlinux In some installations, /vmlinuz is a soft link to the actual kernel, so you may need to track down the kernel by following the links. On Redhat 6.1 it is in "/boot/vmlinuz". To find the kernel being used look in "/etc/lilo.conf". You can also type "uname -a" to see the kernel version. /proc/cmdline This file shows the parameters passed to the kernel at the time it is started. A sample /proc/cmdline file looks like this: ro root=/dev/hda2 This tell us the kernel is mounted read-only - signified by (ro) - off of the second partition on the first IDE device (/dev/hda2). - Kernel, memory tuning: Most about tuning memory en kernel params seem to do with the "/etc/sysctl.conf" file: In most distributions, the "/etc/sysctl.conf" determines the limits and/or behaviour of the kernel and memory. If you type "sysctl -a |more" you will see a long list of kernel parameters. You can use this sysctl program to modify these parameters, for example: # sysctl -w kernel.shmmax=100000000 # sysctl -w fs.file-max=65536 # echo "kernel.shmmax = 100000000" >> /etc/sysctl.conf Example configuration: setting kernel parameters before installing Oracle 10g: ------------------------------------------------------------------------------ Most out of the box kernel parameters (of RHELS 3,4,5) are set correctly for Oracle except a few. You should have the following minimal configuration: net.ipv4.ip_local_port_range 1024 65000 kernel.sem 250 32000 100 128 kernel.shmmni 4096 kernel.shmall 2097152 kernel.shmmax 2147483648 fs.file-max 65536 You can check the most important parameters using the following command: # /sbin/sysctl -a | egrep 'sem|shm|file-max|ip_local' net.ipv4.ip_local_port_range = 1024 65000 kernel.sem = 250 32000 100 128 kernel.shmmni = 4096 kernel.shmall = 2097152 kernel.shmmax = 2147483648 fs.file-max = 65536 If some value should be changed, you can change the "/etc/sysctl.conf" file and run the "/sbin/sysctl -p" command to change the value immediately. Every time the system boots, the init program runs the /etc/rc.d/rc.sysinit script. This script contains a command to execute sysctl using /etc/sysctl.conf to dictate the values passed to the kernel. Any values added to /etc/sysctl.conf will take effect each time the system boots. Example configuration: from: Installing Oracle 91 on Linux ----------------------------------------------------------- For Linux, use the ipcs command to obtain a list of the system's current shared memory segments and semaphore sets, and their identification numbers and owner. Perform the following steps to modify the kernel parameters by using the /proc file system. Log in as the root user. Change to the /proc/sys/kernel directory. Review the current semaphore parameter values in the sem file by using the cat or more utility. For example, using the cat utility, enter the following command: # cat sem The output lists, in order, the values for the SEMMSL, SEMMNS, SEMOPM, and SEMMNI parameters. The following example shows how the output appears: 250 32000 32 128 In the preceding output example, 250 is the value of the SEMMSL parameter, 32000 is the value of the SEMMNS parameter, 32 is the value of the SEMOPM parameter, and 128 is the value of the SEMMNI parameter. Modify the parameter values by using the following command syntax: # echo SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value > sem Replace the parameter variables with the values for your system in the order that they are entered in the preceding example. For example: # echo 100 32000 100 100 > sem Review the current shared memory parameters by using the cat or more utility. For example, using the cat utility, enter the following command: # cat shared_memory_parameter In the preceding example, the variable shared_memory_parameter is either the SHMMAX or SHMMNI parameter. The parameter name must be entered in lowercase letters. Modify the shared memory parameter by using the echo utility. For example, to modify the SHMMAX parameter, enter the following command: # echo 2147483648 > shmmax Modify the shared memory parameter by using the echo utility. For example, to modify the SHMMNI parameter, enter the following command: # echo 4096 > shmmni Modify the shared memory parameter by using the echo utility. For example, to modify the SHMALL parameter, enter the following command: # echo 2097152 > shmall Write a script to initialize these values during system startup, and include the script in your system init files. See Also: Your system vendor's documentation for more information on script files and init files. Set the File Handles by using ulimit -n and /proc/sys/fs/file-max. # echo 65536 > /proc/sys/fs/file-max ulimit -n 65536 Set the Sockets to /proc/sys/net/ipv4/ip_local_port_range # echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_change Set the Process limit by using ulimit -u. This will give you the number of processes per user. ulimit -u 16384 Linux modules: -------------- Modules on Linux (1): --------------------- - insmod, rmmod, lsmod lsmod: ------ lsmod - list loaded modules. SYNOPSIS lsmod [-hV] DESCRIPTION lsmod shows information about all loaded modules. The format is name, size, use count, list of referring modules. The information displayed is identical to that available from "/proc/modules". If the module controls its own unloading via a can_unload routine then the user count displayed by lsmod is always -1, irrespective of the real use count. insmod: ------- insmod - install loadable kernel module SYNOPSIS insmod [-fhkLmnpqrsSvVxXyYN] [-e persist_name] [-o module_name] [-O blob_name] [-P prefix] module [ symbol=value ... ] DESCRIPTION insmod installs a loadable module in the running kernel. insmod tries to link a module into the running kernel by resolving all symbols from the kernel's exported symbol table. If the module file name is given without directories or extension, insmod will search for the module in some common default directories. The environment variable MODPATH can be used to override this default. If a module configuration file such as /etc/modules.conf exists, it will override the paths defined in MODPATH. The environment variable MODULECONF can also be used to select a different configuration file from the default /etc/modules.conf (or /etc/conf.modules (deprecated)). This environment variable will override all the definitions above. When environment variable UNAME_MACHINE is set, modutils will use its value instead of the machine field from the uname() syscall. This is mainly of use when you are compiling 64 bit modules in 32 bit user space or vice versa, set UNAME_MACHINE to the type of the modules. Current modutils does not support full cross build mode for modules, it is limited to choosing between 32 and 64 bit versions of the host architecture. rmmod: ------ rmmod - unload loadable modules SYNOPSIS rmmod [ -aehrsvV ] module ... DESCRIPTION rmmod unloads loadable modules from the running kernel. rmmod tries to unload a set of modules from the kernel, with the restriction that they are not in use and that they are not referred to by other modules. If more than one module is named on the command line, the modules will be removed in the given order. This supports unloading of stacked modules. With the option '-r', a recursive removal of modules will be attempted. This means that if a top module in a stack is named on the command line, all modules that are used by this module will be removed as well, if possible. More info about the mod commands: --------------------------------- - Hardware Detection with the Help of hwinfo hwinfo can detect the hardware of your system and select the drivers needed to run this hardware. Get a small introduction to this command with hwinfo --help. If you, for example, need information about your SCSI devices, use the command hwinfo --scsi. All this information is also available in YaST in the hardware information module. - Handling Modules The following commands are available: insmod insmod loads the requested module after searching for it in a subdirectory of /lib/modules/. It is better, however, to use modprobe rather than insmod. rmmod Unloads the requested module. This is only possible if this module is no longer needed. For example, the isofs module cannot be unloaded while a CD is still mounted. depmod Creates the file modules.dep in /lib/modules/ that defines the dependencies of all the modules. This is necessary to ensure that all dependent modules are loaded with the selected ones. This file will be built after the system is started if it does not exist. modprobe Loads or unloads a given module while taking into account dependencies of this module. This command is extremely powerful and can be used for a lot of things (e.g., probing all modules of a given type until one is successfully loaded). In contrast to insmod, modprobe checks /etc/modprobe.conf and therefore is the preferred method of loading modules. For detailed information about this topic, refer to the corresponding man page. lsmod Shows which modules are currently loaded as well as how many other modules are using them. Modules started by the kernel daemon are tagged with autoclean. This label denotes that these modules will automatically be removed once they reach their idle time limit. modinfo Shows module information. /etc/modprobe.conf The loading of modules is affected by the files /etc/modprobe.conf and /etc/modprobe.conf.local and the directory /etc/modprobe.d. See man modprobe.conf. Parameters for modules that access hardware directly must be entered in this file. Such modules may need system-specific options (e.g., CD-ROM driver or network driver). The parameters used here are described in the kernel sources. Install the package kernel-source and read the documentation in the directory /usr/src/linux/Documentation. Kmod - the Kernel Module Loader The kernel module loader is the most elegant way to use modules. Kmod performs background monitoring and makes sure the required modules are loaded by modprobe as soon as the respective functionality is needed in the kernel. To use Kmod, activate the option `Kernel module loader' (CONFIG_KMOD) in the kernel configuration. Kmod is not designed to unload modules automatically; in view of today's RAM capacities, the potential memory savings would be marginal. For reasons of performance, monolithic kernels may be more suitable for servers that are used for special tasks and need only a few drivers. modprobe.conf: -------------- Example 1: # This file is autogenerated from /etc/modules.conf using generate-modprobe.conf command alias eth1 sk98lin alias eth0 ipw2200 alias sound-slot-0 snd-hda-intel install scsi_hostadapter /sbin/modprobe ahci; /bin/true remove snd-hda-intel /sbin/modprobe -r snd-pcm-oss; /sbin/modprobe --first-time -r --ignore-remove snd-hda-intel install snd-hda-intel /sbin/modprobe --first-time --ignore-install snd-hda-intel && { /sbin/modprobe snd-pcm-oss; /bin/true; } install usb-interface /sbin/modprobe uhci-hcd; /sbin/modprobe ehci-hcd; /bin/true #alias eth1 eth1394 alias ieee1394-controller ohci1394 alias net-pf-10 off #irda alias tty-ldisc-11 irtty alias char-major-161-* ircomm-tty # Para nsc 383 SIO: alias char-major-160-* nsc-ircc alias irda0 nsc-ircc options nsc-irc io=0x2f8 irq=3 dma=0 install nsc-ircc { /bin/setserial /dev/ttyS1 uart none; } ; /sbin/modprobe --first-time --ignore-install nsc-ircc #irda: 0x2f8, irq 3, dma 0 #lpt: 0x3f8, irq 7, dma 1 options parport_pc io=0x378 irq=7 dma=1 Example 2: alias ieee1394-controller ohci1394 alias eth0 eepro100 alias sound-slot-0 emu10k1 alias net-pf-10 off install snd-emu10k1 /sbin/modprobe --first-time --ignore-install snd-emu10k1 && { /sbin/modprobe snd-pcm-oss; /bin/true; } install usb-interface /sbin/modprobe usb-uhci; /sbin/modprobe ehci-hcd; /bin/true remove snd-emu10k1 { /sbin/modprobe -r snd-pcm-oss; } ; /sbin/modprobe -r --first-time --ignore-remove snd-emu10k1 /etc/sysconfig: --------------- Note 1: ------- SuSEconfig and /etc/sysconfig The main configuration of SUSE LINUX can be made with the configuration files in /etc/sysconfig. Former versions of SUSE LINUX relied on /etc/rc.config for system configuration, but it became obsolete in previous versions. /etc/rc.config is not created at installation time, as all system configuration is controlled by /etc/sysconfig. However, if /etc/rc.config exists at the time of a system update, it remains intact. The individual files in /etc/sysconfig are only read by the scripts to which they are relevant. This ensures that network settings, for instance, need to be parsed only by network-related scripts. Apart from that, there are many other system configuration files that are generated according to the settings in /etc/sysconfig. This task is performed by SuSEconfig. For example, if you change the network configuration, SuSEconfig is likely to make changes to the file /etc/host.conf as well, as this is one of the files relevant for the network configuration. If you change anything in these files manually, run SuSEconfig afterwards to make sure all the necessary changes are made in all the relevant places. If you change the configuration using the YaST sysconfig editor, all changes are applied automatically - YaST automatically starts SuSEconfig to update the configuration files as needed. This concept enables you to make basic changes to your configuration without needing to reboot the system. Because some changes are rather complex, some programs must be restarted for the changes to take effect. For instance, changes to the network configuration may require a restart of the network programs concerned. This can be achieved by entering the commands rcnetwork stop and rcnetwork start. Note 2: ------- The Linux sysconfig directory The /etc/sysconfig directory is where many of the files that control the system configuration are stored. This section lists these files and many of the optional values in the files used to make system changes. To get complete information on these files read the file /usr/doc/initscripts-4.48/sysconfig.txt. /etc/sysconfig/clock Used to configure the system clock to Universal or local time and set some other clock parameters. An example file: UTC=false ARC=false Options: UTC - true means the clock is set to UTC time otherwise it is at local time ARC - Set true on alpha stations only. It indicates the ARC console's 42-year time offset is in effect. If not set to true, the normal Unix epoch is assumed. ZONE="filename" - indicates the zonefile under the directory /usr/share/zoneinfo that the /etc/localtime file is a copy of. This may be set to: ZONE="US/Eastern" /etc/sysconfig/init This file is used to set some terminal characteristics and environment variables. A sample listing: # color => new RH6.0 bootup # verbose => old-style bootup # anything else => new style bootup without ANSI colors or positioning BOOTUP=color # column to start "[ OK ]" label in RES_COL=60 # terminal sequence to move to that column. You could change this # to something like "tput hpa ${RES_COL}" if your terminal supports it MOVE_TO_COL="echo -en \\033[${RES_COL}G" # terminal sequence to set color to a 'success' color (currently: green) SETCOLOR_SUCCESS="echo -en \\033[1;32m" # terminal sequence to set color to a 'failure' color (currently: red) SETCOLOR_FAILURE="echo -en \\033[1;31m" # terminal sequence to set color to a 'warning' color (currently: yellow) SETCOLOR_WARNING="echo -en \\033[1;33m" # terminal sequence to reset to the default color. SETCOLOR_NORMAL="echo -en \\033[0;39m" # default kernel loglevel on boot (syslog will reset this) LOGLEVEL=1 # Set to something other than 'no' to turn on magic sysrq keys... MAGIC_SYSRQ=no # Set to anything other than 'no' to allow hotkey interactive startup... PROMPT=yes Options: BOOTUP=bootupmode - Choices are color, or verbose. The choice color sets new boot display. The choice verbose sets old style display. Anything else sets a new display without ANSI formatting. LOGLEVEL=number - Sets the initial console logging level for the kernel. The default is 7. The values are: emergency, panic - System is unusable alert - Action must be taken immediately crit - Critical conditions err, error (depreciated) - Error conditions warning, warn (depreciated) - Warning conditions notice - Normal but significant conditions info - Informational message debug - Debug level message RES_COL=number - Screen column to start status labels at. The Default is 60. MOVE_TO_COL=command - A command to move the cursor to $RES_COL. SETCOLOR_SUCCESS=command - Set the color used to indicate success. SETCOLOR_FAILURE=command - Set the color used to indicate failure. SETCOLOR_WARNING=command - Set the color used to indicate warning. SETCOLOR_NORMAL=command - Set the color used tor normal color MAGIC_SYSRQ=yes|no - Set to 'no' to disable the magic sysrq key. PROMPT=yes|no - Set to 'no' to disable the key check for interactive mode. /etc/sysconfig/keyboard Used to configure the keyboard. Used by the startup script /etc/rc.d/rc.sysinit. An example file: KEYTABLE="us" Options: KEYTABLE="keytable file" - The line [ KEYTABLE="/usr/lib/kbd/keytables/us.map" ] tells the system to use the file shown for keymapping. KEYBOARDTYPE=sun|pc - The selection, "sun", indicates attached on /dev/kbd is a sun keyboard. The selection "pc" indicates a PS/2 keyboard is on the ps/2 port. /etc/sysconfig/mouse This file is used to configure the mouse. An example file: FULLNAME="Generic - 2 Button Mouse (PS/2)" MOUSETYPE="ps/2" XEMU3="yes" XMOUSETYPE="PS/2" Options: MOUSETYPE=type - Choices are microsoft, mouseman, mousesystems, ps/2, msbm, logibm, atibm, logitech, mmseries, or mmhittab. XEMU3=yes|no - If yes, emulate three buttons, otherwise not. /etc/sysconfig/network Used to configure networking options. All IPX options default to off. An example file: NETWORKING=yes FORWARD_IPV4="yes" HOSTNAME="mdct-dev3" GATEWAY="10.1.0.25" GATEWAYDEV="eth0" Options: NETWORKING=yes|no - Sets network capabilities on or off. HOSTNAME="hostname". To work with old software, the /etc/HOSTNAME file should contain the same hostname. FORWARD_IPV4=yes|no - Turns the ability to perform IP forwarding on or off. Turn it on if you want to use the machine as a router. Turn it off to use it as a firewall or IP masquerading. DEFRAG_IPV4=yes|no - Set this to automatically defragment IPv4 packets. This is good for masquerading, and a bad idea otherwise. It defaults to 'no'. GATEWAY="gateway IP" GATEWAYDEV="gateway device" Possible values include eth0, eth1, or ppp0. NISDOMAIN="nis domain name" IPX=yes|no - Turn IPX ability on or off. IPXAUTOPRIMARY=on|off - Must not be yes or no. IPXAUTOFRAME=on|off IPXINTERNALNETNUM="netnum" IPXINTERNALNODENUM="nodenum" /etc/sysconfig/static-routes Configures static routes on a network. Used to set up static routing. An example file: eth1 net 192.168.199.0 netmask 255.255.255.0 gw 192.168.199.1 eth0 net 10.1.0.0 netmask 255.255.0.0 gw 10.1.0.153 eth1 net 255.255.255.255 netmask 255.255.255.255 The syntax is: device net network netmask netmask gw gateway The device may be a device name such as eth0 which is used to have the route brought up and down as the device is brought up or down. The value can also be "any" to let the system calculate the correct devices at run time. /etc/sysconfig/routed Sets up dynamic routing policies. An example file: EXPORT_GATEWAY="no" SILENT="yes" Options: SILENT=yes|no EXPORT_GATEWAY=yes|no /etc/sysconfig/pcmcia Used to configure pcmcia network cards. An example file: PCMCIA=no PCIC= PCIC_OPTS= CORE_OPTS= Options: PCMCIA=yes|no PCIC=i82365|tcic PCIC_OPTS=socket driver (i82365 or tcic) timing parameters CORE_OPTS=pcmcia_core options CARDMGR_OPTS=cardmgr options /etc/sysconfig/amd Used to configure the auto mount daemon. An example file: ADIR=/.automount MOUNTPTS='/net /etc/amd.conf' AMDOPTS= Options: ADIR=/.automount (normally never changed) MOUNTPTS='/net /etc/amd.conf' (standard automount stuff) AMDOPTS= (extra options for AMD) /etc/sysconfig/tape Used for backup tape device configuration. Options: DEV=/dev/nst0 - The tape device. Use the non-rewinding tape for these scripts. For SCSI tapes the device is /dev/nst#, where # is the number of the tape drive you want to use. If you only have one then use nst0. For IDE tapes the device is /dev/ht#. For floppy tape drives the device is /dev/ftape. ADMIN=root - The person to mail to if the backup fails for any reason SLEEP=5 - The time to sleep between tape operations. BLOCKSIZE=32768 - This worked fine for 8mm, then 4mm, and now DLT. An optimal setting is probably the amount of data your drive writes at one time. SHORTDATE=$(date +%y:%m:%d:%H:%M) - A short date string, used in backup log filenames. DAY=$(date +log-%y:%m:%d) - Used for the log file directory. DATE=$(date) - Date string, used in log files. LOGROOT=/var/log/backup - Root of the logging directory LIST=$LOGROOT/incremental-list - This is the file name the incremental backup will use to store the incremental list. It will be $LIST-{some number}. DOTCOUNT=$LOGROOT/.count - For counting as you go to know which incremental list to use. COUNTER=$LOGROOT/counter-file - For rewinding when done...might not use. BACKUPTAB=/etc/backuptab - The file in which we keep our list of backup(s) we want to make. /etc/sysconfig/sendmail An example file: DAEMON=yes QUEUE=1h Options: DAEMON=yes|no - yes implies -bd QUEUE=1h - Given to sendmail as -q$QUEUE. The -q option is not given to sendmail if /etc/sysconfig/sendmail exists and QUEUE is empty or undefined. /etc/sysconfig/i18n Controls the system font settings. The language variables are used in /etc/profile.d/lang.sh. An example i18n file: LANG="en_US" LC_ALL="en_US" LINGUAS="en_US" Options: LANG= set locale for all categories, can be any two letter ISO language code. LC_CTYPE= localedata configuration for classification and conversion of characters. LC_COLLATE= localedata configuration for collation (sort order) of strings. LC_MESSAGES= localedata configuration for translation of yes and no messages. LC_NUMERIC= localedata configuration for non-monetary numeric data. LC_MONETARY= localedata configuration for monetary data. LC_TIME= localedata configuration for date and time. LC_ALL= localedata configuration overriding all of the above. LANGUAGE= can be a : separated list of ISO language codes. LINGUAS= can be a ' ' separated list of ISO language codes. SYSFONT= any font that is legal when used as /usr/bin/consolechars -f $SYSFONT ... (See console-tools package for consolechars command) UNIMAP= any SFM (screen font map, formerly called Unicode mapping table - see consolechars(8)) /usr/bin/consolechars -f $SYSFONT --sfm $UNIMAP SYSFONTACM= any ACM (application charset map - see consolechars(8)) /usr/bin/consolechars -f $SYSFONT --acm $SYSFONTACM The above is used by the /sbin/setsysfont command (which is run by rc.sysinit at boot time.) /etc/sysconfig/network-scripts/ifup: /etc/sysconfig/network-scripts/ifdown: These are symbolic links to /sbin/ifup and /sbin/ifdown, respectively. These symlinks are here for legacy purposes only. They will probably be removed in future versions. These scripts take one argument normally: the name of the device (e.g. eth0). They are called with a second argument of "boot" during the boot sequence so that devices that are not meant to be brought up on boot (ONBOOT=no, see below) can be ignored at that time. /etc/sysconfig/network-scripts/network-functions This is not really a public file. Contains functions which the scripts use for bringing interfaces up and down. In particular, it contains most of the code for handling alternative interface configurations and interface change notification through netreport. /etc/sysconfig/network-scripts/ifcfg-interface /etc/sysconfig/network-scripts/ifcfg-interface-clone Defines an interface. An example file called ifcfg-eth0: DEVICE="eth0" IPADDR="10.1.0.153" NETMASK="255.255.0.0" ONBOOT="yes" BOOTPROTO="none" IPXNETNUM_802_2="" IPXPRIMARY_802_2="no" IPXACTIVE_802_2="no" IPXNETNUM_802_3="" IPXPRIMARY_802_3="no" IPXACTIVE_802_3="no" IPXNETNUM_ETHERII="" IPXPRIMARY_ETHERII="no" IPXACTIVE_ETHERII="no" IPXNETNUM_SNAP="" IPXPRIMARY_SNAP="no" IPXACTIVE_SNAP="no" The /etc/sysconfig/network-scripts/ifcfg-interface-clone file only contains the parts of the definition that are different in a "clone" (or alternative) interface. For example, the network numbers might be different, but everything else might be the same, so only the network numbers would be in the clone file, but all the device information would be in the base ifcfg file. Base items in the above two files: NAME="friendly name for users to see" - Most important for PPP. Only used in front ends. DEVICE="name of physical device" IPADDR= NETMASK= GATEWAY= ONBOOT=yes|no USERCTL=yes|no BOOTPROTO=none|bootp|dhcp - If BOOTPROTO is not "none", then the only other item that must be set is the DEVICE item; all the rest will be determined by the boot protocol. No "dummy" entries need to be created. Base items being deprecated: NETWORK="will be calculated automatically with ifcalc" BROADCAST="will be calculated automatically with ifcalc" Ethernet-only items: {IPXNETNUM,IPXPRIMARY,IPXACTIVE}_{802_2,802_3,ETHERII,SNAP} configuration matrix for IPX. Only used if IPX is active. Managed from /etc/sysconfig/network-scripts/ifup-ipx PPP/SLIP items: PERSIST=yes|no MODEMPORT=device - An example device is /dev/modem. LINESPEED=speed - An example speed is 115200. DEFABORT=yes|no - Tells netcfg whether or not to put default abort strings in when creating/editing the chat script and/or dip script for this interface. PPP-specific items WVDIALSECT="list of sections from wvdial.conf to use" - If this variable is set, then the chat script (if it exists) is ignored, and wvdial is used to open the PPP connection. PEERDNS=yes|no - Modify /etc/resolv.conf if peer uses msdns extension. DEFROUTE=yes|no - Set this interface as default route? ESCAPECHARS=yes|no -Simplified interface here doesn't let people specify which characters to escape; almost everyone can use asyncmap 00000000 anyway, and they can set PPPOPTIONS to asyncmap foobar if they want to set options perfectly). HARDFLOWCTL=yes|no - Yes implies "modem crtscts" options. PPPOPTIONS="arbitrary option string" - It is placed last on the command line, so it can override other options like asyncmap that were specified differently. PAPNAME="name $PAPNAME" - On pppd command line. Note that the "remotename" option is always specified as the logical ppp device name, like "ppp0" (which might perhaps be the physical device ppp1 if some other ppp device was brought up earlier...), which makes it easy to manage pap/chap files -- name/password pairs are associated with the logical ppp device name so that they can be managed together. REMIP="remote ip address" - Normally unspecified. MTU= MRU= DISCONNECTTIMEOUT="number of seconds" The current default is 5. This is the time to wait before re-establishing the connection after a successfully-connected session terminates before attempting to establish a new connection. RETRYTIMEOUT="number of seconds" - The current default is 60. This is the time to wait before re-attempting to establish a connection after a previous attempt fails. /etc/sysconfig/network-scripts/chat-interface - This is the chat script for PPP or SLIP connection intended to establish the connection. For SLIP devices, a DIP script is written from the chat script; for PPP devices, the chat script is used directly. /etc/sysconfig/network-scripts/dip-interface A write-only script created from the chat script by netcfg. Do not modify this. In the future, this file may disappear by default and created on-the-fly from the chat script if it does not exist. /etc/sysconfig/network-scripts/ifup-post Called when any network device EXCEPT a SLIP device comes up. Calls /etc/sysconfig/network-scripts/ifup-routes to bring up static routes that depend on that device. Calls /etc/sysconfig/network-scripts/ifup-aliases to bring up aliases for that device. Sets the hostname if it is not already set and a hostname can be found for the IP for that device. Sends SIGIO to any programs that have requested notification of network events. It could be extended to fix up nameservice configuration, call arbitrary scripts, etc, as needed. /etc/sysconfig/network-scripts/ifup-routes Set up static routes for a device. An example file: #!/bin/sh # adds static routes which go through device $1 if [ "$1" = "" ]; then echo "usage: $0 " exit 1 fi if [ ! -f /etc/sysconfig/static-routes ]; then exit 0 fi #note the trailing space in the grep gets rid of aliases grep "^$1 " /etc/sysconfig/static-routes | while read device args; do /sbin/route add -$args $device done /etc/sysconfig/network-scripts/ifup-aliases Bring up aliases for a device. /etc/sysconfig/network-scripts/ifdhcpc-done Called by dhcpcd once dhcp configuration is complete; sets up /etc/resolv.conf from the version dhcpcd dropped in /etc/dhcpc/resolv.conf Note 3: ------- Red Hat Linux 8.0: The Official Red Hat Linux Reference Guide Prev Chapter 3. Boot Process, Init, and Shutdown Next -------------------------------------------------------------------------------- The /etc/sysconfig/ Directory The following information outlines some of the files found in the /etc/sysconfig/ directory, their function, and their contents. This information is not intended to be complete, as many of these files have a variety of options that are only used in very specific or rare circumstances. The /usr/share/doc/initscripts-/sysconfig.txt file contains a more authoritative listing of the files found in the /etc/sysconfig directory and the configuration options available. Files in the /etc/sysconfig/ Directory The following files are normally found in the /etc/sysconfig/ directory: amd apmd arpwatch authconfig cipe clock desktop dhcpd firstboot gpm harddisks hwconf i18n identd init ipchains iptables irda keyboard kudzu mouse named netdump network ntpd pcmcia radvd rawdevices redhat-config-users redhat-logviewer samba sendmail soundcard squid tux ups vncservers xinetd It is possible that your system may be missing a few of them if the corresponding program that would need that file is not installed. Next, we will take a look at each one. /etc/sysconfig/amd The /etc/sysconfig/amd file contains various parameters used by amd allowing for the automounting and automatic unmounting of file systems. /etc/sysconfig/apmd The /etc/sysconfig/apmd file is used by apmd as a configuration for what things to start/stop/change on suspend or resume. It is set up to turn on or off apmd during startup, depending on whether your hardware supports Advanced Power Management (APM) or if you choose not to use it. apm is a monitoring daemon that works with power management code within the Linux kernel. It can alert you to a low battery if you are using Red Hat Linux on a laptop, among other things. /etc/sysconfig/arpwatch The /etc/sysconfig/arpwatch file is used to pass arguments to the arpwatch daemon at boot time. The arpwatch daemon maintains a table of Ethernet MAC addresses and their IP address pairings. For more information about what parameters you can use in this file, type man arpwatch. By default, this file sets the owner of the arpwatch process to the user pcap. /etc/sysconfig/authconfig The /etc/sysconfig/authconfig file sets the kind of authorization to be used on the host. It contains one or more of the following lines: USEMD5=, where is one of the following: yes - MD5 is used for authentication. no - MD5 is not used for authentication. USEKERBEROS=, where is one of the following: yes - Kerberos is used for authentication. no - Kerberos is not used for authentication. USELDAPAUTH=, where is one of the following: yes - LDAP is used for authentication. no - LDAP is not used for authentication. /etc/sysconfig/clock The /etc/sysconfig/clock file controls the interpretation of values read from the system hardware clock. The correct values are: UTC=, where is one of the following boolean values: true or yes - Indicates that the hardware clock is set to Universal Time. false or no - Indicates that the hardware clock is set to local time. ARC=, where is the following: true or yes - Indicates the ARC console's 42-year time offset is in effect. This setting is only for ARC- or AlphaBIOS-based Alpha systems. Any other value indicates that the normal UNIX epoch is in use. SRM=, where is the following: true or yes - Indicates the SRM console's 1900 epoch is in effect. This setting is only for SRM-based Alpha systems. Any other value indicates that the normal UNIX epoch is in use. ZONE= - Indicates the timezone file under /usr/share/zoneinfo that /etc/localtime is a copy of, such as: ZONE="America/New York" Earlier releases of Red Hat Linux used the following values (which are deprecated): CLOCKMODE=, where is one of the following: GMT - Indicates that the clock is set to Universal Time (Greenwich Mean Time). ARC - Indicates the ARC console's 42-year time offset is in effect (for Alpha-based systems only). /etc/sysconfig/desktop The /etc/sysconfig/desktop file specifies the desktop manager to be run, such as: DESKTOP="GNOME" /etc/sysconfig/dhcpd The /etc/sysconfig/dhcpd file is used to pass arguments to the dhcpd daemon at boot time. The dhcpd daemon implements the Dynamic Host Configuration Protocol (DHCP) and the Internet Bootstrap Protocol (BOOTP). DHCP and BOOTP assign hostnames to machines on the network. For more information about what parameters you can use in this file, type man dhcpd. /etc/sysconfig/firstboot Beginning with Red Hat Linux 8.0, the first time you boot the system, the /sbin/init program calls the etc/rc.d/init.d/firstboot script. This allows the user to install additional applications and documentation before the boot process completes. The /etc/sysconfig/firstboot file tells the firstboot command not to run on subsequent reboots. If you want firstboot to run the next time you boot the system, simply remove /etc/sysconfig/firstboot and execute chkconfig --level 5 firstboot on. /etc/sysconfig/gpm The /etc/sysconfig/gpm file is used to pass arguments to the gpm daemon at boot time. The gpm daemon is the mouse server which allows mouse acceleration and middle-click pasting. For more information about what parameters you can use in this file, type man gpm. By default, it sets the mouse device to /dev/mouse. /etc/sysconfig/harddisks The /etc/sysconfig/harddisks file allows you to tune your hard drive(s). You can also use / etc/sysconfig/hardiskhd[a-h], to configure parameters for specific drives. Warning Do not make changes to this file lightly. If you change the default values stored here, you could corrupt all of the data on your hard drive(s). The /etc/sysconfig/harddisks file may contain the following: USE_DMA=1, where setting this to 1 enables DMA. However, with some chipsets and hard drive combinations, DMA can cause data corruption. Check with your hard drive documentation or manufacturer before enabling this. Multiple_IO=16, where a setting of 16 allows for multiple sectors per I/O interrupt. When enabled, this feature reduces operating system overhead by 30-50%. Use with caution. EIDE_32BIT=3 enables (E)IDE 32-bit I/O support to an interface card. LOOKAHEAD=1 enables drive read-lookahead. EXTRA_PARAMS= specifies where extra parameters can be added. /etc/sysconfig/hwconf The /etc/sysconfig/hwconf file lists all the hardware that kudzu detected on your system, as well as the drivers used, vendor ID and device ID information. The kudzu program detects and configures new and/or changed hardware on a system. The /etc/sysconfig/hwconf file is not meant to be manually edited. If you do edit it, devices could suddenly show up as being added or removed. /etc/sysconfig/i18n The /etc/sysconfig/i18n file sets the default language, such as: LANG="en_US" /etc/sysconfig/identd The /etc/sysconfig/identd file is used to pass arguments to the identd daemon at boot time. The identd daemon returns the username of processes with open TCP/IP connections. Some services on the network, such as FTP and IRC servers, will complain and cause slow responses if identd is not running. But in general, identd is not a required service, so if security is a concern, you should not run it. For more information about what parameters you can use in this file, type man identd. By default, the file contains no parameters. /etc/sysconfig/init The /etc/sysconfig/init file controls how the system will appear and function during the boot process. The following values may be used: BOOTUP=, where is one of the following: BOOTUP=color means the standard color boot display, where the success or failure of devices and services starting up is shown in different colors. BOOTUP=verbose means an old style display, which provides more information than purely a message of success or failure. Anything else means a new display, but without ANSI-formatting. RES_COL=, where is the number of the column of the screen to start status labels. Defaults to 60. MOVE_TO_COL=, where moves the cursor to the value in the RES_COL line. Defaults to ANSI sequences output by echo -e. SETCOLOR_SUCCESS=, where sets the color to a color indicating success. Defaults to ANSI sequences output by echo -e, setting the color to green. SETCOLOR_FAILURE=, where sets the color to a color indicating failure. Defaults to ANSI sequences output by echo -e, setting the color to red. SETCOLOR_WARNING=, where sets the color to a color indicating warning. Defaults to ANSI sequences output by echo -e, setting the color to yellow. SETCOLOR_NORMAL=, where sets the color to 'normal'. Defaults to ANSI sequences output by echo -e. LOGLEVEL=, where sets the initial console logging level for the kernel. The default is 7; 8 means everything (including debugging); 1 means nothing except kernel panics. syslogd will override this once it starts. PROMPT=, where is one of the following boolean values: yes - Enables the key check for interactive mode. no - Disables the key check for interactive mode. /etc/sysconfig/ipchains The /etc/sysconfig/ipchains file contains information used by the kernel to set up ipchains packet filtering rules at boot time or whenever the service is started. This file is modified by typing the command /sbin/service ipchains save when valid ipchains rules are in place. You should not manually edit this file. Instead, use the /sbin/ipchains command to configure the necessary packet filtering rules and then save the rules to this file using /sbin/service ipchains save. Use of ipchains to set up firewall rules is not recommended as it is deprecated and may disappear from future releases of Red Hat Linux. If you need a firewall, you should use iptables instead. /etc/sysconfig/iptables Like /etc/sysconfig/ipchains, the /etc/sysconfig/iptables file stores information used by the kernel to set up packet filtering services at boot time or whenever the service is started. You should not modify this file by hand unless you are familiar with how to construct iptables rules. The simplest way to add rules is to use the /usr/sbin/lokkit command or the gnome-lokkit graphical application to create your firewall. Using these applications will automatically edit this file at the end of the process. If you wish, you can manually create rules using /sbin/iptables and then type /sbin/service iptables save to add the rules to the /etc/sysconfig/iptables file. Once this file exists, any firewall rules saved there will persist through a system reboot or a service restart. For more information on iptables see Chapter 13. /etc/sysconfig/irda The /etc/sysconfig/irda file controls how infrared devices on your system are configured at startup. The following values may be used: IRDA=, where is one of the following boolean values: yes - irattach will be run, which periodically checks to see if anything is trying to connect to the infrared port, such as another notebook computer trying to make a network connection. For infrared devices to work on your system, this line must be set to yes. no - irattach will not be run, preventing infrared device communication. DEVICE=, where is the device (usually a serial port) that handles infrared connections. DONGLE=, where specifies the type of dongle being used for infrared communication. This setting exists for people who use serial dongles rather than real infrared ports. A dongle is a device that is attached to a traditional serial port to communicate via infrared. This line is commented out by default because notebooks with real infrared ports are far more common than computers with add-on dongles. DISCOVERY=, where is one of the following boolean values:d yes - Starts irattach in discovery mode, meaning it actively checks for other infrared devices. This needs to be turned on for the machine to be actively looking for an infrared connection (meaning the peer that does not initiate the connection). no - Does not start irattach in discovery mode. /etc/sysconfig/keyboard The /etc/sysconfig/keyboard file controls the behavior of the keyboard. The following values may be used: KEYBOARDTYPE=sun|pc, which is used on SPARCs only. sun means a Sun keyboard is attached on /dev/kbd, and pc means a PS/2 keyboard connected to a PS/2 port. KEYTABLE=, where is the name of a keytable file. For example: KEYTABLE="us". The files that can be used as keytables start in /lib/kbd/keymaps/i386 and branch into different keyboard layouts from there, all labeled .kmap.gz. The first file found beneath /lib/kbd/keymaps/i386that matches the KEYTABLE setting is used. /etc/sysconfig/kudzu The /etc/sysconfig/kuzdu allows you to specify a safe probe of your system's hardware by kudzu at boot time. A safe probe is one that disables serial port probing. SAFE=, where is one of the following: yes - kuzdu does a safe probe. no - kuzdu does a normal probe. /etc/sysconfig/mouse The /etc/sysconfig/mouse file is used to specify information about the available mouse. The following values may be used: FULLNAME=, where refers to the full name of the kind of mouse being used. MOUSETYPE=, where is one of the following: microsoft - A MicrosoftT mouse. mouseman - A MouseManT mouse. mousesystems - A Mouse SystemsT mouse. ps/2 - A PS/2 mouse. msbm - A MicrosoftT bus mouse. logibm - A LogitechT bus mouse. atibm - An ATIT bus mouse. logitech - A LogitechT mouse. mmseries - An older MouseManT mouse. mmhittab - An mmhittab mouse. XEMU3=, where is one of the following boolean values: yes - The mouse only has two buttons, but three mouse buttons should be emulated. no - The mouse already has three buttons. XMOUSETYPE=, where refers to the kind of mouse used when X is running. The options here are the same as the MOUSETYPE setting in this same file. DEVICE=, where is the mouse device. In addition, /dev/mouse is a symbolic link that points to the actual mouse device. /etc/sysconfig/named The /etc/sysconfig/named file is used to pass arguments to the named daemon at boot time. The named daemon is a Domain Name System (DNS) server which implements the Berkeley Internet Name Domain (BIND) version 9 distribution. This server maintains a table of which hostnames are associated with IP addresses on the network. Currently, only the following values may be used: ROOTDIR="", where refers to the full directory path of a configured chroot environment under which named will run. This chroot environment must first be configured. Type info chroot for more information on how to do this. OPTIONS="", where any option listed in the man page for named except -t. In place of -t, use the ROOTDIR line above instead. For more information about what parameters you can use in this file, type man named. For detailed information on how to configure a BIND DNS server, see Chapter 16. By default, the file contains no parameters. /etc/sysconfig/netdump The /etc/sysconfig/netdump file is the configuration file for the /etc/init.d/netdump service. The netdump service sends both oops data and memory dumps over the network. In general, netdump is not a required service, so you should only run it if you absolutely need to. For more information about what parameters you can use in this file, type man netdump. /etc/sysconfig/network The /etc/sysconfig/network file is used to specify information about the desired network configuration. The following values may be used: NETWORKING=, where is one of the following boolean values: yes - Networking should be configured. no - Networking should not be configured. HOSTNAME=, where should be the Fully Qualified Domain Name (FQDN), such as hostname.domain.com, but can be whatever hostname you want. Note For compatibility with older software that people might install (such as trn), the /etc/HOSTNAME file should contain the same value as here. GATEWAY=, where is the IP address of the network's gateway. GATEWAYDEV=, where is the gateway device, such as eth0. NISDOMAIN=, where is the NIS domain name. /etc/sysconfig/ntpd The /etc/sysconfig/ntpd file is used to pass arguments to the ntpd daemon at boot time. The ntpd daemon sets and maintains the system clock to synchronize with an Internet standard time server. It implements version 4 of the Network Time Protocol (NTP). For more information about what parameters you can use in this file, point a browser at the following file: /usr/share/doc/ntp-/ntpd.htm (where is the version number of ntpd). By default, this file sets the owner of the ntpd process to the user ntp. /etc/sysconfig/pcmcia The /etc/sysconfig/pcmcia file is used to specify PCMCIA configuration information. The following values may be used: PCMCIA=, where is one of the following: yes - PCMCIA support should be enabled. no - PCMCIA support should not be enabled. PCIC=, where is one of the following: i82365 - The computer has an i82365-style PCMCIA socket chipset. tcic - The computer has a tcic-style PCMCIA socket chipset. PCIC_OPTS=, where is the socket driver (i82365 or tcic) timing parameters. CORE_OPTS=, where is the list of pcmcia_core options. CARDMGR_OPTS=, where is the list of options for the PCMCIA cardmgr (such as -q for quiet mode; -m to look for loadable kernel modules in the specified directory, and so on). Read the cardmgr man page for more information. /etc/sysconfig/radvd The /etc/sysconfig/radvd file is used to pass arguments to the radvd daemon at boot time. The radvd daemon listens to for router requests and sends router advertisements for the IP version 6 protocol. This service allows hosts on a network to dynamically change their default routers based on these router advertisements. For more information about what parameters you can use in this file, type man radvd. By default, this file sets the owner of the radvd process to the user radvd. /etc/sysconfig/rawdevices The /etc/sysconfig/rawdevices file is used to configure raw device bindings, such as: /dev/raw/raw1 /dev/sda1 /dev/raw/raw2 8 5 /etc/sysconfig/redhat-config-users The /etc/sysconfig/redhat-config-users file is the configuration file for the graphical application, User Manager. Under Red Hat Linux 8.0 this file is used to filter out system users such as root, daemon, or lp. This file is edited by the Preferences => Filter system users and groups pull-down menu in the User Manager application and should not be edited by hand. For more information on using this application, see the chapter called User and Group Configuration in the Official Red Hat Linux Customization Guide. /etc/sysconfig/redhat-logviewer The /etc/sysconfig/redhat-logviewer file is the configuration file for the graphical, interactive log viewing application, Log Viewer. This file is edited by the Edit => Preferences pull-down menu in the Log Viewer application and should not be edited by hand. For more information on using this application, see the chapter called Log Files in the Official Red Hat Linux Customization Guide. /etc/sysconfig/samba The /etc/sysconfig/samba file is used to pass arguments to the smbd and the nmbd daemons at boot time. The smbd daemon offers file sharing connectivity for Windows clients on the network. The nmbd daemon offers NetBIOS over IP naming services. For more information about what parameters you can use in this file, type man smbd. By default, this file sets smbd and nmbd to run in daemon mode. /etc/sysconfig/sendmail The /etc/sysconfig/sendmail file allows messages to be sent to one or more recipients, routing the message over whatever networks are necessary. The file sets the default values for the Sendmail application to run. Its default values are to run as a background daemon, and to check its queue once an hour in case something has backed up. The following values may be used: DAEMON=, where is one of the following boolean values: yes - Sendmail should be configured to listen to port 25 for incoming mail. yes implies the use of Sendmail's -bd options. no - Sendmail should not be configured to listen to port 25 for incoming mail. QUEUE=1h which is given to Sendmail as -q$QUEUE. The -q option is not given to Sendmail if /etc/sysconfig/sendmail exists and QUEUE is empty or undefined. /etc/sysconfig/soundcard The /etc/sysconfig/soundcard file is generated by sndconfig and should not be modified. The sole use of this file is to determine what card entry in the menu to pop up by default the next time sndconfig is run. Sound card configuration information is located in the /etc/modules.conf file. It may contain the following: CARDTYPE=, where is set to, for example, SB16 for a Soundblaster 16 sound card. /etc/sysconfig/squid The /etc/sysconfig/squid file is used to pass arguments to the squid daemon at boot time. The squid daemon is a proxy caching server for Web client applications. For more information on configuring a squid proxy server, use a Web browser to open the /usr/share/doc/squid-/ directory (replace with the squid version number installed on your system). By default, this file sets squid top start in daemon mode and sets the amount of time before it shuts itself down. /etc/sysconfig/tux The /etc/sysconfig/tux file is the configuration file for the Red Hat Content Accelerator (formerly known as TUX), the kernel-based web server. For more information on configuring the Red Hat Content Accelerator, use a Web browser to open the /usr/share/doc/tux-/tux/index.html (replace with the version number of TUX installed on your system). The parameters available for this file are listed in /usr/share/doc/tux-/tux/parameters.html. /etc/sysconfig/ups The /etc/sysconfig/ups file is used to specify information about any Uninterruptible Power Supplies (UPS) connected to your system. A UPS can be very valuable for a Red Hat Linux system because it gives you time to correctly shut down the system in the case of power interruption. The following values may be used: SERVER=, where is one of the following: yes - A UPS device is connected to your system. no - A UPS device is not connected to your system. MODEL=, where must be one of the following or set to NONE if no UPS is connected to the system: apcsmart - For a APC SmartUPST or similar device. fentonups - For a Fenton UPST. optiups - For an OPTI-UPST device. bestups - For a Best PowerT UPS. genericups - For a generic brand UPS. ups-trust425+625 - For a TrustT UPS. DEVICE=, where specifies where the UPS is connected, such as /dev/ttyS0. OPTIONS=, where is a special command that needs to be passed to the UPS. /etc/sysconfig/vncservers The /etc/sysconfig/vncservers file configures the way the Virtual Network Computing (VNC) server starts up. VNC is a remote display system which allows you to view a desktop environment not only on the machine where it is running but across different networks on a variety of architectures. It may contain the following: VNCSERVERS=, where is set to something like "1:fred", to indicate that a VNC server should be started for user fred on display :1. User fred must have set a VNC password using vncpasswd before attempting to connect to the remote VNC server. Note that when you use a VNC server, your communication with it is unencrypted, and so it should not be used on an untrusted network. For specific instructions concerning the use of SSH to secure the VNC communication, please read the information found at http://www.uk.research.att.com/vnc/sshvnc.html. To find out more about SSH, see Chapter 9 or Official Red Hat Linux Customization Guide. /etc/sysconfig/xinetd The /etc/sysconfig/xinetd file is used to pass arguments to the xinetd daemon at boot time. The xinetd daemon starts programs that provide Internet services when a request to the port for that service is received. For more information about what parameters you can use in this file, type man xinetd. For more information on the xinetd service, see the Section called Access Control Using xinetd in Chapter 8. Directories in the /etc/sysconfig/ Directory The following directories are normally found in /etc/sysconfig/ and a basic description of what they contain: apm-scripts - This contains the Red Hat APM suspend/resume script. You should not edit this file directly. If you need customization, simple create a file called /etc/sysconfig/apm-scripts/apmcontinue and it will be called at the end of the script. Also, you can control the script by editing /etc/sysconfig/apmd. cbq - This directory contains the configuration files needed to do Class Based Queuing for bandwidth management on network interfaces. networking - This directory is used by the Network Administration Tool (redhat-config-network) and its contents should not be edited manually. For more information about configuring network interfaces using the Network Administration Tool, see the chapter called Network Configuration in the Official Red Hat Linux Customization Guide. network-scripts - This directory contains the following network-related configuration files: Network configuration files for each configured network interface, such as ifcfg-eth0 for the eth0 Ethernet interface. Scripts used to bring up and down network interfaces, such as ifup and ifdown. Scripts used to bring up and down ISDN interfaces, such as ifup-isdn and ifdown-isdn Various shared network function scripts which should not be edited directly. For more information on the network-scripts directory, see Chapter 12 rhn - This directory contains the configuration files and GPG keys for the Red Hat Network. No files in this directory should be edited by hand. For more information on the Red Hat Network, see the Red Hat Network website at the following URL: https://rhn.redhat.com. AIX kernel parameters: --------------------- Througout this document, you can find many AIX kernel parameter statements. Most commands are related to retrieving or changing attributes on the sys0 object. For example, take a look at the following example: maxuproc: Specifies the maximum number of processes per user ID. Values: Default: 40; Range: 1 to 131072 Display: lsattr -E -l sys0 -a maxuproc Change: chdev -l sys0 -a maxuproc=NewValue Change takes effect immediately and is preserved over boot. If value is reduced, then it goes into effect only after a system boot. Diagnosis: Users cannot fork any additional processes. Tuning: This is a safeguard to prevent users from creating too many processes. Kernel Tunable Parameters Following are kernel parameters, grouped into the following sections: -Scheduler and Memory Load Control Tunable Parameters -Virtual Memory Manager Tunable Parameters -Synchronous I/O Tunable Parameters -Asynchronous I/O Tunable Parameters -Disk and Disk Adapter Tunable Parameters -Interprocess Communication Tunable Parameters -Scheduler and Memory Load Control Tunable Parameters -Most of the scheduler and memory load control tunable parameters are fully described in the schedo man page. -The following are a few other related parameters: ========================================================== >>>> Some important HPUX filesystem related kernel params: ========================================================== nfile: ------ nfile defines the maximum number of files that can be open simultaneously, system-wide, at any given time. Acceptable Values: Minimum 14 Maximum Memory limited Default ((16*(Nproc+16+MaxUsers)/10)+32+2*(Npty+Nstrpty) Specify integer value or use integer formula expression. For more information, see Specifying Parameter Values. Description nfile defines the maximum number files that can be open at any one time, system-wide. It is the number of slots in the file descriptor table. Be generous with this number because the required memory is minimal, and not having enough slots restricts system processing capacity. Related Parameters and System Factors The value used for nfile must be sufficient to service the number of users and processes allowed by the combination of nproc, maxusers, npty , and nstrpty. Every process uses at least three file descriptors per process (standard input, standard output, and standard error). Every process has two pipes per process (one per side), each of which requires a pty. Stream pipes also use s treams ptys which are limited by nstrpty. Other HP-UX kernel parameters: ============================== Take especially notice of the parameters nfile, nflocks, ninodes, nprocs. They determine how many open files, open locks, simultaneous processes are possible *system-wide*. Too low values may result in HP-UX errors when dealing with larger databases, huge App Servers and the like. Entering Values: Use the kcweb web interface or the kmtune command to view and change values. kcweb is described in the kcweb(1M) manpage and in the program's help topics. You can run kcweb from the command line or from the System Administration Manager (SAM); see sam(1M). You run kmtune from the command line; see kmtune(1M) for details. Accounting acctresume Resume accounting when free space on the file system where accounting log files reside rises above acctresume plus minfree percent of total usable file system size. Manpage: acctsuspend(5). Accounting acctsuspend Suspend accounting when free space on the file system where accounting log files reside drops below acctsuspend plus minfree percent of total usable file system size. Manpage: acctsuspend(5). Asynchronous I/O aio_listio_max Maximum number of POSIX asynchronous I/O operations allowed in a single lio_listio() call. Manpage: aio_listio_max(5). Asynchronous I/O aio_max_ops System-wide maximum number of POSIX asynchronous I/O operations allowed at one time. Manpage: aio_max_ops(5). Asynchronous I/O aio_physmem_pct Maximum percentage of total system memory that can be locked for use in POSIX asynchronous I/O operations. Manpage: aio_physmem_pct(5). Asynchronous I/O aio_prio_delta_max Maximum priority offset (slowdown factor) allowed in a POSIX asynchronous I/O control block (aiocb). Manpage: aio_prio_delta_max(5). Memory Paging allocate_fs_swapmap Enable or disable preallocation of file system swap space when swapon() is called as opposed to allocating swap space when malloc() is called. Enabling allocation reduces risk of insufficient swap space and is used primarily where high availability is important. Manpage: allocate_fs_swapmap(5). Kernel Crash Dump alwaysdump Select which classes of system memory pages are to be dumped if a kernel panic occurs. Manpage: alwaysdump(5). Spinlock Pool bufcache_hash_locks Buffer-cache spinlock pool. NO MANPAGE. File System: Buffer bufpages Number of 4 KB pages in file system static buffer cache. Manpage: bufpages(5). Spinlock Pool chanq_hash_locks Channel queue spinlock pool. Manpage: chanq_hash_locks(5). IPC: Share core_addshmem_read Flag to include readable shared memory in a process core dump. Manpage: core_addshmem_read(5). IPC: Share core_addshmem_write Flag to include read/write shared memory in a process core dump. Manpage: core_addshmem_write(5). Miscellaneous: Links create_fastlinks Create fast symbolic links using a newer, more efficient format to improve access speed by reducing disk block accesses during path name look-up sequences. Manpage: create_fastlinks(5). File System: Buffer dbc_max_pct Maximum percentage of memory for dynamic buffer cache. Manpage: dbc_max_pct(5). File System: Buffer dbc_min_pct Minimum percentage of memory for dynamic buffer cache. Manpage: dbc_min_pct(5). Miscellaneous: Disk I/O default_disk_ir Immediate reporting for disk writes; whether a write() returns immediately after the data is placed in the disk's write buffer or waits until the data is physically stored on the disk media. Manpage: default_disk_ir(5). File System: Buffer disksort_seconds Maximum wait time for disk requests. NO MANPAGE. Miscellaneous: Disk I/O dma32_pool_size Amount of memory to set aside for 32-bit DMA (bytes). Manpage: dma32_pool_size(5). Spinlock Pool dnlc_hash_locks Number of locks for directory cache synchronization. NO MANPAGE. Kernel Crash Dump dontdump Select which classes of system memory pages are not to be dumped if a kernel panic occurs. Manpage: dontdump(5). Miscellaneous: Clock dst Enable/disable daylight savings time. Manpage: timezone(5). Miscellaneous: IDS enable_idds Flag to enable the IDDS daemon, which gathers data for IDS/9000. Manpage: enable_idds(5). Miscellaneous: Memory eqmemsize Number of pages of memory to be reserved for equivalently mapped memory, used mostly for DMA transfers. Manpage: eqmemsize(5). ProcessMgmt: Process executable_stack Allows or denies program execution on the stack. Manpage: executable_stack(5). File System: Write fs_async Enable/disable asynchronous writes of file system data structures to disk. Manpage: fs_async(5). Spinlock Pool ftable_hash_locks File table spinlock pool. NO MANPAGE. Spinlock Pool hdlpreg_hash_locks Set the size of the pregion spinlock pool. Manpage: hdlpreg_hash_locks(5). File System: Read hfs_max_ra_blocks The maximum number of read-ahead blocks that the kernel may have outstanding for a single HFS file system. Manpage: hfs_max_ra_blocks(5). File System: Read hfs_max_revra_blocks The maximum number of reverse read-ahead blocks that the kernel may have outstanding for a single HFS file system. Manpage: hfs_max_revra_blocks(5). File System: Read hfs_ra_per_disk The amount of HFS file system read-ahead per disk drive, in KB. Manpage: hfs_ra_per_disk(5). File System: Read hfs_revra_per_disk The amount of memory (in KB) for HFS reverse read-ahead operations, per disk drive. Manpage: hfs_revra_per_disk(5). File System: Read hp_hfs_mtra_enabled Enable or disable HFS multithreaded read-ahead. NO MANPAGE. Kernel Crash Dump initmodmax Maximum size of the dump table of dynamically loaded kernel modules. Manpage: initmodmax(5). Spinlock Pool io_ports_hash_locks I/O port spinlock pool. NO MANPAGE. Miscellaneous: Queue ksi_alloc_max Maximum number of system-wide queued signals that can be allocated. Manpage: ksi_alloc_max(5). Miscellaneous: Queue ksi_send_max Maximum number of queued signals that a process can send and have pending at one or more receivers. Manpage: ksi_send_max(5). ProcessMgmt: Memory maxdsiz Maximum process data storage segment space that can be used for statics and strings, as well as dynamic data space allocated by sbrk() and malloc() (32-bit processes). Manpage: maxdsiz(5). ProcessMgmt: Memory maxdsiz_64bit Maximum process data storage segment space that can be used for statics and strings, as well as dynamic data space allocated by sbrk() and malloc() (64-bit processes). Manpage: maxdsiz(5). File System: Open/Lock maxfiles Soft limit on how many files a single process can have opened or locked at any given time. Manpage: maxfiles(5). File System: Open/Lock maxfiles_lim Hard limit on how many files a single process can have opened or locked at any given time. Manpage: maxfiles_lim(5). ProcessMgmt: Memory maxrsessiz Maximum size (in bytes) of the RSE stack for any user process on the IPF platform. Manpage: maxrsessiz(5). ProcessMgmt: Memory maxrsessiz_64bit Maximum size (in bytes) of the RSE stack for any user process on the IPF platform. Manpage: maxrsessiz(5). ProcessMgmt: Memory maxssiz Maximum dynamic storage segment (DSS) space used for stack space (32-bit processes). Manpage: maxssiz(5). ProcessMgmt: Memory maxssiz_64bit Maximum dynamic storage segment (DSS) space used for stack space (64-bit processes). Manpage: maxssiz(5). ProcessMgmt: Memory maxtsiz Maximum allowable process text segment size, used by unchanging executable-code (32-bit processes). Manpage: maxtsiz(5). ProcessMgmt: Memory maxtsiz_64bit Maximum allowable process text segment size, used by unchanging executable-code (64-bit processes). Manpage: maxtsiz(5). ProcessMgmt: Process maxuprc Maximum number of processes that any single user can have running at the same time, including login shells, user interface processes, running programs and child processes, I/O processes, etc. If a user is using multiple, simultaneous logins under the same login name (user ID) as is common in X Window, CDE, or Motif environments, all processes are combined, even though they may belong to separate process groups. Processes that detach from their parent process group, where that is possible, are not counted after they detach (line printer spooler jobs, certain specialized applications, etc.). Manpage: maxuprc(5). Miscellaneous: Users maxusers Maximum number of users expected to be logged in on the system at one time; used by other system parameters to allocate system resources. Manpage: maxusers(5). File System: LVM maxvgs Maximum number of volume groups configured by the Logical Volume Manager on the system. Manpage: maxvgs(5). Accounting max_acct_file_size Maximum size of the accounting file. Manpage: max_acct_file_size(5). Asynchronous I/O max_async_ports System-wide maximum number of ports to the asynchronous disk I/O driver that processes can have open at any given time. Manpage: max_async_ports(5). Memory Paging max_mem_window Maximum number of group-private 32-bit shared memory windows. Manpage: max_mem_window(5). ProcessMgmt: Threads max_thread_proc Maximum number of threads that any single process can create and have running at the same time. Manpage: max_thread_proc(5). IPC: Message mesg Enable or disable IPC messages at system boot time. Manpage: mesg(5). Kernel Crash Dump modstrmax Maximum size, in bytes, of the savecrash kernel module table that contains module names and their locations in the file system. Manpage: modstrmax(5). IPC: Message msgmap Size of free-space resource map for allocating shared memory space for messages. Manpage: msgmap(5). IPC: Message msgmax System-wide maximum size (in bytes) for individual messages. Manpage: msgmax(5). IPC: Message msgmnb Maximum combined size (in bytes) of all messages that can be queued simultaneously in a message queue. Manpage: msgmnb(5). IPC: Message msgmni Maximum number of message queues allowed on the system at any given time. Manpage: msgmni(5). IPC: Message msgseg Maximum number of message segments that can exist on the system. Manpage: msgseg(5). IPC: Message msgssz Message segment size in bytes. Manpage: msgssz(5). IPC: Message msgtql Maximum number of messages that can exist on the system at any given time. Manpage: msgtql(5). File System: Buffer nbuf System-wide number of static file system buffer and cache buffer headers. Manpage: nbuf(5). Miscellaneous: CD ncdnode Maximum number of entries in the vnode table and therefore the maximum number of open CD-ROM file system nodes that can be in memory. Manpage: ncdnode(5). Miscellaneous: Terminal nclist Maximum number of cblocks available for data transfers through tty and pty devices. Manpage: nclist(5). File System: Open/Lock ncsize Inode space needed for directory name lookup cache (DNLC). NO MANPAGE. File System: Open/Lock nfile Maximum number of files that can be open simultaneously on the system at any given time. Manpage: nfile(5). File System: Open/Lock nflocks Maximum combined number of file locks that are available system-wide to all processes at one time. Manpage: nflocks(5). File System: Open/Lock ninode Maximum number of open inodes that can be in memory. Manpage: ninode(5). ProcessMgmt: Threads nkthread Maximum number of kernel threads allowed on the system at the same time. Manpage: nkthread(5). ProcessMgmt: Process nproc Defines the maximum number of processes that can be running simultaneously on the entire system, including remote execution processes initiated by other systems via remsh or other networking commands. Manpage: nproc(5). Miscellaneous: Terminal npty Maximum number of pseudo-tty entries allowed on the system at any one time. Manpage: npty(5). Streams NSTREVENT Maximum number of outstanding streams bufcalls that are allowed to exist at any given time on the system. This number should be equal to or greater than the maximum bufcalls that can be generated by the combined total modules pushed onto any given stream, and serves to limit run-away bufcalls. Manpage: nstrevent(5). Miscellaneous: Terminal nstrpty System-wide maximum number of streams-based pseudo-ttys that are allowed on the system. Manpage: nstrpty(5). Streams nstrpty System-wide maximum number of streams-based pseudo-ttys that are allowed on the system. Manpage: nstrpty(5). Streams NSTRPUSH Maximum number of streams modules that are allowed to exist in any single stream at any one time on the system. This provides a mechanism for preventing a software defect from attempting to push too many modules onto a stream, but it is not intended as adequate protection against malicious use of streams. Manpage: nstrpush(5). Streams NSTRSCHED Maximum number of streams scheduler daemons that are allowed to run at any given time on the system. This value is related to the number of processors installed in the system. Manpage: nstrsched(5). Miscellaneous: Terminal nstrtel Number of telnet session device files that are available on the system. Manpage: nstrtel(5). Memory Paging nswapdev Maximum number of devices, system-wide, that can be used for device swap. Set to match actual system configuration. Manpage: nswapdev(5). Memory Paging nswapfs Maximum number of mounted file systems, system-wide, that can be used for file system swap. Set to match actual system configuration. Manpage: nswapfs(5). Miscellaneous: Memory nsysmap Number of entries in the kernel dynamic memory virtual address space resource map (32-bit processes). Manpage: nsysmap(5). Miscellaneous: Memory nsysmap64 Number of entries in the kernel dynamic memory virtual address space resource map (64-bit processes). Manpage: nsysmap(5). Miscellaneous: Disk I/O o_sync_is_o_dsync Specifies whether an open() or fcntl() with the O_SYNC flag set can be converted to the same call with the O_DSYNC flag instead. This controls whether the function can return before updating the file access. NO MANPAGE. ProcessMgmt: Memory pa_maxssiz_32bit Maximum size (in bytes) of the stack for a user process running under the PA-RISC emulator on IPF. Manpage: pa_maxssiz(5). ProcessMgmt: Memory pa_maxssiz_64bit Maximum size (in bytes) of the stack for a user process running under the PA-RISC emulator on IPF. Manpage: pa_maxssiz(5). Spinlock Pool pfdat_hash_locks Pfdat spinlock pool. Manpage: pfdat_hash_locks(5). Miscellaneous: Disk I/O physical_io_buffers Total buffers for physical I/O operations. Manpage: physical_io_buffers(5). Spinlock Pool region_hash_locks Process-region spinlock pool. Manpage: region_hash_locks(5). Memory Paging remote_nfs_swap Enable or disable swap to mounted remote NFS file system. Used on cluster clients for swapping to NFS-mounted server file systems. Manpage: remote_nfs_swap(5). Miscellaneous: Schedule rtsched_numpri Number of distinct real-time interrupt scheduling priority levels are available on the system. Manpage: rtsched_numpri(5). Miscellaneous: Terminal scroll_lines Defines the number of lines that can be scrolled on the internal terminal emulator (ITE) system console. Manpage: scroll_lines(5). File System: SCSI scsi_maxphys Maximum record size for the SCSI I/O subsystem, in bytes. Manpage: scsi_maxphys(5). File System: SCSI scsi_max_qdepth Maximum number of SCSI commands queued up for SCSI devices. Manpage: scsi_max_qdepth(5). ProcessMgmt: Process secure_sid_scripts Controls whether setuid and setgid bits on scripts are honored. Manpage: secure_sid_scripts(5). IPC: Semaphore sema Enable or disable IPC semaphores at system boot time. Manpage: sema(5). IPC: Semaphore semaem Maximum value by which a semaphore can be changed in a semaphore "undo" operation. Manpage: semaem(5). IPC: Semaphore semmni Maximum number of sets of IPC semaphores allowed on the system at any one time. Manpage: semmni(5). IPC: Semaphore semmns Maximum number of individual IPC semaphores available to system users, system-wide. Manpage: semmns(5). IPC: Semaphore semmnu Maximum number of processes that can have undo operations pending on any given IPC semaphore on the system. Manpage: semmnu(5). IPC: Semaphore semmsl Maximum number of individual System V IPC semaphores per semaphore identifier. Manpage: semmsl(5). IPC: Semaphore semume Maximum number of IPC semaphores that a given process can have undo operations pending on. Manpage: semume(5). IPC: Semaphore semvmx Maximum value any given IPC semaphore is allowed to reach (prevents undetected overflow conditions). Manpage: semvmx(5). Miscellaneous: Web sendfile_max The amount of buffer cache that can be used by the sendfile() system call on HP-UX web servers. Manpage: sendfile_max(5). IPC: Share shmem Enable or disable shared memory at system boot time. Manpage: shmem(5). IPC: Share shmmax Maximum allowable shared memory segment size (in bytes). Manpage: shmmax(5). IPC: Share shmmni Maximum number of shared memory segments allowed on the system at any given time. Manpage: shmmni(5). IPC: Share shmseg Maximum number of shared memory segments that can be attached simultaneously to any given process. Manpage: shmseg(5). Streams STRCTLSZ Maximum number of control bytes allowed in the control portion of any streams message on the system. Manpage: strctlsz(5). Streams streampipes Force all pipes to be streams-based. Manpage: streampipes(5). Streams STRMSGSZ Maximum number of bytes that can be placed in the data portion of any streams message on the system. Manpage: strmsgsz(5). File System: SCSI st_ats_enabled Flag whether to reserve a tape device on open. Manpage: st_ats_enabled(5). File System: SCSI st_fail_overruns SCSI tape read resulting in data overrun causes failure. Manpage: st_fail_overruns(5). File System: SCSI st_large_recs Enable large record support for SCSI tape. Manpage: st_large_recs(5). Memory Paging swapmem_on Enable or disable pseudo-swap allocation. This allows systems with large installed memory to allocate memory space as well as disk swap space for virtual memory use instead of restricting availability to defined disk swap area. Manpage: swapmem_on(5). Memory Paging swchunk Amount of space allocated for each chunk of swap area. Chunks are allocated from device to device by the kernel. Changing this parameter requires extensive knowledge of system internals. Without such knowledge, do not change this parameter from the normal default value. Manpage: swchunk(5). Spinlock Pool sysv_hash_locks System V interprocess communication spinlock pool. Manpage: sysv_hash_locks(5). Miscellaneous: Network tcphashsz TCP hash table size, in bytes. Manpage: tcphashsz(5). ProcessMgmt: CPU timeslice Maximum time a process can use the CPU until it is made available to the next process having the same process execution priority. This feature also prevents runaway processes from causing system lock-up. Manpage: timeslice(5). Miscellaneous: Clock timezone The offset between the local time zone and Coordinated Universal Time (UTC), often called Greenwich Mean Time or GMT. Manpage: timezone(5). Miscellaneous: Memory unlockable_mem Amount of system memory to be reserved for system overhead and virtual memory management, that cannot be locked by user processes. Manpage: unlockable_mem(5). Spinlock Pool vnode_cd_hash_locks Vnode clean/dirty spinlock pool. NO MANPAGE. Spinlock Pool vnode_hash_locks Vnode spinlock pool. NO MANPAGE. Memory Paging: Size vps_ceiling Maximum system-selected page size (in KB) if the user does not specify a page size. Manpage: vps_ceiling(5). Memory Paging: Size vps_chatr_ceiling Maximum page size a user can specify with the chatr command in a program. Manpage: vps_chatr_ceiling(5). Memory Paging: Size vps_pagesize Minimum user page size (in KB) if no page size is specified using chatr. Manpage: vps_pagesize(5). File System: Journaled vxfs_max_ra_kbytes Maximum amount of read-ahead data, in KB, that the kernel may have outstanding for a single VxFS file system. Manpage: vxfs_max_ra_kbytes(5). File System: Read vxfs_max_ra_kbytes Maximum amount of read-ahead data, in KB, that the kernel may have outstanding for a single VxFS file system. Manpage: vxfs_max_ra_kbytes(5). File System: Journaled vxfs_ra_per_disk Maximum amount of VxFS file system read-ahead per disk, in KB. Manpage: vxfs_ra_per_disk(5). File System: Read vxfs_ra_per_disk Maximum amount of VxFS file system read-ahead per disk, in KB. Manpage: vxfs_ra_per_disk(5). File System: Journaled vx_fancyra_enable Enable or disable VxFS file system read-ahead. NO MANPAGE. File System: Journaled vx_maxlink Number of subdirectories created within a directory. NO MANPAGE. File System: Journaled vx_ncsize Memory space reserved for VxFS directory path name cache. Manpage: vx_ncsize(5). File System: Journaled vx_ninode Number of entries in the VxFS inode table. NO MANPAGE ========================================================== >>>> Some important Solaris kernel params: ========================================================== /etc/system -- Process Sizing Tunables Several variables are used to control the number of processes that are available on the system and the number of processes that an individual user can create. The foundation variable is maxusers, which drives the values assigned to max_nprocs and maxuprc. -- maxusers Description Originally, maxusers defined the number of logged in users the system could support. Various tables were sized based on this setting when a kernel was generated. Now, the Solaris release does much of its sizing based on the amount of memory on the system, so much of the past use of maxusers has changed. There are still a number of subsystems that are derived from maxusers: The maximum number of processes on the system The number of quota structures held in the system The size of the directory name lookup cache (DNLC) Data Type Signed integer Default Lesser of the amount of memory in Mbytes and 2048 Range 1 to 2048, based on physical memory if not set in the /etc/system file. 1 to 4096, if set in the /etc/system file. Units Users Dynamic? No. After computation of dependent variables is done, maxusers is never referenced again. Validation None When to Change When the default number of user processes derived by the system is too low. This situation is seen by the following message that displays on the system console:out of processes When the default number of processes is too high: Database servers that have a lot of memory and relatively few running processes, can save system memory by reducing the default value of maxusers. File servers that have a lot of memory and few running processes can reduce this value, but should explicitly set the size of the DNLC. (See ncsize.) Compute servers that have a lot of memory and few running processes can reduce this value. Commitment Level Unstable General Parameters This section describes general kernel parameters relating to physical memory and stack size. physmem Description Modifies the system's idea of the number of physical pages of memory after the OS and firmware are accounted for. Data Type Unsigned long Default Number of usable pages of physical memory available on the system-not counting the memory where the core kernel and data are stored. Range 1 to amount of physical memory on system Units Pages Dynamic? No Validation None When to Change Whenever you want to test the effect of running with less physical memory. Note that because this parameter does not take into account the memory used by the core kernel and data as well as various other data structures allocated early in the startup process, the value of physmem should be less than the actual number of pages that represent the smaller amount of memory. Commitment Level Unstable lwp_default_stksize Description Default value of size of stack to be used when a kernel thread is created, and the calling routine does not provide an explicit size to be used. Data Type Integer Default 8192 for all 32-bit SPARC and IA based platforms 16,384 for 64-bit sun4u platforms Range 0 to 262,144 Units Bytes in multiples of the value returned by getpagesize(3C). Dynamic? Yes. Affects threads created after the variable is changed. Validation Must be greater than or equal to 8192 and less than or equal to 262,144 (256 x 1024) and must be a multiple of the system page size. If these conditions are not met, the following message is displayed: Illegal stack size, Using N The value of N is the default described above. When to Change When the system panics because it has run out of stack space. The best solution for this problem is to determine why the system is running out of space and make a correction. Increasing the default stack size means that almost every kernel thread will have a larger stack, resulting in increased kernel memory consumption for no good reason, because that space will generally be unused. The increased consumption means that other resources competing for the same pool of memory will have the amount of space available to them reduced, possibly decreasing the system's ability to perform work. Among the side effects will be a reduction in the number of threads which the kernel can create. This solution should be treated as no more than an interim workaround until the root cause is remedied. Commitment Level Unstable logevent_max_q_sz Description Maximum number of system events allowed to be queued waiting for delivery to the syseventd daemon. Once the size of the system event queue reaches this limit, no other system events will be allowed on the queue. Data Type Integer Default 2000 Range 0 to MAXINT Units System events Dynamic? Yes Validation The sysevent framework checks this value every time a system event is generated by ddi_log_sysevent(9F) and sysevent_post_event(3SYSEVENT). When to Change When error log messages indicate that a system event failed to be logged, generated, or posted. ========================================================== >>>> Some important AIX kernel params: ========================================================== - Kernel Tunable Parameters Following are kernel parameters, grouped into the following sections: - Scheduler and Memory Load Control Tunable Parameters: Virtual Memory Manager Tunable Parameters Synchronous I/O Tunable Parameters Asynchronous I/O Tunable Parameters Disk and Disk Adapter Tunable Parameters Interprocess Communication Tunable Parameters Scheduler and Memory Load Control Tunable Parameters Most of the scheduler and memory load control tunable parameters are fully described in the schedo man page. The following are a few other related parameters: - maxuproc Purpose: Specifies the maximum number of processes per user ID. Values: Default: 40; Range: 1 to 131072 Display: lsattr -E -l sys0 -a maxuproc Change: chdev -l sys0 -a maxuproc=NewValue Change takes effect immediately and is preserved over boot. If value is reduced, then it goes into effect only after a system boot. Diagnosis: Users cannot fork any additional processes. Tuning: This is a safeguard to prevent users from creating too many processes. - ncargs Purpose: Specifies the maximum allowable size of the ARG/ENV list (in 4KB blocks) when running exec() subroutines. Values: Default: 6; Range: 6 to 1024 Display: lsattr -E -l sys0 -a ncargs Change: chdev -l sys0 -a ncargs=NewValue Change takes effect immediately and is preserved over boot. Diagnosis: Users cannot execute any additional processes because the argument list passed to the exec() system call is too long. A low default value might cause some programs to fail with the arg list too long error message, in which case you might try increasing the ncargs value with the chdev command above and then rerunning the program. Tuning: This is a mechanism to prevent the exec() subroutines from failing if the argument list is too long. Please note that tuning to a higher ncargs value puts additional constraints on system memory resources. - Virtual Memory Manager Tunable Parameters: The complete listing of the virtual memory manager tunable parameters is located in the vmo man page. - Synchronous I/O Tunable Parameters: Most of the synchronous I/O tunable parameters are fully described in the ioo man page. The following are a few other related parameters: maxbuf Purpose: Number of (4 KB) pages in the block-I/O buffer cache. Values: Default: 20; Range: 20 to 1000 Display: lsattr -E -l sys0 -a maxbuf Change: chdev -l sys0 -a maxbuf=NewValue Change is effective immediately and is permanent. If the -T flag is used, the change is immediate and lasts until the next boot. If the -P flag is used, the change is deferred until the next boot and is permanent. Diagnosis: If the sar -b command shows breads or bwrites with %rcache and %wcache being low, you might want to tune this parameter. Tuning: This parameter normally has little performance effect on systems, where ordinary I/O does not use the block-I/O buffer cache. Refer to: Tuning Asynchronous Disk I/O maxpout Purpose: Specifies the maximum number of pending I/Os to a file. Values: Default: 0 (no checking); Range: 0 to n (n should be a multiple of 4, plus 1) Display: lsattr -E -l sys0 -a maxpout Change: chdev -l sys0 -a maxpout=NewValue Change is effective immediately and is permanent. If the -T flag is used, the change is immediate and lasts until the next boot. If the -P flag is used, the change is deferred until the next boot and is permanent. Diagnosis: If the foreground response time sometimes deteriorates when programs with large amounts of sequential disk output are running, sequential output may need to be paced. Tuning: Set maxpout to 33 and minpout to 16. If sequential performance deteriorates unacceptably, increase one or both. If foreground performance is still unacceptable, decrease both. minpout Purpose: Specifies the point at which programs that have reached maxpout can resume writing to the file. Values: Default: 0 (no checking); Range: 0 to n (n should be a multiple of 4 and should be at least 4 less than maxpout) Display: lsattr -E -l sys0 -a minpout Change: chdev -l sys0 -a minpout=NewValue Change is effective immediately and is permanent. If the -T flag is used, the change is immediate and lasts until the next boot. If the -P flag is used, the change is deferred until the next boot and is permanent. Diagnosis: If the foreground response time sometimes deteriorates when programs with large amounts of sequential disk output are running, sequential output may need to be paced. Tuning: Set maxpout to 33 and minpout to 16. If sequential performance deteriorates unacceptably, increase one or both. If foreground performance is still unacceptable, decrease both. mount -o nointegrity Purpose: A new mount option (nointegrity) may enhance local file system performance for certain write-intensive applications. This optimization basically eliminates writes to the JFS log. Note that the enhanced performance is achieved at the expense of metadata integrity. Therefore, use this option with extreme caution because a system crash can make a file system mounted with this option unrecoverable. Nevertheless, certain classes of applications do not require file data to remain consistent after a system crash, and these may benefit from using the nointegrity option. Two examples in which a nointegrity file system may be beneficial is for compiler temporary files, and for doing a nonmigration or mksysb installation. Paging Space Size Purpose: The amount of disk space required to hold pages of working storage. Values: Default: configuration-dependent; Range: 32 MB to n MB for hd6, 16 MB to n MB for non-hd6 Display: lsps -a mkps or chps or smitty pgsp Change: Change is effective immediately and is permanent. Paging space is not necessarily put into use immediately, however. Diagnosis: Run: lsps -a. If processes have been killed for lack of paging space, monitor the situation with the psdanger() subroutine. Tuning: If it appears that there is not enough paging space to handle the normal workload, add a new paging space on another physical volume or make the existing paging spaces larger. syncd Interval Purpose: The time between sync() calls by syncd. Values: Default: 60; Range: 1 to any positive integer Display: grep syncd /sbin/rc.boot vi /sbin/rc.boot or Change: Change is effective at next boot and is permanent. An alternate method is to use the kill command to terminate the syncd daemon and restart it from the command line with the command /usr/sbin/syncd interval. Diagnosis: I/O to a file is blocked when syncd is running. Tuning: At its default level, this parameter has little performance cost. No change is recommended. Significant reductions in the syncd interval in the interests of data integrity (as for HACMPT) could have adverse performance consequences. Asynchronous I/O Tunable Parameters maxreqs Purpose: Specifies the maximum number of asynchronous I/O requests that can be outstanding at any one time. Values: Default: 4096; Range: 1 to AIO_MAX (/usr/include/sys/limits.h) Display: lsattr -E -l aio0 -a maxreqs Change: chdev -l aio0 -a maxreqs=NewValue Change is effective after reboot and is permanent. Diagnosis: N/A Tuning: This includes requests that are in progress, as well as those that are waiting to be started. The maximum number of asynchronous I/O requests cannot be less than the value of AIO_MAX, as defined in the /usr/include/sys/limits.h file, but can be greater. It would be appropriate for a system with a high volume of asynchronous I/O to have a maximum number of asynchronous I/O requests larger than AIO_MAX. Refer to: Tuning Asynchronous Disk I/O maxservers Purpose: Specifies the maximum number of AIO kprocs per processor. Values: Default: 10 per processor Display: lsattr -E -l aio0 -a maxservers Change: chdev -l aio0 -a maxservers=NewValue Change is effective after reboot and is permanent. Diagnosis: N/A Tuning: This value limits the number of concurrent asynchronous I/O requests. The value should be about the same as the expected number of concurrent AIO requests. This tunable parameter only affects AIO on JFS file systems (or Virtual Shared Disks (VSD) before AIX 4.3.2). Refer to: Tuning Asynchronous Disk I/O minservers Purpose: Specifies the number of AIO kprocs that will be created when the AIO kernel extension is loaded. Values: Default: 1 Display: lsattr -E -l aio0 -a maxservers Change: chdev -l aio0 -a minservers=NewValue Change is effective after reboot and is permanent. Diagnosis: N/A Tuning: Making this a large number is not recommended, because each process takes up some memory. Leaving this number small is acceptable in most cases because AIO will create additional kprocs up to maxservers as needed. This tunable is only effective for AIO on JFS file systems (or VSDs before AIX 4.3.2). Refer to: Tuning Asynchronous Disk I/O Disk and Disk Adapter Tunable Parameters Disk Adapter Outstanding-Requests Limit Purpose: Maximum number of requests that can be outstanding on a SCSI bus. (Applies only to the SCSI-2 Fast/Wide Adapter.) Values: Default: 40; Range: 40 to 128 Display: lsattr -E -l scsin -a num_cmd_elems Change: chdev -l scsin -a num_cmd_elems=NewValue Change is effective immediately and is permanent. If the -T flag is used, the change is immediate and lasts until the next boot. If the -P flag is used, the change is deferred until the next boot and is permanent. Diagnosis: Applications performing large writes to striped raw logical volumes are not obtaining the desired throughput rate. Tuning: Value should equal the number of physical drives (including those in disk arrays) on the SCSI bus, times the queue depth of the individual drives. Disk Drive Queue Depth Purpose: Maximum number of requests the disk device can hold in its queue. Values: Default: IBMr disks=3; Non-IBM disks=0; Range: specified by manufacturer Display: lsattr -E -l hdiskn Change: chdev -l hdiskn -a q_type=simple -a queue_depth=NewValue Change is effective immediately and is permanent. If the -T flag is used, the change is immediate and lasts until the next boot. If the -P flag is used, the change is deferred until the next boot and is permanent. Diagnosis: N/A Tuning: If the non-IBM disk drive is capable of request-queuing, make this change to ensure that the operating system takes advantage of the capability. Refer to: Setting SCSI-Adapter and Disk-Device Queue Limits Interprocess Communication Tunable Parameters msgmax Purpose: Specifies maximum message size. Values: Dynamic with maximum value of 4 MB Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. msgmnb Purpose: Specifies maximum number of bytes on queue. Values: Dynamic with maximum value of 4 MB Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. msgmni Purpose: Specifies maximum number of message queue IDs. Values: Dynamic with maximum value of 131072 Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. msgmnm Purpose: Specifies maximum number of messages per queue. Values: Dynamic with maximum value of 524288 Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. semaem Purpose: Specifies maximum value for adjustment on exit. Values: Dynamic with maximum value of 16384 Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. semmni Purpose: Specifies maximum number of semaphore IDs. Values: Dynamic with maximum value of 131072 Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. semmsl Purpose: Specifies maximum number of semaphores per ID. Values: Dynamic with maximum value of 65535 Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. semopm Purpose: Specifies maximum number of operations per semop() call. Values: Dynamic with maximum value of 1024 Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. semume Purpose: Specifies maximum number of undo entries per process. Values: Dynamic with maximum value of 1024 Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. semvmx Purpose: Specifies maximum value of a semaphore. Values: Dynamic with maximum value of 32767 Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. shmmax Purpose: Specifies maximum shared memory segment size. Values: Dynamic with maximum value of 256 MB for 32-bit processes and 0x80000000u for 64-bit Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. shmmin Purpose: Specifies minimum shared-memory-segment size. Values: Dynamic with minimum value of 1 Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the kernel. shmmni Purpose: Specifies maximum number of shared memory IDs. Values: Dynamic with maximum value of 131072 Display: N/A Change: N/A Diagnosis: N/A Tuning: Does not require tuning because it is dynamically adjusted as needed by the AIX TUNABLE ENVIRONMENT PARAMETERS: ======================================= Thread Support Tunable Parameters Following is a list of thread support parameters that can be tuned: AIXTHREAD_COND_DEBUG (AIX 4.3.3 and subsequent versions) Purpose: Maintains a list of condition variables for use by the debugger. Values: Default: ON Range: ON, OFF Display: echo $AIXTHREAD_COND_DEBUG (this is turned on internally, so the initial default value will not be seen with the echo command) Change: AIXTHREAD_COND_DEBUG={ON|OFF} export AIXTHREAD_COND_DEBUG Change takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding AIXTHREAD_COND_DEBUG={ON|OFF} command to the /etc/environment file. Diagnosis: Leaving it on makes debugging threaded applications easier, but may impose some overhead. Tuning: If the program contains a large number of active condition variables and frequently creates and destroys condition variables, this may create higher overhead for maintaining the list of condition variables. Setting the variable to OFF will disable the list. Refer to Thread Debug Options. AIXTHREAD_ENRUSG Purpose: Enable or disable pthread resource collection. Values: Default: OFF Range: ON, OFF Display: echo $AIXTHREAD_ENRUSG (this is turned on internally, so the initial default value will not be seen with the echo command) Change: AIXTHREAD_ENRUSG={ON|OFF} export AIXTHREAD_ENRUSG Change takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding AIXTHREAD_ENRUSG={ON|OFF} command to the /etc/environment file. Diagnosis: Turning it on allows for resource collection of all pthreads in a process, but will impose some overhead. Tuning: Refer to Thread Environment Variables. AIXTHREAD_GUARDPAGES (AIX 4.3 and later) Purpose: Controls the number of guard pages to add to the end of the pthread stack. Values: Default: 0Range: A positive integer Display: echo $AIXTHREAD_GUARDPAGES (This is turned on internally, so the initial default value will not be seen with the echo command) Change: AIXTHREAD_GUARDPAGES=nexport AIXTHREAD_GUARDPAGESChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding AIXTHREAD_GUARDPAGES=n command to the /etc/environment file. Diagnosis: N/A Tuning: N/A Refer to Thread Environment Variables. AIXTHREAD_MINKTHREADS (AIX 4.3 and later) Purpose Controls the the minimum number of kernel threads that should be used. Values: Default: 8 Range: A positive integer value Display: echo $AIXTHREAD_MINKTHREADS (this is turned on internally, so the initial default value will not be seen with the echo command) Change: AIXTHREAD_MINKTHREADS=nexport AIXTHREAD_MINKTHREADSChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding AIXTHREAD_MINKTHREADS =n command to the /etc/environment file. Diagnosis: N/A Tuning: The library scheduler will not reclaim kernel threads below this figure. A kernel thread may be reclaimed at virtually any point. Generally, a kernel thread is targeted as a result of a pthread terminating. Refer to: Variables for Process-Wide Contention Scope AIXTHREAD_MNRATIO (AIX 4.3 and later) Purpose: Controls the scaling factor of the library. This ratio is used when creating and terminating pthreads. Values: Default: 8:1 Range: Two positive values (p:k), where k is the number of kernel threads that should be employed to handle p runnable pthreads Display: echo $AIXTHREAD_MNRATIO (this is turned on internally, so the initial default value will not be seen with the echo command) Change: AIXTHREAD_MNRATIO=p:kexport AIXTHREAD_MNRATIOChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding AIXTHREAD_MNRATIO=p:k command to the /etc/environment file. Diagnosis: N/A Tuning: May be useful for applications with a very large number of threads. However, always test a ratio of 1:1 because it may provide for better performance. Refer to: Variables for Process-Wide Contention Scope AIXTHREAD_MUTEX_DEBUG (AIX 4.3.3 and later) Purpose: Maintains a list of active mutexes for use by the debugger. Values: Default: OFF Range: ON, OFF Display: echo $AIXTHREAD_MUTEX_DEBUG (this is turned on internally, so the initial default value will not be seen with the echo command) Change: AIXTHREAD_MUTEX_DEBUG={ON|OFF}export AIXTHREAD_MUTEX_DEBUGChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding AIXTHREAD_MUTEX_DEBUG={ON|OFF} command to the /etc/environment file. Diagnosis: Setting the variable to ON makes debugging threaded applications easier, but may impose some overhead. Tuning: If the program contains a large number of active mutexes and frequently creates and destroys mutexes, this may create higher overhead for maintaining the list of mutexes. Leaving the variable off disables the list. Refer to: Thread Debug Options AIXTHREAD_RWLOCK_DEBUG (AIX 4.3.3 and later) Purpose: Maintains a list of read-write locks for use by the debugger. Values: Default: ON Range: ON, OFF Display: echo $AIXTHREAD_RWLOCK_DEBUG (this is turned on internally, so the initial default value will not be seen with the echo command) Change: AIXTHREAD_RWLOCK_DEBUG={ON|OFF}export AIXTHREAD_RWLOCK_DEBUGChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding AIXTHREAD_RWLOCK_DEBUG={ON|OFF} command to the /etc/environment file. Diagnosis: Leaving it on makes debugging threaded applications easier, but may impose some overhead. Tuning: If the program contains a large number of active read-write locks and frequently creates and destroys read-write locks, this may create higher overhead for maintaining the list of read-write locks. Setting the variable to OFF will disable the list. Refer to: Thread Debug Options AIXTHREAD_SCOPE (AIX 4.3.1 and later) Purpose: Controls contention scope. P signifies process-based contention scope (M:N). S signifies system-based contention scope (1:1). Values: Default: P Possible Values: P or S Display: echo $AIXTHREAD_SCOPE (this is turned on internally, so the initial default value will not be seen with the echo command) Change: AIXTHREAD_SCOPE={P|S}export AIXTHREAD_SCOPE Change takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding AIXTHREAD_SCOPE={P|S} command to the /etc/environment file. Diagnosis: If fewer threads are being dispatched than expected, then system scope should be tried. Tuning: Tests on AIX 4.3.2 have shown that certain applications can perform much better with system based contention scope (S). The use of this environment variable impacts only those threads created with the default attribute. The default attribute is employed when the attr parameter to pthread_create is NULL. Refer to: Thread Environment Variables AIXTHREAD_SLPRATIO (AIX 4.3 and later) Purpose: Controls the number of kernel threads that should be held in reserve for sleeping threads. Values: Default: 1:12 Range: Two positive values (k:p), where k is the number of kernel threads that should be held in reserve for p sleeping pthreads Display: echo $AIXTHREAD_SLPRATIO (this is turned on internally, so the initial default value will not be seen with the echo command) Change: AIXTHREAD_SLPRATIO=k:pexport AIXTHREAD_SLPRATIOChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding AIXTHREAD_SLPRATIO=k:p command to the /etc/environment file. Diagnosis: N/A Tuning: In general, fewer kernel threads are required to support sleeping pthreads, because they are generally woken one at a time. This conserves kernel resources. Refer to: Variables for Process-Wide Contention Scope AIXTHREAD_STK=n (AIX 4.3.3 ML 09 and later) Purpose: The decimal number of bytes that should be allocated for each pthread. This value may be overridden by pthread_attr_setstacksize. Values: Default: 98,304 bytes for 32bit applications, 196,608 bytes for 64bit applications. Range: Decimal integer values from 0 to 268,435,455 which will be rounded up to the nearest page (currently 4,096). Display: echo $AIXTHREAD_STK (this is turned on internally, so the initial default value will not be seen with the echo command) Change: AIXTHREAD_STK=size export AIXTHREAD_STK Change takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding AIXTHREAD_STK=size to the /etc/environment file. Diagnosis: If analysis of a failing program indicates stack overflow, the default stack size can be increased. Tuning: If trying to reach the 32,000 thread limit on a 32 bit application, it may be necessary to decrease the default stack size. MALLOCBUCKETS (Version 4.3.3.25 and later) Purpose: Enables buckets-based extension in the default memory allocator which may enhance performance of applications that issue large numbers of small allocation requests. Values: MALLOCTYPE=buckets MALLOCBUCKETS=[[ number_of_buckets:n | bucket_sizing_factor:n | blocks_per_bucket:n | bucket_statistics:[stdout|stderr|pathname]],...] The following table displays default values of MALLOCBUCKETS. MALLOCBUCKETS Default Values MALLOCBUCKETS Options Default Value number_of_buckets1 16 bucket_sizing_factor (32-bit)2 32 bucket_sizing_factor (64-bit)3 64 blocks_per_bucket 10244 Notes: 1. The minimum value allowed is 1. The maximum value allowed is 128. 2. For 32-bit implementations, the value specified for bucket_sizing_factor must be a multiple of 8. 3. For 64-bit implementations, the value specified for bucket_sizing_factor must be a multiple of 16. 4. The bucket_statistics option is disabled by default. Display: echo $MALLOCBUCKETS; echo $MALLOCTYPE Change: Use the shell specific method of exporting the environment variables. Diagnosis: If malloc performance is slow and many small malloc requests are issued, this feature may enhance performance. Tuning: To enable malloc buckets, the MALLOCTYPE environment variable has to be set to the value "buckets". The MALLOCBUCKETS environment variable may be used to change the default configuration of the malloc buckets, although the default values should be sufficient for most applications. The number_of_buckets:n option can be used to specify the number of buckets available per heap, where n is the number of buckets. The value specified for n will apply to all available heaps. The bucket_sizing_factor:n option can be used to specify the bucket sizing factor, where n is the bucket sizing factor in bytes. The blocks_per_bucket:n option can be used to specify the number of blocks initially contained in each bucket, where n is the number of blocks. This value is applied to all of the buckets. The value of n is also used to determine how many blocks to add when a bucket is automatically enlarged because all of its blocks have been allocated. The bucket_statistics option will cause the malloc subsystem to output a statistical summary for malloc buckets upon typical termination of each process that calls the malloc subsystem while malloc buckets is enabled. This summary will show buckets configuration information and the number of allocation requests processed for each bucket. If multiple heaps have been enabled by way of malloc multiheap, the number of allocation requests shown for each bucket will be the sum of all allocation requests processed for that bucket for all heaps. The buckets statistical summary will be written to one of the following output destinations, as specified with the bucket_statistics option. stdout Standard output stderr Standard error pathname A user-specified pathname If a user-specified pathname is provided, statistical output will be appended to the existing contents of the file (if any). Avoid using standard output as the output destination for a process whose output is piped as input into another process. Refer to: Malloc Buckets MALLOCMULTIHEAP (AIX 4.3.1 and later) Purpose: Controls the number of heaps within the process private segment. Values: Default: 16 for 4.3.1 and 4.3.2, 32 for 4.3.3 and later Range: A positive number between 1 and 32) Display: echo $MALLOCMULTIHEAP (this is turned on internally, so the initial default value will not be seen with the echo command) Change: MALLOCMULTIHEAP=[[heaps:n | considersize],...] export MALLOCMULTIHEAPChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding MALLOCMULTIHEAP=[[heaps:n | considersize],...] command to the /etc/environment file. Diagnosis: Look for lock contention on the malloc lock (located in segment F) or fewer than expected runnable threads. Tuning: Smaller number of heaps can help reduce size of the process. Certain multithreaded user processes which use the malloc subsystem heavily may obtain better performance by exporting the environment variable MALLOCMULTIHEAP=1 before starting the application. The potential performance enhancement is particularly likely for multithreaded C++ programs, because these may make use of the malloc subsystem whenever a constructor or destructor is called. Any available performance enhancement will be most evident when the multithreaded user process is running on an SMP system, and particularly when system scope threads are used (M:N ratio of 1:1). However, in some cases, enhancement may also be evident under other conditions, and on uniprocessors. If the considersize option is specified, an alternate heap selection algorithm is used that tries to select an available heap that has enough free space to handle the request. This may minimize the working set size of the process by reducing the number of sbrk() calls. However, there is a bit more processing time required for this algorithm. Refer to: Thread Environment Variables SPINLOOPTIME Purpose: Controls the number of times to retry a busy lock before yielding to another processor (only for libpthreads). Values: Default: 1 on uniprocessors, 40 on multiprocessors Range: A positive integer Display: echo $SPINLOOPTIME (this is turned on internally, so the initial default value will not be seen with the echo command) Change: SPINLOOPTIME=nexport SPINLOOPTIMEChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding SPINLOOPTIME=n command to the /etc/environment file. Diagnosis: If threads are going to sleep often (lot of idle time), then the SPINLOOPTIME may not be high enough. Tuning: Increasing the value from default of 40 on multiprocessor systems might be of benefit if there is pthread mutex contention. Refer to: Thread Environment Variables YIELDLOOPTIME Purpose: Controls the number of times to yield the processor before blocking on a busy lock (only for libpthreads). The processor is yielded to another kernel thread, assuming there is another runnable kernel thread with sufficient priority. Values: Default: 0 Range: A positive value Display: echo $YIELDLOOPTIME (this is turned on internally, so the initial default value will not be seen with the echo command) Change: YIELDLOOPTIME=nexport YIELDLOOPTIMEChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding YIELDLOOPTIME=n command to the /etc/environment file. Diagnosis: If threads are going to sleep often (lot of idle time), then the YIELDLOOPTIME may not be high enough. Tuning: Increasing the value from default value of 0 may benefit if you do not want the threads to go to sleep when waiting for locks. Refer to: Thread Environment Variables Miscellaneous Tunable Parameters Following is a list of miscellaneous parameters that can be tuned: EXTSHM (AIX 4.2.1 and later) Purpose: Turns on the extended shared memory facility. Values: Default: Not set Possible Value: ON Display: echo $EXTSHM Change: EXTSHM=ON export EXTSHMChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding EXTSHM=ON command to the /etc/environment file. Diagnosis: N/A Tuning: Setting value to ON will allow a process to allocate shared memory segments as small as 1 byte (though this will be rounded up to the nearest page); this effectively removes the limitation of 11 user shared memory segments. Maximum size of all segments together can still only be 2.75 GB worth of memory for 32-bit processes. 64-bit processes do not need to set this variable since a very large number of segments is available. Some restrictions apply for processes that set this variable, and these restrictions are the same as with processes that use mmap buffers. Refer to: Extended Shared Memory (EXTSHM) LDR_CNTRL Purpose: Allows tuning of the kernel loader. Values: Default: Not set Possible Values: PREREAD_SHLIB, LOADPUBLIC, IGNOREUNLOAD, USERREGS, MAXDATA, DSA, PRIVSEG_LOADS Display: echo $LDR_CNTRL Change: LDR_CNTRL={PREREAD_SHLIB | LOADPUBLIC| ...} export LDR_CNTRLChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding the following line to the /etc/environment file: LDR_CNTRL={PREREAD_SHLIB | LOADPUBLIC| ...} Diagnosis: N/A Tuning: The LDR_CNTRL environment variable can be used to control one or more aspects of the system loader behavior. You can specify multiple options with the LDR_CNTRL variable. When doing this, separate the options using an @ character (that is, LDR_CNTRL=PREREAD_SHLIB@LOADPUBLIC). Specifying the PREREAD_SHLIB option will cause entire libraries to be read as soon as they are accessed. With VMM readahead tuned, a library can be read in from disk and be cached in memory by the time the program starts to access its pages. While this method can use more memory, it can enhance performance of programs that use many shared library pages providing the access pattern is non-sequential. (for example, Catia). Specifying the LOADPUBLIC option directs the system loader to load all modules requested by an application into the global shared library segment. If a module cannot be loaded publicly into the global shared library segment then it is loaded privately for the application. Specifying the IGNOREUNLOAD option will cause modules that are marked to be unloaded and used again (if the module has not been unloaded already). As a side effect of this option, you can end up with two different data instances for the module. Specifying the USERREGS option will tell the system to save all general-purpose user registers across system calls made by an application. This can be helpful in applications doing garbage collection. Specifying the MAXDATA option sets the maximum heap size for a process, including overriding any MAXDATA value specified in an executable. If you want to use Large Program Support with a data heap size of 0x30000000, then specify LDR_CNTRL=MAXDATA=0x30000000. To turn off Large Program Support, specify LDR_CNTRL=MAXDATA=0. Specifying the DSA (Dynamic Segment Allocation) option tells the system loader to run applications using Very Large Program Support. The DSA option is only valid for 32-bit applications. Specifying the PRIVSEG_LOADS option directs the system loader to put dynamically loaded private modules into the process private segment. This might improve the availability of memory in large memory model applications that perform private dynamic loads and tend to run out of memory in the process heap. If the process private segment lacks sufficient space, the PRIVSEG_LOADS option has no effect. The PRIVSEG_LOADS option is only valid for 32-bit applications with a non-zero MAXDATA value. NODISCLAIM Purpose: Controls how calls to free() are being handled. When PSALLOC is set to early, all free() calls result in a disclaim() system call. When NODISCLAIM is set to True, this does not occur. Values: Default: Not set Possible Value: True Display: echo $NODISCLAIM Change: NODISCLAIM=true export NODISCLAIMChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding NODISCLAIM=true command to the /etc/environment file. Diagnosis: If number of disclaim() system calls is very high, you may want to set this variable. Tuning: Setting this variable will eliminate calls to disclaim() from free() if PSALLOC is set to early. Refer to: Early Page Space Allocation NSORDER Purpose: Overwrites the set name resolution search order. Values: Default: bind, nis, local Possible Values: bind, local, nis, bind4, bind6, local4, local6, nis4, or nis6 Display: echo $NSORDER (this is turned on internally, so the initial default value will not be seen with the echo command) Change: NSORDER=value, value, ... export NSORDERChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding NSORDER=value command to the /etc/environment file. Diagnosis: N/A Tuning: NSORDER overrides the /etc/netsvc.conf file. Refer to: Tuning Name Resolution PSALLOC Purpose: Sets the PSALLOC environment variable to determine the paging-space allocation policy. Values: Default: Not set Possible Value: early Display: echo $PSALLOC Change: PSALLOC=early export PSALLOCChange takes effect immediately in this shell. Change is effective until logging out of this shell. Diagnosis: N/A Tuning: To ensure that a process is not killed due to low paging conditions, this process can preallocate paging space by using the Early Page Space Allocation policy. However, this may result in wasted paging space. You may also want to set the NODISCLAIM environment variable. Refer to: Allocation and Reclamation of Paging Space Slots and Early Page Space Allocation RT_GRQ (AIX 4.3.3.1 and later) Purpose: Causes thread to be put on a global run queue rather than on a per-CPU run queue. Values: Default: Not set; Range: ON, OFF Display: echo $RT_GRQ Change: RT_GRQ={OFF/ONexport RT_GRQChange takes effect immediately. Change is effective until next boot. Permanent change is made by adding RT_GRQ={ON|OFF} command to the /etc/environment file. Diagnosis: N/A Tuning: May be tuned on multiprocessor systems. Set to ON, will cause the thread to be put on a global run queue. In that case, the global run queue is searched to see which thread has the best priority. This might allow to get the thread dispatched sooner and can improve performance for threads that are running SCHED_OTHER, and are interrupt driven. Refer to: Scheduler Run Queue RT_MPC (AIX 4.3.3 and later) Purpose: When running the kernel in real-time mode (see bosdebug command), an MPC can be sent to a different CPU to interrupt it if a better priority thread is runnable so that this thread can be dispatched immediately. Values: Default: Not set; Range: ON Display: echo $RT_MPC Change: RT_MPC=ON export RT_MPC Change takes effect immediately. Change is effective until next boot. Permanent change is made by adding RT_MPC=ON command to the /etc/environment file. Diagnosis: N/A Note on LDR_CNTRL: ------------------ Setting the maximum number of AIX data segments that a process can use (LDR_CNTRL) In AIX, Version 4.3.3 and later, the number of segments that a process can use for data is controlled by the LDR_CNTRL environment variable. It is defined in the parent process of the process that is to be affected. For example, the following defines one additional data segment: export LDR_CNTRL =MAXDATA=0x10000000 start_process unset LDR_CNTRL It is a good idea to unset the LDR_CNTRL environment variable, so that it does not unintentionally affect other processes. Unlike other environment variables for the IBM SecureWay Directory server process (slapd), the LDR_CNTRLenvironment variable cannot be set as a front-end variable in the slapd32.conf file. It must be set as an environment variable. The following table shows the LDR_CNTRL setting and memory increase for various numbers of data segments: LDP_CNTRL Setting Number of Additional Segments Process Memory Limit Increase Unset 0 (default) 256 MB LDR_CNTRL=MAXDATA=0x1000000 1 512 MB LDR_CNTRL=MAXDATA=0x2000000 2 768 MB LDR_CNTRL=MAXDATA=0x3000000 3 1 GB LDR_CNTRL=MAXDATA=0x4000000 4 1.25 GB LDR_CNTRL=MAXDATA=0x5000000 5 1.5 GB LDR_CNTRL=MAXDATA=0x6000000 6 1.75 GB LDR_CNTRL=MAXDATA=0x7000000 7 2 GB LDR_CNTRL=MAXDATA=0x8000000 8 2.25 GB ############################################################## SECTION 17: Unix, Java, Websphere: ############################################################## ----- Note: ----- technote: AIX AIX Java News and FAQ What's New? March 2009 - AIX Java 6 32-bit update released (APAR IZ45341) and redistributional SDK refreshed, both using pap3260sr4-20090219_01 build (SR4). March 2009 - AIX Java 6 64-bit update released (APAR IZ45342) and redistributional SDK refreshed, both using pap6460sr4-20090219_01 build (SR4). December 2008 - AIX Java 5 32-bit update released (APAR IZ39401) and redistributional SDK refreshed, both using pap32dev-20081129 build (SR9). December 2008 - AIX Java 5 64-bit update released (APAR IZ39402) and redistributional SDK refreshed, both using pap64dev-20081129 build (SR9). March 2009 - SDK 1.4.2 32-bit update released (APAR IZ47402) and JRE 1.4.2 32-bit refreshed, both using pj9ap32142-20090310 build (SR13). March 2009 - SDK 1.4.2 64-bit update released (APAR IZ47404) and JRE 1.4.2 64-bit refreshed, both using pj9ap64142-20090310 build (SR13). September 2007 - SDK 1.3.1 32-bit PTF (APAR IZ05458) released and JRE 1.3.1 32-bit refreshed, both using ca131-20070913 build (SR11). September 2007 - SDK 1.3.1 64-bit PTF (APAR IZ05460) released and JRE 1.3.1 64-bit refreshed, both using caix64131-20070913 build (SR11). June 2006 - SDK 1.3.0 32-bit PTF (APAR IY85292) released and JRE 1.3.0 32-bit refreshed, both using ca131-20060605 build. September 2004 - Java security packages refreshed for 1.3.0, 1.3.1, and 1.3.1 64-bit. February 2003 - JDK 1.2.2 PTF (APAR IY40034) released and JRE 1.2.2 refreshed, both using the ca122-20030115 build. May 2002 - JDK 1.1.8 PTF 13 (APAR IY30886) released and JRE 1.1.8 refreshed, both using the a118-20020509 build. Frequently Asked Questions -What AIX levels are required for Java releases? -What should I download - JDK/SDK or JRE, base images or update images? Can you explain SDK 1.4.x installp images? -How do I extract from a tar or tar.gz file downloaded? How do I install the base and update images? -Can these releases co-exist on a machine? In which directories are these releases installed? -How to find out what versions of Java I have installed? Why does "java -fullversion" still show 1.1.8 on my system after -I have installed another release? How can 1.3.0 "java -fullversion" show 1.3.1? -What paths do I need to set to use a specific Java release on my system? -How do I know if an image file has been downloaded successfully? -How do I to get support information on Java for AIX? -Are there any Newsgroups for Java on AIX? 1. Question: What AIX levels are required for Java releases? Answer: To take advantage of latest AIX fixes it is recommended/required that latest AIX Recommended Maintenance Level be used. The following is the minimum AIX level required at the time when a Java release was first released: Java 1.1.8 requires AIX 4.2.1 Java 1.2.2 requires AIX 4.3.3 PLUS fixes Java 1.3.0 requires AIX 4.3.3.10 PLUS fixes Java 1.3.1 64-bit requires AIX 5.1.0.10 Java 1.3.1 requires AIX 4.3.3.75 Java 1.4 requires at least AIX 5.1.0.75 or AIX 5.2.0.10 Java 5 requires at least AIX 5.2.0.75 or AIX 5.3.0.30 2. Question: What should I download - JDK/SDK or JRE, base images or update images? Can you explain SDK 1.4.x installp images? Answer: For each release you can download either the Developer Kit (JDK or SDK) or the Runtime Environment (JRE). The Runtime Environment is meant only for distributing Java with your applications. The Developer Kit is in AIX's installp format. There are install images (base images) and update images (also called PTFs or fixes). Update images are to be installed on top of the base images; that is, update images can only be installed after the base images are installed. All installp images have VRMF numbers associated with them. VRMF stands for Version, Release, Modification, and Fix. If you run command "lslpp -l | grep Java" on your machine you will see installed Java filesets and their VRMF numbers. All SDK 1.4.x installp images (VRMF numbers 1.4.0.*, 1.4.1.*, and 1.4.2.*) install in the same directories, /usr/java14 for 32-bit code and /usr/java14_64 for 64-bit code. This is because AIX Java 1.4 is the product and 1.4.1 and 1.4.2 are maintenance levels (1.4.2 being the latest and last maintenance level) of the product. Now what installp images does one need to install? Remember update images are to be installed on top of base images. These 1.4.x base images are available: the oldest 1.4.0 base images, the latest 1.4.1 base images, and the latest 1.4.2 base images. If Java 1.4 is not installed and you want to install it on your system, you will need to start with one of these base images, and then you can update using update images. Base images can be downloaded directly from the individual release download pages. To download update images, please follow the "How and where to get fixes" link. 3. Question: How do I extract from a tar or tar.gz file downloaded? How do I install the JDK/SDK base and update images? Answer: For base images after you downloaded either packagename.tar or the packagename.tar.gz file (the latter is recommended if you have gunzip utility available), you need to extract packagename from the downloaded file: tar -xvf packagename.tar (example: tar -xvf Java14.sdk.tar), or gunzip -c packagename.tar.gz | tar -xvf - (example: gunzip -c Java14.sdk.tar.gz | tar -xvf - ) For update images the .bff files are ready to be installed. Before installing, remove the old .toc file (if it exist) in the directory containing the .bff images. You can use the smitty command to install (both base and update images): Run "smitty install" Select "Install and Update Software" Select "Install Software" Specify directory containing the images ... 4. Question: Can these releases co-exist on a machine? In which directories are these releases installed? Answer: Yes, releases can co-exist. Java 1.1.8 installs in /usr/jdk_base Java 1.2.2 installs in /usr/java_dev2 Java 1.3.0 installs in /usr/java130 Java 1.3.1 64-bit installs in /usr/java13_64 Java 1.3.1 installs in /usr/java131 Java 1.4 64-bit installs in /usr/java14_64 Java 1.4 installs in /usr/java14 Java 5 64-bit installs in /usr/java5_64 Java 5 32-bit installs in /usr/java5 Java 6 64-bit installs in /usr/java6_64 Java 6 32-bit installs in /usr/java6 5. Question: How to find out what versions of Java I have installed? Why does "java -fullversion" still show 1.1.8 on my system after I have installed another release? How can 1.3.0 "java -fullversion" show 1.3.1? Answer: The most accurate information is returned by command java -fullversion. Example: java full version "J2RE 1.4.1 IBM AIX build ca141-20030522" The date (20030522) tells when the code was built. Java 1.1.8 - the command is "/usr/jdk_base/bin/java -fullversion" Java 1.2.2 - the command is "/usr/java_dev2/jre/sh/java -fullversion" Java 1.3.0 - the command is "/usr/java130/jre/bin/java -fullversion" Java 1.3.1 64-bit - the command is "/usr/java13_64/jre/bin/java -fullversion" Java 1.3.1 - the command is "/usr/java131/jre/bin/java -fullversion" Java 1.4 64-bit - the command is "/usr/java14_64/jre/bin/java -fullversion" Java 1.4 - the command is "/usr/java14/jre/bin/java -fullversion" Java 5 32-bit - the command is "/usr/java5/jre/bin/java -fullversion" Java 5 64-bit - the command is "/usr/java5_64/jre/bin/java -fullversion" Java 6 32-bit - the command is "/usr/java6/jre/bin/java -fullversion" Java 6 64-bit - the command is "/usr/java6_64/jre/bin/java -fullversion" Installp installation for 1.1.8 creates a symbolic links in /usr/bin for commands such as java and javac. Installation of other releases does not create similar links. So, by default (when the PATH is not set for other releases), "java -fullversion" returns 1.1.8. The command "/usr/java130/jre/bin/java -fullversion" can show 1.3.1, because the support for 1.3.0 ended 12/31/2002. All 1.3.0 PTFs shipped after that date use 1.3.1 code. 6. Question: What paths do I need to set to use a specific Java release on my system? Answer: Java 1.1.8: PATH=/usr/jdk_base/bin:$PATH Java 1.2.2: PATH=/usr/java_dev2/jre/sh:/usr/java_dev2/sh:$PATH Java 1.3.0 PATH=/usr/java130/jre/bin:/usr/java130/bin:$PATH Java 1.3.1 64-bit: PATH=/usr/java13_64/jre/bin:/usr/java13_64/bin:$PATH Java 1.3.1 PATH=/usr/java131/jre/bin:/usr/java131/bin:$PATH Java 1.4 64-bit: PATH=/usr/java14_64/jre/bin:/usr/java14_64/bin:$PATH Java 1.4 PATH=/usr/java14/jre/bin:/usr/java14/bin:$PATH Java 5 32-bit PATH=/usr/java5/jre/bin:/usr/java5/bin:$PATH Java 5 64-bit PATH=/usr/java5_64/jre/bin:/usr/java5_64/bin:$PATH Java 6 32-bit PATH=/usr/java6/jre/bin:/usr/java6/bin:$PATH Java 6 64-bit PATH=/usr/java6_64/jre/bin:/usr/java6_64/bin:$PATH 7. Question: How do I know if an image file has been downloaded successfully? Answer: After you downloaded a package in a tar or tar.gz file, if you can extract from the file successfully (see Question 3) the downloading must be successful. If "smitty install" does not complain about an extracted package, the downloading must be successful. For JDK/SDK base images, the download pages have numbers of bytes for all tar and tar.gz files. 8. Question: How do I to get support information on Java for AIX? Answer: Please go to https://techsupport.services.ibm.com/server/support?view=pSeries. If you are a customer in the U.S.A. and have an AIX Support Line contract, you can call 1-800-CALL-AIX for support. 9. Question: Are there any Newsgroups for Java on AIX? Answer: Newsgroup for Java on AIX: ibmpub.java.aix Newsgroup for AIX: comp.unix.aix ----- Note: ----- thread: Q: Hi, Problem is in Solaris environment. Application works fine in Windows environment with connection pool size of 10. But in Solaris even pool size set to 100, this error occurs. WebSphere Version: 6.1.0.15 OS : Solaris 10 Database: Oracle 10g J2CA0045E: Connection not available while invoking method createOrWaitForConnection for resource com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutExce ption: Connection not available, Timed out waiting for 180004 at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection (FreePool.java:1499) at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.ja va:2287) at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrappe r(ConnectionManager.java:896) at com.ibm.ejs.j2c.ConnectionManager.allocateConnecti on(ConnectionManager.java:596 ) at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConn ection(WSJdbcDataSource.java: 439) at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConn ection(WSJdbcDataSource.java: 408) .................................... Anybody else have this problem? Any solutions? Suggestions? A: Using Connection information in WebSphere trace files to troubleshoot J2CA0045E and J2CA0020E or connection wait time-out problems. Technote (troubleshooting) Problem(Abstract) J2CA0045E and J2CA0020E errors can be caused by many problems. They are showing a time-out condition where a resource or a managed connection is not available to fulfill a connection request. In this technote we will use connection information in WebSpherer trace files to troubleshoot J2CA0045E and J2CA0020E or connection wait time-out problems. Cause In a trace file with WAS.j2c=all=enabled:RRA=all=enabled:WAS.database=all=enabled, you will get dumps of the connection pooling that look like the following: [7/20/05 23:40:01:450 EDT] 6a8068fa d UOW= source=com.ibm.ejs.j2c.poolmanager.PoolManager org=IBM prod=WebSphere component=Application Server reserve(), Pool contents ==> PoolManager name:jdbc/xxxxxx PoolManager object:1424371533 Total number of connections: 45 (max/min 45/20) Pool Bucket configuration Shared Buckets: 200 UnShared Buckets: 45 The waiter count is 38 The mcWrappers in waiter queue [] Shared Connection information Unshare Connection information Resolving the problem 1) See if you have Waiters: Waiters are connection requests waiting on a managed connection. If a connection request is made and a managed connection is not allocated for that request , the request will timeout and throw an error combination like below in your SystemOut.log and or your trace file: J2CA0045E: Connection not available while invoking method queueRequest for resource jdbc/xxxxxx. J2CA0020E: The Connection Pool Manager could not allocate a Managed Connection: com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 10988 One way to use the connection pool section in the trace file to troubleshoot these kinds of errors is to enter the trace file and search for the word "waiter". As you move down through the file, you will expect to see the waiter count to increase and decrease if in fact you do have waiters. If you do not have any waiters, the waiter count entry will not appear in the trace for a particular connection object listing and you can be assured that your connection pooling is sized properly and you do not have contention for resources. If you do see waiters, you have connection requests waiting on managed connections. 2) Discover if the waiters you have is on one or more PoolManager Object: Another important point to make at this point is that there can be more than one PoolManager Object. There is one pool manager object per data source that is configured for the application server and the number assigned to that PoolManager object will remain the same for the duration of the application server run from startup to stop of the same. Once you discover you have waiters, you must find out if they are for one or more PoolManager Objects. You can determine how many pool manager objects you have by searching on the keyword PoolManager object then note the numbers that follow. In the case of figure 1, the number is: 1424371533. Once you have determined how many PoolManager Objects you have, you must determine if the waiters are for one Object or many. You do this by going through each of the PoolManager Objects to see if in fact that Object has the waiters. You can usually tell after going through a few of them or try the first one in the file and the last one in the file. 3) Assess the damage: Look in the area called Shared Connection information that is below all the PoolManger Object information. Pull that information out into a separate file and then sort it by thread ID or manually move the same thread ID lines together. You can see problems as such in some cases: A) J2CA0086W errors can be found to look as follows in the Shared Connection information section: com.ibm.ws.LocalTransaction.LocalTranCoordImpl@4423ef2d MCWrapper id 3705a8c8 Managed connection com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@2612ef7a State:STATE_TRAN_WRAPPER_INUSE Thread Id: 2a1368fa Thread Name: Servlet.Engine.Transports : 39 Handle count Start time inuse Wed Jul 20 23:24:32 EDT 2005 Time inuse 929 (seconds) com.ibm.ws.LocalTransaction.LocalTranCoordImpl@4423ef2d MCWrapper id 67cc68ce Managed connection com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@6f4128ce State:STATE_TRAN_WRAPPER_INUSE Thread Id: 2a1368fa Thread Name: Servlet.Engine.Transports : 39 Handle count Start time inuse Wed Jul 20 23:24:32 EDT 2005 Time inuse 929 (seconds) What do we see here? We see that the transaction type is local for both entries. We see the thread ID is indicating the same thread. We also see that the managed connection is a different connection. Keep in mind that we are looking in the shared connection area. So, what we have here is two different connections that are held by the same thread and the same local transaction. The result of this is that these two separate connections will be held until the local transaction is complete. If our max connections for the data source is 10, we have just decreased it to 8 for the duration of the local transaction above. B) Nested Local transactions: In the information below that is taken from the Shared Connection Information section as well, you may see the following: com.ibm.ws.LocalTransaction.LocalTranCoordImpl@1a3fef31 MCWrapper id 1fea8bc Managed connection com.ibm.ws.rsadapter.spi. WSRdbManagedConnectionImpl@195ee8e4 State:STATE_TRAN_WRAPPER_INUSE Thread Id: 2d9228fa Thread Name: Servlet.Engine.Transports : 40 Handle count Start time inuse Wed Jul 20 23:26:30 EDT 2005 Time inuse 811 (seconds) com.ibm.ws.LocalTransaction.LocalTranCoordImpl@5f08288c MCWrapper id 21d428c1 Managed connection com.ibm.ws.rsadapter. spi.WSRdbManagedConnectionImpl@3a40e8d2 State:STATE_TRAN_WRAPPER_INUSE Thread Id: 2d9228fa Thread Name: Servlet.Engine.Transports : 40 Handle count Start time inuse Wed Jul 20 23:26:28 EDT 2005 Time inuse 812 (seconds) What do we see here? We see the same thread ID with two shared connections that are of different connection IDs and two separate transaction IDs. In this case, these are nested local transactions in the same thread. Because shareable connections are used, even if the app called close() on the first connection it will remain allocated, and when the thread enters a nested LTC and gets a connection, it cannot re-use the first connection because of the differing LTC contexts. Each connection is released as the associated LTC comes to an end. These kind of situations are cause when you pass control of processing in the thread from something like a servlet to another servlet or EJB. Could be several things. Again, we have taken up two connections out of our pool. Note! If the customer's code must have this type of nested architecture, they should use unshared connections to fix the problem. Yes, they will see more connections but, the connections will release as soon as the work with them is complete. Nested Global and Local Transactions: com.ibm.ws.Transaction.JTA.TransactionImpl@7ebdafd2#tid=510632 MCWrapper id 421fa8c1 Managed connection com.ibm.ws.rsadapter. spi.WSRdbManagedConnectionImpl@1a5d68c8 State:STATE_TRAN_WRAPPER_INUSE Thread Id: 32c4e8fa Thread Name: Servlet.Engine.Transports : 381 Handle count Start time inuse Wed Jul 20 23:36:09 EDT 2005 Time inuse 231 (seconds) com.ibm.ws.LocalTransaction.LocalTranCoordImpl@69132f2d MCWrapper id 16df28df Managed connection com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@d5fe8e4 State:STATE_TRAN_WRAPPER_INUSE Thread Id: 32c4e8fa Thread Name: Servlet.Engine.Transports : 381 Handle count Start time inuse Wed Jul 20 23:36:05 EDT 2005 Time inuse 235 (seconds) What do we see here? We have a local transaction that spawned a global transaction. The same thread number is identified for both. We can tell which one did the spawning by the Start time inuse entry in the entries above. They both have different managed connection numbers so that means is that each of them has a shared connection but not the same one. There is two more connections that are basically dependant on each other out of our max number of connections. Long Running Transactions: com.ibm.ws.LocalTransaction.LocalTranCoordImpl@31f36fda MCWrapper id 1e64a8af Managed connection com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@3d5328a8 State:STATE_TRAN_WRAPPER_INUSE Thread Id: 7b76e8fa Thread Name: Servlet.Engine.Transports : 35 Handle count Start time inuse Wed Jul 20 23:23:17 EDT 2005 Time inuse 1003 (seconds) What do we see here? We see this transaction in the Shared Connections section is showing us that it has been in use for 1003 seconds. That is a bit much. If you see entries such as these and the customer's transaction time out is much less than this, you can expect that there is something holding up this transaction like the database or JDBC. Also, note the Handle count is null so it is waiting on something to complete. Note: Transaction timeout does not kill a transaction when it times out. The transaction timeout will not be enforced until the transaction comes back from the database or what ever it is working into. Therefore, if the transaction time-out is reached, all that means is that when the transaction does come back, it will be rolled back or handled in a non-positive way depending on how the customer has his transactions set up in the deployment descriptor but, the default is to roll the transaction back. Further, if a database, JMS or something else does not perform the tasks requested of it in a transaction before the end of the transaction timeout setting, the transaction timeout. WebSphere will rollback the transaction. If the transaction does not come back or is not released by the database, JMS or whatever, it will sit there and hold the resources. Follow on: If you look in the Shared Connection information or the Unshared Connection information and you see an entry no shared connections or no unshared connections respectively, this does not mean that there are no connections left. This means there are none in use. Both shared and unshared connections count toward the maximum number of connections set in your data source. If you see the free connection count, you have to remember the minimum connections. If connections time-out, they will go away down to the minimum connections number. Other possible causes of the ConnectionWaitTimeout: The web container thread pool settings. 1. Setting the isGrowable flag on in the WebContainer thread pool can cause this. If you have too many consumers for the size of the connection pool. 2. Similarly, a web container thread pool whose maximum is too great for the connection pool, then it can cause this too. A: Check with your DBA...you may be running into licensing issues w/ Oracle that limits the number of connections the db server allows. ----- Note: ----- technote: Application hangs with prior J2CA0086W warning messages Technote (troubleshooting) Problem(Abstract) An application seems to be in a hang state while trying to connect to database. The logs show several ConnectionWaitTimeoutExceptions as well as other errors referring to problems with obtaining free connections from the pool. Before occurrences of a hang, there are repeated J2CA0086W warning messages and the connection pool is at a maximum. Cause A warning message similar to the one below is observed in the logs before the hang occurs: [8/19/03 21:37:53:366 CST] 1c86bdf0 SharedPool I J2CA0086W: Shareable connection MCWrapper id 686bbdf9 Managed connection com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@6156bdf9 State:STATE_TRAN_WRAPPER_INUSE The message reference contains the following explanation of this message: J2CA0086W: Shareable connection {0} from resource {1} was used within a local transaction containment boundary. Explanation: Shareable connections are not allowed within a local transaction containment boundary. User Response: Connection was made non-shareable. The above scenario suggests a possible problem in the application logic and how it is using the connection code. The J2CA0086 message is telling you that your application is using a shared connection in a LocalTransaction. Since the connection is enlisted in a Local Transaction, and not a Global Transaction, different rules are followed when it comes to connection sharing. The connection usage has to follow the pattern shown below: get connection, use connection, close connection, commit transaction Then the connection can be used again. If this logic is not followed, a second (or third) connection can be allocated. For example, if the application calls the getConnection() method it gets connection1, uses connection1, and then, if it calls getConnection() method again and connection1 is not ready to be reused, connection2 is obtained. Both connections remain in the shared pool and both are associated with the Local Transaction until the Local Transaction ends (is committed or rolled back, or the method ends). This can result in more connections being created than is expected, which is why the application is reaching the maximum connections, and getting ConnectionWaitTimeoutExceptions among others. This can cause a hang if the pool is at a maximum, and none of the threads that have connections can complete because they are waiting to get another connection. Another consequence could be that while these connections are persisting in the used pool, that other threads making connections to the same tables get timed out by the backend database while waiting for a lock to be returned, thus causing the exception: SQL0911N: The current transaction has been rolled back because of a deadlock or timeout. Reason code 68 Resolving the problem There are two solutions to this problem: 1. The application must be modified to use serial reuse or 2. The connection pool can be changed to unshareable. ----- Note: ----- 67.3 Websphere and AIX Memory: ------------------------------ 67.3.1 Errors you may find in Websphere logs 1. java.lang.OutOfMemory 2. javax.naming.NameNotFoundException 3. javax.servlet.ServletException 4. java.lang.StringIndexOutOfBoundsException 5. java.net.SocketException 6. java.io.IOException 7. java.io.FileNotFoundException 8. java.util.MissingResourceException 9. java.lang.ClassNotFoundException 10.java.lang.StringIndexOutOfBoundsException 11.java.io.InterruptedIOException 12.com.splwg.cis.common.NestedRuntimeException The number that is associated with action determines the type of garbage collection that is being done: action=1 means a preemptive garbage collection cycle. action=2 means a full allocation failure. action=3 means that a heap expansion takes place. action=4 means that all known soft references are cleared. action=5 means that stealing from the transient heap is done. action=6 means that free space is very low. Note 1 on java.lang.OutOfMemory ------------------------------- The Java process has two memory areas: the Java heap, and the "native heap", which combine total the memory usage of the process. The Java heap is controlled via the -Xms and -Xmx setting, and the space available to the native heap is that which isn't used by the Java heap. The act of reducing the maximum Java heap size has made the "native heap" bigger, and this is the area that was memory constrained. We know this because the OutOfMemoryError was generated the message informed you that the JVM was unable to allocate a new native stack, this is allocated onto the native heap (there is also a Java thread object which is created and allocated onto the Java heap). It is entirely possible that the amount of "native heap" available to the JVM was insufficient to allocate the underlying resources to run the Java process under the load that was being driven through it. The native heap is now 500MB bigger, and unless there is a memory leak or the load is significantly increased, this change should prevent any OutOfMemoryErrors based on the native heap. Note 2 on java.lang.OutOfMemory ------------------------------- Hi, I'm experiment with Tomcat with simple "Hello World" servlet. When I send 50 concurrent requests, I got java.lang.outOfMemory error. Tomcat works fine upto 40 concurrent requests for the same servlet. I'm using Tomcat 3.1M1 with Java 1.2 on Solaris 2.7. We try to add -mx swith to the Java invocation in tomcat.sh (line 102) $JAVACMD -mx96m org.apache.tomcat.shell.Startup "$@" & And it still out of memory. Any suggestion? Lishin Hi Lishin This could be to do with exceeding max file-descriptors - this gave us the error below (45 connections) We are running tomcat on Solaris 2.6. Each new connection uses at least one socket connection, which is treated as a file-descriptor. There is a default limit (user) of 64 file descriptors To check this try: ulimit -n To increase this try ulimit -n There will be a system limit - for Solaris this is default 1024: system limit: ulimit -Hn I hope this helps - I had a very frustrating time solving this one! Joe. Note 3 on java.lang.OutOfMemory ------------------------------- AIX LDR_CNTRL Purpose: Allows tuning of the kernel loader. Values: Default: Not set Possible Values: PREREAD_SHLIB, LOADPUBLIC, IGNOREUNLOAD, USERREGS, MAXDATA, DSA, PRIVSEG_LOADS Display: echo $LDR_CNTRL Change: LDR_CNTRL={PREREAD_SHLIB | LOADPUBLIC| ...} export LDR_CNTRLChange takes effect immediately in this shell. Change is effective until logging out of this shell. Permanent change is made by adding the following line to the /etc/environment file: LDR_CNTRL={PREREAD_SHLIB | LOADPUBLIC| ...} Diagnosis: N/A Tuning: The LDR_CNTRL environment variable can be used to control one or more aspects of the system loader behavior. You can specify multiple options with the LDR_CNTRL variable. When doing this, separate the options using an @ character (that is, LDR_CNTRL=PREREAD_SHLIB@LOADPUBLIC). Specifying the PREREAD_SHLIB option will cause entire libraries to be read as soon as they are accessed. With VMM readahead tuned, a library can be read in from disk and be cached in memory by the time the program starts to access its pages. While this method can use more memory, it can enhance performance of programs that use many shared library pages providing the access pattern is non-sequential. (for example, Catia). Specifying the LOADPUBLIC option directs the system loader to load all modules requested by an application into the global shared library segment. If a module cannot be loaded publicly into the global shared library segment then it is loaded privately for the application. Specifying the IGNOREUNLOAD option will cause modules that are marked to be unloaded and used again (if the module has not been unloaded already). As a side effect of this option, you can end up with two different data instances for the module. Specifying the USERREGS option will tell the system to save all general-purpose user registers across system calls made by an application. This can be helpful in applications doing garbage collection. Specifying the MAXDATA option sets the maximum heap size for a process, including overriding any MAXDATA value specified in an executable. If you want to use Large Program Support with a data heap size of 0x30000000, then specify LDR_CNTRL=MAXDATA=0x30000000. To turn off Large Program Support, specify LDR_CNTRL=MAXDATA=0. Specifying the DSA (Dynamic Segment Allocation) option tells the system loader to run applications using Very Large Program Support. The DSA option is only valid for 32-bit applications. Specifying the PRIVSEG_LOADS option directs the system loader to put dynamically loaded private modules into the process private segment. This might improve the availability of memory in large memory model applications that perform private dynamic loads and tend to run out of memory in the process heap. If the process private segment lacks sufficient space, the PRIVSEG_LOADS option has no effect. The PRIVSEG_LOADS option is only valid for 32-bit applications with a non-zero MAXDATA value. ----- Note: ----- BBB MustGather: Out of Memory errors on AIX, Part 2a - native leak Technote (FAQ) Problem MustGather for native leak problems with the WebSphere? Application Server Out of Memory component on AIX? platforms. Gathering this information before calling IBM? support will help familiarize you with the troubleshooting process and save you time. Solution The following steps outline how to troubleshoot java.lang.OutOfMemoryError errors on an AIX platform when you suspect that there is a native memory leak. This suspicion is based upon your analysis of the data collected from technote: MustGather: Out of Memory errors on AIX, Part 1. If you already contacted support, continue to the component-specific MustGather information. Otherwise, click: MustGather: Read first for all WebSphere Application Server products. Out of Memory (native leak) specific MustGather information: Set up, before problem occurs: Enabling MMAP for Java? heap: For V6.0 release: To enable the MMAP Java heap, add the following line to the top of the startServer.sh file in the install_root/profiles/profile_name/bin directory: export IBM_JAVA_MMAP_JAVA_HEAP=true For V5.0 and V5.1 releases: To enable the MMAP Java heap, add the following line to the top of the startServer.sh file in the install_root/bin directory: export IBM_JAVA_MMAP_JAVA_HEAP=true For V3.5 and V4.0 releases: To enable the MMAP Java heap, add the following line to the top of the startupServer.sh file in the install_root/bin directory: export IBM_JAVA_MMAP_JAVA_HEAP=true Changing the Native Heap: For releases of V6.0: Verifiy the Java Virtual Machine (JVM?) is 32-bit, since that is what WebSphere Application Server supports. Issue bootinfo -K from the AIX command line. Add the following line to the top of the startServer.sh file in the install_root/profiles/profile_name/bin directory: export LDR_CNTRL=MAXDATA=0xn0000000 where n= (10 - round(Xmx/256) For releases of V5.0 and V5.1: Verifiy the JVM is 32-bit, since that is what WebSphere Application Server supports. Issue bootinfo -K from the AIX command line. Add the following line to the top of the startServer.sh file in the install_root/bin directory: export LDR_CNTRL=MAXDATA=0xn0000000 where n= (10 - round(Xmx/256) For releases of V3.5 and V4.0: Verifiy the JVM is 32-bit, since that is what WebSphere Application Server supports. Issue bootinfo -k from the AIX command line. Add the following line to the top of the startupServer.sh file in the install_root/bin directory: export LDR_CNTRL=MAXDATA=0xn0000000 where n= (10 - round(Xmx/256)) Examples for all releases Xmx = 1024 n = (10 - round(1024/256)) n = (10 - round(4)) n = (10 - 4) n = 6 Xmx = 640 n = (10 - round(640/256)) n = (10 - round(2.5)) n = (10 - 3) n = 7 Follow instructions for Enabling verbosegc in WebSphere Application Server. Clear all application server log files before starting the Application Server to capture data. After starting the Application Server, run the AIX_433_memory_leak.sh or AIX_51_memory_leak.sh shell script (see attached ;script for your version of AIX) while trying to reproduce the problem. AIX_memory_leak.sh -p pid-f base_filename-i interval Where: pid is the process id to be profiled base_filename is a path and identifier for the output interval is the time in seconds between each iteration Example: AIX_memory_leak.sh -p 123456 -f /logs/leak -i 120 After problem re-occurs: Stop the Application Server and the script. Collect the following: For V6.0 release: All files in install_root/profiles/profile_name/logs/server_name directory. All files in install_root/profiles/profile_name/logs/ffdc directory. A copy of server.xml located in install_root/profiles/profile_name/config/cells/cell_name/nodes/node_name/servers/server_namedirectory. For V5.0 and V5.1 releases: Include all of the files from the install_root/logs/server_namedirectory. All files in install_root/logs/ffdc directory. A copy of server.xml located at install_root/config/cells/cell_name/nodes/node_name/servers/server_name directory For V3.5 and V4.0 releases: Include all of the files from the install_root/logs directory. A copy of XMLExport for the server configuration For all releases: If you have configured the application server to write logs into a different location, send them accordingly. The log file output from memory leak script. List of all other software and version information on the system. For example, databases, WebSphere MQ, and so forth. Follow instructions to send diagnostic information to IBM support. For a listing of all technotes, downloads, and educational materials specific to the Out of Memory component, search the WebSphere Application Server support site. ----- Note: ----- JavaT virtual machine (JVMT) crash on Solarisr throws java.lang.OutOfMemoryError exception Technote (FAQ) Problem The Application Server crashes with a SIGSEGV and the pstack output is corrupted. The pmap shows that the [heap] has exceeded 2GB. The hs_err_pid*.log file shows the following: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0xff330924 Function name=memcpy Library=/usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1 Cause This is a bug in the HotSpot server mode and there is a Sun defect opened, reference Sun Bug Id 4724509: There can be other reasons that the core is so large, like a native memory leak, possibly with the DB drivers. The Sun JDKT 1.3.1 doesn't always produce a JavaT thread dump when a crash occurs, especially when the crash is inside the HotSpot library. Below, the pmap command output shows that the native heap has grown to over 2 GB. Such a large heap size is unusual for a Java application and can lead to memory problems, as in a crash in the C runtime library (libc) function memory: core 'core1' of 16996: /opt/WebSphere/AppServer/java/jre/bin/../bin/sparc/native_threads/java 00010000 24K read/exec /opt/WebSphere/AppServer/java/jre/bin/sparc/native_threads/java 00024000 8K read/write/exec /opt/WebSphere/AppServer/java/jre/bin/sparc/native_threads/java 00026000 2088888K read/write/exec [ heap ] A known bug in Java HotSpot Server mode might cause this large heap. In rare circumstances, the compiler gets into an expansion loop and asks for larger and larger amounts of heap memory on malloc (memory allocation) calls within the loop that is expanding the heap size. When this happens, a java.lang.OutOfMemoryError with a large "CompileThread0" request is logged in an hs_err_pid log and a pmap of the core file generated shows a heap size that is unusually large, frequently 2000 MB or more. Solution There are several possible ways to resolve this problem. Switch to the Java HotSpot Client VM. Refer to the technote, Setting up a HotSpot server or client mode on a Java 2 SDK Note: Application Servers in V4.0 releases run in HotSpot server mode by default. Application Servers in V5.x releases run in Hotspot client mode by default. If it is not an option to switch to the client HotSpot compiler, identify the methods causing the crash and skip from HotSpot comp. Refer to technote Debugging HotSpot failures on Solaris Upgrade to JDK 1.3.1_08 or later. The fix for SunBug 4724509 is in JDK 1.3.1_08. http://developer.java.sun.com/developer/bugParade/bugs/4724509.html Note: Sometimes this upgrade does not resolve this problem. If a java.lang.OutOfMemoryError is issued and this upgrade does not solve the problem, refer to this technote: JAVA.LANG.OUTOFMEMORYERRORs (Solaris). Document Information Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java SDK Operating system(s): Solaris Software version: 5.1 Software edition: Reference #: 1159828 IBM Group: Software Group Modified date: Aug 9, 2004 ############################################################## SECTION 18: : IPC and semaphore related errors: ############################################################## ------- Note 1: ------- cd4snprd@vorskwab:/appl/cd4sn/beheer/script $ beh_sagtestconnect_cd4sn prodz --- OSA ERROR --- 2009-07-06 09:11:39 error code: 13 process:1040402, thread:1 file:unix_sem.c line:113 libosa errno=13 () Osa Semaphore: semop of lock failed id 105906198, index 1 ------------------ --- OSA ERROR --- 2009-07-06 09:11:39 error code: -1 process:1040402, thread:1 file:trace_reset.c line:98 libosa errno=-1 ((-1)) : Unable to create mutex ------------------ successful cd4snprd@vorskwab:/appl/cd4sn/beheer/script $ beh_sagtestconnect_cd4sn prodb successful --- OSA ERROR --- 2009-05-29 14:06:55 error code: 13 process:913632, thread:1 file:unix_sem.c line:113 libosa errno=13 () Osa Semaphore: semop of lock failed id 65011734, index 1 ------------------ --- OSA ERROR --- 2009-05-29 14:06:55 error code: -1 process:913632, thread:1 file:trace_reset.c line:98 libosa errno=-1 ((-1)) : Unable to create mutex Suppose you notice the upper errors. What is this? What is a semaphore? A hardware or software flag. In multitasking systems, a semaphore is a variable with a value that indicates the status of a common resource. Its used to lock the resource that is being used. A process needing the resource checks the semaphore to determine the resource's status and then decides how to proceed. In programming, especially in UNIX systems, semaphores are a technique for coordinating or synchronizing activities in which multiple process compete for the same operating system resources. A semaphore is a value in a designated place in operating system (or kernel) storage that each process can check and then change. Depending on the value that is found, the process can use the resource or will find that it is already in use and must wait for some period before trying again. Semaphones can be binary (0 or 1) or can have additional values. Typically, a process using semaphores checks the value and then, if it using the resource, changes the value to reflect this so that subsequent semaphore users will know to wait. Semaphores are commonly use for two purposes: to share a common memory space and to share access to files. Semaphores are one of the techniques for interprocess communication (interprocess communication). The C programming language provides a set of interfaces or "functions" for managing semaphores. a semaphore is a protected variable or abstract data type which constitutes the classic method for restricting access to shared resources such as shared memory in a multiprogramming environment. A counting semaphore is a counter for a set of available resources, rather than a locked/unlocked flag of a single resource. Semaphores are the classic solution to preventing race conditions in the dining philosophers problem, although they do not prevent resource deadlocks. OSA : Binary semaphores Introduction Binary semaphore is a system variable that can accept values 0 and 1. This is simplest way to exchange data between tasks and to synchronize them. All binary semaphores have size of one bit. Programmer can set number of binary semaphores by defining OS_BSEMS constant in OSAcfg.h and system will allocate necessary number of bytes. Therefore memory under binary semaphores reserved on compile stage and their number can't be changed in run-time. ftok Declaration: Function ftok (Path : String; ID : char) : TKey; Description: ftok returns a key that can be used in a semget (270),shmget (278) or msgget (266) call to access a new or existing IPC resource. Path is the name of a file in the file system, ID is a character of your choice. The ftok call does the same as it's C couterpart, so a pascal program and a C program will access the same resource if they use the same Path and ID Errors: ftok returns -1 if the file in Path doesn't exist. See also: semget (270),shmget (278),msgget (266) semop Declaration: Function semop(semid:longint; sops: pointer; nsops: cardinal): Boolean; Description: semop performs a set of operations on a message queue. sops points to an array of type TSEMbuf. The array should contain nsops elements. The fields of the TSEMbuf structure TSEMbuf = record sem_num : word; sem_op : integer; sem_flg : integer; should be filled as follows: sem__num The number of the semaphore in the set on which the operation must be performed. sem__op The operation to be performed. The operation depends on the sign of sem_op A positive number is simply added to the current value of the semaphore. If 0 (zero) is specified, then the process is suspended until the specified semaphore reaches zero. If a negative number is specified, it is substracted from the current value of the semaphore. If the value would become negative then the process is suspended until the value becomes big enough, unless IPC_NOWAIT is specified in the sem_flg. sem__flg Optional flags: if IPC_NOWAIT is specified, then the calling process will never be suspended. The function returns True if the operations were successful, False otherwise. Errors: In case of error, False is returned, and IPCerror is set. See also: semget (270), semctl (272) ------- Note 2: ------- Bug ID 4046185 Synopsis Oracle Application hangs during semop State 11-Closed:Not Reproducible (Closed) Category:Subcategory kernel:syscall Keywords hang | oracle | sema | semaphore | semid_ds | semop Responsible Engineer Prakash Sangappa Reported Against 5.5.1 Duplicate Of Introduced In Commit to Fix Fixed In Release Fixed Related Bugs 1224055 Submit Date 18-April-1997 Last Update Date 18-April-1997 Description xxxxx processes hang on semop system call. Once process goes into this state, it cannot be killed (even with -9 ). Running pstack on PID shows: # ./pstack 2815 2815: ora_dbwr_tts2 lwp#1 ---------- ef5b9148 semsys (2, 70000, efffe920, 1, ef5b8f38) ef5b9148 syscall (35, 2, 70000, efffe920, 1, ef5b8f38) + 4 0038eca4 sspwop (0, 0, 0, 0, 0, 0) + 9c lwp#2 ---------- ef5b7380 kaio (6, 0, 0, efffe85c, 1045500, 1000, 0) ef5b7380 _kaio (6, 0, 0, efffe85c, 1045500, 1000) + 4 ef5b99b8 _lwp_wait (0, 0, 0, 0, 0, 0) + 1c lwp#3 ---------- ef5b9a64 lwp_cond_wait (ef543f88, ef543f98, 0) ef6929b0 _aio_do_request (104ea84, 1000, 104ea84, 0, 107bd08, 107bd08) + 5c ef5b99b8 _lwp_wait (0, 0, 0, 0, 0, 0) + 1c lwp#4 ---------- ef5b9a64 lwp_cond_wait (ef531f88, ef531f98, 0) ef6929b0 _aio_do_request (10824f0, 1000, 10824f0, 0, 107bcc8, 107bcc8) + 5c ef5b99b8 _lwp_wait (0, 0, 0, 0, 0, 0) + 1c lwp#5 ---------- ef5b9a64 lwp_cond_wait (ef515f88, ef515f98, 0) ef5b9a64 lwp_cond_wait (ef515f88, ef515f98, 0) ef6929b0 _aio_do_request (10512f0, 1000, 10512f0, 0, 107bc88, 107bc88) + 5c ef5b99b8 _lwp_wait (0, 0, 0, 0, 0, 0) + 1c lwp#6 ---------- ef5b9a64 lwp_cond_wait (ef503f88, ef503f98, 0) ef6929b0 _aio_do_request (104cc00, 1000, 104cc00, 0, 107bc48, 107bc48) + 5c ef5b99b8 _lwp_wait (0, 0, 0, 0, 0, 0) + 1c Truss of a process shows that it is sleeping on semop system call. # truss -aef -p 2815 2815: psargs: ora_dbwr_tts2 2815: semop(458752, 0xEFFFE920, 1) (sleeping...) ps shows this process as Runnable (very strange): 8 R hkato 2815 1 0 40 20 50c4b988 6385 10:41:32 ? 0 :03 ora_dbwr_tts2 Stack of this thread in kernel using adb: cv_wait_sig(0x50e7003c,0x50ee9550,0x50c4b988,0x0,0x50f39860,0x50f330e0) semop(0x70000,0x2,0x1,0x0,0x50e7003c,0x50e70030) + 400 indir(0x1042db70,0x2,0x70000,0xefffe920,0x1,0xef5b8f38) + 7c Stack doesn't change even after sending a signal (kill -9) to this processes. Truss of a good process shows that process normally awaken after every few seconds by alarm signal: semop(458752, 0xEFFFE920, 1) (sleeping...) Received signal #14, SIGALRM, in semop() [caught] semop(458752, 0xEFFFE920, 1) Err#91 ERESTART sigprocmask(SIG_BLOCK, 0xEFFFE538, 0x00000000) = 0 times(0xEFFFE4C8) = 26187497 sigprocmask(SIG_UNBLOCK, 0xEFFFE538, 0x00000000) = 0 getcontext(0xEFFFE318) setcontext(0xEFFFE318) ioctl(20, PIOCUSAGE, 0xEFFFE7B4) = 0 ioctl(20, PIOCSTATUS, 0xEFFFE5B8) = 0 times(0xEFFFEAE0) = 26187497 time() = 861399257 times(0xEFFFEAE0) = 26187497 getcontext(0xEFFFE768) sigprocmask(SIG_BLOCK, 0xEFFFE918, 0x00000000) = 0 times(0xEFFFE848) = 26187497 setitimer(ITIMER_REAL, 0xEFFFE848, 0x00000000) = 0 sigprocmask(SIG_UNBLOCK, 0xEFFFE8B8, 0x00000000) = 0 semop(458752, 0xEFFFE920, 1) (sleeping...) Dumping pointer to semi_id structure: *sema/21X x50e74000: e9b8 262 e9b8 262 81a0 7 0 0 0 0 0 50e70000 320000 3357b728 0 3357b24b 0 1 0 0 50e70000,aa/8d 0x50e70000: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2813 1 0 1 0 1 0 0 2907 0 0 0 0 0 0 0 2817 7 0 1 0 0 0 0 2819 6 0 1 0 0 0 0 2821 1 0 1 0 0 0 0 2811 3 0 1 0 0 0 0 2823 0 0 0 0 0 0 0 2832 0 0 0 0 0 0 0 2835 0 0 0 0 0 0 0 2837 0 0 0 0 0 0 0 2839 0 0 0 0 0 0 0 2841 0 0 0 0 0 0 0 2843 0 0 0 0 0 0 0 2845 0 0 0 0 0 0 0 2847 0 0 0 0 0 0 0 2849 0 0 0 0 0 0 0 2851 0 0 0 0 0 0 0 2853 0 0 0 0 0 0 0 2855 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Proc structure: 50c4b988$Submitter-Id: Vince >Originator: Davi >Organization: brionews.com >Synopsis: semop (lock) suspends the entire process, not just the calling thread >Severity: serious >Priority: medium >Category: kernel >Class: sw-bug >Release: 4.1 >Environment: System : OpenBSD 4.1 Architecture: OpenBSD.i386 Machine : i386 >Description: A semop lock operation, on a locked semaphore, blocks all threads and not just the calling thread. The semop SVID and POSIX descriptions clearly states that only the calling thread should be blocked. How-To-Repeat: I needed an app to auto-answer shell scripts questions at boot time. No willing to install Expect and Tcl. I downloaded empty-0.6.11b which is a neat C program that works on all *nix platforms and even on Windoze. Between lines 427-445 it says: 427 if ((sem_key = ftok(sem_file, getpid())) == -1) 428 (void)perrxslog(255, "Can't generate semaphore key from file %s %m", sem_file); 429 430 if ((sem = semget(sem_key, 1, 0600 | IPC_CREAT)) == -1) 431 (void)perrxslog(255, "Can't get semaphore %m"); 430 433 semu.val = 0; 434 if (semctl(sem, 0, SETVAL, semu) == -1) 435 (void)perrxslog(255, "Can't set semaphore %d to lock: %m", sem); 436 437 if ((pid = fork()) == -1) 438 (void)perrxslog(255, "Daemonizing failed. Fatal first fork"); 439 if (pid > 0) { 440 if ((semop(sem, &check_sem, 1) == -1) && (errno != EINVAL) && (errno != EIDRM)) 441 /* Semaphore was removed by the child */ 442 (void)perrxslog(255, "Can't get semaphore %d status: %m", sem); 443 444 (void)exit(0); 445 } The problem came out on line #440 440 if ((semop(sem, &check_sem, 1) == -1) && (errno != EINVAL) && (errno != EIDRM)) execution never comes back and the program hangs. After several, long, and painful sessions with gdb, I splitted line #430: 430 if ((sem = semget(sem_key, 1, 0600 | IPC_CREAT)) == -1) 431 (void)perrxslog(255, "Can't get semaphore %m"); into: 430 sem = semget(sem_key, 1, 0600 | IPC_CREAT); 431 if ( sem == -1 && (errno != EINVAL) && (errno != EIDRM)) 432 etc.etc. This to get a clean look at the value of sem. After several experiments, with reboots between one and the next, it came out that sem had always values between 65536 and 65542. This didn't make any sense to me until I did further digging. With gdb I could not follow step-by-step the call to semop, because I discovered in the src tree there is no such thing like semop.c Instead its code lives in: /usr/src/sys/kern/sysv_sem.c which at line 135 declares: 135 #include and sem.h at line 139 says: 139 #define SEMVMX 32767 /* semaphore maximum value */ So my returning values of semget() are not compatible with that #define. And that's the origin of all the evil. >Fix: I am sure there are motivations why coder used a 'signed short int' as limit. Into another life I mainly come from corporate computing on PDP/11 and Sys/36, although in a far past I have had some fun in asm on Dos, and written few Dll on Windoze. Then I am kinda new to bsd and definitely not a kernel guru; [now no time to investigate] so I don't know what could be the possible effects of changing sys/sem.h line 139 into: 139 #define SEMVMX 0x7fffffff /* semaphore maximum value */ I just hope all this fatigue (50+ hours) might serve as hint to the maintainer. Please forgive any possible bullfish I wrote. Warmest regards, ----- Note: ----- /sem 107 sag_test_conne 708672 8.137843989 0.009683 lookuppn: /appl/ra4cd/racdprz/log/trace 107 sag_test_conne 708672 8.137845951 0.001962 vnop_lookup(dvp = F10001001E7B77F8, flag = 000E) = 0000, *vpp = F1000100201D93F8 107 sag_test_conne 708672 8.137848564 0.002613 vnop_lookup(dvp = F100010021303BF8, flag = 000E) = 0000, *vpp = F1000100212EAFF8 107 sag_test_conne 708672 8.137851006 0.002442 vnop_lookup(dvp = F1000100212EB3F8, flag = 000E) = 0000, *vpp = F10001003942ABF8 107 sag_test_conne 708672 8.137852616 0.001610 vnop_lookup(dvp = F10001003942ABF8, flag = 000E) = 0000, *vpp = F1000100393F8FF8 107 sag_test_conne 708672 8.137854424 0.001808 vnop_lookup(dvp = F1000100393F8FF8, flag = 000E) = 0000, *vpp = F1000100393BE3F8 107 sag_test_conne 708672 8.137854962 0.000538 lookuppn exit: '/appl/ra4cd/racdprz/log/trace' = vnode F1000100393BE3F8 15B sag_test_conne 708672 8.137856183 0.001221 vnop_open(vp = F1000100393BE3F8, flags = 0003, ext = 0000) = 0000 15B sag_test_conne 708672 8.137857058 0.000875 open fd=3 _FWRITE 163 sag_test_conne 708672 8.137866592 0.009534 read(3,000000002000B6B0,1000) 163 sag_test_conne 708672 8.137867173 0.000581 vnop_rdwr_read(vp = F1000100393BE3F8, offset = 0000000000000000, length = 1000, flags = 0003, ...) = ... 106 sag_test_conne 708672 8.138283867 0.416694 dispatch: cmd=sag_test_connect pid=708672 tid=1945835 priority=62 old_tid=8197 old_priority=255 CP UID=0 [689 usec] 163 sag_test_conne 708672 8.138289402 0.005535 vnop_rdwr_read(vp = F1000100393BE3F8, ext = 0000, ...) = 0000, 004C bytes moved 107 sag_test_conne 708672 8.138301927 0.012525 lookuppn: /appl/ra4cd/racdprz/log/trace 107 sag_test_conne 708672 8.138305627 0.003700 vnop_lookup(dvp = F10001001E7B77F8, flag = 0002) = 0000, *vpp = F1000100201D93F8 107 sag_test_conne 708672 8.138308688 0.003061 vnop_lookup(dvp = F100010021303BF8, flag = 0002) = 0000, *vpp = F1000100212EAFF8 107 sag_test_conne 708672 8.138311567 0.002879 vnop_lookup(dvp = F1000100212EB3F8, flag = 0002) = 0000, *vpp = F10001003942ABF8 107 sag_test_conne 708672 8.138313204 0.001637 vnop_lookup(dvp = F10001003942ABF8, flag = 0002) = 0000, *vpp = F1000100393F8FF8 107 sag_test_conne 708672 8.138315119 0.001915 vnop_lookup(dvp = F1000100393F8FF8, flag = 0002) = 0000, *vpp = F1000100393BE3F8 107 sag_test_conne 708672 8.138316190 0.001071 lookuppn exit: '/appl/ra4cd/racdprz/log/trace' = vnode F1000100393BE3F8 12E sag_test_conne 708672 8.138342712 0.026522 close fd=3 12E sag_test_conne 708672 8.138345165 0.002453 vnop_close(vp = F1000100393BE3F8, flags = 0003) = 0000 3C6 sag_test_conne 708672 8.138352768 0.007603 ipcget key=1001E21 flag=25B4 IPC_EXCL IPC_CREATE base=F100000180000000 size=0068 *mark=0020 3D0 sag_test_conne 708672 8.138355567 0.002799 semget key=1001E21 nsems=0003 semflg=25B4 IPC_EXCL IPC_CREATE sp=0000 3C6 sag_test_conne 708672 8.138357092 0.001525 ipcget key=1001E21 flag=01B4 base=F100000180000000 size=0068 *mark=0020 3D0 sag_test_conne 708672 8.138357450 0.000358 semget key=1001E21 nsems=0003 semflg=01B4 sp=F1000001800008F0 3D1 sag_test_conne 708672 8.138361246 0.003796 semop semid=4000016 sops=2FF1CA00 nsops=0002 163 sshd: 1102070 8.138964787 0.000486 vnop_rdwr_read(vp = F100010024A3F2B0, offset = 00000000000018CA, length = 4000, flags = 4000807, ... ) = ... 106 sag_test_conne 708672 8.138968988 0.004201 dispatch: cmd=sag_test_connect pid=708672 tid=1945835 priority=62 old_tid=3854547 old_priority=60 CPUID=0 [13 usec] ------ Note: ------ hi, i am using a library libosa.so. it uses the function fstat inside.so when i execute my program it is telling. "dlSharedLibraryLoader::loadSharedLibrary dlopen returned NULL. Error is: /lib/libosa.so: undefined symbol: fstat" anyone know what may be the problem. thnks in advance. ----- Note: ----- semop lock failed Up: Frequently Asked Questions Next: Compiler Switches Previous: SIGSEGV When running the ch_p4 device with SMP support (-comm=shared), you may occasionally see the message "p1_13043: p4_error: OOPS: semop lock failed" To fix this, try running the script cleanipcs that is included with MPICH. You can also use the command ipcs to list the shared memory and semaphore resources that are in use on a node. This can help you track down resources that are held by a different user that are preventing your MPI program from running. ----- Note: ----- Problem: Receiving error: fatal lock manager error: Semop failed, errno=22 Solution: This error is due to running out of semaphores or shared memory. To resolve the problem increase the InterBase parameters for shared memory and semaphores: version 3: SHMSIZE: size of shared memory segments SEMCOUNT: number of semaphores InterBase can use (max 128) version 4: V4_LOCK_MEM_SIZE: size of shared memory segments V4_LOCK_SEM_COUNT: number of semaphores make sure kernel parameters are high enough: SEMMNS: number of semaphores in system (SEMCOUNT+16) SEMMNU: number of semaphore undo structures (>= NPROC) SHMMAX: max size of share memory segment (>=SHMSIZE) ----- Note: ----- Problem: The following error shows up when running application: fatal lock manager error -semop failed (acquire) errno 28 Solution: This error occurs when the InterBase tries to acquire semaphores for use with the lock table and the operating system returns an error. This ususally occurs when the system doesn't have enough semaphores left to allocate to InterBase. To fix this issue you need to either: -------------------------------------------------------- 1) lower the number of semaphores InterBase is trying to acquire. This can be done by setting the semaphore parameter in the isc_config file in the root InterBase directory for v4.0 or lock_header file for v3.3. For v4.x servers the parameter is V4_LOCK_SEM_COUNT and SEMCOUNT for v3.3 servers. 2) Raise the number of semaphores that the operating system has to allocate to processes. This is done by changing the kernel parameters rebuilding the kernel (on operating systems that don't have dynamically tunable kernal parameters). ############################################################## SECTION 19: ############################################################## ############################################################## SECTION 20: libc, libc_r related stuff: ############################################################## ------ Note: ------ IOT/Abort trap in read.read [/usr/lib/libc_r.a] at 0xd0379dcc ($t2) 0xd0379dcc (read+0x1a8) 80410014 lwz r2,0x14(r1) I'm getting a runtime error on AIX, "IOT/Abort Trap (core dumped)". I wrote a small test program to test the log4cxx functionality, compiling it with the same compile options as my larger program. I was able to get some logging output out of the smaller program, but it crashed with the same message when it reached the end of main(). Has anyone else run into this problem on AIX? Any suggestions OK I solved my own problem. I looked a little closer, and the only thing that stood out about the one-argument error functions was that they were declared const. I removed the "const" from those two functions, removed the call to error() from Logger::getResourceBundle(), recompiled log4cxx, and everything was fine. Not sure if this solution is really ideal, but it did work :P Mailing list archives Site index · List index Message view « Date » · « Thread » Top « Date » · « Thread » From "Marshall Powers" Subject RE: IOT/Abort Trap on AIX 5.3 Date Thu, 24 May 2007 19:08:38 GMT Sorry, I'm not exactly a pro with GDB, but here is the output of a debugging session... bash-3.00$ gdb test ... This GDB was configured as "powerpc-ibm-aix5.1.0.0"...b (gdb) break main Breakpoint 1 at 0x1000064c: file main.cpp, line 8. (gdb) run Starting program: /home/mpowers/l4ctest/test Breakpoint 1 at 0x10000064c: file main.cpp, line 8. n [Switching to Thread 1] Breakpoint 1, main (argc=1, argv=0xffffffffffffab0) at main.cpp:8 8 LoggerPtr root = Logger::getRootLogger(); (gdb) n 9 BasicConfigurator::configure(); (gdb) n 11 root->debug("foo!"); (gdb) s log4cxx::Logger::debug(std::string const&) (this=0x1100c42b0, msg=@0xffffffffffff9d8) at /home.local/mpowers/new_log4cxx/src/logger.cpp:592 592 if (isEnabledFor(log4cxx::Level::getDebug())) { (gdb) n 593 forcedLog(log4cxx::Level::getDebug(), msg); (gdb) s log4cxx::Level::getDebug() () at /home.local/mpowers/new_log4cxx/src/level.cpp:55 55 static LevelPtr level(new Level(Level::DEBUG_INT, LOG4CXX_STR("DEBUG"), 7)); (gdb) n 56 return level; (gdb) n 57 } (gdb) n Program received signal SIGSEGV, Segmentation fault. 0x09000000a3b93200 in __thenan_df () from /usr/lib/nls/loc/uconv/UTF32TBL__64 (gdb) bt #0 0x09000000a3b93200 in __thenan_df () from /usr/lib/nls/loc/uconv/UTF32TBL__64 #1 0x09000000a3b931a4 in __thenan_df () from /usr/lib/nls/loc/uconv/UTF32TBL__64 #2 0x09000000003d488c in iconv (cd=0x1100ce530, inbuf=0xffffffffffff458, inbytesleft=0x0, outbuf=0xffffffffffff2d0, outbytesleft=0xffffffffffff2d8) at ../../../../../../../src/bos/usr/ccs/lib/libiconv/iconv.c:720 #3 0x090000000160a708 in __committed () from /usr/lib/nls/loc/iconv/Universal_UCS_Conv__64 #4 0x09000000003d488c in iconv (cd=0x1100ce3f0, inbuf=0xffffffffffff458, inbytesleft=0x0, outbuf=0xffffffffffff460, outbytesleft=0xffffffffffff530) at ../../../../../../../src/bos/usr/ccs/lib/libiconv/iconv.c:720 #5 0x0000000100053610 in apr_xlate_conv_buffer (convset=0x1100cc410, inbuf=0x0, inbytes_left=0x0, outbuf=0xffffffffffff558 "foo!\004\005\006\a\b\t\n\v\f\r\016\017\020\021\022\023\024\025\026\027\030\ 031\032\033\034\035\036\037 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcd\efghi jklmnopqrstuvwxyz{|}~\177?\200?\201?\202?\203?\204?\205?\206?\207?\210?\211? \212?\213?\214?\215?\216?\217?\220?\221?\222?\223?\224?\225?\226?\227?\230?\ 231?\232?\233?\234?\235?\236?\237 ¡¢£"..., outbytes_left=0xffffffffffff530) at /home.local/mpowers/new_log4cxx/lib/apr-util-1.2.7/xlate/xlate.c:343 #6 0x000000010004dc48 in log4cxx::helpers::APRCharsetDecoder::decode(log4cxx::helpers::ByteBuffer&, std::string&) (this=0x1100cc2d0, in=@0xffffffffffff708, out=@0xffffffffffff890) at /home.local/mpowers/new_log4cxx/src/charsetdecoder.cpp:105 #7 0x000000010004cea4 in log4cxx::helpers::Transcoder::decode(char const*, unsigned long, std::string&) (src=0x1100ca288 "foo!", len=4, dst=@0xffffffffffff890) at /home.local/mpowers/new_log4cxx/src/transcoder.cpp:67 #8 0x00000001000bf204 in void log4cxx::helpers::Transcoder::decode(std::string const&, std::string&) (src=@0xffffffffffff9d8, dst=@0xffffffffffff890) at /home.local/mpowers/new_log4cxx/include/log4cxx/helpers/transcoder.h:49 #9 0x00000001000c47f4 in log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT const&, std::string const&) const (this=0x1100c42b0, level1=@0x1100a99f0, message=@0xffffffffffff9d8) at /home.local/mpowers/new_log4cxx/src/logger.cpp:128 #10 0x00000001000c4da0 in log4cxx::Logger::debug(std::string const&) (this=0x1100c42b0, msg=@0xffffffffffff9d8) at /home.local/mpowers/new_log4cxx/src/logger.cpp:593 #11 0x00000001000006b4 in main (argc=1, argv=0xffffffffffffab0) at main.cpp:11 It looks like ultimately it?s a segfault caused deep within the iconv library. One problem I'm having is that if I do "step into" on line 55 of level.cpp, I get this error message: log4cxx::Level::getDebug() () at /home.local/mpowers/new_log4cxx/src/level.cpp:55 55 static LevelPtr level(new Level(Level::DEBUG_INT, LOG4CXX_STR("DEBUG"), 7)); (gdb) s __cxa_guard_acquire (g= findvar.c:706: internal-error: value_from_register: Value not stored anywhere! A problem internal to GDB has been detected, further debugging may prove unreliable. I'm not really familiar enough with gdb yet to figure this out, so I can't say for sure whether the problem is with the local version of iconv or with log4cxx. Marhall -----Original Message----- From: log4cxx-user-return-2008-mpowers=appsecinc.com@logging.apache.org [mailto:log4cxx-user-return-2008-mpowers=appsecinc.com@logging.apache.org] On Behalf Of Curt Arnold Sent: 2007-May-24 Thu 11:18 AM To: Log4CXX User Subject: Re: IOT/Abort Trap on AIX 5.3 On May 24, 2007, at 9:20 AM, Marshall Powers wrote: > Ok, I finally finished rebuilding the log4cxx stuff, recompiling > this (big) > project, fixing log4cxx, re-recompiling, and finally deploying and > running, > and I get a segfault (but not the same IOT/Abort Trap message). I > went back > to my simple program, and got the same thing, not even any logging > output > now. Here is my test program: > > #include > #include > > using namespace log4cxx; > > int main(int argc, char * argv[]) > { > LoggerPtr root = Logger::getRootLogger(); > BasicConfigurator::configure(); > > root->debug("foo!"); > return 0; > } > > Compiled with gcc on AIX 5.3 with flags -g and -maix64, as were > log4cxx, > apr, and apr-util. Any suggestions? > > > Thanks, > Marshall > If you used autotools to build, what happens if you do "make check"? If you used ant to build, did the unit tests pass? Any details on the segfault? Mime Unnamed text/plain (inline, Quoted Printable, 6169 bytes) View raw message ------ Note: ------ IOT/Abort trap in read.read [/usr/lib/libc_r.a] TITLE: DUNIX DUV40BAS00005-19970926 for DIGITAL UNIX V4.0B Aggregate ECO This ECO contains the following files: duv40bas00005-19970926.README duv40bas00005-19970926.CHKSUM duv40bas00005-19970926.tar duv40bas00005-19970926.ps Copyright (c) Digital Equipment Corporation 1997. All rights reserved. PRODUCT: Digital UNIX [R] V4.0B SOURCE: Digital Equipment Corporation ECO INFORMATION: ECO Name: DUV40BAS00005-19970926 ECO Superseded by This ECO: DUV40BAS00004-19970808 All previously released Official Digital UNIX V4.0B patches ECO Kit Approximate Size: 46MB Kit Applies To: Digital UNIX V4.0B ECO KIT SUMMARY: An update ECO kit exists for Digital UNIX V4.0B. This is the aggregate, setld-based, patch kit for Digital UNIX V4.0B. It is a cumulative patch kit that contains all patches that are currently available for distribution. The patch kit provides the ability to selectively install patches. The Release Notes and Installation Instructions document provides patch kit installation and removal instructions and a summary of each patch. Please read through the document prior to installing patches on your system. Note: At this time, the release note/installation document is only available in postscript form. It will be available in text and HTML formats in the future. INSTALLATION NOTES: Install this kit with the dupatch utility that is included in the patch kit. The Release Notes and Installation Instructions document provides detailed patch installation, patch removal, and a summary of each patch. You may need to baseline your system if you have manually changed system files on your system. The dupatch utility provides the baselining capability. KNOWN PROBLEMS WITH THE PATCH KIT: None. [R] UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open Company Limited.h Copyright Digital Equipment Corporation 1997. All Rights reserved. This software is proprietary to and embodies the confidential technology of Digital Equipment Corporation. Possession, use, or copying of this software and media is authorized only pursuant to a valid written license from Digital or an authorized sublicensor. This ECO has not been through an exhaustive field test process. Due to the experimental stage of this ECO/workaround, Digital makes no representations regarding its use or performance. The customer shall have the sole responsibility for adequate protection and back-up data used in conjunction with this ECO/workaround. =============================================================================== On systems with PCXAL, LK411, and similar keyboards, sometimes the keyboard stops working. PROBLEM: (TKTB49381,GOZ100613,UTO101179) (Patch ID: OSF410-035) ******** On systems with PCXAL, LK411, and similar keyboards, sometimes on boot or between sessions on the workstation monitor, the keyboard stops working. FILE(s): /sys/BINARY/gpc.mod subset OSFHWBIN410 CHECKSUM: 45770 18 /sys/BINARY/gpc_input.mod subset OSFHWBIN410 CHECKSUM: 52565 30 =============================================================================== Issuing a SET_DEVICE_MODE ioctl to the workstation driver to change cursor reporting to relative mode fails. PROBLEM: (QAR 49961) (Patch ID: OSF410-038) ******** Issuing a SET_DEVICE_MODE ioctl to change the reporting of the cursor position from absolute mode to relative mode fails. The ioctl is not being handled correctly by the workstation driver. FILE(s): /sys/BINARY/ws.mod subset OSFHWBIN410 CHECKSUM: 39282 97 =============================================================================== SUPERSEDED PATCHES: OSF410-042 (8.00) This patch corrects the following: - The S3 Trio64V+ graphics card (PB2GA-JC or PB2GA-JD) is not being uniquely identified by the driver at startup. PROBLEM: (QAR 50202) (Patch ID: OSF410-042) ******** The S3 Trio64V+ graphics card (PB2GA-JC or PB2GA-JD) was not being uniquely identified by the driver at startup. The identification string that the driver prints at startup now includes the "V+" suffix to distinguish between the S3 Trio64V+ card and the original S3 Trio64 card. FILE(s): /sys/BINARY/s3trio.mod subset OSFHWBIN410 CHECKSUM: 48987 43 /usr/sys/include/io/dec/ws/s3trio.h subset OSFBINCOM410 CHECKSUM: 28709 9 RCSfile: s3trio.h RCS: 1.1.17.2 =============================================================================== This patch fixes problems that occur with the dump and rdump commands. The commands will fail with the following error message: available blocks n < estimated blocks m When a member of group "operator" logged into the console and (r)dump was invoked with the -n flag, an extraneous file (/dev/:0) was created. PROBLEM: (HPXQ72698,STLQ80579,HPXQ89BA1) (Patch ID: OSF410-400079) ******** o The dump command fails when it is run through a pipe. The program will fail with the following error message: available blocks n < estimated blocks m PROBLEM: (HPXQ65A29) (Patch ID: OSF410-400079) ******** o When using the rdump command to dump to a regular file or to dump to a system whose uname command does not report OSF or ULTRIX, the command fails. The program will fail with the following error message: available blocks n < estimated blocks m PROBLEM: (HPXQ7269D) (Patch ID: OSF410-400079) ******** o When a member of group "operator" logged into the console and (r)dump was invoked with the -n flag, an extraneous file (/dev/:0) was created. FILE(s): /usr/sbin/dump subset OSFHWBASE410 CHECKSUM: 38814 80 RCSfile: dump.h RCS: 4.2.42.2 RCSfile: dump.msg RCS: 4.2.30.2 RCSfile: dumpmain.c RCS: 4.2.43.2 RCSfile: dumpoptr.c RCS: 4.2.24.2 RCSfile: dumptape.c RCS: 4.2.46.2 /sbin/dump subset OSFHWBASE410 CHECKSUM: 35642 80 /usr/lib/nls/msg/en_US.ISO8859-1/dump.cat subset OSFHWBASE410 CHECKSUM: 30558 10 /usr/sbin/rdump subset OSFCLINET410 CHECKSUM: 33611 80 =============================================================================== Correct quota command to return most severe error status on exit. PROBLEM: (49941) (Patch ID: OSF410-400122) ******** Correct problems where quota program was not returning most severe error as exit status. FILE(s): /usr/sbin/quota subset OSFBASE410 CHECKSUM: 56103 40 RCSfile: quota.c RCS: 4.2.44.2 RCSfile: rquotaxdr.c RCS: 4.2.4.2 /usr/lib/nls/msg/en_US.ISO8859-1/quota.cat subset OSFBASE410 CHECKSUM: 60092 1 =============================================================================== This patch fixes a "kernel memory fault" in the dqget() routine. PROBLEM: (HPAQ92E5E) (Patch ID: OSF410-400126) ******** This patch fixes a "kernel memory fault" in the dqget() routine. The crash signature will look like the following: 0 boot() [../../../../src/kernel/arch/alpha/machdep.c] 1 panic(kernel memory fault) [../../../../src/kernel/bsd/subr_prf.c] 2 trap() [../../../../src/kernel/arch/alpha/trap.c] 3 _XentMM() [../../../../src/kernel/arch/alpha/locore.s] 4 dqget() [../../../../src/kernel/ufs/ufs_quota.c] 5 quota_chown() [../../../../src/kernel/ufs/ufs_quota.c] 6 chown1() [../../../../src/kernel/ufs/ufs_vnops.c] 7 ufs_setattr() [../../../../src/kernel/ufs/ufs_vnops.c] 8 chown2() [../../../../src/kernel/vfs/vfs_syscalls.c] 9 chown() [../../../../src/kernel/vfs/vfs_syscalls.c] 10 syscall() [../../../../src/kernel/arch/alpha/syscall_trap.c] 11 _Xsyscall() [../../../../src/kernel/arch/alpha/locore.s] FILE(s): /usr/sys/BINARY/ufs_quota.o subset OSFBIN410 CHECKSUM: 44578 79 RCSfile: ufs_quota.c RCS: 4.2.32.2 =============================================================================== Systems with an S3 Trio64 graphics card can loose time (on the order of a few minutes a day). PROBLEM: (QAR 51230) (Patch ID: OSF410X11-400011) ******** Systems with an S3 Trio64 graphics card can loose time (on the order of a few minutes a day). FILE(s): /usr/shlib/X11/lib_dec_s3.so subset OSFSERPC410 CHECKSUM: 19011 160 =============================================================================== SUPERSEDED PATCHES: OSF410-400092 (13.00) This patch corrects the following: - Fixes a problem that causes the system to "assert_wait" panic and the stack contains streams modules. - A problem where a remote user will kill rlogin or telnet and the server host will have an orphanned login process and rlogind or telnetd process in sleep state indefinitely. This is seen only with Asian tty (atty) or any other host which is running c-list rather than STREAMS tty's. PROBLEM: (TKTR70408, QAR 47306) (Patch ID: OSF410-400092) ******** This problem affects only Digital UNIX systems using C-list-type tty's. If a user attempts to log into such a system remotely, using either telnet or rlogin, and kills the remote-access application (telnet or rlogin) during the login procedure (at the "Password:" prompt) then the rlogind or telnetd process will be left in a sleep state indefinitely. This condition can be recognized by the presense of rlogind or telnetd processes in the process table with no associated remote user. PROBLEM: (HPAQ95241, QAR 50022) (Patch ID: OSF410-405042) ******** This patch fixes a problem that causes the system to "assert_wait" panic and the stack contains streams modules. A representative stack trace is: panic(s = "assert_wait") assert_wait_mesg sched_prim.c pts_close pty.c close_wrapper str_subr.c csq_protect str_synch.c osr_pop_subr str_osr.c osr_close_subr str_scalls.c pse_close str_scalls.c speclose spec_vnops.c clearalias spec_vnops.c exit kern_exit.c psig kern_sig.c trap trap.c FILE(s): /sys/BINARY/pty.mod subset OSFBIN410 CHECKSUM: 46701 20 =============================================================================== This patch fixes a problem with the ftp command. If you ftp to an IBM MVS system using the IP address, the IBM system will refuse the connection. This problem can be encountered on any system that validates TOS (Type Of Service) requests if the file /etc/iptos is not used on the client. PROBLEM: (MCPMC0L3C/QAR 50410) (Patch ID: OSF410-400144) ******** Problem - If you ftp to an IBM MVS system using the IP address, the IBM system will refuse the connection. This problem can be encountered on any system that validates TOS (Type Of Service) requests if the file /etc/iptos is not used on the client. How to recognize this problem: If you attempt to ftp to any system that validates TOS requests, you may see the following: ftp> open Connected to 220-FTPSERV1 IBM MVS V3R1 at SAC1, 12:08:49 on 1996/12/11 421 Service not available, remote server has closed connection but it may work if you give the hostname of the system instead of the ip address. If you were running tcpdump, tracing the connection, you would see 12:26:20.076128 irvingirving.cxo.dec.com.2296 > mvssac1.rac.mci.com.ftp: S 1419648000:1419648000(0) win 32768 (DF) 12:26:20.176656 mvssac1.rac.mci.com.ftp > irvingirving.cxo.dec.com.2296: S 447244900:447244900(0) ack 1419648001 win 65535 12:26:20.176656 irvingirving.cxo.dec.com.2296 > mvssac1.rac.mci.com.ftp: . ack 1 win 33580 (DF) 12:26:20.274256 mvssac1.rac.mci.com.ftp > irvingirving.cxo.dec.com.2296: P 1:60(59) ack 1 win 65535 12:26:20.366000 irvingirving.cxo.dec.com.2296 > mvssac1.rac.mci.com.ftp: . ack 60 win 33580 (DF) [tos 0xa6] <<<<<----NOTICE THIS!!! 12:26:20.461648 mvssac1.rac.mci.com.ftp > irvingirving.cxo.dec.com.2296: R 447244960:447244960(0) win 0 In the above trace, the connection is rejected because the TOS (Type Of Service) field contains an invalid value. This problem can be avoided by using a /etc/iptos file as noted in the man page. However, the TOS field should never have this invalid value and that is the reason for the patch. FILE(s): /usr/bin/ftp subset OSFCLINET410 CHECKSUM: 63471 120 RCSfile: ftp.c RCS: 4.2.35.2 =============================================================================== This patch fixes a problem where telnet dumps core if the USER environment variable is the last variable in the enviroment list. PROBLEM: (FNO100131, QAR 43995) (Patch ID: OSF410-400150) ******** This patch fixes a problem where telnet dumps core if the USER environment variable is the last variable in the enviroment list. FILE(s): /usr/bin/telnet subset OSFCLINET410 CHECKSUM: 58935 136 RCSfile: telnet.c RCS: 4.2.6.2 =============================================================================== This patch fixes a mutex lock problem in TLI. The problem causes multi-threaded TLI applications to block forever. PROBLEM: (QARs 49922 and 48633) (Patch ID: OSF410-400151) ******** Multi-threaded TLI application blocks forever. dbx session will show that it blocks in the t_look() library routine. For this to happen, it is necessary that t_look() is called twice. Because it is called internally by a number of other TLI library routines, application can hang under all sorts of scenarios. FILE(s): /usr/ccs/lib/libtli.a subset OSFLIBA410 CHECKSUM: 01898 80 /usr/shlib/libtli.so subset OSFBASE410 CHECKSUM: 29583 80 /usr/ccs/lib/libxnet.a subset OSFLIBA410 CHECKSUM: 33792 68 /usr/ccs/lib/libxti.a subset OSFLIBA410 CHECKSUM: 33792 68 /usr/shlib/libxnet.so subset OSFBASE410 CHECKSUM: 45264 64 /usr/shlib/libxti.so subset OSFBASE410 CHECKSUM: 45264 64 =============================================================================== This patch fixes a problem that may cause /sbin/loader to fail to resolve duplicate symbols in dlopen'ed shared libraries. PROBLEM: (ULC-60, USG-04340, 50807) (Patch ID: OSF410-400152) ******** This patch fixes a problem that may cause /sbin/loader to fail to resolve duplicate symbols in dlopen'ed shared libraries. Duplicate symbols only exist in large multi-GOT objects. The application's dlopen call may get a segmentation violation and there may be no traceback information. Application developers may consider linking their application against the multi-GOT shared libraries as a test for this problem. Statically loading the libraries should work. More information on multi-Got objects can be obtained from the odump man page and the Assembly Language Programmer's Guide. FILE(s): /sbin/loader subset OSFBASE410 CHECKSUM: 61873 136 =============================================================================== SUPERSEDED PATCHES: OSF410-400160 (49.00) This patch corrects the following: - A potential security vulnerability has been discovered with the sendmail command, where under certain circumstances, users may gain unauthorized access. Digital has corrected this potential vulnerability. PROBLEM: (SSRT0421U, QAR 49337) (Patch ID: OSF410-400160) ******** A potential security vulnerability has been discovered with the sendmail command, where under certain circumstances, users may gain unauthorized access. Digital has corrected this potential vulnerability. FILE(s): /usr/sbin/sendmail subset OSFBASE410 CHECKSUM: 26013 200 /usr/sbin/mailq subset OSFBASE410 CHECKSUM: 26013 200 /usr/sbin/newaliases subset OSFBASE410 CHECKSUM: 26013 200 /usr/sbin/smtpd subset OSFBASE410 CHECKSUM: 26013 200 /usr/var/adm/sendmail/.mrg..sendmail.cf subset OSFBASE410 CHECKSUM: 34462 5 RCSfile: .mrg..sendmail.cf RCS: 1.1.10.2 /usr/var/adm/sendmail/.new..sendmail.cf subset OSFBASE410 CHECKSUM: 12224 21 =============================================================================== This patch fixes a problem in which setting full duplex mode on DEFPA using "/usr/sbin/fddi_config -i fta0 -x1" will not enable full duplex mode. PROBLEM: (HPAQ82D5D) (Patch ID: OSF410-400166) ******** This patch fixes a problem in which settting full duplex mode on DEFPA using "/usr/sbin/fddi_config -i fta0 -x1" will not enable full duplex mode. FILE(s): /usr/sbin/fddi_config subset OSFCLINET410 CHECKSUM: 58722 16 RCSfile: fddi_config.c RCS: 1.1.10.2 =============================================================================== A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. PROBLEM: (SSRT0448U, QAR 51211) (Patch ID: OSF410-400167) ******** A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. FILE(s): /usr/sbin/ftpd subset OSFCLINET410 CHECKSUM: 02905 104 RCSfile: ftpd.c RCS: 4.2.41.2 RCSfile: ftpd_syslog.c RCS: 1.1.4.2 =============================================================================== This patch fixes a problem in which "netstat -I fta0 -s" reports 6 bytes of the 8 byte "Station UID" and "Station ID". PROBLEM: (HPAQ82D5D) PATCH ID: OSF410-400168 ******** This patch fixes a problem in which "netstat -I fta0 -s" reports 6 bytes of the 8 byte "Station UID" and "Station ID". FILE(s): /usr/sbin/netstat subset OSFHWBASE410 CHECKSUM: 38571 112 =============================================================================== This patch fixes two problems that occur on systems with an EISA bus: - A system running four DE425 adapters off an EISA bus may hang. - If a device's EISA configuration file contains a function DISABLE keyword and the DISABLE option is selected, the device's driver may not be configured and probed at bus configuration time. PROBLEM: (EVT101968) (Patch ID: OSF410-400170) ******** A system that boots and runs OK with 3 DE425s on an eisa bus may hang during boot if a 4th DE425 is added to the bus. The last message printed to the screen during boot is "eisa at pci0" or something similar, and then the system hangs. It does not respond to the halt button. PROBLEM: (Patch ID: OSF410-400170) ******** When devices with a "disable" feature are used, the ECU table must be modified manually when a device function is set to "disabled" because the system does not detect the change. FILE(s): /sys/BINARY/eisa.mod subset OSFHWBIN410 CHECKSUM: 12297 71 =============================================================================== This patch fixes two problems with the mailx command. PROBLEM: (UVO105070, QAR 50239) (Patch ID: OSF410-400172) ******** This patch fixes a problem with the mailx command. An error occurs when replying to a message in which the "CC:" field contains blank-separated names not enclosed in angle brackets ("<...>"). When replying to mail using lowercase "r", the "CC:" field on the reply lists all blank-separated names after all enclosed angle bracket addresses. The following error message is displayed: ... User unknown PROBLEM: (QAR 45357) (Patch ID: OSF410-400172) ******** This patch provides a way for the mailx command to display the next message instead of redisplaying the current message (default behavior). When you press the Return key while reading mail, the default behavior for mailx is to redisplay the current message. This patch provides a new variable, "gonext", which allows you to read the next message. You can set the "gonext" variable in the .mailrc file or at the mailx prompt using the "set gonext" command. Setting the "gonext" variable in the .mailrc file makes the change permanent. Setting the "gonext" variable at the mailx prompt means the "gonext" variable is only valid for the duration of the current mail session. FILE(s): /usr/bin/mailx subset OSFBASE410 CHECKSUM: 19612 208 /usr/bin/Mail subset OSFBASE410 CHECKSUM: 19612 208 =============================================================================== This patch fixes a problem where use of "ld -r" will change symbol preemption behavior. PROBLEM: (QAR 49301) (Patch ID: OSF410-400174) ******** This patch fixes a problem where use of "ld -r ..." will change symbol preemption behavior. Without this patch, some global relocations can be converted to locals as an optimization. These locals cannot be preempted. An undocumented linker option has been added in the patched linker to prevent this conversion. This new switch is "ld -no_local_conversion ..." FILE(s): /usr/ccs/lib/cmplrs/cc/ld subset OSFBASE410 CHECKSUM: 27007 824 RCSfile: ld.c RCS: 4.3.87.4 RCSfile: uldgnum.c RCS: 1.1.13.2 RCSfile: ldgetname.c RCS: 4.3.5.2 RCSfile: lderr.c RCS: 1.1.2.2 RCSfile: ldr_atexit.c RCS: 4.2.11.4 RCSfile: schyield.s RCS: 1.1.2.2 RCSfile: ldr_dummy.c RCS: 4.2.11.3 RCSfile: ldr_status.c RCS: 4.2.8.3 RCSfile: ldr_load.c RCS: 1.1.3.5 =============================================================================== SUPERSEDED PATCHES: OSF410-405043 (60.00) This patch corrects the following: - Fixes a Token Ring transmission timeout. The driver can experience "ID 380PCI20001 (8/13/95)" in the TI380PCI Errata on the AlphaServer 4100 platform. PROBLEM: (HPAL83FE3) (Patch ID: OSF410-405043) ******** This patch fixes a Token Ring transmission timeout. The driver can experience "ID 380PCI20001 (8/13/95)" in the TI380PCI Errata on the Alpha platforms. FILE(s): /sys/BINARY/tra.mod subset OSFHWBIN410 CHECKSUM: 07407 68 =============================================================================== On systems with an ATI Mach64 graphics card, sometimes the monitor will lose synchronization or become stuck in power-save mode. PROBLEM: (TKTB71151, TKTB64248) (Patch ID: OSF410X11-405005) ******** On systems with an ATI Mach64 graphics card, sometimes the monitor will lose synchronization or become stuck in power-save mode. FILE(s): /usr/shlib/X11/lib_dec_ati64.so subset OSFSERPC410 CHECKSUM: 44372 128 /usr/shlib/X11/lib_dec_ws.so subset OSFSER410 CHECKSUM: 33115 112 /usr/shlib/X11/libextdpms.so subset OSFSER410 CHECKSUM: 63578 32 =============================================================================== Users appear to be logged in when they are not because CDE dtterm sometimes doesn't reset the utmp entry on exit. PROBLEM: (CLD ISO100270) (Patch ID: OSF410CDE-400004) ******** Users appear to be logged in when they are not because CDE dtterm sometimes doesn't reset the utmp entry on exit. FILE(s): /usr/dt/bin/dtterm subset OSFCDEDT410 CHECKSUM: 33343 408 =============================================================================== This patch fixes two problems with the CDE window manager. In the first problem, the CADDS5 (a third party cad tool) text window tends to walk off the screen. In the second problem, the CDE icon box moves 29 pixels higher along the x axis each time the user's home session is resumed. PROBLEM: (CLD USG-04316) (Patch ID: OSF410CDE-400005) ******** Under the CDE window manager, the CADDS5 (a third party cad tool) Text Window tends to walk off the screen. PROBLEM: (QAR 49251) (Patch ID: OSF410CDE-400005) ******** The CDE icon box moves 29 pixels higher along the x axis each time the user's home session is resumed. FILE(s): /usr/dt/bin/dtwm subset OSFCDEDT410 CHECKSUM: 03899 648 =============================================================================== This patch fixes a LEX problem. Without this patch, LEX rejects quoted regular expressions where the ending quote is preceded by a double backslash backslash, as in: "\\"xxx, and produces the following message: "lex:(Warning at line 8)Non-terminated string". PROBLEM: (QAR 51280) (Patch ID: OSF410-400177) ******** LEX rejects a quoted regular expression where the ending quote is preceded by a double backslash, as in: "\\"xxx. The following warning is produced by LEX: "lex: (Warning at line 10)Non-terminated string". The resultant lex.yy.c file may or may not compile cleanly. To reproduce the problem, use the following lex specification: %{ extern char cbuf[]; extern int clen; %} %% "\\\"" {cbuf[clen++] = '"';} "\\"n { cbuf[clen++]='\n'; } "\\"t { cbuf[clen++]='\t'; } "\\"b { cbuf[clen++]='\b'; } "\\"r { cbuf[clen++]='\r'; } "\\"f { cbuf[clen++]='\f'; } "\\\\" { cbuf[clen++]='\\'; } %% char cbuf[100]; int clen; int main() { clen = 0; yylex(); cbuf[clen] = 0; printf("%s\n", cbuf); } --------- sauron:test/qar/48948 [577%] lex yong.l lex: (Warning at line 8)Non-terminated string line 16: syntax error lex: (Warning) bad state 205 175 sauron:test/qar/48948 [580%] lex yong.l sauron:test/qar/48948 [599%] cc lex.yy.c -ll sauron:test/qar/48948 [600%] a.out abc def abcdef FILE(s): /usr/ccs/bin/lex subset OSFPGMR410 CHECKSUM: 00579 80 =============================================================================== uugetty - CD/DSR not dropping right away after dial-out. PROBLEM: (QAR 49652) (Patch ID: OSF410-050) ******** When dialing out on a port running uugetty, an immediate hang-up is not after the session completes. The hang-up occurs approximately 60 seconds following the end of the session. FILE(s): /usr/lib/uucp/uugetty subset OSFUUCP410 CHECKSUM: 55446 224 RCSfile: uugetty.c RCS: 4.3.23.2 =============================================================================== This patch fixes a problem in which rwhod daemon can cause a core dump with a segmentation fault. PROBLEM: (HPAQC0XEH, TKTQ81868) (Patch ID: OSF410-400183) ******** This patch fixes a problem in which rwhod daemon can cause a core dump with a segmentation fault. A typical stack trace shows: > 0 __getutid_r()[] 1 __getutid() [] FILE(s): /usr/sbin/rwhod subset OSFCLINET410 CHECKSUM: 34638 24 RCSfile: rwhod.c RCS: 4.2.17.2 =============================================================================== This patch fixes a problem where the NTP deamon (xntpd) does not work using a Spectracom radio clock as a reference. PROBLEM: (HPXQ10VTZ/QAR 48622) (Patch ID: OSF410-400191) ******** This patch fixes a problem where the NTP deamon (xntpd) does not work using a Spectracom radio clock as a reference. If NTP is configured for a radio clock, at the first response from the clock, the code will loop using all CPU cycles. FILE(s): /usr/sbin/xntpd subset OSFCLINET410 CHECKSUM: 63921 304 =============================================================================== This patch corrects several serious problems with the "csh" command. Some of these problems can cause the "grep" and "find" commands to fail, when the user runs the commands under the "csh" shell. PROBLEM: (QAR 41085) (Patch ID: OSF410-400193) ******** Fixes a problem in which the :q history substitution modifier in csh may result in a syntax error. PROBLEM: (QAR 41087) (Patch ID: OSF410-400193) ******** Fixes a problem in which the :x history substitution modifier in csh may result in a syntax error. PROBLEM: (QAR 41746) (Patch ID: OSF410-400193) ******** Fixes a problem in which receipt of a SIGALRM signal by a child process of csh does not result in csh reporting the death of the child process with the message 'Alarm clock'. Instead the system displays the following message: auto-logout PROBLEM: (QAR 42250) (Patch ID: OSF410-400193) ******** Fixes a problem in which csh erroneously jumps to the middle of an embedded if-then statement. This occurs upon reaching the end of a while loop, when the loop is entered manually, rather than executed from a script. PROBLEM: (QARs 43026, 45613, 47089, 47146, HPXQC14BV, HPXQC15ND) ******** (Patch ID: OSF410-400193) Fixes a problem in which an error in a file sourced by csh results in a logout of the csh process. PROBLEM: (QAR 44539) (Patch ID: OSF410-400193) ******** Fixes a problem in which the default value for prompt2 in csh is ">" instead of "?". PROBLEM: (QAR 46802) (Patch ID: OSF410-400193) ******** Fixes a problem in which csh can core dump when expanding a large "*" pattern. PROBLEM: (QAR 45059) (Patch ID: OSF410-400193) ******** Fixes a problem in which csh fails to do file name substitution on the result of a command substitution. PROBLEM: (QAR 46160, QAR 47019, TKTQB1363) (Patch ID: OSF410-400193) ******** Fixes a problem in which csh expands metacharacters (for example, "*") even when they are inside quoted strings. This problem can cause the grep, sed, and find commands to fail when "*" appears inside a quoted regular expression argument. PROBLEM: (QAR 45632) (Patch ID: OSF410-400193) ******** Fixes a problem in which csh does not expand tilde ("~") in a path name that also contains a backquoted expression ("`...`"). PROBLEM: (QAR 47453) (Patch ID: OSF410-400193) ******** Fixes a problem in which the autologout feature of csh is by default enabled for pseudo ttys (for example, during an rlogin session). With this patch, autologout is enabled by default if csh runs as a login shell and if the standard input stream is not a pseudo tty and the DISPLAY environment variable is not set. Autologout under these conditions can be disabled by adding the following line to your .login or .cshrc file: set autologout = 0 If autologout is set to a value greater than 0 (zero), csh terminates if a command is not entered within the prescribed number of minutes after issuing the csh prompt. You can find out whether the autologout feature is enabled for the session by checking the value of $autologout. PROBLEM: (QAR 48250) (Patch ID: OSF410-400193) ******** Fixes a problem in which csh can core dump while using the history facility when edit mode is set to emacs. PROBLEM: (QAR 46161) (Patch ID: OSF410-400193) ******** Fixes a problem in which csh does not read the .cshrc and .login files in the user's home directory if they are not owned by the user and in the same group as the user. PROBLEM: (QAR 44298) (Patch ID: OSF410-400193) ******** Fixes a problem in which csh prints a misleading message ("No match") when a command line contains characters such as "*" or "?" and the user does not have read access to the current directory. With this patch, csh will print the more more descriptive message "Glob aborted - Permission denied". PROBLEM: (QAR 26082) (Patch ID: OSF410-400193) ******** Fixes a problem in which a csh loop that runs background processes exits when too many processes have been created. With this patch, csh works like ksh in that it waits for process creation to succeed. FILE(s): /usr/bin/csh subset OSFBASE410 CHECKSUM: 42040 248 =============================================================================== This patch fixes a problem in which the cron command deletes non-local file system files mounted in either the /tmp, /var/tmp, or /var/preserve directories. PROBLEM: (QAR 46084) (Patch ID: OSF410-400194) ******** This patch fixes a problem in which the cron command removes non-local file system files mounted in either the /tmp, /var/tmp, or /var/preserve directories. FILE(s): /usr/var/spool/cron/crontabs/.new..root subset OSFBASE410 CHECKSUM: 19634 2 /usr/var/spool/cron/crontabs/.mrg..root subset OSFBASE410 CHECKSUM: 08670 5 =============================================================================== SUPERSEDED PATCHES: OSF410-400115 (16.00) This patch corrects the following: - Under enhanced security, sometimes users (even root) are unable to log in on graphics console, even after using dxdevices or edauth to clear the t_failures count. - On systems running enhanced security, user-written applications that call auth_for_terminal() may fail with a segmentation fault. PROBLEM: (HPAQ17931, HPAQA353A) (Patch ID: OSF410-400115) ******** On systems running enhanced security, if a customer's application calls the auth_for_terminal() routine when the v_users keyword has been specified for a device in the device assignment database (/etc/auth/system/devassign) specifying the users that are permitted to login on that device, and a user who is not on the v_users list attempts to login on that device, the customer's customer's application will fail with a segmentation fault. PROBLEM: (CLD HGOQB0282) (Patch ID: OSF410-400203) ******** On a system using enhanced security, login attempts at a graphics console can fail, giving the message "Terminal is disabled -- see Account Administrator." This failure persists even after using dxaccounts or edauth to clear the t_failures entry for the display in the terminal control database. FILE(s): /usr/ccs/lib/libsecurity.a subset OSFC2SEC410 CHECKSUM: 35199 396 /usr/shlib/libsecurity.so subset OSFBASE410 CHECKSUM: 22628 360 =============================================================================== This patch fixes several problems in the ex and vi editors. o Blank lines in the .exrc file prevent the vi editor from executing. o The ex editor does not properly manage the file name buffers when a "write append" command fails. o The vi editor may erroneously report a "Bad file number" error message when switching between files. PROBLEM: (UVO104615 QAR 44614 QAR 47303) (Patch ID: OSF410-400204) ******** Blank lines in the .exrc file prevent the vi editor from executing. To recreate this problem, create a .exrc file in your home directory. Leave a blank line at the end of the .exrc file. Enter the vi command; vi will exit immediately and your terminal window will display the shell prompt. PROBLEM: (QAR 39453) (Patch ID: OSF410-400204) ******** The ex editor does not properly manage the file name buffers when a "write append" command fails. For example, prior to invoking the ex editor, assume file "a" does not exist, but file "b" does. Run ex without specifying a file name, enter some characters and try to get ex to output these characters in append mode in append mode to a file that does not exist. After it correctly reports "no such file or directory", specify a file that does exist. For example: systema> ex :a hello worlds . :w No current filename :w >> a "aa" No such file or directory :w >> b "b" 3 lines, 12 characters When you try to exit the file, ex will write to the wrong file. :e b No write since last change (:edit! overrides) #>-- won't do it :xit #<-- Let's quit "a" [New file] 3 lines, 12 characters #>-- ok, I'll write for you systema> The problem is that ex creates a new file when it should not. After applying this patch, the ex editor will provide the following error message: No current file name PROBLEM: (QAR 46284) (Patch ID: OSF410-400204) ******** The vi editor may erroneously report a "Bad file number" error message when switching between files. For example, if file "xx" has access privileges of -r--r--r--(no write enabled) and file "yy" has privileges of -rw-r--r-- (write enabled), the following ort example will cause vi to report "Bad file number": vi xx yy :n Shift+Ctrl+^ dd :w Shift+Ctrl+^ :e! "xx" [Read only] Bad file number Shift+Ctrl+^ "yy" Bad file number After applying this patch, the "xx" file is reported to be read-only and the write will fail. The "yy" file, will be written with no error message. error message. FILE(s): /usr/bin/ex subset OSFBASE410 CHECKSUM: 07506 288 RCSfile: ex.c RCS: 4.3.32.2 ex_temp.h Revision: 4.2.7.3 ex_addr.c Revision: 4.2.9.4 ex_re.h Revision: 4.2.7.3 ex_cmds.c Revision: 4.3.25.2 ex_temp.h Revision: 4.2.7.3 ex_cmds2.c Revision: 4.2.9.4 ex_temp.h Revision: 4.2.7.3 ex_cmdsub.c Revision: 4.2.19.3 ex_temp.h Revision: 4.2.7.3 ex_data.c Revision: 4.2.7.2 ex_extern.c Revision: 4.2.7.2 ex_re.h Revision: 4.2.7.3 ex_temp.h Revision: 4.2.7.3 ex_get.c Revision: 4.2.7.2 ex_io.c Revision: 4.4.34.2 ex_temp.h Revision: 4.2.7.3 ex_put.c Revision: 4.2.10.5 ex_re.c Revision: 4.2.9.7 ex_re.h Revision: 4.2.7.3 ex_set.c Revision: 4.2.7.3 ex_temp.h Revision: 4.2.7.3 ex_subr.c Revision: 4.3.9.4 ex_re.h Revision: 4.2.7.3 ex_temp.c Revision: 4.3.12.5 ex_temp.h Revision: 4.2.7.3 ex_tty.c Revision: 4.2.7.3 ex_unix.c Revision: 4.2.7.4 ex_temp.h Revision: 4.2.7.3 ex_v.c Revision: 4.2.7.3 ex_re.h Revision: 4.2.7.3 ex_vadj.c Revision: 4.2.7.2 ex_vget.c Revision: 4.2.14.4 ex_vmain.c Revision: 4.2.13.2 ex_voper.c Revision: 4.2.7.4 ex_vops.c Revision: 4.2.9.2 ex_vops2.c Revision: 4.2.11.2 ex_vops3.c Revision: 4.2.7.4 ex_vput.c Revision: 4.2.9.2 ex_vwind.c Revision: 4.2.7.2 ex_crypt.c Revision: 4.2.5.4 ex_temp.h Revision: 4.2.7.3 /usr/bin/edit CHECKSUM: 07506 288 /usr/bin/vedit CHECKSUM: 07506 288 /usr/bin/vi CHECKSUM: 07506 288 /usr/bin/view CHECKSUM: 07506 288 =============================================================================== This patch fixes a problem that causes dbx to hang when stepping past a system() function call. PROBLEM: (HPAQ20QW1, 51670) (Patch ID: OSF410-400205) ******** Attempting to step past a system() function call causes dbx to hang. FILE(s): /usr/ccs/lib/cmplrs/cc/dbx subset OSFBASE410 CHECKSUM: 39366 960 RCSfile: dbxsignal.c RCS: 1.1.16.5 =============================================================================== SUPERSEDED PATCHES: OSF410-046 (26.00) This patch corrects the following: - o Fixes a problem with the ikdebug debugger that causes a system to panic with the following message: panic: simple_lock: time limit exceeded o Fixes a problem in which an AlphaStation 600, as well as other systems, may crash when user mode debuggers are in use (for example, dbx or ladebug). - Reduces the kdebug memory usage. - Fixes user mode breakpoints/single stepping. - Fixes kdebug MP problems. PROBLEM: (QAR 49695) (Patch ID: OSF410-046) ******** Kdebug uses too much memory reading in the kernel symbol table. The full symbol table size can be > 7 MB. Use vmstat -P and look for kdebug line. PROBLEM: (QAR 50184) (Patch ID: OSF410-046) ******** Kdebug sometimes confuses user mode breakpoints and/or single stepping for requests to enter kdebug. If a kdebug prompt appears on the console ("db{0}> ") when either dbx or ladebug is being used for debugging. A hang is also possible due to the following problem. PROBLEM: (50184) (Patch ID: OSF410-046) ******** Kdebug entry may cause the system to hang. If kdebug is activated on an MP machine, the system may hang with garbled messages printed on the console. PROBLEM: (QAR 51380, QAR 51698, QAR 50184) (Patch ID: OSF410-053) ******** This patch fixes several debugger problems: o This patch fixes a problem with the ikdebug debugger in which the system panics with the following message: panic: simple_lock: time limit exceeded This problem can occur whenever any exception is encountered while running the debugger. o This patch fixes a problem in which an AlphaStation 600 as well as other systems may crash when user mode debuggers are in use (for example, dbx or ladebug). This crash occurs because of a misplaced call to the console SAVETERM and only happens if the console variable CONSOLE is set to GRAPHICS. FILE(s): /sys/BINARY/kdebug.mod subset OSFBIN410 CHECKSUM: 32393 234 =============================================================================== A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. PROBLEM: (CLD SSRT0438U) (Patch ID: OSF410CDE-400007) ******** A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. FILE(s): /usr/dt/bin/dtpad subset OSFCDEDT410 CHECKSUM: 00003 112 RCSfile: dtpad.c RCS: 2.1.6.2 =============================================================================== A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. PROBLEM: (CLD SSRT0431U) (Patch ID: OSF410CDE-400008) ******** A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. FILE(s): /usr/dt/bin/dtappgather subset OSFCDEDT410 CHECKSUM: 48360 56 /usr/dt/bin/dtlogin subset OSFCDEDT410 CHECKSUM: 38150 176 /usr/dt/config/Xsession.d/0030.dttmpdir subset OSFCDEDT410 CHECKSUM: 29822 5 =============================================================================== SUPERSEDED PATCHES: OSF410-047 (27.00) This patch corrects the following: - Fixes an automatic reboot problem when the system is booted from tape using the custom_install.sh file in a mini-root enviroment. - Fixes problems encountered when restoring file systems from a tape device using the btextract utility. PROBLEM: (QAR 50371) (Patch ID: OSF410-047) ******** This patch fixes the ADVANCED option to the btextract utility to correctly restore /etc/fstab file entries. Without this patch, the following two errors could occur: o Entries in the /etc/fstab file will sometimes be incorrect after the btextract utility completes. For example in the following line, the entry for swap should actually be swap1: /dev/rz1b swap ufs sw 0 2 o A restore operation deletes the entry for /dev/fd in the /etc/fstab file. PROBLEM: (QAR 50873) (Patch ID: OSF410-047) ******** This patch fixes a problem encountered while using the btextract utility to restore file systems. The utility displays a system tape table and asks you which tape device you want to use to boot your system. If you choose a tape device that does not contain a tape, the system displays the following error messages: Positioning the Tape. Error on device named /dev/nrmt0h - Place tape drive unit ONLINE Error: Tape drive is not accessible PROBLEM: (QAR 51219) (Patch ID: OSF410-056) ******** This patch fixes the Bootable Tape utilities. An automatic reboot problem when the system is booted from tape using the custom_install.sh file in a mini-root enviroment was corrected. To recreate this problem, create a custom_install.sh file in /usr/lib/sabt/sbin directory with the following commands: ------------------------------------------------------------------ #!/sbin/sh mount root_domain#root /mnt #mount /dev/rz0a /mnt /mnt/sbin/sysconfig -r bparm bootdef_dev="/dev/rrz1a" /mnt/sbin/sysconfig -r bparm boot_dev="/dev/rrz1a" /mnt/sbin/sysconfig -r bparm boot_osflags="A" /mnt/sbin/reboot ------------------------------------------------------------------ where rz1 can be changed to the boot device where root resides. Where if root device is rz0a and is ufs then uncomment the above line and comment the first mount statement. Create a bootable tape with selecting root filesystem to be backed up. After booting from the tape, you will see that reboot hangs. You need to bring up the system by hitting the power switch off/on. After applying this patch, rewrite the custom_install.sh file as follows: ------------------------------------------------------------------ #!/sbin/sh /sbin/sysconfig -r bparm bootdef_dev="/dev/rrz1a" /sbin/sysconfig -r bparm boot_dev="/dev/rrz1a" /sbin/sysconfig -r bparm boot_osflags="A" /sbin/reboot ------------------------------------------------------------------ Create a bootable tape with selecting root filesystem to be backed up. After booting from the tape, you will see that reboot does not hang. FILE(s): /usr/sys/bin/btextract subset OSFBINCOM410 CHECKSUM: 14079 71 /usr/sys/bin/mktape subset OSFBINCOM410 CHECKSUM: 50411 18 =============================================================================== This patch fixes the following problems in the DECwindows Session Manager (dxsession) application. Ungraceful exit can be made through the window manager's 'Close' button, whose behavior is inconsistent with that of dxsession's 'End Session' button. PROBLEM: (HPAQ210HY) (Patch ID: OSF410DX-400007) ******** Exiting from the DECwindows Session Manager (dxsession) via the 'Close' option, of the window menu, results in an undesirable saving of the dxsession's scratch file in /tmp. Use of this button also causes a behavior inconsistent with dxsession's 'End Session' button. FILE(s): /usr/bin/X11/dxsession subset OSFOLDX11400 CHECKSUM: 44434 224 =============================================================================== This patch fixes a problem in which the rpc.rquotad daemon hangs when using quotas for NFS filesystems in a TruCluster or Available Server (ASE) v1.4 environment. PROBLEM: (MCPM21BM5) (Patch ID: OSF410-400214) ******** This patch fixes a problem in which the rpc.rquotad daemon hangs when using quotas for NFS filesystems in a TruCluster or Available Server (ASE) v1.4 environment. When attempting to get a report on user quotas for NFS mounted filesystems, the quota command always return 'none'. The rpc.rquotad daemon on the NFS server hangs until the connect system call eventually times out. FILE(s): /usr/sbin/rpc.rquotad subset OSFCLINET410 CHECKSUM: 65299 32 RCSfile: rpc.rquotad.c RCS: 1.1.12.2 =============================================================================== When setting the date with the clock_settime rtl service routine, the date will not get past the date of 'Sat Sep 8 19:46:39 2001' If you try to set past this date the routine returns a EINVAL error. PROBLEM: (CLD MCPM20W7F, QAR 51771) (Patch ID: OSF410-400215) ******** When setting the date with the clock_settime rtl service routine, the date will not get past the date of 'Sat Sep 8 19:46:39 2001'. If you try to set past this date the routine returns a EINVAL error. FILE(s): /usr/ccs/lib/librt.a subset OSFLIBA410 CHECKSUM: 37152 59 /usr/shlib/librt.so subset OSFBASE410 CHECKSUM: 13142 72 =============================================================================== This patch fixes a problem that can occur with programs linked with libaio. These programs could dump core with a SIGSEGV signal or corrupt memory when calling the close() function with a bad file descriptor value. PROBLEM: (QAR50120, QAR40188, QAR47526, QAR47839) (Patch ID: OSF410-405063) ******** This patch fixes a problem that can occur with programs linked with libaio. These programs could dump core with a SIGSEGV signal or corrupt memory when calling the close() function with a bad file descriptor value. A bad or incorrect file descriptor value would be one greater than or equal to 4096 or less than 0. The following is a sample stack trace: thread 0xb signal IOT/Abort trap at >*[nxm_thread_kill, 0x3ff8053eab0] 0 nxm_thread_kill(...) [0x3ff8053eab0] 1 pthread_kill(...) [0x3ff8056ed4c] 2 (unknown)() [0x3ff805756ec] 3 __tis_raise(...) [0x3ff8010fb00] 4 raise(...) [0x3ff80159f40] 5 abort(...) [0x3ff80170a68] 6 errAbort(...) [0x3ff80565b04] 7 (unknown)() [0x3ff80566398] 8 (unknown)() [0x3ff807b220c] 9 (unknown)() [0x3ff807b3620] 10 exc_unwind(...) [0x3ff807b3664] 11 exc_raise_signal_exception(...) [0x3ff807b38e8] 12 (unknown)() [0x3ff81002490] 13 close(...) [0x3ff81003488] 14 main(argc = 4, argv = 0x11ffff988) ["aio_test.c":157, 0x120001d64] FILE(s): /usr/ccs/lib/libaio.a subset OSFLIBA410 CHECKSUM: 02889 20 =============================================================================== A potential security vulnerability in talkd has been corrected. PROBLEM: (SSRT0446U) (Patch ID: OSF410-400223) ******** A potential security vulnerability has been discovered in talkd, where under certain circumstances, system integrity may be compromised. Digital has corrected this potential vulnerability. FILE(s): /usr/sbin/talkd subset OSFCLINET410 CHECKSUM: 25972 32 RCSfile: talkd.c RCS: 4.2.6.2 /usr/sbin/ntalkd CHECKSUM: 25972 32 =============================================================================== This patch fixes the problem of the Environmental Monitoring daemon (envmond) failing to start sometimes when the system boots up. PROBLEM: (QAR: 51220) (Patch ID: OSF410DX-003) ******** This patch fixes the problem of the Environmental Monitoring daemon (envmond) failing to start sometimes when the system boots up. FILE(s): /sbin/init.d/envmon subset OSFENVMON410 CHECKSUM: 51205 5 RCSfile: envmon RCS: 1.1.7.2 /usr/sbin/envmond subset OSFENVMON410 CHECKSUM: 38025 12 =============================================================================== This patch is an upgrade/replacement for the "FTA" FDDI driver and fixes a DMA Error which can occur with the older driver. If it became necessary to back out a partially constructed frame from the transmit queue, the older driver was unable to properly backed out the frame before restarting. This resulted in the following errors being logged to the /var/adm/messages file: vmunix: fta0: Halted. vmunix: fta0: Halt Reason: DMA Error vmunix: fta0: Link Unavailable. vmunix: fta0: Link Available. PROBLEM: (749B23467/QAR 52293) (Patch ID: OSF410-400225) ******** This patch is an upgrade/replacement for the "FTA" FDDI driver and fixes a DMA Error which can occur with the older driver. If it became necessary to back out a partially constructed frame from the transmit queue, the older driver was unable to properly backed out the frame before restarting. This resulted in the following errors being logged to the /var/adm/messages file: vmunix: fta0: Halted. vmunix: fta0: Halt Reason: DMA Error vmunix: fta0: Link Unavailable. vmunix: fta0: Link Available. FILE(s): /sys/BINARY/fta.mod subset OSFHWBIN410 CHECKSUM: 51917 56 =============================================================================== This patch fixes a problem with the cpio command in which cpio fails to create multiple archives on 150 MB or 250 MB tape. PROBLEM: (QAR 51798) (Patch ID: OSF410-065) ******** This patch fixes a problem with the cpio command in which cpio fails to create multiple archives on 150 MB or 250 MB tape. The system displays the following error message: /dev/CTAPE1 weof 1 failed: I/O error ERROR: Cpio operation failed. FILE(s): /sys/BINARY/cam_tape.mod subset OSFHWBIN410 CHECKSUM: 39740 198 =============================================================================== This patch corrects two problems that occur when using the dtksh command: o dtksh can lose output lines when a pipe or I/O indirection is used. o The following error message may be displayed after using a pipe in dtksh: dtksh: hist_flush: EOF seek failed errno=9 PROBLEM: (EVT102013, QAR 50237, QAR 39301) (Patch ID: OSF410CDE-400009) ******** This patch fixes a problem in which the dtksh command can lose output lines when a pipe or I/O indirection is used. PROBLEM: (QAR 46945, QAR 32865) (Patch ID: OSF410CDE-400009) ******** This patch fixes a problem in which the following message may be displayed after using a pipe in dtksh: dtksh: hist_flush: EOF seek failed errno=9 FILE(s): /usr/dt/bin/dtksh subset OSFCDEMIN400 CHECKSUM: 35279 848 =============================================================================== This patch fixes a problem in which the size field of a process displayed by the acctcom command is displayed incorrectly. PROBLEM: (TKTQ 72352) (Patch ID: OSF410-400230) ******** This patch fixes a problem in which the size field of a process displayed by the acctcom command is displayed incorrectly. Typically, processes that use a lot of memory will display very invalid size values. These sizes will either be absurdly large or negative. Compile and run the following program. Acctcom Acctcom will display a size that is about 8 times larger than the actual memory memory usage. #include #include #include #include #include #define ALLOC_SIZE 1024 * 1024 /* 1M byte */ main() { int i; struct rusage ru; i = fork(); if (i == 0) { child(); } else { wait3(NULL,0,&ru); printf("size information %ld %ld %ld\n",ru.ru_ixrss,ru.ru_idrss, ru.ru_isrss); } } child() { int counter; int i; char *address; for( counter = 1 ; counter < 100 ; counter++ ) { address = ( char * )malloc( sizeof( char ) * ALLOC_SIZE ); if( address == NULL ) { printf( "Can't allocate memory.\n" ); sleep( 60 ); exit( 0 ); } for( i = 0 ; i < ALLOC_SIZE ; i++ ) { *address = ( char )( counter % 255 ); address ++; } printf( "Allocate %5dM byte\n" , counter ); } exit( 1 ); } FILE(s): /usr/bin/acctcom subset OSFACCT410 CHECKSUM: 62535 40 RCSfile: acctcom.c RCS: 4.3.21.2 =============================================================================== SUPERSEDED PATCHES: OSF410X11-400013 (104.00) This patch corrects the following: - On systems with PowerStorm 4D40T, 4D50T, or 4D60T graphics options, on X server may hang every 49 days. - Screen flickers on and off when in power-save mode. PROBLEM: (QAR 50045) (Patch ID: OSF410X11-400013) ******** On a system with a graphics card and monitor which support VESA Display Power Management Signalling (DPMS), the monitor can become stuck in power-save mode or the screen can flicker on and off when the X server screen saver is turned off, DPMS is enabled, and the mouse is moved to bring the display out of power- save mode. The display does not come out of power-save mode correctly until you press a key on the keyboard or click a mouse button. This problem is particularly noticeable on ALPHAbook 1 systems. PROBLEM: (7KSB31809) (Patch ID: OSF410X11-400014) ******** On systems with PowerStorm 4D40T, 4D50T, or 4D60T graphics options, the X server may hang (and not exit) at or near the following local times: Fri Jan 31 03:14:51 1997 Fri Mar 21 20:17:39 1997 Sat May 10 14:20:26 1997 Sun Jun 29 07:23:13 1997 Mon Aug 18 00:26:01 1997 Mon Oct 6 17:28:48 1997 Tue Nov 25 09:31:35 1997 FILE(s): /usr/shlib/X11/libos.so subset OSFX11410 CHECKSUM: 22610 272 =============================================================================== This patch fixes the following problem in the Motif toolkit. The drag-n-drop operation fails, which may cause Motif applications to abort. PROBLEM: (USG-00572 and QAR 51941) (Patch ID: OSF410X11-400015) ******** Motif applications may abort when you use the drag-and-drop feature. Motif toolkit function XmCreateDragIcon() gets a "BadMatch (invalid parameter attributes)" error and then crashes because the code fails to set the correct image dimensions. FILE(s): /usr/lib/libXm.a subset OSFX11410 CHECKSUM: 45038 2357 /usr/shlib/libXm.so subset OSFX11410 CHECKSUM: 63442 2224 =============================================================================== SUPERSEDED PATCHES: OSF410-405023 (6.00), OSF410-400146 (39.00) This patch corrects the following: - Fixes "kernel memory fault" panics from the kernel malloc() routine when System V FIFOs created via STREAMS and fattach() are in use. - Fixes a problem that causes the system to panic with a kernel memory fault or "malloc_audit: guard space corruption" with osr_run as an entry in the stack. - Prevents delivery of data in subsequent streams messages with one read of a streams pipe. This problem only happens if the read has a message length greater than the length of the first message in the pipe. PROBLEM: (QAR 48449) (Patch ID: OSF410-405023) ******** When reading a streams pipe, if more than one message is in the pipe, a read with a message length greater than the first message will result in reading all of the messages in the pipe concatenated. PROBLEM: (QARs 49942 & 49814) (Patch ID: OSF410-400146) ******** This patch fixes a problem that causes the system to panic with a kernel memory fault or "malloc_audit: guard space corruption" with osr_run as an entry in the stack. At this time no additional stack information is available. PROBLEM: (QAR 52041) (Patch ID: OSF410-400236) ******** A "kernel memory fault" panic will be seen originating from the malloc() routine. The top stack entries will be as follows. Many different kernel routines may appear in the stack below malloc(). panic("kernel memory fault") trap() _XentMM() malloc() This problem is due to malloc() bucket corruption that occurs when there is a racing close() and fdetach() of a System V fifo. In the dump the thread that did the racing close can often be found with the traceback: thread_block() vfs_busy() dounmount() sth_update_times() osr_close_subr() pse_close() speclose() spec_close() vn_close() closef() close() syscall() _Xsyscall() FILE(s): /sys/BINARY/streams.mod subset OSFBIN410 CHECKSUM: 05433 268 =============================================================================== This patch fixes a problem in which loadable kernel modules that are loaded with the kloadsrv daemon at run time, may cause a system panic. PROBLEM: (QAR 51743) (Patch ID: OSF410-400243) ******** This patch fixes a problem in which loadable kernel modules that are loaded with the kloadsrv daemon at run time, may cause a system panic. Generally, this problem will only be seen by engineers who are developing loadable drivers. This problem will only be seen in loadable drivers that are compiled with the "cc -Wb,-static ..." switch and have a reference to the gp register in the first instruction. The dis command can be used to determine if the gp register is referenced in the first instruction. FILE(s): /sbin/kloadsrv subset OSFBASE410 CHECKSUM: 32351 176 RCSfile: kloadsrv.c RCS: 4.2.15.6 =============================================================================== This patch fixes several problems with the network lock daemon, rpc.lockd: o NFS mounted file systems may hang. o An error occurs with NFS mounted user mail files. This error prevents the files from being locked and prints out the following message: cannot lockf o An NFS problem may occur. The system displays the following error message: NFS error 48 cannot bind sockets PROBLEM: (QAR 51227) (Patch ID: OSF410-400246) ******** This patch fixes a problem that can cause an NFS mounted file sytem to hang. The problem is caused by an incorrect FCNTL return. PROBLEM: (QAR 14680) (Patch ID: OSF410-400246) ******** This patch fixes a problem that can cause the rpc.lockd program to fail because it loses a message granting NLM approval. The message would be: call unlock_res stat granted rather than: call lock_res stat blocked PROBLEM: (QAR 43271) (Patch ID: OSF410-400246) ******** This patch fixes a problem that can cause an NFS mounted file system to hang. The problem is caused by an incorrect FCNTL return. PROBLEM: (QAR 45844) (Patch ID: OSF410-400246) ******** This patch fixes a problem that can cause an NFS mounted file system to hang during file locking. PROBLEM: (QAR 46298) (Patch ID: OSF410-400246) ******** This patch fixes a problem that can cause rpc.lockd to crash with a core dump. Multi-vendor environments are particularly susceptible to this problem. PROBLEM: (QAR 46630) (Patch ID: OSF410-400246) ******** This patch fixes a problem that occurs with NFS mounted user mail files. The error prevents the files from being locked and prints out the following message: cannot lockf PROBLEM: (QAR 49265) (Patch ID: OSF410-400246) ******** This patch fixes an NFS problem. The system displays the following error message: NFS error 48 cannot bind sockets Other fixes include the cleanup of some error messages and to direct more errors to syslog. Additionally, the signal handler (SIGALRM) was redesigned to improve the efficiency of retranmission and to prevent possible lost transmits. FILE(s): /usr/sbin/rpc.lockd subset OSFNFS410 CHECKSUM: 12114 136 =============================================================================== Infrequently, under heavy disk I/O loads, user data can be written to the wrong disk, resulting in data corruption. PROBLEM: (QAR 49540) (Patch ID: OSF410-405065) ******** Infrequently, under heavy disk I/O loads, user data can be written to the wrong disk, resulting in data corruption. FILE(s): /sys/BINARY/cam_simport.mod subset OSFHWBIN410 CHECKSUM: 63519 238 =============================================================================== This patch fixes a problem that occurs on SMP systems using LSM in which the system panics with a "simple lock time limit exceeded" message. PROBLEM: (MCPM40H5M) (Patch ID: OSF410-400255) ******** This patch fixes a problem that occurs on SMP systems using LSM in which the system panics with a "simple lock time limit exceeded" message. The problem is that the running process goes to sleep waiting for an LSM simple lock that never becomes available. A sample stack trace is as follows: > 0 stop_secondary_cpu(do_lwc = 0x0) 1 panic(s = 0xfffffc00005a1568 = "event_timeout: panic request") 2 event_timeout () 3 xcpu_puts() 4 printf() 5 panic(s = 0xfffffc0000572ea8 = "simple_lock: time limit exceeded") 6 simple_lock_fault() 7 simple_lock_time_violation() 8 voliodone() 9 biodone() 10 cdisk_complete() 11 xpt_callback_thread() The thread holding the lock: > 0 thread_block() 1 u_anon_faultpage() 2 u_anon_fault() 3 u_map_fault() 4 vm_fault() 5 trap() 6 _XentMM() 7 bcopy() 8 vols_volinfo() 9 volsioctl_real() 10 spec_ioctl() 11 vn_ioctl() 12 ioctl_base() 13 ioctl() 14 syscall() 15 _Xsyscall() FILE(s): /sys/BINARY/lsm.mod subset OSFLSMBIN410 CHECKSUM: 63389 278 =============================================================================== SUPERSEDED PATCHES: OSF410-400149 (42.00), OSF410-400187 (79.00) This patch corrects the following: - Fixes a DEC C compiler problem that occurred when compiling a structure tag whose length exceeded 256 characters. - This patch provides a new version of the DEC C compiler to fix QAR 49944. It fixes a problem that causes the compiler to generate incorrect code for switch statements whose expression is of type short or type char. The version of this fixed compiler is "DEC C V5.2-035". - Fixes three DEC C compiler problems. o Fixes "Assertion failure: Compiler internal error" compiler crash that occurs when compiling xemacs. o Fixes "Invalid expression" error with valid token-pasting macro. o Fixes "Fatal: memory access violation" compiler crash when the left side of a structure pointer operator (->) was not an lvalue. This case should produce a compiler error. PROBLEM: (QAR 49944) (Patch ID: OSF410-400149) ******** This patch fixes a compiler problem where the DEC C compiler will generate incorrect code for switch statements whose expression is of type short or type char. The problem occurs at all optimization levels. This problem can be identified by running the following test program. % cat a.c main() { short step = 1; do { switch (step++) { case 1 : printf("step = 1\n"); break; case 2 : printf("step = 2\n"); break; } } while (step <= 2); } # The incorrect program output is: % cc a.c ; a.out step = 1 # The correct program output is: % cc a.c ; a.out step = 1 step = 2 The version of this fixed compiler is "DEC C V5.2-035". PROBLEM: (QAR 51448) (Patch ID: OSF410-400187) ******** This patch fixes a crash in the DEC C compiler that occurs when compiling a structure whose tag is longer than 256 characters. The problem occurs only when compiling with debug symbols (-g). Below is an example of a program that will cause this crash. % cat test.c #define a(x) x##x##x##x##x##x##x##x##x##x##x##x##x##x##x##x struct a(XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX); % cc -g test.c cc: Fatal: A memory access violation (bus error or segmentation fault) has occurred. Please submit a problem report. PROBLEM: (Patch ID: OSF410-400257) ******** Fixes "Assertion failure: Compiler internal error" compiler crash that occurred when compiling xemacs editor. The compiler would crash in certain cases where one expression is an lvalue and the other an rvalue. The workaround was to use "cc -oldc". PROBLEM: (Patch ID: OSF410-400257) ******** Fixes "Invalid expression" compiler error with valid token-pasting macro that occurred when compiling a public domain calc program. PROBLEM: (QAR 51915, QAR 47301) (Patch ID: OSF410-400257) ******** Fixes "Fatal: memory access violation" compiler crash that occurred when the left side of a structure pointer operator (->) was not an lvalue. This case should produce a compilation error and not a compiler crash. FILE(s): /usr/ccs/lib/cmplrs/cc/gemc_cc subset OSFCMPLRS410 CHECKSUM: 57809 4112 =============================================================================== Fix pax's tar and cpio archive handling to allow filesizes greater than 4GB. PROBLEM: (MANBBP075, HPXQC1120) (Patch ID: OSF410-400258) ******** The pax program (invoked as pax, tar or cpio) would incorrectly handle files larger than 4GB in size. The program would not complain on creation of an archive, however it had truncated the filesize when writing it to the archive file header. Thus on extract, it would appear to have found a corrupt archive. In addition it will now warn when it truncates a file that is too large to be archived (8 GB). FILE(s): /usr/bin/pax subset OSFBASE410 CHECKSUM: 12113 120 RCSfile: pax.c RCS: 1.1.16.9 /usr/bin/cpio subset OSFBASE410 CHECKSUM: 12113 120 /usr/bin/tar subset OSFBASE410 CHECKSUM: 12113 120 /sbin/.upd..pax subset OSFBASE410 CHECKSUM: 59363 120 RCSfile: pax.c RCS: 1.1.16.9 /sbin/.upd..cpio subset OSFBASE410 CHECKSUM: 59363 120 /sbin/.upd..tar subset OSFBASE410 CHECKSUM: 59363 120 =============================================================================== The application builder (dtbuilder) core dumps when changing the default button in the revolving property editor. PROBLEM: (CLD STLB32273) (Patch ID: OSF410CDE-400010) ******** The application builder (dtbuilder) core dumps when changing the default button in the revolving property editor. To reproduce the problem: - Start the Application Builder. - Click on the 'Custom Dialog', hold down the mouse button, and move the cursor out of the main window. - Double click on the white section of the 'Custom Dialog' window. - The Revolving Property Editor comes up. Click on 'Default Button' and change it to 'dialog_button_1'. - Click on 'Apply'. FILE(s): /usr/dt/bin/dtbuilder subset OSFCDEDEV400 CHECKSUM: 56834 2616 RCSfile: dtbuilder.c RCS: 2.1.2.3 =============================================================================== This patch fixes the following problems with the ar command: o When creating or modifying an archive, the ar command may leave a large file in /tmp or in the current directory (when the -l option is used). o If Patch 46.00 was previously installed (OSF400-046), the ar command cannot find object modules specified for deletion or extraction if the file name is longer than 13 characters. An error message similar to the following is displayed: ar: Error: button_previous.gif not found PROBLEM: (QAR 46095, QAR 47425) (Patch ID: OSF410-400263) ******** This patch fixes the following problems with the ar command: o When creating or modifying an archive, the ar command may leave a large file in /tmp or in the current directory (when the -l option is used) if the process running ar is aborted with the kill command, a Ctrl/c, or terminates abnormally on its own. PROBLEM: (QAR 51801) (Patch ID: OSF410-400263) ******** o If Patch 26.00 was previously installed (OSF410-046), the ar command cannot find object modules specified for deletion or extraction if the file name is longer than 13 characters. An error message similar to the following is displayed: ar: Error: button_previous.gif not found FILE(s): /usr/ccs/lib/cmplrs/cc/ar subset OSFBASE410 CHECKSUM: 02612 400 RCSfile: bsearch.c RCS: 4.2.6.3 =============================================================================== Enhanced /usr/sbin/inetd PROBLEM: (Patch ID: OSF410-078) ******** This patch corrects two problems: The default rate limitation was set to 500 instances of any specific service per minute which was insufficient. With this patch, this limitation is increased, which can be reduced by using the -R option. inetd was closing all possible file descriptors per service request. With this patch, inetd was changed to only close know open file descriptors which reduces the number of system calls per service request. FILE(s): /usr/sbin/inetd subset OSFCLINET410 CHECKSUM: 21284 40 RCSfile: inetd.c RCS: 4.2.32.2 /usr/lib/nls/msg/en_US.ISO8859-1/inetd.cat subset OSFCLINET410 CHECKSUM: 49584 2 =============================================================================== /usr/sbin/vipw now issues warning when used to edit a large password file. PROBLEM: (Patch ID: OSF410-079) ******** vipw calls /usr/sbin/mkpasswd to rebuild the hashed password database files by building the new files from scratch. This causes a problem when there is a large number of users in /etc/passwd. This version of vipw now issues a warning that /usr/sbin/usermod should be used if there are approximately 500 or more user entries in /etc/passwd. FILE(s): /usr/sbin/vipw subset OSFBASE410 CHECKSUM: 25163 24 RCSfile: vipw.c RCS: 4.3.11.2 /usr/lib/nls/msg/en_US.ISO8859-1/vipw.cat subset OSFBASE410 CHECKSUM: 13365 1 =============================================================================== The script /usr/sbin/removeuser now calls /usr/sbin/userdel to do the actual work of deleting a user's account. PROBLEM: (Patch ID: OSF410-081) ******** When there is a large number of user entries in /etc/passwd, /usr/sbin/removeuser, by calling /usr/sbin/mkpasswd, would take a long time to rebuild the hashed database file. /usr/sbin/removeuser now calls /usr/sbin/userdel which updates the hashed password database directly without the need to rebuild the database. FILE(s): /usr/sbin/removeuser subset OSFBASE410 CHECKSUM: 23424 6 RCSfile: removeuser.sh RCS: 1.1.18.2 /usr/lib/nls/msg/en_US.ISO8859-1/removeuser.cat subset OSFBASE410 CHECKSUM: 12705 2 =============================================================================== This patch fixes a problem in which an AlphaServer 4100 with a PCI device that uses dense space I/O handles will panic with the following error message: panic: Machine Check 670 PROBLEM: (QAR 52433, CLD USG-04637) (Patch ID: OSF410-405087) ******** This patch fixes a problem in which an AlphaServer 4100 with a PCI device that uses dense space I/O handles will panic with the following error message: panic: Machine Check 670 FILE(s): /sys/BINARY/mcpcia.mod subset OSFHWBIN410 CHECKSUM: 51574 28 =============================================================================== This patch fixes a problem in the comm command where it will split long line(s) in a file by inserting a that exceeds 255 characters. In some cases, characters will be truncated. PROBLEM: (QAR 53754 ) (Patch ID: OSF410-405095) ******** Also, the Problem Description needs to be modified to say something like the following: There is a problem in the comm command where it will split long line(s) in a file by inserting a that exceeds 255 characters. In some cases, characters will be truncated. For example, if you execute the following command on a Digital Unix v4.0 or greater: # comm -12 /etc/sysconfigtab /etc/sysconfigtab > outfile When you view the outfile, you will notice that the long lines under the "# %%%PCI" header are split. In this case the lines were being split after Sub_Vid_Mo_Fla and before - O on lines beginning with "PCI_Option = PCI_SE_Rev". FILE(s): /usr/bin/comm subset OSFBASE410 CHECKSUM: 55355 24 RCSfile: comm.c RCS: 4.2.16.2 =============================================================================== This patch fixes a problem in which the syslogd program cannot properly forward large messages to remote systems. It will either write them to the wrong facility (specified in /etc/syslog.conf) or write incomplete data. PROBLEM: (TKTB51380) (Patch ID: OSF410-088) ******** This patch fixes a problem in which the syslogd program cannot properly forward large messages to remote systems. It will either write them to the wrong facility (specified in /etc/syslog.conf) or write incomplete data. FILE(s): /usr/sbin/syslogd subset OSFBASE410 CHECKSUM: 29311 40 RCSfile: syslogd.c RCS: 4.2.37.2 =============================================================================== SUPERSEDED PATCHES: OSF410-048 (28.00) This patch corrects the following: - STREAMS tty line discipline was not correctly processing type-ahead characters. - Fixes a wide variety of system panics and other problems caused by random memory corruptions. PROBLEM: (QAR 50783) (Patch ID: OSF410-048) ******** Under some circumstances type ahead characters are not processed if a new line is not entered. This is prevalently seen on screen tools which switch from canonical mode (line process mode) to raw mode. PROBLEM: (HPAQ41AAX STLQ23067 UVO105389 HPAQ116QT HPAQ50RP5 HPAQ400K4 ******** ZPOBA0391 ZPOB60233) (Patch ID: OSF410-090) This is a mandatory patch for all systems. This patch fixes a wide variety of system panics and other problems caused by random memory corruption. The problem has typically shown up at universities, or Internet service providers hosting a lot of streams activity. The following symptoms have appeared in a variety of places throughout the kernel. Corrupted memory buckets are usually the 256-byte size, although they could be any other size. o Lock timeouts o Kernel memory faults o Unaligned kernel accesses A typical stack trace is shown in the following example: 3 panic("pmap_activate lock timeout") 4 pmap_activate() [/src/kernel/arch/alpha/pmap.c":2710] 5 thread_run() [src/kernel/kern/sched_prim.c":2295] 6 idle_thread() [src/kernel/kern/sched_prim.c":3105] In the stack trace above, the lock timed out because the lock structure (at 0xfffffc0067fefe00) appeared to be locked when it really was not. This was due to corruption of the structure by user data that had overflowed from an mblk structure preceding this memory block. To identify whether you have this memory corruption problem you have to look beyond the stack trace. The stack traces will vary considerably, even on the same system, so the only way to identify this problem is to find the corrupted memory bucket and look at the contents. This is a typical 512-byte corrupted memory bucket. The first 17 bytes of data have been overwritten by data that belongs to another thread. The 17 bytes have overflowed from an mblk structure preceding this memory bucket, and have corrupted this memory bucket, overwriting pointers or locks or whatever the first 3 quadwords used to contain. (kdbx) 0xfffffc0067fefe00/32X fffffc0067fefe00: 6918a5e6f04e78d3 cf7814aca7a32d6f fffffc0067fefe10: 0000000000000043 0000000000000000 fffffc0067fefe20: 0000000000000000 fffffffffffffff8 fffffc0067fefe30: 0000000000000000 0000000000000001 fffffc0067fefe40: 000000000044a5cc 000000000000001a ... If you display the block of memory immediately preceding the corrupted memory, you may see an mblk structure there, if it is still around by the time the crash dump takes place. Sometimes the data that has corrupted the memory bucket is readable ASCII, but more often it is unreadable binary data. The number of bytes of data can be anywhere from 1 byte to several quadwords of data. FILE(s): /sys/BINARY/ldtty.mod subset OSFBIN410 CHECKSUM: 49615 131 =============================================================================== AlphaStation 255 systems with a PowerStorm 3D30 (PBXGB-AA) or PowerStorm 4D20 (PBXGB-CA) graphics card may hang, halt, or crash. PROBLEM: (MGO102704, GOZ100762, UVO105425) (Patch ID: OSF410-091) ******** AlphaStation 255 systems with a PowerStorm 3D30 (PBXGB-AA) or PowerStorm 4D20 (PBXGB-CA) graphics card may hang, halt, or crash. A typical halt is: halt code 2 kernel stack not valid halt A typical crash is: trap: invalid memory read access from kernel mode faulting virtual address: 0x69622f7273753088 pc of faulting instruction: 0xfffffc00004440e0 ra contents at time of fault: 0xfffffc00004440d0 sp contents at time of fault: 0x000000011ffff708 panic (cpu 0): kernel memory fault FILE(s): /usr/sys/include/io/dec/ws/tga.h subset OSFBINCOM410 CHECKSUM: 54387 32 RCSfile: tga.h RCS: 1.1.16.2 /sys/BINARY/tga.mod subset OSFHWBIN410 CHECKSUM: 46783 122 =============================================================================== SUPERSEDED PATCHES: OSF410-400171 (56.00), OSF410-400196 (85.00) This patch corrects the following: - Fixes the problem of t_optmgmt() T_NEGOTIATE calls returning T_SUCCESS, but not actually negotiating the socket options. This behavior is a UNIX95 specification standard compliance bug. - Fixes a problem that manifests itself by the system hanging or becoming inoperable when a number of XTI connections reaches 500. - This patch resolves a hang in the xticlose() routine and a kernel memory fault in the xti_discon_req() routine. PROBLEM: (QAR 49764) (Patch ID: OSF410-400171) ******** When attempting to establish a number of XTI connections, > 500, the client system hangs and becomes inoperable. This fix will allow an application to issue a large number of connect requests (up to 3K connections). PROBLEM: (QAR 51684) (Patch ID: OSF410-400196) ******** This patch fixes the problem of t_optmgmt() T_NEGOTIATE calls returning T_SUCCESS, but not actually negotiating the options. PROBLEM: (CLD MCPM209Q3, QAR 51394) (Patch ID: OSF410-400264) ******** This patch fixes a hang in the xticlose() routine. The user would see a stack trace similar to the following: thread_block() ["../../../../src/kernel/kern/sched_prim.c":2036 ] mpsleep() ["../../../../src/kernel/bsd/kern_synch.c":563 ] streams_mpsleep() ["../../../../src/kernel/streams/str_env.c":574 ] xticlose() ["../../../../src/kernel/streamsm/xtiso.c":965 ] close_wrapper() ["../../../../src/kernel/streams/str_subr.c":317 ] csq_protect() ["../../../../src/kernel/streams/str_synch.c":770 ] osr_pop_subr() ["../../../../src/kernel/streams/str_osr.c":1686 ] osr_close_subr() ["../../../../src/kernel/streams/str_scalls.c":1345 ] pse_close() ["../../../../src/kernel/streams/str_scalls.c":1196 ] speclose() ["../../../../src/kernel/vfs/spec_vnops.c":2462 ] spec_close() ["../../../../src/kernel/vfs/spec_vnops.c":2616 ] vn_close() ["../../../../src/kernel/vfs/vfs_vnops.c":1292, ] closef() ["../../../../src/kernel/bsd/kern_descrip.c":1539 ] exit() ["../../../../src/kernel/bsd/kern_exit.c":936 ] rexit() ["../../../../src/kernel/bsd/kern_exit.c":755 ] syscall() ["../../../../src/kernel/arch/alpha/syscall_trap.c":555 ] _Xsyscall() ["../../../../src/kernel/arch/alpha/locore.s":1177 ] PROBLEM: (HPAQC12ZB, UVO105080) (Patch ID: OSF410-400264) ******** This patch fixes a kernel memory fault panic in the xti_discon_req() routine. A representitive stack trace is: boot() ["../../../../src/kernel/arch/alpha/machdep.c":2484 ] panic("kernel memory fault") ["../../../../src/kernel/bsd/subr_prf.c":791 ] trap() ["../../../../src/kernel/arch/alpha/trap.c":1520 ] _XentMM() ["../../../../src/kernel/arch/alpha/locore.s":1424 ] xti_discon_req() ["../../../../src/kernel/streamsm/xtiso.c":4449 ] xti_output() ["../../../../src/kernel/streamsm/xtiso.c":1729 ] xtiwsrv() ["../../../../src/kernel/streamsm/xtiso.c":1639 ] sq_wrapper() ["../../../../src/kernel/streams/str_runq.c":137 ] csq_lateral() ["../../../../src/kernel/streams/str_synch.c":992 ] runq_run() ["../../../../src/kernel/streams/str_runq.c":108 ] netisr_thread() ["../../../../src/kernel/net/netisr.c":841 ] FILE(s): /sys/BINARY/xtiso.mod subset OSFBIN410 CHECKSUM: 54444 159 =============================================================================== This patch fixes several problems with system time when the MICRO_TIME kernel configuration option is used. It resolves a one second delay in updating secondary processors after changing the system time. BOOTTIME is now written properly to utmp from a secondary processor during boot. Processors are immediately updated when brought on-line during boot or via the psradm utility. PROBLEM: (CLD MCPM21DNQ) (Patch ID: OSF410-400268) ******** This patch fixes several problems with system time when the MICRO_TIME kernel configuration option is used. It resolves a one second delay in updating secondary processors after changing the system time. BOOTTIME is now written properly to utmp from a secondary processor during boot. Processors are immediately updated when brought on-line during boot or via the psradm utility. FILE(s): /usr/sys/BINARY/micro_time.o subset OSFBIN410 CHECKSUM: 32590 21 RCSfile: micro_time.c RCS: 1.1.10.2 =============================================================================== This patch fixes a problem in which yppasswd users get the error "password mismatch, password unchanged" creating passwords longer than 8 characters. PROBLEM: (HPAQ8803B, 51543) (Patch ID: OSF410-400269) ******** This patch fixes a problem in which yppasswd users get the error "password mismatch, password unchanged" creating passwords longer than 8 characters. FILE(s): /usr/bin/yppasswd subset OSFCLINET410 CHECKSUM: 57170 24 RCSfile: yppasswd.c RCS: 4.2.12.2 RCSfile: yppasswdxdr.c RCS: 4.2 =============================================================================== This patch fixes memory leaks with the FDDI and Token Ring method routines used with Extensible SNMP subagent (ESNMP). PROBLEM: (QAR 51930) (Patch ID: OSF410-400275) ******** This patch fixes memory leaks with the FDDI and Token Ring method routines used with Extensible SNMP subagent (ESNMP). FILE(s): /usr/sbin/os_mibs subset OSFCLINET410 CHECKSUM: 40100 176 RCSfile: os_mibs.c RCS: 1.1.2.10 RCSfile: os_mibs_shm.c RCS: 1.1.2.5 =============================================================================== This patch fixes a kernel memory fault caused by the faa FDDI driver. The panic was due to incomplete handling of an error condition by them driver ("Timeout in command request"). The command request buffer was freed, however the reference to it was not removed from the command request list. When this list was later accessed, the invalid memory reference panic occurred. PROBLEM: (UVO105384/QAR 52786) (Patch ID: OSF410-400280) ******** This patch fixes a kernel memory fault caused by the faa FDDI driver. The panic was due to incomplete handling of an error condition by the driver ("Timeout in command request"). The command request buffer was freed, however the reference to it was not removed from the command request list. When this list was later accessed, the invalid memory reference panic occurred. A typical stack trace for the fault will look like this: cpu_ip_intr() _XentInt simple_lock_D faaintr faaintr_2 _XentInt wanTimerSysTick softclock_scan hardclock FILE(s): /sys/BINARY/faa.mod subset OSFHWBIN410 CHECKSUM: 04242 93 =============================================================================== This patch fixes a problem where conversion from double-precision floating point numbers to single-precision floating point numbers may not round properly in IEEE mode when the result should be the smallest denormal. PROBLEM: (QAR 52810, QAR 40239, QAR 53048) (Patch ID: OSF410-400284) ******** This patch is mandatory for JAVA applications. This patch fixes a problem where conversion from double-precision floating point numbers to single-precision floating point numbers may not round properly in IEEE mode when the result should be the smallest denormal. More specifically, software completion of the Alpha CVTTSSU instruction does not properly round the result when the input double value is between the smallest S-float denormal and 1/2 the smallest S-float. For example: double d = 1.5E-45; double f; f = d; The result should be:1.40129846E-45 The result before the patch is 0.0. FILE(s): /sys/BINARY/fp.mod subset OSFBIN410 CHECKSUM: 61583 75 =============================================================================== SUPERSEDED PATCHES: OSF410-400253 (149.00) This patch corrects the following: - An upgrade/replacement for the OTTO/OPPO ATM driver and fixes a number flow control and signalling problems. If you are seeing "No Buffer Space" messages, experiencing pauses or hangs when receiving data on signalling/ilmi pvc's, or have any problems with FLOWMASTER flow control with CLIP or LANE over ATM, you should install this patch. - This patch contains performance enhancements to the ATM OTTO driver when greater than 300 VC's are configured. This replacement driver uses hash buckets to improve search time in the VC data structures resulting in significant performance gains. PROBLEM: (TKTR32485/QAR 51577) (Patch ID: OSF410-400253) ******** This patch is an upgrade/replacement for the OTTO/OPPO ATM driver and fixes a number of flow control and signalling problems. If you are seeing "No Buffer Space" messages, experiencing pauses or hangs when receiving data on signalling/ilmi pvc's, or have any problems with FLOWMASTER flow control with CLIP or LANE over ATM, you should install this patch. PROBLEM: (KAOQ51240/QAR 53078) (Patch ID: OSF410-400286) ******** This patch contains performance enhancements to the ATM OTTO driver when greater than 300 VC's are configured. This replacement driver users hash buckets to improve search time in the VC data structures resulting in significant performance gains. FILE(s): /sys/BINARY/lta.mod subset OSFHWBIN410 CHECKSUM: 04873 151 /usr/sys/include/io/atm/drivers/otto/if_ottodefs.h subset OSFHWBINCOM410 CHECKSUM: 44442 25 RCSfile: if_ottodefs.h RCS: 1.1.20.3 /usr/sys/include/io/atm/drivers/otto/otto_flow.h subset OSFHWBINCOM410 CHECKSUM: 49048 12 RCSfile: otto_flow.h RCS: 1.1.9.2 /usr/sys/include/io/atm/drivers/otto/otto_fakesnmp.h subset OSFHWBINCOM410 CHECKSUM: 34204 7 RCSfile: otto_fakesnmp.h RCS: 1.1.9.2 =============================================================================== SUPERSEDED PATCHES: OSF410-400066 (9.00), OSF410-400218 (111.00), OSF410-400218-1 (111.01), OSF410-058B (155.00), OSF410-058 (99.00) This patch corrects the following: - DDR subsystem updated to handle SCSI devices returning a non-standard device type. - Fixes two problems with ddr_config. ddr_config previously would sometimes build partial device records. ddr_config on Digital UNIX V4.0 was not compatible with input files created prior to this version. - Boot capability for new hardware support requires a new genvmunix. This patch delivers an updated genvmunix for that purpose. - Add support for DE500-BA 10/100 Ethernet adapter, and fix machine checks encountered when using the KZPAM-CA or KZPAM-DA controllers. - Provides latent support for TZS2. PROBLEM: (QAR 45730 and QAR 46647) (Patch ID: OSF410-400066) ******** DDR partially builds some device records. This problem is extremely hard to detect, as the creation of device records usually happens silently in the kernel as it encounters new devices. Symptoms of this error may be slight oddities in device behavior. Unfortunately, the extent to which behavior is affected cannot be predicted. The problem can be seen most easily by executing the following : Invoke "ddr_config -s disk DEC RZ28B". The (failing) output should look as follows: Building Device Information for: Type = disk Vendor ID: "DEC" Product ID: "RZ28B" Applying Modifications from Device Record for: Vendor ID: "DEC" Product ID: "RZ28" TagQueueDepth = 0x4a The (correct) output should look as follows: Building Device Information for: Type = disk Vendor ID: "DEC" Product ID: "RZ28B" Applying Modifications from Device Record for: Vendor ID: "DEC" Product ID: "RZ28" TagQueueDepth = 0x4a Applying Modifications from Device Record for: Vendor ID: "DEC" Product ID: "RZ28B" TagQueueDepth = 0x40 PROBLEM: (QAR 45730 and QAR 46647) (Patch ID: OSF410-400066) ******** The "ddr_config -x" option fails to compile a cam_data.c file from a version prior to Digital UNIX v4.0. The following error messages will be reported: ddr_config.ORIG: Line 3233: Syntax Error ddr_config.ORIG: Line 3233: Failed parsing DENSITY_TBL entry Conversion of /sys/data/cam_data.c failed. Line numbers are relative to the temporary file /tmp/cam_data.tmp Looking at the /tmp/cam_data.tmp file, the error occurs between two records separated by a comma. For example: TYPE Record_A = { .... }, <----- fails here Record_B = { ... }; PROBLEM: (HPAQB16E6) (Patch ID: OSF410-400218) ******** The DDR subsystem did not appropriately handle SCSI devices that return non-standard device types. The standard device types range from 0 (disk device) to 9 (Communications Device). For example, a custom SCSI device that returns a device type of UNKNOWN (0x1f) could panic the system with the following message: "trap: invalid memory read access from kernel mode" A device with a non-standard device type would ordinarily not be shown as present on the system as it would require a custom SCSI device driver to access it (one which does not come with the base operating system). Note: Non-standard device types are supported by CAM in pre-v4.0 releases. PROBLEM: (Patch ID: OSF410-058B) ******** Boot capability for new hardware support requires a new genvmunix. This patch delivers an updated genvmunix for that purpose. PROBLEM: (Patch ID: OSF410-058) ******** Support for the DE500-BA requires recognition of a new PCI device ID and also require specific code to operation the device. PROBLEM: (Patch ID: OSF410-405097) ******** This provides device recognition for TZS2. FILE(s): /sbin/ddr_config subset OSFHWBASE410 CHECKSUM: 14256 256 RCSfile: ddr_config.c RCS: 1.1.7.2 /sys/BINARY/ddr.mod subset OSFBIN410 CHECKSUM: 07482 43 /etc/.mrg..ddr.db subset OSFHWBASE410 CHECKSUM: 01589 3 /etc/.new..ddr.db subset OSFHWBASE410 CHECKSUM: 16024 17 /etc/.mrg..ddr.dbase subset OSFHWBASE410 CHECKSUM: 32170 28 /etc/.new..ddr.dbase subset OSFHWBASE410 CHECKSUM: 26639 57 /genvmunix subset OSFHWBASE410 CHECKSUM: 22077 8020 /usr/sys/data/if_tu_data.c subset OSFBINCOM410 CHECKSUM: 26001 8 RCSfile: if_tu_data.c RCS: 1.1.45.2 /usr/sys/include/io/dec/netif/if_tureg.h subset OSFBINCOM410 CHECKSUM: 61309 18 /etc/.new..sysconfigtab subset OSFBASE410 CHECKSUM: 10967 26 /etc/.mrg..sysconfigtab subset OSFBASE410 CHECKSUM: 39038 3 /sys/BINARY/tu.mod subset OSFHWBIN410 CHECKSUM: 42457 53 /usr/sys/data/pci_option_data.c subset OSFBINCOM410 CHECKSUM: 52907 12 /usr/sys/include/io/dec/pci/pci.h subset OSFBINCOM410 CHECKSUM: 22657 42 =============================================================================== SUPERSEDED PATCHES: OSF410-400138 (34.00), OSF410-400219 (112.00) This patch corrects the following: - Fixes problems in the error paths of the ATM subsystem. A majority of these result in system crashes. These crashes are most prevalent when stressing LAN Emulation (LANE). - Fixes two panics in the lta driver, ATM LANE interoperability problems with IBM switches, and slow recovery of UNI 3.0 signalling from network interruptions. - When tcpdump is run with ATM LAN emulation, a kernel memory fault occurs. PROBLEM: (CLD ZUO101032) (Patch ID: OSF410-400138) ******** This patch fixes a panic with the message "ltaintr: no TX pkt". An example stack trace is shown below: 0 boot() 1 panic(s = 0xfffffc000065e1f0 = "ltaintr: no TX pkt") 2 ltaintr() 3 kn15aa_dispatch_iointr() 4 _XentInt() 5 swap_ipl() 6 boot() 7 panic(s = 0xfffffc000065e1f0 = "ltaintr: no TX pkt") 8 ltaintr() 9 kn15aa_dispatch_iointr() 10 _XentInt() 11 gh_zero_memory() 12 idle_thread() The panic is a result of the ATM ILMI component overflowing a message buffer. It will only occur for certain patterns of ATM addresses, and is most likely to happen when ATM Classical IP is in use. This patch may also fix other ILMI interoperability problems that do not result in panics. PROBLEM: (CLD ZUO101032) (Patch ID: OSF410-400138) ******** When the default UNI Version 3.0 signalling is used, it can sometimes take a very long time (1.5 minutes or more) for ATM connections to be re-established after a network interruption (e.g. a disconnected cable). This patch changes the default recovery timer and greatly speeds up re-connection following an interruption. PROBLEM: (QAR 49699) (Patch ID: OSF410-400138) ******** This patch fixes a possible kernel memory fault panic that might occur on an ATM ARP server. The panic might also occur if a remote system tries to establish any ATM connection with invalid signalling parameters. The panic occurs in the routine otto_manage_delvc(). PROBLEM: (Patch ID: OSF410-400138) ******** This patch fixes a possible interoperability problem with IBM 8260 switches (certain firmware revisions). The problem prevents the Digital UNIX system from joining an emulated LAN. The system repeatedly rejects of the incoming point-to-multipoint VC connections with a cause value of 100. This problem could also occur any time a remote system attempted a connection where the Forward and Backward SDU sizes were not equal. PROBLEM: (DEKBC1129) (Patch ID: OSF410-400219) ******** This problem is caused by corruption in an internal queue of the LANE ARP code. The symptoms are either a system hang in process_event_queue() or one of the following kernel memory fault stack traces: 0 boot() 1 panic("kernel memory fault") 2 trap() 3 _XentMM() 4 event_queue_insert() 5 la_arp_update() 0 boot() 1 panic("kernel memory fault") 2 trap() 3 _XentMM() 4 process_event_queue() 5 la_arp_refresh_callback() 6 timer_process() PROBLEM: (TKTB26124) (Patch ID: OSF410-400219) ******** This problem is cause by incorrectly keeping track of the refernce counts of the internal ATM ESI structures. The following is the stack trace of the kernel panic: 0 boot() 1 panic("ATM ESI CLONE DELETE BOTCH") 2 atm_cmm_esi_cleanup() 3 atm_cmm_collector() PROBLEM: (TKTB26122) (Patch ID: OSF410-400219) ******** The symptoms of this problem vary depending on whether or not patch 138.00 is installed. The problem is triggered by shutting down signaling (i.e., issuing the following command "atmsig down driver=xxxx") and then bringing signaling back up (i.e., "atmsig up driver=xxxx") when LANE is active. Without patch id 138.00 installed the following kernel memory fault will result: 0 boot 1 panic(s = 0xfffffc00006c7680 = "kernel memory fault") 2 trap() 3 _XentMM() 4 otto_manage_delvc() 5 otto_manage() 6 atm_cmm_zombiefy_vc() 7 atm_cmm_new_call() 8 AmUiAmtConInd() 9 amUsrM05S00() 10 amActvConTbl() 11 AmLiAsdDatInd() 12 AsUiAsdDatInd() 13 asV3xAa4Sx_y() 14 asV30ProcessSdPdu() 15 asV30Pdu8S4() 16 AsLiAalDatInd() 17 atm_sig_process_receive() 18 atm_sig_event_process() With patch 138.00 installed, LANE will not restart unless the following commands are issued: "atmconfig down driver=xxxxx" "atmconfig up driver=xxxxx" PROBLEM: (TKTB25174) (Patch ID: OSF410-400219) ******** A system panic is caused by trying to funnel a thread which is in interrupt context. The kernel stack trace associated with this problem is as follows: 0 boot() 1 panic("thread_block: interrupt level call") 2 thread_block() 3 unix_release_force() 4 unix_release() 5 cm_rcv() 6 atm_cmm_receive() 7 ottoread() 8 ltaintr() 9 intr_dispatch_post() 10 _XentInt() PROBLEM: (CLD CA7Q10817) (Patch ID: OSF410-400288) ******** When tcpdump is run with ATM LAN emulation, a kernel memory fault occurs. The kernel memory fault is a result of LAN emulation code not setting up support for the packet filter component. A sample stack trace is shown as follows: 0 boot() ["../../../../src/kernel/arch/alpha/machdep.c":2466,] 1 panic(s = 0xfffffc00005974c0 = "thread_block: interrupt level call") ["../../../../src/kernel/bsd/subr_prf.c":707,] 2 thread_block() ["../../../../src/kernel/kern/sched_prim.c":1925,] 3 thread_preempt() ["../../../../src/kernel/kern/sched_prim.c":3820,] 4 boot() ["../../../../src/kernel/arch/alpha/machdep.c":2410,] 5 panic(s = 0xfffffc00005d2bc0 = "kernel memory fault") ["../../../../src/kernel/bsd/subr_prf.c":791] 6 trap() ["../../../../src/kernel/arch/alpha/trap.c":1512,] 7 _XentMM() ["../../../../src/kernel/arch/alpha/locore.s":1424,] 8 pfilt_filter() ["../../../../src/kernel/net/pfilt.c":2757,] 9 ether_input() ["../../../../src/kernel/net/if_ethersubr.c":1123,] 10 lec_rcv_cb() ["../../../../src/kernel/net/if_lane/lec_upper.c":229,] 11 ld_rcv_callback() ["../../../../src/kernel/net/if_lane/lec_data.c":490,] 12 cm_rcv() ["../../../../src/kernel/net/if_lane/cm_sap_shim.c":775,] 13 atm_cmm_receive() ["../../../../src/kernel/atm/cmm/cmm_adi.c":881,] 14 ottoread(0) ["../../../../src/kernel/io/atm/drivers/otto/if_otto.c":2132,] FILE(s): /sys/BINARY/atm.mod subset OSFATMBIN410 CHECKSUM: 42593 325 /sys/BINARY/atmip.mod subset OSFATMBIN410 CHECKSUM: 39233 241 /sys/BINARY/lane.mod subset OSFATMBIN410 CHECKSUM: 45783 349 /sys/BINARY/uni3x.mod subset OSFATMBIN410 CHECKSUM: 43862 935 /usr/sys/include/atm/sys/atm_smi.h subset OSFATMBINCOM410 CHECKSUM: 07815 7 RCSfile: atm_smi.h RCS: 1.1.9.3 /usr/sys/include/atm/cmm/cmm.h subset OSFATMBINCOM410 CHECKSUM: 39495 25 RCSfile: cmm.h RCS: 1.1.15.4 =============================================================================== This patch fixes a problem where the lpq command causes the program to crash (Memory fault). PROBLEM: (QAR 52528) (Patch ID: OSF410-400290) ******** This patch fixes a problem where the lpq command causes the program to crash (Memory fault). The problem is caused by lpq running until a print queue buffer in memory is overwritten. The following is an example of a core dump: Fri Jun 20 14:55:30 1997: Rank Pri Owner Job Files Total Size 1st 0 root 1 err3 28 bytes 2nd 0 root 2 file 195 bytes 3rd 0 root 3 file 195 bytes 4th 0 root 4 file 195 bytes 5th 0 root 5 file 195 bytes 6th 0 root 6 file 195 bytes 7th 0 root 8 file 195 bytes Memory fault - core dumped FILE(s): /usr/lbin/lpd subset OSFPRINT410 CHECKSUM: 32514 112 RCSfile: lpd.c RCS: 4.2.9.3 RCSfile: lpdchar.c RCS: 4.2 /usr/bin/lpq subset OSFPRINT410 CHECKSUM: 65422 48 RCSfile: lpq.c RCS: 4.2.5.2 =============================================================================== SUPERSEDED PATCHES: OSF410-400083 (12.00) This patch corrects the following: - Fixes the problem of the math library functions not returning the correct NaN value as defined in the Alpha AXP Architecture Reference - Fixes a problem with fastmath functions F_Exp() and F_Pow() that cause floating exception core dumps. PROBLEM: (QAR 48474) (Patch ID: OSF410-400083) ******** This fix changes the encoding of IEEE floating-point Quiet NaNs returned by the math library by setting the sign bit. This fix corrects inconsistency between the value returned by the math functions and the kernel encoding. A NaN is the floating-point representation of a result that is "Not a Number" (e.g. the floating-point result of zero divided by zero is a NaN). This change is only of interest to programmers who use IEEE floating-point math with the -ieee or the -ieee_with_inexact opion. It does not affect programs or libraries not using the full IEEE math support. For more information, see the IEEE Standard for Binary Floating Point Arithmetic ANSI/IEEE (Std 754-1985). For information about the Alpha AXP implementation, see the Alpha AXP Architecture Reference Manual (Second Edition) by Richard L. Sites and Richard T. Witek, Digital Press, 1995. See the section on "Encodings" (4.7.4). Compile the following program using the -ieee and -lm options: #include #include #include #include main() { double a, b, c, d; int i; a = sqrt( -1.0 ); i = sscanf("0.0 0.0 0.0", "%lf %lf %lf", &b, &c, &d); assert(i == 3); printf( "sqrt( -1.0 ) = %f\t\t0x%016lx\n", a, *(long *)&a ); d = b / c; printf( "0.0 / 0.0 = %f\t\t0x%016lx\n", d,*(long *)&d ); } Compile this program using the -ieee and -lm command line options. Results before installing new math library: sqrt( -1.0 ) = NaNQ 0x7fffffffffffffff 0.0 / 0.0 = -NaNQ 0xfff8000000000000 Results after installing new math library: sqrt( -1.0 ) = -NaNQ 0xfff8000000000000 0.0 / 0.0 = -NaNQ 0xfff8000000000000 PROBLEM: (QAR 52294, CLD SDT-1335) (Patch ID: OSF410-400293) ******** There is a problem with the F_exp(), the fast exponentiation function, and the F_pow(), the fast math power function, in the way that they handle underflow arguments. For certain arguments, a calls to F_exp() and F_pow() result in a floating-point exceptions. FILE(s): /usr/ccs/lib/libm.a subset OSFLIBA410 CHECKSUM: 60251 649 /usr/shlib/libm.so subset OSFBASE410 CHECKSUM: 53914 544 =============================================================================== This patch fixes a problem with the mouse cursor when the system contains the HX (PMAGB-BA) graphics option. The cursor offset is incorrect on the Y Axis by 2 pixels. PROBLEM: (CLD FNO100141,QAR 51990) (Patch ID: OSF410-400295) ******** This patch fixes a problem with the mouse cursor when the system contains the HX (PMAGB-BA) graphics option. The cursor offset is incorrect on the Y Axis by 2 pixels. FILE(s): /sys/BINARY/sfbp.mod subset OSFHWBIN410 CHECKSUM: 37551 44 =============================================================================== SUPERSEDED PATCHES: OSF410-400118 (17.00), OSF410-400169 (54.00), OSF410-057 (98.00), OSF410-400270 (181.00) This patch corrects the following: - Fixes a problem that occurs if the kernel tunable variable "old-obreak" is set to zero and the system is running the Korn shell (ksh). The shell gets caught in an infinite loop printing a message similar to the following. Eventually the process will core dump. /adp/bin/adpbkup[135]: no space - Fixes a problem with the ksh shell program. ksh prevents a command which runs in a sub-process from writing to a tape device. - Fixes a problem that occurs when using the Korn shell (ksh). Keyboard input is not echoed when a user exits via a trap, after editor options have been set in ksh. - Fixes a problem in which the ksh command periodically prints erroneous characters instead of the command that was typed. - Fixes a problem in which the ksh shell sometimes reverses the group id (GID) and the effective group id (egid) of the calling process. PROBLEM: (UVO104297) (Patch ID: OSF410-400118) ******** This patch fixes a problem that occurs when using the Korn shell (ksh). Keyboard input is not echoed when a user exits via a trap, after editor options have been set in ksh. To restore the tty modes, enter the following command: stty sane To reproduce the problem execute the following: /usr/bin/ksh set -o emacs touch /tmp/foo trap 'rm -f /tmp/foo' EXIT TMOUT=1 Now wait 60 seconds. When ksh exits, the keyboard should echo characters. If it does not, then this bug has occurred. PROBLEM: (QAR 50297) (Patch ID: OSF410-400169) ******** The ksh shell program prevents a command, which runs in a sub-process, from writing to a tape device. For example: $ /usr/bin/ksh -c "/bin/echo foo | /bin/cat > /dev/rmt0h" /usr/bin/ksh: /dev/rmt0h: cannot create PROBLEM: (QAR 51086) (Patch ID: OSF410-057) ******** Set old-obreak = 0 breaks ksh will be fixed by this patch. PROBLEM: (QAR 26933) (Patch ID: OSF410-400270) ******** This patch fixes a problem in which the ksh command periodically prints erroneous characters instead of the command that was typed. The only identifiable effects are loss of logging information and the loss of access to the command from the command line edit. PROBLEM: (QAR 52892 QAR 49928) (Patch ID: OSF410-400304) ******** This patch fixes a problem in which the ksh shell sometimes reverses the group id (GID) and the effective group id (egid) of the calling process. For example if the calling process (starter) spawns ksh to execute the "/usr/bin/id" command, the output would be: $ ./starter xx uid=4294967200(vsctest) gid=15(users) egid=4(bin) groups=0(system) uid=4294967200(vsctest) gid=4(bin) egid=15(users) groups=0(system) $ ### Note that the gid and egid have been interchanged FILE(s): /usr/bin/ksh subset OSFBASE410 CHECKSUM: 56037 264 /usr/bin/posix/sh subset OSFBASE410 CHECKSUM: 56037 264 =============================================================================== This patch fixes a problem related to misinterpretation of multi-byte characters by the diff command. The problem also affects the delta command of SCCS. The symptom of the problem in the diff command is that it sometimes treats a text file containing multi-byte characters as a binary file. The symptom of the problem in the delta command is that it sometimes fails to check in a program source file containing multi-byte characters. PROBLEM: (CLD TKTQ60593) (Patch ID: OSF410-400305) ******** The problem in the diff command that is fixed by this patch is that the command sometimes misinterprets a text file containing multi-byte characters as a binary file. The character misinterpretation occurs only when a multi-byte character falls on a buffer boundary, which breaks the character into partial characters on each side of the boundary. This condition does not occur in files, so the problem is sporadic. SCCS's delta command uses the bdiff command that, in turn, uses diff to generate a differences file for the original and the new version of a program source file. When the diff command reports a "Binary files differ" error message, the delta command does not correctly interpret this error and concludes that there is no difference between the new version of the file and the original. By fixing the problem in diff, the problem in the delta command is also fixed. FILE(s): /sbin/diff subset OSFBASE410 CHECKSUM: 01666 56 RCSfile: diff.c RCS: 4.2.10.4 RCSfile: diffdir.c RCS: 4.2.22.2 RCSfile: diffreg.c RCS: 4.2.17.3 /usr/bin/diff subset OSFBASE410 CHECKSUM: 34895 56 RCSfile: diff.c RCS: 4.2.10.4 RCSfile: diffdir.c RCS: 4.2.22.2 RCSfile: diffreg.c RCS: 4.2.17.3 =============================================================================== SUPERSEDED PATCHES: OSF410DX-400005 (67.00), OSF410DX-400008 (121.00) This patch corrects the following: - When creating a new user account with a home directory of root, the permissions on the root directory are changed to 700, rendering the root file system inaccessible to non-root users. Patch Kit-0001 causes a problem with the System V Environment (SVE) /usr/opt/svr4/usr/bin/passwd command. If an invalid password is entered, subsequent invocations of the passwd command, /usr/bin/X11/dxaccounts command, or the account management commands fail with the following error: The password and group files are currently locked by another user. - Fixes for miscellaneous problems with the account management commands, specifically the Account Manager graphical user interface (/usr/bin/X11/dxaccounts) and the command line interface (useradd, userdel, groupadd, etc). - Fixes a problem that causes the account management commands (dxaccounts, useradd, and usermod) to split long NIS group lines incorrectly. This causes a majority of users to have improper access to files, directories, and applications and also causes the newgrp command to fail. PROBLEM: (QAR 46281) (Patch ID: OSF410DX-400005) ******** Using the Modify Selected Users dialog box, if you changed a set of users to be NIS Override users, then the icons for those users were updated to reflect the change but the usernames in all the dialog box drop-down lists were not updated. Specifically, the icons would be updated to have the "+" or "-" indicator for the user but the user's name was not changed to "user (+)" or "user (-)" in the drop-down lists. The most noticeable symptom of this bug is a warning message printed to stdout when double clicking on one of the modified users: Warning: DtComboBoxWidget: Unable to find item to select (DtComboBoxSelectItem). PROBLEM: (QAR 48189) (Patch ID: OSF410DX-400005) ******** When running on an NIS master, using the Secondary Groups subdialog of the Modify Selected NIS Users dialog box would not add the selected users to NIS groups - only local groups. For example, if you selected user1 and user2 and used the Secondary Groups dialog to add them as members of group "users" and group "staff (NIS)", they would not be added as members of "staff" in /var/yp/src/group. PROBLEM: (QAR 48190) (Patch ID: OSF410DX-400005) ******** A related problem to 48189 above. If NIS is in use, then attempting to use the Modify Selected Users dialogs to change the primary group for the selected users would result in the error: Group does not exists When the primary group was a NIS group. PROBLEM: (QAR 48191) (Patch ID: OSF410DX-400005) ******** If you attempt to change the primary group of a selected set of users using ModifySelected dialog, the primary group of the users does not change. However if you bring up the options dialog up by clicking the 'Options' button and click Apply/Ok, the primary group all the selected users is changed. PROBLEM: (QAR 50998) (Patch ID: OSF410DX-400005) ******** On an Enhanced Security (C2) system, when adding a new user, the password field in /etc/passwd is empty instead of being set to an asterisk ("*"). This is not a security issue for login authentication but can be a security issue for third party software that does not use Security Integration Architecture (SIA) function calls. Such software ignores the protected password database and uses only /etc/passwd for password checking. PROBLEM: (QAR 49141) (Patch ID: OSF410DX-400005) ******** Dxaccounts would crash if you brought up a dialog from specific view, changed to a different view and then OK'd that dialog. For example, if you brought up the Create/Modify User dialog, chose View/Local Groups to switch the main window to the Local Groups view, and then pressed OK in the Create/Modify User dialog, dxaccounts would crash. PROBLEM: (QAR 49386) (Patch ID: OSF410DX-400005) ******** While adding/modifying a user or group, the UID or GID entered was not being validated against the user-defined minimums and maximums set in the General Options dialog box. PROBLEM: (QAR 39332) (Patch ID: OSF410DX-400005) ******** Running two conncurrent instances of the account management commands is not supported. This restriction applies to the dxaccounts graphical user interface and the useradd, usermod, userdel, groupadd, groupmod, and groupdel commands. This restriction was release noted for Digital UNIX V4.0 and it is now enforced in the software. In order to prevent concurrent access, each account management command creates a lock file at startup called /etc/.AM_is_running. If any of the commands are terminated abnormally (e.g. kill -9) then this lock file will not be deleted and future command invocations will refuse to run with the error message: The password and group files are currently locked by another user. Please try again later. This message means that the account database files are either legitimately locked OR one of the commands terminated abnormally leaving an /etc/.AM_is_running lock file. If no other root users are using the account management commands, simply delete the lock file. PROBLEM: (QAR 47383) (Patch ID: OSF410DX-400005) ******** If NIS is not running on a system, then the Account Manager incorrectly tries to access the NIS databases. This happens when the system administrator uses the Modify Selected Users or Groups dialog boxes. An error dialog box with an empty list is displayed that looked like: Account Manager Error List: --------------------------- Error accessing a system database file: Please correct this error and restart Account Manager. [OK] PROBLEM: (QAR 48221) (Patch ID: OSF410DX-400005) ******** When running the Account Manager on an Enhanced Security (C2) system, the "Remove User's Directory and Files" toggle button was ignored when a single user is retired using the Retire dialog box. The users directory would not be deleted. Only if multiple users were selected would the toggle button be honored. PROBLEM: (QAR 46468) (Patch ID: OSF410DX-400005) ******** When running the Account Manager on an Enhanced Security (C2) system, immediately deleting a newly created template would cause a crash. PROBLEM: (QAR 46730) (Patch ID: OSF410DX-400005) ******** When using useradd on an Enhanced Security (C2) system, the administrative_lock_applied flag is set unconditionally. Also, the usermod command ignored the administrative_lock_applied flag so the account could not be unlocked without using the dxaccounts graphical user interface or the edauth command. Now useradd honors the default setting of the administrative_lock_applied flag. Specifying the flag on the command line will override the default setting. Note that defaults are set using the -D option to usermod. Also, usermod now correctly honors the administrative_lock_applied flag. PROBLEM: (QAR 44966) (Patch ID: OSF410DX-400005) ******** When using usermod on an Enhanced Security (C2) system, the -e and -f flags were not honored. See the man page for a detailed description of these flags. PROBLEM: (QAR 46916) (Patch ID: OSF410DX-400005) ******** Using usermod -G to add a user to several groups as in: usermod user -G group1,group2,group3 would not add the user to all the specified groups. PROBLEM: (Patch ID: OSF410DX-400005) ******** While printing the accounts defaults using 'usermod -D', the inactive- interval (i.e the maximum number of days allowed between usage of a login ID before that login ID is declared invalid) was incorrectly printed as a date instead of an interval. PROBLEM: (QAR 47123) (Patch ID: OSF410DX-400005) ******** Using "groupadd -g" to add a new group would crash and the group would not get added if the directory /var/yp/src did not exist. PROBLEM: (QAR 52127) (Patch ID: OSF410DX-400008) ******** When adding a new user using /usr/bin/X11/dxaccounts or /usr/sbin/useradd, if the account is created with a home directory of "/" then the permissions on / are changed to 700. This renders the root file system inaccessible to non-root users. Note that the persmissions are changed despite the error message that is displayed: Errors encountered while adding the user: foo Cannot create user's home directory Home directory already exists Initial files not copied to home directory The new behavior is to not change the permissions on a new user's home directory if that directory already exists. PROBLEM: (QAR 52042) (Patch ID: OSF410DX-400008) ******** The previous patch kit, Patch Kit-0001, caused a problem with the System V Environment (SVE) password command /usr/opt/svr4/usr/bin/passwd. If the user enters an invalid password then subsequent invocations of the passwd command, /usr/bin/X11/dxaccounts, or the account management commands would fail with the following error: The password and group files are currently locked by another user. The problem was that the /etc/.AM_is_running lock file used by the account managment commands was not being deleted properly. PROBLEM: (QAR 52479) (Patch ID: OSF410DX-400010) ******** When the a NIS-group entry in /var/yp/src/group file exceeds 256 characters, certain functions performed in dxaccounts (such as locking or unlocking an NIS/C2 user account) will split up the large group in the /var/yp/src/group file into several smaller groups. Each of these smaller groups has the same group name and the same group id as the original large group. As a result, users that are put in subsequent occurences of the group don't actually get recognized as members of the group. This is causing severe problems in users' environment, causing a majority of the users to not have proper access to files, directories and applications and also causes the newgrp command to fail. The current fix allows NIS-group entries upto 1000 characters. If any entry exceeds 1000 characters while creating or modifying a group, the Account Manager will print an error message stating that the nis group must be split into severel groups of lengths less than 1000 characters with group members evenly distributed among these groups, the groupname must be in the format _1, _2 etc and the id of all these groups must be the same as the original group. FILE(s): /usr/lib/nls/msg/en_US.ISO8859-1/accmgrcli.cat subset OSFSYSMAN410 CHECKSUM: 59334 3 /usr/bin/X11/dxaccounts subset OSFXSYSMAN410 CHECKSUM: 25561 456 /usr/lib/nls/msg/en_US.ISO8859-1/Dxaccounts.cat subset OSFSYSMAN410 CHECKSUM: 65207 8 /usr/sbin/groupadd subset OSFSYSMAN410 CHECKSUM: 50951 64 /usr/sbin/groupdel subset OSFSYSMAN410 CHECKSUM: 27868 64 /usr/sbin/groupmod subset OSFSYSMAN410 CHECKSUM: 16007 64 /usr/shlib/libaccmgr.so subset OSFSYSMAN410 CHECKSUM: 15942 312 /usr/sbin/useradd subset OSFSYSMAN410 CHECKSUM: 37068 72 /usr/sbin/userdel subset OSFSYSMAN410 CHECKSUM: 15945 64 /usr/sbin/usermod subset OSFSYSMAN410 CHECKSUM: 23668 72 =============================================================================== SUPERSEDED PATCHES: OSF410DX-400006 (72.00), OSF410DX-400009 (203.00) This patch corrects the following: - A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. - Fixes a problem that occurs on systems that have installed Patch OSF410DX-400006. If more than one argument is given on the dop command line, dop passes all arguments as a single argument to the command. PROBLEM: (QARs 50057, 50155, 50353, SSRT0435U) (Patch ID: OSF410DX-400006) ******** A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. PROBLEM: ( QAR 52285, SSRT0435U ) (Patch ID: OSF410DX-400009) ******** This patch fixes a problem that occurs on Digital UNIX systems running Version 4.0 or higher with C2 security enabled and Patch OSF410DX-400006 installed. The dop command rejects all password attempts when run by non-root users. Patch OSF410DX-400006 fixed a security violation that occurred in the dop command. For systems that are enabled for C2 security, this patch introduced a problem in which dop rejects all password attempts when run by non-root users. While not a security violation, it requires the user to be root before using system administration applications (for example, Network Configuration or Disk Configuration). PROBLEM: (QAR 53612) (Patch ID: OSF410DX-400011) ******** This patch fixes a problem that occurs on systems that have installed Patch OSF410DX-400006. If more than one argument is given on the dop command line, dop passes all arguments as a single argument to the command. The following example passes the -c flag and the argument enclosed in quotation marks ("") as a single argument to the dxdw command. $ dop dxdw -c "/usr/bin/tail -f /var/adm/messages" FILE(s): /usr/share/sysman/bin/badpasswd subset OSFSYSMAN410 CHECKSUM: 15249 4 RCSfile: badpasswd RCS: 1.1.2.7 /usr/sbin/dop subset OSFSYSMAN410 CHECKSUM: 20709 40 RCSfile: dop.c RCS: 1.1.7.2 /usr/share/sysman/bin/doperror subset OSFSYSMAN410 CHECKSUM: 63161 5 /usr/share/sysman/bin/getpasswd subset OSFSYSMAN410 CHECKSUM: 12699 7 RCSfile: getpasswd RCS: 1.1.6.2 /usr/share/sysman/bin/getpriv subset OSFSYSMAN410 CHECKSUM: 12649 8 RCSfile: getpriv RCS: 1.1.2.4 =============================================================================== SUPERSEDED PATCHES: OSF410X11-400010 (29.00) - Fixes a problem in which the output of the "last" or "finger" command lists users that are not currently logged in. - A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. PROBLEM: (CLD UVO104899) (Patch ID: OSF410X11-400010) ******** This patch fixes a problem in which the output of the "last" or "finger" command lists users that are not currently logged in. This patch fixes the error by ensuring that the username field is cleared from the wtmp file when the user exits from an xterm process. PROBLEM: (SSRT0422U, HPAQ519VC, MGO102910) (Patch ID: OSF410X11-400017) ******** A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. FILE(s): /usr/bin/X11/xterm subset OSFX11410 CHECKSUM: 16253 216 /usr/lib/libX11.a subset OSFXLIBA410 CHECKSUM: 02922 1506 /usr/lib/libXt.a subset OSFXLIBA410 CHECKSUM: 21799 620 /usr/shlib/libX11.so subset OSFX11410 CHECKSUM: 11334 1344 /usr/shlib/libXt.so subset OSFX11410 CHECKSUM: 43919 600 =============================================================================== This patch fixes a problem that occurs on an AlphaServer 2100A system. When the system is shut down using the "shutdown -r" command, the system will not reboot. PROBLEM: (MCSM715R1) (Patch ID: OSF410-093) ******** This patch fixes a problem that occurs on an AlphaServer 2100A system. When the system is shut down using the "shutdown -r" command, the system will not reboot. FILE(s): /sys/BINARY/cbus2_pci.mod subset OSFHWBIN410 CHECKSUM: 59493 53 /usr/sys/include/arch/alpha/hal/cbus2_pci.h subset OSFBINCOM410 CHECKSUM: 36011 36 RCSfile: cbus2_pci.h RCS: 1.1.15.2 =============================================================================== The shell script /usr/sbin/adduser now calls /usr/sbin/useradd to do the the actual work of creating the new user account. PROBLEM: (Patch ID: OSF410-100) ******** The current version of /usr/sbin/adduser is slow when /etc/passwd has a large number of entries. Futhermore it does not allow duplicate UIDs to be assigned to users. This version of /usr/sbin/adduser allows duplicate UID's to be assigned to users, has a faster algorithm for finding the next unassigned UID, and uses /usr/sbin/useradd to do the actual work of creating the user account. This results in a significant performance improvement when /etc/passwd has a large number of entries. FILE(s): /usr/sbin/adduser subset OSFBASE410 CHECKSUM: 02071 11 RCSfile: adduser.ksh RCS: 1.1.31.2 /usr/lib/nls/msg/en_US.ISO8859-1/adduser.cat subset OSFBASE410 CHECKSUM: 15240 3 =============================================================================== SUPERSEDED PATCHES: OSF410-400080 (11.00), OSF410-400106 (15.00), OSF410-400119 (18.00), OSF410-400133 (32.00), OSF410-400139 (35.00), OSF410-400143 (37.00), OSF410-400153 (46.00), OSF410-400154 (47.00), OSF410-400154-1 (47.01), OSF410-400189 (80.00), OSF410-400210 (96.00), OSF410-400131 (24.00), OSF410-400195 (84.00), OSF410-400226 (123.00), OSF410-400227 (125.00), OSF410-400227-1 (125.01), OSF410-400241 (138.00), OSF410-400239 (136.00), OSF410-400239-1 (136.01), OSF410-400261 (156.00), OSF410-400302 (198.00), OSF410-400307 (201.00), OSF410-400331 (219.00), OSF410-400331-1 (219.01) OSF410-400331-2 (219.02) This patch corrects the following: - Fixes a problem in which multi-threaded applications that reference a pthread_mutex_destroy routine may fail with EBUSY or the application may hang. - Fixes a problem with the DECthreads "legacy" library. Specifically, this patch addresses the potential hang of programs that us the Draft 4 interface for pthread_once(). - Fixes a problem whereby mkpasswd fails for /etc/passwd files that are very large (containing roughly 30 thousand to 80 thousand entries). - Fixes problems in threaded applications with incorrect signal behavior and thread creation failures using user allocated stacks. - Fixes threaded applications seeing a deadlock with fork(), premature stack overflows, corrupted mutexes, and orphaned condition variable or mutex blocking structures. - Fixes problems in threaded programs related to DECthreads bugchecks, fork(), stack corruptions and exception handling problems. This patch may also fix problems with non-threaded programs relating exception handling. - Fixes problems that might cause threaded programs running under Digial UNIX 4.0 to hang. Specifically, this patch addresses situations related to DECthread bugcheck, pthread_once() or cma_once(), and unhandled exceptions. - A potential security vulnerability has been discovered in BIND (Domain Name Service), where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. - Fixes a problem in which mallopt(M_MXFAST), instead of making malloc() faster, makes it as much as 65 times slower. - Fixes a problem where a call to popen() hangs after a bad call to pclose() in a threaded program. - A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. - Fixes a problem that may cause older call_shared FORTRAN applications to find missing symbols in libc.so. - Fixes a deadlock problem that may occur with multi-threaded applications calling any of the functions for getting system database information (gethostent, getservent, etc.) and which also call fork. The deadlock may occur when such applications are run on systems configured to use YP services. - Fixes a problem that occurs after a user logs into a system with an SRV4-style LAT device. When the ttyslot function is called, the system fails to find the device and returns a value of zero, indicating an error in the ttyslot function. - Fixes a problem that prevents gethostent() from returning all YP or bind served entries. - Fixes a problem in which the interaction of signals with setjmp/longjmp called repeatedly in a loop was causing a segmentation violation and core dump in a customer's application. - Fixes problems with redundant close operations on file descriptors by Network Information Services (NIS) and Remote Procedure Calls (RPC) in multi-threaded applications. - Fixes a problem in which the rcmd function may cause the system to dump core. - Fixes the following two problems that occur in the DECthreads core library: o The process blocked signal mask, as set by sigprocmask(), is cleared in the child process following a fork(). o Under certain load conditions, a DECthreads bugcheck occurs in pthread_kill(). This results in a core dump. - This patch allows customers to create hashed passwd databases from large passwd files by using a new option (-s) to the mkpasswd command. The -s option increases the block size of the database page file. PROBLEM: (BRO100738) (Patch ID: OSF410-400080) ******** When testing applications on a BSD-style device such as /dev/tty0h, the ttyslot function returns a number matching the index into the /var/adm/utmp file. However, when running the same program on an SVR4-style device such as /dev/lat/622, the ttyslot function always returns zero. The problem can be indentified easily by running the sample test program included here. Copy the following program to ttyslot_test.c: #include #include #include #include main() { printf("ttyslot() = %d\n", ttyslot()); exit(1); } Error messages may vary, depending on which applications are being run. When connected to a system over an SVR4-style LAT device the application calls the ttyslot function to locate the entry in the /var/adm/utmp file. The ttyslot function returns zero in error because it fails to match the control terminal. When you connect to a system over a LAT device and make a ttyslot function call to locate the entry in the /var/adm/utmp file for the control terminal of the current process, ttyslot() returns zero in error because it fails to match the control terminal. PROBLEM: (QAR 49260) (Patch ID: OSF410-400106) ******** Customer applications that repeatedly call gethostent(), when run on systems configured to use YP and/or bind services for host entries, will see only the entries in the local /etc/hosts file. The problem is not present for for similar routines such as gethostbyname(). The only way to reproduce the problem is to write a program that repeatedly calls gethostent() and then verify that it does not return all the entries present in the YP and bind databases served to the machine. PROBLEM: (ULC-43) (Patch ID: OSF410-400119) ******** The customer's application sets a timer to go off every 200 milliseconds via a call to setitimer(). It then loops indefinitely, calling a function that does a setjmp() and then calling a function that does a longjmp(). On Digital UNIX V4.0 r386 (SSB), the application fails with a segmentation fault after a variable number of loop iterations. PROBLEM: (QAR 49787) (Patch ID: OSF410-400133) ******** A multi-threaded application that calls any of the system database "get*" functions (gethostent, getservent, etc.) and that calls fork(), may deadlock. DECladebug will show a thread blocking on a mutex lock with the call to fork() on its call stack, while another thread will also be stuck in the mutex blocking function with a function name like gethostbynam() on its stack. Other threads may or may not be stuck on other mutex locks. The two threads in question will never progress. Any subsequent calls to fork will block forever. PROBLEM: (CLD #HPXQ9B161, QAR #48888) (Patch ID: OSF410-400139) ******** On V4.0 and later, when running a call_shared FORTRAN application linked on an earlier release, the loader will issue the error message: "dlopen: Unresolved symbols". The error can also occur in older non-FORTRAN applications that are linked with libc_r.so and call dlopen(). The problem occurs even though there is no explicit reference to the symbol in the application or library. In the particular test reported and fixed by this patch, the DEC FORTRAN Runtime Library (libfor.so) was inadvertently referencing the following libc entry symbols: __index, __rindex, __realtime_kernel, chk_perm, __chk_perm, fchk_perm, __fchk_perm and __list_free. The entry symbols have been replaced in libc. However, in some cases, they are just error termination routines and are treated as unsupported. This fix only handles the resolution of the missing symbols. PROBLEM: (CLD SSRT0425U) (Patch ID: OSF410-400143) ******** A potential security vulnerability has been discovered, where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. PROBLEM: (QAR 50691) (Patch ID: OSF410-400153) ******** A call to popen() was hanging after a call to pclose() with an invalid stream pointer (such as a stream that was not popened) in a threaded program (one built with -pthread). PROBLEM: (QARs 50746, 50316) (Patch ID: OSF410-400154) ******** When a call to mallopt(M_MXFAST, value) was performed, the performance of subsequent calls to malloc() slowed by as much as 65 times. PROBLEM: (CLD SSRT0296U) (Patch ID: OSF410-400189) ******** A potential security vulnerability has been discovered in BIND (Domain Name Service), where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. PROBLEM: (HPAQB17NM, QAR's 50343, 49427, 52143) (Patch ID: OSF410-400227-1) ******** When the /etc/passwd files are very large, a performance degradation may occur. When the number of passwd entries reaches up into the 30,000to 80,000 range, mkpasswd will sometimes fail to create an ndbm database. Since the purpose of this database is to allow for efficient (fast) searches for passwd file information, failure to build it causes a serious performance degradation for commands that rely on it. PROBLEM: (QAR #49720) (Patch ID: OSF410-400131) ******** Multithreaded applications running on SMP systems, may find their applications hanging because a thread is never told that a mutex has been unlocked or that a condition variable has been signaled. To recognize this problem, use ladebug to display the list of mutexes and condition variables. (ladebug) pthread "mutex -faq; condition -faq" This will display a very long list of mutexes and condition variables, including those that belong to libc or libpthread. An example of the output follows: (ladebug) pthread "mutex -faq; condition -faq" . . . Mutex 103 (normal) "mutex at 0x140000b10" (0, block 0x140008b90) is orphaned blocking structure, 2 threads waiting; waiters: 56, 51 . . . Condition variable 203, "cond at 0x14030b510" (0) is orphaned blocking structure, 2 threads waiting; waiters: 91, 5 . . . The application will hang forever because the threads are waiting on a blocking structure not attached to the mutex or condition variable. PROBLEM: (QAR 49520) (Patch ID: OSF410-400131) ******** Multithreaded applications running on SMP systems, may find their applications hanging because of a corrupted mutex. To recognize this problem, use ladebug to display the list of mutexes that are locked: (ladebug) pthread "mutex -fal" This will display a list of locked mutexes. Some mutexes will be recursive or error check type mutexes. Those types of mutexes record the thread that owns the lock on the mutex. The corruption is exposed as a recursive or error as a recursive or error check mutex without a thread owner: (ladebug) pthread "mutex -fal" Mutex 56 (recursive) "exc cr" (0x3ffc0082f80, block 0x140009d10) is locked depth 1), 4 threads waiting; ref count is 4 The output should have a "by thread x" after the "is locked" line above. PROBLEM: (QAR #49520) (Patch ID: OSF410-400131) ******** Multithreaded applications may overflow the stacks of created threads prematurely. Applications may receive a SEGV and dump core at unexpected places when this problem occurs. The SEGV should be because a memory location in or near the thread's stack was referenced. To recognize this problem, use ladebug to run appliation in question and wait for the SEGV to occur. Then find the thread that took the SEGV and check to see what value of the stack pointer is. Then display the full information on the thread itself and compare the current stack pointer to the limits displayed. An example debug session: (ladebug) run Thread received signal SEGV stopped at [hstTransferContext: ??? 0x3ff80572ca8] (ladebug) p $sp 0x140028bb8 (ladebug) pthread "thread -f x" thread 2 (running) "" (0x140006030), created by pthread Scheduling: throughput policy at priority 11 Masked signals: none Pending signals: none Terminated, result value 0 Object flags: none; self flags: none; sched flags: none; mutex flags: terminated; atomic flags: none Thread specific data: 0=0x140006488 Stack: 0x14002fa38; base is 0x140030000, guard area at 0x140027fff General cancelability disabled, asynch cancelability disabled Current vp is 0, synch port is 0, vp ID is 0 Join uses mutex 22 and condition variable 7; wait uses mutex 23 and condition variable 8 The thread's start function and argument are 0x120001bc0 (0x3ffc01834c8) The thread's latest errno is 0 You should see that there is a considerable amount of free space on the stack. (0x140028bb8 - 0x140027fff = 0xbb9 or 3001 bytes!) PROBLEM: (QAR #49804) (Patch ID: OSF410-400131) ******** Multithreaded applications which use fork() may find their applications hanging because of a deadlock situation. To recognize this problem, use ladebug to display the list of locked mutexes and their waiters. (ladebug) pthread "mutex -alrq" Mutex 1 (normal) "malloc" is locked by 13848, 4 threads waiting; waiters: 13846, 3, 567, 8 Mutex 10 (normal) "VM 0 cache" is locked, 1 thread waiting; waiters: 1 Mutex 13 (normal) "VM 3 cache" is locked, 1 thread waiting; waiters: 13848 In the example above, the malloc mutex is held by thread 13848, but it is waiting on mutex 13. A stack trace inspection reveals that mutex 13 is held by thread 13846. PROBLEM: (QAR 50961) (Patch ID: OSF410-400195) ******** The native exception handling facility may corrupt the users stack. This is most easily seen in an application using threads since the exception handling facility is always present there. But other applications linked with "-lexc" may see this problem as well. A typical stack trace from Ladebug showing this problem may look like this: (ladebug) t Stack trace for thread 2 >0 0x3ff80579a94 in /usr/shlib/libpthread.so #1 0x3ff80110b98 in /usr/shlib/libc.so #2 0x3ff80110318 in __tis_read_unlock(0x3ff8011031c, 0x3ffc0092500, 0x3ff8017345c, 0x3ffc0092500, 0x3ffc0087fe0, 0x0) DebugInformationStrippedFromFile738 #3 0x3ff80173458 in /usr/shlib/libc.so #4 0x3ff807b2004 in exc_lookup_function_entry(0x14005d180, 0x3ff807b1d30, 0x14005d180, 0x23bd5eb8, 0x3ff807b325c, 0x14005c640) DebugInformationStrippedFromFile0 #5 0x3ff807b3258 in UnknownProcedure16FromFile1(0x0, 0x14005d9a8, 0x100000001, 0x14005c640, 0xabadabad00beed00, 0x3ff80579ac0) DebugInformationStrippedFromFile1 #6 0x3ff807b3634 in exc_unwind(0x100000001, 0x14005c640, 0xabadabad00beed00, 0x3ff80579ac0, 0x3ff807b3b04, 0x3ff807b3aa0) DebugInformationStrippedFromFile1 #7 0x3ff807b3b00 in __Ots_CSpecificHandler(0x3ff807b3980, 0x14005d6f8, 0x14005d6d0, 0x14005d180, 0x3ff00000000, 0x14005d408) DebugInformationStrippedFromFile4 #8 0x3ff807b2ac4 in UnknownProcedure12FromFile1(0x0, 0x3ff8055c8d8, 0x0, 0x63ff0000, 0x14005de78, 0x0) DebugInformationStrippedFromFile1 #9 0x3ff807b2da0 in exc_dispatch_exception(0x14005de78, 0x3ff8055c460, 0x14005d180, 0x23bd5f3c, 0x3ff807b24e0, 0x0) DebugInformationStrippedFromFile1 #10 0x3ff807b2534 in exc_raise_exception(0x3ffc00802a0, 0x0, 0x3ff80579a60, 0x0, 0x3ffc0087650, 0x120002604) DebugInformationStrippedFromFile1 #11 0x14005d17c Note that the last frame (frame #11 above) does not have any information printed. This is symptomatic of the stack being corrupted in such a way that the debugger cannot interpret it correctly. PROBLEM: (QAR 50392) (Patch ID: OSF410-400195) ******** Some applications have bugs in them that developers are trying to find. The nature of these bugs might be to corrupt the internal workings of malloc() or free() such that calling them causes a SEGV. When this happens, it is possible for the native exception handling routines to block while accessing their internal procedure descriptor list, due to some other thread performing a lookup on that list. If the exception handling routines actually try to block, it is possible for the blocking operation itself to try to allocate memory and to call malloc() again. This attempt to call malloc() will hang. A typical stack trace from Ladebug showing this error might look like this: (ladebug) t >0 0x3ff8057ca24 in /usr/shlib/libpthread.so #1 0x3ff8057a450 in hstTransferContext(0x1, 0x140048030, 0x3ffc018a010, 0x4, 0x3ffc0188a50, 0x90) DebugInformationStrippedFromFile109:??? #2 0x3ff8056429c in dspDispatch(0x14000c210, 0x140048c68, 0x140048af0, 0x8f4, 0x3ffc0082770, 0x0) DebugInformationStrippedFromFile89:??? #3 0x3ff80567b98 in pthread_mutex_block(0x3ffc018a1c0, 0x3ffc018a1d0, 0x1400e6ef0, 0x8f4, 0x3ffc0082770, 0x0) DebugInformationStrippedFromFile95:??? #4 0x3ff8057c820 in __pthread_mutex_lock(0x3ffc018a1d0, 0x1400e6ef0, 0x8f4, 0x3ffc0082770, 0x0, 0x3ff80575e88) DebugInformationStrippedFromFile111:??? #5 0x3ff80575e84 in UnknownProcedure3FromFile103(0x8f4, 0x3ffc0082770, 0x0, 0x3ff80575e88, 0x3ff800d194c, 0x0) DebugInformationStrippedFromFile103:??? #6 0x3ff800d1948 in malloc(0x3ff800d194c, 0x0, 0x3ff80579170, 0x90, 0x0, 0x3ffc0184e70) DebugInformationStrippedFromFile22:??? #7 0x3ff8057916c in vmAlloc(0x3ff8055d94c, 0x3ffc0082870, 0x0, 0x0, 0x3ffc018a1c0, 0x3ff8055d934) DebugInformationStrippedFromFile108:??? #8 0x3ff8055d948 in cvGetBlock(0x3ffc0082818, 0x3ffc0082800, 0x14000c040, 0x3ffc008f7ec, 0x3ffc008f868, 0x3ff8057c8fc) DebugInformationStrippedFromFile1:??? #9 0x3ff8055f574 in cvWait(0x3ffc008f868, 0x8f4, 0x3ffc0082870, 0x140048af0, 0x0, 0x3ff80575e88) DebugInformationStrippedFromFile1:??? #10 0x3ff8055d45c in __pthread_cond_wait(0x3ffc0082870, 0x140048af0, 0x0, 0x3ff80575e88, 0x3ff8010fd54, 0x0) DebugInformationStrippedFromFile1:??? #11 0x3ff8010fd50 in /usr/shlib/libc.so #12 0x3ff8010f570 in __tis_write_lock(0x3ff8010f574, 0x3ff8019241c, 0x3ff80172aec, 0x1, 0x3ff800ccda0, 0x1) DebugInformationStrippedFromFile735:??? #13 0x3ff80172ae8 in __exc_lookup_function_entry(0x0, 0x0, 0x3ffc018a010, 0x0, 0x3ff800d1540, 0x1401e5020) DebugInformationStrippedFromFile304:??? #14 0x3ff807b2004 in exc_lookup_function_entry(0x3ffc018a010, 0x0, 0x3ff800d1540, 0x1401e5020, 0x3ff807b2bec, 0x1400249e0) DebugInformationStrippedFromFile0:??? #15 0x3ff807b2be8 in exc_dispatch_exception(0x0, 0x12009407c, 0x140122910, 0x140020000, 0x0, 0x0) DebugInformationStrippedFromFile1:??? #16 0x3ff807b38c4 in exc_raise_signal_exception(0x80, 0x0, 0x3ff8019241c, 0x1, 0x1, 0x140048af0) DebugInformationStrippedFromFile3:??? #17 0x3ff800d3b28 in __sigtramp(0x3ff8019241c, 0x1, 0x1, 0x140048af0, 0x140122ef8, 0x0) DebugInformationStrippedFromFile105:??? #18 0x3ff8019241c in UnknownProcedure22FromFile22(0x3ffc0080c50, 0x1, 0x14017cc00, 0x2f, 0x140024f20, 0x3ff8057c824) DebugInformationStrippedFromFile22:??? #19 0x3ff80192f40 in UnknownProcedure17FromFile22(0x3ff801943c8, 0x1, 0x10, 0x3ffc0080e18, 0x72, 0x140024f20) DebugInformationStrippedFromFile22:??? #20 0x3ff801943c4 in /usr/shlib/libc.so #21 0x3ff80194604 in /usr/shlib/libc.so #22 0x3ff800d1958 in malloc(0x3ff800d195c, 0x0, 0x12008e3bc, 0x140024f20, 0x1401232a0, 0x14017cc00) DebugInformationStrippedFromFile22:??? #23 0x12008e3b8 in lxldalc() /vobs/nlsrtl3/src/lxi/lxldalc.c:54 Note that frame #23 has a call to malloc(). In frame #16 a synchronous signal (such as a SEGV) is taken, which results in an exception being raised. Notice in frame #6 that malloc() is called again as part of handling the exception, which leads to the thread blocking. This is because the previous call to malloc() caused it to lock its internal mutex for synchronization purposes. This recursive call to malloc() is the problem. The user might be able to fix the cause of the original SEGV if its accompanying exception is fully processed. This patch allows the SEGV to be processed fully and correctly. PROBLEM: (QAR 49804) (Patch ID: OSF410-400195) ******** Threaded applications may see hangs when trying to use fork(). A prior patch fixed only a part of the problem. The user sees the child process with a stack trace from Ladebug like this: (ladebug) t >0 0x3ff8057ca24 in /usr/shlib/libpthread.so #1 0x3ff8057a450 in hstTransferContext(0x1, 0x140ae11f0, 0x3ffc018a010, 0x4, 0x3ffc0188a50, 0x3ffc01852c0) DebugInformationStrippedFromFile109:??? #2 0x3ff8056429c in dspDispatch(0x140051810, 0x1408641a8, 0x140864030, 0x0, 0x3ffc01851d0, 0x0) DebugInformationStrippedFromFile89:??? #3 0x3ff80567b98 in pthread_mutex_block(0x3ffc008ae28, 0x3ffc01876f8, 0x140621c00, 0x0, 0x3ffc01851d0, 0x0) DebugInformationStrippedFromFile95:??? #4 0x3ff8057c820 in __pthread_mutex_lock(0x3ffc01876f8, 0x140621c00, 0x0, 0x3ffc01851d0, 0x0, 0x3ff8057984c) DebugInformationStrippedFromFile111:??? #5 0x3ff80579848 in vmReinit(0x0, 0x3ff8057984c, 0x3ff80578e70, 0x0, 0x3ffc0080c50, 0x3ffc0081de0) DebugInformationStrippedFromFile108:??? #6 0x3ff80578e6c in /usr/shlib/libpthread.so #7 0x3ff800d36e0 in __fork(0x120040830, 0x0, 0x140684bc0, 0x0, 0x1f, 0x0) DebugInformationStrippedFromFile335:??? #8 0x12004082c in forkTranslator(inoutp_handle=0x140a9b8f8, inoutp_operation_data=0x140763a00) dp_xlatr.c:3610 #9 0x12004040c in forkedTranslatorInterface(inoutp_handle=0x140a9b8f8, in_operation_code=eConnect, inoutp_operation_data=0 x140763a00, getr=0x0, putr=0x0, arg_p=0x0) dp_xlatr.c:3471 #10 0x12003e0c0 in dp_callTranslator(inoutp_handle=0x140a9b8f8, in_operation_code=eConnect, inoutp_operation_data=0x140763a00, inp_scb=0x140621c00, getr=0x0, putr=0x0, arg_p=0x0) dp_xlatr.c:1894 #11 0x12003d878 in dp_connectToTranslator(inp_scb=0x140621c00) dp_xlatr.c:1468 #12 0x1200649d0 in dp_pjaConnectToTranslator(inp_Scb=0x140621c00, in_docPdlOid=1252, inoutp_printerPdlOid=0x140a9b988, outp_needsTranslator=0x140a9b9a8) pja_doc.c:726 #13 0x12005b4a0 in startDocument_1(getr=0x12004bb0c, putr=0x12005dc40, inp_fib=0x140a53c00) dp_pja.c:1508 #14 0x12004b234 in fiberRoutineJacket(inp_fib=0x140a53c00) dp_jbstp.c:1276 #15 0x12004b430 in fibThreadJacket(inp_fib=0x140a53c00) dp_jbstp.c:1331 #16 0x3ff80574b94 in thdBase(0x0, 0x3ffc0183430, 0x3ffc018a010, 0x1, 0x45586732, 0x3) DebugInformationStrippedFromFile101:??? Note that frame #7 above shows the call to fork(). The DECthreads library is then entered with an attempt to lock a DECthreads internal mutex in frame #4. This attempt causes the thread to block while waiting for another thread to unlock the mutex. But because this is the only thread left in the child process after the parent forks, this mutex will never be unlocked. The parent failed to lock this mutex during the fork operation and so is incorrectly left in the locked state in the child. PROBLEM: (HPXQ10P01, HPXQB7HGW) (Patch ID: OSF410-400195) ******** For a threaded application written on a system prior to Digital UNIX V4.0 that uses C and the DECthreads exception handling macros, or a threaded application written with C++ on any version of Digital UNIX that also uses the DECthreads exception handling macros, various synchronous signals might not be caught by the application's exception handlers. The DECthreads library is not properly raising synchronous signals as exceptions that the application can catch. PROBLEM: (QAR 51033) (Patch ID: OSF410-400195) ******** Threaded applications using pthread_kill() may experience a stack corruption. This is rather difficult to detect. PROBLEM: (QAR 51214) (Patch ID: OSF410-400195) ******** A threaded application can experience a DECthreads bug check with a message that mentions the routine nxm_resched(). This application might also hang with one of its threads having a stack trace containing a frame for a call to the routine errBugcheck(). The formatted DECthreads bugcheck message might look like this: DECthreads bugcheck (version V3.13-435), terminating execution. vpUpcallThreadUnblocked: (os/kern) invalid argument (4) nxm_resched(20,0) For a hung application in this scenario, a typical stack trace from Ladebug might look like this: (ladebug) t >0 0x3ff80568b20 in pthread_mutex_unblock(0x3ffc00802a0, 0x0, 0x0, 0x3ffc0181580, 0x3ffc018a968, 0x0) DebugInformationStrippedFromFile95:??? #1 0x3ff8057c1f8 in __pthread_mutex_unlock(0x0, 0x0, 0x3ffc0181580, 0x3ffc018a968, 0x0, 0x3ff80575618) DebugInformationStrippedFromFile111:??? #2 0x3ff80575614 in UnknownProcedure5FromFile103(0x3ffc0181580, 0x3ffc018a968, 0x0, 0x3ff80575618, 0x3ff800d6904, 0x3ffc0187760) DebugInformationStrippedFromFile103:??? #3 0x3ff800d6900 in fflush(0x3ff800d6904, 0x3ffc0187760, 0x3ff80565cfc, 0x3ffc018a968, 0x3ffc0187768, 0x0) DebugInformationStrippedFromFile84:??? #4 0x3ff80565cf8 in errBugcheck(0x3ffc0185da0, 0x3ffc01700d8, 0x4, 0x26e, 0x0, 0x3ffc018aae0) DebugInformationStrippedFromFile90:??? #5 0x3ff8057bcd4 in UnknownProcedure26FromFile109(0x0, 0x14014b438, 0x3ffc018a968, 0x3ffc018a968, 0x1, 0x14014b438) DebugInformationStrippedFromFile109:??? #6 0x3ff8057b0d8 in UnknownProcedure20FromFile109(0x500, 0x1f4, 0x1, 0xffffffffdfbbee16, 0x1f4, 0x14014b478) DebugInformationStrippedFromFile109:??? #7 0x3ff80535200 in msg_receive(0x0, 0x3ffc018abf0, 0x0, 0x0, 0x3ffc018a968, 0x0) DebugInformationStrippedFromFile6:??? #8 0x3fefffffffd in ??? the kernel to call into user space to perform an operation). Note that frame #4 above contains the DECthreads bugcheck call, but also note that it eventually calls pthread_mutex_unblock() (frame #0 above). This call to pthread_mutex_unblock() hangs because it is incorrect to call pthread_mutex_ unblock() within the context of an upcall. PROBLEM: (QAR 51214) (Patch ID: OSF410-400210) ******** A threaded application might hang while attempting to issue a message from the DECthreads bugcheck. A stack trace of a thread in this state will contain frames for calls to the routines errBugcheck(), fflush() and pthread_mutex_ unblock(). (ladebug) t >0 0x3ff80568b20 in pthread_mutex_unblock(0x3ffc00802a0, 0x0, 0x0, 0x3ffc0181580, 0x3ffc018a968, 0x0) DebugInformationStrippedFromFile95:??? #1 0x3ff8057c1f8 in __pthread_mutex_unlock(0x0, 0x0, 0x3ffc0181580, 0x3ffc018a968, 0x0, 0x3ff80575618) DebugInformationStrippedFromFile111:??? #2 0x3ff80575614 in UnknownProcedure5FromFile103(0x3ffc0181580, 0x3ffc018a968, 0x0, 0x3ff80575618, 0x3ff800d6904, 0x3ffc0187760) DebugInformationStrippedFromFile103:??? #3 0x3ff800d6900 in fflush(0x3ff800d6904, 0x3ffc0187760, 0x3ff80565cfc, 0x3ffc018a968, 0x3ffc0187768, 0x0) DebugInformationStrippedFromFile84:??? #4 0x3ff80565cf8 in errBugcheck(0x3ffc0185da0, 0x3ffc01700d8, 0x4, 0x26e, 0x0, 0x3ffc018aae0) DebugInformationStrippedFromFile90:??? #5 0x3ff8057bcd4 in UnknownProcedure26FromFile109(0x0, 0x14014b438, 0x3ffc018a968, 0x3ffc018a968, 0x1, 0x14014b438) DebugInformationStrippedFromFile109:??? #6 0x3ff8057b0d8 in UnknownProcedure20FromFile109(0x500, 0x1f4, 0x1, 0xffffffffdfbbee16, 0x1f4, 0x14014b478) DebugInformationStrippedFromFile109:??? #7 0x3ff80535200 in msg_receive(0x0, 0x3ffc018abf0, 0x0, 0x0, 0x3ffc018a968, 0x0) DebugInformationStrippedFromFile6:??? #8 0x3fefffffffd in ??? Note that frame #8 above is not readable. This is to be expected because the problem is occuring in an "upcall" frame. (This "upcall" frame is used by kernel to call into user space to perform an operation). Note that frame #4 above contains the DECthreads bugcheck call, but also note that it eventually calls pthread_mutex_unblock() (frame #0 above). This call to pthread_mutex_ unblock() hangs because it is incorrect to call pthread_mutex_unblock() within the context of an upcall. PROBLEM: (EVMS-GRYPHON-FT QAR 00237) (Patch ID: OSF410-400210) ******** This patch fixes a situation where threads would hang in the pthread_once() or cma_once() routines. The DECthreads routines pthread_once() and cma_once() use the DECthreads global mutex. The first thread to call pthread_once() or cma_once() would lock this mutex and subsequent threads calling pthread_once() or cma_once() would hang. This problem was fixed on OpenVMS and the patch has been ported to Digital UNIX 4.0. PROBLEM: (IPMT HPAQ11MMTG) (Patch ID: OSF410-400210) ******** For the signals traditionally representing synchronous errors in a program (such as SIGPIPE, SIGSYS, SIGSEGV, SIGBUS, SIGFPE, SIGEMT, SIGIOT, SIGILL), DECthreads catches the signal and converts it into an equivalent exception. Digital UNIX 4.0 attempts to print an abort message for an unhandled exception. If an unhandled exception occurs in a libc library I/O routine, the thread causing the exception may hang in abort() because of a deadlock over an I/O mutex. PROBLEM: (QAR 52332, 51161) (Patch ID: OSF410-400226) ******** This patch corrects problems encountered when using signals with multi-thread programs. It is possible for threaded applications to lose signals on occasion. PROBLEM: (QAR 52339) (Patch ID: OSF410-400226) ******** This patch corrects a random memory corruptor in multi-threaded applications. PROBLEM: (IPMT HPAQ309UJ) (Patch ID: OSF410-400226) ******** This patch corrects problems encountered where multi-threaded applications fail to create threads with user allocated stacks. PROBLEM: (QAR 00237) (Patch ID: OSF410-400241) ******** This patch fixes a situation where threads would hang in the DECthreads POSIX 1003.41/Draft 4 (d4) interface's pthread_once() routine. The d4 legacy routine pthread_once() uses the DECthreads global mutex. The first thread to call pthread_once() would lock this mutex and subsequent threads calling pthread_once() would hang. This problem was fixed on OpenVMS and the patch has been ported to Digital UNIX 4.0. PROBLEM: (QAR 45580) (Patch ID: OSF410-400239-1) ******** Multithreaded applications that call the pthread_mutex_destroy routine may fail when there are no threads referencing the mutex. This is caused by a race condition inside the pthread_mutex_unlock code. The typical symptom will be a return value of EBUSY from pthread_mutex_destroy. *** NOTE *** Applications using "inline" mutex operations, as described in the pthread.h header file, will need to RECOMPILE with the application of this patch. The instruction sequences for the pthread_mutex_unlock routine have changed. Please refer to the existing note in pthread.h entitled "NOTICED: inline function performance vs. binary compatibility" for more information. PROBLEM: (QAR 52332) (Patch ID: OSF410-400239-1) ******** Over time, a multi-threaded application may find that asynchronous signals are not being delivered to it. The asynchronous signal may have originated outside the application or from within it. The effect will be taht the signal is pending against a thread, the thread will NOT have the signal blocked, but it will not be delivered to that thread. PROBLEM: (QAR 52405, QAR 52710) (Patch ID: OSF410-400261) ******** The problem this patch fixes shows up only in multi-threaded applications. File descriptors opened by the application may unexpectedly be closed when NIS or RPC services are called, either directly or through remote database lookups (e.g., getpwent()). Subsequent I/O operations on the applications file descriptor will typically produce an error with errno set to EBADF. PROBLEM: (QAR 52450, QAR 52464) (Patch ID: OSF410-400261) ******** The problem this patch fixes will only show up in multi-threaded applications. The problem symptoms are that heavy usage of any of the several database lookup functions such as getpwent() and getprotoent(), from multiple short-lived threads, may eventually result in the application getting a segmentation violation, core dumping, and exiting. PROBLEM: (CLD HPAQ30CW2, QAR 51943) (Patch ID: OSF410-400302) ******** This patch fixes a problem in which the rcmd function may cause the system to dump core. User applications that produce a call to rcmd() may experience this problem. Typically, the application has calls to either the fget() or fclose() function. PROBLEM: (QAR 53701) (Patch ID: OSF410-400307) ******** In applications linked with -pthreads, the process signal mask is being lost (set to zero) in the child process following a fork() operation. PROBLEM: (QAR 53767) (Patch ID: OSF410-400307) ******** Occasionally, under certain load condtions, a DECthreads bugcheck occurs in pthread_kill(). This results in a core dump. PROBLEM: (Patch ID: OSF410-400331) ******** When the /etc/passwd file is very large, a performance degradation may occur. When the number of passwd entries reaches up into the 30,000 to 80,000 range or greater, mkpasswd will sometimes fail to create a hashed (ndbm) database. Since the purpose of this database is to allow for efficient (fast) searches for passwd file information, failure to build it causes commands that rely on it to do a linear search of /etc/passwd. This results in a serious per- formance degradation for those commands. For customers choosing to use the mkpasswd -s option to avoid this type of failure, a potential database/binary compatibility problem may arise. If a customer application that accesses the password database created by mkpasswd is built statically (non-shared), that application will be unable to read from or write to the password database correctly. This would cause the customer application to fail either by generating incorrect results or by possibly dumping core. Any statically linked application would be affected if it directly or indirectly calls any of the libc ndbm routines documented in the ndbm(3) man page and then accesses the password database. To remedy this situation, the customer would need to re-link the application. Customers who do not use the mkpasswd -s option will not see this database/ binary compatibility problem. FILE(s): /usr/sbin/auditd subset OSFBASE410 CHECKSUM: 56199 504 RCSfile: auditd.c RCS: 1.1.8.6 /sbin/halt subset OSFBASE410 CHECKSUM: 29876 352 RCSfile: halt.c RCS: 4.2.27.2 /usr/ccs/lib/libc.a subset OSFCMPLRS410 CHECKSUM: 57332 1953 /usr/ccs/lib/libc_r.a subset OSFCMPLRS410 CHECKSUM: 57332 1953 /shlib/libc.so subset OSFBASE410 CHECKSUM: 16616 1543 /shlib/libc_r.so subset OSFBASE410 CHECKSUM: 16616 1543 /usr/lib/nls/msg/en_US.ISO8859-1/libc.cat subset OSFBASE410 CHECKSUM: 05560 13 /usr/shlib/libexc.so subset OSFBASE410 CHECKSUM: 55605 48 /usr/shlib/libpthread.so subset OSFBASE410 CHECKSUM: 54010 416 /usr/shlib/libpthreads.so subset OSFBASE410 CHECKSUM: 63758 120 /usr/shlib/libpthreaddebug.so subset OSFBASE410 CHECKSUM: 13331 144 /sbin/ls subset OSFBASE410 CHECKSUM: 52003 416 RCSfile: ls.c RCS: 4.3.23.6 RCSfile: flsbuf.c RCS: 4.2.15.2 RCSfile: errlst.c RCS: 4.2.9.2 RCSfile: __lc_dlsym.c RCS: 1.1.2.5 RCSfile: sia_globals.c RCS: 1.1.11.2 RCSfile: dlsym.c RCS: 1.1.2.5 /usr/sbin/mkpasswd subset OSFBASE410 CHECKSUM: 23807 24 RCSfile: mkpasswd.c RCS: 4.2.39.2 /usr/include/ndbm.h subset OSFINCLUDE410 CHECKSUM: 14045 6 RCSfile: ndbm.h RCS: 4.2.24.3 /usr/lib/nls/msg/en_US.ISO8859-1/nslookup.cat subset OSFCLINET410 CHECKSUM: 10924 7 /usr/bin/nslookup subset OSFCLINET410 CHECKSUM: 12200 96 /sbin/mount subset OSFBASE410 CHECKSUM: 02733 512 RCSfile: mountxdr.c RCS: 4.2.7.2 RCSfile: mountxdr_v3.c RCS: 1.1.2.3 RCSfile: mount.c RCS: 4.3.59.2 RCSfile: mountxcdr.c RCS: 1.1.2.4 /sbin/umount subset OSFBASE410 CHECKSUM: 43246 336 RCSfile: umount.c RCS: 4.2.18.2 /sbin/reboot subset OSFBASE410 CHECKSUM: 36614 336 RCSfile: reboot.c RCS: 4.2.16.3 /usr/lbin/upd_merge subset OSFBASE410 CHECKSUM: 21606 384 /usr/bin/uudecode subset OSFBASE410 CHECKSUM: 35661 360 RCSfile: uudecode.c RCS: 4.3.11.3 /usr/sbin/ypbind subset OSFCLINET410 CHECKSUM: 56324 328 RCSfile: ypbind.c RCS: 4.2.7.3 /usr/include/netdb.h subset OSFINCLUDE410 CHECKSUM: 11906 9 RCSfile: netdb.h RCS: 4.2.28.3 /usr/include/arpa/nameser.h subset OSFINCLUDE410 CHECKSUM: 10429 12 RCSfile: nameser.h RCS: 4.2.17.2 /usr/include/pthread.h subset OSFINCLUDE410 CHECKSUM: 58953 66 RCSfile: pthread.h RCS: 1.1.13.6 /usr/include/resolv.h subset OSFINCLUDE410 CHECKSUM: 19041 11 RCSfile: resolv.h RCS: 4.2.20.2 /usr/include/tis.h subset OSFINCLUDE410 CHECKSUM: 53110 16 RCSfile: tis.h RCS: 1.1.9.2 =============================================================================== SUPERSEDED PATCHES: OSF410-400189 (80.00), OSF410-400189B (207.00) This patch corrects the following: - A potential security vulnerability has been discovered in BIND (Domain Name Service), where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. PROBLEM: (SSRT0296U) (Patch ID: OSF410-400189B) ******** A potential security vulnerability has been discovered in BIND (Domain Name Service), where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. FILE(s): /usr/sbin/named subset OSFINET410 CHECKSUM: 03940 184 /usr/sbin/named-xfer subset OSFINET410 CHECKSUM: 14907 48 RCSfile: named-xfer.c RCS: 4.2.16.2 /usr/sbin/screend subset OSFINET410 CHECKSUM: 15919 392 RCSfile: screend.c RCS: 1.1.5.2 =============================================================================== SUPERSEDED PATCHES: OSF410-400189 (80.00), OSF410-400189C (208.00) This patch corrects the following: - A potential security vulnerability has been discovered in BIND (Domain Name Service), where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. PROBLEM: (SSRT0296U) (Patch ID: OSF410-400189C) ******** A potential security vulnerability has been discovered in BIND (Domain Name Service), where under certain circumstances, system integrity may be compromised. This may be in the form of improper file or privilege management. Digital has corrected this potential vulnerability. PROBLEM: (Patch ID: OSF410-400331B) ******** This patch allows the uusend, uustat, uucpd, and uudecode commands to work correctly when the customer builds a hashed passwd database using a non-default page file block size. FILE(s): /usr/lib/uucp/uucico subset OSFUUCP410 CHECKSUM: 56123 600 /usr/lib/uucp/uucleanup subset OSFUUCP410 CHECKSUM: 46222 424 RCSfile: uucleanup.c RCS: 4.3.10.2 /usr/bin/uucp subset OSFUUCP410 CHECKSUM: 00851 448 RCSfile: uucp.c RCS: 4.3.10.3 RCSfile: uucpdefs.c RCS: 4.3.8.2 RCSfile: uucpname.c RCS: 4.3.7.2 /usr/sbin/uucpd subset OSFUUCP410 CHECKSUM: 06245 376 RCSfile: uucpd.c RCS: 4.3.8.2 =============================================================================== SUPERSEDED PATCHES: OSF410-031 (1.00), OSF410-400105 (69.00), OSF410-400148 (41.00), OSF410-400125 (21.00), OSF410-400176 (70.00), OSF410-400176-1 (70.01), OSF410-400217 (110.00), OSF410-400228 (126.00), OSF410-400239B (160.00), OSF410-400231 (128.00), OSF410-400231-1 (128.01), OSF410-405094 (171.00), OSF410-400259 (153.00) This patch corrects the following problems: - Fixes two problems that occur on AdvFS systems: o An AdvFS data corruption problem can occur in user files. This problem will not produce either a core file or return non-zero system codes when accessing the corrupted file. o The verify command does not detect corrupted files. - Multi-threaded applications that call the pthread_mutex_destroy routine may fail when there are no threads referencing the mutex. This is caused by a race condition inside the pthread_mutex_unlock code. The typical symptom will be a return value of EBUSY from pthread_mutex_destroy. - Fixes a problem with AdvFS in which the following two panics occur: AdvFS Exception Module = 1, line = 1891 kernel memory fault - Systems running with AdvFS and LSM under heavy I/O loads can have sluggish interactive performance. In a DECsafe environment, these systems can encounter unexpected relocation of services. - Idle time is reset on broadcast message when AdvFS is the root file system. - Fixes an AdvFS hang that could occur while running vdump. - Fixes a problem where AdvFS hangs in routine cleanup_closed_list. - Fixes a system panic with the message "simple_lock: time limit exceeded". - Fixes an "ADVFS EXCEPTION, Module = 26" panic that occurs after an "advfs I/O error" console message. - Corrects a problem with an NFS V3 mounted AdvFS file system where under heavy I/O load, data being written to a file may be lost. Additionally, because file stats are not being saved, the file modification time may revert to a previous value. - Fixes a problem where the vrestore program does not report failed exit status appropriately on incomplete or incorrect commands, corrupt or invalid saved sets, or file open failures. - Fixes a problem that occurs on AdvFS systems. When a user exceeds the quota limits, an excessive number of user warning messages are sent to the system console if the user terminal is inaccessible. PROBLEM: (ZPOB82799) (Patch ID: OSF410-031) ******** This fixes a problem where a hang occurs on an AdvFS filesystem. This problem occurs when a thread is looping in routine "cleanup_closed_list". Sample stack after forced crash: stop_secondary_cpu() panic("cpu_ip_intr: panic request") cpu_ip_intr() _XentInt() cleanup_closed_list() fs_cleanup_thread() PROBLEM: (GOZ100505) (Patch ID: OSF410-400105) ******** A system will panic with the panic string "simple_lock: time limit exceeded". The stack trace of the panicing process is as follows: panic("simple_lock: time limit exceeded") simple_lock_fault() simple_lock_time_violation() msfs_getpage() u_seg_fault() u_map_fault() vm_fault() trap() _XentMM() PROBLEM: (QAR 50227) (Patch ID: OSF410-400148) ******** This patch fixes an "ADVFS EXCEPTION" panic after an "advfs I/O error" message to the console. The traceback of the panic thread will be as follows: panic() advfs_sad() ftx_fail_2() ftx_fail() fs_write() msfs_write() vn_write() rwuio() write() syscall() _Xsyscall(). PROBLEM: (HPAQ92E5E) (Patch ID: OSF410-400125) ******** The system is hung while running vdump and there is a thread with the followijg signature (note: this is _NOT_ the vdump thread): 0 imm_get_next_xtnt_desc() [../../../../src/kernel/msfs/bs/bs_inmem_map.c] 1 imm_merge_xtnt_map() [../../../../src/kernel/msfs/bs/bs_inmem_map.c] PROBLEM: (HPXQ42587, QAR46237) (Patch ID: OSF410-400176) ******** On an AdvFS system, a broadcast message will cause the idle time to be reset to zero. (Patch ID: OSF410-400176-1) PROBLEM: (QAR 36779) (Patch ID: OSF410-400298-1 reference information) ******** This patch fixes a problem that occurs when running the NetWorker Version 4.2c application. The NetWorker application is unable to reset the atime (access time) attribute on files being accessed. No errors or warnings are displayed. Without this patch, NetWorker Version 4.2c will not perform well. PROBLEM: (TKTR71564 QAR 36411) (Patch ID: OSF410-400217) ******** Systems running with AdvFS and LSM under heavy I/O loads can have sluggish interactive performance. In a DECsafe environment, these systems can encounter unexpected relocation of services. PROBLEM: (HPXQ43C4D, TKTR52185, QAR 46016) (Patch ID: OSF410-400217) ******** A system can hang after the message "syncing disks..." prints during a panic. When a hang occurs, the "syncing disks..." message does not print entirely and the system does not take a dump. A time-out mechanism was added to the "syncing disks" logic. This mechanism improves the reliability of getting a dump by using the system clock to break out of the "syncing disks" path and take a dump if no progress is being made on reducing the number of buffers to be flushed. The numbers printed periodically between the "syncing disks..." and "done" messages are the number of buffers left to flush. PROBLEM: (MGO102584) (Patch ID: OSF410-400228) ******** This patch fixes AdvFS to prevent the following two panics: AdvFS Exception Module = 1, line = 1891 kernel memory fault with the following stack trace: _XentMM() bs_refpg_int() bs_refpg() tagdir_get_info() bs_bfdmn_activate() bs_bfdmn_tbl_activate() fs_fset_get_info() msfs_real_syscall() msfs_syscall() syscall() _Xsyscall() PROBLEM: (QAR 45580) (Patch ID: OSF410-400239B) ******** Multithreaded applications that call the pthread_mutex_destroy routine may fail when there are no threads referencing the mutex. This is caused by a race condition inside the pthread_mutex_unlock code. The typical symptom will be a return value of EBUSY from pthread_mutex_destroy. Due to the pthreads fix vdump and vrestore need to be redistributed. PROBLEM: (QAR 51304, QAR 51596) (Patch ID: OSF410-400231-1) ******** This patch fixes two problems that occur on AdvFS systems: An AdvFS data corruption problem can occur in user files. This problem occurs when AdvFS stores two different versions of a particular page (an 8K segment). This problem will not produce either a core file or a return non-zero system codes when accessing the corrupted file. The verify command will not detect the corrupted file. This patch provides the following: 1. The OS is corrected to prevent any new files from being corrupted. 2. The verify program now recognizes data corruptions. 3. The verify -f command detects the corruption and moves the file into a temporary file. Another temporary file is created to show the contents of the corresponding "visible" page. These files are then available for analysis by the user for the purpose of manually repairing the corruption. The following is an example of a recovery procedure. To detect a corrupted file: Run the verify utility, which resides in /sbin/advfs. # verify test_domain +++ Domain verification +++ Domain Id 32d3e638.000a46a0 Checking disks ... Checking storage allocated on disk /dev/rz1a Checking mcell list ... Checking mcell position field ... Checking tag directories ... +++ Fileset verification +++ +++ Fileset test_fileset +++ Checking frag file headers ... Checking frag file type lists ... Scanning directories and files ... Overlapping frag data corruption detected in: File: /50226.file.4 Page: 1 Run verify -f on this domain to enable recovery of this data. Scanning tags ... Searching for lost files ... # The verify utility has detected a corrupted file in fileset test_fileset. The name of the file is "50226.file.4" and it is located in the highest directory of the fileset when it is mounted. The page that is corrupted is page 1. Verify also suggests running verify again using the -f flag to enable recovery of the hidden data for page 1. At this point there are two choices: 1. Delete the file and recreate it. The corruption problem has been fixed on the system. The newly created file will not exhibit the undesired behavior. 2. Run verify with the -f flag to identify the corrupted data. To identify the corrupted data: Run the verify command with the -f flag. # verify -f test_domain +++ Domain verification +++ Domain Id 32d3e638.000a46a0 Checking disks ... Checking storage allocated on disk /dev/rz1a Checking mcell list ... Checking mcell position field ... Checking tag directories ... +++ Fileset verification +++ +++ Fileset test_fileset +++ Checking frag file headers ... Checking frag file type lists ... Scanning directories and files ... Overlapping frag data corruption detected in: File: /50226.file.4 Page: 1 Temporary files created representing the two versions of page 1 of file /50226.file.4 Refer to the README file accompanying the patch for a description of how to use these temporary files to recover from this overlapping frag corruption problem. Scanning tags ... Searching for lost files ... # The verify utility reports that it has created two temporary files in the same directory as the corrupted file. Mount the fileset to indentify these two files: # mount test_domain#test_fileset /test # ls -l /test total 169 drwx------ 2 root system 8192 Jan 8 13:23 .tags -rw-r--r-- 1 root system 24576 Jan 9 12:27 50226.file.1 -rw-r--r-- 1 root system 40960 Jan 9 12:27 50226.file.2 -rw-r--r-- 1 root system 32768 Jan 9 12:27 50226.file.3 -rw-r--r-- 1 root system 24576 Jan 9 12:27 50226.file.4 -rw------- 1 root system 8192 Jan 13 14:32 50226.file.4.page_1.ext -rw------- 1 root system 8192 Jan 13 14:32 50226.file.4.page_1.frag -rw-r----- 1 root operator 8192 Jan 8 13:23 quota.group -rw-r----- 1 root operator 8192 Jan 8 13:23 quota.user The .ext and .frag files contain information from the corrupted area. In the example above: 50226.file.4 The original corrupted file 50226.file.4.page_1.ext A file containing the hidden version of page 1 of the corrupted file. A read() cannot retrieve this data. 50226.file.4.page_1.frag A file containing the frag version of page 1 of the corrupted file. This is the same data that a read() of page 1 would return. To fix the corrupted file: 1. View the .ext and .frag files to determine which to keep. Note that what might really be desired is a merge of the two. If the file 50226.file.4.page_1.ext contains the desired data, enter: # ln -s 50226.file.4.page_1.ext desired_page_1 If the file 50226.file.4.page_1.frag contains the desired data, enter: # ln -s 50226.file.4.page_1.frag desired_page_1 If a merge of the two must be done, do the merge and put the result into a new file called desired_page_1. 2. Create a new fixed version of the corrupted file using the corrupted file and new file (desired_page_1 in this example). A. Copy page 0 (good page) from the corrupted file into a new file: # dd if=50226.file.4 of=newfile bs=8192 count=1 B. Append the desired page 1 to the new file by seeking over 1 page in the output file before writing: # dd if=desired_page_1 of=newfile bs=8192 count=1 seek=1 C. Append the remainder of the original file to the end of the new file by skipping past the first two pages of the input file before reading, and seeking past the first 2 pages (already rewritten) in the output file before writing: # dd if=50226.file.4 of=newfile bs=8192 seek=2 skip=2 Run the diff command on the new and the original file to confirm that only page 1 has changed to and that the difference is what is desired. For example: diff newfile 50226.file.4 D. Rename the new file and remove the temporary files: # mv newfile 50226.file.4 # rm 50226.file.4.page_1.ext 50226.file.4.page_1.frag desired_page_1 If desired, the verify command can now be run on the domain again to confirm that the data corruption problem is gone. PROBLEM: (CLD UTO101199,CLD HPAQ30ETE,QARs 51485,52365) (Patch ID: OSF410-087) ******** (Patch ID OSF410-400298-1 reference information) This patch corrects a problem with an NFS V3 mounted AdvFS file system where under heavy I/O load, data being written to a file may be lost. Additionally, because file stats are not being saved, the file modification time may revert to a previous value. PROBLEM: (UVO105368) (Patch ID: OSF410-405094) ******** This patch fixes a problem where the vrestore program does not report failed exit status appropriately on incomplete or incorrect commands, corrupt or invalid saved sets, or file open failures. PROBLEM: (UVO105186) (Patch ID: OSF410-400259) ******** This patch fixes a problem that occurs on AdvFS system. When a user exceeds the quota limits, an excessive number of user warning messages are sent to the system console if the terminal is inaccessible. After applying this patch, if a user exceeds the quota limits, the warning messages are still displayed on the terminal (when possible) but never on the system console. Additionally, when a quota underflow occurs, the warning message now describes the fileset and the user or group that is experiencing the underflow problem. FILE(s): /sys/BINARY/advfs.mod subset OSFADVFSBIN410 CHECKSUM: 05945 1134 /sbin/advfs/logread subset OSFADVFS410 CHECKSUM: 28446 32 RCSfile: logread.c RCS: 1.1.2.3 /sbin/advfs/verify subset OSFADVFS410 CHECKSUM: 00307 224 RCSfile: verify.c RCS: 1.1.15.2 /usr/lib/nls/msg/en_US.ISO8859-1/verify.cat subset OSFADVFS410 CHECKSUM: 53996 12 /sbin/vdump subset OSFADVFS410 CHECKSUM: 30119 432 /sbin/vrestore subset OSFADVFS410 CHECKSUM: 57285 464 RCSfile: vrestore.c RCS: 1.1.46.2 /usr/sbin/vedquota subset OSFADVFS410 CHECKSUM: 11759 408 RCSfile: vedquota.c RCS: 1.1.25.2 /usr/sbin/vquot subset OSFADVFS410 CHECKSUM: 14002 424 RCSfile: vquot.c RCS: 1.1.7.3 /usr/sbin/vquota subset OSFADVFS410 CHECKSUM: 12224 352 RCSfile: vquota.c RCS: 1.1.22.2 /usr/sbin/vquotacheck subset OSFADVFS410 CHECKSUM: 29069 384 RCSfile: vquotacheck.c RCS: 1.1.9.3 =============================================================================== SUPERSEDED PATCHES: OSF410-400211 (101.00), OSF410-400211-1 (101.01) This patch corrects the following: - Fixes a problem in which the dd command can corrupt output on very large files (2GB or greater) when the "conv=sparse" option is used. PROBLEM: (QAR 47063) (Patch ID: OSF410-400211-1) ******** This patch fixes a problem in which the dd command can corrupt output on very large files (2 GB or greater) when the "conv=sparse" option is used. In some cases a seek error is reported: dd seek error: Invalid argument In other cases a corrupt file is created with no error reported. FILE(s): /sbin/dd subset OSFBASE410 CHECKSUM: 17308 32 RCSfile: dd.c RCS: 4.3.30.2 /usr/bin/dd subset OSFBASE410 CHECKSUM: 52732 32 RCSfile: dd.c RCS: 4.3.30.2 =============================================================================== SUPERSEDED PATCHES: OSF410-400331 (219.00), OSF410-400331B (220.00) This patch corrects the following: - Allows the uusend, uustat, uucpd, and uudecode commands to work correctly when the customer builds a hashed passwd database using a non-default page file block size. PROBLEM: (Patch ID: OSF410-400331B) ******** This patch allows the uusend, uustat, uucpd, and uudecode commands to work correctly when the customer builds a hashed passwd database using a non-default page file block size. FILE(s): /usr/bin/uusend subset OSFUUCP410 CHECKSUM: 21270 432 RCSfile: uusend.c RCS: 4.3.10.2 /usr/bin/uustat subset OSFUUCP410 CHECKSUM: 41121 408 RCSfile: uustat.c RCS: 4.3.14.3 =============================================================================== SUPERSEDED PATCHES: OSF410-039 (5.00), OSF410-034 (2.00), OSF410-400100 (14.00), OSF410-405037 (7.00), OSF410-405036 (64.00), OSF410-400141 (36.00), OSF410-400165 (50.00), OSF410-052 (76.00), OSF410-059 (100.00), OSF410-405054 (71.00), OSF410-400127 (22.00), OSF410-400197 (86.00), OSF410-062 (113.00), OSF410-063 (119.00), OSF410-400216 (109.00), OSF410-400208 (95.00), OSF410-405044 (61.00), OSF410-049 (75.00), OSF410-405053 (103.00), OSF410-405059 (105.00), OSF410-400186 (78.00), OSF410-400201 (87.00), OSF410-405045 (62.00), OSF410-400198 (114.00), OSF410-400232 (129.00), OSF410-400233 (130.00), OSF410-400242 (139.00), OSF410-400250 (144.00), OSF410-405062 (106.00), OSF410-068 (133.00), OSF410-400235 (134.00), OSF410-400221 (116.00), OSF410-405068 (148.00), OSF410-405058 (157.00), OSF410-405058-1 (157.01), OSF410-070 (145.00), OSF410-400130 (25.00), OSF410-074 (159.00), OSF410-085 (167.00), OSF410-405067 (147.00), OSF410-400245 (141.00), OSF410-405098 (190.00), OSF410-400266 (178.00), OSF410-400289 (192.00), OSF410-400351 (222.00), OSF410-400296 (196.00), OSF410-087 (173.00), OSF410-400298 (197.00) This patch corrects the following problems: - This patch provides support for the fuser utility. This utility displays a list of processes that are holding references to a file on the file system that cannot be unmounted. - This patch does the following: o Fixes an isp1020 SCSI driver performance regression. o Provides HSZ70 support. - Fixes a problem in which the ufs property list can become corrupted. - Fixes a problem with the fsck command. When fsck is run on a non-existent file system or on a currently mounted file system, it returns a success status of zero. It should return a non-zero status. - This network patch, which greatly improves Digital UNIX networking performance, is targeted at high traffic Web server systems or any system which handles a large number of TCP connections simultaneously, ie. more than several thousand at one time. - The kernel panics with a "kernel memory fault", typically in either the vm_pg_alloc() or vm_zeroed_pg_alloc() routines. - Fixes a problem in which network applications communicating to one of the host's own addresses, may hang, or receive the error message: no buffer space available The problem occurs due to a queue full condition on the interface. - Fixes a problem in which the the lastcomm accounting command doesn't print the "S" flag at appropriate times. This patch also improves the performance of lastcomm. - This patch resolves a TCP/IP network hang due to IP Q ACK deadlock. When this condition occurs the IP Q becomes full due to saturation. Representative console messages indicating this condition are shown below: SIS00-00-root: IP q full, 315617 packets dropped in the last 5 mins. - Fixes a performance problem that occurs with UFS file systems. - Fixes a number of problems relating to signals and POSIX 1003.1b timers in multi-threaded programs running on multi-processor systems. These problems can result in missed timer-expiration signals and system crashes. - Probe of isp fails intermittently during boot. - Fixes a kernel memory fault in ether_output packet filter, when running tcpdump. - This patch resolves a TCP/IP network hang due to IP Q ACK deadlock. When this condition occurs the IP Q becomes full due to saturation. Representative console messages indicating this condition are shown below SIS00-00-root: IP q full, 315617 packets dropped in the last 5 mins. - Fixes ICMP REDIRECTS. When an ICMP REDIRECT is received, the routing table was updated properly, but the IP layer didn't use then new route information. - Fixes a problem in which the system can panic with "lock already owned by thread" - Fixes a problem that occurs on all systems that use networking system. - This patch is a kernel fix for network sockets left in FIN_WAIT_1 state forever. This patch contains a "tunable" kernel parameter. It is recommended that only experienced system administrators attempt to set this parameter from the default value. - Fixes a problem that occurs when the system panics with the following error message: kernel memory fault - Fixes a problem with the exec() system function. A shell script that has "#! " as the first line of the script, invokes the program but does not set the effective user id for the execution of the program. - Fixes a problem that can occur with programs linked with libaio. These programs could dump core with a SIGSEGV signal or corrupt memory when calling the close() function with a bad file descriptor value. - This patch resolves a kernel memory fault. - System panics with message: "vm_map_swapout: negative resident count". - The user or sytem UAC_NOPRINT settings are ignored when an unaligned access trap on a user address was taken while in kernel mode; the unwanted error message is still printed. - NetWorker Version 4.2c requires this patch for new fcntl functionality. This layered product will not run desirably without this patch. - This patch allows tuneablity for existing two level task swapping scheme. - The ObjectStore application from Object Design, Inc. fails with the following error: "Fatal error Invalid argument(errno = 22) munmap failed: cl_mmap:" - Fixes a system crash when setting the date on SMP systems. - Devices sometimes cannot be accessed by the system after getting selection timeouts. - Fixes a network socket problem with select() missing state changes on clients from non-write to writable. - Fixes some hangs that can occur during the "syncing disks..." portion of panic processing, improves the reliability of getting a dump after a system panic, and also makes it more likely that AdvFS buffers will be synced to disk after a system panic. - The vmstat(1) command displays negative numbers when used with the '-P' option. Problem may not appear on all platorms or configurations. It is dependent on how the system constructs various internal data structures. - Prevents a "kernel memory fault" in bread() during sync operations. - Fixes "kernel memory fault" panics from the kernel malloc() routine, and threads hanging in vfs_busy() when file-on-file mounting (kernel option FFM_FS) is used with fattach()/fdetach() or System V STREAMS. - Fixes a problem that prevents an "options DCEDFS" line from being added to the kernel configuration file. Without the fix, the kernel build will fail with the error "ld: dcedfs.mod: setjmp: multiply defined". - Fixes a panic which occurs when a UNIX domain socket lock is being held while calling vrele(). - An enhanced fix to the solockpair() routine. This fix was needed because the routine was freeing a socket lock structure that was concurrently spun upon in lock_write(). Typical problem symptoms include kernel memory faults with sockets, mbufs and mblocks as well as hangs. Applications using sockets in a multi-threaded, multi-cpu environment can experience a number of lock violations with the socket structures. This patch is MANDATORY to install on all systems. It will be effective on Uniprocessor systems when lockmode debugging is invoked. - This is a mandatory patch for the following systems and conditions: . Systems that use program debuggers such as TotalView, Ladebug, dbx, or gdb . Systems that use the /proc file system in any other way (for example, the System V Environment ps command) . Systems that experience panics and hangs in the /proc file system . Systems that panic when running multi-threaded programs that call an exec() function - This patch provides additional event logging by the SCSI/CAM disk driver to the binary.errlog file. - Fixes a problem that occurs when using real-time applications. When writing large (sequential) files to a UFS file system, time constraints associated with the application may be violated. - Fixes a panic that prints "kernel memory fault". - Fixes a 'recursion count overflow' problem that occurs on Digital UNIX systems. - This patch greatly reduces the number of "NFS stale file handle" messages logged to an NFS server system console. - Fixes a problem with the "ifconfig -a" command. At times, the command will not display all of the network interfaces. - This patch eliminates panics that will occur when attempting to execute shell scripts on a filesystem mounted with the "noexec" option. - Corrects a problem with an NFS V3 mounted AdvFS file system where under heavy I/O load, data being written to a file may be lost. Additionally, because file stats are not being saved, the file modification time may revert to a previous value. - This patch adds a mechanism to the poll() system call to allow it to be used as a timer. PROBLEM: (HPXQ43C4D, TKTR52185, QAR 46016) (Patch ID: OSF410-039) ******** This patch fixes some hangs that may occur after the message "syncing disks..." is printed when the system panics. When these hangs occur, the completion of the "syncing disks..." message - the word "failed" or "done" does not get printed, and the system does not take a dump. In addition to fixing these known hangs, a timout mechanism is added to the "syncing disks" logic that will improve the reliability of getting a dump by using the system clock to break out of the "syncing disks" path and take a dump if no progress is being made on reducing the number of buffers to be flushed. The numbers printed periodically between the "syncing disks..." and "done" messages are the number of buffers left to flush. This patch also makes it more likely that AdvFS buffers will be flushed to disk during the "syncing disks..." processing after a system panic. There is still no guarantee that writes in progress at the time of a panic will be completed. PROBLEM: (QAR 49523) (Patch ID: OSF410-034) ******** The vmstat(1) command may display negative numbers when run with the '-P' option. To reproduce the problem type: vmstat -P NOTE: The problem may not exist on all platforms / configurations because it is dependent on how the kernel build various internal data structures. PROBLEM: (QAR 49556) (Patch ID: OSF410-405037) ******** A "kernel memory fault" panic will be seen originating from the malloc() routine. The top stack entries will be as follows. Many different kernel routines may appear in the stack below malloc(). panic("kernel memory fault") trap() _XentMM() malloc() This problem is due to malloc() bucket corruption that occurs when there are racing fdetach()/ file-on-file unmounts. File-on-file mounting is most often used with the fattach() library call and System V Environment pipes. PROBLEM: (QAR 49556) (Patch ID: OSF410-405037) ******** Racing fdetach() or file-on-file unmounts can also cause threads to hang in the kernel with the following stack trace. 0 thread_block() 1 vfs_busy() 2 dounmount() 3 unmount() 4 syscall() 5 _Xsyscall() PROBLEM: (CLDs HPAQ92E5E,TKTR90455/QAR 49011) (Patch ID: OSF410-400100) ******** This patch prevents a "kernel memory fault" in the bread() routine while performing sync operations. The stack trace will look similar to the following: 0 boot() ["../../../../src/kernel/arch/alpha/machdep.c"] 1 panic("kernel memory fault") ["../../../../src/kernel/bsd/subr_prf.c"] 2 trap() ["../../../../src/kernel/arch/alpha/trap.c"] 3 _XentMM() ["../../../../src/kernel/arch/alpha/locore.s"] 4 bread() ["../../../../src/kernel/vfs/vfs_bio.c"] 5 iupdat() ["../../../../src/kernel/ufs/ufs_inode.c"] 6 ufs_sync() ["../../../../src/kernel/ufs/ufs_vfsops.c"; 7 sync() ["../../../../src/kernel/vfs/vfs_syscalls.c"] 8 syscall() ["../../../../src/kernel/arch/alpha/syscall_trap.c"] 9 _Xsyscall() ["../../../../src/kernel/arch/alpha/locore.s"] PROBLEM: (QAR 47666) (Patch ID: OSF410-405036) ******** Sometimes the system cannot contact a device when it should be able to. The problem is that if a device got a selection timeout, the EDT structure is released. The next time the system tries to access that device, it fails if the device does not respond within the timeout period. PROBLEM: (HPXQB6189/QAR 49949) (Patch ID: OSF410-400141) ******** This patch fixes a network socket problem with select() missing state changes on clients from non-write to writable. PROBLEM: (MCPM94D74, QAR 49067) (Patch ID: OSF410-400165) ******** Fixes system crash when setting the date for SMP systems. A representative stack trace follows: panic("resettodr: cpu not master") ["../../../../src/kernel/bsd/subr_prf.c":753,] resettodr() ["../../../../src/kernel/arch/alpha/clock.c":322,] setthetime() ["../../../../src/kernel/bsd/kern_time.c":543,] settimeofday() ["../../../../src/kernel/bsd/kern_time.c":499,] PROBLEM: (QAR 51688, CLD USG-04543) (Patch ID: OSF410-052) ******** The ObjectStore application from Object Design, Inc. fails with the following error: "Fatal error Invalid argument(errno = 22) munmap failed: cl_mmap:" PROBLEM: (USG-04536,51700) (Patch ID: OSF410-059) ******** Idle processes display poor interactive responsiveness. this patch prevents idle processes from being outswapped too soon. PROBLEM: (QAR 36779) (Patch ID: OSF410-405054) ******** This patch fixes a problem that occurs when running the NetWorker Version 4.2c application. The NetWorker application is unable to reset the atime (access time) attribute on files being accessed. No errors or warnings are displayed. Without this patch, NetWorker Version 4.2c will not perform well. PROBLEM: (HPXQB6BA4) (Patch ID: OSF410-062) ******** This patch fixes a problem in which the user or system setting of UAC_NOPRINT is ignored when an unaligned access trap is taken on a user address while in kernel mode. When this is a common event due to a customer application, the console and "messages" file can be flooded with error messages of the sort show below: Oct 19 03:20:18 dekalb vmunix: Unaligned kernel access va=0x140018554 pc=0xfffff c00004f5f24 ra=0xfffffc000025bc80 inst=0xffffffff PROBLEM: (QAR 49818) (Patch ID: OSF410-400127) ******** System panics with messgae: "vm_map_swapout: negative resident count". The crash will most likely occur on a multi-processor system during a heavy paging load. panic("vm_map_swapout: negative resident count") vm_map_swapout() task_swapout() task_swapout_thread() PROBLEM: (CLD MCPMB7DEJ, QAR 50938) (Patch ID: OSF410-400197) ******** This patch resolves a kernel memory fault. A representative stack trace follows: panic("kernel memory fault") ["../../../../src/kernel/bsd/subr_prf.c":753, ] trap() ["../../../../src/kernel/arch/alpha/trap.c":1457, ] _XentMM() ["../../../../src/kernel/arch/alpha/locore.s":1392, ] simple_lock_D() ["../../../../src/kernel/arch/alpha/lockprim.s":730, ] u_anon_dupmcopy() ["../../../../src/kernel/vm/u_mape_anon.c":1603, ] u_anon_dupmcopy() ["../../../../src/kernel/vm/u_mape_anon.c":1603, ] u_anon_dup() ["../../../../src/kernel/vm/u_mape_anon.c":1321, ] u_map_copyin() ["../../../../src/kernel/vm/vm_umap.c":2085, ] vm_map_copyin() ["../../../../src/kernel/vm/vm_map.c":1691, ] procfs_psinfo() ["../../../../src/kernel/procfs/procfs_subrs.c":2425, ] procfs_ioctl() ["../../../../src/kernel/procfs/procfs_ioctl.c":301, ] vn_ioctl() ["../../../../src/kernel/vfs/vfs_vnops.c":1165, ] procfs_ioctl_interface() ["../../../../src/kernel/procfs/procfs_ioctl.c":1716, ] ioctl_base() ["../../../../src/kernel/bsd/sys_generic.c":426, ] ioctl() ["../../../../src/kernel/bsd/sys_generic.c":374, ] PROBLEM: (QAR 51161, QAR 51813) (Patch ID: OSF410-063) ******** This patch corrects problems encountered when using signals with multi-thread programs. Specifcally, three problem may be encountered, all of them usually resulting in an application hang: 1. Missed thread-specific signals. These are signal sent via the pthread_kill() function. Under extremely intensive use, a signal sent by pthread_kill() can be lost. This will usually manifest itself as an application hang, as expected signal goes unreceived. 2. Inconsistent compute-bound hangs in the libpthreads.so. Typically, a stack trace for such a hang would have the following mutex-related frames at the top of its stack: 0 pthread_mutex_unblock() 1 __pthread_mutex_unlock() 2 (unknown)() 3 free() . . . The frames below the mutex frames could be any routine that calls pthead_mutex_unlock(). 3. Unexpected error return from system calls. When using process-level signals, certain system calls may return unexpectedly with an EINTR error without a signal actually having been delivered. Typcial victims of this problem are are the sigwait() and read() functions. Particularly in the case of read(), an application is likely to reissue the system call without noticiing the error, resulting in a compute-bound loop. PROBLEM: (EVT101963, QAR 52024) (Patch ID: OSF410-405062) ******** The kernel panics with a "kernel memory fault". Typical stack traces will panic in either vm_zeroed_pg_alloc() or vm_pg_alloc() as shown below: > 0 boot src/kernel/arch/alpha/machdep.c : 2361 1 panic src/kernel/bsd/subr_prf.c : 791 2 trap src/kernel/arch/alpha/trap.c : 1457 3 _XentMM src/kernel/arch/alpha/locore.s : 1388 4 vm_zeroed_pg_alloc src/kernel/vm/vm_resident.c : 1289 5 vm_anon_page_alloc src/kernel/vm/vm_anonpage.c : 119 6 anon_pagezero_alloc src/kernel/vm/vm_anon.c : 448 7 u_anon_faultpage src/kernel/vm/u_mape_anon.c : 968 8 u_anon_fault src/kernel/vm/u_mape_anon.c : 861 9 u_map_fault src/kernel/vm/vm_umap.c : 501 10 vm_fault src/kernel/vm/vm_fault.c : 134 11 trap src/kernel/arch/alpha/trap.c : 1467 12 _XentMM src/kernel/arch/alpha/locore.s : 1388 > 0 stop_secondary_cpu src/kernel/arch/alpha/cpu.c : 414 1 panic src/kernel/bsd/subr_prf.c : 703 2 event_timeout src/kernel/arch/alpha/cpu.c : 811 3 xcpu_puts src/kernel/bsd/subr_prf.c : 844 4 printf src/kernel/bsd/subr_prf.c : 379 5 panic src/kernel/bsd/subr_prf.c : 753 6 trap src/kernel/arch/alpha/trap.c : 1457 7 _XentMM src/kernel/arch/alpha/locore.s : 1388 8 vm_pg_alloc src/kernel/vm/vm_resident.c : 1162 9 ubc_alloc src/kernel/vfs/vfs_ubc.c : 3278 10 ubc_page_alloc src/kernel/vfs/vfs_ubc.c : 2240 11 ubc_lookup src/kernel/vfs/vfs_ubc.c : 1779 12 page_lookup src/kernel/msfs/bs/bs_buffer2.c : 1041 13 seq_ahead src/kernel/msfs/bs/bs_buffer2.c : 5258 14 seq_ahead_cont src/kernel/msfs/bs/bs_buffer2.c : 5013 15 bs_refpg_int src/kernel/msfs/bs/bs_buffer2.c : 1867 16 bs_refpg src/kernel/msfs/bs/bs_buffer2.c : 1596 17 fs_read src/kernel/msfs/fs/fs_read_write.c : 1549 18 msfs_read src/kernel/msfs/osf/msfs_vnops.c : 1883 19 vn_read src/kernel/vfs/vfs_vnops.c : 864 20 rwuio src/kernel/bsd/sys_generic.c : 1217 21 read src/kernel/bsd/sys_generic.c : 1167 22 syscall src/kernel/arch/alpha/syscall_trap.c : 540 23 _Xsyscall src/kernel/arch/alpha/locore.s : 1173 PROBLEM: (QAR 50693, QAR 49421) (Patch ID: OSF410-400216) ******** This patch corrects a problem with the exec() system function. A shell script that has "#! " as the first line of the script, invokes the program but does not set the effective user id for the execution of the program. For example: $ cat myprog.c #include main() { printf("geteuid() return effective user ID of the calling process=%d\n",geteuid()); } $ cat test.sh #!./myprog echo "done with myprog" As root: # chmod 4755 myprog # chown root myprog As user ww $ ./myprog geteuid() return effective user ID of the calling process=0 $ ./test.sh geteuid() return effective user ID of the calling process=7301 In this case ./test.sh should return an euid of 0. PROBLEM: (CLD EVT101664) (Patch ID: OSF410-400232) ******** This patch fixes a performance problem that occurs with UFS file systems. Data written to a file greater than 32 GB in length will be slower than data written to the file when it is less than 32 GB in length. PROBLEM: (HPAQC07YV) (Patch ID: OSF410-400208) ******** This patch fixes a problem that occurs when the system panics with the following error message: kernel memory fault The following is a typical stack trace of the system panic: 0 boot() [../../../../src/kernel/arch/alpha/machdep.c] 1 panic("kernel memory fault") [../../../../src/kernel/bsd/subr_prf.c] 2 trap() [../../../../src/kernel/arch/alpha/trap.c] 3 _XentMM() [../../../../src/kernel/arch/alpha/locore.s] 4 _svcauth_unix() [../../../../src/kernel/rpc/svc_auth_unix.c] 5 _authenticate() [../../../../src/kernel/rpc/svc_auth.c] 6 nfs_rpc_recv() [../../../../src/kernel/rpc/svc.c] 7 nfs_rpc_input() [../../../../src/kernel/rpc/svc.c] 8 nfs_input() [../../../../src/kernel/nfs/nfs_server.c] 9 nfs_thread() [../../../../src/kernel/nfs/nfs_server.c] PROBLEM: (QAR 50697, MGO102332, FNO100130) (Patch ID: OSF410-400198) ******** This patch fixes a number of problems relating to signals and POSIX 1003.1b timers in multi-threaded programs running on multi-processor systems. These problems can result in missed timer-expiration signals and system crashes. These issues involve synchronizing timer creation, timer deletion, and timer reset within multi-threaded programs. Two distinct crashes are typical of the problems. Here's a sample of the first crash, a signal panic: panic (cpu 0): psig: catch not set With the following stack trace: > 0 boot 1 panic 2 psig 3 syscall 4 _Xsyscall A sample of the second crash is shown in the following example: from vmcore.3 : . . . simple_lock: time limit exceeded . . . pc of caller: 0xfffffc000024a5a4 lock address: 0xfffffc003d93b210 current lock state: 0x000000000043af85 (cpu=0,pc=0xfffffc000043af84,busy) . . . panic (cpu 2): simple_lock: time limit exceeded While a stack trace would show: kernel stack of CPU 0 > 0 boot 1 panic 2 event_timeout 3 simple_lock_miss 4 netisr_timeout 5 softclock_scan 6 lwc_schedule 7 thread_preempt 8 boot 9 panic 10 cpu_ip_intr 11 _XentInt 12 swap_ipl_preempt_check 13 wanTimerSysTick . . . kernel stack of CPU 1 > 0 stop_secondary_cpu ... 1 panic : 2 cpu_ip_intr : THIS PART OF THE KERNEL STACK 3 _XentInt : IS VERY TYPICAL FOR THIS CLASS 4 sigq_enqueue_tail : OF CRASHES. 5 psignal_internal : 6 psx4_tod_expire_sig ..: 7 psignal_lwc 8 lwc_schedule 9 do_preemption 10 simple_unlock_preempt 11 sigwaitprim 12 syscall 13 _Xsyscall . . . kernel stack of CPU 2 > 0 stop_secondary_cpu 1 panic 2 event_timeout 3 xcpu_puts 4 printf 5 panic 6 simple_lock_fault 7 simple_lock_time_violation 8 psx4_set_todtimer 9 syscall 10 _Xsyscall . . . kernel stack of CPU 3 > 0 stop_secondary_cpu 1 panic 2 cpu_ip_intr 3 _XentInt 4 swap_ipl_preempt_check 5 netisr_thread 6 wanTimerTick . . . This patch closes MP race conditions for multi-threaded use of POSIX timers and signals. PROBLEM: (MCPMA986D) (Patch ID: OSF410-405044) ******** This patch is a kernel fix for network sockets left in FIN_WAIT_1 state forever. This patch contains a "tunable" kernel parameter. It is recommended that only experienced system administrators attempt to set this parameter from the default value. How to recognize this problem. This is an example of the problem with tcpdump running in the background listening on the destination ip address shown in the netstat output. # netstat -An | grep 203.232.10.221 Active Internet connections PCB Proto Recv-Q Send-Q Local Address Foreign Address (state) 94276c00 tcp 0 759 192.86.154.82.80 203.232.10.221.162 FIN_WAIT_1 9418ef00 tcp 0 759 192.86.154.82.80 203.232.10.221.162 FIN_WAIT_1 13:28:03.472384 www-2.us.oracle.com.80 > 203.232.10.221.1626: . 0:1(1) ack 1 win 33232 13:28:12.973072 www-2.us.oracle.com.80 > 203.232.10.221.1623: . 0:1(1) ack 1 win 33232 What is observed here is the destination is clearly dead. The source is sending an ACK to the destination looking for his ACK of our FIN. This is commonly refered to as "persist mode". A socket in this state will never timeout and system resources associated with it will not be released. The new kernel modification to tcp_timer.o can be "tuned" by dbx'ing the tcp_keepidle parameter on the system. By default, this is set to 14400 1/2 seconds (2 hours). It can be easily set to any value appropriate for the system to "balance" the number of sockets in FIN_WAIT_1 state at any time. The system may always have some sockets in FIN_WAIT_1 as well as CLOSE_WAIT, this is NORMAL. What you don't want is a large number of sockets in FIN_WAIT_1 forever. It is not recommended that tcp_keepidle be set to less than 5 minutes on the system. Reference the man page to dbx for guidelines when using the dbx command. PROBLEM: (ZUO101015/QAR 49750) (Patch ID: OSF410-405053) ******** This patch fixes ICMP REDIRECTS. When an ICMP REDIRECT is received, the routing table was updated properly, but the IP layer didn't use the new route information. PROBLEM: (CLD MCPMB04E3) (Patch ID: OSF410-405059) ******** This patch resolves a TCP/IP network hang due to an IP Q ACK deadlock. When this condition occurs the IP Q becomes full due to saturation. Representative console messages indicating this condition are shown below: SIS00-00-root: IP q full, 315617 packets dropped in the last 5 mins. PROBLEM: (CA7Q10994) (Patch ID: OSF410-049) ******** This patch fixes a problem that occurs on all systems that use networking services. The problem can be seen when a system attempts to ping a Digital UNIX Alpha system connected to a token ring network and the ping uses a message size that requires fragmentation. The Digital UNIX Alpha system receiving the ping cannot respond. The token ring driver displays the following error message to the console and resets the token ring adapter: List Error in transmit PROBLEM: (HPXQB4C4B) (Patch ID: OSF410-400186) ******** This patch fixes a problem in which the system can panic with "lock already owned by thread". A typical stack trace shows: boot panic lock_fault lock_write solock socket_send ip_mforward ip_output rip_output raw_usrreq rip_usrreq sosend sendit sendto syscall PROBLEM: (CLD MCPMB04E3) (Patch ID: OSF410-400233) ******** This patch resolves a TCP/IP network hang due to an IP Q ACK deadlock. When this condition occurs the IP Q becomes full due to saturation. Representative console messages indicating this condition are shown below: SIS00-00-root: IP q full, 315617 packets dropped in the last 5 mins. PROBLEM: (CLD: MCPM3028N) (Patch ID: OSF410-400250) ******** This patch fixes a problem in which network applications communicating to one of the host's own addresses, may hang, or receive the error message: no buffer space available The problem occurs due to a queue full condition on the interface. In an Available Server (ASE) or TruCluster environment, the daemons will no longer be able to communicate with each other, and the asemgr utility will appear to hang. PROBLEM: (MCPMC07S7) (Patch ID: OSF410-400201) ******** This patch fixes a kernel memory fault in ether_output packet filter, when running tcpdump. A representative stack trace of the 'tcpdump' process following: read_io_port() src/kernel/io/dec/pci/pcia.c : 707 fta_poll_cmd_req() src/kernel/io/dec/netif/if_fta.c : 3065 ftaioctl() src/kernel/io/dec/netif/if_fta.c : 1831 enetSetIfflags() src/kernel/net/pfilt.c : 3311 decCopyAllCount() src/kernel/net/pfilt.c : 3367 Pfilt_close() src/kernel/net/pfilt.c : 1376 speclose() src/kernel/vfs/spec_vnops.c : 2486 spec_close() src/kernel/vfs/spec_vnops.c : 2616 ufsspec_close() src/kernel/ufs/ufs_vnops.c : 3632 vn_close() src/kernel/vfs/vfs_vnops.c : 1280 closef() src/kernel/bsd/kern_descrip.c : 1539 close() src/kernel/bsd/kern_descrip.c : 1217 PROBLEM:(CLD HPXQ87202,QAR 49448,QAR 49474,QAR 49475) (Patch ID: OSF410-400242) ******** This patch fixes a problem in which the the lastcomm accounting command doesn't print the "S" flag at appropriate times. This patch also improves the performance of lastcomm. The problem was that the kernel did not properly update the accounting field that prints the "S" flag. The "S" flag should be printed for each command that is run with an effective user id of 0. Commands that are set-user-id to root, will print the "S" flag. Also, commands that are executed by root, but are not set-user-id, will print the "S" flag. Therefore, when "S" is printed from lastcomm for a certain command, it means that the user had root privileges at some time during the execution of the command. The algorithm used by lastcomm has been enhanced to improve its performance. PROBLEM: (HGOBB0043, HGOBB0597) (Patch ID: OSF410-405045) ******** Intermittently, the probe of an isp will fail during a boot. This happens maybe once in 20 system boots, so a workaround is to try the boot again. A typical console listing looks like this when it fails: . . . Created FRU table configuration errorlog packet tiop0 at tlsb0 node 8 tiop0: cpu interrupt mask being set as 1. pci0 at tiop0 slot 0 isp0 at pci0 slot 0 isp0: QLOGIC ISP1020 - Differential Mode cam_logger: CAM_ERROR packet cam_logger: bus 0 isp_mailbox complete Timeout on mailbox command completion scheduling chip reinit cam_logger: CAM_ERROR packet cam_logger: bus 0 isp_init Mailbox operations not functional for common init cam_logger: CAM_ERROR packet cam_logger: bus 0 isp_probe Common init failure - Failing probe isp0: Not probed. isp in slot 0 not configured. . . . PROBLEM: (Patch ID: OSF410-068) ******** This network patch, which greatly improves Digital UNIX networking performance is targeted at high traffic Web server systems or any system which handles a large number of TCP connections simultaneously, ie. more than several thousand at one time. The summary of improvements include: Network kernel SMP locking improvements Increased throughput due to reduced lock contention throughout network stack on multi-processor (SMP) systems Socket code improvements Improved performance in socket listen queue handling somaxconn, sominconn listen backlog support was increased from 32K to 64K maximum TCP code improvements Fully dynamic TCP hash table, can change size on the fly without having to reboot (tcbhashsize) support for TCP hash table size larger than 1024 (tcbhashsize) improved TCP timer algorithm eliminates a large percentage of the processing overhead needed to handle the tcp timer task more efficient port allocation code decreases outgoing connection overhead (ipport_userreserved) randomized TCP initial sequence number IP reassembly fix for >12Gb memory systems and other minor TCP/IP bug fixes Kernel malloc improvements Improved kernel malloc pool performance on SMP platforms Kernel select improvements Improved kernel select performance on SMP platforms when many open file descriptors are selected simultaneously Additional kernel network tunable variables (using sysconfig): sobacklog_drops sobacklog_hiwat somaxconn_drops ipport_userreserved tcp_rexmit_interval_min tcp_cwnd_segments tcp_keepalive_default PROBLEM: (QAR 50363) (Patch ID: OSF410-400235) ******** This patch fixes a problem with the fsck command. When fsck is run on a a non-existent file system or on a currently mounted file system, it returns a success status of zero. It should return a non-zero status. An example where this problem is exhibited is shown here: # fsck /dev/rz2a /sbin/ufs_fsck /dev/rz2a ** /dev/rrz2a Error: /dev/rrz2a or an overlapping partition is open. FSCK CANNOT BE RUN ON AN ACTIVE FILESYSTEM. # echo $? 0 ALSO: # fsck /mnt /sbin/ufs_fsck /mnt Can't make sense out of name /mnt # echo $? 0 PROBLEM: (QAR 46424) (Patch ID: OSF410-400221) ******** This patch fixes a problem in which the UFS property list can become corrupted To reproduce this problem, complete the following steps: 1. Create a relatively large property value on a file. 2. Create another property value on the same file. B 3. Change the property value created in Step 1 to a smaller value. 4. Run fsck with the -o flag. The fsck command reports that the file system is corrupted and displays the following error message: ** Phase 1 - Check Blocks and Sizes PROPERTY LIST BLOCK CORRUPTED I=3 CLEAR? [yn] PROBLEM: (TKTB68852) (Patch ID: OSF410-405068) ******** This patch fixes a performance regression that may occur as a result of v4.0b patch OSF410-405045. To date this performance regression has been reported only on the Noritake platform and on the single-ended KZPBA adapter used on the Rawhide platform. This patch also implements HSZ70 support for those system that have the hardware installed. PROBLEM: (MCPM11KK6) (Patch ID: OSF410-405058-1) ******** This patch provides support for the fuser utility. This utility displays a list of processes that are holding references to a file on the file system that cannot be unmounted. This utility can also be used to terminate a process so the file system can be unmounted. PROBLEM: (QAR 50695) (Patch ID: OSF410-070) ******** This patch fixes a problem that prevents an "options DCEDFS" line from being added to the kernel configuration file. Without the fix, the kernel build will fail with the error "ld: dcedfs.mod: setjmp: multiply defined". PROBLEM: (QAR 49023) (Patch ID: OSF410-400130) ******** A "panic: lock_read: hierarchy violation in del_dealloc_stg" error occurs when a socket lock is held by a UNIX domain while calling vrele(). PROBLEM: (MGO102810/QAR 49847) (Patch ID: OSF410-074) ******** This patch is an enhanced fix to the solockpair() routine. This fix was needed because the routine was freeing a socket lock structure that was concurrently spun upon in lock_write(). Typical problem symptoms include kernel memory faults with sockets, mbufs and mblocks as well as hangs. Applications using sockets in a multi-threaded, multi-cpu environment can experience a number of lock violations with the socket structures. This patch is MANDATORY to install on all systems. It will be effective on Uniprocessor systems when lockmode debugging is invoked. PROBLEM: (EVT102135, HPAQ50J6Z, SQO100374, MCPM50UKH, EVT102245, ******** KAOB6KRMX, QAR 52779, QAR 52525) (Patch ID: OSF410-085) This is a mandatory patch for the following systems and conditions: - Systems that use program debuggers such as TotalView, Ladebug, dbx, or gdb. - Systems that use the /proc file system in any other way (for example, the System V Environment ps command). - Systems that experience panics and hangs in the /proc file system. The most common panic string is "kernel memory fault"; also seen are "simple_lock time limit exceeded" panics. In all cases, a routine with the string "procfs_" will appear in the kernel stack trace. - Systems that panic when running multi-threaded programs that call an exec() function. Hangs usually involve either the debugger or debugged process or both entering the unkillable "U" state, as seen from the ps command. The hangs may be either quiescent or compute bound. Other symptoms involve "" processes be left behind after a debugging session is terminated. This patch is particularly important for debugging in a multi-threaded enviroment on multi-processor systems. The greater the concurrency of the program being debugged, and the greater the number of processors, the more likely problems are to occur. PROBLEM: (ISO100331) (Patch ID: OSF410-085) ******** A muli-threaded program that calls an exec() function can panic the system with a kernel memory fault. A typical stack trace looks like this: 0 boot() 1 panic("kernel memory fault") 2 trap() 3 _XentMM() 4 nxm_upcall() 5 trap() 6 _Xsyscall() The critical feature of the stack trace is the presence of the nxm_upcall() function prior to the kernel memory fault. The crash dump will show that the thread is in process of processing an thread-block notification system trap. PROBLEM: (ZPOB91873, HGOBB0092) (Patch ID: OSF410-405067) ******** This patch provides additional details for hard errors logged after unsuccessful I/O recovery attempts, and provides informational messages on the progress of recovery events. PROBLEM: (EVT102039) (Patch ID: OSF410-405098) ******** This patch fixes a problem that occurs when using real-time applications. When writing large (sequential) files to a UFS file system, time constraints associated with the application may be violated. This problem can occur due to draining a large number of sequential pages associated with the file. This draining occurs when the application requests a new page AND the number of sequential pages exceeds a prescribed limit (which is user-tuneable). The time limit constraint of the application may be violated when the VM subsystem frees these excess pages. PROBLEM: ( QAR 51581 ) (Patch ID: OSF410-400245) ******** Fixes a panic that prints "kernel memory fault". A typical stack trace is: 1 panic("kernel memory fault") 2 trap() [src/kernel/arch/alpha/trap.c] 3 _XentMM() [src/kernel/arch/alpha/locore.s] 4 bcopy() [src/kernel/arch/alpha/fastcopy.s] 5 volkiocopyin() [src/kernel/lsm/dec/kiosubr.c] 6 volsio_stabilize() [src/kernel/lsm/common/stable.c] 7 vol_mv_write_start() [src/kernel/lsm/common/mvio.c] 8 volkiostart() [src/kernel/lsm/common/kiostart.c] 9 volstrategy() [src/kernel/lsm/dec/voldev.c] 10 physio() [src/kernel/ufs/ufs_physio.c] 11 physiock() [src/kernel/lsm/dec/Space.c] 12 volrdwr() [src/kernel/lsm/dec/voldev.c] 13 volwrite() [src/kernel/lsm/dec/voldev.c] 14 spec_write() [src/kernel/vfs/spec_vnops.c] 15 msfsspec_write() [src/kernel/msfs/osf/msfs_vnops.c] 16 vn_write() [src/kernel/vfs/vfs_vnops.c] 17 rwuio() [src/kernel/bsd/sys_generic.c] 18 write() [src/kernel/bsd/sys_generic.c] 19 syscall() [src/kernel/arch/alpha/syscall_trap.c] 20 _Xsyscall() [src/kernel/arch/alpha/locore.s] PROBLEM: (CLD FNO100138) (Patch ID: OSF410-400266) ******** This patch fixes a 'recursion count overflow' panic that occurs on Digital UNIX. Representative Stack trace: panic ("lock_set_recursive: recursion count overflow") src/kernel/bsd/subr_prf.c : 791 lock_fault() src/kernel/kern/lock.c : 2003 lock_set_recursive() src/kernel/kern/lock.c : 1444 makenfs3node() src/kernel/nfs/nfs_subr.c : 1722 nfs3_lookup() src/kernel/nfs/nfs3_vnodeops.c : 2157 namei() src/kernel/vfs/vfs_lookup.c : 593 stat1() src/kernel/vfs/vfs_syscalls.c : 2801 stat() src/kernel/vfs/vfs_syscalls.c : 2769 PROBLEM: (CLD FNO100139) (Patch ID: OSF410-400289) ******** When a directory path on an NFS server is deleted, any process attempting to access the missing path will cause NFS stale file handle messages to be printed on the server's console. This patch will greatly reduce the number of these messages. PROBLEM: (CLD MCPM403TL, QAR 48048) (Patch ID: OSF410-400296) ******** This patch fixes a problem with the "ifconfig -a" command. At times, the command will not display all of the network interfaces. PROBLEM: (QAR 49164) (Patch ID: OSF410-400298) ******** This patch adds a mechanism to the poll() system call to allow it to be used as a timer by passing in a null argument for the number of file descriptors. Currently the poll() system call will return immediately when passed a null argument for the number of file descriptors. PROBLEM: (Patch ID: OSF410-400351) ******** This patch fixes a problem in which panics will occur if an attempt is made to run a shell script residing on any filesystem mounted with the "noexec" option. The panic message is "kernel memory fault" and the kernel stack trace obtained from the resulting dump is of the following form: 0 boot 1 panic ("kernel memory fault") 2 trap 3 exec_setuid 4 common_exec 5 execve 6 syscall 7 _Xsyscall PROBLEM: ( CLD UTO101199, HPAQ30ETE, QAR 51485, 52365) (Patch ID: OSF410-087) ******** This patch corrects a problem with an NFS V3 mounted AdvFS file system where under heavy I/O load, data being written to a file may be lost. Additionally, because file stats are not being saved, the file modification time may revert to a previous value. FILE(s): /usr/sbin/audit_tool subset OSFBASE410 CHECKSUM: 29601 168 RCSfile: audit_tool.c RCS: 1.1.30.2 /sys/BINARY/arch_alpha.mod subset OSFHWBIN410 CHECKSUM: 46016 444 /sys/BINARY/arch_alphapmap.mod subset OSFHWBIN410 CHECKSUM: 62847 181 /sys/BINARY/cam.mod subset OSFHWBIN410 CHECKSUM: 53174 416 /sys/BINARY/cam_disk.mod subset OSFHWBIN410 CHECKSUM: 12194 291 /usr/sys/include/io/cam/cam_disk.h subset OSFBINCOM410 CHECKSUM: 05627 27 RCSfile: cam_disk.h RCS: 1.1.62.2 /sys/BINARY/cam_isp1020.mod subset OSFHWBIN410 CHECKSUM: 23196 98 /sys/BINARY/cam_sim.mod subset OSFHWBIN410 CHECKSUM: 03476 192 /usr/bin/lastcomm subset OSFBASE410 CHECKSUM: 07525 24 RCSfile: lastcomm.c RCS: 4.2.20.2 /usr/sys/include/io/cam/qlogic/isp1020.h subset OSFBINCOM410 CHECKSUM: 59913 43 RCSfile: isp1020.h RCS: 1.1.80.3 /usr/sys/include/io/cam/ccfg.h subset OSFBINCOM410 CHECKSUM: 26623 11 RCSfile: ccfg.h RCS: 1.1.21.2 /usr/sys/include/sys/fcntl.h subset OSFBINCOM410 CHECKSUM: 17491 10 RCSfile: fcntl.h RCS: 4.2.46.3 /usr/sys/include/sys/fcntl1.h subset OSFBINCOM410 CHECKSUM: 18748 3 RCSfile: fcntl1.h RCS: 1.1.2.2 /usr/sys/include/io/cam/sim.h subset OSFBINCOM410 CHECKSUM: 62806 35 RCSfile: sim.h RCS: 1.1.61.2 /sys/BINARY/ether.mod subset OSFBIN410 CHECKSUM: 14908 133 /sys/BINARY/ffm_fs.mod subset OSFBIN410 CHECKSUM: 02865 24 /sys/BINARY/inet.mod subset OSFBIN410 CHECKSUM: 22361 283 /sys/BINARY/loop.mod subset OSFBIN410 CHECKSUM: 27060 15 /sys/BINARY/nfs.mod subset OSFBIN410 CHECKSUM: 15796 424 /sys/BINARY/nfs_server.mod subset OSFBIN410 CHECKSUM: 12310 279 /usr/sys/include/ufs/fs_proto.h subset OSFBINCOM410 CHECKSUM: 39564 12 RCSfile: fs_proto.h RCS: 1.1.30.2 /usr/sys/include/ufs/inode.h subset OSFBINCOM410 CHECKSUM: 49905 13 RCSfile: inode.h RCS: 4.3.39.2 /usr/sys/include/sys/siginfo.h subset OSFBINCOM410 CHECKSUM: 65468 12 RCSfile: siginfo.h RCS: 1.1.32.2 /usr/sys/include/sys/signal.h subset OSFBINCOM410 CHECKSUM: 14670 25 RCSfile: signal.h RCS: 4.3.29.5 /usr/sys/include/sys/syscall.h subset OSFBINCOM410 CHECKSUM: 38984 7 /usr/sys/include/sys/time.h subset OSFBINCOM410 CHECKSUM: 08607 9 RCSfile: time.h RCS: 4.4.46.2 /usr/sys/kern/lockinfo.c subset OSFBINCOM410 CHECKSUM: 15363 96 RCSfile: lockinfo.c RCS: 1.1.346.3 /sys/BINARY/notprocfs.mod subset OSFBIN410 CHECKSUM: 53961 94 /usr/sys/BINARY/init_main.o subset OSFBIN410 CHECKSUM: 54811 95 RCSfile: init_main.c RCS: 4.3.231.2 /usr/sys/procfs/procfs_subrs_stubs.c subset OSFBINCOM410 CHECKSUM: 11961 3 RCSfile: procfs_subrs_stubs.c RCS: 1.1.21.2 /sys/BINARY/presto.mod subset OSFBIN410 CHECKSUM: 32549 148 /sys/BINARY/procfs.mod subset OSFBIN410 CHECKSUM: 18119 193 /sys/BINARY/re_xcr.mod subset OSFHWBIN410 CHECKSUM: 58541 66 /sys/BINARY/socket.mod subset OSFBIN410 CHECKSUM: 02540 3 /sys/BINARY/std_kern.mod subset OSFBIN410 CHECKSUM: 01512 1102 /sys/BINARY/ufs.mod subset OSFBIN410 CHECKSUM: 00723 325 /sbin/ufs_fsck subset OSFBASE410 CHECKSUM: 32963 472 /usr/sbin/ufs_fsck subset OSFBASE410 CHECKSUM: 09825 104 /sys/BINARY/uipc.mod subset OSFBIN410 CHECKSUM: 65310 21 /sys/BINARY/vfs.mod subset OSFBIN410 CHECKSUM: 46499 416 /usr/sys/vfs/vfs_conf.c subset OSFBINCOM410 CHECKSUM: 46207 11 i RCSfile: vfs_conf.c RCS: 4.2.52.3 /sys/BINARY/vm.mod subset OSFBIN410 CHECKSUM: 35897 425 /usr/sbin/ifconfig subset OSFCLINET410 CHECKSUM: 25597 40 /sbin/ifconfig subset OSFCLINET410 CHECKSUM: 39745 40 /usr/sys/include/arch/alpha/nxm.h subset OSFBINCOM410 CHECKSUM: 29282 8 RCSfile: nxm.h RCS: 1.1.16.2 /usr/sys/include/net/proto_uipc.h subset OSFBINCOM410 CHECKSUM: 10799 10 RCSfile: proto_uipc.h RCS: 4.2.31.2 /usr/sys/include/arch/alpha/pal.h subset OSFBINCOM410 CHECKSUM: 10592 4 /usr/sys/include/sys/procfs.h subset OSFBINCOM410 CHECKSUM: 12489 30 RCSfile: procfs.h RCS: 1.1.32.4 /usr/sys/include/procfs/procfs.h subset OSFBINCOM410 CHECKSUM: 12489 30 RCSfile: procfs.h RCS: 1.1.32.4 /usr/sys/include/procfs/procfs_l.h subset OSFBINCOM410 CHECKSUM: 17730 10 RCSfile: procfs_l.h RCS: 1.1.35.3 /usr/sys/include/sys/socket.h subset OSFBINCOM410 CHECKSUM: 16777 17 RCSfile: socket.h RCS: 4.2.35.2 /usr/sys/include/sys/socketvar.h subset OSFBINCOM410 CHECKSUM: 13947 15 RCSfile: socketvar.h RCS: 4.2.54.3 /usr/sys/include/netinet/tcp_var.h subset OSFBINCOM410 CHECKSUM: 55999 14 RCSfile: tcp_var.h RCS: 4.2.42.2 /usr/sys/include/netinet/tcp_timer.h subset OSFBINCOM410 CHECKSUM: 35982 8 RCSfile: tcp_timer.h RCS: 4.2.29.2 /usr/sys/include/netinet/ip_var.h subset OSFBINCOM410 CHECKSUM: 03575 10 RCSfile: ip_var.h RCS: 4.4.28.2 /usr/sys/include/netinet/proto_inet.h subset OSFBINCOM410 CHECKSUM: 37937 10 RCSfile: proto_inet.h RCS: 4.3.45.2 /usr/sys/include/netinet/in_pcb.h subset OSFBINCOM410 CHECKSUM: 57265 11 /usr/sys/include/net/if.h subset OSFBINCOM410 CHECKSUM: 46497 43 RCSfile: if.h RCS: 4.3.91.2 /usr/sys/include/sys/malloc.h subset OSFBINCOM410 CHECKSUM: 46851 18 RCSfile: malloc.h RCS: 1.1.58.2 /usr/sys/include/sys/user.h subset OSFBINCOM410 CHECKSUM: 20092 24 RCSfile: user.h RCS: 4.3.76.2 /usr/sys/BINARY/startup.o subset OSFHWBIN410 CHECKSUM: 35200 94 /usr/sys/BINARY/pmap_init.o subset OSFBIN410 CHECKSUM: 60689 13 =============================================================================== SUPERSEDED PATCHES: OSF410-400331 (219.00), OSF410-400331C (225.00) This patch corrects the following: - Allows customers to create hashed passwd databases from large passwd files by using a new option (-s) to the mkpasswd command. The -s option increases the block size of the database page file. PROBLEM: (Patch ID: OSF410-400331C) ******** When the /etc/passwd file is very large, a performance degradation may occur. When the number of passwd entries reaches up into the 30,000 to 80,000 range or greater, mkpasswd will sometimes fail to create a hashed (ndbm) database. Since the purpose of this database is to allow for efficient (fast) searches for passwd file information, failure to build it causes commands that rely on it to do a linear search of /etc/passwd. This results in a serious per- formance degradation for those commands. For customers choosing to use the mkpasswd -s option to avoid this type of failure, a potential database/binary compatibility problem may arise. If a customer application that accesses the password database created by mkpasswd is built statically (non-shared), that application will be unable to read from or write to the password database correctly. This would cause the customer application to fail either by generating incorrect results or by possibly dumping core. Any statically linked application would be affected if it directly or indirectly calls any of the libc ndbm routines documented in the ndbm(3) man page and then accesses the password database. To remedy this situation, the customer would need to re-link the application. Customers who do not use the mkpasswd -s option will not see this database/ binary compatibility problem. FILE(s): /usr/bin/admin subset OSFSCCS410 CHECKSUM: 14728 376 RCSfile: admin.c RCS: 4.2.7.2 /usr/bin/cdc subset OSFSCCS410 CHECKSUM: 02443 368 /usr/bin/comb subset OSFSCCS410 CHECKSUM: 38078 360 RCSfile: comb.c RCS: 4.2.5.2 /usr/bin/delta subset OSFSCCS410 CHECKSUM: 22520 376 RCSfile: delta.c RCS: 4.2.8.6 /usr/bin/get subset OSFSCCS410 CHECKSUM: 40466 384 RCSfile: get.c RCS: 4.2.9.5 RCSfile: catgets.c RCS: 4.2.10.3 RCSfile: fgets.c RCS: 4.2.10.2 RCSfile: getopt.c RCS: 4.2.9.2 RCSfile: getpasswd.c RCS: 1.1.13.3 RCSfile: gets.c RCS: 4.3.12.2 RCSfile: getwd.c RCS: 4.2.9.2 RCSfile: getenv.c RCS: 4.2.11.4 RCSfile: sia_getpass.c RCS: 1.1.17.6 RCSfile: getcwd.c RCS: 4.2.12.2 RCSfile: __getmbcurmax.c RCS: 1.1.7.2 RCSfile: siad_getpass.c RCS: 1.1.25.8 RCSfile: NLgetamsg.c RCS: 4.2.11.2 RCSfile: getcommon.c RCS: 4.2.21.2 RCSfile: getnetgrent.c RCS: 4.2.11.2 RCSfile: sia_getmsg.c RCS: 1.1.6.2 RCSfile: pmap_getport.c RCS: 4.2.20.2 RCSfile: getgroup.c RCS: 1.1.13.3 RCSfile: sia_getgroup.c RCS: 1.1.17.7 RCSfile: sia_get_grps.c RCS: 1.1.2.2 RCSfile: Ugetut.c RCS: 1.1.2.9 RCSfile: siad_getgrp.c RCS: 1.1.20.10 RCSfile: getgroup_r.c RCS: 1.1.13.3 RCSfile: getut.c RCS: 4.2.12.11 RCSfile: getline.c RCS: 4.2 /usr/sbin/lprsetup subset OSFPRINT410 CHECKSUM: 39661 424 RCSfile: lprsetup.c RCS: 4.2.14.4 /usr/bin/prs subset OSFSCCS410 CHECKSUM: 40936 384 RCSfile: prs.c RCS: 4.2.7.4 /usr/bin/rmdel subset OSFSCCS410 CHECKSUM: 00854 368 /usr/bin/sact subset OSFSCCS410 CHECKSUM: 43667 344 /usr/bin/sccs subset OSFSCCS410 CHECKSUM: 03092 344 RCSfile: sccs.c RCS: 4.2.8.4 /usr/bin/unget subset OSFSCCS410 CHECKSUM: 55892 344 RCSfile: unget.c RCS: 4.2.5.3 /usr/bin/val subset OSFSCCS410 CHECKSUM: 18818 360 RCSfile: val.c RCS: 4.2.5.3 =============================================================================== SUPERSEDED PATCHES: OSF410-400331-1 (219.01), OSF410-400331-2 (219.02), OSF410-400331D (228.00) This patch corrects the following: This patch allows the uusend voliod commands to work correctly when the customer builds a hashed passwd database using a non-default page file block size. PROBLEM: (Patch ID: OSF410-400331D) ******** This patch allows the uusend voliod commands to work correctly when the customer builds a hashed passwd database using a non-default page file block size. FILE(s): /sbin/voliod subset OSFLSMBASE410 CHECKSUM: 60774 336 RCSfile: voliod.c RCS: 1.1.8.4 ------ Note: ------ [51092] trunk/dports/java landonf at macports.org landonf at macports.org Sun May 17 15:15:11 PDT 2009 Previous message: [51091] trunk/dports/devel Next message: [51093] trunk/dports/gnome/gedit/Portfile Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] -------------------------------------------------------------------------------- Revision: 51092 http://trac.macports.org/changeset/51092 Author: landonf at macports.org Date: 2009-05-17 15:15:10 -0700 (Sun, 17 May 2009) Log Message: ----------- OpenJDK6 and supporting dependencies Added Paths: ----------- trunk/dports/java/icedtea6-plugs/ trunk/dports/java/icedtea6-plugs/Portfile trunk/dports/java/openjdk6/ trunk/dports/java/openjdk6/Portfile trunk/dports/java/openjdk6/files/ trunk/dports/java/openjdk6/files/patch-10.4-ucontext trunk/dports/java/openjdk6/files/patch-disable_test_gamma trunk/dports/java/openjdk6/files/patch-jdk_src_share_java.c trunk/dports/java/openjdk6/files/patch-jdk_src_solaris_javavm_include_typedefs__md.h trunk/dports/java/openjdk6/files/patch-jdk_src_solaris_native_common_gdefs__md.h trunk/dports/java/openjdk6/files/patch-jvm_base_addr trunk/dports/java/openjdk6/files/patch-null_word_intptr_t trunk/dports/java/openjdk6/files/patch-set trunk/dports/java/openjdk6_bootstrap/ trunk/dports/java/openjdk6_bootstrap/Portfile Added: trunk/dports/java/icedtea6-plugs/Portfile =================================================================== --- trunk/dports/java/icedtea6-plugs/Portfile (rev 0) +++ trunk/dports/java/icedtea6-plugs/Portfile 2009-05-17 22:15:10 UTC (rev 51092) @@ -0,0 +1,37 @@ +# $Id: $ + +PortSystem 1.0 + +name icedtea6-plugs +version 1.6b + +categories java +maintainers landonf openmaintainer +platforms darwin + +description GPL-licensed replacements for Sun's Java binary plugs. +long_description Icedtea is part of gnu classpath project and is an \ + implementation of the binary plugs, that Sun is unable to \ + release under the GNUv2 license. This in combination with \ + openjdk6 or openjdk7 makes a completely legally \ + distributable version of Java + +homepage http://icedtea.classpath.org/wiki/Main_Page + +distname jdk-7-icedtea-plugs-${version} + +master_sites http://www.intricatesoftware.com/distfiles/ +checksums md5 86e575da6209157b484d0e91e41cffc8 \ + sha256 016d64416bdfe1d66901d169b2d7eaaf40a1ef00aa1d9643bf5130399619d9a0 + +use_configure no + +worksrcdir jdk-7-icedtea-plugs + +build {} + +destroot { + set path "${destroot}${prefix}/share/java/${name}/jre/lib" + xinstall -m 755 -d ${path} + xinstall -m 644 ${worksrcpath}/jre/lib/rt-closed.jar ${path} +} Added: trunk/dports/java/openjdk6/Portfile =================================================================== --- trunk/dports/java/openjdk6/Portfile (rev 0) +++ trunk/dports/java/openjdk6/Portfile 2009-05-17 22:15:10 UTC (rev 51092) @@ -0,0 +1,134 @@ +# $Id: $ + +PortSystem 1.0 + +name openjdk6 +version b16 +set builddate 24_apr_2009 + +categories java +maintainers landonf openmaintainer +platforms darwin + +homepage http://openjdk.java.net/ +description Sun's java 6 virtual machine release under the GNUV2 license +long_description \ + OpenJDK is an open-source implementation of the Java Platform, Standard Edition. \ + The version has all of Sun's bug fixes up to JDK 6 Release 11 and should be \ + the runtime equivelent to JDK6 Release 11. \ + \ + Much of the OpenJDK code is licensed under the GPL version 2 with the \ + Classpath exception. The Java Hotspot virtual machine source code is \ + licensed under the GPL version 2 only. + +distname openjdk-6-src-${version}-${builddate} +master_sites http://download.java.net/openjdk/jdk6/promoted/${version}/ +checksums md5 850a29b70206bc7fa083cd26acc781f3 \ + sha256 96159489d8b70db275c125b627c6e6912e6c078279d76b968d2e0969359c9420 + +patchfiles patch-set \ + patch-null_word_intptr_t \ + patch-jdk_src_solaris_javavm_include_typedefs__md.h \ + patch-jvm_base_addr \ + patch-jdk_src_share_java.c \ + patch-jdk_src_solaris_native_common_gdefs__md.h \ + patch-10.4-ucontext \ + patch-disable_test_gamma + +use_configure no + +depends_lib port:freetype \ + port:openmotif \ + port:xorg-libX11 +depends_build port:icedtea6-plugs \ + port:apache-ant + +# Check if the boostrap is required +if {[file exists ${prefix}/share/java/openjdk6/bin/java]} { + # A previous OpenJDK6 release is already installed + set bootstrapvm "${prefix}/share/java/openjdk6" +} else { + # A bootstrap binary is required to build + depends_build-append port:openjdk6_bootstrap + set bootstrapvm "${prefix}/share/java/openjdk6_bootstrap" +} + +worksrcdir "./" + +post-extract { + set copydirs { \ + hotspot/src/os/linux/launcher \ + hotspot/src/os/linux/vm \ + hotspot/src/os_cpu/linux_x86/vm \ + hotspot/build/linux \ + hotspot/build/linux/makefiles \ + jdk/src/linux/doc/man + } + + set copyfiles { \ + corba/make/common/Defs-linux.gmk \ + corba/make/common/shared/Defs-linux.gmk \ + jdk/make/common/Defs-linux.gmk \ + jdk/make/common/shared/Defs-linux.gmk \ + jdk/make/java/nio/mapfile-linux \ + jdk/make/netbeans/common/architectures/name-Linux.properties \ + jdk/make/sun/awt/mapfile-vers-linux \ + jdk/make/tools/sharing/classlist.linux \ + jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux \ + jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.properties \ + jdk/src/solaris/classes/sun/tools/attach/LinuxAttachProvider.java \ + jdk/src/solaris/hpi/include/largefile_linux.h \ + jdk/src/solaris/native/java/net/linux_close.c \ + jdk/src/solaris/native/sun/tools/attach/LinuxVirtualMachine.c + } + + # Copy over original Linux sources + foreach src ${copydirs} { + set dest "${worksrcpath}/[strsed ${src} g/linux/bsd/]" + + # Create the parent directories + file mkdir "${dest}" + + # Copy the contents, adjust file contents + foreach srcfile [glob -types f "${worksrcpath}/${src}/*"] { + set destfile "${dest}/[strsed [file tail ${srcfile}] g/linux/bsd/]" + copy "${srcfile}" "${destfile}" + reinplace "s/linux/bsd/g; s/Linux/Bsd/g" "${destfile}" + reinplace "s/linux/bsd/g; s/Linux/Bsd/g" "${destfile}" + } + } + + foreach src ${copyfiles} { + set dest "${worksrcpath}/[exec echo ${src} | sed {s/linux/bsd/g; s/Linux/Bsd/g}]" + copy "${worksrcpath}/${src}" "${dest}" + reinplace "s/linux/bsd/g; s/Linux/Bsd/g" "${dest}" + } + + # Copy the solaris sources + copy "${worksrcpath}/jdk/src/solaris/hpi/native_threads/src/threads_solaris.c" \ + "${worksrcpath}/jdk/src/solaris/hpi/native_threads/src/threads_bsd.c" + reinplace "s/solaris/bsd/g; s/Solaris/Bsd/g" \ + "${worksrcpath}/jdk/src/solaris/hpi/native_threads/src/threads_bsd.c" + + + copy "${worksrcpath}/jdk/src/share/lib/security/java.security" \ + "${worksrcpath}/jdk/src/share/lib/security/java.security-openbsd" +} + +build.args \ + ALT_BOOTDIR="${bootstrapvm}" \ + ALT_BINARY_PLUGS_PATH="${prefix}/share/java/icedtea6-plugs/jre/lib/rt-closed.jar" \ + ANT_HOME="${prefix}/share/java/apache-ant" \ + ALT_FREETYPE_HEADERS_PATH="${prefix}/include" \ + ALT_FREETYPE_LIB_PATH="${prefix}/lib" \ + ALT_CUPS_HEADERS_PATH="/usr/include" \ + ALT_MOTIF_DIR="${prefix}" \ + ALT_X11_PATH="${prefix}" \ + NO_DOCS=true \ + HOTSPOT_BUILD_JOBS=[expr [exec sysctl -n hw.ncpu] - 1] + +destroot { + set path "${destroot}${prefix}/share/java/${name}/" + xinstall -m 755 -d ${path} + system "(cd ${worksrcpath}/build/bsd-i586/j2sdk-image && tar cf - *) | (tar -C ${path} -xf -)" +} Added: trunk/dports/java/openjdk6/files/patch-10.4-ucontext =================================================================== --- trunk/dports/java/openjdk6/files/patch-10.4-ucontext (rev 0) +++ trunk/dports/java/openjdk6/files/patch-10.4-ucontext 2009-05-17 22:15:10 UTC (rev 51092) @@ -0,0 +1,11 @@ +--- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp.orig 2009-05-17 13:52:42.000000000 -0700 ++++ hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2009-05-17 13:58:46.000000000 -0700 +@@ -111,7 +111,7 @@ + // 10.5 UNIX03 member name prefixes + #define DU3_PREFIX(s, m) __ ## s.__ ## m + # else +- #define DU3_PREFIX(s, m) s ## . ## m ++ #define DU3_PREFIX(s, m) s.m + # endif + + # ifdef AMD64 Added: trunk/dports/java/openjdk6/files/patch-disable_test_gamma =================================================================== --- trunk/dports/java/openjdk6/files/patch-disable_test_gamma (rev 0) +++ trunk/dports/java/openjdk6/files/patch-disable_test_gamma 2009-05-17 22:15:10 UTC (rev 51092) @@ -0,0 +1,31 @@ +--- hotspot/build/bsd/Makefile.orig 2009-05-15 12:12:31.000000000 -0700 ++++ hotspot/build/bsd/Makefile 2009-05-15 12:12:57.000000000 -0700 +@@ -245,28 +245,24 @@ + + $(TARGETS_C2): $(SUBDIRS_C2) + cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_TIERED): $(SUBDIRS_TIERED) + cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_C1): $(SUBDIRS_C1) + cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_CORE): $(SUBDIRS_CORE) + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install + endif Added: trunk/dports/java/openjdk6/files/patch-jdk_src_share_java.c =================================================================== --- trunk/dports/java/openjdk6/files/patch-jdk_src_share_java.c (rev 0) +++ trunk/dports/java/openjdk6/files/patch-jdk_src_share_java.c 2009-05-17 22:15:10 UTC (rev 51092) @@ -0,0 +1,12 @@ +diff -ru jdk.orig/src/share/bin/java.c jdk/src/share/bin/java.c +--- jdk.orig/src/share/bin/java.c 2009-05-15 01:02:24.000000000 -0700 ++++ jdk/src/share/bin/java.c 2009-05-15 01:10:27.000000000 -0700 +@@ -1144,7 +1144,7 @@ + printXUsage = JNI_TRUE; + return JNI_TRUE; + #ifdef __APPLE__ +- } else if (JLI_StrCmp(arg, "-XstartOnFirstThread") == 0) { ++ } else if (strcmp(arg, "-XstartOnFirstThread") == 0) { + continueInSameThread = JNI_TRUE; + #endif + /* Added: trunk/dports/java/openjdk6/files/patch-jdk_src_solaris_javavm_include_typedefs__md.h =================================================================== --- trunk/dports/java/openjdk6/files/patch-jdk_src_solaris_javavm_include_typedefs__md.h (rev 0) +++ trunk/dports/java/openjdk6/files/patch-jdk_src_solaris_javavm_include_typedefs__md.h 2009-05-17 22:15:10 UTC (rev 51092) @@ -0,0 +1,20 @@ +Only in jdk.orig/src/solaris/javavm/include: .typedefs_md.h.swp +diff -ru jdk.orig/src/solaris/javavm/include/typedefs_md.h jdk/src/solaris/javavm/include/typedefs_md.h +--- jdk.orig/src/solaris/javavm/include/typedefs_md.h 2009-05-15 01:02:42.000000000 -0700 ++++ jdk/src/solaris/javavm/include/typedefs_md.h 2009-05-15 01:06:26.000000000 -0700 +@@ -62,11 +62,11 @@ + + #ifndef HAVE_INTPTR_T + #ifdef LONG_IS_64 +-typedef long intptr_t; +-typedef unsigned long uintptr_t; ++//typedef long intptr_t; ++//typedef unsigned long uintptr_t; + #else +-typedef int intptr_t; +-typedef unsigned int uintptr_t; ++//typedef int intptr_t; ++//typedef unsigned int uintptr_t; + #endif /* LONG_IS_64 */ + #endif /* don't HAVE_INTPTR_T */ + Added: trunk/dports/java/openjdk6/files/patch-jdk_src_solaris_native_common_gdefs__md.h =================================================================== --- trunk/dports/java/openjdk6/files/patch-jdk_src_solaris_native_common_gdefs__md.h (rev 0) +++ trunk/dports/java/openjdk6/files/patch-jdk_src_solaris_native_common_gdefs__md.h 2009-05-17 22:15:10 UTC (rev 51092) @@ -0,0 +1,22 @@ +--- jdk.orig/src/solaris/native/common/gdefs_md.h 2009-04-24 00:34:34.000000000 -0700 ++++ jdk/src/solaris/native/common/gdefs_md.h 2009-05-15 01:28:11.000000000 -0700 +@@ -24,15 +24,11 @@ + */ + + /* +- * Solaris dependent type definitions includes intptr_t, etc ++ * Solaris/Linux dependent type definitions includes intptr_t, etc + */ + ++#include ++#include /* For uintptr_t */ ++#include + + #include +-/* +- * Linux version of does not define intptr_t +- */ +-#ifdef __linux__ +-#include +-#include +-#endif /* __linux__ */ Added: trunk/dports/java/openjdk6/files/patch-jvm_base_addr =================================================================== --- trunk/dports/java/openjdk6/files/patch-jvm_base_addr (rev 0) +++ trunk/dports/java/openjdk6/files/patch-jvm_base_addr 2009-05-17 22:15:10 UTC (rev 51092) @@ -0,0 +1,18 @@ +diff -ru hotspot.orig/build/bsd/makefiles/gcc.make hotspot/build/bsd/makefiles/gcc.make +--- hotspot.orig/build/bsd/makefiles/gcc.make 2009-05-15 00:56:30.000000000 -0700 ++++ hotspot/build/bsd/makefiles/gcc.make 2009-05-15 00:57:44.000000000 -0700 +@@ -53,14 +53,7 @@ + + VM_PICFLAG/LIBJVM = $(PICFLAG) + VM_PICFLAG/AOUT = +- +-ifneq ($(BUILDARCH), i486) + VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) +-else +-# PIC has significant overhead on x86, build nonpic VM for now. +-# Link JVM at a "good" base location to avoid unnecessary .text patching. +-JVM_BASE_ADDR = 0x06000000 +-endif + + CFLAGS += $(VM_PICFLAG) + CFLAGS += -fno-rtti Added: trunk/dports/java/openjdk6/files/patch-null_word_intptr_t =================================================================== --- trunk/dports/java/openjdk6/files/patch-null_word_intptr_t (rev 0) +++ trunk/dports/java/openjdk6/files/patch-null_word_intptr_t 2009-05-17 22:15:10 UTC (rev 51092) @@ -0,0 +1,16 @@ +Only in hotspot/build/bsd: bsd_i486_compiler2 +Only in hotspot: cscope.out +diff -ru hotspot.orig/src/share/vm/utilities/globalDefinitions_gcc.hpp hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp +--- hotspot.orig/src/share/vm/utilities/globalDefinitions_gcc.hpp 2009-05-14 23:51:41.000000000 -0700 ++++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2009-05-15 00:40:45.000000000 -0700 +@@ -132,9 +132,7 @@ + #ifdef _LP64 + #define NULL_WORD 0L + #else +- // Cast 0 to intptr_t rather than int32_t since they are not the same type +- // on platforms such as Mac OS X. +- #define NULL_WORD ((intptr_t)0) ++ #define NULL_WORD 0 + #endif + #else + #define NULL_WORD NULL Added: trunk/dports/java/openjdk6/files/patch-set =================================================================== --- trunk/dports/java/openjdk6/files/patch-set (rev 0) +++ trunk/dports/java/openjdk6/files/patch-set 2009-05-17 22:15:10 UTC (rev 51092) @@ -0,0 +1,15513 @@ +/* + * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ +diff -upr ../orig/corba/make/common/Defs-bsd.gmk ./corba/make/common/Defs-bsd.gmk +--- ../orig/corba/make/common/Defs-bsd.gmk 2009-05-04 18:32:16.000000000 -0400 ++++ ./corba/make/common/Defs-bsd.gmk 2009-05-05 14:33:21.000000000 -0400 +@@ -40,18 +40,12 @@ + # Get shared JDK settings + include $(BUILDDIR)/common/shared/Defs.gmk + +-# Part of INCREMENTAL_BUILD mechanism. +-# Compiler emits things like: path/file.o: file.h +-# We want something like: relative_path/file.o relative_path/file.d: file.h +-CC_DEPEND = -MM +-CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' +- + ifndef PLATFORM_SRC + PLATFORM_SRC = $(TOPDIR)/src/solaris + endif # PLATFORM_SRC + + # platform specific include files +-PLATFORM_INCLUDE_NAME = $(PLATFORM) ++PLATFORM_INCLUDE_NAME = $(OS_NAME) + PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME) + + # suffix used for make dependencies files. +@@ -94,6 +88,10 @@ endif + # as the default. + CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++ifeq ($(OS_VENDOR),Apple) ++ # 16-byte stack re-alignment on 32-bit Darwin ++ CFLAGS_REQUIRED_i586 += -mstackrealign ++endif + CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 + LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 +@@ -168,7 +166,7 @@ ifeq ($(FASTDEBUG), true) + CXXFLAGS_DBG += $(CC_LOWER_OPT) + endif + +-CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -DLINUX $(VERSION_DEFINES) \ ++CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -D_ALLBSD_SOURCE $(VERSION_DEFINES) \ + -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT + + ifeq ($(ARCH_DATA_MODEL), 64) +@@ -178,33 +176,15 @@ endif + CPPFLAGS_OPT = + CPPFLAGS_DBG = -DDEBUG + +-ifdef LIBRARY +- # Libraries need to locate other libraries at runtime, and you can tell +- # a library where to look by way of the dynamic runpaths (RPATH or RUNPATH) +- # buried inside the .so. The $ORIGIN says to look relative to where +- # the library itself is and it can be followed with relative paths from +- # that. By default we always look in $ORIGIN, optionally we add relative +- # paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths. +- # On Bsd we add a flag -z origin, not sure if this is necessary, but +- # doesn't seem to hurt. +- # The environment variable LD_LIBRARY_PATH will over-ride these runpaths. +- # Try: 'readelf -d lib*.so' to see these settings in a library. +- # +- LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN +- LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%) +-endif +- +-EXTRA_LIBS += -lc +- +-LDFLAGS_DEFS_OPTION = -z defs +-LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION) +- + # + # -L paths for finding and -ljava + # +-LDFLAGS_OPT = -Xlinker -O1 + LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH) ++ ++ifneq ($(OS_VENDOR), Apple) ++LDFLAGS_OPT = -Xlinker -O1 + LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX) ++endif + + # + # -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always +@@ -235,13 +215,9 @@ endif + # + LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker + +-# +-# Support for Quantify. +-# +-ifdef QUANTIFY +-QUANTIFY_CMD = quantify +-QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes +-LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS) ++# Darwin does not support linker map files. ++ifeq ($(OS_VENDOR), Apple) ++LDNOMAP=true + endif + + # +@@ -270,7 +246,9 @@ override HAVE_ALTZONE = false + override HAVE_FILIOH = false + override HAVE_GETHRTIME = false + override HAVE_GETHRVTIME = false ++ifeq ($(OS_VENDOR),Apple) + override HAVE_SIGIGNORE = true ++endif + override LEX_LIBRARY = -lfl + ifeq ($(STATIC_CXX),true) + override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic +@@ -281,13 +259,9 @@ override LIBPOSIX4 = + override LIBSOCKET = + override LIBTHREAD = + override MOOT_PRIORITIES = true +-override NO_INTERRUPTIBLE_IO = true +-override OPENWIN_HOME = /usr/X11R6 +-ifeq ($(ARCH), amd64) +-override OPENWIN_LIB = $(OPENWIN_HOME)/lib64 +-else ++override NO_INTERRUPTIBLE_IO = false ++override OPENWIN_HOME = $(X11_PATH) + override OPENWIN_LIB = $(OPENWIN_HOME)/lib +-endif + override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER + override SUN_CMM_SUBDIR = + override THREADS_FLAG = native +diff -upr ../orig/corba/make/common/Defs-linux.gmk ./corba/make/common/Defs-linux.gmk +--- ../orig/corba/make/common/Defs-linux.gmk 2009-01-27 15:40:31.000000000 -0500 ++++ ./corba/make/common/Defs-linux.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -282,7 +282,7 @@ override LIBSOCKET = + override LIBTHREAD = + override MOOT_PRIORITIES = true + override NO_INTERRUPTIBLE_IO = true +-override OPENWIN_HOME = /usr/X11R6 ++override OPENWIN_HOME = $(X11_PATH) + ifeq ($(ARCH), amd64) + override OPENWIN_LIB = $(OPENWIN_HOME)/lib64 + else +diff -upr ../orig/corba/make/common/Defs.gmk ./corba/make/common/Defs.gmk +--- ../orig/corba/make/common/Defs.gmk 2009-01-27 15:40:31.000000000 -0500 ++++ ./corba/make/common/Defs.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -53,6 +53,24 @@ endif + + _OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH) + ++ifneq ($(PLATFORM), windows) ++ ifdef ALT_X11_PATH ++ X11_PATH = $(ALT_X11_PATH) ++ else ++ X11_PATH = /usr/X11R6 ++ endif ++ ++ ifdef ALT_PACKAGE_PATH ++ PACKAGE_PATH = $(ALT_PACKAGE_PATH) ++ else ++ ifeq ($(PLATFORM), linux) ++ PACKAGE_PATH = /usr ++ else ++ PACKAGE_PATH = /usr/local ++ endif ++ endif ++endif ++ + # + # Get platform definitions + # +@@ -97,6 +115,9 @@ ifdef PROGRAM + LDLIBS_COMMON = -ldl + endif + ++ ifeq ($(PLATFORM), bsd) ++ LDLIBS_COMMON = -pthread ++ endif + endif # PROGRAM + + LDLIBS_COMMON += $(EXTRA_LIBS) +diff -upr ../orig/corba/make/common/Mapfile-vers.gmk ./corba/make/common/Mapfile-vers.gmk +--- ../orig/corba/make/common/Mapfile-vers.gmk 2009-01-27 15:40:31.000000000 -0500 ++++ ./corba/make/common/Mapfile-vers.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -77,7 +77,7 @@ endif + endif # PLATFORM + + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + + ifeq ($(VARIANT), OPT) + # OPT build MUST have a mapfile? +diff -upr ../orig/corba/make/common/shared/Compiler-gcc.gmk ./corba/make/common/shared/Compiler-gcc.gmk +--- ../orig/corba/make/common/shared/Compiler-gcc.gmk 2009-01-27 15:40:31.000000000 -0500 ++++ ./corba/make/common/shared/Compiler-gcc.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -99,6 +99,24 @@ ifeq ($(PLATFORM), linux) + + endif + ++ifeq ($(PLATFORM), bsd) ++ # Settings specific to BSD ++ CC = $(COMPILER_PATH)gcc ++ CPP = $(COMPILER_PATH)gcc -E ++ CXX = $(COMPILER_PATH)g++ ++ REQUIRED_CC_VER = 3.3 ++ REQUIRED_GCC_VER = 3.3.* ++ ++# Option used to create a shared library ++ifeq ($(OS_VENDOR), Apple) ++ SHARED_LIBRARY_FLAG = -dynamiclib ++else ++ SHARED_LIBRARY_FLAG = -shared ++endif ++ ++ SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 ) ++endif ++ + ifeq ($(PLATFORM), solaris) + + # Settings specific to Solaris +diff -upr ../orig/corba/make/common/shared/Compiler.gmk ./corba/make/common/shared/Compiler.gmk +--- ../orig/corba/make/common/shared/Compiler.gmk 2009-01-27 15:40:31.000000000 -0500 ++++ ./corba/make/common/shared/Compiler.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -42,6 +42,11 @@ ifeq ($(PLATFORM), linux) + override CC_VERSION = gcc + endif + ++# BSD uses GNU compilers by default ++ifeq ($(PLATFORM), bsd) ++ override CC_VERSION = gcc ++endif ++ + # Get the compiler specific settings + include $(BUILDDIR)/common/shared/Compiler-$(CC_VERSION).gmk + +diff -upr ../orig/corba/make/common/shared/Defs-bsd.gmk ./corba/make/common/shared/Defs-bsd.gmk +--- ../orig/corba/make/common/shared/Defs-bsd.gmk 2009-05-04 18:32:16.000000000 -0400 ++++ ./corba/make/common/shared/Defs-bsd.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -54,7 +54,7 @@ $(shell if [ "$1" != "" -a -d "$1" ]; th + endef + + # Location on system where jdk installs might be +-USRJDKINSTANCES_PATH =/opt/java ++USRJDKINSTANCES_PATH =$(PACKAGE_PATH) + + # UNIXCOMMAND_PATH: path to where the most common Unix commands are. + # NOTE: Must end with / so that it could be empty, allowing PATH usage. +@@ -107,7 +107,7 @@ endif + ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined" + DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH)) + else +- DEVTOOLS_PATH =/usr/bin/ ++ DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/ + endif + + # _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK. +diff -upr ../orig/corba/make/common/shared/Defs-utils.gmk ./corba/make/common/shared/Defs-utils.gmk +--- ../orig/corba/make/common/shared/Defs-utils.gmk 2009-01-27 15:40:31.000000000 -0500 ++++ ./corba/make/common/shared/Defs-utils.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -53,6 +53,13 @@ ifeq ($(PLATFORM),linux) + UTILS_DEVTOOL_PATH=$(USRBIN_PATH) + endif + ++ifeq ($(PLATFORM),bsd) ++ UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH) ++ UTILS_USR_BIN_PATH=$(USRBIN_PATH) ++ UTILS_CCS_BIN_PATH=$(USRBIN_PATH) ++ UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH) ++endif ++ + ifeq ($(PLATFORM),solaris) + UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH) + UTILS_USR_BIN_PATH=$(UNIXCOMMAND_PATH) +@@ -209,3 +216,32 @@ ifeq ($(PLATFORM),solaris) + ECHO = /usr/bin/echo + endif + ++# BSD specific ++ifeq ($(PLATFORM),bsd) ++ BASENAME = $(UTILS_USR_BIN_PATH)basename ++ EGREP = $(UTILS_USR_BIN_PATH)egrep ++ EXPR = $(UTILS_COMMAND_PATH)expr ++ FMT = $(UTILS_USR_BIN_PATH)fmt ++ GREP = $(UTILS_USR_BIN_PATH)grep ++ GUNZIP = $(UTILS_USR_BIN_PATH)gunzip ++ ID = $(UTILS_USR_BIN_PATH)id ++ MSGFMT = $(UTILS_DEVTOOL_PATH)msgfmt ++ SED = $(UTILS_USR_BIN_PATH)sed ++ SORT = $(UTILS_USR_BIN_PATH)sort ++ TEST = $(UTILS_COMMAND_PATH)test ++ TOUCH = $(UTILS_USR_BIN_PATH)touch ++ TRUE = $(UTILS_USR_BIN_PATH)true ++ UNAME = $(UTILS_USR_BIN_PATH)uname ++ # BSD OS_VENDOR specific ++ ifeq ($(OS_VENDOR), Apple) ++ NAWK = $(UTILS_USR_BIN_PATH)awk ++ UNZIPSFX = $(UTILS_USR_BIN_PATH)unzipsfx ++ ZIPEXE = $(UTILS_USR_BIN_PATH)zip ++ else ++ UNZIP = $(UTILS_DEVTOOL_PATH)unzip ++ endif ++ ifneq ($(OS_VENDOR), OpenBSD) ++ CPIO = $(UTILS_USR_BIN_PATH)cpio ++ TAR = $(UTILS_USR_BIN_PATH)tar ++ endif ++endif +diff -upr ../orig/corba/make/common/shared/Platform.gmk ./corba/make/common/shared/Platform.gmk +--- ../orig/corba/make/common/shared/Platform.gmk 2009-01-27 15:40:31.000000000 -0500 ++++ ./corba/make/common/shared/Platform.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -262,6 +262,76 @@ ifeq ($(SYSTEM_UNAME), Linux) + MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) + endif + ++ifeq ($(SYSTEM_UNAME), FreeBSD) ++ PLATFORM = bsd ++ OS_NAME = freebsd ++ OS_VENDOR = FreeBSD ++ REQUIRED_OS_VERSION = 6.0 ++endif ++ ++ifeq ($(SYSTEM_UNAME), Darwin) ++ PLATFORM = bsd ++ OS_NAME = darwin ++ OS_VENDOR = Apple ++ REQUIRED_OS_VERSION = 8.0 ++endif ++ ++ifeq ($(SYSTEM_UNAME), NetBSD) ++ PLATFORM = bsd ++ OS_NAME = netbsd ++ OS_VENDOR = NetBSD ++ REQUIRED_OS_VERSION = 3.0 ++endif ++ ++ifeq ($(SYSTEM_UNAME), OpenBSD) ++ PLATFORM = bsd ++ OS_NAME = openbsd ++ OS_VENDOR = OpenBSD ++ REQUIRED_OS_VERSION = 4.2 ++endif ++ ++# Platform settings specific to BSD ++ifeq ($(PLATFORM), bsd) ++ OS_VERSION := $(shell uname -r) ++ # Arch and OS name/version ++ mach := $(shell uname -m) ++ archExpr = case "$(mach)" in \ ++ i[3-9]86) \ ++ echo i586 \ ++ ;; \ ++ *) \ ++ echo $(mach) \ ++ ;; \ ++ esac ++ ARCH := $(shell $(archExpr) ) ++ ARCH_FAMILY := $(ARCH) ++ ++ # i586 and sparc are 32 bit, amd64 and sparc64 are 64 ++ ifneq (,$(findstring $(ARCH), i586 sparc)) ++ ARCH_DATA_MODEL=32 ++ else ++ ARCH_DATA_MODEL=64 ++ endif ++ ++ # Need to maintain the jre/lib/i386 location for 32-bit Intel ++ ifeq ($(ARCH), i586) ++ LIBARCH = i386 ++ else ++ LIBARCH = $(ARCH) ++ endif ++ ++ # Value of Java os.arch property ++ ARCHPROP = $(LIBARCH) ++ ++ # Suffix for file bundles used in previous release ++ BUNDLE_FILE_SUFFIX=.tar.gz ++ # Minimum disk space needed as determined by running 'du -sk' on ++ # a fully built workspace. ++ REQUIRED_FREE_SPACE=1500000 ++ # How much RAM does this machine have: ++ MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' ) ++endif ++ + # Windows with and without CYGWIN will be slightly different + ifeq ($(SYSTEM_UNAME), Windows_NT) + PLATFORM = windows +@@ -373,7 +443,14 @@ endif + # build machines and adjustments will be made to prevent excessing + # system swapping during the build. + # If we don't know, assume 512. Subtract 128 from MB for VM MAX. +-# Don't set VM max over 1024-128=896. ++# Don't set VM max over 1024-128=896, except on OpenBSD where ++# 736 is the max. ++ifeq ($(OS_VENDOR), OpenBSD) ++ ABS_MAX_MEMORY := "736" ++else ++ ABS_MAX_MEMORY := "896" ++endif ++ + ifneq ($(MB_OF_MEMORY),) + LOW_MEMORY_MACHINE := $(shell \ + if [ $(MB_OF_MEMORY) -le 512 ] ; then \ +@@ -385,7 +462,7 @@ ifneq ($(MB_OF_MEMORY),) + if [ $(MB_OF_MEMORY) -le 1024 ] ; then \ + expr $(MB_OF_MEMORY) '-' 128 ; \ + else \ +- echo "896"; \ ++ echo $(ABS_MAX_MEMORY); \ + fi) + MIN_VM_MEMORY := $(shell \ + if [ $(MAX_VM_MEMORY) -le 128 ] ; then \ +diff -upr ../orig/corba/make/sun/corba/core/Makefile ./corba/make/sun/corba/core/Makefile +--- ../orig/corba/make/sun/corba/core/Makefile 2009-01-27 15:40:31.000000000 -0500 ++++ ./corba/make/sun/corba/core/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -53,11 +53,19 @@ include $(CORBA_JMK_DIRECTORY)sun_corba. + ifdef STANDALONE_CORBA_WS + # FIXUP: What is this all about? + OTHER_LDFLAGS=-L$(BOOTDIR)/jre/lib/$(ARCH) -L$(BOOTDIR)/jre/lib/$(LIBARCH)/native_threads -ljvm ++ifeq ($(PLATFORM), bsd) ++OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(OS_NAME) ++else + OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(PLATFORM) ++endif + else + OTHER_LDLIBS=$(JVMLIB) ++ifeq ($(PLATFORM), bsd) ++OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(OS_NAME) ++else + OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(PLATFORM) + endif ++endif + + + FILES_c = ioser.c +diff -upr ../orig/hotspot/build/bsd/Makefile ./hotspot/build/bsd/Makefile +--- ../orig/hotspot/build/bsd/Makefile 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/build/bsd/Makefile 2009-05-04 19:16:59.000000000 -0400 +@@ -198,7 +198,8 @@ checks: check_os_version check_j2se_vers + # Solaris 2.5.1, 2.6). + # Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok. + +-SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 2.7% ++#SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 2.7% ++DISABLE_HOTSPOT_OS_VERSION_CHECK = ok + OS_VERSION := $(shell uname -r) + EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION)) + +diff -upr ../orig/hotspot/build/bsd/makefiles/buildtree.make ./hotspot/build/bsd/makefiles/buildtree.make +--- ../orig/hotspot/build/bsd/makefiles/buildtree.make 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/build/bsd/makefiles/buildtree.make 2009-05-05 15:01:26.000000000 -0400 +@@ -273,10 +273,11 @@ env.sh: $(BUILDTREE_MAKE) + [ -n "$$JAVA_HOME" ] && { echo ": \$${JAVA_HOME:=$${JAVA_HOME}}"; }; \ + { \ + echo "LD_LIBRARY_PATH=.:$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/${LIBARCH}/native_threads:\$${JAVA_HOME}/jre/lib/${LIBARCH}:${GCC_LIB}"; \ ++ echo "DYLD_LIBRARY_PATH=.:$${DYLD_LIBRARY_PATH:+$$DYLD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/${LIBARCH}/native_threads:\$${JAVA_HOME}/jre/lib/${LIBARCH}:${GCC_LIB}"; \ + echo "CLASSPATH=$${CLASSPATH:+$$CLASSPATH:}.:\$${JAVA_HOME}/jre/lib/rt.jar:\$${JAVA_HOME}/jre/lib/i18n.jar"; \ + } | sed s:$${JAVA_HOME:--------}:\$${JAVA_HOME}:g; \ + echo "HOTSPOT_BUILD_USER=\"$${LOGNAME:-$$USER} in `basename $(GAMMADIR)`\""; \ +- echo "export JAVA_HOME LD_LIBRARY_PATH CLASSPATH HOTSPOT_BUILD_USER"; \ ++ echo "export JAVA_HOME LD_LIBRARY_PATH DYLD_LIBRARY_PATH CLASSPATH HOTSPOT_BUILD_USER"; \ + ) > $@ + + env.csh: env.sh +diff -upr ../orig/hotspot/build/bsd/makefiles/cscope.make ./hotspot/build/bsd/makefiles/cscope.make +--- ../orig/hotspot/build/bsd/makefiles/cscope.make 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/build/bsd/makefiles/cscope.make 2009-05-05 15:08:05.000000000 -0400 +@@ -72,7 +72,7 @@ endif + # OS-specific files for other systems are excluded by default. Use CS_OS=yes + # to include platform-specific files for other platforms. + ifndef CS_OS +-CS_OS = bsd macos solaris win32 ++CS_OS = linux macos solaris win32 bsd + CS_PRUNE_OS = $(patsubst %,-o -name '*%*',$(filter-out ${OS},${CS_OS})) + endif + +diff -upr ../orig/hotspot/build/bsd/makefiles/defs.make ./hotspot/build/bsd/makefiles/defs.make +--- ../orig/hotspot/build/bsd/makefiles/defs.make 2009-05-04 18:32:16.000000000 -0400 ++++ ./hotspot/build/bsd/makefiles/defs.make 2009-05-04 17:37:15.000000000 -0400 +@@ -28,6 +28,14 @@ + + SLASH_JAVA ?= /java + ++# Library suffix ++OS_VENDOR:=$(shell uname -s) ++ifeq ($(OS_VENDOR),Darwin) ++ LIBRARY_SUFFIX=dylib ++else ++ LIBRARY_SUFFIX=so ++endif ++ + # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name + ARCH:=$(shell uname -m) + PATH_SEP = : +@@ -79,6 +87,31 @@ ifeq ($(ARCH), x86_64) + endif + endif + ++# amd64 ++ifeq ($(ARCH), amd64) ++ ARCH_DATA_MODEL = 64 ++ MAKE_ARGS += LP64=1 ++ PLATFORM = bsd-amd64 ++ VM_PLATFORM = bsd_amd64 ++ HS_ARCH = x86 ++endif ++ ++# i386 ++ifeq ($(ARCH), i386) ++ ARCH_DATA_MODEL = 32 ++ PLATFORM = bsd-i586 ++ VM_PLATFORM = bsd_i486 ++ HS_ARCH = x86 ++endif ++ ++# i486 ++ifeq ($(ARCH), i486) ++ ARCH_DATA_MODEL = 32 ++ PLATFORM = bsd-i586 ++ VM_PLATFORM = bsd_i486 ++ HS_ARCH = x86 ++endif ++ + # i686 + ifeq ($(ARCH), i686) + ARCH_DATA_MODEL = 32 +@@ -95,19 +128,11 @@ VM_DEBUG=jvmg + EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html + EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server + EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt +-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so +-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so ++EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.$(LIBRARY_SUFFIX) ++EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjsig.so +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.so +- EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so +- EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar +-else +- ifeq ($(ARCH),ia64) +- else +- EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so +- EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar +- endif ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjsig.$(LIBRARY_SUFFIX) ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) + endif +diff -upr ../orig/hotspot/build/bsd/makefiles/gcc.make ./hotspot/build/bsd/makefiles/gcc.make +--- ../orig/hotspot/build/bsd/makefiles/gcc.make 2009-05-04 18:32:16.000000000 -0400 ++++ ./hotspot/build/bsd/makefiles/gcc.make 2009-05-04 17:37:15.000000000 -0400 +@@ -22,12 +22,15 @@ + # + # + ++OS_VENDOR = $(shell uname -s) ++ + #------------------------------------------------------------------------ + # CC, CPP & AS + +-CPP = g++ +-CC = gcc +-AS = $(CC) -c ++CXX ?= g++ ++CPP = $(CXX) ++CC ?= gcc ++AS = $(CC) -c -x assembler-with-cpp + + # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only + # prints the numbers (e.g. "2.95", "3.2.1") +@@ -62,7 +65,7 @@ endif + CFLAGS += $(VM_PICFLAG) + CFLAGS += -fno-rtti + CFLAGS += -fno-exceptions +-CFLAGS += -D_REENTRANT ++CFLAGS += -pthread + CFLAGS += -fcheck-new + + ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) +@@ -72,6 +75,15 @@ ARCHFLAG/ia64 = + ARCHFLAG/sparc = -m32 -mcpu=v9 + ARCHFLAG/sparcv9 = -m64 -mcpu=v9 + ++# Darwin-specific build flags ++ifeq ($(OS_VENDOR), Darwin) ++ # Ineffecient 16-byte stack re-alignment on Darwin/IA32 ++ ARCHFLAG/i486 += -mstackrealign ++ ++ # -arch compiler flag required for x64_64 ++ ARCHFLAGS/amd64 += -arch x86_64 ++endif ++ + CFLAGS += $(ARCHFLAG) + AOUT_FLAGS += $(ARCHFLAG) + LFLAGS += $(ARCHFLAG) +@@ -96,6 +108,11 @@ ACCEPTABLE_WARNINGS = -Wpointer-arith -W + CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) + # Special cases + CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) ++# XXXDARWIN: for _dyld_bind_fully_image_containing_address ++ifeq ($(OS_VENDOR), Darwin) ++ CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations ++endif ++ + + # The flags to use for an Optimized g++ build + OPT_CFLAGS += -O3 +@@ -126,20 +143,40 @@ ifeq ($(BUILDARCH), ia64) + LFLAGS += -Wl,-relax + endif + +-# Enable linker optimization +-LFLAGS += -Xlinker -O1 +- + # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. + MAPFLAG = -Xlinker --version-script=FILENAME + +-# Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj +-SONAMEFLAG = -Xlinker -soname=SONAME ++# ++# Shared Library ++# ++ifeq ($(OS_VENDOR), Darwin) ++ # Standard linker flags ++ LFLAGS += ++ ++ # Darwin doesn't use ELF and doesn't support version scripts ++ LDNOMAP = true ++ ++ # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj ++ SONAMEFLAG = ++ ++ # Build shared library ++ SHARED_FLAG = -dynamiclib $(VM_PICFLAG) + +-# Build shared library +-SHARED_FLAG = -shared ++ # Keep symbols even they are not used ++ #AOUT_FLAGS += -export-dynamic ++else ++ # Enable linker optimization ++ LFLAGS += -Xlinker -O1 ++ ++ # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj ++ SONAMEFLAG = -Xlinker -soname=SONAME + +-# Keep symbols even they are not used +-AOUT_FLAGS += -export-dynamic ++ # Build shared library ++ SHARED_FLAG = -shared $(VM_PICFLAG) ++ ++ # Keep symbols even they are not used ++ AOUT_FLAGS += -export-dynamic ++endif + + #------------------------------------------------------------------------ + # Debug flags +diff -upr ../orig/hotspot/build/bsd/makefiles/jsig.make ./hotspot/build/bsd/makefiles/jsig.make +--- ../orig/hotspot/build/bsd/makefiles/jsig.make 2009-05-04 18:32:16.000000000 -0400 ++++ ./hotspot/build/bsd/makefiles/jsig.make 2009-05-04 17:37:15.000000000 -0400 +@@ -26,7 +26,12 @@ + + # libjsig[_g].so: signal interposition library + JSIG = jsig$(G_SUFFIX) +-LIBJSIG = lib$(JSIG).so ++ ++ifeq ($(OS_VENDOR), Darwin) ++ LIBJSIG = lib$(JSIG).dylib ++else ++ LIBJSIG = lib$(JSIG).so ++endif + + JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm + +@@ -39,12 +44,12 @@ LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfi + # cause problems with interposing. See CR: 6466665 + # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) + +-LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT ++LFLAGS_JSIG += -D_GNU_SOURCE -pthread + + $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) + @echo Making signal interposition lib... + $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ +- $(LFLAGS_JSIG) -o $@ $< -ldl ++ $(LFLAGS_JSIG) -o $@ $< + + install_jsig: $(LIBJSIG) + @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" +diff -upr ../orig/hotspot/build/bsd/makefiles/launcher.make ./hotspot/build/bsd/makefiles/launcher.make +--- ../orig/hotspot/build/bsd/makefiles/launcher.make 2009-05-04 18:32:16.000000000 -0400 ++++ ./hotspot/build/bsd/makefiles/launcher.make 2009-05-04 17:37:15.000000000 -0400 +@@ -44,7 +44,7 @@ ifeq ($(LINK_INTO),AOUT) + LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS) + else + LAUNCHER.o = launcher.o +- LFLAGS_LAUNCHER += -L `pwd` ++ LFLAGS_LAUNCHER += -L`pwd` + LIBS_LAUNCHER += -l$(JVM) $(LIBS) + endif + +diff -upr ../orig/hotspot/build/bsd/makefiles/sa.make ./hotspot/build/bsd/makefiles/sa.make +--- ../orig/hotspot/build/bsd/makefiles/sa.make 2009-05-04 18:32:16.000000000 -0400 ++++ ./hotspot/build/bsd/makefiles/sa.make 2009-05-04 17:37:17.000000000 -0400 +@@ -42,7 +42,7 @@ SA_CLASSPATH = $(BOOT_JAVA_HOME)/lib/too + + # gnumake 3.78.1 does not accept the *s that + # are in AGENT_ALLFILES, so use the shell to expand them +-AGENT_ALLFILES := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_ALLFILES)) ++AGENT_ALLFILES := $(shell /bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_ALLFILES)) + + SA_CLASSDIR = $(GENERATED)/saclasses + +diff -upr ../orig/hotspot/build/bsd/makefiles/saproc.make ./hotspot/build/bsd/makefiles/saproc.make +--- ../orig/hotspot/build/bsd/makefiles/saproc.make 2009-05-04 18:32:16.000000000 -0400 ++++ ./hotspot/build/bsd/makefiles/saproc.make 2009-05-04 17:37:15.000000000 -0400 +@@ -26,7 +26,12 @@ + + # libsaproc[_g].so: serviceability agent + SAPROC = saproc$(G_SUFFIX) +-LIBSAPROC = lib$(SAPROC).so ++ ++ifeq ($(OS_VENDOR), Darwin) ++ LIBSAPROC = lib$(SAPROC).dylib ++else ++ LIBSAPROC = lib$(SAPROC).so ++endif + + AGENT_DIR = $(GAMMADIR)/agent + +@@ -43,11 +48,11 @@ SAMAPFILE = $(SASRCDIR)/mapfile + + DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) + +-# if $(AGENT_DIR) does not exist, we don't build SA ++# if $(SASRCDIR) does not exist, we don't build SA + # also, we don't build SA on Itanium. + + checkAndBuildSA: +- $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ ++ $(QUIETLY) if [ -d $(SASRCDIR) -a "$(SRCARCH)" != "ia64" ] ; then \ + $(MAKE) -f vm.make $(LIBSAPROC); \ + fi + +diff -upr ../orig/hotspot/build/bsd/makefiles/vm.make ./hotspot/build/bsd/makefiles/vm.make +--- ../orig/hotspot/build/bsd/makefiles/vm.make 2009-05-04 18:32:16.000000000 -0400 ++++ ./hotspot/build/bsd/makefiles/vm.make 2009-05-04 17:37:17.000000000 -0400 +@@ -93,7 +93,7 @@ CFLAGS += $(CFLAGS/NOEX) + # Extra flags from gnumake's invocation or environment + CFLAGS += $(EXTRA_CFLAGS) + +-LIBS += -lm -ldl -lpthread ++LIBS += -lm -pthread + + # By default, link the *.o into the library, not the executable. + LINK_INTO$(LINK_INTO) = LIBJVM +@@ -108,7 +108,11 @@ include $(MAKEFILES_DIR)/dtrace.make + # JVM + + JVM = jvm$(G_SUFFIX) +-LIBJVM = lib$(JVM).so ++ifeq ($(OS_VENDOR), Darwin) ++ LIBJVM = lib$(JVM).dylib ++else ++ LIBJVM = lib$(JVM).so ++endif + + JVM_OBJ_FILES = $(Obj_Files) + +@@ -122,7 +126,7 @@ mapfile_reorder : mapfile $(REORDERFILE) + rm -f $@ + cat $^ > $@ + +-STATIC_CXX = true ++STATIC_CXX = false + + ifeq ($(LINK_INTO),AOUT) + LIBJVM.o = +@@ -140,14 +144,14 @@ else + ifeq ($(STATIC_CXX), true) + LFLAGS_VM += $(STATIC_LIBGCC) + LIBS_VM += $(STATIC_STDCXX) ++ LINK_VM = $(LINK_LIB.c) + else +- LIBS_VM += -lstdc++ ++ LINK_VM = $(LINK_LIB.CC) + endif + + LIBS_VM += $(LIBS) + endif + +-LINK_VM = $(LINK_LIB.c) + + # rule for building precompiled header + $(PRECOMPILED_HEADER): $(Precompiled_Files) +@@ -175,11 +179,6 @@ $(LD_SCRIPT): $(LIBJVM_MAPFILE) + LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT) + endif + +-# With more recent Redhat releases (or the cutting edge version Fedora), if +-# SEBsd is configured to be enabled, the runtime linker will fail to apply +-# the text relocation to libjvm.so considering that it is built as a non-PIC +-# DSO. To workaround that, we run chcon to libjvm.so after it is built. See +-# details in bug 6538311. + $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT) + $(QUIETLY) { \ + echo Linking vm...; \ +@@ -188,15 +187,6 @@ $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) + $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM); \ + $(LINK_LIB.CC/POST_HOOK) \ + rm -f $@.1; ln -s $@ $@.1; \ +- if [ -x /usr/sbin/sebsdenabled ] ; then \ +- /usr/sbin/sebsdenabled; \ +- if [ $$? = 0 ] ; then \ +- /usr/bin/chcon -t textrel_shlib_t $@; \ +- if [ $$? != 0 ]; then \ +- echo "ERROR: Cannot chcon $@"; exit 1; \ +- fi \ +- fi \ +- fi \ + } + + DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM) +diff -upr ../orig/hotspot/build/bsd/platform_amd64 ./hotspot/build/bsd/platform_amd64 +--- ../orig/hotspot/build/bsd/platform_amd64 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/build/bsd/platform_amd64 2009-05-04 17:37:17.000000000 -0400 +@@ -12,6 +12,4 @@ lib_arch = amd64 + + compiler = gcc + +-gnu_dis_arch = amd64 +- +-sysdefs = -DLINUX -D_GNU_SOURCE -DAMD64 ++sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 +diff -upr ../orig/hotspot/build/bsd/platform_i486 ./hotspot/build/bsd/platform_i486 +--- ../orig/hotspot/build/bsd/platform_i486 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/build/bsd/platform_i486 2009-05-04 17:37:17.000000000 -0400 +@@ -12,6 +12,4 @@ lib_arch = i386 + + compiler = gcc + +-gnu_dis_arch = i386 +- +-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32 ++sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DIA32 +diff -upr ../orig/hotspot/build/bsd/platform_sparc ./hotspot/build/bsd/platform_sparc +--- ../orig/hotspot/build/bsd/platform_sparc 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/build/bsd/platform_sparc 2009-05-04 17:37:15.000000000 -0400 +@@ -12,6 +12,6 @@ lib_arch = sparc + + compiler = gcc + +-gnu_dis_arch = sparc ++sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DSPARC + + sysdefs = -DLINUX -D_GNU_SOURCE -DSPARC +diff -upr ../orig/hotspot/make/Makefile ./hotspot/make/Makefile +--- ../orig/hotspot/make/Makefile 2009-01-27 15:40:59.000000000 -0500 ++++ ./hotspot/make/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -262,6 +262,19 @@ endif + + # Shared Library + ifneq ($(OSNAME),windows) ++ifeq ($(OSNAME),bsd) ++# BSD-specific LIBRARY_SUFFIX build option ++$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) ++ $(install-file) ++$(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) ++ $(install-file) ++$(EXPORT_CLIENT_DIR)/64/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) ++ $(install-file) ++$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) ++ $(install-file) ++$(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) ++ $(install-file) ++else + $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so + $(install-file) + $(EXPORT_CLIENT_DIR)/%.so: $(C1_DIR)/%.so +@@ -273,6 +286,7 @@ $(EXPORT_SERVER_DIR)/%.so: $(C2_DI + $(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so + $(install-file) + endif ++endif + + # Jar file (sa-jdi.jar) + $(EXPORT_LIB_DIR)/%.jar: $(GEN_DIR)/%.jar +diff -upr ../orig/hotspot/make/defs.make ./hotspot/make/defs.make +--- ../orig/hotspot/make/defs.make 2009-01-27 15:40:59.000000000 -0500 ++++ ./hotspot/make/defs.make 2009-05-04 17:37:15.000000000 -0400 +@@ -118,13 +118,23 @@ endif + # Windows should have OS predefined + ifeq ($(OS),) + OS := $(shell uname -s) ++ ifneq ($(findstring BSD,$(OS)),) ++ OS=bsd ++ endif ++ ifeq ($(OS), Darwin) ++ OS=bsd ++ endif + HOST := $(shell uname -n) + endif + +-# If not SunOS and not Linux, assume Windows ++# If not SunOS, not Linux and not BSD, assume Windows + ifneq ($(OS), Linux) + ifneq ($(OS), SunOS) +- OSNAME=windows ++ ifneq ($(OS), bsd) ++ OSNAME=windows ++ else ++ OSNAME=bsd ++ endif + else + OSNAME=solaris + endif +diff -upr ../orig/hotspot/src/cpu/x86/vm/interpreterRT_x86_32.cpp ./hotspot/src/cpu/x86/vm/interpreterRT_x86_32.cpp +--- ../orig/hotspot/src/cpu/x86/vm/interpreterRT_x86_32.cpp 2009-01-27 15:41:00.000000000 -0500 ++++ ./hotspot/src/cpu/x86/vm/interpreterRT_x86_32.cpp 2009-05-04 17:37:17.000000000 -0400 +@@ -57,7 +57,7 @@ void InterpreterRuntime::SignatureHandle + __ cmpl(Address(from(), Interpreter::local_offset_in_bytes(from_offset)), 0); // do not use temp() to avoid AGI + Label L; + __ jcc(Assembler::notZero, L); +- __ movl(temp(), 0); ++ __ movl(temp(), NULL_WORD); + __ bind(L); + __ movl(Address(to(), to_offset * wordSize), temp()); + } +@@ -113,7 +113,7 @@ class SlowSignatureHandler: public Nativ + virtual void pass_object() { + // pass address of from + intptr_t from_addr = (intptr_t)(_from + Interpreter::local_offset_in_bytes(0)); +- *_to++ = (*(intptr_t*)from_addr == 0) ? NULL : from_addr; ++ *_to++ = (*(intptr_t*)from_addr == 0) ? NULL_WORD : from_addr; + debug_only(verify_tag(frame::TagReference)); + _from -= Interpreter::stackElementSize(); + } +diff -upr ../orig/hotspot/src/cpu/x86/vm/jni_x86.h ./hotspot/src/cpu/x86/vm/jni_x86.h +--- ../orig/hotspot/src/cpu/x86/vm/jni_x86.h 2009-01-27 15:41:00.000000000 -0500 ++++ ./hotspot/src/cpu/x86/vm/jni_x86.h 2009-05-04 17:37:15.000000000 -0400 +@@ -29,7 +29,7 @@ + #ifndef _JAVASOFT_JNI_MD_H_ + #define _JAVASOFT_JNI_MD_H_ + +-#if defined(SOLARIS) || defined(LINUX) ++#if defined(SOLARIS) || defined(LINUX) || defined(_ALLBSD_SOURCE) + #define JNIEXPORT + #define JNIIMPORT + #define JNICALL +diff -upr ../orig/hotspot/src/cpu/x86/vm/runtime_x86_32.cpp ./hotspot/src/cpu/x86/vm/runtime_x86_32.cpp +--- ../orig/hotspot/src/cpu/x86/vm/runtime_x86_32.cpp 2009-01-27 15:41:00.000000000 -0500 ++++ ./hotspot/src/cpu/x86/vm/runtime_x86_32.cpp 2009-05-04 17:37:17.000000000 -0400 +@@ -132,11 +132,11 @@ void OptoRuntime::generate_exception_blo + // Get the exception pc in case we are deoptimized + __ movl(rdx, Address(rcx, JavaThread::exception_pc_offset())); + #ifdef ASSERT +- __ movl(Address(rcx, JavaThread::exception_handler_pc_offset()), 0); +- __ movl(Address(rcx, JavaThread::exception_pc_offset()), 0); ++ __ movl(Address(rcx, JavaThread::exception_handler_pc_offset()), NULL_WORD); ++ __ movl(Address(rcx, JavaThread::exception_pc_offset()), NULL_WORD); + #endif + // Clear the exception oop so GC no longer processes it as a root. +- __ movl(Address(rcx, JavaThread::exception_oop_offset()), 0); ++ __ movl(Address(rcx, JavaThread::exception_oop_offset()), NULL_WORD); + + __ popl(rcx); + +diff -upr ../orig/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp ./hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp +--- ../orig/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp 2009-01-27 15:41:00.000000000 -0500 ++++ ./hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp 2009-05-05 16:01:30.000000000 -0400 +@@ -472,7 +472,7 @@ class StubGenerator: public StubCodeGene + // setup rax & rdx, remove return address & clear pending exception + __ popq(rdx); + __ movq(rax, Address(r15_thread, Thread::pending_exception_offset())); +- __ movptr(Address(r15_thread, Thread::pending_exception_offset()), (int)NULL_WORD); ++ __ movptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); + + #ifdef ASSERT + // make sure exception is set +@@ -941,9 +941,9 @@ class StubGenerator: public StubCodeGene + __ jcc(Assembler::zero, exit); // if obj is NULL it is OK + // Check if the oop is in the right area of memory + __ movq(c_rarg2, rax); +- __ movptr(c_rarg3, (int64_t) Universe::verify_oop_mask()); ++ __ movptr(c_rarg3, (intptr_t) Universe::verify_oop_mask()); + __ andq(c_rarg2, c_rarg3); +- __ movptr(c_rarg3, (int64_t) Universe::verify_oop_bits()); ++ __ movptr(c_rarg3, (intptr_t) Universe::verify_oop_bits()); + __ cmpq(c_rarg2, c_rarg3); + __ jcc(Assembler::notZero, error); + +@@ -953,9 +953,9 @@ class StubGenerator: public StubCodeGene + __ jcc(Assembler::zero, error); // if klass is NULL it is broken + // Check if the klass is in the right area of memory + __ movq(c_rarg2, rax); +- __ movptr(c_rarg3, (int64_t) Universe::verify_klass_mask()); ++ __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_mask()); + __ andq(c_rarg2, c_rarg3); +- __ movptr(c_rarg3, (int64_t) Universe::verify_klass_bits()); ++ __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_bits()); + __ cmpq(c_rarg2, c_rarg3); + __ jcc(Assembler::notZero, error); + +@@ -964,9 +964,9 @@ class StubGenerator: public StubCodeGene + __ testq(rax, rax); + __ jcc(Assembler::zero, error); // if klass' klass is NULL it is broken + // Check if the klass' klass is in the right area of memory +- __ movptr(c_rarg3, (int64_t) Universe::verify_klass_mask()); ++ __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_mask()); + __ andq(rax, c_rarg3); +- __ movptr(c_rarg3, (int64_t) Universe::verify_klass_bits()); ++ __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_bits()); + __ cmpq(rax, c_rarg3); + __ jcc(Assembler::notZero, error); + +diff -upr ../orig/hotspot/src/cpu/x86/vm/x86_32.ad ./hotspot/src/cpu/x86/vm/x86_32.ad +--- ../orig/hotspot/src/cpu/x86/vm/x86_32.ad 2009-01-27 15:41:00.000000000 -0500 ++++ ./hotspot/src/cpu/x86/vm/x86_32.ad 2009-05-04 17:37:17.000000000 -0400 +@@ -3364,7 +3364,7 @@ encode %{ + masm.movl (Address(boxReg, 0), 3) ; // results in ST-before-CAS penalty + masm.get_thread (scrReg) ; + masm.movl (boxReg, tmpReg); // consider: LEA box, [tmp-2] +- masm.movl (tmpReg, 0); // consider: xor vs mov ++ masm.movl (tmpReg, NULL_WORD); // consider: xor vs mov + if (os::is_MP()) { masm.lock(); } + masm.cmpxchg (scrReg, Address(boxReg, ObjectMonitor::owner_offset_in_bytes()-2)) ; + } else +@@ -3383,7 +3383,7 @@ encode %{ + + if ((EmitSync & 64) == 0) { + // Optimistic form: consider XORL tmpReg,tmpReg +- masm.movl (tmpReg, 0 ) ; ++ masm.movl (tmpReg, NULL_WORD ) ; + } else { + // Can suffer RTS->RTO upgrades on shared or cold $ lines + // Test-And-CAS instead of CAS +@@ -3589,7 +3589,7 @@ encode %{ + masm.orl (boxReg, Address (tmpReg, ObjectMonitor::EntryList_offset_in_bytes()-2)) ; + masm.orl (boxReg, Address (tmpReg, ObjectMonitor::cxq_offset_in_bytes()-2)) ; + masm.jccb (Assembler::notZero, DONE_LABEL) ; +- masm.movl (Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), 0) ; ++ masm.movl (Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), NULL_WORD) ; + masm.jmpb (DONE_LABEL) ; + } else { + masm.xorl (boxReg, Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2)) ; +@@ -3598,7 +3598,7 @@ encode %{ + masm.movl (boxReg, Address (tmpReg, ObjectMonitor::EntryList_offset_in_bytes()-2)) ; + masm.orl (boxReg, Address (tmpReg, ObjectMonitor::cxq_offset_in_bytes()-2)) ; + masm.jccb (Assembler::notZero, CheckSucc) ; +- masm.movl (Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), 0) ; ++ masm.movl (Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), NULL_WORD) ; + masm.jmpb (DONE_LABEL) ; + } + +@@ -3646,7 +3646,7 @@ encode %{ + // We currently use (3), although it's likely that switching to (2) + // is correct for the future. + +- masm.movl (Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), 0) ; ++ masm.movl (Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), NULL_WORD) ; + if (os::is_MP()) { + if (VM_Version::supports_sse2() && 1 == FenceInstruction) { + masm.emit_raw (0x0F) ; // MFENCE ... +diff -upr ../orig/hotspot/src/os/bsd/launcher/java_md.c ./hotspot/src/os/bsd/launcher/java_md.c +--- ../orig/hotspot/src/os/bsd/launcher/java_md.c 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/launcher/java_md.c 2009-05-05 17:57:18.000000000 -0400 +@@ -45,8 +45,15 @@ + #include "version_comp.h" + #endif + ++#ifdef __APPLE__ ++#define JVM_DLL "libjvm.dylib" ++#define JAVA_DLL "libjava.dylib" ++#define LD_LIBRARY_PATH "DYLD_LIBRARY_PATH" ++#else + #define JVM_DLL "libjvm.so" + #define JAVA_DLL "libjava.so" ++#define LD_LIBRARY_PATH "LD_LIBRARY_PATH" ++#endif + + #ifndef GAMMA /* launcher.make defines ARCH */ + +@@ -112,7 +119,7 @@ extern char **environ; + * A collection of useful strings. One should think of these as #define + * entries, but actual strings can be more efficient (with many compilers). + */ +-#ifdef __bsd__ ++#ifdef _ALLBSD_SOURCE + static const char *system_dir = "/usr/java"; + static const char *user_dir = "/java"; + #else /* Solaris */ +@@ -456,10 +463,10 @@ CreateExecutionEnvironment(int *_argcp, + * If not on Solaris, assume only a single LD_LIBRARY_PATH + * variable. + */ +- runpath = getenv("LD_LIBRARY_PATH"); ++ runpath = getenv(LD_LIBRARY_PATH); + #endif /* __sun */ + +-#ifdef __bsd ++#ifdef _ALLBSD_SOURCE + /* + * On bsd, if a binary is running as sgid or suid, glibc sets + * LD_LIBRARY_PATH to the empty string for security purposes. (In +@@ -836,7 +843,7 @@ GetXUsagePath(char *buf, jint bufsize) + jboolean + GetApplicationHome(char *buf, jint bufsize) + { +-#ifdef __bsd__ ++#ifdef _ALLBSD_SOURCE + char *execname = GetExecname(); + if (execname) { + strncpy(buf, execname, bufsize-1); +@@ -1005,7 +1012,7 @@ SetExecname(char **argv) + } + } + } +-#elif defined(__bsd__) ++#elif defined(__linux__) + { + const char* self = "/proc/self/exe"; + char buf[PATH_MAX+1]; +@@ -1015,7 +1022,7 @@ SetExecname(char **argv) + exec_path = strdup(buf); + } + } +-#else /* !__sun && !__bsd */ ++#else /* !__sun && !__linux */ + { + /* Not implemented */ + } +@@ -1220,7 +1227,7 @@ get_cpuid(uint32_t arg, + + #endif /* __sun && i586 */ + +-#if defined(__bsd__) && defined(i586) ++#if defined(_ALLBSD_SOURCE) && defined(i586) + + /* + * A utility method for asking the CPU about itself. +@@ -1286,7 +1293,7 @@ get_cpuid(uint32_t arg, + #endif + } + +-#endif /* __bsd__ && i586 */ ++#endif /* _ALLBSD_SOURCE && i586 */ + + #ifdef i586 + /* +@@ -1465,7 +1472,7 @@ solaris_i586_ServerClassMachine(void) { + + #endif /* __sun && i586 */ + +-#if defined(__bsd__) && defined(i586) ++#if defined(_ALLBSD_SOURCE) && defined(i586) + + /* The definition of a server-class machine for bsd-i586 */ + jboolean +@@ -1496,7 +1503,7 @@ bsd_i586_ServerClassMachine(void) { + return result; + } + +-#endif /* __bsd__ && i586 */ ++#endif /* _ALLBSD_SOURCE && i586 */ + + /* Dispatch to the platform-specific definition of "server-class" */ + jboolean +@@ -1506,7 +1513,7 @@ ServerClassMachine(void) { + result = solaris_sparc_ServerClassMachine(); + #elif defined(__sun) && defined(i586) + result = solaris_i586_ServerClassMachine(); +-#elif defined(__bsd__) && defined(i586) ++#elif defined(_ALLBSD_SOURCE) && defined(i586) + result = bsd_i586_ServerClassMachine(); + #else + if (_launcher_debug) { +diff -upr ../orig/hotspot/src/os/bsd/vm/attachListener_bsd.cpp ./hotspot/src/os/bsd/vm/attachListener_bsd.cpp +--- ../orig/hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2009-05-05 17:58:29.000000000 -0400 +@@ -333,6 +333,15 @@ BsdAttachOperation* BsdAttachListener::d + + // get the credentials of the peer and check the effective uid/guid + // - check with jeff on this. ++#ifdef _ALLBSD_SOURCE ++ uid_t puid; ++ gid_t pgid; ++ if (::getpeereid(s, &puid, &pgid) != 0) { ++ int res; ++ RESTARTABLE(::close(s), res); ++ continue; ++ } ++#else + struct ucred cred_info; + socklen_t optlen = sizeof(cred_info); + if (::getsockopt(s, SOL_SOCKET, SO_PEERCRED, (void*)&cred_info, &optlen) == -1) { +@@ -340,10 +349,13 @@ BsdAttachOperation* BsdAttachListener::d + RESTARTABLE(::close(s), res); + continue; + } ++ uid_t puid = cred_info.uid; ++ gid_t pgid = cred_info.gid; ++#endif + uid_t euid = geteuid(); + gid_t egid = getegid(); + +- if (cred_info.uid != euid || cred_info.gid != egid) { ++ if (puid != euid || pgid != egid) { + int res; + RESTARTABLE(::close(s), res); + continue; +@@ -466,11 +478,11 @@ bool AttachListener::is_init_trigger() { + char fn[32]; + sprintf(fn, ".attach_pid%d", os::current_process_id()); + int ret; +- struct stat64 st; +- RESTARTABLE(::stat64(fn, &st), ret); ++ struct stat st; ++ RESTARTABLE(::stat(fn, &st), ret); + if (ret == -1) { + sprintf(fn, "/tmp/.attach_pid%d", os::current_process_id()); +- RESTARTABLE(::stat64(fn, &st), ret); ++ RESTARTABLE(::stat(fn, &st), ret); + } + if (ret == 0) { + // simple check to avoid starting the attach mechanism when +Only in ./hotspot/src/os/bsd/vm: dtraceJSDT_bsd.cpp +diff -upr ../orig/hotspot/src/os/bsd/vm/hpi_bsd.cpp ./hotspot/src/os/bsd/vm/hpi_bsd.cpp +--- ../orig/hotspot/src/os/bsd/vm/hpi_bsd.cpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/vm/hpi_bsd.cpp 2009-05-05 18:00:58.000000000 -0400 +@@ -31,6 +31,14 @@ + # include + # include + ++#ifdef __APPLE__ ++#define HPI_LIB "libhpi.dylib" ++#define HPI_G_LIB "libhpi.dylib" ++#else ++#define HPI_LIB "libhpi.so" ++#define HPI_G_LIB "libhpi.so" ++#endif ++ + typedef jint (JNICALL *init_t)(GetInterfaceFunc *, void *); + + void hpi::initialize_get_interface(vm_calls_t *callbacks) { +@@ -48,11 +56,11 @@ void hpi::initialize_get_interface(vm_ca + os::jvm_path(buf, JVM_MAXPATHLEN); + + #ifdef PRODUCT +- const char * hpi_lib = "/libhpi.so"; ++ const char * hpi_lib = "/" HPI_LIB; + #else + char * ptr = strrchr(buf, '/'); + assert(strstr(ptr, "/libjvm") == ptr, "invalid library name"); +- const char * hpi_lib = strstr(ptr, "_g") ? "/libhpi_g.so" : "/libhpi.so"; ++ const char * hpi_lib = strstr(ptr, "_g") ? "/" HPI_G_LIB : "/" HPI_LIB; + #endif + + *(strrchr(buf, '/')) = '\0'; /* get rid of /libjvm.so */ +diff -upr ../orig/hotspot/src/os/bsd/vm/hpi_bsd.hpp ./hotspot/src/os/bsd/vm/hpi_bsd.hpp +--- ../orig/hotspot/src/os/bsd/vm/hpi_bsd.hpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/vm/hpi_bsd.hpp 2009-05-05 18:12:24.000000000 -0400 +@@ -39,26 +39,22 @@ + // HPI_FileInterface + + inline int hpi::close(int fd) { +- return ::close(fd); ++ RESTARTABLE_RETURN_INT(::close(fd)); + } + + inline size_t hpi::read(int fd, void *buf, unsigned int nBytes) { +- size_t res; +- RESTARTABLE( (size_t) ::read(fd, buf, (size_t) nBytes), res); +- return res; ++ INTERRUPTIBLE_RETURN_INT(::read(fd, buf, (size_t) nBytes), os::Bsd::clear_interrupted); + } + + inline size_t hpi::write(int fd, const void *buf, unsigned int nBytes) { +- size_t res; +- RESTARTABLE((size_t) ::write(fd, buf, (size_t) nBytes), res); +- return res; ++ INTERRUPTIBLE_RETURN_INT(::write(fd, buf, (size_t) nBytes), os::Bsd::clear_interrupted); + } + + + // HPI_SocketInterface + + inline int hpi::socket_close(int fd) { +- return ::close(fd); ++ RESTARTABLE_RETURN_INT(::close(fd)); + } + + inline int hpi::socket(int domain, int type, int protocol) { +@@ -66,11 +62,11 @@ inline int hpi::socket(int domain, int t + } + + inline int hpi::recv(int fd, char *buf, int nBytes, int flags) { +- RESTARTABLE_RETURN_INT(::recv(fd, buf, nBytes, (unsigned int) flags)); ++ INTERRUPTIBLE_RETURN_INT(::recv(fd, buf, nBytes, (unsigned int) flags), os::Bsd::clear_interrupted); + } + + inline int hpi::send(int fd, char *buf, int nBytes, int flags) { +- RESTARTABLE_RETURN_INT(::send(fd, buf, nBytes, (unsigned int) flags)); ++ INTERRUPTIBLE_RETURN_INT(::send(fd, buf, nBytes, (unsigned int) flags), os::Bsd::clear_interrupted); + } + + inline int hpi::timeout(int fd, long timeout) { +@@ -81,12 +77,13 @@ inline int hpi::timeout(int fd, long tim + prevtime = ((julong)t.tv_sec * 1000) + t.tv_usec / 1000; + + for(;;) { ++ int res; + struct pollfd pfd; + + pfd.fd = fd; + pfd.events = POLLIN | POLLERR; + +- int res = ::poll(&pfd, 1, timeout); ++ INTERRUPTIBLE_NORESTART(::poll(&pfd, 1, timeout), res, os::Bsd::clear_interrupted); + + if (res == OS_ERR && errno == EINTR) { + +@@ -110,7 +107,26 @@ inline int hpi::listen(int fd, int count + } + + inline int hpi::connect(int fd, struct sockaddr *him, int len) { +- RESTARTABLE_RETURN_INT(::connect(fd, him, len)); ++ do { ++ int _result; ++ INTERRUPTIBLE_NORESTART(::connect(fd, him, len), _result, ++ os::Bsd::clear_interrupted); ++ ++ // Depending on when thread interruption is reset, _result could be ++ // one of two values when errno == EINTR ++ ++ if (((_result == OS_INTRPT) || (_result == OS_ERR)) && (errno == EINTR)) { ++ /* restarting a connect() changes its errno semantics */ ++ INTERRUPTIBLE(::connect(fd, him, len), _result, ++ os::Bsd::clear_interrupted); ++ /* undo these changes */ ++ if (_result == OS_ERR) { ++ if (errno == EALREADY) errno = EINPROGRESS; /* fall through */ ++ else if (errno == EISCONN) { errno = 0; return OS_OK; } ++ } ++ } ++ return _result; ++ } while(false); + } + + inline int hpi::accept(int fd, struct sockaddr *him, int *len) { +@@ -121,26 +137,33 @@ inline int hpi::accept(int fd, struct so + // to 64 bits on some platform that we support. + // Bsd doc says this can't return EINTR, unlike accept() on Solaris + +- return ::accept(fd, him, (socklen_t *)len); ++ if (fd < 0) ++ return OS_ERR; ++ INTERRUPTIBLE_RETURN_INT((int)::accept(fd, him, (socklen_t*) len), os::Bsd::clear_interrupted); + } + + inline int hpi::recvfrom(int fd, char *buf, int nBytes, int flags, + sockaddr *from, int *fromlen) { +- RESTARTABLE_RETURN_INT(::recvfrom(fd, buf, nBytes, (unsigned int) flags, from, (socklen_t *)fromlen)); ++ INTERRUPTIBLE_RETURN_INT((int)::recvfrom(fd, buf, nBytes, (unsigned int) flags, from, (socklen_t *)fromlen), os::Bsd::clear_interrupted); + } + + inline int hpi::sendto(int fd, char *buf, int len, int flags, + struct sockaddr *to, int tolen) { +- RESTARTABLE_RETURN_INT(::sendto(fd, buf, len, (unsigned int) flags, to, tolen)); ++ INTERRUPTIBLE_RETURN_INT((int)::sendto(fd, buf, len, (unsigned int) flags, to, tolen),os::Bsd::clear_interrupted); + } + + inline int hpi::socket_available(int fd, jint *pbytes) { + // Bsd doc says EINTR not returned, unlike Solaris +- int ret = ::ioctl(fd, FIONREAD, pbytes); ++ int ret; ++ ++ if (fd < 0) ++ return OS_OK; ++ ++ RESTARTABLE(::ioctl(fd, FIONREAD, pbytes), ret); + + //%% note ioctl can return 0 when successful, JVM_SocketAvailable + // is expected to return 0 on failure and 1 on success to the jdk. +- return (ret < 0) ? 0 : 1; ++ return (ret == OS_ERR) ? 0 : 1; + } + + +@@ -167,7 +190,7 @@ HPIDECL(bind, "bind", _socket, Bind, + (fd, him, len)); + */ + inline int hpi::bind(int fd, struct sockaddr *him, int len){ +- return ::bind(fd, him, len); ++ INTERRUPTIBLE_RETURN_INT_NORESTART(::bind(fd, him, len),os::Bsd::clear_interrupted); + } + + /* +diff -upr ../orig/hotspot/src/os/bsd/vm/jsig.c ./hotspot/src/os/bsd/vm/jsig.c +--- ../orig/hotspot/src/os/bsd/vm/jsig.c 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/vm/jsig.c 2009-05-04 17:37:15.000000000 -0400 +@@ -146,7 +146,8 @@ sa_handler_t signal(int sig, sa_handler_ + } + + sa_handler_t sigset(int sig, sa_handler_t disp) { +- return set_signal(sig, disp, true); ++ printf("sigset() is not supported by BSD"); ++ exit(0); + } + + static int call_os_sigaction(int sig, const struct sigaction *act, +diff -upr ../orig/hotspot/src/os/bsd/vm/jvm_bsd.cpp ./hotspot/src/os/bsd/vm/jvm_bsd.cpp +--- ../orig/hotspot/src/os/bsd/vm/jvm_bsd.cpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/vm/jvm_bsd.cpp 2009-05-05 18:16:36.000000000 -0400 +@@ -141,44 +141,37 @@ struct siglabel { + + struct siglabel siglabels[] = { + /* derived from /usr/include/bits/signum.h on RH7.2 */ +- "HUP", SIGHUP, /* Hangup (POSIX). */ ++ "HUP", SIGHUP, /* Hangup (POSIX). */ + "INT", SIGINT, /* Interrupt (ANSI). */ + "QUIT", SIGQUIT, /* Quit (POSIX). */ + "ILL", SIGILL, /* Illegal instruction (ANSI). */ + "TRAP", SIGTRAP, /* Trace trap (POSIX). */ + "ABRT", SIGABRT, /* Abort (ANSI). */ +- "IOT", SIGIOT, /* IOT trap (4.2 BSD). */ +- "BUS", SIGBUS, /* BUS error (4.2 BSD). */ ++ "EMT", SIGEMT, /* EMT trap */ + "FPE", SIGFPE, /* Floating-point exception (ANSI). */ + "KILL", SIGKILL, /* Kill, unblockable (POSIX). */ +- "USR1", SIGUSR1, /* User-defined signal 1 (POSIX). */ ++ "BUS", SIGBUS, /* BUS error (4.2 BSD). */ + "SEGV", SIGSEGV, /* Segmentation violation (ANSI). */ +- "USR2", SIGUSR2, /* User-defined signal 2 (POSIX). */ ++ "SYS", SIGSYS, /* Bad system call. Only on some Bsden! */ + "PIPE", SIGPIPE, /* Broken pipe (POSIX). */ + "ALRM", SIGALRM, /* Alarm clock (POSIX). */ + "TERM", SIGTERM, /* Termination (ANSI). */ +-#ifdef SIGSTKFLT +- "STKFLT", SIGSTKFLT, /* Stack fault. */ +-#endif +- "CLD", SIGCLD, /* Same as SIGCHLD (System V). */ +- "CHLD", SIGCHLD, /* Child status has changed (POSIX). */ +- "CONT", SIGCONT, /* Continue (POSIX). */ ++ "URG", SIGURG, /* Urgent condition on socket (4.2 BSD). */ + "STOP", SIGSTOP, /* Stop, unblockable (POSIX). */ + "TSTP", SIGTSTP, /* Keyboard stop (POSIX). */ ++ "CONT", SIGCONT, /* Continue (POSIX). */ ++ "CHLD", SIGCHLD, /* Child status has changed (POSIX). */ + "TTIN", SIGTTIN, /* Background read from tty (POSIX). */ + "TTOU", SIGTTOU, /* Background write to tty (POSIX). */ +- "URG", SIGURG, /* Urgent condition on socket (4.2 BSD). */ ++ "IO", SIGIO, /* I/O now possible (4.2 BSD). */ + "XCPU", SIGXCPU, /* CPU limit exceeded (4.2 BSD). */ + "XFSZ", SIGXFSZ, /* File size limit exceeded (4.2 BSD). */ + "VTALRM", SIGVTALRM, /* Virtual alarm clock (4.2 BSD). */ + "PROF", SIGPROF, /* Profiling alarm clock (4.2 BSD). */ + "WINCH", SIGWINCH, /* Window size change (4.3 BSD, Sun). */ +- "POLL", SIGPOLL, /* Pollable event occurred (System V). */ +- "IO", SIGIO, /* I/O now possible (4.2 BSD). */ +- "PWR", SIGPWR, /* Power failure restart (System V). */ +-#ifdef SIGSYS +- "SYS", SIGSYS /* Bad system call. Only on some Bsden! */ +-#endif ++ "INFO", SIGINFO, /* Information request. */ ++ "USR1", SIGUSR1, /* User-defined signal 1 (POSIX). */ ++ "USR2", SIGUSR2 /* User-defined signal 2 (POSIX). */ + }; + + JVM_ENTRY_NO_ENV(jint, JVM_FindSignal(const char *name)) +diff -upr ../orig/hotspot/src/os/bsd/vm/jvm_bsd.h ./hotspot/src/os/bsd/vm/jvm_bsd.h +--- ../orig/hotspot/src/os/bsd/vm/jvm_bsd.h 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/vm/jvm_bsd.h 2009-05-05 18:16:44.000000000 -0400 +@@ -54,7 +54,11 @@ + #define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"} + + #define JNI_LIB_PREFIX "lib" ++#ifdef __APPLE__ ++#define JNI_LIB_SUFFIX ".dylib" ++#else + #define JNI_LIB_SUFFIX ".so" ++#endif + + // Hack: MAXPATHLEN is 4095 on some Bsd and 4096 on others. This may + // cause problems if JVM and the rest of JDK are built on different +@@ -93,6 +97,20 @@ + #define SHUTDOWN2_SIGNAL SIGINT + #define SHUTDOWN3_SIGNAL SIGTERM + ++#ifndef SIGRTMIN ++#ifdef __OpenBSD__ ++#define SIGRTMIN 1 ++#else ++#define SIGRTMIN 33 ++#endif ++#endif ++#ifndef SIGRTMAX ++#ifdef __OpenBSD__ ++#define SIGRTMAX 31 ++#else ++#define SIGRTMAX 63 ++#endif ++#endif + #endif /* JVM_MD_H */ + + // Reconciliation History +diff -upr ../orig/hotspot/src/os/bsd/vm/osThread_bsd.cpp ./hotspot/src/os/bsd/vm/osThread_bsd.cpp +--- ../orig/hotspot/src/os/bsd/vm/osThread_bsd.cpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/vm/osThread_bsd.cpp 2009-05-05 18:19:09.000000000 -0400 +@@ -31,8 +31,8 @@ + + void OSThread::pd_initialize() { + assert(this != NULL, "check"); +- _thread_id = 0; +- _pthread_id = 0; ++ _thread_id = NULL; ++ _pthread_id = NULL; + _siginfo = NULL; + _ucontext = NULL; + _expanding_stack = 0; +diff -upr ../orig/hotspot/src/os/bsd/vm/osThread_bsd.hpp ./hotspot/src/os/bsd/vm/osThread_bsd.hpp +--- ../orig/hotspot/src/os/bsd/vm/osThread_bsd.hpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/vm/osThread_bsd.hpp 2009-05-05 20:37:04.000000000 -0400 +@@ -39,6 +39,12 @@ + + private: + ++#ifdef _ALLBSD_SOURCE ++ // _thread_id and _pthread_id are the same on BSD ++ // keep both to minimize code divergence in os_bsd.cpp ++ pthread_t _thread_id; ++ pthread_t _pthread_id; ++#else + // _thread_id is kernel thread id (similar to LWP id on Solaris). Each + // thread has a unique thread_id (BsdThreads or NPTL). It can be used + // to access /proc. +@@ -47,6 +53,7 @@ + // _pthread_id is the pthread id, which is used by library calls + // (e.g. pthread_kill). + pthread_t _pthread_id; ++#endif + + sigset_t _caller_sigmask; // Caller's signal mask + +@@ -56,12 +63,18 @@ + sigset_t caller_sigmask() const { return _caller_sigmask; } + void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; } + ++#ifdef _ALLBSD_SOURCE ++ pthread_t thread_id() const { ++ return _thread_id; ++ } ++#else + pid_t thread_id() const { + return _thread_id; + } ++#endif + #ifndef PRODUCT + // Used for debugging, return a unique integer for each thread. +- int thread_identifier() const { return _thread_id; } ++ intptr_t thread_identifier() const { return (intptr_t)_pthread_id; } + #endif + #ifdef ASSERT + // We expect no reposition failures so kill vm if we get one. +@@ -70,9 +83,15 @@ + return false; + } + #endif // ASSERT ++#ifdef _ALLBSD_SOURCE ++ void set_thread_id(pthread_t id) { ++ _thread_id = id; ++ } ++#else + void set_thread_id(pid_t id) { + _thread_id = id; + } ++#endif + pthread_t pthread_id() const { + return _pthread_id; + } +@@ -123,6 +142,9 @@ public: + + private: + Monitor* _startThread_lock; // sync parent and child in thread creation ++#ifdef _ALLBSD_SOURCE ++ JavaThreadState _saved_interrupt_thread_state; // the thread state before a system call -- restored afterward ++#endif + + public: + +@@ -130,6 +152,11 @@ public: + return _startThread_lock; + } + ++#ifdef _ALLBSD_SOURCE ++ JavaThreadState saved_interrupt_thread_state() { return _saved_interrupt_thread_state; } ++ void set_saved_interrupt_thread_state(JavaThreadState state) { _saved_interrupt_thread_state = state; } ++#endif ++ + // *************************************************************** + // Platform dependent initialization and cleanup + // *************************************************************** +diff -upr ../orig/hotspot/src/os/bsd/vm/os_bsd.cpp ./hotspot/src/os/bsd/vm/os_bsd.cpp +--- ../orig/hotspot/src/os/bsd/vm/os_bsd.cpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/vm/os_bsd.cpp 2009-05-04 17:37:17.000000000 -0400 +@@ -50,12 +50,33 @@ + # include + # include + # include ++#ifdef _ALLBSD_SOURCE ++# include ++# include ++#else + # include + # include + # include ++#endif + # include + # include ++ ++#ifndef __APPLE__ + # include ++#endif ++ ++#if defined(__FreeBSD__) ++# include ++#endif ++ ++#ifdef __APPLE__ ++#include // semaphore_* API ++#include ++#endif ++ ++#ifndef MAP_ANONYMOUS ++#define MAP_ANONYMOUS MAP_ANON ++#endif + + #define MAX_PATH (2 * K) + +@@ -67,19 +88,25 @@ + // global variables + julong os::Bsd::_physical_memory = 0; + ++#ifndef _ALLBSD_SOURCE + address os::Bsd::_initial_thread_stack_bottom = NULL; + uintptr_t os::Bsd::_initial_thread_stack_size = 0; ++#endif + + int (*os::Bsd::_clock_gettime)(clockid_t, struct timespec *) = NULL; ++#ifndef _ALLBSD_SOURCE + int (*os::Bsd::_pthread_getcpuclockid)(pthread_t, clockid_t *) = NULL; + Mutex* os::Bsd::_createThread_lock = NULL; ++#endif + pthread_t os::Bsd::_main_thread; + int os::Bsd::_page_size = -1; ++#ifndef _ALLBSD_SOURCE + bool os::Bsd::_is_floating_stack = false; + bool os::Bsd::_is_NPTL = false; + bool os::Bsd::_supports_fast_thread_cpu_time = false; + const char * os::Bsd::_glibc_version = NULL; + const char * os::Bsd::_libpthread_version = NULL; ++#endif + + static jlong initial_time_count=0; + +@@ -97,6 +124,77 @@ static pid_t _initial_pid = 0; + static int SR_signum = SIGUSR2; + sigset_t SR_sigset; + ++#ifdef _ALLBSD_SOURCE ++// XXXBSD: ported from solaris version ++// interruptible infrastructure ++ ++// setup_interruptible saves the thread state before going into an ++// interruptible system call. ++// The saved state is used to restore the thread to ++// its former state whether or not an interrupt is received. ++// Used by classloader os::read ++// hpi calls skip this layer and stay in _thread_in_native ++ ++void os::Bsd::setup_interruptible(JavaThread* thread) { ++ ++ JavaThreadState thread_state = thread->thread_state(); ++ ++ assert(thread_state != _thread_blocked, "Coming from the wrong thread"); ++ assert(thread_state != _thread_in_native, "Native threads skip setup_interruptible"); ++ OSThread* osthread = thread->osthread(); ++ osthread->set_saved_interrupt_thread_state(thread_state); ++ thread->frame_anchor()->make_walkable(thread); ++ ThreadStateTransition::transition(thread, thread_state, _thread_blocked); ++} ++ ++// Version of setup_interruptible() for threads that are already in ++// _thread_blocked. Used by os_sleep(). ++void os::Bsd::setup_interruptible_already_blocked(JavaThread* thread) { ++ thread->frame_anchor()->make_walkable(thread); ++} ++ ++JavaThread* os::Bsd::setup_interruptible() { ++ JavaThread* thread = (JavaThread*)ThreadLocalStorage::thread(); ++ setup_interruptible(thread); ++ return thread; ++} ++ ++#ifdef ASSERT ++ ++JavaThread* os::Bsd::setup_interruptible_native() { ++ JavaThread* thread = (JavaThread*)ThreadLocalStorage::thread(); ++ JavaThreadState thread_state = thread->thread_state(); ++ assert(thread_state == _thread_in_native, "Assumed thread_in_native"); ++ return thread; ++} ++ ++void os::Bsd::cleanup_interruptible_native(JavaThread* thread) { ++ JavaThreadState thread_state = thread->thread_state(); ++ assert(thread_state == _thread_in_native, "Assumed thread_in_native"); ++} ++#endif ++ ++// cleanup_interruptible reverses the effects of setup_interruptible ++// setup_interruptible_already_blocked() does not need any cleanup. ++ ++void os::Bsd::cleanup_interruptible(JavaThread* thread) { ++ OSThread* osthread = thread->osthread(); ++ ++ ThreadStateTransition::transition(thread, _thread_blocked, osthread->saved_interrupt_thread_state()); ++} ++ ++// I/O interruption related counters called in _INTERRUPTIBLE ++ ++void os::Bsd::bump_interrupted_before_count() { ++ RuntimeService::record_interrupted_before_count(); ++} ++ ++void os::Bsd::bump_interrupted_during_count() { ++ RuntimeService::record_interrupted_during_count(); ++} ++#endif ++ ++ + //////////////////////////////////////////////////////////////////////////////// + // utility functions + +@@ -108,11 +206,17 @@ julong os::available_memory() { + } + + julong os::Bsd::available_memory() { ++#ifdef _ALLBSD_SOURCE ++ // XXXBSD: this is just a stopgap implementation ++ return physical_memory() >> 2; ++#else ++ + // values in struct sysinfo are "unsigned long" + struct sysinfo si; + sysinfo(&si); + + return (julong)si.freeram * si.mem_unit; ++#endif + } + + julong os::physical_memory() { +@@ -160,6 +264,7 @@ bool os::have_special_privileges() { + } + + ++#ifndef _ALLBSD_SOURCE + #ifndef SYS_gettid + // i386: 224, ia64: 1105, amd64: 186, sparc 143 + #ifdef __ia64__ +@@ -174,6 +279,7 @@ bool os::have_special_privileges() { + #error define gettid for the arch + #endif + #endif ++#endif + + // Cpu architecture string + #if defined(IA64) +@@ -193,6 +299,7 @@ static char cpu_arch[] = "sparc"; + #endif + + ++#ifndef _ALLBSD_SOURCE + // pid_t gettid() + // + // Returns the kernel thread id of the currently running thread. Kernel +@@ -219,7 +326,47 @@ static bool unsafe_chroot_detected = fal + static const char *unstable_chroot_error = "/proc file system not found.\n" + "Java may be unstable running multithreaded in a chroot " + "environment on Bsd when /proc filesystem is not mounted."; ++#endif + ++#ifdef _ALLBSD_SOURCE ++void os::Bsd::initialize_system_info() { ++ int mib[2]; ++ size_t len; ++ int cpu_val; ++ u_long mem_val; ++ ++ /* get processors count via hw.ncpus sysctl */ ++ mib[0] = CTL_HW; ++ mib[1] = HW_NCPU; ++ len = sizeof(cpu_val); ++ if (sysctl(mib, 2, &cpu_val, &len, NULL, 0) != -1) ++ _processor_count = cpu_val; ++ ++ if (_processor_count < 1) ++ _processor_count = 1; // fallback ++ ++ /* get physical memory via hw.usermem sysctl (hw.usermem is used ++ * instead of hw.physmem because we need size of allocatable memory ++ */ ++ mib[0] = CTL_HW; ++ mib[1] = HW_USERMEM; ++ len = sizeof(mem_val); ++ if (sysctl(mib, 2, &mem_val, &len, NULL, 0) != -1) ++ _physical_memory = mem_val; ++ else ++ _physical_memory = 256*1024*1024; // fallback (XXXBSD?) ++ ++#ifdef __OpenBSD__ ++ { ++ // limit _physical_memory memory view on OpenBSD since ++ // datasize rlimit restricts us anyway. ++ struct rlimit limits; ++ getrlimit(RLIMIT_DATA, &limits); ++ _physical_memory = MIN2(_physical_memory, (julong)limits.rlim_cur); ++ } ++#endif ++} ++#else + void os::Bsd::initialize_system_info() { + _processor_count = sysconf(_SC_NPROCESSORS_CONF); + if (_processor_count == 1) { +@@ -236,6 +383,7 @@ void os::Bsd::initialize_system_info() { + _physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * (julong)sysconf(_SC_PAGESIZE); + assert(_processor_count > 0, "bsd error"); + } ++#endif + + void os::init_system_properties_values() { + // char arch[12]; +@@ -356,7 +504,12 @@ void os::init_system_properties_values() + * should always exist (until the legacy problem cited above is + * addressed). + */ ++#ifdef __APPLE__ ++ char *v = getenv("DYLD_LIBRARY_PATH"); ++#else + char *v = getenv("LD_LIBRARY_PATH"); ++#endif ++ + if (v != NULL) { + char *t = ld_library_path; + /* That's +1 for the colon and +1 for the trailing '\0' */ +@@ -515,6 +668,7 @@ void os::Bsd::hotspot_sigmask(Thread* th + } + } + ++#ifndef _ALLBSD_SOURCE + ////////////////////////////////////////////////////////////////////////////// + // detecting pthread library + +@@ -679,6 +833,7 @@ bool os::Bsd::manually_expand_stack(Java + } + return false; + } ++#endif + + ////////////////////////////////////////////////////////////////////////////// + // create new thread +@@ -687,6 +842,9 @@ static address highest_vm_reserved_addre + + // check if it's safe to start a new thread + static bool _thread_safety_check(Thread* thread) { ++#ifdef _ALLBSD_SOURCE ++ return true; ++#else + if (os::Bsd::is_BsdThreads() && !os::Bsd::is_floating_stack()) { + // Fixed stack BsdThreads (SuSE Bsd/x86, and some versions of Redhat) + // Heap is mmap'ed at lower end of memory space. Thread stacks are +@@ -720,6 +878,7 @@ static bool _thread_safety_check(Thread* + // here, that means enough space has been reserved for stack. + return true; + } ++#endif + } + + // Thread start routine for all newly created threads +@@ -747,6 +906,10 @@ static void *java_start(Thread *thread) + return NULL; + } + ++#ifdef _ALLBSD_SOURCE ++ // thread_id is pthread_id on BSD ++ osthread->set_thread_id(::pthread_self()); ++#else + // thread_id is kernel thread id (similar to Solaris LWP id) + osthread->set_thread_id(os::Bsd::gettid()); + +@@ -756,6 +919,7 @@ static void *java_start(Thread *thread) + thread->set_lgrp_id(lgrp_id); + } + } ++#endif + // initialize signal mask for this thread + os::Bsd::hotspot_sigmask(thread); + +@@ -836,17 +1000,22 @@ bool os::create_thread(Thread* thread, T + // let pthread_create() pick the default value. + } + ++#ifndef _ALLBSD_SOURCE + // glibc guard page + pthread_attr_setguardsize(&attr, os::Bsd::default_guard_size(thr_type)); ++#endif + + ThreadState state; + + { ++ ++#ifndef _ALLBSD_SOURCE + // Serialize thread creation if we are running with fixed stack BsdThreads + bool lock = os::Bsd::is_BsdThreads() && !os::Bsd::is_floating_stack(); + if (lock) { + os::Bsd::createThread_lock()->lock_without_safepoint_check(); + } ++#endif + + pthread_t tid; + int ret = pthread_create(&tid, &attr, (void* (*)(void*)) java_start, thread); +@@ -860,7 +1029,9 @@ bool os::create_thread(Thread* thread, T + // Need to clean up stuff we've allocated so far + thread->set_osthread(NULL); + delete osthread; ++#ifndef _ALLBSD_SOURCE + if (lock) os::Bsd::createThread_lock()->unlock(); ++#endif + return false; + } + +@@ -876,9 +1047,11 @@ bool os::create_thread(Thread* thread, T + } + } + ++#ifndef _ALLBSD_SOURCE + if (lock) { + os::Bsd::createThread_lock()->unlock(); + } ++#endif + } + + // Aborted due to thread limit being reached +@@ -916,7 +1089,11 @@ bool os::create_attached_thread(JavaThre + } + + // Store pthread info into the OSThread ++#ifdef _ALLBSD_SOURCE ++ osthread->set_thread_id(::pthread_self()); ++#else + osthread->set_thread_id(os::Bsd::gettid()); ++#endif + osthread->set_pthread_id(::pthread_self()); + + // initialize floating point control register +@@ -927,6 +1104,7 @@ bool os::create_attached_thread(JavaThre + + thread->set_osthread(osthread); + ++#ifndef _ALLBSD_SOURCE + if (UseNUMA) { + int lgrp_id = os::numa_get_group_id(); + if (lgrp_id != -1) { +@@ -953,6 +1131,7 @@ bool os::create_attached_thread(JavaThre + os::Bsd::manually_expand_stack(jt, addr); + osthread->clear_expanding_stack(); + } ++#endif + + // initialize signal mask for this thread + // and save the caller's signal mask +@@ -1011,6 +1190,7 @@ extern "C" Thread* get_thread() { + ////////////////////////////////////////////////////////////////////////////// + // initial thread + ++#ifndef _ALLBSD_SOURCE + // Check if current thread is the initial thread, similar to Solaris thr_main. + bool os::Bsd::is_initial_thread(void) { + char dummy; +@@ -1241,6 +1421,7 @@ void os::Bsd::capture_initial_stack(size + _initial_thread_stack_size = align_size_down(_initial_thread_stack_size, page_size()); + _initial_thread_stack_bottom = (address)stack_top - _initial_thread_stack_size; + } ++#endif + + //////////////////////////////////////////////////////////////////////////////// + // time support +@@ -1279,6 +1460,21 @@ jlong os::javaTimeMillis() { + #define CLOCK_MONOTONIC (1) + #endif + ++#ifdef __APPLE__ ++void os::Bsd::clock_init() { ++ // XXXDARWIN: Investigate replacement monotonic clock ++} ++#elif defined(_ALLBSD_SOURCE) ++void os::Bsd::clock_init() { ++ struct timespec res; ++ struct timespec tp; ++ if (::clock_getres(CLOCK_MONOTONIC, &res) == 0 && ++ ::clock_gettime(CLOCK_MONOTONIC, &tp) == 0) { ++ // yes, monotonic clock is supported ++ _clock_gettime = ::clock_gettime; ++ } ++} ++#else + void os::Bsd::clock_init() { + // we do dlopen's in this particular order due to bug in bsd + // dynamical loader (see 6348968) leading to crash on exit +@@ -1314,7 +1510,9 @@ void os::Bsd::clock_init() { + } + } + } ++#endif + ++#ifndef _ALLBSD_SOURCE + #ifndef SYS_clock_getres + + #if defined(IA32) || defined(AMD64) +@@ -1353,6 +1551,7 @@ void os::Bsd::fast_thread_clock_init() { + _pthread_getcpuclockid = pthread_getcpuclockid_func; + } + } ++#endif + + jlong os::javaTimeNanos() { + if (Bsd::supports_monotonic_clock()) { +@@ -1499,7 +1698,14 @@ int os::current_process_id() { + + // DLL functions + +-const char* os::dll_file_extension() { return ".so"; } ++#define JNI_LIB_PREFIX "lib" ++#ifdef __APPLE__ ++#define JNI_LIB_SUFFIX ".dylib" ++#else ++#define JNI_LIB_SUFFIX ".so" ++#endif ++ ++const char* os::dll_file_extension() { return JNI_LIB_SUFFIX; } + + const char* os::get_temp_directory() { return "/tmp/"; } + +@@ -1540,6 +1746,23 @@ bool os::dll_address_to_function_name(ad + } + } + ++#ifdef _ALLBSD_SOURCE ++// ported from solaris version ++bool os::dll_address_to_library_name(address addr, char* buf, ++ int buflen, int* offset) { ++ Dl_info dlinfo; ++ ++ if (dladdr((void*)addr, &dlinfo)){ ++ if (buf) jio_snprintf(buf, buflen, "%s", dlinfo.dli_fname); ++ if (offset) *offset = addr - (address)dlinfo.dli_fbase; ++ return true; ++ } else { ++ if (buf) buf[0] = '\0'; ++ if (offset) *offset = -1; ++ return false; ++ } ++} ++#else + struct _address_to_library_name { + address addr; // input : memory address + size_t buflen; // size of fname +@@ -1614,11 +1837,27 @@ bool os::dll_address_to_library_name(add + return false; + } + } ++#endif + + // Loads .dll/.so and + // in case of error it checks if .dll/.so was built for the + // same architecture as Hotspot is running on ++ ++#ifdef __APPLE__ ++void * os::dll_load(const char *filename, char *ebuf, int ebuflen) { ++ void * result= ::dlopen(filename, RTLD_LAZY); ++ if (result != NULL) { ++ // Successful loading ++ return result; ++ } + ++ // Read system error message into ebuf ++ ::strncpy(ebuf, ::dlerror(), ebuflen-1); ++ ebuf[ebuflen-1]='\0'; ++ ++ return NULL; ++} ++#else + void * os::dll_load(const char *filename, char *ebuf, int ebuflen) + { + void * result= ::dlopen(filename, RTLD_LAZY); +@@ -1671,6 +1910,20 @@ void * os::dll_load(const char *filename + #define EM_486 6 /* Intel 80486 */ + #endif + ++ #ifndef EM_PPC64 ++ #define EM_PPC64 21 /* PowerPC64 */ ++ #endif ++ ++ #ifndef EM_IA_64 ++ #define EM_IA_64 50 /* HP/Intel IA-64 */ ++ #endif ++ ++ #ifndef EM_X86_64 ++ #define EM_X86_64 62 /* AMD x86-64 */ ++ #endif ++ ++ ++ + static const arch_t arch_array[]={ + {EM_386, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"}, + {EM_486, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"}, +@@ -1751,7 +2004,7 @@ void * os::dll_load(const char *filename + + return NULL; + } +- ++#endif /* !__APPLE__ */ + + + +@@ -1774,7 +2027,51 @@ bool _print_ascii_file(const char* filen + + void os::print_dll_info(outputStream *st) { + st->print_cr("Dynamic libraries:"); +- ++#ifdef _ALLBSD_SOURCE ++#ifdef RTLD_DI_LINKMAP ++ Dl_info dli; ++ void *handle; ++ Link_map *map; ++ Link_map *p; ++ ++ if (!dladdr(CAST_FROM_FN_PTR(void *, os::print_dll_info), &dli)) { ++ st->print_cr("Error: Cannot print dynamic libraries."); ++ return; ++ } ++ handle = dlopen(dli.dli_fname, RTLD_LAZY); ++ if (handle == NULL) { ++ st->print_cr("Error: Cannot print dynamic libraries."); ++ return; ++ } ++ dlinfo(handle, RTLD_DI_LINKMAP, &map); ++ if (map == NULL) { ++ st->print_cr("Error: Cannot print dynamic libraries."); ++ return; ++ } ++ ++ while (map->l_prev != NULL) ++ map = map->l_prev; ++ ++ while (map != NULL) { ++ st->print_cr(PTR_FORMAT " \t%s", map->l_addr, map->l_name); ++ map = map->l_next; ++ } ++ ++ dlclose(handle); ++#elif defined(__APPLE__) ++ uint32_t count; ++ uint32_t i; ++ ++ count = _dyld_image_count(); ++ for (i = 1; i < count; i++) { ++ const char *name = _dyld_get_image_name(i); ++ intptr_t slide = _dyld_get_image_vmaddr_slide(i); ++ st->print_cr(PTR_FORMAT " \t%s", slide, name); ++ } ++#else ++ st->print_cr("Error: Cannot print dynamic libraries."); ++#endif ++#else + char fname[32]; + pid_t pid = os::Bsd::gettid(); + +@@ -1783,6 +2080,7 @@ void os::print_dll_info(outputStream *st + if (!_print_ascii_file(fname, st)) { + st->print("Can not get library information for pid = %d\n", pid); + } ++#endif + } + + +@@ -1815,6 +2113,7 @@ void os::print_os_info(outputStream* st) + st->print(name.machine); + st->cr(); + ++#ifndef _ALLBSD_SOURCE + // Print warning if unsafe chroot environment detected + if (unsafe_chroot_detected) { + st->print("WARNING!! "); +@@ -1829,6 +2128,7 @@ void os::print_os_info(outputStream* st) + st->print("(%s stack)", os::Bsd::is_floating_stack() ? "floating" : "fixed"); + } + st->cr(); ++#endif + + // rlimit + st->print("rlimit:"); +@@ -1854,6 +2154,7 @@ void os::print_os_info(outputStream* st) + if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); + else st->print("%d", rlim.rlim_cur); + ++#ifndef _ALLBSD_SOURCE + st->print(", AS "); + getrlimit(RLIMIT_AS, &rlim); + if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); +@@ -1866,6 +2167,7 @@ void os::print_os_info(outputStream* st) + os::loadavg(loadavg, 3); + st->print("%0.02f %0.02f %0.02f", loadavg[0], loadavg[1], loadavg[2]); + st->cr(); ++#endif + } + + void os::print_memory_info(outputStream* st) { +@@ -1873,18 +2175,22 @@ void os::print_memory_info(outputStream* + st->print("Memory:"); + st->print(" %dk page", os::vm_page_size()>>10); + ++#ifndef _ALLBSD_SOURCE + // values in struct sysinfo are "unsigned long" + struct sysinfo si; + sysinfo(&si); ++#endif + + st->print(", physical " UINT64_FORMAT "k", + os::physical_memory() >> 10); + st->print("(" UINT64_FORMAT "k free)", + os::available_memory() >> 10); ++#ifndef _ALLBSD_SOURCE + st->print(", swap " UINT64_FORMAT "k", + ((jlong)si.totalswap * si.mem_unit) >> 10); + st->print("(" UINT64_FORMAT "k free)", + ((jlong)si.freeswap * si.mem_unit) >> 10); ++#endif + st->cr(); + } + +@@ -2108,19 +2414,29 @@ int os::sigexitnum_pd() { + static volatile jint pending_signals[NSIG+1] = { 0 }; + + // Bsd(POSIX) specific hand shaking semaphore. ++#ifdef __APPLE__ ++static semaphore_t sig_sem; ++#define SEM_INIT(sem, value) semaphore_create(mach_task_self(), &sem, SYNC_POLICY_FIFO, value) ++#define SEM_WAIT(sem) semaphore_wait(sem); ++#define SEM_POST(sem) semaphore_signal(sem); ++#else + static sem_t sig_sem; ++#define SEM_INIT(sem, value) sem_init(&sem, 0, value) ++#define SEM_WAIT(sem) sem_wait(&sem); ++#define SEM_POST(sem) sem_post(&sem); ++#endif + + void os::signal_init_pd() { + // Initialize signal structures + ::memset((void*)pending_signals, 0, sizeof(pending_signals)); + + // Initialize signal semaphore +- ::sem_init(&sig_sem, 0, 0); ++ ::SEM_INIT(sig_sem, 0); + } + + void os::signal_notify(int sig) { + Atomic::inc(&pending_signals[sig]); +- ::sem_post(&sig_sem); ++ ::SEM_POST(sig_sem); + } + + static int check_pending_signals(bool wait) { +@@ -2142,7 +2458,7 @@ static int check_pending_signals(bool wa + do { + thread->set_suspend_equivalent(); + // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() +- ::sem_wait(&sig_sem); ++ ::SEM_WAIT(sig_sem); + + // were we externally suspended while we were waiting? + threadIsSuspended = thread->handle_special_suspend_equivalent_condition(); +@@ -2153,7 +2469,7 @@ static int check_pending_signals(bool wa + // while suspended because that would surprise the thread that + // suspended us. + // +- ::sem_post(&sig_sem); ++ ::SEM_POST(sig_sem); + + thread->java_suspend_self(); + } +@@ -2224,10 +2540,16 @@ void bsd_wrap_code(char* base, size_t si + // left at the time of mmap(). This could be a potential + // problem. + bool os::commit_memory(char* addr, size_t size) { ++#ifdef __OpenBSD__ ++ // XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD ++ return mprotect(addr, size, PROT_READ|PROT_WRITE|PROT_EXEC) == 0; ++#else ++ + uintptr_t res = (uintptr_t) ::mmap(addr, size, + PROT_READ|PROT_WRITE|PROT_EXEC, + MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0); + return res != (uintptr_t) MAP_FAILED; ++#endif + } + + bool os::commit_memory(char* addr, size_t size, size_t alignment_hint) { +@@ -2351,6 +2673,9 @@ bool os::unguard_memory(char* addr, size + static size_t _large_page_size = 0; + + bool os::large_page_init() { ++#ifdef _ALLBSD_SOURCE ++ return false; ++#else + if (!UseLargePages) return false; + + if (LargePageSizeInBytes) { +@@ -2405,6 +2730,7 @@ bool os::large_page_init() { + // We optimistically assume the support is available. If later it turns out + // not true, VM will automatically switch to use regular page size. + return true; ++#endif + } + + #ifndef SHM_HUGETLB +@@ -2575,7 +2901,7 @@ char* os::attempt_reserve_memory_at(size + } + + size_t os::read(int fd, void *buf, unsigned int nBytes) { +- return ::read(fd, buf, nBytes); ++ INTERRUPTIBLE_RETURN_INT_VM(::read(fd, buf, nBytes), os::Bsd::clear_interrupted); + } + + // TODO-FIXME: reconcile Solaris' os::sleep with the bsd variation. +@@ -2711,6 +3037,44 @@ void os::loop_breaker(int attempts) { + // this reason, the code should not be used as default (ThreadPriorityPolicy=0). + // It is only used when ThreadPriorityPolicy=1 and requires root privilege. + ++#if defined(_ALLBSD_SOURCE) && !defined(__APPLE__) ++int os::java_to_os_priority[MaxPriority + 1] = { ++ 19, // 0 Entry should never be used ++ ++ 0, // 1 MinPriority ++ 3, // 2 ++ 6, // 3 ++ ++ 10, // 4 ++ 15, // 5 NormPriority ++ 18, // 6 ++ ++ 21, // 7 ++ 25, // 8 ++ 28, // 9 NearMaxPriority ++ ++ 31 // 10 MaxPriority ++}; ++#elif defined(__APPLE__) ++/* Using Mach high-level priority assignments */ ++int os::java_to_os_priority[MaxPriority + 1] = { ++ 0, // 0 Entry should never be used (MINPRI_USER) ++ ++ 27, // 1 MinPriority ++ 28, // 2 ++ 29, // 3 ++ ++ 30, // 4 ++ 31, // 5 NormPriority (BASEPRI_DEFAULT) ++ 32, // 6 ++ ++ 33, // 7 ++ 34, // 8 ++ 35, // 9 NearMaxPriority ++ ++ 36 // 10 MaxPriority ++}; ++#else + int os::java_to_os_priority[MaxPriority + 1] = { + 19, // 0 Entry should never be used + +@@ -2728,6 +3092,7 @@ int os::java_to_os_priority[MaxPriority + + -5 // 10 MaxPriority + }; ++#endif + + static int prio_init() { + if (ThreadPriorityPolicy == 1) { +@@ -2747,8 +3112,28 @@ static int prio_init() { + OSReturn os::set_native_priority(Thread* thread, int newpri) { + if ( !UseThreadPriorities || ThreadPriorityPolicy == 0 ) return OS_OK; + ++#ifdef __OpenBSD__ ++ // OpenBSD pthread_setprio starves low priority threads ++ return OS_OK; ++#elif defined(__FreeBSD__) ++ int ret = pthread_setprio(thread->osthread()->pthread_id(), newpri); ++#elif defined(__APPLE__) ++ struct sched_param sp; ++ int policy; ++ pthread_t self = pthread_self(); ++ ++ if (pthread_getschedparam(self, &policy, &sp) != 0) ++ return OS_ERR; ++ ++ sp.sched_priority = newpri; ++ if (pthread_setschedparam(self, policy, &sp) != 0) ++ return OS_ERR; ++ ++ return OS_OK; ++#else + int ret = setpriority(PRIO_PROCESS, thread->osthread()->thread_id(), newpri); + return (ret == 0) ? OS_OK : OS_ERR; ++#endif + } + + OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) { +@@ -2758,7 +3143,17 @@ OSReturn os::get_native_priority(const T + } + + errno = 0; ++#if defined(__OpenBSD__) || defined(__FreeBSD__) ++ *priority_ptr = pthread_getprio(thread->osthread()->pthread_id()); ++#elif defined(__APPLE__) ++ int policy; ++ struct sched_param sp; ++ ++ pthread_getschedparam(pthread_self(), &policy, &sp); ++ *priority_ptr = sp.sched_priority; ++#else + *priority_ptr = getpriority(PRIO_PROCESS, thread->osthread()->thread_id()); ++#endif + return (*priority_ptr != -1 || errno == 0 ? OS_OK : OS_ERR); + } + +@@ -2868,7 +3263,7 @@ static int SR_initialize() { + /* Get signal number to use for suspend/resume */ + if ((s = ::getenv("_JAVA_SR_SIGNUM")) != 0) { + int sig = ::strtol(s, 0, 10); +- if (sig > 0 || sig < _NSIG) { ++ if (sig > 0 || sig < NSIG) { + SR_signum = sig; + } + } +@@ -3211,6 +3606,28 @@ void os::Bsd::install_signal_handlers() + set_signal_handler(SIGFPE, true); + set_signal_handler(SIGXFSZ, true); + ++#if defined(__APPLE__) ++ // In Mac OS X 10.4, CrashReporter will write a crash log for all 'fatal' signals, including ++ // signals caught and handled by the JVM. To work around this, we reset the mach task ++ // signal handler that's placed on our process by CrashReporter. This disables ++ // CrashReporter-based reporting. ++ // ++ // This work-around is not necessary for 10.5+, as CrashReporter no longer intercedes ++ // on caught fatal signals. ++ // ++ // Additionally, gdb installs both standard BSD signal handlers, and mach exception ++ // handlers. By replacing the existing task exception handler, we disable gdb's mach ++ // exception handling, while leaving the standard BSD signal handlers functional. ++ kern_return_t kr; ++ kr = task_set_exception_ports(mach_task_self(), ++ EXC_MASK_BAD_ACCESS | EXC_MASK_ARITHMETIC, ++ MACH_PORT_NULL, ++ EXCEPTION_STATE_IDENTITY, ++ MACHINE_THREAD_STATE); ++ ++ assert(kr == KERN_SUCCESS, "could not set mach task signal handler"); ++#endif ++ + if (libjsig_is_loaded) { + // Tell libjsig jvm finishes setting signal handlers + (*end_signal_setting)(); +@@ -3231,6 +3648,7 @@ void os::Bsd::install_signal_handlers() + } + } + ++#ifndef _ALLBSD_SOURCE + // This is the fastest way to get thread cpu time on Bsd. + // Returns cpu time (user+sys) for any thread, not only for current. + // POSIX compliant clocks are implemented in the kernels 2.6.16+. +@@ -3245,6 +3663,7 @@ jlong os::Bsd::fast_thread_cpu_time(cloc + + return (tp.tv_sec * SEC_IN_NANOSECS) + tp.tv_nsec; + } ++#endif + + ///// + // glibc on Bsd platform uses non-documented flag +@@ -3466,13 +3885,13 @@ void os::init(void) { + + _initial_pid = (java_launcher_pid > 0) ? java_launcher_pid : getpid(); + +- clock_tics_per_sec = sysconf(_SC_CLK_TCK); ++ clock_tics_per_sec = CLK_TCK; + + init_random(1234567); + + ThreadCritical::initialize(); + +- Bsd::set_page_size(sysconf(_SC_PAGESIZE)); ++ Bsd::set_page_size(getpagesize()); + if (Bsd::page_size() == -1) { + fatal1("os_bsd.cpp: os::init: sysconf failed (%s)", strerror(errno)); + } +@@ -3485,6 +3904,16 @@ void os::init(void) { + + Bsd::clock_init(); + initial_time_count = os::elapsed_counter(); ++ ++#ifdef __APPLE__ ++ // XXXDARWIN ++ // Work around the unaligned VM callbacks in hotspot's ++ // sharedRuntime. The callbacks don't use SSE2 instructions, and work on ++ // Linux, Solaris, and FreeBSD. On Mac OS X, dyld (rightly so) enforces ++ // alignment when doing symbol lookup. To work around this, we force early ++ // binding of all symbols now, thus binding when alignment is known-good. ++ _dyld_bind_fully_image_containing_address((const void *) &os::init); ++#endif + } + + // To install functions for atexit system call +@@ -3497,7 +3926,9 @@ extern "C" { + // this is called _after_ the global arguments have been parsed + jint os::init_2(void) + { ++#ifndef _ALLBSD_SOURCE + Bsd::fast_thread_clock_init(); ++#endif + + // Allocate a single page and mark it as readable for safepoint polling + address polling_page = (address) ::mmap(NULL, Bsd::page_size(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); +@@ -3546,6 +3977,7 @@ jint os::init_2(void) + JavaThread::set_stack_size_at_create(round_to(threadStackSizeInBytes, + vm_page_size())); + ++#ifndef _ALLBSD_SOURCE + Bsd::capture_initial_stack(JavaThread::stack_size_at_create()); + + Bsd::libpthread_init(); +@@ -3554,6 +3986,7 @@ jint os::init_2(void) + Bsd::glibc_version(), Bsd::libpthread_version(), + Bsd::is_floating_stack() ? "floating stack" : "fixed stack"); + } ++#endif + + if (MaxFDLimit) { + // set the number of file descriptors to max. print out error +@@ -3565,6 +3998,14 @@ jint os::init_2(void) + perror("os::init_2 getrlimit failed"); + } else { + nbr_files.rlim_cur = nbr_files.rlim_max; ++ ++#ifdef __APPLE__ ++ // Darwin returns RLIM_INFINITY for rlim_max, but fails with EINVAL if ++ // you attempt to use RLIM_INFINITY. As per setrlimit(2), OPEN_MAX must ++ // be used instead ++ nbr_files.rlim_cur = MIN(OPEN_MAX, nbr_files.rlim_cur); ++#endif ++ + status = setrlimit(RLIMIT_NOFILE, &nbr_files); + if (status != 0) { + if (PrintMiscellaneous && (Verbose || WizardMode)) +@@ -3573,8 +4014,10 @@ jint os::init_2(void) + } + } + ++#ifndef _ALLBSD_SOURCE + // Initialize lock used to serialize thread creation (see os::create_thread) + Bsd::set_createThread_lock(new Mutex(Mutex::leaf, "createThread_lock", false)); ++#endif + + // Initialize HPI. + jint hpi_result = hpi::initialize(); +@@ -3621,11 +4064,16 @@ void os::make_polling_page_readable(void + }; + + int os::active_processor_count() { ++#ifdef _ALLBSD_SOURCE ++ return _processor_count; ++#else ++ + // Bsd doesn't yet have a (official) notion of processor sets, + // so just return the number of online processors. + int online_cpus = ::sysconf(_SC_NPROCESSORS_ONLN); + assert(online_cpus > 0 && online_cpus <= processor_count(), "sanity check"); + return online_cpus; ++#endif + } + + bool os::distribute_processes(uint length, uint* distribution) { +@@ -3667,6 +4115,9 @@ ExtendedPC os::get_thread_pc(Thread* thr + + int os::Bsd::safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime) + { ++#ifdef _ALLBSD_SOURCE ++ return pthread_cond_timedwait(_cond, _mutex, _abstime); ++#else + if (is_NPTL()) { + return pthread_cond_timedwait(_cond, _mutex, _abstime); + } else { +@@ -3682,6 +4133,7 @@ int os::Bsd::safe_cond_timedwait(pthread + #endif // IA64 + return status; + } ++#endif + } + + //////////////////////////////////////////////////////////////////////////////// +@@ -3817,17 +4269,17 @@ int os::create_binary_file(const char* p + if (!rewrite_existing) { + oflags |= O_EXCL; + } +- return ::open64(path, oflags, S_IREAD | S_IWRITE); ++ return ::open(path, oflags, S_IREAD | S_IWRITE); + } + + // return current position of file pointer + jlong os::current_file_offset(int fd) { +- return (jlong)::lseek64(fd, (off64_t)0, SEEK_CUR); ++ return (jlong)::lseek(fd, (off_t)0, SEEK_CUR); + } + + // move file pointer to the specified offset + jlong os::seek_to_file_offset(int fd, jlong offset) { +- return (jlong)::lseek64(fd, (off64_t)offset, SEEK_SET); ++ return (jlong)::lseek(fd, (off_t)offset, SEEK_SET); + } + + // Map a block of memory. +@@ -3877,6 +4329,7 @@ bool os::unmap_memory(char* addr, size_t + return munmap(addr, bytes) == 0; + } + ++#ifndef _ALLBSD_SOURCE + static jlong slow_thread_cpu_time(Thread *thread, bool user_sys_cpu_time); + + static clockid_t thread_cpu_clockid(Thread* thread) { +@@ -3888,6 +4341,7 @@ static clockid_t thread_cpu_clockid(Thre + assert(rc == 0, "pthread_getcpuclockid is expected to return 0 code"); + return clockid; + } ++#endif + + // current_thread_cpu_time(bool) and thread_cpu_time(Thread*, bool) + // are used by JVM M&M and JVMTI to get user+sys or user CPU time +@@ -3897,39 +4351,71 @@ static clockid_t thread_cpu_clockid(Thre + // the fast estimate available on the platform. + + jlong os::current_thread_cpu_time() { ++#ifdef __APPLE__ ++ return os::thread_cpu_time(Thread::current(), true /* user + sys */); ++#elif !defined(_ALLBSD_SOURCE) + if (os::Bsd::supports_fast_thread_cpu_time()) { + return os::Bsd::fast_thread_cpu_time(CLOCK_THREAD_CPUTIME_ID); + } else { + // return user + sys since the cost is the same + return slow_thread_cpu_time(Thread::current(), true /* user + sys */); + } ++#endif + } + + jlong os::thread_cpu_time(Thread* thread) { ++#ifndef _ALLBSD_SOURCE + // consistent with what current_thread_cpu_time() returns + if (os::Bsd::supports_fast_thread_cpu_time()) { + return os::Bsd::fast_thread_cpu_time(thread_cpu_clockid(thread)); + } else { + return slow_thread_cpu_time(thread, true /* user + sys */); + } ++#endif + } + + jlong os::current_thread_cpu_time(bool user_sys_cpu_time) { ++#ifdef __APPLE__ ++ return os::thread_cpu_time(Thread::current(), user_sys_cpu_time); ++#elif !defined(_ALLBSD_SOURCE) + if (user_sys_cpu_time && os::Bsd::supports_fast_thread_cpu_time()) { + return os::Bsd::fast_thread_cpu_time(CLOCK_THREAD_CPUTIME_ID); + } else { + return slow_thread_cpu_time(Thread::current(), user_sys_cpu_time); + } ++#endif + } + + jlong os::thread_cpu_time(Thread *thread, bool user_sys_cpu_time) { ++#ifdef __APPLE__ ++ struct thread_basic_info tinfo; ++ mach_msg_type_number_t tcount = THREAD_INFO_MAX; ++ kern_return_t kr; ++ mach_port_t mach_thread; ++ ++ mach_thread = pthread_mach_thread_np(thread->osthread()->thread_id()); ++ kr = thread_info(mach_thread, THREAD_BASIC_INFO, (thread_info_t)&tinfo, &tcount); ++ if (kr != KERN_SUCCESS) ++ return -1; ++ ++ if (user_sys_cpu_time) { ++ jlong nanos; ++ nanos = ((jlong) tinfo.system_time.seconds + tinfo.user_time.seconds) * (jlong)1000000000; ++ nanos += ((jlong) tinfo.system_time.microseconds + (jlong) tinfo.user_time.microseconds) * (jlong)1000; ++ return nanos; ++ } else { ++ return ((jlong)tinfo.user_time.seconds * 1000000000) + ((jlong)tinfo.user_time.microseconds * (jlong)1000); ++ } ++#elif !defined(_ALLBSD_SOURCE) + if (user_sys_cpu_time && os::Bsd::supports_fast_thread_cpu_time()) { + return os::Bsd::fast_thread_cpu_time(thread_cpu_clockid(thread)); + } else { + return slow_thread_cpu_time(thread, user_sys_cpu_time); + } ++#endif + } + ++#ifndef _ALLBSD_SOURCE + // + // -1 on error. + // +@@ -4018,6 +4504,7 @@ static jlong slow_thread_cpu_time(Thread + return (jlong)user_time * (1000000000 / clock_tics_per_sec); + } + } ++#endif + + void os::current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr) { + info_ptr->max_value = ALL_64_BITS; // will not wrap in less than 64 bits +@@ -4034,7 +4521,13 @@ void os::thread_cpu_time_info(jvmtiTimer + } + + bool os::is_thread_cpu_time_supported() { ++#ifdef __APPLE__ ++ return true; ++#elif defined(_ALLBSD_SOURCE) ++ return false; ++#else + return true; ++#endif + } + + // System loadavg support. Returns -1 if load average cannot be obtained. +@@ -4167,7 +4660,7 @@ jdk_pthread_sigmask(int how , const sigs + // abstime will be the absolute timeout time + // TODO: replace compute_abstime() with unpackTime() + +-static struct timespec* compute_abstime(timespec* abstime, jlong millis) { ++static struct timespec* compute_abstime(struct timespec* abstime, jlong millis) { + if (millis < 0) millis = 0; + struct timeval now; + int status = gettimeofday(&now, NULL); +@@ -4219,7 +4712,7 @@ void os::PlatformEvent::park() { / + status = pthread_cond_wait(_cond, _mutex); + // for some reason, under 2.7 lwp_cond_wait() may return ETIME ... + // Treat this the same as if the wait was interrupted +- if (status == ETIME) { status = EINTR; } ++ if (status == ETIMEDOUT) { status = EINTR; } + assert_status(status == 0 || status == EINTR, status, "cond_wait"); + } + -- _nParked ; +@@ -4277,10 +4770,10 @@ int os::PlatformEvent::park(jlong millis + pthread_cond_init (_cond, NULL) ; + } + assert_status(status == 0 || status == EINTR || +- status == ETIME || status == ETIMEDOUT, ++ status == ETIMEDOUT, + status, "cond_timedwait"); + if (!FilterSpuriousWakeups) break ; // previous semantics +- if (status == ETIME || status == ETIMEDOUT) break ; ++ if (status == ETIMEDOUT) break ; + // We consume and ignore EINTR and spurious wakeups. + } + --_nParked ; +@@ -4372,7 +4865,7 @@ void os::PlatformEvent::unpark() { + * years from "now". + */ + +-static void unpackTime(timespec* absTime, bool isAbsolute, jlong time) { ++static void unpackTime(struct timespec* absTime, bool isAbsolute, jlong time) { + assert (time > 0, "convertTime"); + + struct timeval now; +@@ -4431,7 +4924,7 @@ void Parker::park(bool isAbsolute, jlong + } + + // Next, demultiplex/decode time arguments +- timespec absTime; ++ struct timespec absTime; + if (time < 0) { // don't wait at all + return; + } +@@ -4484,7 +4977,7 @@ void Parker::park(bool isAbsolute, jlong + } + } + assert_status(status == 0 || status == EINTR || +- status == ETIME || status == ETIMEDOUT, ++ status == ETIMEDOUT, + status, "cond_timedwait"); + + #ifdef ASSERT +@@ -4526,14 +5019,12 @@ void Parker::unpark() { + } + + ++/* Darwin has no "environ" in a dynamic library. */ ++#ifdef __APPLE__ ++#include ++#define environ (*_NSGetEnviron()) ++#else + extern char** environ; +- +-#ifndef __NR_fork +-#define __NR_fork IA32_ONLY(2) IA64_ONLY(not defined) AMD64_ONLY(57) +-#endif +- +-#ifndef __NR_execve +-#define __NR_execve IA32_ONLY(11) IA64_ONLY(1033) AMD64_ONLY(59) + #endif + + // Run the specified command in a separate process. Return its exit value, +@@ -4548,8 +5039,7 @@ int os::fork_and_exec(char* cmd) { + // separate process to execve. Make a direct syscall to fork process. + // On IA64 there's no fork syscall, we have to use fork() and hope for + // the best... +- pid_t pid = NOT_IA64(syscall(__NR_fork);) +- IA64_ONLY(fork();) ++ pid_t pid = fork(); + + if (pid < 0) { + // fork failed +@@ -4565,8 +5055,7 @@ int os::fork_and_exec(char* cmd) { + // in the new process, so make a system call directly. + // IA64 should use normal execve() from glibc to match the glibc fork() + // above. +- NOT_IA64(syscall(__NR_execve, "/bin/sh", argv, environ);) +- IA64_ONLY(execve("/bin/sh", (char* const*)argv, environ);) ++ execve("/bin/sh", (char* const*)argv, environ); + + // execve failed + _exit(-1); +diff -upr ../orig/hotspot/src/os/bsd/vm/os_bsd.hpp ./hotspot/src/os/bsd/vm/os_bsd.hpp +--- ../orig/hotspot/src/os/bsd/vm/os_bsd.hpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/vm/os_bsd.hpp 2009-05-06 10:55:43.000000000 -0400 +@@ -30,6 +30,12 @@ + /* pthread_getattr_np comes with BsdThreads-0.9-7 on RedHat 7.1 */ + typedef int (*pthread_getattr_func_type) (pthread_t, pthread_attr_t *); + ++#ifdef __APPLE__ ++// Mac OS X doesn't support clock_gettime. Stub out the type, it is ++// unused ++typedef int clockid_t; ++#endif ++ + class Bsd { + friend class os; + +@@ -50,6 +56,7 @@ class Bsd { + static int sigflags[MAXSIGNUM]; + + static int (*_clock_gettime)(clockid_t, struct timespec *); ++#ifndef _ALLBSD_SOURCE + static int (*_pthread_getcpuclockid)(pthread_t, clockid_t *); + + static address _initial_thread_stack_bottom; +@@ -61,42 +68,79 @@ class Bsd { + static bool _is_floating_stack; + static bool _is_NPTL; + static bool _supports_fast_thread_cpu_time; ++#endif + + protected: + + static julong _physical_memory; + static pthread_t _main_thread; ++#ifndef _ALLBSD_SOURCE + static Mutex* _createThread_lock; ++#endif + static int _page_size; + + static julong available_memory(); + static julong physical_memory() { return _physical_memory; } + static void initialize_system_info(); + ++#ifndef _ALLBSD_SOURCE + static void set_glibc_version(const char *s) { _glibc_version = s; } + static void set_libpthread_version(const char *s) { _libpthread_version = s; } ++#endif + + static bool supports_variable_stack_size(); + ++#ifndef _ALLBSD_SOURCE + static void set_is_NPTL() { _is_NPTL = true; } + static void set_is_BsdThreads() { _is_NPTL = false; } + static void set_is_floating_stack() { _is_floating_stack = true; } ++#endif + + public: ++#ifdef _ALLBSD_SOURCE ++//XXXBSD: ported from solaris version ++ enum { ++ clear_interrupted = true ++ }; ++ static void setup_interruptible(JavaThread* thread); ++ static void setup_interruptible_already_blocked(JavaThread* thread); ++ static JavaThread* setup_interruptible(); ++ static void cleanup_interruptible(JavaThread* thread); ++ ++ // perf counter incrementers used by _INTERRUPTIBLE ++ ++ static void bump_interrupted_before_count(); ++ static void bump_interrupted_during_count(); ++ ++#ifdef ASSERT ++ static JavaThread* setup_interruptible_native(); ++ static void cleanup_interruptible_native(JavaThread* thread); ++#endif ++ ++#endif ++ + + static void init_thread_fpu_state(); ++#ifndef _ALLBSD_SOURCE + static int get_fpu_control_word(); + static void set_fpu_control_word(int fpu_control); ++#endif + static pthread_t main_thread(void) { return _main_thread; } ++ ++#ifndef _ALLBSD_SOURCE + // returns kernel thread id (similar to LWP id on Solaris), which can be + // used to access /proc + static pid_t gettid(); + static void set_createThread_lock(Mutex* lk) { _createThread_lock = lk; } + static Mutex* createThread_lock(void) { return _createThread_lock; } ++#endif + static void hotspot_sigmask(Thread* thread); + ++#ifndef _ALLBSD_SOURCE + static address initial_thread_stack_bottom(void) { return _initial_thread_stack_bottom; } + static uintptr_t initial_thread_stack_size(void) { return _initial_thread_stack_size; } ++#endif ++ + static bool is_initial_thread(void); + + static int page_size(void) { return _page_size; } +@@ -133,6 +177,7 @@ class Bsd { + static struct sigaction *get_chained_signal_action(int sig); + static bool chained_handler(int sig, siginfo_t* siginfo, void* context); + ++#ifndef _ALLBSD_SOURCE + // GNU libc and libpthread version strings + static const char *glibc_version() { return _glibc_version; } + static const char *libpthread_version() { return _libpthread_version; } +@@ -146,6 +191,7 @@ class Bsd { + static bool is_floating_stack() { return _is_floating_stack; } + + static void libpthread_init(); ++#endif + + // Minimum stack size a thread can be created with (allowing + // the VM to completely create the thread and enter user code) +@@ -155,17 +201,21 @@ class Bsd { + static size_t default_stack_size(os::ThreadType thr_type); + static size_t default_guard_size(os::ThreadType thr_type); + ++#ifndef _ALLBSD_SOURCE + static void capture_initial_stack(size_t max_size); + + // Stack overflow handling + static bool manually_expand_stack(JavaThread * t, address addr); + static int max_register_window_saves_before_flushing(); ++#endif + + // Real-time clock functions + static void clock_init(void); + ++#ifndef _ALLBSD_SOURCE + // fast POSIX clocks support + static void fast_thread_clock_init(void); ++#endif + + static bool supports_monotonic_clock() { + return _clock_gettime != NULL; +@@ -175,6 +225,7 @@ class Bsd { + return _clock_gettime ? _clock_gettime(clock_id, tp) : -1; + } + ++#ifndef _ALLBSD_SOURCE + static int pthread_getcpuclockid(pthread_t tid, clockid_t *clock_id) { + return _pthread_getcpuclockid ? _pthread_getcpuclockid(tid, clock_id) : -1; + } +@@ -184,6 +235,7 @@ class Bsd { + } + + static jlong fast_thread_cpu_time(clockid_t clockid); ++#endif + + // Stack repair handling + +diff -upr ../orig/hotspot/src/os/bsd/vm/os_bsd.inline.hpp ./hotspot/src/os/bsd/vm/os_bsd.inline.hpp +--- ../orig/hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2009-05-06 10:57:31.000000000 -0400 +@@ -64,7 +64,15 @@ inline bool os::uses_stack_guard_pages() + + inline bool os::allocate_stack_guard_pages() { + assert(uses_stack_guard_pages(), "sanity check"); ++#if !defined(__FreeBSD__) || __FreeBSD__ < 5 ++ // Since FreeBSD 4 uses malloc() for allocating the thread stack ++ // there is no need to do anything extra to allocate the guard pages ++ return false; ++#else ++ // FreeBSD 5+ uses mmap MAP_STACK for allocating the thread stacks. ++ // Must 'allocate' them or guard pages are ignored. + return true; ++#endif + } + + +@@ -112,6 +120,107 @@ inline int os::closedir(DIR *dirp) + return ::closedir(dirp); + } + ++//XXXBSD: ported from solaris version ++////////////////////////////////////////////////////////////////////////////// ++//////////////////////////////////////////////////////////////////////////////// ++ ++// macros for interruptible io and system calls and system call restarting ++ ++#define _INTERRUPTIBLE(_setup, _cmd, _result, _thread, _clear, _before, _after, _int_enable) \ ++do { \ ++ _setup; \ ++ _before; \ ++ OSThread* _osthread = _thread->osthread(); \ ++ if (_int_enable && _thread->has_last_Java_frame()) { \ ++ /* this is java interruptible io stuff */ \ ++ if (os::is_interrupted(_thread, _clear)) { \ ++ os::Bsd::bump_interrupted_before_count(); \ ++ _result = OS_INTRPT; \ ++ } else { \ ++ /* _cmd always expands to an assignment to _result */ \ ++ if ((_cmd) < 0 && errno == EINTR \ ++ && os::is_interrupted(_thread, _clear)) { \ ++ os::Bsd::bump_interrupted_during_count(); \ ++ _result = OS_INTRPT; \ ++ } \ ++ } \ ++ } else { \ ++ /* this is normal blocking io stuff */ \ ++ _cmd; \ ++ } \ ++ _after; \ ++} while(false) ++ ++// Interruptible io support + restarting of interrupted system calls ++ ++#ifndef ASSERT ++ ++#define INTERRUPTIBLE(_cmd, _result, _clear) do { \ ++ _INTERRUPTIBLE( JavaThread* _thread = (JavaThread*)ThreadLocalStorage::thread(),_result = _cmd, _result, _thread, _clear, , , UseVMInterruptibleIO); \ ++} while((_result == OS_ERR) && (errno == EINTR)) ++ ++#else ++ ++// This adds an assertion that it is only called from thread_in_native ++// The call overhead is skipped for performance in product mode ++#define INTERRUPTIBLE(_cmd, _result, _clear) do { \ ++ _INTERRUPTIBLE(JavaThread* _thread = os::Bsd::setup_interruptible_native(), _result = _cmd, _result, _thread, _clear, , os::Bsd::cleanup_interruptible_native(_thread), UseVMInterruptibleIO ); \ ++} while((_result == OS_ERR) && (errno == EINTR)) ++ ++#endif ++ ++// Used for calls from _thread_in_vm, not from _thread_in_native ++#define INTERRUPTIBLE_VM(_cmd, _result, _clear) do { \ ++ _INTERRUPTIBLE(JavaThread* _thread = os::Bsd::setup_interruptible(), _result = _cmd, _result, _thread, _clear, , os::Bsd::cleanup_interruptible(_thread), UseVMInterruptibleIO ); \ ++} while((_result == OS_ERR) && (errno == EINTR)) ++ ++/* Use NORESTART when the system call cannot return EINTR, when something other ++ than a system call is being invoked, or when the caller must do EINTR ++ handling. */ ++ ++#ifndef ASSERT ++ ++#define INTERRUPTIBLE_NORESTART(_cmd, _result, _clear) \ ++ _INTERRUPTIBLE( JavaThread* _thread = (JavaThread*)ThreadLocalStorage::thread(),_result = _cmd, _result, _thread, _clear, , , UseVMInterruptibleIO) ++ ++#else ++ ++// This adds an assertion that it is only called from thread_in_native ++// The call overhead is skipped for performance in product mode ++#define INTERRUPTIBLE_NORESTART(_cmd, _result, _clear) \ ++ _INTERRUPTIBLE(JavaThread* _thread = os::Bsd::setup_interruptible_native(), _result = _cmd, _result, _thread, _clear, , os::Bsd::cleanup_interruptible_native(_thread), UseVMInterruptibleIO ) ++ ++#endif ++ ++// Don't attend to UseVMInterruptibleIO. Always allow interruption. ++// Also assumes that it is called from the _thread_blocked state. ++// Used by os_sleep(). ++ ++#define INTERRUPTIBLE_NORESTART_VM_ALWAYS(_cmd, _result, _thread, _clear) \ ++ _INTERRUPTIBLE(os::Bsd::setup_interruptible_already_blocked(_thread), _result = _cmd, _result, _thread, _clear, , , true ) ++ ++#define INTERRUPTIBLE_RETURN_INT(_cmd, _clear) do { \ ++ int _result; \ ++ do { \ ++ INTERRUPTIBLE(_cmd, _result, _clear); \ ++ } while((_result == OS_ERR) && (errno == EINTR)); \ ++ return _result; \ ++} while(false) ++ ++#define INTERRUPTIBLE_RETURN_INT_VM(_cmd, _clear) do { \ ++ int _result; \ ++ do { \ ++ INTERRUPTIBLE_VM(_cmd, _result, _clear); \ ++ } while((_result == OS_ERR) && (errno == EINTR)); \ ++ return _result; \ ++} while(false) ++ ++#define INTERRUPTIBLE_RETURN_INT_NORESTART(_cmd, _clear) do { \ ++ int _result; \ ++ INTERRUPTIBLE_NORESTART(_cmd, _result, _clear); \ ++ return _result; \ ++} while(false) ++ + // macros for restartable system calls + + #define RESTARTABLE(_cmd, _result) do { \ +Only in ./hotspot/src/os_cpu/bsd_x86/vm: assembler_bsd_x86.cpp +diff -upr ../orig/hotspot/src/os_cpu/bsd_x86/vm/assembler_bsd_x86_64.cpp ./hotspot/src/os_cpu/bsd_x86/vm/assembler_bsd_x86_64.cpp +--- ../orig/hotspot/src/os_cpu/bsd_x86/vm/assembler_bsd_x86_64.cpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os_cpu/bsd_x86/vm/assembler_bsd_x86_64.cpp 2009-05-06 11:53:03.000000000 -0400 +@@ -69,8 +69,9 @@ void MacroAssembler::get_thread(Register + } + } + +-// NOTE: since the bsd kernel resides at the low end of +-// user address space, no null pointer check is needed. + bool MacroAssembler::needs_explicit_null_check(int offset) { +- return offset < 0 || offset >= 0x100000; ++ // Bsd kernel guarantees that the first page is always unmapped. Don't ++ // assume anything more than that. ++ bool offset_in_first_page = 0 <= offset && offset < os::vm_page_size(); ++ return !offset_in_first_page; + } +diff -upr ../orig/hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s ./hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s +--- ../orig/hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s 2009-05-04 17:37:17.000000000 -0400 +@@ -21,49 +21,82 @@ + # have any questions. + # + ++ ++ + .ident "@(#)bsd_x86_32.s 1.10 07/05/17 15:48:59 JVM" +- ++ ++#ifdef __APPLE__ ++# Darwin uses _ prefixed global symbols ++#define SYMBOL(s) _ ## s ++#define ELF_TYPE(name, description) ++#else ++#define SYMBOL(s) s ++#define ELF_TYPE(name, description) .type name,description ++#endif ++ ++ .globl SYMBOL(fixcw) ++ + # NOTE WELL! The _Copy functions are called directly + # from server-compiler-generated code via CallLeafNoFP, + # which means that they *must* either not use floating + # point or use it in the same manner as does the server + # compiler. + +- .globl _Copy_conjoint_bytes +- .globl _Copy_arrayof_conjoint_bytes +- .globl _Copy_conjoint_jshorts_atomic +- .globl _Copy_arrayof_conjoint_jshorts +- .globl _Copy_conjoint_jints_atomic +- .globl _Copy_arrayof_conjoint_jints +- .globl _Copy_conjoint_jlongs_atomic +- .globl _mmx_Copy_arrayof_conjoint_jshorts ++ .globl SYMBOL(_Copy_conjoint_bytes) ++ .globl SYMBOL(_Copy_arrayof_conjoint_bytes) ++ .globl SYMBOL(_Copy_conjoint_jshorts_atomic) ++ .globl SYMBOL(_Copy_arrayof_conjoint_jshorts) ++ .globl SYMBOL(_Copy_conjoint_jints_atomic) ++ .globl SYMBOL(_Copy_arrayof_conjoint_jints) ++ .globl SYMBOL(_Copy_conjoint_jlongs_atomic) ++ .globl SYMBOL(_mmx_Copy_arrayof_conjoint_jshorts) + +- .globl _Atomic_cmpxchg_long ++ .globl SYMBOL(_Atomic_cmpxchg_long) + + .text + +- .globl SafeFetch32, Fetch32PFI, Fetch32Resume +- .globl SafeFetchN ++# Support for void os::Solaris::init_thread_fpu_state() in os_solaris_i486.cpp ++# Set fpu to 53 bit precision. This happens too early to use a stub. ++# ported from solaris_x86_32.s ++#ifdef __APPLE__ ++ .align 4 ++#else ++ .align 16 ++#endif ++SYMBOL(fixcw): ++ pushl $0x27f ++ fldcw 0(%esp) ++ popl %eax ++ ret ++ ++#ifdef __APPLE__ ++ .align 4 ++#else ++ .align 16 ++#endif ++ ++ .globl SYMBOL(SafeFetch32), SYMBOL(Fetch32PFI), SYMBOL(Fetch32Resume) ++ .globl SYMBOL(SafeFetchN) + ## TODO: avoid exposing Fetch32PFI and Fetch32Resume. + ## Instead, the signal handler would call a new SafeFetchTriage(FaultingEIP) + ## routine to vet the address. If the address is the faulting LD then + ## SafeFetchTriage() would return the resume-at EIP, otherwise null. +- .type SafeFetch32, at function ++ ELF_TYPE(SafeFetch32, at function) + .p2align 4,,15 +-SafeFetch32: +-SafeFetchN: ++SYMBOL(SafeFetch32): ++SYMBOL(SafeFetchN): + movl 0x8(%esp), %eax + movl 0x4(%esp), %ecx +-Fetch32PFI: ++SYMBOL(Fetch32PFI): + movl (%ecx), %eax +-Fetch32Resume: ++SYMBOL(Fetch32Resume): + ret + + +- .globl SpinPause +- .type SpinPause, at function ++ .globl SYMBOL(SpinPause) ++ ELF_TYPE(SpinPause, at function) + .p2align 4,,15 +-SpinPause: ++SYMBOL(SpinPause): + rep + nop + movl $1, %eax +@@ -73,8 +106,8 @@ SpinPause: + # void* to, + # size_t count) + .p2align 4,,15 +- .type _Copy_conjoint_bytes, at function +-_Copy_conjoint_bytes: ++ ELF_TYPE(_Copy_conjoint_bytes, at function) ++SYMBOL(_Copy_conjoint_bytes): + pushl %esi + movl 4+12(%esp),%ecx # count + pushl %edi +@@ -181,8 +214,8 @@ cb_CopyLeft: + # + # Same as _Copy_conjoint_bytes, except no source alignment check. + .p2align 4,,15 +- .type _Copy_arrayof_conjoint_bytes, at function +-_Copy_arrayof_conjoint_bytes: ++ ELF_TYPE(_Copy_arrayof_conjoint_bytes, at function) ++SYMBOL(_Copy_arrayof_conjoint_bytes): + pushl %esi + movl 4+12(%esp),%ecx # count + pushl %edi +@@ -269,8 +302,8 @@ acb_CopyLeft: + # void* to, + # size_t count) + .p2align 4,,15 +- .type _Copy_conjoint_jshorts_atomic, at function +-_Copy_conjoint_jshorts_atomic: ++ ELF_TYPE(_Copy_conjoint_jshorts_atomic, at function) ++SYMBOL(_Copy_conjoint_jshorts_atomic): + pushl %esi + movl 4+12(%esp),%ecx # count + pushl %edi +@@ -355,8 +388,8 @@ cs_CopyLeft: + # void* to, + # size_t count) + .p2align 4,,15 +- .type _Copy_arrayof_conjoint_jshorts, at function +-_Copy_arrayof_conjoint_jshorts: ++ ELF_TYPE(_Copy_arrayof_conjoint_jshorts, at function) ++SYMBOL(_Copy_arrayof_conjoint_jshorts): + pushl %esi + movl 4+12(%esp),%ecx # count + pushl %edi +@@ -432,10 +465,10 @@ acs_CopyLeft: + # Equivalent to + # arrayof_conjoint_jints + .p2align 4,,15 +- .type _Copy_conjoint_jints_atomic, at function +- .type _Copy_arrayof_conjoint_jints, at function +-_Copy_conjoint_jints_atomic: +-_Copy_arrayof_conjoint_jints: ++ ELF_TYPE(_Copy_conjoint_jints_atomic, at function) ++ ELF_TYPE(_Copy_arrayof_conjoint_jints, at function) ++SYMBOL(_Copy_conjoint_jints_atomic): ++SYMBOL(_Copy_arrayof_conjoint_jints): + pushl %esi + movl 4+12(%esp),%ecx # count + pushl %edi +@@ -495,7 +528,7 @@ ci_CopyLeft: + # + # count treated as signed + # +- # if (from > to) { ++ # // if (from > to) { + # while (--count >= 0) { + # *to++ = *from++; + # } +@@ -505,8 +538,8 @@ ci_CopyLeft: + # } + # } + .p2align 4,,15 +- .type _Copy_conjoint_jlongs_atomic, at function +-_Copy_conjoint_jlongs_atomic: ++ ELF_TYPE(_Copy_conjoint_jlongs_atomic, at function) ++SYMBOL(_Copy_conjoint_jlongs_atomic): + movl 4+8(%esp),%ecx # count + movl 4+0(%esp),%eax # from + movl 4+4(%esp),%edx # to +@@ -534,8 +567,8 @@ cla_CopyLeft: + # void* to, + # size_t count) + .p2align 4,,15 +- .type _mmx_Copy_arrayof_conjoint_jshorts, at function +-_mmx_Copy_arrayof_conjoint_jshorts: ++ ELF_TYPE(_mmx_Copy_arrayof_conjoint_jshorts, at function) ++SYMBOL(_mmx_Copy_arrayof_conjoint_jshorts): + pushl %esi + movl 4+12(%esp),%ecx + pushl %edi +@@ -633,8 +666,8 @@ mmx_acs_CopyLeft: + # bool is_MP) + # + .p2align 4,,15 +- .type _Atomic_cmpxchg_long, at function +-_Atomic_cmpxchg_long: ++ ELF_TYPE(_Atomic_cmpxchg_long, at function) ++SYMBOL(_Atomic_cmpxchg_long): + # 8(%esp) : return PC + pushl %ebx # 4(%esp) : old %ebx + pushl %edi # 0(%esp) : old %edi +diff -upr ../orig/hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s ./hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s +--- ../orig/hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s 2009-05-06 11:56:15.000000000 -0400 +@@ -23,48 +23,70 @@ + + .ident "@(#)bsd_x86_64.s 1.7 07/05/05 17:04:47 JVM" + ++#ifdef __APPLE__ ++# Darwin uses _ prefixed global symbols ++#define SYMBOL(s) _ ## s ++#define ELF_TYPE(name, description) ++#else ++#define SYMBOL(s) s ++#define ELF_TYPE(name, description) .type name,description ++#endif ++ ++ + # NOTE WELL! The _Copy functions are called directly + # from server-compiler-generated code via CallLeafNoFP, + # which means that they *must* either not use floating + # point or use it in the same manner as does the server + # compiler. + +- .globl _Copy_arrayof_conjoint_bytes +- .globl _Copy_arrayof_conjoint_jshorts +- .globl _Copy_conjoint_jshorts_atomic +- .globl _Copy_arrayof_conjoint_jints +- .globl _Copy_conjoint_jints_atomic +- .globl _Copy_arrayof_conjoint_jlongs +- .globl _Copy_conjoint_jlongs_atomic ++ .globl SYMBOL(_Copy_arrayof_conjoint_bytes) ++ .globl SYMBOL(_Copy_arrayof_conjoint_jshorts) ++ .globl SYMBOL(_Copy_conjoint_jshorts_atomic) ++ .globl SYMBOL(_Copy_arrayof_conjoint_jints) ++ .globl SYMBOL(_Copy_conjoint_jints_atomic) ++ .globl SYMBOL(_Copy_arrayof_conjoint_jlongs) ++ .globl SYMBOL(_Copy_conjoint_jlongs_atomic) + + .text + +- .globl SafeFetch32, Fetch32PFI, Fetch32Resume ++ .globl SYMBOL(SafeFetch32), SYMBOL(Fetch32PFI), SYMBOL(Fetch32Resume) ++#ifdef __APPLE__ ++ .align 4 ++#else + .align 16 +- .type SafeFetch32, at function ++#endif ++ ELF_TYPE(SafeFetch32, at function) + // Prototype: int SafeFetch32 (int * Adr, int ErrValue) +-SafeFetch32: ++SYMBOL(SafeFetch32): + movl %esi, %eax +-Fetch32PFI: ++SYMBOL(Fetch32PFI): + movl (%rdi), %eax +-Fetch32Resume: ++SYMBOL(Fetch32Resume): + ret + +- .globl SafeFetchN, FetchNPFI, FetchNResume ++ .globl SYMBOL(SafeFetchN), SYMBOL(FetchNPFI), SYMBOL(FetchNResume) ++#ifdef __APPLE__ ++ .align 4 ++#else + .align 16 +- .type SafeFetchN, at function ++#endif ++ ELF_TYPE(SafeFetchN, at function) + // Prototype: intptr_t SafeFetchN (intptr_t * Adr, intptr_t ErrValue) +-SafeFetchN: ++SYMBOL(SafeFetchN): + movq %rsi, %rax +-FetchNPFI: ++SYMBOL(FetchNPFI): + movq (%rdi), %rax +-FetchNResume: ++SYMBOL(FetchNResume): + ret + +- .globl SpinPause +- .align 16 +- .type SpinPause, at function +-SpinPause: ++ .globl SYMBOL(SpinPause) ++#ifdef __APPLE__ ++ .align 4 ++#else ++ .align 16 ++#endif ++ ELF_TYPE(SpinPause, at function) ++SYMBOL(SpinPause): + rep + nop + movq $1, %rax +@@ -78,8 +100,8 @@ SpinPause: + # rdx - count, treated as ssize_t + # + .p2align 4,,15 +- .type _Copy_arrayof_conjoint_bytes, at function +-_Copy_arrayof_conjoint_bytes: ++ ELF_TYPE(_Copy_arrayof_conjoint_bytes, at function) ++SYMBOL(_Copy_arrayof_conjoint_bytes): + movq %rdx,%r8 # byte count + shrq $3,%rdx # qword count + cmpq %rdi,%rsi +@@ -180,10 +202,10 @@ acb_CopyLeft: + # rdx - count, treated as ssize_t + # + .p2align 4,,15 +- .type _Copy_arrayof_conjoint_jshorts, at function +- .type _Copy_conjoint_jshorts_atomic, at function +-_Copy_arrayof_conjoint_jshorts: +-_Copy_conjoint_jshorts_atomic: ++ ELF_TYPE(_Copy_arrayof_conjoint_jshorts, at function) ++ ELF_TYPE(_Copy_conjoint_jshorts_atomic, at function) ++SYMBOL(_Copy_arrayof_conjoint_jshorts): ++SYMBOL(_Copy_conjoint_jshorts_atomic): + movq %rdx,%r8 # word count + shrq $2,%rdx # qword count + cmpq %rdi,%rsi +@@ -270,10 +292,10 @@ acs_CopyLeft: + # rdx - count, treated as ssize_t + # + .p2align 4,,15 +- .type _Copy_arrayof_conjoint_jints, at function +- .type _Copy_conjoint_jints_atomic, at function +-_Copy_arrayof_conjoint_jints: +-_Copy_conjoint_jints_atomic: ++ ELF_TYPE(_Copy_arrayof_conjoint_jints, at function) ++ ELF_TYPE(_Copy_conjoint_jints_atomic, at function) ++SYMBOL(_Copy_arrayof_conjoint_jints): ++SYMBOL(_Copy_conjoint_jints_atomic): + movq %rdx,%r8 # dword count + shrq %rdx # qword count + cmpq %rdi,%rsi +@@ -349,10 +371,10 @@ aci_CopyLeft: + # rdx - count, treated as ssize_t + # + .p2align 4,,15 +- .type _Copy_arrayof_conjoint_jlongs, at function +- .type _Copy_conjoint_jlongs_atomic, at function +-_Copy_arrayof_conjoint_jlongs: +-_Copy_conjoint_jlongs_atomic: ++ ELF_TYPE(_Copy_arrayof_conjoint_jlongs, at function) ++ ELF_TYPE(_Copy_conjoint_jlongs_atomic, at function) ++SYMBOL(_Copy_arrayof_conjoint_jlongs): ++SYMBOL(_Copy_conjoint_jlongs_atomic): + cmpq %rdi,%rsi + leaq -8(%rdi,%rdx,8),%rax # from + count*8 - 8 + jbe acl_CopyRight +diff -upr ../orig/hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp ./hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp +--- ../orig/hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp 2009-05-06 12:15:02.000000000 -0400 +@@ -25,7 +25,29 @@ + * + */ + ++#ifndef _ALLBSD_SOURCE + #include ++#endif ++ ++#ifdef __APPLE__ ++#include ++#endif ++ ++#if defined(AMD64) ++# if defined(__APPLE__) ++# define bswap_16(x) OSSwapInt16(x) ++# define bswap_32(x) OSSwapInt32(x) ++# define bswap_64(x) OSSwapInt64(x) ++# elif defined(__OpenBSD__) ++# define bswap_16(x) swap16(x) ++# define bswap_32(x) swap32(x) ++# define bswap_64(x) swap64(x) ++# else ++# define bswap_16(x) __bswap16(x) ++# define bswap_32(x) __bswap32(x) ++# define bswap_64(x) __bswap64(x) ++# endif ++#endif + + // Efficient swapping of data bytes from Java byte + // ordering to native byte ordering and vice versa. +diff -upr ../orig/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp ./hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp +--- ../orig/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2009-05-04 17:37:17.000000000 -0400 +@@ -47,23 +47,158 @@ + # include + # include + # include ++#ifndef __OpenBSD__ + # include +-# include ++#endif ++ ++#if defined(_ALLBSD_SOURCE) && !defined(__APPLE__) ++# include ++#endif + + #ifdef AMD64 +-#define REG_SP REG_RSP +-#define REG_PC REG_RIP +-#define REG_FP REG_RBP + #define SPELL_REG_SP "rsp" + #define SPELL_REG_FP "rbp" + #else +-#define REG_SP REG_UESP +-#define REG_PC REG_EIP +-#define REG_FP REG_EBP + #define SPELL_REG_SP "esp" + #define SPELL_REG_FP "ebp" + #endif // AMD64 + ++#ifdef __FreeBSD__ ++# define context_trapno uc_mcontext.mc_trapno ++# ifdef AMD64 ++# define context_pc uc_mcontext.mc_rip ++# define context_sp uc_mcontext.mc_rsp ++# define context_fp uc_mcontext.mc_rbp ++# define context_rip uc_mcontext.mc_rip ++# define context_rsp uc_mcontext.mc_rsp ++# define context_rbp uc_mcontext.mc_rbp ++# define context_rax uc_mcontext.mc_rax ++# define context_rbx uc_mcontext.mc_rbx ++# define context_rcx uc_mcontext.mc_rcx ++# define context_rdx uc_mcontext.mc_rdx ++# define context_rsi uc_mcontext.mc_rsi ++# define context_rdi uc_mcontext.mc_rdi ++# define context_r8 uc_mcontext.mc_r8 ++# define context_r9 uc_mcontext.mc_r9 ++# define context_r10 uc_mcontext.mc_r10 ++# define context_r11 uc_mcontext.mc_r11 ++# define context_r12 uc_mcontext.mc_r12 ++# define context_r13 uc_mcontext.mc_r13 ++# define context_r14 uc_mcontext.mc_r14 ++# define context_r15 uc_mcontext.mc_r15 ++# define context_flags uc_mcontext.mc_flags ++# define context_err uc_mcontext.mc_err ++# else ++# define context_pc uc_mcontext.mc_eip ++# define context_sp uc_mcontext.mc_esp ++# define context_fp uc_mcontext.mc_ebp ++# define context_eip uc_mcontext.mc_eip ++# define context_esp uc_mcontext.mc_esp ++# define context_eax uc_mcontext.mc_eax ++# define context_ebx uc_mcontext.mc_ebx ++# define context_ecx uc_mcontext.mc_ecx ++# define context_edx uc_mcontext.mc_edx ++# define context_ebp uc_mcontext.mc_ebp ++# define context_esi uc_mcontext.mc_esi ++# define context_edi uc_mcontext.mc_edi ++# define context_eflags uc_mcontext.mc_eflags ++# define context_trapno uc_mcontext.mc_trapno ++# endif ++#endif ++ ++#ifdef __APPLE__ ++# if __DARWIN_UNIX03 && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) ++ // 10.5 UNIX03 member name prefixes ++ #define DU3_PREFIX(s, m) __ ## s.__ ## m ++# else ++ #define DU3_PREFIX(s, m) s ## . ## m ++# endif ++ ++# ifdef AMD64 ++# define context_pc context_rip ++# define context_sp context_rsp ++# define context_fp context_rbp ++# define context_rip uc_mcontext->DU3_PREFIX(ss,rip) ++# define context_rsp uc_mcontext->DU3_PREFIX(ss,rsp) ++# define context_rax uc_mcontext->DU3_PREFIX(ss,rax) ++# define context_rbx uc_mcontext->DU3_PREFIX(ss,rbx) ++# define context_rcx uc_mcontext->DU3_PREFIX(ss,rcx) ++# define context_rdx uc_mcontext->DU3_PREFIX(ss,rdx) ++# define context_rbp uc_mcontext->DU3_PREFIX(ss,rbp) ++# define context_rsi uc_mcontext->DU3_PREFIX(ss,rsi) ++# define context_rdi uc_mcontext->DU3_PREFIX(ss,rdi) ++# define context_r8 uc_mcontext->DU3_PREFIX(ss,r8) ++# define context_r9 uc_mcontext->DU3_PREFIX(ss,r9) ++# define context_r10 uc_mcontext->DU3_PREFIX(ss,r10) ++# define context_r11 uc_mcontext->DU3_PREFIX(ss,r11) ++# define context_r12 uc_mcontext->DU3_PREFIX(ss,r12) ++# define context_r13 uc_mcontext->DU3_PREFIX(ss,r13) ++# define context_r14 uc_mcontext->DU3_PREFIX(ss,r14) ++# define context_r15 uc_mcontext->DU3_PREFIX(ss,r15) ++# define context_flags uc_mcontext->DU3_PREFIX(ss,rflags) ++# define context_trapno uc_mcontext->DU3_PREFIX(es,trapno) ++# define context_err uc_mcontext->DU3_PREFIX(es,err) ++# else ++# define context_pc context_eip ++# define context_sp context_esp ++# define context_fp context_ebp ++# define context_eip uc_mcontext->DU3_PREFIX(ss,eip) ++# define context_esp uc_mcontext->DU3_PREFIX(ss,esp) ++# define context_eax uc_mcontext->DU3_PREFIX(ss,eax) ++# define context_ebx uc_mcontext->DU3_PREFIX(ss,ebx) ++# define context_ecx uc_mcontext->DU3_PREFIX(ss,ecx) ++# define context_edx uc_mcontext->DU3_PREFIX(ss,edx) ++# define context_ebp uc_mcontext->DU3_PREFIX(ss,ebp) ++# define context_esi uc_mcontext->DU3_PREFIX(ss,esi) ++# define context_edi uc_mcontext->DU3_PREFIX(ss,edi) ++# define context_eflags uc_mcontext->DU3_PREFIX(ss,eflags) ++# define context_trapno uc_mcontext->DU3_PREFIX(es,trapno) ++# endif ++#endif ++ ++#ifdef __OpenBSD__ ++# define context_trapno sc_trapno ++# ifdef AMD64 ++# define context_pc sc_rip ++# define context_sp sc_rsp ++# define context_fp sc_rbp ++# define context_rip sc_rip ++# define context_rsp sc_rsp ++# define context_rbp sc_rbp ++# define context_rax sc_rax ++# define context_rbx sc_rbx ++# define context_rcx sc_rcx ++# define context_rdx sc_rdx ++# define context_rsi sc_rsi ++# define context_rdi sc_rdi ++# define context_r8 sc_r8 ++# define context_r9 sc_r9 ++# define context_r10 sc_r10 ++# define context_r11 sc_r11 ++# define context_r12 sc_r12 ++# define context_r13 sc_r13 ++# define context_r14 sc_r14 ++# define context_r15 sc_r15 ++# define context_flags sc_rflags ++# define context_err sc_err ++# else ++# define context_pc sc_eip ++# define context_sp sc_esp ++# define context_fp sc_ebp ++# define context_eip sc_eip ++# define context_esp sc_esp ++# define context_eax sc_eax ++# define context_ebx sc_ebx ++# define context_ecx sc_ecx ++# define context_edx sc_edx ++# define context_ebp sc_ebp ++# define context_esi sc_esi ++# define context_edi sc_edi ++# define context_eflags sc_eflags ++# define context_trapno sc_trapno ++# endif ++#endif ++ + address os::current_stack_pointer() { + register void *esp __asm__ (SPELL_REG_SP); + return (address) esp; +@@ -82,15 +217,15 @@ void os::initialize_thread() { + } + + address os::Bsd::ucontext_get_pc(ucontext_t * uc) { +- return (address)uc->uc_mcontext.gregs[REG_PC]; ++ return (address)uc->context_pc; + } + + intptr_t* os::Bsd::ucontext_get_sp(ucontext_t * uc) { +- return (intptr_t*)uc->uc_mcontext.gregs[REG_SP]; ++ return (intptr_t*)uc->context_sp; + } + + intptr_t* os::Bsd::ucontext_get_fp(ucontext_t * uc) { +- return (intptr_t*)uc->uc_mcontext.gregs[REG_FP]; ++ return (intptr_t*)uc->context_fp; + } + + // For Forte Analyzer AsyncGetCallTrace profiling support - thread +@@ -237,18 +372,18 @@ JVM_handle_bsd_signal(int sig, + pc = (address) os::Bsd::ucontext_get_pc(uc); + + if (pc == (address) Fetch32PFI) { +- uc->uc_mcontext.gregs[REG_PC] = intptr_t(Fetch32Resume) ; ++ uc->context_pc = intptr_t(Fetch32Resume) ; + return 1 ; + } + #ifdef AMD64 + if (pc == (address) FetchNPFI) { +- uc->uc_mcontext.gregs[REG_PC] = intptr_t (FetchNResume) ; ++ uc->context_pc = intptr_t (FetchNResume) ; + return 1 ; + } + #endif // AMD64 + + // Handle ALL stack overflow variations here +- if (sig == SIGSEGV) { ++ if (sig == SIGSEGV || sig == SIGBUS) { + address addr = (address) info->si_addr; + + // check if fault address is within thread stack +@@ -270,6 +405,7 @@ JVM_handle_bsd_signal(int sig, + // to handle_unexpected_exception way down below. + thread->disable_stack_red_zone(); + tty->print_raw_cr("An irrecoverable stack overflow has occurred."); ++#ifndef _ALLBSD_SOURCE + } else { + // Accessing stack address below sp may cause SEGV if current + // thread has MAP_GROWSDOWN stack. This should only happen when +@@ -285,6 +421,7 @@ JVM_handle_bsd_signal(int sig, + } else { + fatal("recursive segv. expanding stack."); + } ++#endif + } + } + } +@@ -293,9 +430,16 @@ JVM_handle_bsd_signal(int sig, + // Java thread running in Java code => find exception handler if any + // a fault inside compiled code, the interpreter, or a stub + +- if (sig == SIGSEGV && os::is_poll_address((address)info->si_addr)) { ++ if ((sig == SIGSEGV || sig == SIGBUS) && os::is_poll_address((address)info->si_addr)) { + stub = SharedRuntime::get_poll_stub(pc); ++#if defined(__APPLE__) && !defined(AMD64) ++ // 32-bit Darwin reports a SIGBUS for nearly all memory access exceptions. ++ // Catching SIGBUS here prevents the implicit SIGBUS NULL check below from ++ // being called, so only do so if the implicit NULL check is not necessary. ++ } else if (sig == SIGBUS && MacroAssembler::needs_explicit_null_check((int)info->si_addr)) { ++#else + } else if (sig == SIGBUS /* && info->si_code == BUS_OBJERR */) { ++#endif + // BugId 4454115: A read from a MappedByteBuffer can fault + // here if the underlying file has been truncated. + // Do not crash the VM in such a case. +@@ -316,6 +460,28 @@ JVM_handle_bsd_signal(int sig, + pc, + SharedRuntime:: + IMPLICIT_DIVIDE_BY_ZERO); ++#ifdef __APPLE__ ++ } else if (sig == SIGFPE && info->si_code == FPE_NOOP) { ++ int op = pc[0]; ++ ++ // Skip REX ++ if ((pc[0] & 0xf0) == 0x40) { ++ op = pc[1]; ++ } else { ++ op = pc[0]; ++ } ++ ++ // Check for IDIV ++ if (op == 0xF7) { ++ stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime:: IMPLICIT_DIVIDE_BY_ZERO); ++ } else { ++ // TODO: handle more cases if we are using other x86 instructions ++ // that can generate SIGFPE signal. ++ tty->print_cr("unknown opcode 0x%X with SIGFPE.", op); ++ fatal("please update this code."); ++ } ++#endif /* __APPLE__ */ ++ + #else + if (sig == SIGFPE /* && info->si_code == FPE_INTDIV */) { + // HACK: si_code does not work on bsd 2.2.12-20!!! +@@ -343,7 +509,7 @@ JVM_handle_bsd_signal(int sig, + fatal("please update this code."); + } + #endif // AMD64 +- } else if (sig == SIGSEGV && ++ } else if ((sig == SIGSEGV || sig == SIGBUS) && + !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) { + // Determination of interpreter/vtable stub/compiled code null exception + stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL); +@@ -367,7 +533,7 @@ JVM_handle_bsd_signal(int sig, + // process of write protecting the memory serialization page. + // It write enables the page immediately after protecting it + // so we can just return to retry the write. +- if ((sig == SIGSEGV) && ++ if ((sig == SIGSEGV || sig == SIGBUS) && + os::is_memory_serialize_page(thread, (address) info->si_addr)) { + // Block current thread until the memory serialize page permission restored. + os::block_on_serialize_page_trap(); +@@ -388,7 +554,7 @@ JVM_handle_bsd_signal(int sig, + // Furthermore, a false-positive should be harmless. + if (UnguardOnExecutionViolation > 0 && + (sig == SIGSEGV || sig == SIGBUS) && +- uc->uc_mcontext.gregs[REG_TRAPNO] == trap_page_fault) { ++ uc->context_trapno == trap_page_fault) { + int page_size = os::vm_page_size(); + address addr = (address) info->si_addr; + address pc = os::Bsd::ucontext_get_pc(uc); +@@ -457,7 +623,7 @@ JVM_handle_bsd_signal(int sig, + // save all thread context in case we need to restore it + if (thread != NULL) thread->set_saved_exception_pc(pc); + +- uc->uc_mcontext.gregs[REG_PC] = (greg_t)stub; ++ uc->context_pc = (intptr_t)stub; + return true; + } + +@@ -487,13 +653,24 @@ JVM_handle_bsd_signal(int sig, + ShouldNotReachHere(); + } + ++#ifdef _ALLBSD_SOURCE ++// From solaris_i486.s ported to bsd_i486.s ++extern "C" void fixcw(); ++#endif ++ + void os::Bsd::init_thread_fpu_state(void) { + #ifndef AMD64 ++# ifdef _ALLBSD_SOURCE ++ // Set fpu to 53 bit precision. This happens too early to use a stub. ++ fixcw(); ++# else + // set fpu to 53 bit precision + set_fpu_control_word(0x27f); ++# endif + #endif // !AMD64 + } + ++#ifndef _ALLBSD_SOURCE + int os::Bsd::get_fpu_control_word(void) { + #ifdef AMD64 + return 0; +@@ -509,11 +686,12 @@ void os::Bsd::set_fpu_control_word(int f + _FPU_SETCW(fpu_control); + #endif // !AMD64 + } ++#endif + + // Check that the bsd kernel version is 2.4 or higher since earlier + // versions do not support SSE without patches. + bool os::supports_sse() { +-#ifdef AMD64 ++#if defined(AMD64) || defined(_ALLBSD_SOURCE) + return true; + #else + struct utsname uts; +@@ -565,8 +743,11 @@ size_t os::Bsd::min_stack_allowed = (4 + + #define GET_GS() ({int gs; __asm__ volatile("movw %%gs, %w0":"=q"(gs)); gs&0xffff;}) + ++#ifdef _ALLBSD_SOURCE ++bool os::Bsd::supports_variable_stack_size() { return true; } ++#else + // Test if pthread library can support variable thread stack size. BsdThreads +-// in fixed stack mode allocates 2M fixed slot for each thread. BsdThreads ++// in fixed stack mode allocates 2M fixed slot for each thread. BsdThreads + // in floating stack mode and NPTL support variable stack size. + bool os::Bsd::supports_variable_stack_size() { + if (os::Bsd::is_NPTL()) { +@@ -597,6 +778,7 @@ bool os::Bsd::supports_variable_stack_si + return (GET_GS() != 0); + } + } ++#endif + #endif // AMD64 + + // return default stack size for thr_type +@@ -650,6 +832,41 @@ size_t os::Bsd::default_guard_size(os::T + // pthread_attr_getstack() + + static void current_stack_region(address * bottom, size_t * size) { ++#ifdef __APPLE__ ++ pthread_t self = pthread_self(); ++ void *stacktop = pthread_get_stackaddr_np(self); ++ *size = pthread_get_stacksize_np(self); ++ *bottom = (address) stacktop - *size; ++#elif defined(__OpenBSD__) ++ stack_t ss; ++ int rslt = pthread_stackseg_np(pthread_self(), &ss); ++ ++ if (rslt != 0) ++ fatal1("pthread_stackseg_np failed with err = %d", rslt); ++ ++ *bottom = (address)((char *)ss.ss_sp - ss.ss_size); ++ *size = ss.ss_size; ++#elif defined(_ALLBSD_SOURCE) ++ pthread_attr_t attr; ++ ++ int rslt = pthread_attr_init(&attr); ++ ++ // JVM needs to know exact stack location, abort if it fails ++ if (rslt != 0) ++ fatal1("pthread_attr_init failed with err = %d", rslt); ++ ++ rslt = pthread_attr_get_np(pthread_self(), &attr); ++ ++ if (rslt != 0) ++ fatal1("pthread_attr_get_np failed with err = %d", rslt); ++ ++ if (pthread_attr_getstackaddr(&attr, (void **)bottom) != 0 || ++ pthread_attr_getstacksize(&attr, size) != 0) { ++ fatal("Can not locate current stack attributes!"); ++ } ++ ++ pthread_attr_destroy(&attr); ++#else + if (os::Bsd::is_initial_thread()) { + // initial thread needs special handling because pthread_getattr_np() + // may return bogus value. +@@ -676,6 +893,7 @@ static void current_stack_region(address + pthread_attr_destroy(&attr); + + } ++#endif + assert(os::current_stack_pointer() >= *bottom && + os::current_stack_pointer() < *bottom + *size, "just checking"); + } +@@ -704,46 +922,44 @@ void os::print_context(outputStream *st, + ucontext_t *uc = (ucontext_t*)context; + st->print_cr("Registers:"); + #ifdef AMD64 +- st->print( "RAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RAX]); +- st->print(", RBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBX]); +- st->print(", RCX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RCX]); +- st->print(", RDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDX]); ++ st->print( "RAX=" INTPTR_FORMAT, uc->context_rax); ++ st->print(", RBX=" INTPTR_FORMAT, uc->context_rbx); ++ st->print(", RCX=" INTPTR_FORMAT, uc->context_rcx); ++ st->print(", RDX=" INTPTR_FORMAT, uc->context_rdx); + st->cr(); +- st->print( "RSP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSP]); +- st->print(", RBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBP]); +- st->print(", RSI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSI]); +- st->print(", RDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDI]); ++ st->print( "RSP=" INTPTR_FORMAT, uc->context_rsp); ++ st->print(", RBP=" INTPTR_FORMAT, uc->context_rbp); ++ st->print(", RSI=" INTPTR_FORMAT, uc->context_rsi); ++ st->print(", RDI=" INTPTR_FORMAT, uc->context_rdi); + st->cr(); +- st->print( "R8 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R8]); +- st->print(", R9 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R9]); +- st->print(", R10=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R10]); +- st->print(", R11=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R11]); ++ st->print( "R8 =" INTPTR_FORMAT, uc->context_r8); ++ st->print(", R9 =" INTPTR_FORMAT, uc->context_r9); ++ st->print(", R10=" INTPTR_FORMAT, uc->context_r10); ++ st->print(", R11=" INTPTR_FORMAT, uc->context_r11); + st->cr(); +- st->print( "R12=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R12]); +- st->print(", R13=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R13]); +- st->print(", R14=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R14]); +- st->print(", R15=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R15]); ++ st->print( "R12=" INTPTR_FORMAT, uc->context_r12); ++ st->print(", R13=" INTPTR_FORMAT, uc->context_r13); ++ st->print(", R14=" INTPTR_FORMAT, uc->context_r14); ++ st->print(", R15=" INTPTR_FORMAT, uc->context_r15); + st->cr(); +- st->print( "RIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RIP]); +- st->print(", EFL=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]); +- st->print(", CSGSFS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_CSGSFS]); +- st->print(", ERR=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ERR]); ++ st->print( "RIP=" INTPTR_FORMAT, uc->context_rip); ++ st->print(", EFL=" INTPTR_FORMAT, uc->context_flags); ++ st->print(", ERR=" INTPTR_FORMAT, uc->context_err); + st->cr(); +- st->print(" TRAPNO=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_TRAPNO]); ++ st->print(" TRAPNO=" INTPTR_FORMAT, uc->context_trapno); + #else +- st->print( "EAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EAX]); +- st->print(", EBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBX]); +- st->print(", ECX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ECX]); +- st->print(", EDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDX]); ++ st->print( "EAX=" INTPTR_FORMAT, uc->context_eax); ++ st->print(", EBX=" INTPTR_FORMAT, uc->context_ebx); ++ st->print(", ECX=" INTPTR_FORMAT, uc->context_ecx); ++ st->print(", EDX=" INTPTR_FORMAT, uc->context_edx); + st->cr(); +- st->print( "ESP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_UESP]); +- st->print(", EBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBP]); +- st->print(", ESI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ESI]); +- st->print(", EDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDI]); ++ st->print( "ESP=" INTPTR_FORMAT, uc->context_esp); ++ st->print(", EBP=" INTPTR_FORMAT, uc->context_ebp); ++ st->print(", ESI=" INTPTR_FORMAT, uc->context_esi); ++ st->print(", EDI=" INTPTR_FORMAT, uc->context_edi); + st->cr(); +- st->print( "EIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EIP]); +- st->print(", CR2=" INTPTR_FORMAT, uc->uc_mcontext.cr2); +- st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]); ++ st->print( "EIP=" INTPTR_FORMAT, uc->context_eip); ++ st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_eflags); + #endif // AMD64 + st->cr(); + st->cr(); +diff -upr ../orig/hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp ./hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp +--- ../orig/hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp 2009-05-06 12:03:40.000000000 -0400 +@@ -30,8 +30,10 @@ + #ifndef AMD64 + // map stack pointer to thread pointer - see notes in threadLS_bsd_x86.cpp + #define SP_BITLENGTH 32 ++#ifndef PAGE_SHIFT + #define PAGE_SHIFT 12 + #define PAGE_SIZE (1UL << PAGE_SHIFT) ++#endif + static Thread* _sp_map[1UL << (SP_BITLENGTH - PAGE_SHIFT)]; + #endif // !AMD64 + +diff -upr ../orig/hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp ./hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp +--- ../orig/hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2009-05-04 18:32:15.000000000 -0400 ++++ ./hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2009-05-06 12:04:27.000000000 -0400 +@@ -34,7 +34,7 @@ + /******************************/ \ + /* Threads (NOTE: incomplete) */ \ + /******************************/ \ +- nonstatic_field(OSThread, _thread_id, pid_t) \ ++ nonstatic_field(OSThread, _thread_id, pthread_t) \ + nonstatic_field(OSThread, _pthread_id, pthread_t) \ + /* This must be the last entry, and must be present */ \ + last_entry() +diff -upr ../orig/hotspot/src/share/vm/adlc/adlc.hpp ./hotspot/src/share/vm/adlc/adlc.hpp +--- ../orig/hotspot/src/share/vm/adlc/adlc.hpp 2009-01-27 15:41:01.000000000 -0500 ++++ ./hotspot/src/share/vm/adlc/adlc.hpp 2009-05-04 17:37:15.000000000 -0400 +@@ -76,9 +76,9 @@ typedef unsigned int uintptr_t; + #endif + #endif // _WIN32 + +-#ifdef LINUX ++#if defined(LINUX) || defined(_ALLBSD_SOURCE) + #include +-#endif // LINUX ++#endif // LINUX || _ALLBSD_SOURCE + + // Macros + #define uint32 unsigned int +diff -upr ../orig/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep ./hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep +--- ../orig/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep 2009-01-27 15:41:01.000000000 -0500 ++++ ./hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep 2009-05-04 17:37:17.000000000 -0400 +@@ -28,6 +28,7 @@ binaryTreeDictionary.cpp + binaryTreeDictionary.cpp binaryTreeDictionary.hpp + binaryTreeDictionary.cpp globals.hpp + binaryTreeDictionary.cpp ostream.hpp ++binaryTreeDictionary.cpp space.inline.hpp + + binaryTreeDictionary.hpp freeBlockDictionary.hpp + binaryTreeDictionary.hpp freeList.hpp +diff -upr ../orig/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew ./hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew +--- ../orig/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew 2009-01-27 15:41:01.000000000 -0500 ++++ ./hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew 2009-05-04 17:37:17.000000000 -0400 +@@ -30,6 +30,8 @@ asParNewGeneration.cpp cmsAdaptiveSize + asParNewGeneration.cpp cmsGCAdaptivePolicyCounters.hpp + asParNewGeneration.cpp defNewGeneration.inline.hpp + asParNewGeneration.cpp oop.pcgc.inline.hpp ++asParNewGeneration.cpp markOop.inline.hpp ++asParNewGeneration.cpp markSweep.inline.hpp + asParNewGeneration.cpp parNewGeneration.hpp + asParNewGeneration.cpp referencePolicy.hpp + +@@ -39,7 +41,7 @@ parCardTableModRefBS.cpp + parCardTableModRefBS.cpp java.hpp + parCardTableModRefBS.cpp mutexLocker.hpp + parCardTableModRefBS.cpp sharedHeap.hpp +-parCardTableModRefBS.cpp space.hpp ++parCardTableModRefBS.cpp space.inline.hpp + parCardTableModRefBS.cpp universe.hpp + parCardTableModRefBS.cpp virtualspace.hpp + +diff -upr ../orig/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge ./hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge +--- ../orig/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge 2009-01-27 15:41:01.000000000 -0500 ++++ ./hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge 2009-05-04 17:37:15.000000000 -0400 +@@ -302,6 +302,8 @@ psPermGen.cpp + psPermGen.cpp psMarkSweepDecorator.hpp + psPermGen.cpp psParallelCompact.hpp + psPermGen.cpp psPermGen.hpp ++psPermGen.cpp markOop.inline.hpp ++psPermGen.cpp markSweep.inline.hpp + + psPermGen.hpp psOldGen.hpp + +diff -upr ../orig/hotspot/src/share/vm/includeDB_compiler2 ./hotspot/src/share/vm/includeDB_compiler2 +--- ../orig/hotspot/src/share/vm/includeDB_compiler2 2009-01-27 15:41:02.000000000 -0500 ++++ ./hotspot/src/share/vm/includeDB_compiler2 2009-05-04 17:37:15.000000000 -0400 +@@ -140,6 +140,7 @@ c2_globals_.hpp + c2_globals_.hpp macros.hpp + + c2_init_.cpp compile.hpp ++c2_init_.cpp node.hpp + + c2compiler.cpp ad_.hpp + c2compiler.cpp c2compiler.hpp +@@ -833,6 +834,7 @@ parseHelper.cpp + phase.cpp compile.hpp + phase.cpp compileBroker.hpp + phase.cpp nmethod.hpp ++phase.cpp node.hpp + phase.cpp phase.hpp + + phase.hpp port.hpp +diff -upr ../orig/hotspot/src/share/vm/includeDB_core ./hotspot/src/share/vm/includeDB_core +--- ../orig/hotspot/src/share/vm/includeDB_core 2009-01-27 15:41:02.000000000 -0500 ++++ ./hotspot/src/share/vm/includeDB_core 2009-05-04 17:37:15.000000000 -0400 +@@ -476,7 +476,7 @@ cardTableModRefBS.cpp + cardTableModRefBS.cpp java.hpp + cardTableModRefBS.cpp mutexLocker.hpp + cardTableModRefBS.cpp sharedHeap.hpp +-cardTableModRefBS.cpp space.hpp ++cardTableModRefBS.cpp space.inline.hpp + cardTableModRefBS.cpp universe.hpp + cardTableModRefBS.cpp virtualspace.hpp + +@@ -1978,7 +1978,7 @@ instanceKlass.cpp + instanceKlass.cpp vmSymbols.hpp + + instanceKlass.hpp accessFlags.hpp +-instanceKlass.hpp bitMap.hpp ++instanceKlass.hpp bitMap.inline.hpp + instanceKlass.hpp constMethodOop.hpp + instanceKlass.hpp constantPoolOop.hpp + instanceKlass.hpp handles.hpp +diff -upr ../orig/hotspot/src/share/vm/includeDB_features ./hotspot/src/share/vm/includeDB_features +--- ../orig/hotspot/src/share/vm/includeDB_features 2009-01-27 15:41:02.000000000 -0500 ++++ ./hotspot/src/share/vm/includeDB_features 2009-05-04 17:37:15.000000000 -0400 +@@ -58,6 +58,8 @@ dump.cpp + + dump_.cpp assembler_.inline.hpp + dump_.cpp compactingPermGenGen.hpp ++dump_.cpp generation.inline.hpp ++dump_.cpp space.inline.hpp + + forte.cpp collectedHeap.inline.hpp + forte.cpp debugInfoRec.hpp +diff -upr ../orig/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp ./hotspot/src/share/vm/interpreter/bytecodeTracer.cpp +--- ../orig/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp 2009-01-27 15:41:02.000000000 -0500 ++++ ./hotspot/src/share/vm/interpreter/bytecodeTracer.cpp 2009-05-04 17:37:15.000000000 -0400 +@@ -77,7 +77,7 @@ class BytecodePrinter: public BytecodeCl + // the incoming method. We could lose a line of trace output. + // This is acceptable in a debug-only feature. + st->cr(); +- st->print("[%d] ", (int) Thread::current()->osthread()->thread_id()); ++ st->print("[%ld] ", (long) Thread::current()->osthread()->thread_id()); + method->print_name(st); + st->cr(); + _current_method = method(); +@@ -90,7 +90,7 @@ class BytecodePrinter: public BytecodeCl + code = Bytecodes::code_at(bcp); + } + int bci = bcp - method->code_base(); +- st->print("[%d] ", (int) Thread::current()->osthread()->thread_id()); ++ st->print("[%ld] ", (long) Thread::current()->osthread()->thread_id()); + if (Verbose) { + st->print("%8d %4d " INTPTR_FORMAT " " INTPTR_FORMAT " %s", + BytecodeCounter::counter_value(), bci, tos, tos2, Bytecodes::name(code)); +diff -upr ../orig/hotspot/src/share/vm/prims/forte.cpp ./hotspot/src/share/vm/prims/forte.cpp +--- ../orig/hotspot/src/share/vm/prims/forte.cpp 2009-01-27 15:41:03.000000000 -0500 ++++ ./hotspot/src/share/vm/prims/forte.cpp 2009-05-04 17:37:15.000000000 -0400 +@@ -872,6 +872,11 @@ void AsyncGetCallTrace(ASGCT_CallTrace * + // Method to let libcollector know about a dynamically loaded function. + // Because it is weakly bound, the calls become NOP's when the library + // isn't present. ++#ifdef __APPLE__ ++// XXXDARWIN: Link errors occur even when __attribute__((weak_import)) ++// is added ++#define collector_func_load(x0,x1,x2,x3,x4,x5,x6) (0) ++#else + void collector_func_load(char* name, + void* null_argument_1, + void* null_argument_2, +@@ -882,6 +887,7 @@ void collector_func_load(char* name, + #pragma weak collector_func_load + #define collector_func_load(x0,x1,x2,x3,x4,x5,x6) \ + ( collector_func_load ? collector_func_load(x0,x1,x2,x3,x4,x5,x6),0 : 0 ) ++#endif // __APPLE__ + #endif // !_WINDOWS + + } // end extern "C" +diff -upr ../orig/hotspot/src/share/vm/runtime/globals.hpp ./hotspot/src/share/vm/runtime/globals.hpp +--- ../orig/hotspot/src/share/vm/runtime/globals.hpp 2009-01-27 15:41:03.000000000 -0500 ++++ ./hotspot/src/share/vm/runtime/globals.hpp 2009-05-06 12:07:35.000000000 -0400 +@@ -294,7 +294,7 @@ class CommandLineFlags { + /* UseMembar is theoretically a temp flag used for memory barrier \ + * removal testing. It was supposed to be removed before FCS but has \ + * been re-added (see 6401008) */ \ +- product(bool, UseMembar, false, \ ++ product(bool, UseMembar, true, \ + "(Unstable) Issues membars on thread state transitions") \ + \ + product(bool, PrintCommandLineFlags, false, \ +diff -upr ../orig/hotspot/src/share/vm/runtime/os.cpp ./hotspot/src/share/vm/runtime/os.cpp +--- ../orig/hotspot/src/share/vm/runtime/os.cpp 2009-01-27 15:41:03.000000000 -0500 ++++ ./hotspot/src/share/vm/runtime/os.cpp 2009-05-04 17:37:17.000000000 -0400 +@@ -155,7 +155,11 @@ char* os::iso8601_time(char* buffer, siz + } + // Save the results of localtime + const struct tm time_struct = *time_struct_temp; ++#if defined(_ALLBSD_SOURCE) ++ const time_t zone = (time_t) time_struct_temp->tm_gmtoff; ++#else + const time_t zone = timezone; ++#endif + + // If daylight savings time is in effect, + // we are 1 hour East of our time zone +diff -upr ../orig/hotspot/src/share/vm/runtime/vm_version.cpp ./hotspot/src/share/vm/runtime/vm_version.cpp +--- ../orig/hotspot/src/share/vm/runtime/vm_version.cpp 2009-01-27 15:41:03.000000000 -0500 ++++ ./hotspot/src/share/vm/runtime/vm_version.cpp 2009-05-04 17:37:15.000000000 -0400 +@@ -141,7 +141,8 @@ const char* Abstract_VM_Version::vm_rele + + #define OS LINUX_ONLY("linux") \ + WINDOWS_ONLY("windows") \ +- SOLARIS_ONLY("solaris") ++ SOLARIS_ONLY("solaris") \ ++ BSD_ONLY("bsd") + + #define CPU IA32_ONLY("x86") \ + IA64_ONLY("ia64") \ +diff -upr ../orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp ./hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp +--- ../orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2009-01-27 15:41:03.000000000 -0500 ++++ ./hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2009-05-04 17:37:17.000000000 -0400 +@@ -74,12 +74,25 @@ + # include + # endif + +-#ifdef LINUX ++#if defined(LINUX) || defined(_ALLBSD_SOURCE) + #include + #include ++#ifndef __OpenBSD__ + #include ++#endif ++#ifdef __APPLE__ ++ #include ++ #if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4) ++ // Mac OS X 10.4 defines EFL_AC and EFL_ID, ++ // which conflict with hotspot variable names. ++ // ++ // This has been fixed in Mac OS X 10.5. ++ #undef EFL_AC ++ #undef EFL_ID ++ #endif ++#endif + #include +-#endif // LINUX ++#endif // LINUX || _ALLBSD_SOURCE + + // 4810578: varargs unsafe on 32-bit integer/64-bit pointer architectures + // When __cplusplus is defined, NULL is defined as 0 (32-bit constant) in +@@ -115,17 +128,20 @@ + // pointer is stored as integer value. On some platforms, sizeof(intptr_t) > + // sizeof(void*), so here we want something which is integer type, but has the + // same size as a pointer. +-#ifdef LINUX ++#ifdef __GNUC__ + #ifdef _LP64 + #define NULL_WORD 0L + #else +- #define NULL_WORD 0 ++ // Cast 0 to intptr_t rather than int32_t since they are not the same type ++ // on platforms such as Mac OS X. ++ #define NULL_WORD ((intptr_t)0) + #endif + #else + #define NULL_WORD NULL + #endif + +-#ifndef LINUX ++ ++#if !defined(LINUX) && !defined(_ALLBSD_SOURCE) + // Compiler-specific primitive types + typedef unsigned short uint16_t; + #ifndef _UINT32_T +@@ -145,7 +161,7 @@ typedef unsigned int uintptr_t; + // prior definition of intptr_t, and add "&& !defined(XXX)" above. + #endif // _SYS_INT_TYPES_H + +-#endif // !LINUX ++#endif // !LINUX && !_ALLBSD_SOURCE + + // Additional Java basic types + +@@ -229,7 +245,9 @@ inline int g_isnan(float f) { return is + inline int g_isnan(float f) { return isnand(f); } + #endif + inline int g_isnan(double f) { return isnand(f); } +-#elif LINUX ++#elif defined(__APPLE__) ++inline int g_isnan(double f) { return isnan(f); } ++#elif defined(LINUX) || defined(_ALLBSD_SOURCE) + inline int g_isnan(float f) { return isnanf(f); } + inline int g_isnan(double f) { return isnan(f); } + #else +diff -upr ../orig/hotspot/src/share/vm/utilities/macros.hpp ./hotspot/src/share/vm/utilities/macros.hpp +--- ../orig/hotspot/src/share/vm/utilities/macros.hpp 2009-01-27 15:41:03.000000000 -0500 ++++ ./hotspot/src/share/vm/utilities/macros.hpp 2009-05-04 17:37:17.000000000 -0400 +@@ -147,6 +147,16 @@ + #define NOT_WINDOWS(code) code + #endif + ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) ++#define BSD_ONLY(code) code ++#define NOT_BSD(code) ++#else ++#define BSD_ONLY(code) ++#define NOT_BSD(code) code ++#endif ++ ++ ++ + #ifdef IA32 + #define IA32_ONLY(code) code + #define NOT_IA32(code) +diff -upr ../orig/hotspot/src/share/vm/utilities/ostream.cpp ./hotspot/src/share/vm/utilities/ostream.cpp +--- ../orig/hotspot/src/share/vm/utilities/ostream.cpp 2009-01-27 15:41:03.000000000 -0500 ++++ ./hotspot/src/share/vm/utilities/ostream.cpp 2009-05-04 17:37:15.000000000 -0400 +@@ -780,7 +780,7 @@ bufferedStream::~bufferedStream() { + + #ifndef PRODUCT + +-#if defined(SOLARIS) || defined(LINUX) ++#if defined(SOLARIS) || defined(LINUX) || defined(_ALLBSD_SOURCE) + #include + #include + #include +diff -upr ../orig/hotspot/src/share/vm/utilities/vmError.cpp ./hotspot/src/share/vm/utilities/vmError.cpp +--- ../orig/hotspot/src/share/vm/utilities/vmError.cpp 2009-01-27 15:41:04.000000000 -0500 ++++ ./hotspot/src/share/vm/utilities/vmError.cpp 2009-05-04 17:37:17.000000000 -0400 +@@ -34,13 +34,18 @@ const char *env_list[] = { + "JAVA_HOME", "JRE_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH", + "JAVA_COMPILER", "PATH", "USERNAME", + +- // Env variables that are defined on Solaris/Linux ++ // Env variables that are defined on Solaris/Linux/BSD + "LD_LIBRARY_PATH", "LD_PRELOAD", "SHELL", "DISPLAY", + "HOSTTYPE", "OSTYPE", "ARCH", "MACHTYPE", + + // defined on Linux + "LD_ASSUME_KERNEL", "_JAVA_SR_SIGNUM", + ++ // defined on Darwin ++ "DYLD_LIBRARY_PATH", "DYLD_FALLBACK_LIBRARY_PATH", ++ "DYLD_FRAMEWORK_PATH", "DYLD_FALLBACK_FRAMEWORK_PATH", ++ "DYLD_INSERT_LIBRARIES", ++ + // defined on Windows + "OS", "PROCESSOR_IDENTIFIER", "_ALT_JAVA_HOME_DIR", + +@@ -673,6 +678,11 @@ void VMError::report_and_die() { + reset_signal_handlers(); + + } else { ++ // If UseOsErrorReporting we call this for each level of the call stack ++ // while searching for the exception handler. Only the first level needs ++ // to be reported. ++ if (UseOSErrorReporting && log_done) return; ++ + // This is not the first error, see if it happened in a different thread + // or in the same thread during error reporting. + if (first_error_tid != mytid) { +@@ -793,7 +803,7 @@ void VMError::report_and_die() { + const char* ptr = OnError; + while ((cmd = next_OnError_command(buffer, sizeof(buffer), &ptr)) != NULL){ + out.print_raw ("# Executing "); +-#if defined(LINUX) ++#if defined(LINUX) || defined(_ALLBSD_SOURCE) + out.print_raw ("/bin/sh -c "); + #elif defined(SOLARIS) + out.print_raw ("/usr/bin/sh -c "); +diff -upr ../orig/jdk/make/com/sun/java/pack/Makefile ./jdk/make/com/sun/java/pack/Makefile +--- ../orig/jdk/make/com/sun/java/pack/Makefile 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/com/sun/java/pack/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -61,6 +61,7 @@ vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR + + + ifeq ($(STANDALONE),true) ++ ifneq ($(SYSTEM_ZLIB),true) + ZIPOBJDIR = $(OUTPUTDIR)/tmp/sun/java.util.zip/zip/$(OBJDIRNAME) + + ZIPOBJS = $(ZIPOBJDIR)/zcrc32.$(OBJECT_SUFFIX) \ +@@ -78,6 +79,10 @@ ifeq ($(STANDALONE),true) + ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 + OTHER_CXXFLAGS += $(ZINCLUDE) + LDDFLAGS += $(ZIPOBJS) ++ else ++ LDDFLAGS += -lz ++ OTHER_CXXFLAGS += -DSYSTEM_ZLIB ++ endif + else + OTHER_CXXFLAGS += -DNO_ZLIB -DUNPACK_JNI + OTHER_LDLIBS += $(JVMLIB) +@@ -102,7 +107,11 @@ ifeq ($(PLATFORM), windows) + COMPILER_WARNINGS_FATAL=false + else + LDOUTPUT = -o #Have a space ++ifeq ($(PLATFORM), bsd) ++ LDDFLAGS += -pthread ++else + LDDFLAGS += -lc ++endif + OTHER_LDLIBS += $(LIBCXX) + # setup the list of libraries to link in... + ifeq ($(PLATFORM), linux) +diff -upr ../orig/jdk/make/com/sun/security/auth/module/Makefile ./jdk/make/com/sun/security/auth/module/Makefile +--- ../orig/jdk/make/com/sun/security/auth/module/Makefile 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/com/sun/security/auth/module/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -70,7 +70,7 @@ ifeq ($(PLATFORM), solaris) + include FILES_c_solaris.gmk + endif # solaris + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + LIBRARY = jaas_unix + include FILES_export_unix.gmk + include FILES_c_unix.gmk +diff -upr ../orig/jdk/make/com/sun/tools/attach/FILES_c.gmk ./jdk/make/com/sun/tools/attach/FILES_c.gmk +--- ../orig/jdk/make/com/sun/tools/attach/FILES_c.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/com/sun/tools/attach/FILES_c.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -39,4 +39,7 @@ FILES_c = \ + LinuxVirtualMachine.c + endif + +- ++ifeq ($(PLATFORM),bsd) ++FILES_c = \ ++ BsdVirtualMachine.c ++endif +diff -upr ../orig/jdk/make/com/sun/tools/attach/FILES_java.gmk ./jdk/make/com/sun/tools/attach/FILES_java.gmk +--- ../orig/jdk/make/com/sun/tools/attach/FILES_java.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/com/sun/tools/attach/FILES_java.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -43,6 +43,11 @@ FILES_java += \ + sun/tools/attach/LinuxAttachProvider.java + endif + ++ifeq ($(PLATFORM), bsd) ++FILES_java += \ ++ $(TARGDIR)/sun/tools/attach/BsdAttachProvider.java ++endif ++ + # + # Files that need to be copied + # +diff -upr ../orig/jdk/make/common/Defs-bsd.gmk ./jdk/make/common/Defs-bsd.gmk +--- ../orig/jdk/make/common/Defs-bsd.gmk 2009-05-04 18:32:16.000000000 -0400 ++++ ./jdk/make/common/Defs-bsd.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -43,12 +43,6 @@ + # Get shared JDK settings + include $(JDK_MAKE_SHARED_DIR)/Defs.gmk + +-# Part of INCREMENTAL_BUILD mechanism. +-# Compiler emits things like: path/file.o: file.h +-# We want something like: relative_path/file.o relative_path/file.d: file.h +-CC_DEPEND = -MM +-CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' +- + ifndef PLATFORM_SRC + PLATFORM_SRC = $(BUILDDIR)/../src/solaris + endif # PLATFORM_SRC +@@ -61,7 +55,7 @@ ifndef OPENJDK + endif + + # platform specific include files +-PLATFORM_INCLUDE_NAME = $(PLATFORM) ++PLATFORM_INCLUDE_NAME = $(OS_NAME) + PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME) + + # suffix used for make dependencies files. +@@ -104,6 +98,10 @@ endif + # as the default. + CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++ifeq ($(OS_VENDOR),Apple) ++ # 16-byte stack re-alignment on 32-bit Darwin ++ CFLAGS_REQUIRED_i586 += -mstackrealign ++endif + CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 + LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 +@@ -178,7 +176,7 @@ ifeq ($(FASTDEBUG), true) + CXXFLAGS_DBG += $(CC_LOWER_OPT) + endif + +-CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -DLINUX $(VERSION_DEFINES) \ ++CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -D_ALLBSD_SOURCE $(VERSION_DEFINES) \ + -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT + + ifeq ($(ARCH_DATA_MODEL), 64) +@@ -188,33 +186,15 @@ endif + CPPFLAGS_OPT = + CPPFLAGS_DBG = -DDEBUG + +-ifdef LIBRARY +- # Libraries need to locate other libraries at runtime, and you can tell +- # a library where to look by way of the dynamic runpaths (RPATH or RUNPATH) +- # buried inside the .so. The $ORIGIN says to look relative to where +- # the library itself is and it can be followed with relative paths from +- # that. By default we always look in $ORIGIN, optionally we add relative +- # paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths. +- # On Bsd we add a flag -z origin, not sure if this is necessary, but +- # doesn't seem to hurt. +- # The environment variable LD_LIBRARY_PATH will over-ride these runpaths. +- # Try: 'readelf -d lib*.so' to see these settings in a library. +- # +- LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN +- LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%) +-endif +- +-EXTRA_LIBS += -lc +- +-LDFLAGS_DEFS_OPTION = -z defs +-LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION) +- + # + # -L paths for finding and -ljava + # +-LDFLAGS_OPT = -Xlinker -O1 + LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH) ++ ++ifneq ($(OS_VENDOR), Apple) ++LDFLAGS_OPT = -Xlinker -O1 + LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX) ++endif + + # + # -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always +@@ -235,8 +215,8 @@ AUTOMATIC_PCH_OPTION = + # + ifeq ($(VARIANT), OPT) + ifneq ($(NO_STRIP), true) +- # Debug 'strip -g' leaves local function Elf symbols (better stack traces) +- POST_STRIP_PROCESS = $(STRIP) -g ++ # Debug 'strip -S' leaves local function Elf symbols (better stack traces) ++ POST_STRIP_PROCESS = $(STRIP) -S + endif + endif + +@@ -245,13 +225,9 @@ endif + # + LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker + +-# +-# Support for Quantify. +-# +-ifdef QUANTIFY +-QUANTIFY_CMD = quantify +-QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes +-LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS) ++# Darwin does not support linker map files. ++ifeq ($(OS_VENDOR), Apple) ++LDNOMAP=true + endif + + # +@@ -280,7 +256,9 @@ override HAVE_ALTZONE = false + override HAVE_FILIOH = false + override HAVE_GETHRTIME = false + override HAVE_GETHRVTIME = false ++ifeq ($(OS_VENDOR),Apple) + override HAVE_SIGIGNORE = true ++endif + override LEX_LIBRARY = -lfl + ifeq ($(STATIC_CXX),true) + override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic +@@ -291,13 +269,9 @@ override LIBPOSIX4 = + override LIBSOCKET = + override LIBTHREAD = + override MOOT_PRIORITIES = true +-override NO_INTERRUPTIBLE_IO = true +-override OPENWIN_HOME = /usr/X11R6 +-ifeq ($(ARCH), amd64) +-override OPENWIN_LIB = $(OPENWIN_HOME)/lib64 +-else ++override NO_INTERRUPTIBLE_IO = false ++override OPENWIN_HOME = $(X11_PATH) + override OPENWIN_LIB = $(OPENWIN_HOME)/lib +-endif + override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER + override SUN_CMM_SUBDIR = + override THREADS_FLAG = native +@@ -318,6 +292,14 @@ override USE_EXECNAME = true + # DPS (Displayable PostScript) is available on Solaris machines + HAVE_DPS = no + ++ifeq ($(OS_VENDOR), FreeBSD) ++ SYSTEM_ZLIB = true ++endif ++ ++ifeq ($(OS_VENDOR), OpenBSD) ++ SYSTEM_ZLIB = true ++endif ++ + # + # Japanese manpages + # +diff -upr ../orig/jdk/make/common/Defs-linux.gmk ./jdk/make/common/Defs-linux.gmk +--- ../orig/jdk/make/common/Defs-linux.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/Defs-linux.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -292,7 +292,7 @@ override LIBSOCKET = + override LIBTHREAD = + override MOOT_PRIORITIES = true + override NO_INTERRUPTIBLE_IO = true +-override OPENWIN_HOME = /usr/X11R6 ++override OPENWIN_HOME = $(X11_PATH) + ifeq ($(ARCH), amd64) + override OPENWIN_LIB = $(OPENWIN_HOME)/lib64 + else +diff -upr ../orig/jdk/make/common/Defs.gmk ./jdk/make/common/Defs.gmk +--- ../orig/jdk/make/common/Defs.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/Defs.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -188,6 +188,24 @@ else + _OUTPUTDIR=$(JDK_TOPDIR)/build/$(PLATFORM)-$(ARCH) + endif + ++ifneq ($(PLATFORM), windows) ++ ifdef ALT_X11_PATH ++ X11_PATH = $(ALT_X11_PATH) ++ else ++ X11_PATH = /usr/X11R6 ++ endif ++ ++ ifdef ALT_PACKAGE_PATH ++ PACKAGE_PATH = $(ALT_PACKAGE_PATH) ++ else ++ ifeq ($(PLATFORM), linux) ++ PACKAGE_PATH = /usr ++ else ++ PACKAGE_PATH = /usr/local ++ endif ++ endif ++endif ++ + # + # Get platform definitions + # +@@ -223,6 +241,7 @@ DEVTOOLS_FT_DIR_EXISTS = $(shell \ + + ifdef ALT_FREETYPE_LIB_PATH + FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH) ++ USING_SYSTEM_FT_LIB=true + else + ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true) + FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib +@@ -287,6 +306,10 @@ ifdef PROGRAM + LDLIBS_COMMON = -ldl + endif + ++ ifeq ($(PLATFORM), bsd) ++ LDLIBS_COMMON = -pthread ++ endif ++ + endif # PROGRAM + + LDLIBS_COMMON += $(EXTRA_LIBS) +diff -upr ../orig/jdk/make/common/Program.gmk ./jdk/make/common/Program.gmk +--- ../orig/jdk/make/common/Program.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/Program.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -67,11 +67,27 @@ endif + # Create a dependency on libjli (Java Launcher Infrastructure) + # + # On UNIX, this is a relative dependency using $ORIGIN. Unfortunately, to +-# do this reliably on Linux takes a different syntax than Solaris. ++# do this reliably on Linux takes a different syntax than Solaris. BSD's ++# don't support $ORIGIN so build an archive instead. + # + # On Windows, this is done by using the same directory as the executable + # itself, as with all the Windows libraries. + # ++ifeq ($(PLATFORM), bsd) ++ ifeq ($(OS_VENDOR), Apple) ++ LDFLAGS += -Wl,-all_load ++ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a ++ else ++ LDFLAGS += -Wl,--whole-archive ++ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a ++ LDFLAGS += -Wl,--no-whole-archive ++# Work-around an dlsym(RTLD_DEFAULT) bug in at least FreeBSD & OpenBSD ++ LDFLAGS += -Wl,--export-dynamic ++ endif ++ ifeq ($(SYSTEM_ZLIB),true) ++ OTHER_LDLIBS += -lz ++ endif ++endif + ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems + LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli + OTHER_LDLIBS += -ljli +@@ -175,6 +191,10 @@ else # USE_PTHREADS + THREADLIBS = $(LIBTHREAD) + endif # USE_PTHREADS + ++ifeq ($(PLATFORM), bsd) ++THREADLIBS = -pthread ++endif ++ + # + # This rule only applies on unix. It supports quantify and its ilk. + # +@@ -243,15 +263,19 @@ endif + + + ifneq ($(PLATFORM), windows) ++ifneq ($(PLATFORM), bsd) + HAVE_GETHRTIME=true + endif ++endif + + ifeq ($(HAVE_GETHRTIME),true) + OTHER_CPPFLAGS += -DHAVE_GETHRTIME + endif + + OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin ++ifneq ($(SYSTEM_ZLIB),true) + OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 ++endif + + # this may not be necessary... + ifeq ($(PLATFORM), windows) +diff -upr ../orig/jdk/make/common/Release.gmk ./jdk/make/common/Release.gmk +--- ../orig/jdk/make/common/Release.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/Release.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -147,14 +147,13 @@ JRE_MAN_PAGES = \ + tnameserv.1 \ + unpack200.1 + +-ifeq ($(ARCH_DATA_MODEL),32) ++ifeq ($(BUILD_DEPLOY), true) + JRE_MAN_PAGES += javaws.1 + endif + + JDK_MAN_PAGES = \ + $(JRE_MAN_PAGES) \ + appletviewer.1 \ +- apt.1 \ + extcheck.1 \ + idlj.1 \ + jar.1 \ +@@ -193,6 +192,11 @@ ifeq ($(PLATFORM), linux) + JA_DIRNAME=ja_JP.$(JA_SOURCE_ENCODING) + endif # linux + ++ifeq ($(PLATFORM), bsd) ++ MANBASEDIRS=$(JDK_TOPDIR)/src/bsd/doc $(IMPORTDOCDIR) ++ MAN1SUBDIR = man ++endif ++ + define copy-man-pages + $(MKDIR) -p $1/man/man1 + for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \ +@@ -325,6 +329,12 @@ ifndef OPENJDK + SOURCE_DIRS += $(CLOSED_SRC)/share/classes + endif + ++ifeq ($(OS_VENDOR), OpenBSD) ++ FILES_FROM_ARG=-I ++else ++ FILES_FROM_ARG=-T ++endif ++ + + # + # Specific files and directories that will be filtered out from above areas. +@@ -982,7 +992,7 @@ initial-image-jdk:: initial-image-jdk-se + @# generated by the more efficient solaris/windows method of copying files. + @# So for Linux, make use of the -T option (like Solaris' -I option) of + @# obtaining the list of files from a file. MKS tar has no such option. +- ifeq ($(PLATFORM), linux) ++ ifneq (,$(findstring $(PLATFORM), linux bsd)) + for d in $(SOURCE_DIRS); do \ + $(RM) $(ABS_TEMPDIR)/src-files.list; \ + ($(CD) $$d && \ +@@ -995,7 +1005,7 @@ initial-image-jdk:: initial-image-jdk-se + done ; \ + ) ; \ + if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \ +- ($(CD) $$d && $(TAR) cf - -T $(ABS_TEMPDIR)/src-files.list ) \ ++ ($(CD) $$d && $(TAR) cf - $(FILES_FROM_ARG) $(ABS_TEMPDIR)/src-files.list ) \ + | ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \ + fi; \ + done +diff -upr ../orig/jdk/make/common/internal/BinaryPlugs.gmk ./jdk/make/common/internal/BinaryPlugs.gmk +--- ../orig/jdk/make/common/internal/BinaryPlugs.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/internal/BinaryPlugs.gmk 2009-05-04 17:37:17.000000000 -0400 +@@ -49,8 +49,6 @@ PLUG_JMF_CLASS_NAMES = \ + com/sun/jmx/snmp/SnmpDataTypeEnums.class \ + com/sun/jmx/snmp/SnmpDefinitions.class \ + com/sun/jmx/snmp/SnmpOid.class \ +-com/sun/jmx/snmp/SnmpOidDatabase.class \ +-com/sun/jmx/snmp/SnmpOidDatabaseSupport.class \ + com/sun/jmx/snmp/SnmpOidRecord.class \ + com/sun/jmx/snmp/SnmpOidTable.class \ + com/sun/jmx/snmp/SnmpOidTableSupport.class \ +@@ -60,22 +58,16 @@ com/sun/jmx/snmp/SnmpPeer.class \ + com/sun/jmx/snmp/SnmpTimeticks.class \ + com/sun/jmx/snmp/SnmpVarBind.class \ + com/sun/jmx/snmp/SnmpVarBindList.class \ +-com/sun/jmx/snmp/Timestamp.class \ + com/sun/jmx/snmp/daemon/SendQ.class \ + com/sun/jmx/snmp/daemon/SnmpInformRequest.class \ +-com/sun/jmx/snmp/daemon/SnmpQManager.class \ +-com/sun/jmx/snmp/daemon/SnmpRequestCounter.class \ +-com/sun/jmx/snmp/daemon/SnmpResponseHandler.class \ +-com/sun/jmx/snmp/daemon/SnmpSendServer.class \ +-com/sun/jmx/snmp/daemon/SnmpSession.class \ +-com/sun/jmx/snmp/daemon/SnmpSocket.class \ +-com/sun/jmx/snmp/daemon/SnmpTimerServer.class \ +-com/sun/jmx/snmp/daemon/WaitQ.class ++com/sun/jmx/snmp/daemon/SnmpSession.class ++ ++PLUG_GNU_CLASS_NAMES = gnu + + # Class list temp files (used by both import and export of plugs) + + PLUG_TEMPDIR=$(ABS_TEMPDIR)/plugs +-PLUG_CLASS_AREAS = jmf ++PLUG_CLASS_AREAS = jmf gnu + PLUG_CLISTS = $(PLUG_CLASS_AREAS:%=$(PLUG_TEMPDIR)/%.clist) + + # Create jargs file command +@@ -93,11 +85,18 @@ $(PLUG_TEMPDIR)/jmf.clist: + @for i in $(PLUG_JMF_CLASS_NAMES) ; do \ + $(ECHO) "$$i" >> $@; \ + done ++$(PLUG_TEMPDIR)/gnu.clist: ++ @$(prep-target) ++ @for i in $(PLUG_GNU_CLASS_NAMES) ; do \ ++ $(ECHO) "$$i" >> $@ ; \ ++ done + $(PLUG_TEMPDIR)/all.clist: $(PLUG_CLISTS) + @$(prep-target) + $(CAT) $(PLUG_CLISTS) > $@ + $(PLUG_TEMPDIR)/jmf.jargs: $(PLUG_TEMPDIR)/jmf.clist + $(plug-create-jargs) ++$(PLUG_TEMPDIR)/gnu.jargs: $(PLUG_TEMPDIR)/gnu.clist ++ $(plug-create-jargs) + $(PLUG_TEMPDIR)/all.jargs: $(PLUG_TEMPDIR)/all.clist + $(plug-create-jargs) + +@@ -153,11 +152,16 @@ endif # IMPORT_BINARY_PLUGS + + import-binary-plug-jmf-classes: $(PLUG_IMPORT_JARFILE) $(PLUG_TEMPDIR)/jmf.clist + $(call import-binary-plug-classes,$(PLUG_TEMPDIR)/jmf.clist) ++import-binary-plug-gnu-classes: $(PLUG_IMPORT_JARFILE) $(PLUG_TEMPDIR)/gnu.clist ++ $(call import-binary-plug-classes,$(PLUG_TEMPDIR)/gnu.clist) ++ ++ + + # Import all classes from the jar file + + import-binary-plug-jar: \ +- import-binary-plug-jmf-classes ++ import-binary-plug-jmf-classes \ ++ import-binary-plug-gnu-classes + + # Binary plug start/complete messages + +@@ -169,14 +173,12 @@ import-binary-plugs-completed: + + # Import lib files (only if they don't exist already) + +-import-binary-plugs-libs: \ +- $(PLUG_LIBRARY_NAMES:%=$(LIB_LOCATION)/%) ++import-binary-plugs-libs: + + # Import everything + + import-binary-plugs: \ + import-binary-plugs-started \ +- import-binary-plugs-libs \ + import-binary-plug-jar \ + import-binary-plugs-completed + +diff -upr ../orig/jdk/make/common/shared/Compiler-gcc.gmk ./jdk/make/common/shared/Compiler-gcc.gmk +--- ../orig/jdk/make/common/shared/Compiler-gcc.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/shared/Compiler-gcc.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -99,6 +99,24 @@ ifeq ($(PLATFORM), linux) + + endif + ++ifeq ($(PLATFORM), bsd) ++ ++ # Settings specific to BSD ++ CC = $(COMPILER_PATH)gcc ++ CPP = $(COMPILER_PATH)gcc -E ++ CXX = $(COMPILER_PATH)g++ ++ REQUIRED_CC_VER = 3.2 ++ ++ # Option used to create a shared library ++ # Option used to create a shared library ++ ifeq ($(OS_VENDOR), Apple) ++ SHARED_LIBRARY_FLAG = -dynamiclib ++ else ++ SHARED_LIBRARY_FLAG = -shared ++ endif ++ SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 ) ++endif ++ + ifeq ($(PLATFORM), solaris) + + # Settings specific to Solaris +diff -upr ../orig/jdk/make/common/shared/Compiler.gmk ./jdk/make/common/shared/Compiler.gmk +--- ../orig/jdk/make/common/shared/Compiler.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/shared/Compiler.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -37,8 +37,8 @@ ifeq ($(PLATFORM), solaris) + override CC_VERSION = sun + endif + +-# Linux uses GNU compilers by default +-ifeq ($(PLATFORM), linux) ++# Linux & BSD uses GNU compilers by default ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + override CC_VERSION = gcc + endif + +diff -upr ../orig/jdk/make/common/shared/Defs-bsd.gmk ./jdk/make/common/shared/Defs-bsd.gmk +--- ../orig/jdk/make/common/shared/Defs-bsd.gmk 2009-05-04 18:32:16.000000000 -0400 ++++ ./jdk/make/common/shared/Defs-bsd.gmk 2009-05-04 22:40:38.000000000 -0400 +@@ -70,7 +70,7 @@ $(shell if [ "$1" != "" -a -d "$1" ]; th + endef + + # Location on system where jdk installs might be +-USRJDKINSTANCES_PATH =/opt/java ++USRJDKINSTANCES_PATH = $(PACKAGE_PATH) + + # UNIXCOMMAND_PATH: path to where the most common Unix commands are. + # NOTE: Must end with / so that it could be empty, allowing PATH usage. +@@ -123,7 +123,7 @@ endif + ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined" + DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH)) + else +- DEVTOOLS_PATH =/usr/bin/ ++ DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/ + endif + + # _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK. +@@ -162,16 +162,12 @@ else + endif + MOTIF_INCLUDE = $(MOTIF_DIR)/include + +-# GCC29_COMPILER_PATH: is the path to where the gcc 2.9 compiler is installed +-# NOTE: Must end with / so that it could be empty, allowing PATH usage. +-ifneq "$(origin ALT_GCC29_COMPILER_PATH)" "undefined" +- GCC29_COMPILER_PATH :=$(call PrefixPath,$(ALT_GCC29_COMPILER_PATH)) ++ifeq ($(OS_VENDOR), Apple) ++ _CUPS_HEADERS_PATH=/usr/include + else +- GCC29_COMPILER_PATH = $(JDK_DEVTOOLS_DIR)/$(PLATFORM)/gcc29/usr/ ++ _CUPS_HEADERS_PATH=$(PACKAGE_PATH)/include + endif + +-_CUPS_HEADERS_PATH=/usr/include +- + # Import JDK images allow for partial builds, components not built are + # imported (or copied from) these import areas when needed. + +diff -upr ../orig/jdk/make/common/shared/Defs-utils.gmk ./jdk/make/common/shared/Defs-utils.gmk +--- ../orig/jdk/make/common/shared/Defs-utils.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/shared/Defs-utils.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -77,6 +77,13 @@ ifndef FINDBUGS_HOME + endif + FINDBUGS = $(FINDBUGS_HOME)/bin/findbugs + ++ifeq ($(PLATFORM),bsd) ++ UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH) ++ UTILS_USR_BIN_PATH=$(USRBIN_PATH) ++ UTILS_CCS_BIN_PATH=$(USRBIN_PATH) ++ UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH) ++endif ++ + # Utilities + ADB = $(UTILS_COMMAND_PATH)adb + AR = $(UTILS_CCS_BIN_PATH)ar +@@ -198,3 +205,32 @@ ifeq ($(PLATFORM),solaris) + ECHO = /usr/bin/echo + endif + ++# BSD specific ++ifeq ($(PLATFORM),bsd) ++ BASENAME = $(UTILS_USR_BIN_PATH)basename ++ EGREP = $(UTILS_USR_BIN_PATH)egrep ++ EXPR = $(UTILS_COMMAND_PATH)expr ++ FMT = $(UTILS_USR_BIN_PATH)fmt ++ GREP = $(UTILS_USR_BIN_PATH)grep ++ GUNZIP = $(UTILS_USR_BIN_PATH)gunzip ++ ID = $(UTILS_USR_BIN_PATH)id ++ MSGFMT = $(UTILS_DEVTOOL_PATH)msgfmt ++ SED = $(UTILS_USR_BIN_PATH)sed ++ SORT = $(UTILS_USR_BIN_PATH)sort ++ TEST = $(UTILS_COMMAND_PATH)test ++ TOUCH = $(UTILS_USR_BIN_PATH)touch ++ TRUE = $(UTILS_USR_BIN_PATH)true ++ UNAME = $(UTILS_USR_BIN_PATH)uname ++ # BSD OS_VENDOR specific ++ ifeq ($(OS_VENDOR), Apple) ++ NAWK = $(UTILS_USR_BIN_PATH)awk ++ UNZIPSFX = $(UTILS_USR_BIN_PATH)unzipsfx ++ ZIPEXE = $(UTILS_USR_BIN_PATH)zip ++ else ++ UNZIP = $(UTILS_DEVTOOL_PATH)unzip ++ endif ++ ifneq ($(OS_VENDOR), OpenBSD) ++ CPIO = $(UTILS_USR_BIN_PATH)cpio ++ TAR = $(UTILS_USR_BIN_PATH)tar ++ endif ++endif +diff -upr ../orig/jdk/make/common/shared/Defs.gmk ./jdk/make/common/shared/Defs.gmk +--- ../orig/jdk/make/common/shared/Defs.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/shared/Defs.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -143,7 +143,7 @@ $(shell \ + echo older; \ + else \ + if [ $(call MajorVersion,$1) -eq $(call MajorVersion,$2) -a \ +- $(call MinorVersion,$1) -lt $(call MinorVersion,$2) ]; then \ ++ `echo $(call MinorVersion,$1) | sed -e 's/\([0-9]*\)\(.*\)/\1/'` -lt $(call MinorVersion,$2) ]; then \ + echo older; \ + else \ + echo newer; \ +diff -upr ../orig/jdk/make/common/shared/Platform.gmk ./jdk/make/common/shared/Platform.gmk +--- ../orig/jdk/make/common/shared/Platform.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/shared/Platform.gmk 2009-05-04 17:37:17.000000000 -0400 +@@ -276,6 +276,76 @@ ifeq ($(SYSTEM_UNAME), Linux) + MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) + endif + ++ifeq ($(SYSTEM_UNAME), FreeBSD) ++ PLATFORM = bsd ++ OS_NAME = freebsd ++ OS_VENDOR = FreeBSD ++ REQUIRED_OS_VERSION = 6.0 ++endif ++ ++ifeq ($(SYSTEM_UNAME), Darwin) ++ PLATFORM = bsd ++ OS_NAME = darwin ++ OS_VENDOR = Apple ++ REQUIRED_OS_VERSION = 8.0 ++endif ++ ++ifeq ($(SYSTEM_UNAME), NetBSD) ++ PLATFORM = bsd ++ OS_NAME = netbsd ++ OS_VENDOR = NetBSD ++ REQUIRED_OS_VERSION = 3.0 ++endif ++ ++ifeq ($(SYSTEM_UNAME), OpenBSD) ++ PLATFORM = bsd ++ OS_NAME = openbsd ++ OS_VENDOR = OpenBSD ++ REQUIRED_OS_VERSION = 4.2 ++endif ++ ++# Platform settings specific to BSD ++ifeq ($(PLATFORM), bsd) ++ OS_VERSION := $(shell uname -r) ++ # Arch and OS name/version ++ mach := $(shell uname -m) ++ archExpr = case "$(mach)" in \ ++ i[3-9]86) \ ++ echo i586 \ ++ ;; \ ++ *) \ ++ echo $(mach) \ ++ ;; \ ++ esac ++ ARCH := $(shell $(archExpr) ) ++ ARCH_FAMILY := $(ARCH) ++ ++ # i586 and sparc are 32 bit, amd64 and sparc64 are 64 ++ ifneq (,$(findstring $(ARCH), i586 sparc)) ++ ARCH_DATA_MODEL=32 ++ else ++ ARCH_DATA_MODEL=64 ++ endif ++ ++ # Need to maintain the jre/lib/i386 location for 32-bit Intel ++ ifeq ($(ARCH), i586) ++ LIBARCH = i386 ++ else ++ LIBARCH = $(ARCH) ++ endif ++ ++ # Value of Java os.arch property ++ ARCHPROP = $(LIBARCH) ++ ++ # Suffix for file bundles used in previous release ++ BUNDLE_FILE_SUFFIX=.tar.gz ++ # Minimum disk space needed as determined by running 'du -sk' on ++ # a fully built workspace. ++ REQUIRED_FREE_SPACE=1500000 ++ # How much RAM does this machine have: ++ MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' ) ++endif ++ + # Windows with and without CYGWIN will be slightly different + ifeq ($(SYSTEM_UNAME), Windows_NT) + PLATFORM = windows +@@ -392,6 +462,13 @@ endif + # system swapping during the build. + # If we don't know, assume 512. Subtract 128 from MB for VM MAX. + # Don't set VM max over 1024-128=896. ++# 736 is the max for OpenBSD. ++ifeq ($(OS_VENDOR), OpenBSD) ++ ABS_MAX_MEMORY := "736" ++else ++ ABS_MAX_MEMORY := "896" ++endif ++ + ifneq ($(MB_OF_MEMORY),) + LOW_MEMORY_MACHINE := $(shell \ + if [ $(MB_OF_MEMORY) -le 512 ] ; then \ +@@ -403,7 +480,7 @@ ifneq ($(MB_OF_MEMORY),) + if [ $(MB_OF_MEMORY) -le 1024 ] ; then \ + expr $(MB_OF_MEMORY) '-' 128 ; \ + else \ +- echo "896"; \ ++ echo $(ABS_MAX_MEMORY); \ + fi) + MIN_VM_MEMORY := $(shell \ + if [ $(MAX_VM_MEMORY) -le 128 ] ; then \ +@@ -455,6 +532,15 @@ ifneq ($(PLATFORM), windows) + ARCH_VM_SUBDIR=jre/lib/$(LIBARCH) + endif + ++# Darwin-specific Overrides ++ifeq ($(SYSTEM_UNAME),Darwin) ++ # The suffix applied to runtime libraries ++ LIBRARY_SUFFIX = dylib ++ # The suffix applied to link libraries ++ LIB_SUFFIX = dylib ++endif ++ ++ + # If blanks in the username, use the first 4 words and pack them together + _USER1:=$(subst ', ,$(_USER)) + _USER2:=$(subst ", ,$(_USER1)) +diff -upr ../orig/jdk/make/common/shared/Sanity-Settings.gmk ./jdk/make/common/shared/Sanity-Settings.gmk +--- ../orig/jdk/make/common/shared/Sanity-Settings.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/shared/Sanity-Settings.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -257,6 +257,7 @@ ifdef OPENJDK + ALL_SETTINGS+=$(call addHeading,OpenJDK-specific settings) + ALL_SETTINGS+=$(call addAltSetting,FREETYPE_HEADERS_PATH) + ALL_SETTINGS+=$(call addAltSetting,FREETYPE_LIB_PATH) ++ ALL_SETTINGS+=$(call addAltSetting,X11_PATH) + ALL_SETTINGS+=$(call addHeading,OPENJDK Import Binary Plug Settings) + ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_JARFILE) + ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_PATH) +diff -upr ../orig/jdk/make/common/shared/Sanity.gmk ./jdk/make/common/shared/Sanity.gmk +--- ../orig/jdk/make/common/shared/Sanity.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/common/shared/Sanity.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -96,6 +96,11 @@ ifeq ($(PLATFORM), windows) + $(EGREP) "\#define" | $(NAWK) '{print $$3}') + endif + ++ifeq ($(PLATFORM), bsd) ++ FREE_SPACE := $(shell BLOCKSIZE=512 $(DF) $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$2;}') ++ TEMP_FREE_SPACE := $(shell BLOCKSIZE=512 $(DF) $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$2;}') ++endif ++ + # Get the version numbers of what we are using + _MAKE_VER :=$(shell $(MAKE) --version 2>&1 | $(HEAD) -n 1) + _ZIP_VER :=$(shell $(ZIPEXE) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^Zip') +diff -upr ../orig/jdk/make/docs/Makefile ./jdk/make/docs/Makefile +--- ../orig/jdk/make/docs/Makefile 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/docs/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -232,7 +232,7 @@ JDI_HEADER = "Java Debug Interface" + # you get "No packages or classes specified." due to $(CLASSPATH_SEPARATOR) + # being interpreted as an end of command (newline) + +-JAAS_SOURCEPATH = "$(TOPDIR)/src/share/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/solaris/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/windows/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/linux/classes" ++JAAS_SOURCEPATH = "$(TOPDIR)/src/share/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/solaris/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/windows/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/linux/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/bsd/classes" + JAAS_DOCDIR = $(DOCSDIR)/jre/api/security/jaas/spec + JAAS_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \ + -encoding ascii \ +diff -upr ../orig/jdk/make/java/Makefile ./jdk/make/java/Makefile +--- ../orig/jdk/make/java/Makefile 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/java/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -49,7 +49,7 @@ ifeq ($(PLATFORM), solaris) + endif + endif # PLATFORM + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + SUBDIRS += jexec + endif # PLATFORM + +diff -upr ../orig/jdk/make/java/hpi/hpi_common.gmk ./jdk/make/java/hpi/hpi_common.gmk +--- ../orig/jdk/make/java/hpi/hpi_common.gmk 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/java/hpi/hpi_common.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -86,5 +86,9 @@ endif + # Things that must be linked in. + # + ifneq ($(PLATFORM), windows) ++ifeq ($(PLATFORM), bsd) ++OTHER_LDLIBS += $(LIBM) ++else + OTHER_LDLIBS += $(LIBSOCKET) -lnsl $(LIBM) -ldl + endif ++endif +diff -upr ../orig/jdk/make/java/hpi/native/Makefile ./jdk/make/java/hpi/native/Makefile +--- ../orig/jdk/make/java/hpi/native/Makefile 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/java/hpi/native/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -72,11 +72,18 @@ OTHER_CPPFLAGS += -DUSE_PTHREADS + ifeq ($(MOOT_PRIORITIES),true) + OTHER_CPPFLAGS += -DMOOT_PRIORITIES + endif ++ifeq ($(PLATFORM), bsd) ++LIBPOSIX4 = ++OTHER_LDLIBS += -pthread ++else + LIBPOSIX4 = -lposix4 + OTHER_LDLIBS += -lpthread $(LIBPOSIX4) + endif ++endif + ++ifneq ($(PLATFORM), bsd) + HAVE_GETHRVTIME=true ++endif + ifeq ($(HAVE_GETHRVTIME),true) + OTHER_CPPFLAGS += -DHAVE_GETHRVTIME + endif +diff -upr ../orig/jdk/make/java/instrument/Makefile ./jdk/make/java/instrument/Makefile +--- ../orig/jdk/make/java/instrument/Makefile 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/java/instrument/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -102,6 +102,21 @@ ifeq ($(PLATFORM), windows) + # equivalent of strcasecmp is stricmp on Windows + CPPFLAGS_COMMON += -Dstrcasecmp=stricmp + else ++ifeq ($(PLATFORM), bsd) ++ ifeq ($(OS_VENDOR), Apple) ++ LDFLAGS += -Wl,-all_load ++ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a ++ else ++ LDFLAGS += -Wl,--whole-archive ++ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a ++ LDFLAGS += -Wl,--no-whole-archive ++ endif ++ ++ ICONV_PATH = $(PACKAGE_PATH) ++# Use CPPFLAGS instead of OTHER_INCLUDES to force this last ++ CPPFLAGS += -I$(ICONV_PATH)/include ++ OTHER_LDLIBS += -L$(ICONV_PATH)/lib -liconv ++else + LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli + OTHER_LDLIBS += -ljli + OTHER_LDLIBS += -ldl +@@ -114,6 +129,7 @@ else + LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/jli + endif + endif ++endif + + # + # Library to compile. +diff -upr ../orig/jdk/make/java/java/Makefile ./jdk/make/java/java/Makefile +--- ../orig/jdk/make/java/java/Makefile 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/java/java/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -167,8 +167,10 @@ OTHER_INCLUDES += -I$(PLATFORM_SRC)/nati + # Is the altzone extern documented in ctime(3C) available? + # + ifneq ($(PLATFORM), windows) ++ifneq ($(PLATFORM), bsd) + HAVE_ALTZONE=true + endif ++endif + + ifeq ($(HAVE_ALTZONE),true) + OTHER_CPPFLAGS += -DHAVE_ALTZONE +@@ -205,9 +207,14 @@ ifeq ($(PLATFORM),windows) + OTHER_LDLIBS += $(JVMLIB) -libpath:$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) fdlibm.lib \ + -libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib + else ++ifeq ($(PLATFORM), bsd) ++OTHER_LDLIBS += $(JVMLIB) -lverify \ ++ -L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH) ++else + OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) -lnsl -ldl \ + -L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH) + endif ++endif + + # + # Rules. +diff -upr ../orig/jdk/make/java/java/localegen.sh ./jdk/make/java/java/localegen.sh +--- ../orig/jdk/make/java/java/localegen.sh 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/java/java/localegen.sh 2009-05-05 08:21:41.000000000 -0400 +@@ -55,9 +55,9 @@ sed_script="$SED -e \"s@^#warn .*@// -- + for FILE in $RESOURCE_NAMES + do + getlocalelist $FILE $EURO_FILES_LIST +- sed_script=$sed_script"-e \"s/#"$FILE"_EuroLocales#/$localelist/g\" " ++ sed_script=$sed_script"-e \"s@#"$FILE"_EuroLocales#@$localelist at g\" " + getlocalelist $FILE $NONEURO_FILES_LIST +- sed_script=$sed_script"-e \"s/#"$FILE"_NonEuroLocales#/$localelist/g\" " ++ sed_script=$sed_script"-e \"s@#"$FILE"_NonEuroLocales#@$localelist at g\" " + done + + sed_script=$sed_script"$INPUT_FILE > $OUTPUT_FILE" +diff -upr ../orig/jdk/make/java/java_hprof_demo/Makefile ./jdk/make/java/java_hprof_demo/Makefile +--- ../orig/jdk/make/java/java_hprof_demo/Makefile 2009-01-27 15:44:38.000000000 -0500 ++++ ./jdk/make/java/java_hprof_demo/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -83,8 +83,10 @@ OTHER_INCLUDES = -I$(SRCDIR) \ + ifeq ($(PLATFORM), windows) + OTHER_LDLIBS += wsock32.lib winmm.lib + else ++ifneq ($(PLATFORM), bsd) + OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl + endif ++endif + + # + # Tell library.gmk to copy the txt file first +diff -upr ../orig/jdk/make/java/jli/Makefile ./jdk/make/java/jli/Makefile +--- ../orig/jdk/make/java/jli/Makefile 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/java/jli/Makefile 2009-05-05 08:26:57.000000000 -0400 +@@ -44,8 +44,10 @@ MS_RUNTIME_STATIC = true + + include $(BUILDDIR)/common/Defs.gmk + ++ifneq ($(SYSTEM_ZLIB),true) + ZLIB_VERSION = 1.1.3 + ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) ++endif + LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin + LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin + +@@ -56,7 +58,10 @@ FILES_c = \ + parse_manifest.c \ + version_comp.c \ + wildcard.c \ +- jli_util.c \ ++ jli_util.c ++ ++ifneq ($(SYSTEM_ZLIB),true) ++FILES_c += \ + inflate.c \ + infblock.c \ + inftrees.c \ +@@ -65,6 +70,7 @@ FILES_c = \ + infutil.c \ + zadler32.c \ + zutil.c ++endif + + OTHER_CPPFLAGS += -DEXPAND_CLASSPATH_WILDCARDS + +@@ -98,7 +104,11 @@ endif + + OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC) + OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC) +-OTHER_INCLUDES += -I$(ZIP_SRC) ++ifneq ($(SYSTEM_ZLIB),true) ++ OTHER_INCLUDES += -I$(ZIP_SRC) ++else ++ LDLIBS += -lz ++endif + + # + # Library to compile. +@@ -136,8 +146,29 @@ library:: $(STATIC_LIBRARY) + + endif # PLATFORM + ++ifeq ($(PLATFORM), bsd) ++ ++STATIC_LIBRARY_DIR = $(OBJDIR)/static ++STATIC_LIBRARY_NAME = lib$(LIBRARY).a ++STATIC_LIBRARY = $(STATIC_LIBRARY_DIR)/$(STATIC_LIBRARY_NAME) ++ ++$(STATIC_LIBRARY_DIR): $(OBJDIR) ++ @$(MKDIR) $(STATIC_LIBRARY_DIR) ++ ++$(STATIC_LIBRARY): $(STATIC_LIBRARY_DIR) ++ @$(prep-target) ++ $(AR) -r $@ $(FILES_o) ++ ++library:: $(STATIC_LIBRARY) ++ ++endif # PLATFORM ++ + # + # Add to ambient vpath so we pick up the library files + # +-vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) ++vpath %.c $(LAUNCHER_SHARE_SRC) ++ifneq ($(SYSTEM_ZLIB),true) ++ vpath %.c $(ZIP_SRC) ++endif ++ + +diff -upr ../orig/jdk/make/java/management/Makefile ./jdk/make/java/management/Makefile +--- ../orig/jdk/make/java/management/Makefile 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/java/management/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -85,6 +85,11 @@ vpath %.c $(PLATFORM_SRC)/native/com/sun + OTHER_INCLUDES += \ + -I$(SHARE_SRC)/native/sun/management + ++ifeq ($(PLATFORM),bsd) ++OTHER_INCLUDES += \ ++ -I$(PLATFORM_SRC)/hpi/include ++endif ++ + ifeq ($(PLATFORM),windows) + OTHER_LDLIBS += $(JVMLIB) + endif +diff -upr ../orig/jdk/make/java/net/FILES_c.gmk ./jdk/make/java/net/FILES_c.gmk +--- ../orig/jdk/make/java/net/FILES_c.gmk 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/java/net/FILES_c.gmk 2009-05-05 08:29:02.000000000 -0400 +@@ -43,6 +43,10 @@ ifeq ($(PLATFORM), linux) + FILES_c += linux_close.c + endif + ++ifeq ($(OS_VENDOR), FreeBSD) ++ FILES_c += bsd_close.c ++endif ++ + ifeq ($(PLATFORM), windows) + FILES_c += TwoStacksPlainSocketImpl.c + FILES_c += DualStackPlainSocketImpl.c +diff -upr ../orig/jdk/make/java/net/Makefile ./jdk/make/java/net/Makefile +--- ../orig/jdk/make/java/net/Makefile 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/java/net/Makefile 2009-05-05 08:30:25.000000000 -0400 +@@ -92,6 +92,12 @@ include $(BUILDDIR)/common/Mapfile-vers. + + include $(BUILDDIR)/common/Library.gmk + ++ifeq ($(PLATFORM), bsd) ++ ifdef DONT_ENABLE_IPV6 ++ OTHER_CFLAGS += -DDONT_ENABLE_IPV6 ++ endif ++ OTHER_LDLIBS = $(JVMLIB) -pthread ++else + ifeq ($(PLATFORM), windows) + OTHER_LDLIBS = ws2_32.lib $(JVMLIB) + # Will not compile at warning level 3 if warnings are fatal +@@ -102,6 +108,7 @@ endif + ifeq ($(PLATFORM), linux) + OTHER_LDLIBS += -lpthread + endif ++endif # PLATFORM == bsd + + CLASSES.export += java.lang.Integer java.io.FileDescriptor java.net.InetAddressImplFactory java.net.Inet4AddressImpl java.net.Inet6AddressImpl + +diff -upr ../orig/jdk/make/java/nio/Makefile ./jdk/make/java/nio/Makefile +--- ../orig/jdk/make/java/nio/Makefile 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/java/nio/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -82,7 +82,7 @@ FILES_export += \ + sun/nio/ch/WindowsSelectorImpl.java + endif # PLATFORM = windows + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + FILES_java += \ + sun/nio/ch/AbstractPollSelectorImpl.java \ + sun/nio/ch/EPollArrayWrapper.java \ +@@ -126,6 +126,11 @@ OTHER_INCLUDES += \ + -I$(PLATFORM_SRC)/native/java/net \ + -I$(CLASSHDRDIR)/../../../java.lang/java/CClassHeaders + ++ifeq ($(PLATFORM), bsd) ++OTHER_INCLUDES += \ ++ -I$(PLATFORM_SRC)/hpi/include ++endif ++ + ifeq ($(PLATFORM),windows) + OTHER_LDLIBS += $(JVMLIB) ws2_32.lib \ + -libpath:$(LIBDIR) java.lib \ +@@ -137,6 +142,9 @@ ifeq ($(PLATFORM), linux) + COMPILER_WARNINGS_FATAL=true + OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl + endif ++ifeq ($(PLATFORM), bsd) ++OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -pthread ++endif + ifeq ($(PLATFORM), solaris) + OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 -ldl \ + -L$(LIBDIR)/$(LIBARCH) -ljava -lnet +@@ -159,6 +167,9 @@ endif + ifeq ($(PLATFORM), linux) + FILES_m = mapfile-linux + endif ++ifeq ($(PLATFORM), bsd) ++FILES_m = mapfile-bsd ++endif + include $(BUILDDIR)/common/Mapfile-vers.gmk + include $(BUILDDIR)/common/Library.gmk + +diff -upr ../orig/jdk/make/java/npt/Makefile ./jdk/make/java/npt/Makefile +--- ../orig/jdk/make/java/npt/Makefile 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/java/npt/Makefile 2009-05-05 09:08:01.000000000 -0400 +@@ -70,6 +70,18 @@ ifeq ($(PLATFORM), windows) + OTHER_LCF += -export:nptInitialize -export:nptTerminate + endif + ++# Add location of iconv headers & libs ++ifeq ($(PLATFORM), bsd) ++ ifeq ($(OS_VENDOR), Apple) ++ OTHER_LDLIBS += -liconv ++ else ++ ifneq ($(OS_NAME), netbsd) ++ CPPFLAGS += -I$(PACKAGE_PATH)/include ++ OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv ++ endif ++ endif ++endif ++ + # + # Add to ambient vpath so we pick up the library files + # +diff -upr ../orig/jdk/make/java/redist/FILES.gmk ./jdk/make/java/redist/FILES.gmk +--- ../orig/jdk/make/java/redist/FILES.gmk 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/java/redist/FILES.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -38,6 +38,14 @@ SHARED_FONTFILES = \ + $(LIBDIR)/fonts/LucidaSansDemiBold.ttf \ + + ifeq ($(PLATFORM), linux) ++NEED_OBLIQUE_FONTS = true ++endif ++ ++ifeq ($(PLATFORM), bsd) ++NEED_OBLIQUE_FONTS = true ++endif ++ ++ifeq ($(NEED_OBLIQUE_FONTS), true) + + # The oblique versions of the font are derived from the base versions + # and since 2D can do this derivation on the fly at run time there is no +diff -upr ../orig/jdk/make/java/redist/Makefile ./jdk/make/java/redist/Makefile +--- ../orig/jdk/make/java/redist/Makefile 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/java/redist/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -85,6 +85,11 @@ ifeq ($(SA_EXISTS), false) + INCLUDE_SA := false + endif + ++# FIXME: Remove when the build of libsaproc is fixed. ++ifeq ($(PLATFORM), bsd) ++ INCLUDE_SA := false ++endif ++ + ifeq ($(INCLUDE_SA), true) + IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \ + $(LIB_LOCATION)/$(SALIB_NAME) +@@ -312,7 +317,7 @@ $(LIBDIR)/fonts/%.ttf: $(CLOSED_SRC)/sha + $(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir + $(install-file) + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + + # The oblique fonts are only needed/wanted on Linux. + +@@ -326,7 +331,7 @@ $(LIBDIR)/oblique-fonts/%.ttf: $(CLOSED_ + $(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir + $(install-file) + +-endif # linux ++endif # linux || bsd + endif # !OPENJDK + + # Import internal files (ones that are stashed in this source tree) +diff -upr ../orig/jdk/make/java/security/Makefile ./jdk/make/java/security/Makefile +--- ../orig/jdk/make/java/security/Makefile 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/java/security/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -51,7 +51,15 @@ ifeq ($(PLATFORM), windows) + ifneq ($(ARCH_DATA_MODEL), 64) + PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-windows + endif ++ ++else # windows ++ ++ifeq ($(PLATFORM), bsd) ++ ifeq ($(OS_VENDOR), OpenBSD) ++ PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-openbsd ++ endif + endif ++endif # windows + endif # PLATFORM + + +diff -upr ../orig/jdk/make/java/zip/FILES_c.gmk ./jdk/make/java/zip/FILES_c.gmk +--- ../orig/jdk/make/java/zip/FILES_c.gmk 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/java/zip/FILES_c.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -30,6 +30,10 @@ FILES_c = \ + Inflater.c \ + ZipFile.c \ + ZipEntry.c \ ++ zip_util.c ++ ++ifneq ($(SYSTEM_ZLIB),true) ++FILES_c += \ + zadler32.c \ + zcrc32.c \ + deflate.c \ +@@ -40,5 +44,5 @@ FILES_c = \ + inftrees.c \ + infcodes.c \ + infutil.c \ +- inffast.c \ +- zip_util.c ++ inffast.c ++endif +diff -upr ../orig/jdk/make/java/zip/Makefile ./jdk/make/java/zip/Makefile +--- ../orig/jdk/make/java/zip/Makefile 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/java/zip/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -72,16 +72,24 @@ else + CPPFLAGS += -UDEBUG + endif + +-CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) + CPPFLAGS += -I$(SHARE_SRC)/native/java/io + CPPFLAGS += -I$(PLATFORM_SRC)/native/java/io + ++ifneq ($(SYSTEM_ZLIB),true) ++CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) ++ + # + # Add to ambient vpath so we pick up the library files + # + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/zlib-$(ZLIB_VERSION) ++endif + + # + # Link to JVM library for JVM_Zip* functions + # ++ifeq ($(SYSTEM_ZLIB),true) ++OTHER_LDLIBS = -lz ++else + OTHER_LDLIBS = $(JVMLIB) ++endif ++ +diff -upr ../orig/jdk/make/javax/sound/FILES_c.gmk ./jdk/make/javax/sound/FILES_c.gmk +--- ../orig/jdk/make/javax/sound/FILES_c.gmk 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/javax/sound/FILES_c.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -34,6 +34,8 @@ FILES_solaris = \ + + FILES_linux = + ++FILES_bsd = ++ + FILES_windows = \ + PLATFORM_API_WinOS_MidiIn.c \ + PLATFORM_API_WinOS_MidiOut.c \ +diff -upr ../orig/jdk/make/javax/sound/Makefile ./jdk/make/javax/sound/Makefile +--- ../orig/jdk/make/javax/sound/Makefile 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/javax/sound/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -107,6 +107,19 @@ ifeq ($(PLATFORM), linux) + #MXSPP_ADD = $(PLATFORM)-$(ARCH)/ + endif # PLATFORM linux + ++# XXXBSD: ??? ++ifeq ($(PLATFORM), bsd) ++ # build with empty MIDI i/o ++ INCLUDE_MIDI = TRUE ++ # build with empty ports ++ INCLUDE_PORTS = TRUE ++ # build with empty direct audio ++ INCLUDE_DAUDIO = TRUE ++ ifeq ($(OS_VENDOR), OpenBSD) ++ LDFLAGS += -lossaudio ++ endif ++endif # PLATFORM bsd ++ + ifeq ($(PLATFORM), solaris) + ifneq ($(ARCH), amd64) + # build with ports and direct audio +diff -upr ../orig/jdk/make/javax/sound/SoundDefs.gmk ./jdk/make/javax/sound/SoundDefs.gmk +--- ../orig/jdk/make/javax/sound/SoundDefs.gmk 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/javax/sound/SoundDefs.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -40,6 +40,10 @@ ifeq ($(PLATFORM), linux) + CPPFLAGS += -DX_PLATFORM=X_LINUX + endif # PLATFORM linux + ++ifeq ($(PLATFORM), bsd) ++ CPPFLAGS += -DX_PLATFORM=X_BSD ++endif # PLATFORM bsd ++ + ifeq ($(PLATFORM), solaris) + CPPFLAGS += -DX_PLATFORM=X_SOLARIS + +diff -upr ../orig/jdk/make/jpda/back/Makefile ./jdk/make/jpda/back/Makefile +--- ../orig/jdk/make/jpda/back/Makefile 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/jpda/back/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -49,8 +49,10 @@ OTHER_INCLUDES = -I$(SHARE_SRC)/transpor + -I$(GENNATIVESRCDIR)/jdwp + + ifneq ($(PLATFORM), windows) ++ifneq ($(PLATFORM), bsd) + OTHER_LDLIBS += -ldl + endif # PLATFORM ++endif # PLATFORM + + # + # This turns off all assert() checking in the optimized library +diff -upr ../orig/jdk/make/jpda/transport/socket/Makefile ./jdk/make/jpda/transport/socket/Makefile +--- ../orig/jdk/make/jpda/transport/socket/Makefile 2009-01-27 15:44:39.000000000 -0500 ++++ ./jdk/make/jpda/transport/socket/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -45,6 +45,11 @@ ifeq ($(PLATFORM), linux) + OTHER_LDLIBS += -lnsl $(LIBSOCKET) -lpthread + endif + ++ifeq ($(PLATFORM), bsd) ++ LIBSOCKET = ++ OTHER_LDLIBS += -pthread ++endif ++ + ifeq ($(PLATFORM), solaris) + OTHER_LDLIBS += -lnsl $(LIBSOCKET) + endif +diff -upr ../orig/jdk/make/sun/awt/Makefile ./jdk/make/sun/awt/Makefile +--- ../orig/jdk/make/sun/awt/Makefile 2009-01-27 15:44:42.000000000 -0500 ++++ ./jdk/make/sun/awt/Makefile 2009-05-05 09:13:17.000000000 -0400 +@@ -129,6 +129,14 @@ OTHER_CFLAGS += -DMOTIF_VERSION=2 + OTHER_LDLIBS = $(JVMLIB) $(LIBM) -ldl + endif + ++ifeq ($(PLATFORM), bsd) ++FILES_c = $(FILES_2D_c) ++FILES_c += awt_LoadLibrary.c ++OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH ++OTHER_CFLAGS += -DMOTIF_VERSION=2 ++OTHER_LDLIBS = $(JVMLIB) $(LIBM) ++endif ++ + FILES_c += initIDs.c + + # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX +@@ -241,7 +249,7 @@ vpath %.c $(SHARE_SRC)/native/$(PKGD + # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS + endif # PLATFORM + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv LINUX + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl + vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl +@@ -421,6 +429,19 @@ FONTCONFIGS_SRC_PREFIX = $(PLATFORM). + # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS + endif # PLATFORM + ++ifeq ($(PLATFORM), bsd) ++# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv BSD ++ ++FONTCONFIGS_SRC = $(PLATFORM_SRC)/classes/sun/awt/fontconfigs ++_FONTCONFIGS = \ ++ fontconfig.properties ++ ++FONTCONFIGS_SRC_PREFIX = $(PLATFORM). ++ ++# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ BSD ++endif # PLATFORM ++ ++ + FONTCONFIGS = $(_FONTCONFIGS:%=$(LIBDIR)/%.src) + BINARYFONTCONFIGS = $(_FONTCONFIGS:%.properties=$(LIBDIR)/%.bfc) + +@@ -514,6 +535,9 @@ CPPFLAGS += -I$(MOTIF_DIR)/include \ + -I$(OPENWIN_HOME)/include/X11/extensions \ + -I$(PLATFORM_SRC)/native/$(PKGDIR)/font + endif ++ifeq ($(PLATFORM), bsd) ++CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/font ++endif + CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \ + -I$(SHARE_SRC)/native/$(PKGDIR)/../font \ + -I$(PLATFORM_SRC)/native/$(PKGDIR)/../font \ +@@ -535,7 +559,13 @@ CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGD + -I$(PLATFORM_SRC)/native/$(PKGDIR) \ + $(EVENT_MODEL) + +-ifeq ($(PLATFORM), linux) ++# include these last so we don't pick up unintentional includes ++ifeq ($(PLATFORM), bsd) ++CPPFLAGS += -I$(OPENWIN_HOME)/include \ ++ -I$(OPENWIN_HOME)/include/X11/extensions ++endif ++ ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB) + endif + +diff -upr ../orig/jdk/make/sun/awt/mawt.gmk ./jdk/make/sun/awt/mawt.gmk +--- ../orig/jdk/make/sun/awt/mawt.gmk 2009-01-27 15:44:42.000000000 -0500 ++++ ./jdk/make/sun/awt/mawt.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -172,7 +172,7 @@ ifeq ($(PLATFORM), solaris) + OTHER_LDLIBS = $(LIBXM) -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi + endif + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH + OTHER_CFLAGS += -DMOTIF_VERSION=2 + OTHER_CFLAGS += -DXMSTRINGDEFINES=1 +@@ -183,7 +183,11 @@ endif + # !HEADLESS + + OTHER_LDLIBS += $(JVMLIB) $(LIBCXX) \ +- -lawt $(LIBM) -ldl ++ -lawt $(LIBM) ++ ++ifneq ($(PLATFORM), bsd) ++OTHER_LDLIBS += -ldl ++endif + + # + # Sun CC with -Xa misdefines __STDC__ to 0 (zero). +@@ -227,16 +231,33 @@ CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGD + -I$(PLATFORM_SRC)/native/$(PKGDIR) \ + $(EVENT_MODEL) + ++CPPFLAGS += -I$(CUPS_HEADERS_PATH) ++ ++ifndef HEADLESS ++CPPFLAGS += -I$(MOTIF_DIR)/include \ ++ -I$(OPENWIN_HOME)/include ++LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB) ++ ++endif # !HEADLESS ++ + ifeq ($(PLATFORM), linux) + # Checking for the X11/extensions headers at the additional location + CPPFLAGS += -I/X11R6/include/X11/extensions \ + -I/usr/include/X11/extensions + endif + ++ifeq ($(PLATFORM), bsd) ++ CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \ ++ -I$(OPENWIN_HOME)/include ++endif ++ + ifeq ($(PLATFORM), solaris) + CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions + endif + ++ifneq ($(PLATFORM), windows) ++ CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" ++endif + + LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \ + $(AWT_RUNPATH) +diff -upr ../orig/jdk/make/sun/font/Makefile ./jdk/make/sun/font/Makefile +--- ../orig/jdk/make/sun/font/Makefile 2009-01-27 15:44:42.000000000 -0500 ++++ ./jdk/make/sun/font/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -177,6 +177,15 @@ else # PLATFORM + # Libraries to link, and other C flags. + # + ++ifeq ($(PLATFORM), bsd) ++OTHER_INCLUDES += -I$(X11_PATH)/include ++OTHER_LDLIBS += -lawt $(LIBM) $(LIBCXX) ++ ifeq ($(OS_VENDOR),Apple) ++ # XXXDARWIN Match BSD/Linux behavior -- the mawt.dylib symbols will ++ # be available at runtime. ++ OTHER_LDLIBS += -flat_namespace -undefined suppress ++ endif ++else + ifeq ($(PLATFORM), solaris) + # Note that on Solaris, fontmanager is built against the headless library. + LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/headless +@@ -187,6 +196,7 @@ else # PLATFORM is linux + OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic + endif + endif ++endif + + endif # PLATFORM + +diff -upr ../orig/jdk/make/sun/image/generic/Makefile ./jdk/make/sun/image/generic/Makefile +--- ../orig/jdk/make/sun/image/generic/Makefile 2009-01-27 15:44:43.000000000 -0500 ++++ ./jdk/make/sun/image/generic/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -69,5 +69,9 @@ CPPFLAGS += \ + -I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib + + OTHER_CFLAGS += -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES +-OTHER_LDLIBS = $(LIBM) -ldl ++OTHER_LDLIBS = $(LIBM) ++ifneq ($(PLATFORM), bsd) ++OTHER_LDLIBS += -ldl ++endif ++ + +diff -upr ../orig/jdk/make/sun/jawt/Makefile ./jdk/make/sun/jawt/Makefile +--- ../orig/jdk/make/sun/jawt/Makefile 2009-01-27 15:44:43.000000000 -0500 ++++ ./jdk/make/sun/jawt/Makefile 2009-05-05 08:50:43.000000000 -0400 +@@ -98,9 +98,7 @@ else # PLATFORM + # + # Other extra flags needed for compiling. + # +-CPPFLAGS += -I$(OPENWIN_HOME)/include \ +- -I$(MOTIF_DIR)/include \ +- -I$(SHARE_SRC)/native/$(PKGDIR)/debug \ ++CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \ + -I$(SHARE_SRC)/native/$(PKGDIR)/image \ + -I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \ + -I$(SHARE_SRC)/native/$(PKGDIR)/alphacomposite \ +@@ -114,6 +112,8 @@ CPPFLAGS += -I$(OPENWIN_HOME)/include \ + -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/doe \ + -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/path \ + -I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \ ++ -I$(OPENWIN_HOME)/include \ ++ -I$(MOTIF_DIR)/include \ + $(EVENT_MODEL) + # + # Libraries to link in. +@@ -122,7 +122,7 @@ ifeq ($(PLATFORM), solaris) + OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -L$(OPENWIN_LIB) -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt + endif # PLATFORM + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt + endif # PLATFORM + +diff -upr ../orig/jdk/make/sun/security/jgss/wrapper/Makefile ./jdk/make/sun/security/jgss/wrapper/Makefile +--- ../orig/jdk/make/sun/security/jgss/wrapper/Makefile 2009-01-27 15:44:44.000000000 -0500 ++++ ./jdk/make/sun/security/jgss/wrapper/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -71,6 +71,10 @@ include $(BUILDDIR)/common/Library.gmk + # + # Libraries to link + # +-ifneq ($(PLATFORM), windows) ++ifneq (,$(findstring $(PLATFORM), linux solaris)) + OTHER_LDLIBS = -ldl $(JVMLIB) + endif ++ ++ifeq ($(PLATFORM), bsd) ++ OTHER_LDLIBS = $(JVMLIB) ++endif +diff -upr ../orig/jdk/make/sun/security/pkcs11/Makefile ./jdk/make/sun/security/pkcs11/Makefile +--- ../orig/jdk/make/sun/security/pkcs11/Makefile 2009-01-27 15:44:44.000000000 -0500 ++++ ./jdk/make/sun/security/pkcs11/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -155,7 +155,7 @@ include $(BUILDDIR)/common/Library.gmk + # + # Libraries to link + # +-ifeq ($(PLATFORM), windows) ++ifneq (,$(findstring $(PLATFORM), windows bsd)) + OTHER_LDLIBS = $(JVMLIB) + else + OTHER_LDLIBS = -ldl $(JVMLIB) +diff -upr ../orig/jdk/make/sun/security/smartcardio/Makefile ./jdk/make/sun/security/smartcardio/Makefile +--- ../orig/jdk/make/sun/security/smartcardio/Makefile 2009-01-27 15:44:44.000000000 -0500 ++++ ./jdk/make/sun/security/smartcardio/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -75,6 +75,10 @@ include $(BUILDDIR)/common/Library.gmk + ifeq ($(PLATFORM), windows) + OTHER_LDLIBS = $(JVMLIB) winscard.lib + else +- OTHER_LDLIBS = -ldl $(JVMLIB) ++ ifeq ($(PLATFORM), bsd) ++ OTHER_LDLIBS = $(JVMLIB) ++ else ++ OTHER_LDLIBS = -ldl $(JVMLIB) ++ endif + OTHER_CFLAGS = -D__sun_jdk + endif +diff -upr ../orig/jdk/make/sun/splashscreen/FILES_c.gmk ./jdk/make/sun/splashscreen/FILES_c.gmk +--- ../orig/jdk/make/sun/splashscreen/FILES_c.gmk 2009-01-27 15:44:45.000000000 -0500 ++++ ./jdk/make/sun/splashscreen/FILES_c.gmk 2009-05-04 17:37:15.000000000 -0400 +@@ -49,20 +49,6 @@ FILES_c = \ + dgif_lib.c \ + gif_err.c \ + gifalloc.c \ +- compress.c \ +- deflate.c \ +- gzio.c \ +- infblock.c \ +- infcodes.c \ +- inffast.c \ +- inflate.c \ +- inftrees.c \ +- infutil.c \ +- trees.c \ +- uncompr.c \ +- zadler32.c \ +- zcrc32.c \ +- zutil.c \ + jcomapi.c \ + jdapimin.c \ + jdapistd.c \ +@@ -108,3 +94,20 @@ FILES_c = \ + jfdctfst.c \ + jfdctint.c + ++ifneq ($(SYSTEM_ZLIB),true) ++ FILES_c += \ ++ compress.c \ ++ deflate.c \ ++ gzio.c \ ++ infblock.c \ ++ infcodes.c \ ++ inffast.c \ ++ inflate.c \ ++ inftrees.c \ ++ infutil.c \ ++ trees.c \ ++ uncompr.c \ ++ zadler32.c \ ++ zcrc32.c \ ++ zutil.c ++endif +diff -upr ../orig/jdk/make/sun/splashscreen/Makefile ./jdk/make/sun/splashscreen/Makefile +--- ../orig/jdk/make/sun/splashscreen/Makefile 2009-01-27 15:44:45.000000000 -0500 ++++ ./jdk/make/sun/splashscreen/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -61,10 +61,26 @@ JAVALIB= + + CFLAGS += -DSPLASHSCREEN + ++CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen ++CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg ++ifneq ($(SYSTEM_ZLIB),true) ++ CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 ++endif ++ ++ + ifneq ($(PLATFORM), windows) + CFLAGS += -DWITH_X11 +- CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions +- OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread ++ ifeq ($(PLATFORM), bsd) ++ CFLAGS += -DPNG_NO_MMX_CODE ++ ICONV_PATH = $(PACKAGE_PATH) ++ CPPFLAGS += -I$(OPENWIN_HOME)/include \ ++ -I$(OPENWIN_HOME)/include/X11/extensions \ ++ -I$(ICONV_PATH)/include ++ OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext -L$(ICONV_PATH)/lib -liconv $(LIBM) -pthread ++ else ++ CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions ++ OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread ++ endif + else # PLATFORM + CFLAGS += -DWITH_WIN32 + OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib +@@ -77,14 +93,13 @@ endif # PLATFORM + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/splashscreen + vpath %.c $(SHARE_SRC)/native/$(PKGDIR) + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/giflib +-vpath %.c $(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 ++ifneq ($(SYSTEM_ZLIB),true) ++ vpath %.c $(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 ++endif + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/libpng + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/jpeg + vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen + +-CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen +-CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 +- + ifeq ($(PLATFORM), linux) + ifeq ($(ARCH_DATA_MODEL), 64) + # 64-bit gcc has problems compiling MMX instructions. +diff -upr ../orig/jdk/make/sun/xawt/Makefile ./jdk/make/sun/xawt/Makefile +--- ../orig/jdk/make/sun/xawt/Makefile 2009-01-27 15:44:45.000000000 -0500 ++++ ./jdk/make/sun/xawt/Makefile 2009-05-04 17:37:15.000000000 -0400 +@@ -53,6 +53,11 @@ LDFLAGS += -lpthread + dummy := $(shell $(MKDIR) -p $(LIB_LOCATION)) + endif + ++ifeq ($(PLATFORM), bsd) ++LDFLAGS += -pthread ++dummy := $(shell $(MKDIR) -p $(LIB_LOCATION)) ++endif ++ + # Since this library will be living in a subdirectory below the other libraries + # we need to add an extra runpath so that libraries in the upper directory + # are found at runtime. +@@ -86,7 +91,12 @@ vpath %.c $(SHARE_SRC)/native/sun/java + vpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl + vpath %.c $(PLATFORM_SRC)/native/sun/java2d/x11 + +-OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -ldl \ ++ifeq ($(PLATFORM), bsd) ++LIBDL= ++else ++LIBDL=-ldl ++endif ++OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 $(LIBDL) \ + $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi + + ifeq ($(PLATFORM), solaris) +@@ -94,8 +104,6 @@ CPPFLAGS += -DFUNCPROTO=15 + dummy := $(shell $(MKDIR) -p $(LIB_LOCATION)) + endif + +-CPPFLAGS += -I$(CUPS_HEADERS_PATH) +- + CPPFLAGS += -DXAWT -DXAWT_HACK \ + -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \ + -I$(PLATFORM_SRC)/native/sun/awt \ +@@ -122,9 +130,11 @@ CPPFLAGS += -DXAWT -DXAWT_HACK \ + -I$(SHARE_SRC)/native/sun/awt \ + -I$(PLATFORM_SRC)/native/sun/awt + ++CPPFLAGS += -I$(CUPS_HEADERS_PATH) ++ + ifeq ($(PLATFORM), linux) + # Allows for builds on Debian GNU Linux, X11 is in a different place +- CPPFLAGS += -I/usr/X11R6/include/X11/extensions \ ++ CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \ + -I/usr/include/X11/extensions \ + -I$(MOTIF_DIR)/include \ + -I$(OPENWIN_HOME)/include +@@ -134,6 +144,14 @@ ifeq ($(PLATFORM), solaris) + CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions -I$(MOTIF_DIR)/include + endif + ++ifeq ($(PLATFORM), bsd) ++ CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions -I$(OPENWIN_HOME)/include ++endif ++ ++ifneq ($(PLATFORM), windows) ++ CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" ++endif ++ + ifeq ($(MILESTONE), internal) + CPPFLAGS += -DINTERNAL_BUILD + endif +diff -upr ../orig/jdk/make/tools/freetypecheck/Makefile ./jdk/make/tools/freetypecheck/Makefile +--- ../orig/jdk/make/tools/freetypecheck/Makefile 2009-01-27 15:44:46.000000000 -0500 ++++ ./jdk/make/tools/freetypecheck/Makefile 2009-05-04 17:37:17.000000000 -0400 +@@ -60,8 +60,12 @@ else + #add runtime lib search path to ensure test will be runnable + ifeq ($(PLATFORM), solaris) + FT_OPTIONS += -R $(FT_LIB) -lfreetype +- else #linux +- FT_OPTIONS += -Wl,-rpath -Wl,$(FT_LIB) -lfreetype ++ else ++ ifeq ($(PLATFORM), bsd) ++ FT_OPTIONS += -lfreetype -lz ++ else # linux ++ FT_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype ++ endif + endif + endif + +diff -upr ../orig/jdk/src/share/back/commonRef.c ./jdk/src/share/back/commonRef.c +--- ../orig/jdk/src/share/back/commonRef.c 2009-01-27 15:44:50.000000000 -0500 ++++ ./jdk/src/share/back/commonRef.c 2009-05-04 17:37:16.000000000 -0400 +@@ -23,6 +23,10 @@ + * have any questions. + */ + ++#if defined(_ALLBSD_SOURCE) ++#include /* for uintptr_t */ ++#endif ++ + #include "util.h" + #include "commonRef.h" + +diff -upr ../orig/jdk/src/share/bin/java.c ./jdk/src/share/bin/java.c +--- ../orig/jdk/src/share/bin/java.c 2009-01-27 15:44:50.000000000 -0500 ++++ ./jdk/src/share/bin/java.c 2009-05-04 17:37:17.000000000 -0400 +@@ -104,6 +104,11 @@ static char *progname; + static char *launchername; + jboolean _launcher_debug = JNI_FALSE; + ++#ifdef __APPLE__ ++static jboolean continueInSameThread = JNI_FALSE; /* start VM in current thread */ ++#endif ++ ++ + /* + * Entries for splash screen environment variables. + * putenv is performed in SelectVersion. We need +@@ -146,6 +151,10 @@ static void PrintUsage(JNIEnv* env, jboo + static void SetPaths(int argc, char **argv); + + ++#ifdef __APPLE__ ++static int ContinueInSameThread(InvocationFunctions* ifn, int argc, char **argv, char *jarfile, char *classname, int ret); ++#endif ++ + /* Maximum supported entries from jvm.cfg. */ + #define INIT_MAX_KNOWN_VMS 10 + /* Values for vmdesc.flag */ +@@ -184,13 +193,13 @@ static jlong threadStackSize = 0; /* st + + int JNICALL JavaMain(void * args); /* entry point */ + +-struct JavaMainArgs { ++typedef struct { + int argc; + char ** argv; + char * jarfile; + char * classname; + InvocationFunctions ifn; +-}; ++} JavaMainArgs; + + /* + * Entry point. +@@ -332,49 +341,24 @@ main(int argc, char ** argv) + /* Show the splash screen if needed */ + ShowSplashScreen(); + +- /* +- * Done with all command line processing and potential re-execs so +- * clean up the environment. +- */ +- (void)UnsetEnv(ENV_ENTRY); +- (void)UnsetEnv(SPLASH_FILE_ENV_ENTRY); +- (void)UnsetEnv(SPLASH_JAR_ENV_ENTRY); +- +- JLI_MemFree(splash_jar_entry); +- JLI_MemFree(splash_file_entry); + +- /* +- * If user doesn't specify stack size, check if VM has a preference. +- * Note that HotSpot no longer supports JNI_VERSION_1_1 but it will +- * return its default stack size through the init args structure. +- */ +- if (threadStackSize == 0) { +- struct JDK1_1InitArgs args1_1; +- memset((void*)&args1_1, 0, sizeof(args1_1)); +- args1_1.version = JNI_VERSION_1_1; +- ifn.GetDefaultJavaVMInitArgs(&args1_1); /* ignore return value */ +- if (args1_1.javaStackSize > 0) { +- threadStackSize = args1_1.javaStackSize; ++#ifdef __APPLE__ ++ if (continueInSameThread == JNI_TRUE) { ++ return ContinueInSameThread(&ifn, argc, argv, jarfile, classname, ret); ++ } else { ++ return ContinueInNewThread(&ifn, argc, argv, jarfile, classname, ret); + } +- } +- +- { /* Create a new thread to create JVM and invoke main method */ +- struct JavaMainArgs args; ++#else + +- args.argc = argc; +- args.argv = argv; +- args.jarfile = jarfile; +- args.classname = classname; +- args.ifn = ifn; ++ return ContinueInNewThread(&ifn, argc, argv, jarfile, classname, ret); ++#endif + +- return ContinueInNewThread(JavaMain, threadStackSize, (void*)&args, ret); +- } + } + + int JNICALL + JavaMain(void * _args) + { +- struct JavaMainArgs *args = (struct JavaMainArgs *)_args; ++ JavaMainArgs *args = (JavaMainArgs *)_args; + int argc = args->argc; + char **argv = args->argv; + char *jarfile = args->jarfile; +@@ -1159,6 +1143,10 @@ ParseArguments(int *pargc, char ***pargv + } else if (strcmp(arg, "-X") == 0) { + printXUsage = JNI_TRUE; + return JNI_TRUE; ++#ifdef __APPLE__ ++ } else if (JLI_StrCmp(arg, "-XstartOnFirstThread") == 0) { ++ continueInSameThread = JNI_TRUE; ++#endif + /* + * The following case provide backward compatibility with old-style + * command line options. +@@ -1979,6 +1967,84 @@ KnownVMIndex(const char* name) + return -1; + } + ++static int ++ContinueInNewThread(InvocationFunctions* ifn, int argc, ++ char **argv, char *jarfile, char *classname, int ret) ++{ ++ ++ /* ++ * If user doesn't specify stack size, check if VM has a preference. ++ * Note that HotSpot no longer supports JNI_VERSION_1_1 but it will ++ * return its default stack size through the init args structure. ++ */ ++ if (threadStackSize == 0) { ++ struct JDK1_1InitArgs args1_1; ++ memset((void*)&args1_1, 0, sizeof(args1_1)); ++ args1_1.version = JNI_VERSION_1_1; ++ ifn->GetDefaultJavaVMInitArgs(&args1_1); /* ignore return value */ ++ if (args1_1.javaStackSize > 0) { ++ threadStackSize = args1_1.javaStackSize; ++ } ++ } ++ ++ { /* Create a new thread to create JVM and invoke main method */ ++ JavaMainArgs args; ++ int rslt; ++ ++ args.argc = argc; ++ args.argv = argv; ++ args.jarfile = jarfile; ++ args.classname = classname; ++ args.ifn = *ifn; ++ ++ rslt = ContinueInNewThread0(JavaMain, threadStackSize, (void*)&args); ++ /* If the caller has deemed there is an error we ++ * simply return that, otherwise we return the value of ++ * the callee ++ */ ++ return (ret != 0) ? ret : rslt; ++ } ++} ++ ++ ++#ifdef __APPLE__ ++static int ++ContinueInSameThread(InvocationFunctions* ifn, int argc, ++ char **argv, char *jarfile, char *classname, int ret) ++{ ++ ++ /* ++ * If user doesn't specify stack size, check if VM has a preference. ++ * Note that HotSpot no longer supports JNI_VERSION_1_1 but it will ++ * return its default stack size through the init args structure. ++ */ ++ if (threadStackSize == 0) { ++ struct JDK1_1InitArgs args1_1; ++ memset((void*)&args1_1, 0, sizeof(args1_1)); ++ args1_1.version = JNI_VERSION_1_1; ++ ifn->GetDefaultJavaVMInitArgs(&args1_1); /* ignore return value */ ++ if (args1_1.javaStackSize > 0) { ++ threadStackSize = args1_1.javaStackSize; ++ } ++ } ++ ++ { /* Create create JVM and invoke main method */ ++ JavaMainArgs args; ++ int rslt; ++ ++ args.argc = argc; ++ args.argv = argv; ++ args.jarfile = jarfile; ++ args.classname = classname; ++ args.ifn = *ifn; ++ ++ rslt = JavaMain((void*)&args); ++ ++ return (ret != 0) ? ret : rslt; ++ } ++} ++#endif ++ + static void + FreeKnownVMs() + { +diff -upr ../orig/jdk/src/share/bin/java.h ./jdk/src/share/bin/java.h +--- ../orig/jdk/src/share/bin/java.h 2009-01-27 15:44:50.000000000 -0500 ++++ ./jdk/src/share/bin/java.h 2009-05-04 17:37:17.000000000 -0400 +@@ -91,11 +91,17 @@ jboolean RemovableMachineDependentOption + void PrintMachineDependentOptions(); + + const char *jlong_format_specifier(); ++ + /* + * Block current thread and continue execution in new thread + */ +-int ContinueInNewThread(int (JNICALL *continuation)(void *), +- jlong stack_size, void * args, int ret); ++int ContinueInNewThread0(int (JNICALL *continuation)(void *), ++ jlong stack_size, void * args); ++ ++ ++ static int ContinueInNewThread(InvocationFunctions* ifn, int argc, char** argv, ++ char* jarfile, char* classname, int ret); ++ + + /* sun.java.launcher.* platform properties. */ + void SetJavaLauncherPlatformProps(void); +diff -upr ../orig/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java ./jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java +--- ../orig/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java 2009-01-27 15:44:52.000000000 -0500 ++++ ./jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java 2009-05-04 17:37:16.000000000 -0400 +@@ -477,6 +477,10 @@ class Metacity implements SynthConstants + String[] dirs = new String[] { + userHome + sep + ".themes", + System.getProperty("swing.metacitythemedir"), ++ "/usr/X11R6/share/themes", ++ "/usr/X11R6/share/gnome/themes", ++ "/usr/local/share/themes", ++ "/usr/local/share/gnome/themes", + "/usr/share/themes", + "/usr/gnome/share/themes", // Debian/Redhat/Solaris + "/opt/gnome2/share/themes" // SuSE +diff -upr ../orig/jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java ./jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java +--- ../orig/jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2009-01-27 15:44:56.000000000 -0500 ++++ ./jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2009-05-04 17:37:16.000000000 -0400 +@@ -78,6 +78,9 @@ public class SnmpPduTrap extends SnmpPdu + */ + public long timeStamp ; + ++ // TODO: IcedTea: I am a stub. ++ static public int trapAuthenticationFailure = 0; ++ + + + /** +diff -upr ../orig/jdk/src/share/classes/java/awt/GraphicsEnvironment.java ./jdk/src/share/classes/java/awt/GraphicsEnvironment.java +--- ../orig/jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2009-01-27 15:45:05.000000000 -0500 ++++ ./jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2009-05-04 17:37:16.000000000 -0400 +@@ -148,7 +148,12 @@ public abstract class GraphicsEnvironmen + } else { + String osName = System.getProperty("os.name"); + headless = defaultHeadless = +- Boolean.valueOf(("Linux".equals(osName) || "SunOS".equals(osName)) && ++ Boolean.valueOf(("Linux".equals(osName) || ++ "SunOS".equals(osName) || ++ "FreeBSD".equals(osName) || ++ "NetBSD".equals(osName) || ++ "OpenBSD".equals(osName) || ++ "Darwin".equals(osName)) && + (System.getenv("DISPLAY") == null)); + } + } else if (nm.equals("true")) { +diff -upr ../orig/jdk/src/share/classes/java/util/TimeZone.java ./jdk/src/share/classes/java/util/TimeZone.java +--- ../orig/jdk/src/share/classes/java/util/TimeZone.java 2009-01-27 15:45:18.000000000 -0500 ++++ ./jdk/src/share/classes/java/util/TimeZone.java 2009-05-04 17:37:16.000000000 -0400 +@@ -779,15 +779,13 @@ abstract public class TimeZone implement + } + int gmtOffset = (hours * 60 + num) * 60 * 1000; + ++ zi = ZoneInfoFile.getCustomTimeZone(id, negative ? -gmtOffset : gmtOffset); + if (gmtOffset == 0) { +- zi = ZoneInfoFile.getZoneInfo(GMT_ID); + if (negative) { + zi.setID("GMT-00:00"); + } else { + zi.setID("GMT+00:00"); + } +- } else { +- zi = ZoneInfoFile.getCustomTimeZone(id, negative ? -gmtOffset : gmtOffset); + } + return zi; + } +diff -upr ../orig/jdk/src/share/classes/sun/awt/FontConfiguration.java ./jdk/src/share/classes/sun/awt/FontConfiguration.java +--- ../orig/jdk/src/share/classes/sun/awt/FontConfiguration.java 2009-01-27 15:45:29.000000000 -0500 ++++ ./jdk/src/share/classes/sun/awt/FontConfiguration.java 2009-05-04 17:37:16.000000000 -0400 +@@ -1073,7 +1073,7 @@ public abstract class FontConfiguration + */ + HashMap existsMap; + public boolean needToSearchForFile(String fileName) { +- if (!environment.isLinux) { ++ if (!environment.isLinuxOrBSD) { + return false; + } else if (existsMap == null) { + existsMap = new HashMap(); +@@ -1309,7 +1309,7 @@ public abstract class FontConfiguration + + " entry is missing!!!"); +- if (!osName.contains("Linux")) { ++ if (!osName.contains("Linux") && !osName.contains("BSD") && !osName.contains("Darwin")) { + errors++; + } + } +diff -upr ../orig/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java ./jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java +--- ../orig/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2009-01-27 15:45:30.000000000 -0500 ++++ ./jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2009-05-04 17:37:16.000000000 -0400 +@@ -76,7 +76,7 @@ import sun.font.NativeFont; + public abstract class SunGraphicsEnvironment extends GraphicsEnvironment + implements FontSupport, DisplayChangedListener { + +- public static boolean isLinux; ++ public static boolean isLinuxOrBSD; + public static boolean isSolaris; + public static boolean isWindows; + public static boolean noType1Font; +@@ -164,7 +164,15 @@ public abstract class SunGraphicsEnviron + public Object run() { + String osName = System.getProperty("os.name"); + if ("Linux".equals(osName)) { +- isLinux = true; ++ isLinuxOrBSD = true; ++ } else if ("FreeBSD".equals(osName)) { ++ isLinuxOrBSD = true; ++ } else if ("Darwin".equals(osName)) { ++ isLinuxOrBSD = true; ++ } else if ("NetBSD".equals(osName)) { ++ isLinuxOrBSD = true; ++ } else if ("OpenBSD".equals(osName)) { ++ isLinuxOrBSD = true; + } else if ("SunOS".equals(osName)) { + isSolaris = true; + } else if ("Windows".equals(osName)) { +@@ -227,8 +235,8 @@ public abstract class SunGraphicsEnviron + * Pass "true" to registerFonts method as on-screen these + * JRE fonts always go through the T2K rasteriser. + */ +- if (isLinux) { +- /* Linux font configuration uses these fonts */ ++ if (isLinuxOrBSD) { ++ /* Linux/BSD font configuration uses these fonts */ + registerFontDir(jreFontDirName); + } + registerFontsInDir(jreFontDirName, true, Font2D.JRE_RANK, +diff -upr ../orig/jdk/src/share/classes/sun/print/PSPrinterJob.java ./jdk/src/share/classes/sun/print/PSPrinterJob.java +--- ../orig/jdk/src/share/classes/sun/print/PSPrinterJob.java 2009-01-27 15:45:34.000000000 -0500 ++++ ./jdk/src/share/classes/sun/print/PSPrinterJob.java 2009-05-04 17:37:16.000000000 -0400 +@@ -1531,7 +1531,9 @@ public class PSPrinterJob extends Raster + pFlags |= NOSHEET; + ncomps+=1; + } +- if (System.getProperty("os.name").equals("Linux")) { ++ ++ String osname = System.getProperty("os.name"); ++ if (osname.equals("Linux") || osname.equals("FreeBSD") || osname.equals("NetBSD") || osname.equals("OpenBSD") || osname.equals("Darwin")) { + execCmd = new String[ncomps]; + execCmd[n++] = "/usr/bin/lpr"; + if ((pFlags & PRINTER) != 0) { +diff -upr ../orig/jdk/src/share/classes/sun/tools/jar/Main.java ./jdk/src/share/classes/sun/tools/jar/Main.java +--- ../orig/jdk/src/share/classes/sun/tools/jar/Main.java 2009-01-27 15:45:40.000000000 -0500 ++++ ./jdk/src/share/classes/sun/tools/jar/Main.java 2009-05-04 17:37:17.000000000 -0400 +@@ -46,6 +46,7 @@ class Main { + String zname = ""; + String[] files; + String rootjar = null; ++ String cwd; + Hashtable filesTable = new Hashtable(); + Vector paths = new Vector(); + Vector v; +@@ -770,6 +771,19 @@ class Main { + * Extracts specified entries from JAR file. + */ + void extract(InputStream in, String files[]) throws IOException { ++ // Current working directory ++ ++ cwd = System.getProperty("user.dir"); ++ if (cwd == null) { ++ fatalError(getMsg("error.no.cwd")); ++ } ++ cwd = (new File(cwd)).getCanonicalPath(); ++ if (!cwd.endsWith(File.separator)) { ++ cwd += File.separator; ++ } ++ ++ // Extract the files ++ + ZipInputStream zis = new ZipInputStream(in); + ZipEntry e; + // Set of all directory entries specified in archive. Dissallows +@@ -817,6 +831,10 @@ class Main { + ZipEntry rc = null; + String name = e.getName(); + File f = new File(e.getName().replace('/', File.separatorChar)); ++ if (!f.getCanonicalPath().startsWith(cwd)) { ++ output(formatMsg("out.ignore.entry", name)); ++ return null; ++ } + if (e.isDirectory()) { + if (f.exists()) { + if (!f.isDirectory()) { +@@ -838,6 +856,10 @@ class Main { + } else { + if (f.getParent() != null) { + File d = new File(f.getParent()); ++ if (!d.getCanonicalPath().startsWith(cwd)) { ++ output(formatMsg("out.ignore.entry", name)); ++ return null; ++ } + if (!d.exists() && !d.mkdirs() || !d.isDirectory()) { + throw new IOException(formatMsg( + "error.create.dir", d.getPath())); +diff -upr ../orig/jdk/src/share/classes/sun/tools/jar/resources/jar.properties ./jdk/src/share/classes/sun/tools/jar/resources/jar.properties +--- ../orig/jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2009-01-27 15:45:40.000000000 -0500 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2009-05-04 17:37:16.000000000 -0400 +@@ -44,6 +44,8 @@ error.create.dir=\ + {0} : could not create directory + error.incorrect.length=\ + incorrect length while processing: {0} ++error.no.cwd=\ ++ {0} : could not determine current working directory + out.added.manifest=\ + added manifest + out.update.manifest=\ +diff -upr ../orig/jdk/src/share/hpi/include/hpi_impl.h ./jdk/src/share/hpi/include/hpi_impl.h +--- ../orig/jdk/src/share/hpi/include/hpi_impl.h 2009-01-27 15:45:43.000000000 -0500 ++++ ./jdk/src/share/hpi/include/hpi_impl.h 2009-05-04 17:37:16.000000000 -0400 +@@ -138,7 +138,11 @@ int sysConnect(int fd, struct sockaddr * + int sysBind(int fd, struct sockaddr *him, int len); + int sysAccept(int fd, struct sockaddr *him, int *len); + int sysGetSockName(int fd, struct sockaddr *him, int *len); +-#ifdef _LP64 ++#if defined(_LP64) || defined(_ALLBSD_SOURCE) ++// XXXBSD: The implementations all use ssize_t, except on Windows, ++// regardless of _LP64. The resulting mismatch between "int" and "ssize_t" ++// causes gcc on Darwin to report a conflicting types error. ++// Appears to be an upstream issue introduced in 1.7 + ssize_t sysSendTo(int fd, char *buf, int len, int flags, struct sockaddr *to, + int tolen); + ssize_t sysRecvFrom(int fd, char *buf, int nbytes, int flags, +diff -upr ../orig/jdk/src/share/lib/security/java.security-openbsd ./jdk/src/share/lib/security/java.security-openbsd +--- ../orig/jdk/src/share/lib/security/java.security-openbsd 2009-05-04 18:32:16.000000000 -0400 ++++ ./jdk/src/share/lib/security/java.security-openbsd 2009-05-05 09:50:18.000000000 -0400 +@@ -66,7 +66,14 @@ security.provider.8=sun.security.smartca + # On Windows systems, the URLs file:/dev/random and file:/dev/urandom + # enables use of the Microsoft CryptoAPI seed functionality. + # +-securerandom.source=file:/dev/urandom ++# On OpenBSD use file:///dev/srandom for strong but blocking random ++# generator, file:/dev/random for hardware random generators, ++# file:///dev/arandom for non-blocking high-quality pseudo-random ++# data and file:///dev/urandom for non-blocking random data that ++# does not guarantee the data to be strong. See random(4) for more ++# info. ++# ++securerandom.source=file:///dev/arandom + # + # The entropy gathering device is described as a URL and can also + # be specified with the system property "java.security.egd". For example, +diff -upr ../orig/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h ./jdk/src/share/native/com/sun/java/util/jar/pack/defines.h +--- ../orig/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2009-01-27 15:45:44.000000000 -0500 ++++ ./jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2009-05-04 17:37:16.000000000 -0400 +@@ -32,6 +32,10 @@ + #include + #endif + ++#ifndef NO_ZLIB ++# include ++#endif ++ + #ifndef FULL + #define FULL 1 /* Adds <500 bytes to the zipped final product. */ + #endif +@@ -89,11 +93,13 @@ extern void assert_failed(const char*); + // bytes and byte arrays + + typedef unsigned int uint; ++#ifdef NO_ZLIB + #ifdef _LP64 + typedef unsigned int uLong; // Historical zlib, should be 32-bit. + #else + typedef unsigned long uLong; + #endif ++#endif + #ifdef _MSC_VER + typedef LONGLONG jlong; + typedef DWORDLONG julong; +diff -upr ../orig/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp ./jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp +--- ../orig/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp 2009-01-27 15:45:44.000000000 -0500 ++++ ./jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp 2009-05-04 17:37:16.000000000 -0400 +@@ -33,9 +33,14 @@ + #include + #include + ++/* !PRODUCT needs intptr_t */ ++#if defined(_ALLBSD_SOURCE) && !defined(PRODUCT) ++#include ++#endif ++ + #if defined(unix) && !defined(PRODUCT) + #include "pthread.h" +-#define THREAD_SELF ((int)pthread_self()) ++#define THREAD_SELF ((intptr_t) pthread_self()) + #endif + + #include "defines.h" +@@ -58,9 +63,9 @@ int main(int argc, char **argv) { + // Single-threaded, implementation, not reentrant. + // Includes a weak error check against MT access. + #ifndef THREAD_SELF +-#define THREAD_SELF (0) ++#define THREAD_SELF ((intptr_t) 0) + #endif +-NOT_PRODUCT(static int uThread = -1;) ++NOT_PRODUCT(static intptr_t uThread = -1;) + + unpacker* unpacker::non_mt_current = null; + unpacker* unpacker::current() { +@@ -69,7 +74,7 @@ unpacker* unpacker::current() { + } + static void set_current_unpacker(unpacker* u) { + unpacker::non_mt_current = u; +- assert(((uThread = (u == null) ? -1 : THREAD_SELF), ++ assert(((uThread = (u == null) ? ((intptr_t) -1) : THREAD_SELF), + true)); + } + +diff -upr ../orig/jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c ./jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c +--- ../orig/jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c 2009-01-27 15:45:44.000000000 -0500 ++++ ./jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c 2009-05-04 17:37:16.000000000 -0400 +@@ -33,7 +33,11 @@ + + #include + // for malloc ++#ifdef _ALLBSD_SOURCE ++#include ++#else + #include ++#endif + #include "SoundDefs.h" + #include "DirectAudio.h" + #include "Utilities.h" +diff -upr ../orig/jdk/src/share/native/com/sun/media/sound/Platform.c ./jdk/src/share/native/com/sun/media/sound/Platform.c +--- ../orig/jdk/src/share/native/com/sun/media/sound/Platform.c 2009-01-27 15:45:44.000000000 -0500 ++++ ./jdk/src/share/native/com/sun/media/sound/Platform.c 2009-05-04 17:37:16.000000000 -0400 +@@ -99,5 +99,17 @@ JNIEXPORT jint JNICALL Java_com_sun_medi + return com_sun_media_sound_Platform_LIB_ALSA; + } + #endif ++#if (X_PLATFORM == X_BSD) ++ switch (feature) { ++ case com_sun_media_sound_Platform_FEATURE_MIDIIO: ++ return com_sun_media_sound_Platform_LIB_MAIN; ++ case com_sun_media_sound_Platform_FEATURE_PORTS: ++ return com_sun_media_sound_Platform_LIB_MAIN; ++ case com_sun_media_sound_Platform_FEATURE_DIRECT_AUDIO: ++ // XXXBSD: When native Direct Audio support is ported change ++ // this back to returning com_sun_media_sound_Platform_LIB_MAIN ++ return 0; ++ } ++#endif + return 0; + } +diff -upr ../orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h ./jdk/src/share/native/com/sun/media/sound/SoundDefs.h +--- ../orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2009-01-27 15:45:44.000000000 -0500 ++++ ./jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2009-05-04 17:37:16.000000000 -0400 +@@ -31,6 +31,7 @@ + #define X_WINDOWS 1 + #define X_SOLARIS 2 + #define X_LINUX 3 ++#define X_BSD 4 + + // types for X_ARCH + #define X_I586 1 +@@ -49,7 +50,7 @@ + + + // following is needed for _LP64 +-#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX)) ++#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_BSD)) + #include + #endif + +@@ -129,4 +130,9 @@ typedef char SBYTE; + #endif + + ++#if X_PLATFORM == X_BSD ++#define INLINE inline ++#endif ++ ++ + #endif // __SOUNDDEFS_INCLUDED__ +diff -upr ../orig/jdk/src/share/native/common/check_code.c ./jdk/src/share/native/common/check_code.c +--- ../orig/jdk/src/share/native/common/check_code.c 2009-01-27 15:45:44.000000000 -0500 ++++ ./jdk/src/share/native/common/check_code.c 2009-05-04 17:37:17.000000000 -0400 +@@ -1069,7 +1069,7 @@ verify_method(context_type *context, jcl + * Make sure that branches don't go into the middle of nowhere. + */ + +-static jint ntohl(jint n) ++static jint _ck_ntohl(jint n) + { + unsigned char *p = (unsigned char *)&n; + return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; +@@ -1148,26 +1148,26 @@ verify_opcode_operands(context_type *con + } + } + if (opcode == opc_tableswitch) { +- keys = ntohl(lpc[2]) - ntohl(lpc[1]) + 1; ++ keys = _ck_ntohl(lpc[2]) - _ck_ntohl(lpc[1]) + 1; + delta = 1; + } else { +- keys = ntohl(lpc[1]); /* number of pairs */ ++ keys = _ck_ntohl(lpc[1]); /* number of pairs */ + delta = 2; + /* Make sure that the tableswitch items are sorted */ + for (k = keys - 1, lptr = &lpc[2]; --k >= 0; lptr += 2) { +- int this_key = ntohl(lptr[0]); /* NB: ntohl may be unsigned */ +- int next_key = ntohl(lptr[2]); ++ int this_key = _ck_ntohl(lptr[0]); /* NB: ntohl may be unsigned */ ++ int next_key = _ck_ntohl(lptr[2]); + if (this_key >= next_key) { + CCerror(context, "Unsorted lookup switch"); + } + } + } + saved_operand = NEW(int, keys + 2); +- if (!isLegalTarget(context, offset + ntohl(lpc[0]))) ++ if (!isLegalTarget(context, offset + _ck_ntohl(lpc[0]))) + CCerror(context, "Illegal default target in switch"); +- saved_operand[keys + 1] = code_data[offset + ntohl(lpc[0])]; ++ saved_operand[keys + 1] = code_data[offset + _ck_ntohl(lpc[0])]; + for (k = keys, lptr = &lpc[3]; --k >= 0; lptr += delta) { +- int target = offset + ntohl(lptr[0]); ++ int target = offset + _ck_ntohl(lptr[0]); + if (!isLegalTarget(context, target)) + CCerror(context, "Illegal branch in opc_tableswitch"); + saved_operand[k + 1] = code_data[target]; +@@ -1615,7 +1615,7 @@ static int instruction_length(unsigned c + if (lpc + 2 >= (int *)end) { + return -1; /* do not read pass the end */ + } +- index = ntohl(lpc[2]) - ntohl(lpc[1]); ++ index = _ck_ntohl(lpc[2]) - _ck_ntohl(lpc[1]); + if ((index < 0) || (index > 65535)) { + return -1; /* illegal */ + } else { +@@ -1628,7 +1628,7 @@ static int instruction_length(unsigned c + int npairs; + if (lpc + 1 >= (int *)end) + return -1; /* do not read pass the end */ +- npairs = ntohl(lpc[1]); ++ npairs = _ck_ntohl(lpc[1]); + /* There can't be more than 64K labels because of the limit + * on per-method byte code length. + */ +diff -upr ../orig/jdk/src/share/native/java/io/io_util.h ./jdk/src/share/native/java/io/io_util.h +--- ../orig/jdk/src/share/native/java/io/io_util.h 2009-01-27 15:45:44.000000000 -0500 ++++ ./jdk/src/share/native/java/io/io_util.h 2009-05-04 17:37:16.000000000 -0400 +@@ -29,7 +29,15 @@ + extern jfieldID IO_fd_fdID; + extern jfieldID IO_handle_fdID; + +-#if !defined(O_DSYNC) || !defined(O_SYNC) ++#ifdef _ALLBSD_SOURCE ++#include ++#ifndef O_SYNC ++#define O_SYNC O_FSYNC ++#endif ++#ifndef O_DSYNC ++#define O_DSYNC O_FSYNC ++#endif ++#elif !defined(O_DSYNC) || !defined(O_SYNC) + #define O_SYNC (0x0800) + #define O_DSYNC (0x2000) + #endif +diff -upr ../orig/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h ./jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h +--- ../orig/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2009-01-27 15:45:44.000000000 -0500 ++++ ./jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2009-05-04 17:37:16.000000000 -0400 +@@ -25,6 +25,10 @@ + * have any questions. + */ + ++#ifdef __OpenBSD__ ++#include ++#endif ++#include + #include "jfdlibm.h" + + #ifdef __NEWVALID /* special setup for Sun test regime */ +@@ -47,11 +51,13 @@ + #define __LOp(x) *(1+(int*)x) + #endif + ++#ifndef __P + #ifdef __STDC__ + #define __P(p) p + #else + #define __P(p) () + #endif ++#endif + + /* + * ANSI/POSIX +diff -upr ../orig/jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h ./jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h +--- ../orig/jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h 2009-01-27 15:45:44.000000000 -0500 ++++ ./jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h 2009-05-04 17:37:16.000000000 -0400 +@@ -61,7 +61,7 @@ + #define log1p jlog1p + #define expm1 jexpm1 + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #define __ieee754_sqrt __j__ieee754_sqrt + #define __ieee754_acos __j__ieee754_acos + #define __ieee754_acosh __j__ieee754_acosh +diff -upr ../orig/jdk/src/share/native/java/util/zip/Inflater.c ./jdk/src/share/native/java/util/zip/Inflater.c +--- ../orig/jdk/src/share/native/java/util/zip/Inflater.c 2009-01-27 15:45:44.000000000 -0500 ++++ ./jdk/src/share/native/java/util/zip/Inflater.c 2009-05-04 17:37:16.000000000 -0400 +@@ -67,6 +67,10 @@ Java_java_util_zip_Inflater_init(JNIEnv + return jlong_zero; + } else { + char *msg; ++// BSDXXX needed for FreeBSD 5.4 and below with system zlib ++#if defined(__FreeBSD__) && __FreeBSD__ < 6 ++ strm->adler = 1; ++#endif + switch (inflateInit2(strm, nowrap ? -MAX_WBITS : MAX_WBITS)) { + case Z_OK: + return ptr_to_jlong(strm); +@@ -202,6 +206,10 @@ Java_java_util_zip_Inflater_reset(JNIEnv + if (inflateReset(jlong_to_ptr(strm)) != Z_OK) { + JNU_ThrowInternalError(env, 0); + } ++// BSDXXX needed for FreeBSD 5.4 and below with system zlib ++#if defined(__FreeBSD__) && __FreeBSD__ < 6 ++ ((z_stream *)jlong_to_ptr(strm))->adler = 1; ++#endif + } + + JNIEXPORT void JNICALL +diff -upr ../orig/jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h ./jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h +--- ../orig/jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h 2009-01-27 15:45:44.000000000 -0500 ++++ ./jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h 2009-05-04 17:37:16.000000000 -0400 +@@ -42,44 +42,49 @@ + /* for _LP64 */ + #include + ++/** ++ * Privatise the symbols to the JDK. ++ */ ++#define Z_PREFIX ++ + /* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + */ + #ifdef Z_PREFIX +-# define deflateInit_ z_deflateInit_ +-# define deflate z_deflate +-# define deflateEnd z_deflateEnd +-# define inflateInit_ z_inflateInit_ +-# define inflate z_inflate +-# define inflateEnd z_inflateEnd +-# define deflateInit2_ z_deflateInit2_ +-# define deflateSetDictionary z_deflateSetDictionary +-# define deflateCopy z_deflateCopy +-# define deflateReset z_deflateReset +-# define deflateParams z_deflateParams +-# define inflateInit2_ z_inflateInit2_ +-# define inflateSetDictionary z_inflateSetDictionary +-# define inflateSync z_inflateSync +-# define inflateSyncPoint z_inflateSyncPoint +-# define inflateReset z_inflateReset +-# define compress z_compress +-# define compress2 z_compress2 +-# define uncompress z_uncompress +-# define adler32 z_adler32 +-# define crc32 z_crc32 +-# define get_crc_table z_get_crc_table +- +-# define Byte z_Byte +-# define uInt z_uInt +-# define uLong z_uLong +-# define Bytef z_Bytef +-# define charf z_charf +-# define intf z_intf +-# define uIntf z_uIntf +-# define uLongf z_uLongf +-# define voidpf z_voidpf +-# define voidp z_voidp ++# define deflateInit_ _java_z_deflateInit_ ++# define deflate _java_z_deflate ++# define deflateEnd _java_z_deflateEnd ++# define inflateInit_ _java_z_inflateInit_ ++# define inflate _java_z_inflate ++# define inflateEnd _java_z_inflateEnd ++# define deflateInit2_ _java_z_deflateInit2_ ++# define deflateSetDictionary _java_z_deflateSetDictionary ++# define deflateCopy _java_z_deflateCopy ++# define deflateReset _java_z_deflateReset ++# define deflateParams _java_z_deflateParams ++# define inflateInit2_ _java_z_inflateInit2_ ++# define inflateSetDictionary _java_z_inflateSetDictionary ++# define inflateSync _java_z_inflateSync ++# define inflateSyncPoint _java_z_inflateSyncPoint ++# define inflateReset _java_z_inflateReset ++# define compress _java_z_compress ++# define compress2 _java_z_compress2 ++# define uncompress _java_z_uncompress ++# define adler32 _java_z_adler32 ++# define crc32 _java_z_crc32 ++# define get_crc_table _java_z_get_crc_table ++ ++# define Byte _java_z_Byte ++# define uInt _java_z_uInt ++# define uLong _java_z_uLong ++# define Bytef _java_z_Bytef ++# define charf _java_z_charf ++# define intf _java_z_intf ++# define uIntf _java_z_uIntf ++# define uLongf _java_z_uLongf ++# define voidpf _java_z_voidpf ++# define voidp _java_z_voidp + #endif + + #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) +diff -upr ../orig/jdk/src/share/native/sun/awt/debug/debug_util.h ./jdk/src/share/native/sun/awt/debug/debug_util.h +--- ../orig/jdk/src/share/native/sun/awt/debug/debug_util.h 2009-01-27 15:45:45.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/debug/debug_util.h 2009-05-04 17:37:16.000000000 -0400 +@@ -50,7 +50,9 @@ typedef void * dmutex_t; + #include + #include + #include ++#if !defined(_ALLBSD_SOURCE) + #include ++#endif + #include + + /* keep these after the other headers */ +diff -upr ../orig/jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c ./jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c +--- ../orig/jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c 2009-01-27 15:45:45.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c 2009-05-04 17:37:16.000000000 -0400 +@@ -24,7 +24,11 @@ + */ + + #include "BufImgSurfaceData.h" ++#ifdef _ALLBSD_SOURCE ++#include ++#else + #include "malloc.h" ++#endif + + #include "sun_awt_image_BufImgSurfaceData.h" + +diff -upr ../orig/jdk/src/share/native/sun/awt/image/DataBufferNative.c ./jdk/src/share/native/sun/awt/image/DataBufferNative.c +--- ../orig/jdk/src/share/native/sun/awt/image/DataBufferNative.c 2009-01-27 15:45:45.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/image/DataBufferNative.c 2009-05-04 17:37:16.000000000 -0400 +@@ -23,7 +23,11 @@ + * have any questions. + */ + ++#ifdef _ALLBSD_SOURCE ++#include ++#else + #include "malloc.h" ++#endif + + #include "SurfaceData.h" + #include "sun_awt_image_DataBufferNative.h" +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2009-01-27 15:45:45.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2009-05-04 17:37:16.000000000 -0400 +@@ -86,7 +86,7 @@ typedef struct { + #endif /* MLIB_USE_FTOI_CLAMPING */ + + /***************************************************************/ +-#if defined(_LITTLE_ENDIAN) && !defined(_NO_LONGLONG) ++#if (BYTE_ORDER == LITTLE_ENDIAN) && !defined(_NO_LONGLONG) + + /* NB: Explicit cast to DTYPE is necessary to avoid warning from Microsoft VC compiler. + And we need to explicitly define cast behavior if source exceeds destination range. +@@ -103,7 +103,7 @@ typedef struct { + dp[0 ] = (DTYPE) ((res0) & DTYPE_MASK); \ + dp[chan1] = (DTYPE) ((res1) & DTYPE_MASK) + +-#endif /* defined(_LITTLE_ENDIAN) && !defined(_NO_LONGLONG) */ ++#endif /* (BYTE_ORDER == LITTLE_ENDIAN) && !defined(_NO_LONGLONG) */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -114,17 +114,17 @@ typedef struct { + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | ((mlib_s64)sp[0] & 0xffffffff) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | ((mlib_s64)sp[chan1] & 0xffffffff) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + #endif /* _NO_LONGLONG */ + +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2009-01-27 15:45:45.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2009-05-04 17:37:16.000000000 -0400 +@@ -126,7 +126,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -138,7 +138,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -149,17 +149,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2009-01-27 15:45:45.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2009-05-04 17:37:16.000000000 -0400 +@@ -94,7 +94,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -106,7 +106,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -117,17 +117,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2009-01-27 15:45:45.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2009-05-04 17:37:16.000000000 -0400 +@@ -126,7 +126,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -138,7 +138,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -149,17 +149,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2009-01-27 15:45:45.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2009-05-04 17:37:16.000000000 -0400 +@@ -95,7 +95,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -107,7 +107,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -118,17 +118,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2009-01-27 15:45:45.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2009-05-04 17:37:16.000000000 -0400 +@@ -126,7 +126,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -138,7 +138,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -149,17 +149,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2009-01-27 15:45:45.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2009-05-04 17:37:16.000000000 -0400 +@@ -94,7 +94,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -106,7 +106,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -117,17 +117,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c ./jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2009-01-27 15:45:45.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2009-05-04 17:37:16.000000000 -0400 +@@ -95,7 +95,7 @@ void mlib_ImageCopy_bit_na(const mlib_u8 + dst = dp[0]; + if (ld_offset + size < 32) { + dmask = (mask0 << (32 - size)) >> ld_offset; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src = (src0 >> (ld_offset - ls_offset)); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -104,12 +104,12 @@ void mlib_ImageCopy_bit_na(const mlib_u8 + #else + src = (src0 >> (ld_offset - ls_offset)); + dp[0] = (dst & (~dmask)) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + return; + } + + dmask = mask0 >> ld_offset; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src = (src0 >> (ld_offset - ls_offset)); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -118,7 +118,7 @@ void mlib_ImageCopy_bit_na(const mlib_u8 + #else + src = (src0 >> (ld_offset - ls_offset)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + j = 32 - ld_offset; + dp++; + ls_offset += j; +@@ -131,7 +131,7 @@ void mlib_ImageCopy_bit_na(const mlib_u8 + + if (ld_offset + size < 32) { + dmask = (mask0 << (32 - size)) >> ld_offset; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 << shift) | (src1 >> (32 - shift)); +@@ -141,12 +141,12 @@ void mlib_ImageCopy_bit_na(const mlib_u8 + #else + src = (src0 << shift) | (src1 >> (32 - shift)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + return; + } + + dmask = mask0 >> ld_offset; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 << shift) | (src1 >> (32 - shift)); +@@ -156,7 +156,7 @@ void mlib_ImageCopy_bit_na(const mlib_u8 + #else + src = (src0 << shift) | (src1 >> (32 - shift)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + j = 32 - ld_offset; + dp++; + sp++; +@@ -164,19 +164,19 @@ void mlib_ImageCopy_bit_na(const mlib_u8 + } + + if (j < size) src1 = sp[0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + for (; j <= size - 32; j += 32) { + src0 = src1; + src1 = sp[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); + dp[0] = (src << 24) | ((src & 0xFF00) << 8) | ((src >> 8) & 0xFF00) | (src >> 24); + #else + dp[0] = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp++; + dp++; + } +@@ -187,7 +187,7 @@ void mlib_ImageCopy_bit_na(const mlib_u8 + if (ls_offset + j > 32) src1 = sp[1]; + dst = dp[0]; + dmask = mask0 << (32 - j); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -196,7 +196,7 @@ void mlib_ImageCopy_bit_na(const mlib_u8 + #else + src = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + + #else /* _LONGLONG */ +@@ -315,7 +315,7 @@ void mlib_ImageCopy_bit_na_r(const mlib_ + dst = dp[0]; + if (ld_offset >= size) { + dmask = (lmask0 << (32 - size)) >> (ld_offset - size); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src = (src0 << (ls_offset - ld_offset)); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -324,12 +324,12 @@ void mlib_ImageCopy_bit_na_r(const mlib_ + #else + src = (src0 << (ls_offset - ld_offset)); + dp[0] = (dst & (~dmask)) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + return; + } + + dmask = lmask0 << (32 - ld_offset); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src = (src0 << (ls_offset - ld_offset)); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -338,7 +338,7 @@ void mlib_ImageCopy_bit_na_r(const mlib_ + #else + src = (src0 << (ls_offset - ld_offset)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + j = ld_offset; + dp--; + ls_offset -= j; +@@ -351,7 +351,7 @@ void mlib_ImageCopy_bit_na_r(const mlib_ + + if (ld_offset >= size) { + dmask = (lmask0 << (32 - size)) >> (ld_offset - size); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 >> shift) | (src1 << (32 - shift)); +@@ -361,12 +361,12 @@ void mlib_ImageCopy_bit_na_r(const mlib_ + #else + src = (src0 >> shift) | (src1 << (32 - shift)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + return; + } + + dmask = lmask0 << (32 - ld_offset); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 >> shift) | (src1 << (32 - shift)); +@@ -376,7 +376,7 @@ void mlib_ImageCopy_bit_na_r(const mlib_ + #else + src = (src0 >> shift) | (src1 << (32 - shift)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + j = ld_offset; + dp--; + sp--; +@@ -384,22 +384,22 @@ void mlib_ImageCopy_bit_na_r(const mlib_ + } + + if (j < size) src1 = sp[0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #ifdef __SUNPRO_C + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (; j <= size - 32; j += 32) { + src0 = src1; + src1 = sp[-1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); + dp[0] = (src << 24) | ((src & 0xFF00) << 8) | ((src >> 8) & 0xFF00) | (src >> 24); + #else + dp[0] = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp--; + dp--; + } +@@ -410,7 +410,7 @@ void mlib_ImageCopy_bit_na_r(const mlib_ + if (ls_offset < j) src1 = sp[-1]; + dst = dp[0]; + dmask = lmask0 >> (32 - j); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -419,7 +419,7 @@ void mlib_ImageCopy_bit_na_r(const mlib_ + #else + src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + + #else /* _LONGLONG */ +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2009-05-04 17:37:16.000000000 -0400 +@@ -168,7 +168,7 @@ + } + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define READ_U8_D64(table0, table1, table2, table3) \ + t0 = *(mlib_d64*)((mlib_u8*)table0 + ((s0 << 3) & 0x7F8)); \ +@@ -184,7 +184,7 @@ + t2 = *(mlib_d64*)((mlib_u8*)table2 + ((s0 >> 5) & 0x7F8)); \ + t3 = *(mlib_d64*)((mlib_u8*)table3 + ((s0 << 3) & 0x7F8)) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + void mlib_ImageLookUp_U8_D64(const mlib_u8 *src, +@@ -612,7 +612,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 8, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); +@@ -622,12 +622,12 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); +@@ -637,7 +637,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[4] = t0; + dp[5] = t1; +@@ -645,7 +645,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + dp[7] = t3; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); +@@ -655,12 +655,12 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); +@@ -670,7 +670,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; +@@ -718,7 +718,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 12, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +@@ -732,14 +732,14 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; + dp[4] = t4; + dp[5] = t5; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +@@ -753,7 +753,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[6] = t0; + dp[7] = t1; +@@ -763,7 +763,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + dp[11] = t5; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +@@ -777,14 +777,14 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; + dp[4] = t4; + dp[5] = t5; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +@@ -798,7 +798,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[6] = t0; + dp[7] = t1; + dp[8] = t2; +@@ -851,7 +851,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 16, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +@@ -861,12 +861,12 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); +@@ -876,12 +876,12 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; + dp[7] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +@@ -891,12 +891,12 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[8] = t0; + dp[9] = t1; + dp[10] = t2; + dp[11] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); +@@ -906,7 +906,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[12] = t0; + dp[13] = t1; +@@ -914,7 +914,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + dp[15] = t3; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +@@ -924,12 +924,12 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); +@@ -939,12 +939,12 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; + dp[7] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +@@ -954,12 +954,12 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[8] = t0; + dp[9] = t1; + dp[10] = t2; + dp[11] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); +@@ -969,7 +969,7 @@ void mlib_ImageLookUpSI_U8_D64(const mli + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[12] = t0; + dp[13] = t1; + dp[14] = t2; +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2009-05-04 17:37:16.000000000 -0400 +@@ -88,7 +88,7 @@ typedef union { + } d64_2_f32; + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + static const mlib_u32 mlib_bit_mask[16] = { + 0x00000000u, 0xFF000000u, 0x00FF0000u, 0xFFFF0000u, +@@ -126,7 +126,7 @@ static const mlib_u32 mlib_bit_mask_3[3* + 0x00000000u, 0x00FFFFFFu, 0xFF000000u, 0xFFFFFFFFu + }; + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + mlib_status mlib_ImageLookUp_Bit_U8_1(const mlib_u8 *src, +@@ -228,13 +228,13 @@ mlib_status mlib_ImageLookUp_Bit_U8_1(co + #endif /* __SUNPRO_C */ + for (; i <= (size - 16); i += 16) { + s0 = *(mlib_u16*)sa; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *da++ = dd_array[s0 & 0xFF]; + *da++ = dd_array[s0 >> 8]; + #else + *da++ = dd_array[s0 >> 8]; + *da++ = dd_array[s0 & 0xFF]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sa += 2; + } + +@@ -258,20 +258,20 @@ mlib_status mlib_ImageLookUp_Bit_U8_1(co + val1 = p_dd[2*val0+1]; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); + #else + emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ((mlib_u32*)da)[0] = (val1 & emask) | (((mlib_u32*)da)[0] &~ emask); + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + mlib_u64 emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8); + #else + mlib_u64 emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + ((mlib_u64*)da)[0] = (((mlib_u64*)dd_array)[sa[0]] & emask) | (((mlib_u64*)da)[0] &~ emask); + +@@ -323,13 +323,13 @@ mlib_status mlib_ImageLookUp_Bit_U8_2(co + + val0 = table[0][0]; + val1 = table[0][1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + val0 = val0 | (table[1][0] << 8); + val1 = val1 | (table[1][1] << 8); + #else + val0 = (val0 << 8) | table[1][0]; + val1 = (val1 << 8) | table[1][1]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + val0 |= (val0 << 16); + val1 |= (val1 << 16); + +@@ -394,11 +394,11 @@ mlib_status mlib_ImageLookUp_Bit_U8_2(co + dd1 = dd2; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); + #else + emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ((mlib_u32*)da)[0] = (dd1 & emask) | (((mlib_u32*)da)[0] &~ emask); + + #else /* _NO_LONGLONG */ +@@ -412,11 +412,11 @@ mlib_status mlib_ImageLookUp_Bit_U8_2(co + dd = ((mlib_u64*)dd_array)[s0 & 0xf]; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8); + #else + emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ((mlib_u64*)da)[0] = (dd & emask) | (((mlib_u64*)da)[0] &~ emask); + + #endif /* _NO_LONGLONG */ +@@ -462,7 +462,7 @@ mlib_status mlib_ImageLookUp_Bit_U8_3(co + + buffs = buff + size; + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + l0 = (table[0][0] << 24) | (table[2][0] << 16) | (table[1][0] << 8) | (table[0][0]); + h0 = (table[0][1] << 24) | (table[2][1] << 16) | (table[1][1] << 8) | (table[0][1]); + l1 = (l0 >> 8); l1 |= (l1 << 24); +@@ -476,7 +476,7 @@ mlib_status mlib_ImageLookUp_Bit_U8_3(co + h1 = (h0 << 8); h1 |= (h1 >> 24); + l2 = (l1 << 8); l2 |= (l2 >> 24); + h2 = (h1 << 8); h2 |= (h2 >> 24); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /* calculate lookup table */ + #ifdef __SUNPRO_C +@@ -564,11 +564,11 @@ mlib_status mlib_ImageLookUp_Bit_U8_3(co + dd = ((mlib_u32*)(d_array12 + (s0 & 0xF)))[1]; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); + #else + emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = (dd & emask) | (da[0] &~ emask); + } + +@@ -611,13 +611,13 @@ mlib_status mlib_ImageLookUp_Bit_U8_4(co + + buffs = buff + size; + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + l = (table[3][0] << 24) | (table[2][0] << 16) | (table[1][0] << 8) | (table[0][0]); + h = (table[3][1] << 24) | (table[2][1] << 16) | (table[1][1] << 8) | (table[0][1]); + #else + l = (table[0][0] << 24) | (table[1][0] << 16) | (table[2][0] << 8) | (table[3][0]); + h = (table[0][1] << 24) | (table[1][1] << 16) | (table[2][1] << 8) | (table[3][1]); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + ((mlib_u32*)lh)[0] = l; ((mlib_u32*)lh)[1] = l; + ((mlib_u32*)lh)[2] = l; ((mlib_u32*)lh)[3] = h; +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c ./jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2009-05-04 17:37:16.000000000 -0400 +@@ -30,7 +30,7 @@ + typedef union { + mlib_d64 db; + struct { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + mlib_s32 int1, int0; + #else + mlib_s32 int0, int1; +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2009-05-04 17:37:16.000000000 -0400 +@@ -275,11 +275,11 @@ void mlib_ImageCopy_bit_al(const mlib_u8 + for (i = 0; j <= (b_size - 4); j += 4, i++) { + src0 = src1; + src1 = pws[i + 1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + pwd[i] = (src0 >> lshift) | (src1 << rshift); + #else + pwd[i] = (src0 << lshift) | (src1 >> rshift); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + + sa += i << 2; +@@ -381,11 +381,11 @@ void mlib_c_ImageCopy_u8(const mlib_imag + for (; j <= (src_width - 4); j += 4) { + src0 = src1; + src1 = ps[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *((mlib_s32 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr); + #else + *((mlib_s32 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ps++; + } + } +@@ -414,11 +414,11 @@ void mlib_c_ImageCopy_u8(const mlib_imag + for (; j <= (src_width - 8); j += 8) { + src0 = src1; + src1 = ps[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr); + #else + *((mlib_s64 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ps++; + } + } +@@ -484,11 +484,11 @@ void mlib_c_ImageCopy_s16(const mlib_ima + for (; j <= (src_width - 2); j += 2) { + src0 = src1; + src1 = ps[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *((mlib_s32 *) (pdst_row + j)) = (src0 >> 16) | (src1 << 16); + #else + *((mlib_s32 *) (pdst_row + j)) = (src0 << 16) | (src1 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ps++; + } + } +@@ -516,11 +516,11 @@ void mlib_c_ImageCopy_s16(const mlib_ima + for (; j <= (src_width - 4); j += 4) { + src0 = src1; + src1 = ps[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr); + #else + *((mlib_s64 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ps++; + } + } +@@ -585,11 +585,11 @@ void mlib_c_ImageCopy_s32(const mlib_ima + for (; j <= (src_width - 2); j += 2) { + src0 = src1; + src1 = ps[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *((mlib_s64 *) (pdst_row + j)) = (src0 >> 32) | (src1 << 32); + #else + *((mlib_s64 *) (pdst_row + j)) = (src0 << 32) | (src1 >> 32); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ps++; + } + } +@@ -687,11 +687,11 @@ void mlib_ImageCopy_na(const mlib_u8 *sp + #endif /* __SUNPRO_C */ + for (; n > SIZE; n -= SIZE) { + s1 = *tmp++; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *(TYPE *) dp = (s0 >> shl) | (s1 << shr); + #else + *(TYPE *) dp = (s0 << shl) | (s1 >> shr); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = s1; + dp += SIZE; + sp += SIZE; +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2009-05-04 17:37:16.000000000 -0400 +@@ -120,7 +120,7 @@ + } \ + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + /***************************************************************/ + #define READ_U8_U8_ALIGN(table0, table1, table2, table3) \ +@@ -163,7 +163,7 @@ + t2 = *(mlib_u32*)((mlib_u8*)table2 + ((s0 >> 14) & 0x3FC)); \ + t3 = *(mlib_u32*)((mlib_u8*)table3 + ((s0 >> 22) & 0x3FC)) + +-#else /* _LITTLE_ENDIAN */ ++#else /* BYTE_ORDER == ... */ + + /***********/ + #define READ_U8_U8_ALIGN(table0, table1, table2, table3) \ +@@ -206,7 +206,7 @@ + t2 = *(mlib_u32*)((mlib_u8*)table2 + ((s0 >> 6) & 0x3FC)); \ + t3 = *(mlib_u32*)((mlib_u8*)table3 + ((s0 << 2) & 0x3FC)) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + void mlib_c_ImageLookUp_U8_U8(const mlib_u8 *src, +@@ -297,11 +297,11 @@ void mlib_c_ImageLookUp_U8_U8(const mlib + da[0] = t; + da++; + dp = (mlib_u8 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = tab[s2 >> 8]; + #else + *dp++ = tab[s2 & 0xFF]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp = (mlib_u8 *) sa; + i += 5; + for (; i < size; i++, dp++, sp++) +@@ -403,11 +403,11 @@ void mlib_c_ImageLookUp_U8_U8(const mlib + da[0] = t; + da++; + dp = (mlib_u8 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = tab0[s2 >> 8]; + #else + *dp++ = tab0[s2 & 0xFF]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp = (mlib_u8 *) sa; + i += 5; + +@@ -544,11 +544,11 @@ void mlib_c_ImageLookUp_U8_U8(const mlib + da[0] = t; + da++; + dp = (mlib_u8 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = tab1[s2 >> 8]; + #else + *dp++ = tab1[s2 & 0xFF]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp = (mlib_u8 *) sa; + i += 5; + +@@ -694,11 +694,11 @@ void mlib_c_ImageLookUp_U8_U8(const mlib + da[0] = t; + da++; + dp = (mlib_u8 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = tab0[s2 >> 8]; + #else + *dp++ = tab0[s2 & 0xFF]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp = (mlib_u8 *) sa; + i += 5; + +@@ -1852,21 +1852,21 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + s0 = tab0[0]; + s1 = tab1[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s2 = (s1 << 8) + s0; + #else + s2 = (s0 << 8) + s1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + tab[i - 1] = (mlib_u16) s2; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s2 = (s1 << 8) + s0; + #else + s2 = (s0 << 8) + s1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[255] = (mlib_u16) s2; + + for (j = 0; j < ysize; j++, dst += dlb, src += slb) { +@@ -1897,11 +1897,11 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + for (i = 0; i < size - 3; i += 2, da++, sa += 2) { + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t = (t1 << 16) + t0; + #else + t = (t0 << 16) + t1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + da[0] = t; +@@ -1909,11 +1909,11 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t = (t1 << 16) + t0; + #else + t = (t0 << 16) + t1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = t; + da++; + +@@ -1927,13 +1927,13 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + + if (off > 1) { + t0 = tab[sa[0]]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[1] = (t0 >> 8); + dp[0] = t0; + #else + dp[0] = (t0 >> 8); + dp[1] = t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sa++; + size--; + dp += 2; +@@ -1941,11 +1941,11 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + + t0 = tab[sa[0]]; + sa++; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = t0; + #else + *dp++ = (t0 >> 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + da = (mlib_s32 *) dp; + +@@ -1959,11 +1959,11 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + for (i = 0; i < size - 4; i += 2, da++, sa += 2) { + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t = (t0 >> 8) + (t1 << 8) + (t2 << 24); + #else + t = (t0 << 24) + (t1 << 8) + (t2 >> 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + t0 = t2; + s0 = sa[0]; + s1 = sa[1]; +@@ -1972,29 +1972,29 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t = (t0 >> 8) + (t1 << 8) + (t2 << 24); + #else + t = (t0 << 24) + (t1 << 8) + (t2 >> 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = t; + da++; + dp = (mlib_u8 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[0] = (t2 >> 8); + #else + dp[0] = t2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + if ((size & 1) == 0) { + t0 = tab[sa[0]]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[2] = (t0 >> 8); + dp[1] = t0; + #else + dp[1] = (t0 >> 8); + dp[2] = t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -2012,22 +2012,22 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + s1 = tab1[0]; + s2 = tab2[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s3 = (s2 << 24) + (s1 << 16) + (s0 << 8); + #else + s3 = (s0 << 16) + (s1 << 8) + s2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + s2 = tab2[i]; + tab[i - 1] = s3; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s3 = (s2 << 24) + (s1 << 16) + (s0 << 8); + #else + s3 = (s0 << 16) + (s1 << 8) + s2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[255] = s3; + + for (j = 0; j < ysize; j++, dst += dlb, src += slb) { +@@ -2064,24 +2064,24 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + for (i = 0; i < size - 7; i += 4, da += 3, sa += 4) { + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t0 >> 8) + (t1 << 16); + res2 = (t1 >> 16); + #else + da[0] = (t0 << 8) + (t1 >> 16); + res2 = (t1 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += (t0 << 8); + res1 = (t0 >> 24) + t1; + #else + res2 += (t0 >> 8); + res1 = (t0 << 24) + t1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[2]; + s1 = sa[3]; + da[1] = res2; +@@ -2090,24 +2090,24 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t0 >> 8) + (t1 << 16); + res2 = (t1 >> 16); + #else + da[0] = (t0 << 8) + (t1 >> 16); + res2 = (t1 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += (t0 << 8); + res1 = (t0 >> 24) + t1; + #else + res2 += (t0 >> 8); + res1 = (t0 << 24) + t1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[1] = res2; + da[2] = res1; + da += 3; +@@ -2143,11 +2143,11 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + s2 = tab2[0]; + s3 = tab3[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s4 = (s3 << 24) + (s2 << 16) + (s1 << 8) + s0; + #else + s4 = (s0 << 24) + (s1 << 16) + (s2 << 8) + s3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + s2 = tab2[i]; +@@ -2155,11 +2155,11 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + tab[i - 1] = s4; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s4 = (s3 << 24) + (s2 << 16) + (s1 << 8) + s0; + #else + s4 = (s0 << 24) + (s1 << 16) + (s2 << 8) + s3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[255] = s4; + + for (j = 0; j < ysize; j++, dst += dlb, src += slb) { +@@ -2225,13 +2225,13 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + for (i = 0; i < size - 4; i += 2, da += 2, sa += 2) { + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> shift) + (t1 << shift1); + res2 = (t1 >> shift) + (t2 << shift1); + #else + res1 = (t0 << shift) + (t1 >> shift1); + res2 = (t1 << shift) + (t2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + t0 = t2; + s0 = sa[0]; + s1 = sa[1]; +@@ -2241,28 +2241,28 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> shift) + (t1 << shift1); + res2 = (t1 >> shift) + (t2 << shift1); + #else + res1 = (t0 << shift) + (t1 >> shift1); + res2 = (t1 << shift) + (t2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res1; + da[1] = res2; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = (da[2] >> shift1); + da[2] = (t2 >> shift) + (t0 << shift1); + #else + t0 = (da[2] << shift1); + da[2] = (t2 << shift) + (t0 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da += 2; + dp = (mlib_u8 *) da + (4 - off); + + if ((size & 1) == 0) { + t0 = tab[sa[0]]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[3] = (mlib_u8) (t0 >> 24); + dp[2] = (mlib_u8) (t0 >> 16); + dp[1] = (mlib_u8) (t0 >> 8); +@@ -2272,7 +2272,7 @@ void mlib_c_ImageLookUpSI_U8_U8(const ml + dp[1] = (mlib_u8) (t0 >> 16); + dp[2] = (mlib_u8) (t0 >> 8); + dp[3] = (mlib_u8) t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -2348,13 +2348,13 @@ void mlib_c_ImageLookUpSI_S16_U8(const m + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res2 = (t5 << 8) + t4; + #else + da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res2 = (t4 << 24) + (t5 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab0[s0]; +@@ -2363,13 +2363,13 @@ void mlib_c_ImageLookUpSI_S16_U8(const m + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += ((t1 << 24) + (t0 << 16)); + res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; + #else + res2 += ((t0 << 8) + t1); + res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[2]; + s1 = sa[3]; + da[1] = res2; +@@ -2382,13 +2382,13 @@ void mlib_c_ImageLookUpSI_S16_U8(const m + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res2 = (t5 << 8) + t4; + #else + da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res2 = (t4 << 24) + (t5 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab0[s0]; +@@ -2397,13 +2397,13 @@ void mlib_c_ImageLookUpSI_S16_U8(const m + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += ((t1 << 24) + (t0 << 16)); + res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; + #else + res2 += ((t0 << 8) + t1); + res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[1] = res2; + da[2] = res1; + da += 3; +@@ -2455,11 +2455,11 @@ void mlib_c_ImageLookUpSI_S16_U8(const m + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + da[0] = res; + } +@@ -2468,11 +2468,11 @@ void mlib_c_ImageLookUpSI_S16_U8(const m + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res; + + } +@@ -2496,11 +2496,11 @@ void mlib_c_ImageLookUpSI_S16_U8(const m + t2 = tab2[s0]; + t3 = tab3[s0]; + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res1 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + s0 = sa[0]; + sa++; +@@ -2513,13 +2513,13 @@ void mlib_c_ImageLookUpSI_S16_U8(const m + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res = (res1 >> shift) + (res2 << shift1); + #else + res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res = (res1 << shift) + (res2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + res1 = res2; + s0 = sa[0]; + da[0] = res; +@@ -2529,21 +2529,21 @@ void mlib_c_ImageLookUpSI_S16_U8(const m + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res = (res1 >> shift) + (res2 << shift1); + #else + res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res = (res1 << shift) + (res2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (da[1] >> shift1); + da[1] = (res2 >> shift) + (res1 << shift1); + #else + res1 = (da[1] << shift1); + da[1] = (res2 << shift) + (res1 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -2617,13 +2617,13 @@ void mlib_c_ImageLookUpSI_U16_U8(const m + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res2 = (t5 << 8) + t4; + #else + da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res2 = (t4 << 24) + (t5 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab0[s0]; +@@ -2632,13 +2632,13 @@ void mlib_c_ImageLookUpSI_U16_U8(const m + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += ((t1 << 24) + (t0 << 16)); + res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; + #else + res2 += ((t0 << 8) + t1); + res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[2]; + s1 = sa[3]; + da[1] = res2; +@@ -2651,13 +2651,13 @@ void mlib_c_ImageLookUpSI_U16_U8(const m + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res2 = (t5 << 8) + t4; + #else + da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res2 = (t4 << 24) + (t5 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab0[s0]; +@@ -2666,13 +2666,13 @@ void mlib_c_ImageLookUpSI_U16_U8(const m + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += ((t1 << 24) + (t0 << 16)); + res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; + #else + res2 += ((t0 << 8) + t1); + res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[1] = res2; + da[2] = res1; + da += 3; +@@ -2724,11 +2724,11 @@ void mlib_c_ImageLookUpSI_U16_U8(const m + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + da[0] = res; + } +@@ -2737,11 +2737,11 @@ void mlib_c_ImageLookUpSI_U16_U8(const m + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res; + + } +@@ -2765,11 +2765,11 @@ void mlib_c_ImageLookUpSI_U16_U8(const m + t2 = tab2[s0]; + t3 = tab3[s0]; + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res1 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + s0 = sa[0]; + sa++; +@@ -2782,13 +2782,13 @@ void mlib_c_ImageLookUpSI_U16_U8(const m + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res = (res1 >> shift) + (res2 << shift1); + #else + res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res = (res1 << shift) + (res2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + res1 = res2; + s0 = sa[0]; + da[0] = res; +@@ -2798,21 +2798,21 @@ void mlib_c_ImageLookUpSI_U16_U8(const m + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res = (res1 >> shift) + (res2 << shift1); + #else + res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res = (res1 << shift) + (res2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (da[1] >> shift1); + da[1] = (res2 >> shift) + (res1 << shift1); + #else + res1 = (da[1] << shift1); + da[1] = (res2 << shift) + (res1 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -2863,21 +2863,21 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + s0 = tab0[0]; + s1 = tab1[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s2 = (s1 << 16) + s0; + #else + s2 = (s0 << 16) + s1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + tab[i - 1] = s2; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s2 = (s1 << 16) + s0; + #else + s2 = (s0 << 16) + s1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[255] = s2; + + for (j = 0; j < ysize; j++, dst += dlb, src += slb) { +@@ -2919,11 +2919,11 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + else { + + t0 = tab[*sa++]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = (mlib_u16) (t0); + #else + *dp++ = (mlib_u16) (t0 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da = (mlib_u32 *) dp; + s0 = sa[0]; + s1 = sa[1]; +@@ -2935,13 +2935,13 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + for (i = 0; i < size - 4; i += 2, da += 2, sa += 2) { + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> 16) + (t1 << 16); + res2 = (t1 >> 16) + (t2 << 16); + #else + res1 = (t0 << 16) + (t1 >> 16); + res2 = (t1 << 16) + (t2 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + t0 = t2; + s0 = sa[0]; + s1 = sa[1]; +@@ -2951,32 +2951,32 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> 16) + (t1 << 16); + res2 = (t1 >> 16) + (t2 << 16); + #else + res1 = (t0 << 16) + (t1 >> 16); + res2 = (t1 << 16) + (t2 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res1; + da[1] = res2; + da += 2; + dp = (mlib_u16 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[0] = (mlib_u16) (t2 >> 16); + #else + dp[0] = (mlib_u16) t2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + if ((size & 1) == 0) { + t0 = tab[sa[0]]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[2] = (mlib_u16) (t0 >> 16); + dp[1] = (mlib_u16) t0; + #else + dp[1] = (mlib_u16) (t0 >> 16); + dp[2] = (mlib_u16) t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -2994,13 +2994,13 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + s1 = tab1[0]; + s2 = tab2[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s3 = (s0 << 16); + s4 = (s2 << 16) + s1; + #else + s3 = s0; + s4 = (s1 << 16) + s2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + s2 = tab2[i]; +@@ -3008,13 +3008,13 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + tab[2 * i - 1] = s4; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s4 = (s2 << 16) + s1; + tab[510] = s0 << 16; + #else + s4 = (s1 << 16) + s2; + tab[510] = s0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[511] = s4; + + for (j = 0; j < ysize; j++, dst += dlb, src += slb) { +@@ -3050,13 +3050,13 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> 16) + (t1 << 16); + res2 = (t1 >> 16) + t2; + #else + res1 = (t0 << 16) + (t1 >> 16); + res2 = (t1 << 16) + t2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0] << 3; + s1 = sa[1] << 3; + da[0] = res1; +@@ -3068,13 +3068,13 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> 16) + (t1 << 16); + res2 = (t1 >> 16) + t2; + #else + res1 = (t0 << 16) + (t1 >> 16); + res2 = (t1 << 16) + t2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res1; + da[1] = res2; + da[2] = t3; +@@ -3105,13 +3105,13 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + s2 = tab2[0]; + s3 = tab3[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s4 = (s1 << 16) + s0; + s5 = (s3 << 16) + s2; + #else + s4 = (s0 << 16) + s1; + s5 = (s2 << 16) + s3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + s2 = tab2[i]; +@@ -3120,13 +3120,13 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + tab[2 * i - 1] = s5; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s4 = (s1 << 16) + s0; + s5 = (s3 << 16) + s2; + #else + s4 = (s0 << 16) + s1; + s5 = (s2 << 16) + s3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[510] = s4; + tab[511] = s5; + +@@ -3181,18 +3181,18 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + + t4 = tab[2 * sa[0]]; + t5 = tab[2 * sa[0] + 1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = (mlib_u16) (t4); + #else + *dp++ = (mlib_u16) (t4 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sa++; + da = (mlib_u32 *) dp; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *da++ = (t4 >> 16) + (t5 << 16); + #else + *da++ = (t4 << 16) + (t5 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0] << 3; + s1 = sa[1] << 3; + sa += 2; +@@ -3205,7 +3205,7 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t5 >> 16) + (t0 << 16); + res2 = (t0 >> 16) + (t1 << 16); + res3 = (t1 >> 16) + (t2 << 16); +@@ -3215,7 +3215,7 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + res2 = (t0 << 16) + (t1 >> 16); + res3 = (t1 << 16) + (t2 >> 16); + res4 = (t2 << 16) + (t3 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0] << 3; + s1 = sa[1] << 3; + da[0] = res1; +@@ -3229,7 +3229,7 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t5 >> 16) + (t0 << 16); + res2 = (t0 >> 16) + (t1 << 16); + res3 = (t1 >> 16) + (t2 << 16); +@@ -3239,36 +3239,36 @@ void mlib_c_ImageLookUpSI_U8_S16(const m + res2 = (t0 << 16) + (t1 >> 16); + res3 = (t1 << 16) + (t2 >> 16); + res4 = (t2 << 16) + (t3 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res1; + da[1] = res2; + da[2] = res3; + da[3] = res4; + da += 4; + dp = (mlib_u16 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[0] = (mlib_u16) (t3 >> 16); + #else + dp[0] = (mlib_u16) t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + if ((size & 1) == 0) { + t0 = tab[2 * sa[0]]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[2] = (mlib_u16) (t0 >> 16); + dp[1] = (mlib_u16) t0; + #else + dp[1] = (mlib_u16) (t0 >> 16); + dp[2] = (mlib_u16) t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + t0 = tab[2 * sa[0] + 1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[4] = (mlib_u16) (t0 >> 16); + dp[3] = (mlib_u16) t0; + #else + dp[3] = (mlib_u16) (t0 >> 16); + dp[4] = (mlib_u16) t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -3439,7 +3439,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 8, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); +@@ -3449,12 +3449,12 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); +@@ -3464,7 +3464,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[4] = t0; + dp[5] = t1; +@@ -3472,7 +3472,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + dp[7] = t3; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); +@@ -3482,12 +3482,12 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); +@@ -3497,7 +3497,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; +@@ -3545,7 +3545,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 12, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +@@ -3559,14 +3559,14 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; + dp[4] = t4; + dp[5] = t5; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +@@ -3580,7 +3580,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[6] = t0; + dp[7] = t1; +@@ -3590,7 +3590,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + dp[11] = t5; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +@@ -3604,14 +3604,14 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; + dp[4] = t4; + dp[5] = t5; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +@@ -3625,7 +3625,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[6] = t0; + dp[7] = t1; + dp[8] = t2; +@@ -3678,7 +3678,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 16, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +@@ -3688,12 +3688,12 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 22) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); +@@ -3703,12 +3703,12 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; + dp[7] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +@@ -3718,12 +3718,12 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 6) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[8] = t0; + dp[9] = t1; + dp[10] = t2; + dp[11] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); +@@ -3733,7 +3733,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[12] = t0; + dp[13] = t1; +@@ -3741,7 +3741,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + dp[15] = t3; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +@@ -3751,12 +3751,12 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 22) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); +@@ -3766,12 +3766,12 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; + dp[7] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +@@ -3781,12 +3781,12 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 6) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[8] = t0; + dp[9] = t1; + dp[10] = t2; + dp[11] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); +@@ -3796,7 +3796,7 @@ void mlib_c_ImageLookUpSI_U8_S32(const m + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[12] = t0; + dp[13] = t1; + dp[14] = t2; +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_image.h ./jdk/src/share/native/sun/awt/medialib/mlib_image.h +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_image.h 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_image.h 2009-05-04 17:37:16.000000000 -0400 +@@ -27,6 +27,11 @@ + #ifndef MLIB_IMAGE_H + #define MLIB_IMAGE_H + ++#ifdef __OpenBSD__ ++#include ++#endif ++#include ++ + #include + #include + #include +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_sys.c ./jdk/src/share/native/sun/awt/medialib/mlib_sys.c +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2009-05-04 17:37:16.000000000 -0400 +@@ -26,9 +26,15 @@ + + #include + #include ++#ifdef _ALLBSD_SOURCE ++#include ++#endif + #include + #include + #include "mlib_SysMath.h" ++#if defined(_ALLBSD_SOURCE) ++#include ++#endif + + /***************************************************************/ + +@@ -86,7 +92,12 @@ void *__mlib_malloc(mlib_u32 size) + * alignment. -- from stdlib.h of MS VC++5.0. + */ + return (void *) malloc(size); +-#else /* _MSC_VER */ ++#elif defined(__FreeBSD__) && (__FreeBSD_version >= 700013) ++ void *ret; ++ return posix_memalign(&ret, 8, size) ? NULL : ret; ++#elif defined(_ALLBSD_SOURCE) ++ return valloc(size); ++#else + return (void *) memalign(8, size); + #endif /* _MSC_VER */ + } +diff -upr ../orig/jdk/src/share/native/sun/awt/medialib/mlib_types.h ./jdk/src/share/native/sun/awt/medialib/mlib_types.h +--- ../orig/jdk/src/share/native/sun/awt/medialib/mlib_types.h 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_types.h 2009-05-04 17:37:16.000000000 -0400 +@@ -59,7 +59,10 @@ typedef double mlib_d64; + + #if defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__GNUC__) + +-#if defined(__linux__) ++#if defined(_ALLBSD_SOURCE) ++#include /* for ptrdiff_t */ ++#include /* for uintptr_t */ ++#elif defined(__linux__) + #include /* for uintptr_t */ + #include /* for ptrdiff_t */ + #else +diff -upr ../orig/jdk/src/share/native/sun/font/AccelGlyphCache.c ./jdk/src/share/native/sun/font/AccelGlyphCache.c +--- ../orig/jdk/src/share/native/sun/font/AccelGlyphCache.c 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/font/AccelGlyphCache.c 2009-05-04 17:37:16.000000000 -0400 +@@ -23,7 +23,11 @@ + * have any questions. + */ + ++#ifdef _ALLBSD_SOURCE ++#include ++#else + #include ++#endif + #include "jni.h" + #include "AccelGlyphCache.h" + #include "Trace.h" +diff -upr ../orig/jdk/src/share/native/sun/font/DrawGlyphList.c ./jdk/src/share/native/sun/font/DrawGlyphList.c +--- ../orig/jdk/src/share/native/sun/font/DrawGlyphList.c 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/font/DrawGlyphList.c 2009-05-04 17:37:16.000000000 -0400 +@@ -26,7 +26,11 @@ + #include "jlong.h" + #include "math.h" + #include "string.h" ++#ifdef _ALLBSD_SOURCE ++#include "stdlib.h" ++#else + #include "malloc.h" ++#endif + #include "sunfontids.h" + #include "fontscalerdefs.h" + #include "glyphblitting.h" +diff -upr ../orig/jdk/src/share/native/sun/font/sunFont.c ./jdk/src/share/native/sun/font/sunFont.c +--- ../orig/jdk/src/share/native/sun/font/sunFont.c 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/font/sunFont.c 2009-05-04 17:37:16.000000000 -0400 +@@ -24,7 +24,9 @@ + */ + + #include "stdlib.h" ++#ifndef _ALLBSD_SOURCE + #include "malloc.h" ++#endif + #include "string.h" + #include "gdefs.h" + #include "jlong.h" +diff -upr ../orig/jdk/src/share/native/sun/java2d/SurfaceData.c ./jdk/src/share/native/sun/java2d/SurfaceData.c +--- ../orig/jdk/src/share/native/sun/java2d/SurfaceData.c 2009-01-27 15:45:46.000000000 -0500 ++++ ./jdk/src/share/native/sun/java2d/SurfaceData.c 2009-05-04 17:37:16.000000000 -0400 +@@ -28,7 +28,11 @@ + #include "jni_util.h" + #include "Disposer.h" + ++#ifdef _ALLBSD_SOURCE ++#include ++#else + #include "malloc.h" ++#endif + #include "string.h" + + /** +diff -upr ../orig/jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h ./jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h +--- ../orig/jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2009-01-27 15:45:47.000000000 -0500 ++++ ./jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2009-05-04 17:37:17.000000000 -0400 +@@ -26,6 +26,9 @@ + #ifndef OGLFuncs_h_Included + #define OGLFuncs_h_Included + ++#ifdef _ALLBSD_SOURCE ++#include ++#endif + #include "jni.h" + #include "J2D_GL/gl.h" + #include "J2D_GL/glext.h" +diff -upr ../orig/jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c ./jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c +--- ../orig/jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c 2009-01-27 15:45:47.000000000 -0500 ++++ ./jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c 2009-05-04 17:37:17.000000000 -0400 +@@ -25,7 +25,11 @@ + + #ifndef HEADLESS + ++#ifdef _ALLBSD_SOURCE ++#include ++#else + #include ++#endif + + #include "sun_java2d_pipe_BufferedOpCodes.h" + +diff -upr ../orig/jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c ./jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c +--- ../orig/jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2009-01-27 15:45:47.000000000 -0500 ++++ ./jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2009-05-04 17:37:17.000000000 -0400 +@@ -25,7 +25,11 @@ + + #ifndef HEADLESS + ++#ifdef _ALLBSD_SOURCE ++#include ++#else + #include ++#endif + #include + #include + +diff -upr ../orig/jdk/src/share/transport/socket/socketTransport.c ./jdk/src/share/transport/socket/socketTransport.c +--- ../orig/jdk/src/share/transport/socket/socketTransport.c 2009-01-27 15:45:48.000000000 -0500 ++++ ./jdk/src/share/transport/socket/socketTransport.c 2009-05-04 17:37:17.000000000 -0400 +@@ -65,6 +65,9 @@ static jdwpTransportEnv single_env = (jd + #define HEADER_SIZE 11 + #define MAX_DATA_SIZE 1000 + ++static jint recv_fully(int, char *, int); ++static jint send_fully(int, char *, int); ++ + /* + * Record the last error for this thread. + */ +@@ -153,7 +156,7 @@ handshake(int fd, jlong timeout) { + } + buf = b; + buf += received; +- n = dbgsysRecv(fd, buf, strlen(hello)-received, 0); ++ n = recv_fully(fd, buf, strlen(hello)-received); + if (n == 0) { + setLastError(0, "handshake failed - connection prematurally closed"); + return JDWPTRANSPORT_ERROR_IO_ERROR; +@@ -179,7 +182,7 @@ handshake(int fd, jlong timeout) { + } + } + +- if (dbgsysSend(fd, hello, strlen(hello), 0) != (int)strlen(hello)) { ++ if (send_fully(fd, hello, strlen(hello)) != (int)strlen(hello)) { + RETURN_IO_ERROR("send failed during handshake"); + } + return JDWPTRANSPORT_ERROR_NONE; +@@ -554,19 +557,19 @@ socketTransport_writePacket(jdwpTranspor + /* Do one send for short packets, two for longer ones */ + if (data_len <= MAX_DATA_SIZE) { + memcpy(header + HEADER_SIZE, data, data_len); +- if (dbgsysSend(socketFD, (char *)&header, HEADER_SIZE + data_len, 0) != ++ if (send_fully(socketFD, (char *)&header, HEADER_SIZE + data_len) != + HEADER_SIZE + data_len) { + RETURN_IO_ERROR("send failed"); + } + } else { + memcpy(header + HEADER_SIZE, data, MAX_DATA_SIZE); +- if (dbgsysSend(socketFD, (char *)&header, HEADER_SIZE + MAX_DATA_SIZE, 0) != ++ if (send_fully(socketFD, (char *)&header, HEADER_SIZE + MAX_DATA_SIZE) != + HEADER_SIZE + MAX_DATA_SIZE) { + RETURN_IO_ERROR("send failed"); + } + /* Send the remaining data bytes right out of the data area. */ +- if (dbgsysSend(socketFD, (char *)data + MAX_DATA_SIZE, +- data_len - MAX_DATA_SIZE, 0) != data_len - MAX_DATA_SIZE) { ++ if (send_fully(socketFD, (char *)data + MAX_DATA_SIZE, ++ data_len - MAX_DATA_SIZE) != data_len - MAX_DATA_SIZE) { + RETURN_IO_ERROR("send failed"); + } + } +@@ -574,13 +577,33 @@ socketTransport_writePacket(jdwpTranspor + return JDWPTRANSPORT_ERROR_NONE; + } + +-static jint ++jint + recv_fully(int f, char *buf, int len) + { + int nbytes = 0; + while (nbytes < len) { + int res = dbgsysRecv(f, buf + nbytes, len - nbytes, 0); + if (res < 0) { ++ if (errno == EINTR) ++ continue; ++ return res; ++ } else if (res == 0) { ++ break; /* eof, return nbytes which is less than len */ ++ } ++ nbytes += res; ++ } ++ return nbytes; ++} ++ ++jint ++send_fully(int f, char *buf, int len) ++{ ++ int nbytes = 0; ++ while (nbytes < len) { ++ int res = dbgsysSend(f, buf + nbytes, len - nbytes, 0); ++ if (res < 0) { ++ if (errno == EINTR) ++ continue; + return res; + } else if (res == 0) { + break; /* eof, return nbytes which is less than len */ +diff -upr ../orig/jdk/src/solaris/back/exec_md.c ./jdk/src/solaris/back/exec_md.c +--- ../orig/jdk/src/solaris/back/exec_md.c 2009-01-27 15:45:48.000000000 -0500 ++++ ./jdk/src/solaris/back/exec_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -30,7 +30,7 @@ + #include "sys.h" + #include "util.h" + +-#ifdef LINUX ++#if defined(LINUX) || defined(_ALLBSD_SOURCE) + /* Linux */ + #define FORK() fork() + #else +diff -upr ../orig/jdk/src/solaris/back/linker_md.c ./jdk/src/solaris/back/linker_md.c +--- ../orig/jdk/src/solaris/back/linker_md.c 2009-01-27 15:45:48.000000000 -0500 ++++ ./jdk/src/solaris/back/linker_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -48,6 +48,12 @@ + #include "threads_md.h" + #endif + ++#ifdef __APPLE__ ++#define LIB_SUFFIX "dylib" ++#else ++#define LIB_SUFFIX "so" ++#endif ++ + /* + * create a string for the JNI native function name by adding the + * appropriate decorations. +@@ -77,9 +83,9 @@ dbgsysBuildLibName(char *holder, int hol + } + + if (pnamelen == 0) { +- (void)snprintf(holder, holderlen, "lib%s.so", fname); ++ (void)snprintf(holder, holderlen, "lib%s." LIB_SUFFIX, fname); + } else { +- (void)snprintf(holder, holderlen, "%s/lib%s.so", pname, fname); ++ (void)snprintf(holder, holderlen, "%s/lib%s." LIB_SUFFIX, pname, fname); + } + } + +diff -upr ../orig/jdk/src/solaris/back/util_md.h ./jdk/src/solaris/back/util_md.h +--- ../orig/jdk/src/solaris/back/util_md.h 2009-01-27 15:45:48.000000000 -0500 ++++ ./jdk/src/solaris/back/util_md.h 2009-05-04 17:37:17.000000000 -0400 +@@ -28,6 +28,7 @@ + + #include + #include ++#include + + #ifdef _LP64 + typedef unsigned long UNSIGNED_JLONG; +@@ -43,7 +44,7 @@ typedef unsigned long UNSIGNED_JINT; + + /* On little endian machines, convert java big endian numbers. */ + +-#if defined(_LITTLE_ENDIAN) ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define HOST_TO_JAVA_CHAR(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff))) + #define HOST_TO_JAVA_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff))) +diff -upr ../orig/jdk/src/solaris/bin/java_md.c ./jdk/src/solaris/bin/java_md.c +--- ../orig/jdk/src/solaris/bin/java_md.c 2009-01-27 15:45:48.000000000 -0500 ++++ ./jdk/src/solaris/bin/java_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -24,6 +24,7 @@ + */ + + #include "java.h" ++#include "jvm_md.h" + #include + #include + #include +@@ -34,17 +35,33 @@ + #include + #include + #include ++#if defined(_ALLBSD_SOURCE) ++#include ++#endif ++#ifndef _SC_PHYS_PAGES ++#include ++#endif ++ + #include "manifest_info.h" + #include "version_comp.h" + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #else + #include + #endif + ++#ifdef __APPLE__ ++#define JVM_DLL "libjvm.dylib" ++#define JAVA_DLL "libjava.dylib" ++/* FALLBACK avoids naming conflicts with system libraries ++ * (eg, ImageIO's libJPEG.dylib) */ ++#define LD_LIBRARY_PATH "DYLD_FALLBACK_LIBRARY_PATH" ++#else + #define JVM_DLL "libjvm.so" + #define JAVA_DLL "libjava.so" ++#define LD_LIBRARY_PATH "LD_LIBRARY_PATH" ++#endif + + /* + * If a processor / os combination has the ability to run binaries of +@@ -75,14 +92,31 @@ + #endif + + /* pointer to environment */ ++#ifdef __APPLE__ ++#include ++#define environ (*_NSGetEnviron()) ++#else + extern char **environ; ++#endif + + /* + * A collection of useful strings. One should think of these as #define + * entries, but actual strings can be more efficient (with many compilers). + */ +-#ifdef __linux__ +-static const char *system_dir = "/usr/java"; ++#if defined(__FreeBSD__) ++static const char *system_dir = "/usr/local/openjdk6"; ++static const char *user_dir = "/java"; ++#elif defined(__NetBSD__) ++static const char *system_dir = "/usr/local/openjdk6"; ++static const char *user_dir = "/java"; ++#elif defined(__OpenBSD__) ++static const char *system_dir = "/usr/local/openjdk6"; ++static const char *user_dir = "/java"; ++#elif defined(__APPLE__) ++static const char *system_dir = "/usr/local/openjdk6"; ++static const char *user_dir = "/java"; ++#elif defined(__linux__) ++static const char *system_dir = "/usr/local/java"; + static const char *user_dir = "/java"; + #else /* Solaris */ + static const char *system_dir = "/usr/jdk"; +@@ -404,10 +438,10 @@ CreateExecutionEnvironment(int *_argcp, + * If not on Solaris, assume only a single LD_LIBRARY_PATH + * variable. + */ +- runpath = getenv("LD_LIBRARY_PATH"); ++ runpath = getenv(LD_LIBRARY_PATH); + #endif /* __sun */ + +-#ifdef __linux ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + /* + * On linux, if a binary is running as sgid or suid, glibc sets + * LD_LIBRARY_PATH to the empty string for security purposes. (In +@@ -431,7 +465,7 @@ CreateExecutionEnvironment(int *_argcp, + new_runpath = JLI_MemAlloc( ((runpath!=NULL)?strlen(runpath):0) + + 2*strlen(jrepath) + 2*strlen(arch) + + strlen(jvmpath) + 52); +- newpath = new_runpath + strlen("LD_LIBRARY_PATH="); ++ newpath = new_runpath + strlen(LD_LIBRARY_PATH "="); + + + /* +@@ -446,7 +480,7 @@ CreateExecutionEnvironment(int *_argcp, + + /* jvmpath, ((running != wanted)?((wanted==64)?"/"LIBARCH64NAME:"/.."):""), */ + +- sprintf(new_runpath, "LD_LIBRARY_PATH=" ++ sprintf(new_runpath, LD_LIBRARY_PATH "=" + "%s:" + "%s/lib/%s:" + "%s/../lib/%s", +@@ -977,6 +1011,7 @@ jboolean RemovableMachineDependentOption + /* Compute physical memory by asking the OS */ + uint64_t + physical_memory(void) { ++#ifdef _SC_PHYS_PAGES + const uint64_t pages = (uint64_t) sysconf(_SC_PHYS_PAGES); + const uint64_t page_size = (uint64_t) sysconf(_SC_PAGESIZE); + const uint64_t result = pages * page_size; +@@ -988,6 +1023,28 @@ physical_memory(void) { + " physical memory: " UINT64_FORMAT " (%.3fGB)\n", + pages, page_size, result, result / (double) GB); + } ++#else ++#ifdef HW_PHYSMEM64 ++ int64_t physmem; ++ int name[2] = { CTL_HW, HW_PHYSMEM64 }; ++#else ++ unsigned long physmem; ++ int name[2] = { CTL_HW, HW_PHYSMEM }; ++#endif ++ size_t physmem_len = sizeof(physmem); ++ uint64_t result; ++# define UINT64_FORMAT "%" PRIu64 ++ ++ if (sysctl(name, 2, &physmem, &physmem_len, NULL, 0) == -1) ++ physmem = 256 * MB; ++ ++ result = (uint64_t)physmem; ++ ++ if (_launcher_debug) { ++ printf("physical memory: " UINT64_FORMAT " (%.3fGB)\n", ++ result, result / (double) GB); ++ } ++#endif + return result; + } + +@@ -1083,7 +1140,7 @@ get_cpuid(uint32_t arg, + + #endif /* __sun && i586 */ + +-#if defined(__linux__) && defined(i586) ++#if (defined(__linux__) || defined(_ALLBSD_SOURCE)) && defined(i586) + + /* + * A utility method for asking the CPU about itself. +@@ -1692,9 +1749,23 @@ UnsetEnv(char *name) + return(borrowed_unsetenv(name)); + } + ++#if defined(_ALLBSD_SOURCE) ++/* ++ * BSD's implementation of CounterGet() ++ */ ++int64_t ++CounterGet() ++{ ++ struct timeval tv; ++ gettimeofday(&tv, NULL); ++ return (tv.tv_sec * 1000) + tv.tv_usec; ++} ++#endif ++ ++ + /* --- Splash Screen shared library support --- */ + +-static const char* SPLASHSCREEN_SO = "libsplashscreen.so"; ++static const char* SPLASHSCREEN_SO = JNI_LIB_NAME("splashscreen"); + + static void* hSplashLib = NULL; + +@@ -1722,13 +1793,15 @@ jlong_format_specifier() { + return "%lld"; + } + ++ ++ + /* + * Block current thread and continue execution in a new thread + */ + int +-ContinueInNewThread(int (JNICALL *continuation)(void *), jlong stack_size, void * args, int ret) { ++ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void * args) { + int rslt; +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + pthread_t tid; + pthread_attr_t attr; + pthread_attr_init(&attr); +@@ -1765,13 +1838,11 @@ ContinueInNewThread(int (JNICALL *contin + rslt = continuation(args); + } + #endif +- /* If the caller has deemed there is an error we +- * simply return that, otherwise we return the value of +- * the callee +- */ +- return (ret != 0) ? ret : rslt; ++ return rslt; + } + ++ ++ + /* Coarse estimation of number of digits assuming the worst case is a 64-bit pid. */ + #define MAX_PID_STR_SZ 20 + +diff -upr ../orig/jdk/src/solaris/bin/java_md.h ./jdk/src/solaris/bin/java_md.h +--- ../orig/jdk/src/solaris/bin/java_md.h 2009-01-27 15:45:48.000000000 -0500 ++++ ./jdk/src/solaris/bin/java_md.h 2009-05-04 17:37:17.000000000 -0400 +@@ -58,10 +58,14 @@ + #include + #define CounterGet() (gethrtime()/1000) + #define Counter2Micros(counts) (counts) ++#elif defined(_ALLBSD_SOURCE) ++/* CounterGet() is implemented in java_md.c */ ++int64_t CounterGet(void); ++#define Counter2Micros(counts) (counts) + #else + #define CounterGet() (0) + #define Counter2Micros(counts) (1) +-#endif /* HAVE_GETHRTIME */ ++#endif /* HAVE_GETHRTIME || _ALLBSD_SOURCE */ + + /* + * Function prototypes. +diff -upr ../orig/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java ./jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java +--- ../orig/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2009-01-27 15:45:48.000000000 -0500 ++++ ./jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2009-05-04 17:37:17.000000000 -0400 +@@ -403,7 +403,7 @@ public class X11GraphicsEnvironment + if (fontID != null) { + fileName = (String)fontNameMap.get(fontID); + /* On Linux check for the Lucida Oblique fonts */ +- if (fileName == null && isLinux && !isOpenJDK()) { ++ if (fileName == null && isLinuxOrBSD && !isOpenJDK()) { + if (oblmap == null) { + initObliqueLucidaFontMap(); + } +@@ -639,7 +639,7 @@ public class X11GraphicsEnvironment + if (fontConfigDirs == null) { + return; + } +- if (isLinux) { ++ if (isLinuxOrBSD) { + fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts"); + } + fontdirs = (String[])fontConfigDirs.toArray(new String[0]); +diff -upr ../orig/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java ./jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java +--- ../orig/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2009-05-04 17:37:17.000000000 -0400 +@@ -119,7 +119,11 @@ public class UnixPrintServiceLookup exte + } + + static boolean isBSD() { +- return osname.equals("Linux"); ++ return (osname.equals("Linux") || ++ osname.equals("FreeBSD") || ++ osname.equals("Darwin") || ++ osname.equals("NetBSD") || ++ osname.equals("OpenBSD")); + } + + static final int UNINITIALIZED = -1; +diff -upr ../orig/jdk/src/solaris/classes/sun/tools/attach/BsdAttachProvider.java ./jdk/src/solaris/classes/sun/tools/attach/BsdAttachProvider.java +--- ../orig/jdk/src/solaris/classes/sun/tools/attach/BsdAttachProvider.java 2009-05-04 18:32:16.000000000 -0400 ++++ ./jdk/src/solaris/classes/sun/tools/attach/BsdAttachProvider.java 2009-05-04 17:37:15.000000000 -0400 +@@ -54,31 +54,13 @@ public class BsdAttachProvider extends H + public VirtualMachine attachVirtualMachine(String vmid) + throws AttachNotSupportedException, IOException + { +- checkAttachPermission(); +- +- // AttachNotSupportedException will be thrown if the target VM can be determined +- // to be not attachable. +- testAttachable(vmid); +- +- return new BsdVirtualMachine(this, vmid); ++ throw new AttachNotSupportedException("Attach not yet supported on BSD"); + } + + public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) + throws AttachNotSupportedException, IOException + { +- if (vmd.provider() != this) { +- throw new AttachNotSupportedException("provider mismatch"); +- } +- // To avoid re-checking if the VM if attachable, we check if the descriptor +- // is for a hotspot VM - these descriptors are created by the listVirtualMachines +- // implementation which only returns a list of attachable VMs. +- if (vmd instanceof HotSpotVirtualMachineDescriptor) { +- assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); +- checkAttachPermission(); +- return new BsdVirtualMachine(this, vmd.id()); +- } else { +- return attachVirtualMachine(vmd.id()); +- } ++ throw new AttachNotSupportedException("Attach not yet supported on BSD"); + } + + } +diff -upr ../orig/jdk/src/solaris/demo/jvmti/hprof/hprof_md.c ./jdk/src/solaris/demo/jvmti/hprof/hprof_md.c +--- ../orig/jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -33,7 +33,7 @@ + #include + #include + +-#ifndef LINUX ++#if !defined(LINUX) && !defined(_ALLBSD_SOURCE) + #include + #endif + +@@ -76,7 +76,7 @@ md_sleep(unsigned seconds) + void + md_init(void) + { +-#ifdef LINUX ++#if defined(LINUX) || defined(_ALLBSD_SOURCE) + /* No Hi-Res timer option? */ + #else + if ( gdata->micro_state_accounting ) { +@@ -238,7 +238,7 @@ md_timeofday(void) + jlong + md_get_microsecs(void) + { +-#ifdef LINUX ++#if defined(LINUX) || defined(_ALLBSD_SOURCE) + return (jlong)(md_timeofday() * (jlong)1000); /* Milli to micro */ + #else + return (jlong)(gethrtime()/(hrtime_t)1000); /* Nano seconds to micro seconds */ +@@ -256,7 +256,7 @@ md_get_timemillis(void) + jlong + md_get_thread_cpu_timemillis(void) + { +-#ifdef LINUX ++#if defined(LINUX) || defined(_ALLBSD_SOURCE) + return md_timeofday(); + #else + return (jlong)(gethrvtime()/1000); /* Nano seconds to milli seconds */ +@@ -271,7 +271,7 @@ md_get_prelude_path(char *path, int path + Dl_info dlinfo; + + libdir[0] = 0; +-#ifdef LINUX ++#if defined(LINUX) || defined(_ALLBSD_SOURCE) + addr = (void*)&Agent_OnLoad; + #else + /* Just using &Agent_OnLoad will get the first external symbol with +diff -upr ../orig/jdk/src/solaris/hpi/include/interrupt.h ./jdk/src/solaris/hpi/include/interrupt.h +--- ../orig/jdk/src/solaris/hpi/include/interrupt.h 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/hpi/include/interrupt.h 2009-05-04 17:37:17.000000000 -0400 +@@ -75,7 +75,7 @@ void intrDispatch(int interrupt, void *s + * N_INTERRUPTS - The number of interrupt channels. These + * are numbered from 0 to (N_INTERRUPTS - 1). + */ +-#ifdef __linux__ ++#if defined(__linux__) || defined(__FreeBSD__) + #define N_INTERRUPTS NSIG /* 0 to NSIG - 1*/ + #else + #define N_INTERRUPTS 32 /* 0 to 31 */ +@@ -111,6 +111,10 @@ void intrInitMD(void); + #error signal.h has not been included? + #endif + ++#if defined(__FreeBSD__) && !defined(SA_SIGINFO) ++#error signal.h has not been included? ++#endif ++ + #ifdef SA_SIGINFO + /* Thread implementation dependent interrupt dispatcher. */ + void intrDispatchMD(int sig, siginfo_t *info, void *uc); +diff -upr ../orig/jdk/src/solaris/hpi/include/largefile.h ./jdk/src/solaris/hpi/include/largefile.h +--- ../orig/jdk/src/solaris/hpi/include/largefile.h 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/hpi/include/largefile.h 2009-05-04 17:37:17.000000000 -0400 +@@ -34,6 +34,10 @@ + #include "largefile_linux.h" + #endif + ++#ifdef _ALLBSD_SOURCE ++#include "largefile_bsd.h" ++#endif ++ + /* + * Prototypes for wrappers that we define. These wrapper functions + * are low-level I/O routines that will use 64 bit versions if +diff -upr ../orig/jdk/src/solaris/hpi/include/largefile_bsd.h ./jdk/src/solaris/hpi/include/largefile_bsd.h +--- ../orig/jdk/src/solaris/hpi/include/largefile_bsd.h 2009-05-04 18:32:16.000000000 -0400 ++++ ./jdk/src/solaris/hpi/include/largefile_bsd.h 2009-05-04 17:37:15.000000000 -0400 +@@ -23,14 +23,28 @@ + * have any questions. + */ + +-#ifndef _JAVASOFT_LINUX_LARGEFILE_SUPPORT_H_ +-#define _JAVASOFT_LINUX_LARGEFILE_SUPPORT_H_ +- +-/* +- * For building on glibc-2.0 we need to define stat64 here. +- */ ++#ifndef _JAVASOFT_BSD_LARGEFILE_SUPPORT_H_ ++#define _JAVASOFT_BSD_LARGEFILE_SUPPORT_H_ + + #include + #include + +-#endif /* _JAVASOFT_LINUX_LARGEFILE_SUPPORT_H_ */ ++/* define compatibility macros */ ++#define off64_t off_t ++#define stat64 stat ++ ++#define F_SETLK64 F_SETLK ++#define F_SETLKW64 F_SETLKW ++ ++#define lseek64 lseek ++#define ftruncate64 ftruncate ++#define open64 open ++#define fstat64 fstat ++#define flock64 flock ++#define mmap64 mmap ++#define fdatasync fsync ++ ++#define pread64 pread ++#define pwrite64 pwrite ++ ++#endif /* _JAVASOFT_BSD_LARGEFILE_SUPPORT_H_ */ +diff -upr ../orig/jdk/src/solaris/hpi/native_threads/include/threads_md.h ./jdk/src/solaris/hpi/native_threads/include/threads_md.h +--- ../orig/jdk/src/solaris/hpi/native_threads/include/threads_md.h 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/hpi/native_threads/include/threads_md.h 2009-05-04 17:37:17.000000000 -0400 +@@ -36,6 +36,8 @@ + #define N_TRACED_REGS 12 + #elif i386 + #define N_TRACED_REGS 7 ++#elif i586 /* BSDNOTE: just in case */ ++#define N_TRACED_REGS 7 + #elif amd64 + #define N_TRACED_REGS 15 + #elif ppc +@@ -51,10 +53,12 @@ + #define N_TRACED_REGS 32 + #endif + ++#if !defined(_ALLBSD_SOURCE) + /* Turn on if we want all java threads to be bound tolwps */ + /* #define BOUND_THREADS */ + /* Use /proc soln to stop lwps in place of siglwp soln */ + #define PROCLWP ++#endif + + /* + * Thread C stack overflow check +@@ -132,7 +136,7 @@ struct sys_thread { + lwpid_t lwpid; + #endif + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + void *sp; + #else + unsigned long sp; /* sp at time of last (native) thread switch */ +@@ -186,12 +190,14 @@ struct sys_thread { + + #define SYS_THREAD_NULL ((sys_thread_t *) 0) + ++#if !defined(_ALLBSD_SOURCE) + /* + * following macro copied from sys/signal.h since inside #ifdef _KERNEL there. + */ + #ifndef sigmask + #define sigmask(n) ((unsigned int)1 << (((n) - 1) & (32 - 1))) + #endif ++#endif + + #ifdef __linux__ + extern thread_key_t intrJmpbufkey; +diff -upr ../orig/jdk/src/solaris/hpi/native_threads/src/condvar_md.c ./jdk/src/solaris/hpi/native_threads/src/condvar_md.c +--- ../orig/jdk/src/solaris/hpi/native_threads/src/condvar_md.c 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/hpi/native_threads/src/condvar_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -58,7 +58,7 @@ condvarDestroy(condvar_t *condvar) + { + int err; + +-#ifdef __linux__ ++#ifdef USE_PTHREADS + err = pthread_cond_destroy((cond_t *) &condvar->cond); + #else + err = cond_destroy((cond_t *) condvar); +diff -upr ../orig/jdk/src/solaris/hpi/native_threads/src/monitor_md.c ./jdk/src/solaris/hpi/native_threads/src/monitor_md.c +--- ../orig/jdk/src/solaris/hpi/native_threads/src/monitor_md.c 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/hpi/native_threads/src/monitor_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -147,7 +147,7 @@ sysMonitorEnter(sys_thread_t *self, sys_ + mid->monitor_owner = self; + mid->entry_count = 1; + return SYS_OK; +- } else if (err == EBUSY) { /* it's already locked */ ++ } else if (err == EBUSY || err == EDEADLK) { /* it's already locked */ + if (mid->monitor_owner == self) { + mid->entry_count++; + return SYS_OK; +diff -upr ../orig/jdk/src/solaris/hpi/native_threads/src/sys_api_td.c ./jdk/src/solaris/hpi/native_threads/src/sys_api_td.c +--- ../orig/jdk/src/solaris/hpi/native_threads/src/sys_api_td.c 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/hpi/native_threads/src/sys_api_td.c 2009-05-04 17:37:17.000000000 -0400 +@@ -39,6 +39,10 @@ + #include + #endif + ++#ifdef __OpenBSD__ ++#include ++#endif ++ + #include + #include + #include +@@ -57,6 +61,10 @@ + #error If there was no policy change, this could be a makefile error. + #endif + ++#if defined(_ALLBSD_SOURCE) && defined(NO_INTERRUPTIBLE_IO) ++#error If there was no policy change, this could be a makefile error. ++#endif ++ + #ifdef NO_INTERRUPTIBLE_IO + #undef CLOSEIO + #else +diff -upr ../orig/jdk/src/solaris/hpi/native_threads/src/threads_bsd.c ./jdk/src/solaris/hpi/native_threads/src/threads_bsd.c +--- ../orig/jdk/src/solaris/hpi/native_threads/src/threads_bsd.c 2009-05-04 18:32:16.000000000 -0400 ++++ ./jdk/src/solaris/hpi/native_threads/src/threads_bsd.c 2009-05-04 17:37:15.000000000 -0400 +@@ -23,79 +23,44 @@ + * have any questions. + */ + +-/* +- * Implementation of HPI that can not be expressed with POSIX threads. +- * Note that even if you are building with USE_PTHREADS, we have to +- * explicitly undef it here because pthread.h and thread.h can not be +- * included in the same file, and this file needs only thread.h. +- */ +-#undef USE_PTHREADS ++#ifdef __APPLE__ ++ ++/* We need the mach API, which must be be included before any other system includes. ++ * Additionally, java and mach both define thread_state_t, so temporarily redefine it. */ ++#define thread_state_t mach_thread_state_t ++#include ++#undef thread_state_t ++ ++#endif + + #include "hpi_impl.h" + #include "monitor_md.h" + #include "threads_md.h" + #include "np.h" + +-#include +-#include ++#include ++#include ++ ++#include ++#if defined(__FreeBSD__) || defined(__OpenBSD__) ++#include ++#endif ++#ifdef __NetBSD__ ++#include ++#define pthread_attr_get_np(a, b) 0 ++#define pthread_suspend_all_np() 0 ++#define pthread_resume_all_np() 0 ++#endif ++ ++#include ++#include + #include + #include + #include +-#include + #include + #include +-#include + #include + +-#include +-extern int syscall(int, ...); +- +- +-/* +- * Forward declarations. +- */ +-static int procfd; +-static void stop_lwps(); +-static void clear_onproc_flags(); +-static void restart_lwps(); +-static void MakeProcName(register char *procname, register pid_t pid); +-static void GC_msec_sleep(int n); +- +- +-/* +- * Make sure that we link against a verion of libthread that has at least +- * the bug fixes and the interface for getting the stack from threads that +- * aren't on LWPs. Otherwise we should exit with some informative message. +- */ +-extern ulong_t __gettsp(thread_t); +- +-static const char * gettspMessage = +-"You must install a Bsd patch to run the native threads version of the\n" +-"Java runtime. The green threads version will work without this patch.\n" +-"Please check the native threads release notes for more information.\n" +-"\n" +-"If you are embedding the VM in a native application, please make sure that\n" +-"the native application is linked with libthread.so (-lthread).\n" +-"\n" +-"Exiting.\n"; +- +-static void +-checkForCorrectLibthread() +-{ +- if (&__gettsp == 0) { +- fprintf(stderr, gettspMessage); +- exit(1); +- } +-} +-#ifdef __GNUC__ +-static void checkForCorrectLibthread() __attribute__((constructor)); +-#else +-#pragma init(checkForCorrectLibthread) +-#endif +- +-#pragma weak __gettsp +- +- + /* + * Suspend said thread. Used to implement java.lang.Thread.suspend(), + * which is deprecated. +@@ -103,10 +68,16 @@ static void checkForCorrectLibthread() _ + int + np_suspend(sys_thread_t *tid) + { +- return thr_suspend(tid->sys_thread); ++#ifdef __APPLE__ ++ if (thread_suspend(pthread_mach_thread_np(tid->sys_thread)) == KERN_SUCCESS) ++ return SYS_OK; ++ else ++ return SYS_ERR; ++#else ++ return pthread_suspend_np(tid->sys_thread); ++#endif + } + +- + /* + * Resume a suspended thread. Used to implement java.lang.Thread.resume(), + * which is deprecated. +@@ -114,7 +85,14 @@ np_suspend(sys_thread_t *tid) + int + np_continue(sys_thread_t *tid) + { +- return thr_continue(tid->sys_thread); ++#ifdef __APPLE__ ++ if (thread_resume(pthread_mach_thread_np(tid->sys_thread)) == KERN_SUCCESS) ++ return SYS_OK; ++ else ++ return SYS_ERR; ++#else ++ return pthread_resume_np(tid->sys_thread); ++#endif + } + + /* +@@ -127,26 +105,74 @@ void np_initialize_thread(sys_thread_t * + + + /* ++ * Internal helper function to get stack information about specified thread. ++ */ ++#ifdef __APPLE__ ++static int ++get_stackinfo(pthread_t tid, void **addr, long *sizep) ++{ ++ void *stacktop = pthread_get_stackaddr_np(tid); ++ *sizep = pthread_get_stacksize_np(tid); ++ *addr = stacktop - *sizep; ++ ++ return (SYS_OK); ++} ++#elif defined(__OpenBSD__) ++static int ++get_stackinfo(pthread_t tid, void **addr, long *sizep) ++{ ++ stack_t ss; ++ ++ if (pthread_stackseg_np(tid, &ss) == 0) { ++ *addr = (void *)(ss.ss_sp) - ss.ss_size; ++ *sizep = (long)(ss.ss_size); ++ return SYS_OK; ++ } else { ++ return SYS_ERR; /* pthreads_stackseg_np failed. */ ++ } ++} ++#else ++static int ++get_stackinfo(pthread_t tid, pthread_attr_t attr, void **addr, long *sizep) ++{ ++ size_t s; ++ void *p; ++ int ret = SYS_ERR; ++ ++ if (pthread_attr_get_np(tid, &attr) != 0) ++ goto err; ++ if (pthread_attr_getstackaddr(&attr, &p) != 0) ++ goto err; ++ if (pthread_attr_getstacksize(&attr, &s) != 0) ++ goto err; ++ *addr = p; ++ *sizep = s; ++ ret = SYS_OK; ++err: ++ ++ return (ret); ++} ++#endif ++ ++/* + * Get the stack start address, and max stack size for the current thread. + */ + int + np_stackinfo(void **addr, long *size) + { +- stack_t stkseg; ++#if defined(__OpenBSD__) || defined(__APPLE__) ++ return(get_stackinfo(pthread_self(), addr, size)); ++#else ++ pthread_attr_t attr; ++ int ret = SYS_ERR; + +- if (thr_stksegment(&stkseg) == 0) { +- *addr = (void *)(stkseg.ss_sp); +- if (thr_main()) { +- struct rlimit r; +- getrlimit(RLIMIT_STACK, &r); +- *size = (long)r.rlim_cur; +- } else { +- *size = (long)(stkseg.ss_size); +- } +- return SYS_OK; +- } else { +- return SYS_ERR; /* thr_stksegment failed. */ ++ if (pthread_attr_init(&attr) == 0) { ++ ret = get_stackinfo(pthread_self(), attr, addr, size); ++ pthread_attr_destroy(&attr); + } ++ ++ return (ret); ++#endif + } + + /* +@@ -155,309 +181,194 @@ np_stackinfo(void **addr, long *size) + void + np_profiler_init(sys_thread_t *tid) + { +- tid->lwp_id = _lwp_self(); + } + + int + np_profiler_suspend(sys_thread_t *tid) + { +- return _lwp_suspend(tid->lwp_id); ++ return np_suspend(tid); + } + + int + np_profiler_continue(sys_thread_t *tid) + { +- return _lwp_continue(tid->lwp_id); ++ return np_continue(tid); + } + + bool_t + np_profiler_thread_is_running(sys_thread_t *tid) + { +- unsigned long sum = 0; +- int i; +- prstatus_t lwpstatus; +- int lwpfd; +- int res; +- +- lwpfd = syscall(SYS_ioctl, procfd, PIOCOPENLWP, &(tid->lwp_id)); +- sysAssert(lwpfd >= 0); +- +- retry: +- res = syscall(SYS_ioctl, lwpfd, PIOCSTATUS, &lwpstatus); +- sysAssert(res >= 0); +- +- if (!(lwpstatus.pr_flags & PR_STOPPED)) { +- GC_msec_sleep(1); +- goto retry; +- } +- +- close(lwpfd); +- +-#if defined(sparc) +- sum += lwpstatus.pr_reg[R_SP]; +- sum += lwpstatus.pr_reg[R_PC]; +- +- sum += lwpstatus.pr_reg[R_G1]; +- sum += lwpstatus.pr_reg[R_G2]; +- sum += lwpstatus.pr_reg[R_G3]; +- sum += lwpstatus.pr_reg[R_G4]; +- +- sum += lwpstatus.pr_reg[R_O0]; +- sum += lwpstatus.pr_reg[R_O1]; +- sum += lwpstatus.pr_reg[R_O2]; +- sum += lwpstatus.pr_reg[R_O3]; +- sum += lwpstatus.pr_reg[R_O4]; +- sum += lwpstatus.pr_reg[R_O5]; +- +- sum += lwpstatus.pr_reg[R_I0]; +- sum += lwpstatus.pr_reg[R_I1]; +- sum += lwpstatus.pr_reg[R_I2]; +- sum += lwpstatus.pr_reg[R_I3]; +- sum += lwpstatus.pr_reg[R_I4]; +- sum += lwpstatus.pr_reg[R_I5]; +- sum += lwpstatus.pr_reg[R_I6]; +- sum += lwpstatus.pr_reg[R_I7]; +- +- sum += lwpstatus.pr_reg[R_L0]; +- sum += lwpstatus.pr_reg[R_L1]; +- sum += lwpstatus.pr_reg[R_L2]; +- sum += lwpstatus.pr_reg[R_L3]; +- sum += lwpstatus.pr_reg[R_L4]; +- sum += lwpstatus.pr_reg[R_L5]; +- sum += lwpstatus.pr_reg[R_L6]; +- sum += lwpstatus.pr_reg[R_L7]; +-#elif defined(amd64) +- sum += lwpstatus.pr_reg[REG_RIP]; +- sum += lwpstatus.pr_reg[REG_RSP]; +- +- sum += lwpstatus.pr_reg[REG_RAX]; +- sum += lwpstatus.pr_reg[REG_RCX]; +- sum += lwpstatus.pr_reg[REG_RDX]; +- sum += lwpstatus.pr_reg[REG_RBX]; +- sum += lwpstatus.pr_reg[REG_RBP]; +- sum += lwpstatus.pr_reg[REG_RSI]; +- sum += lwpstatus.pr_reg[REG_RDI]; +- +- sum += lwpstatus.pr_reg[REG_R8]; +- sum += lwpstatus.pr_reg[REG_R9]; +- sum += lwpstatus.pr_reg[REG_R10]; +- sum += lwpstatus.pr_reg[REG_R11]; +- sum += lwpstatus.pr_reg[REG_R12]; +- sum += lwpstatus.pr_reg[REG_R13]; +- sum += lwpstatus.pr_reg[REG_R14]; +- sum += lwpstatus.pr_reg[REG_R15]; +-#elif defined(i386) +- sum += lwpstatus.pr_reg[EIP]; +- sum += lwpstatus.pr_reg[UESP]; +- +- sum += lwpstatus.pr_reg[EAX]; +- sum += lwpstatus.pr_reg[ECX]; +- sum += lwpstatus.pr_reg[EDX]; +- sum += lwpstatus.pr_reg[EBX]; +- sum += lwpstatus.pr_reg[EBP]; +- sum += lwpstatus.pr_reg[ESI]; +- sum += lwpstatus.pr_reg[EDI]; +-#endif +- +- if (tid->last_sum == sum) { +- return FALSE; +- } +- tid->last_sum = sum; +- + return TRUE; + } + + +-/* +- * If building for Bsd native threads, open up the /proc file +- * descriptor to be used when doing GC. The open is done at JVM start-up so +- * as to reserve this fd, to prevent GC stall due to exhausted fds. This fd +- * will never be closed, and will alwyas be present. +- */ + int + np_initialize() + { +- char procname[32]; +- MakeProcName(procname, getpid()); +- if ((procfd = open(procname, O_RDONLY, 0)) < 0) { +- VM_CALL(jio_fprintf)(stderr, "Cannot open %s for GC", procname); +- return SYS_ERR; +- } + return SYS_OK; + } + +-static void +-MakeProcName(register char *procname, register pid_t pid) +-{ +- register char * s; ++/* prototypes */ + +- (void) strcpy(procname, "/proc/00000"); +- s = procname + strlen(procname); +- while (pid) { +- *--s = pid%10 + '0'; +- pid /= 10; +- } +-} ++static void record_thread_regs(); + + /* + * Suspend all other threads, and record their contexts (register + * set or stack pointer) into the sys_thread structure, so that a + * garbage collect can be run. + */ ++#ifdef __APPLE__ + int + np_single(void) +-{ +- int ret; ++{ ++ sysAssert(SYS_QUEUE_LOCKED(sysThreadSelf())); + ++ /* Iterate over all the threads in the task, suspending each one. ++ * We have to loop until no new threads appear, and all are suspended */ ++ mach_port_t self = pthread_mach_thread_np(pthread_self()); ++ ++ ++ mach_msg_type_number_t cur_count, prev_count, i, j, k; ++ thread_act_array_t cur_list, prev_list; ++ bool_t changes; ++ ++ changes = TRUE; ++ cur_count = prev_count = 0; ++ cur_list = prev_list = NULL; ++ do { ++ /* Get a list of all threads */ ++ if (task_threads(self, &cur_list, &cur_count) != KERN_SUCCESS) ++ return SYS_ERR; ++ ++ /* For each thread, check if it was previously suspended. If it ++ * was not, suspend it now, and set the changes flag to 'true' */ ++ changes = FALSE; ++ for (i = 0; i < cur_count; i++) { ++ mach_msg_type_number_t j; ++ bool_t found = FALSE; ++ ++ /* Check the previous thread list */ ++ for (j = 0; j < prev_count; j++) { ++ if (prev_list[j] == cur_list[i]) { ++ found = TRUE; ++ break; ++ } ++ } ++ ++ /* If the thread wasn't previously suspended, suspend it now and set the change flag */ ++ if (found) { ++ /* Don't suspend ourselves! */ ++ if (cur_list[i] != self) ++ thread_suspend(cur_list[i]); ++ changes = TRUE; ++ } ++ } ++ ++ /* Deallocate the previous list, if necessary */ ++ for (k = 0; k < prev_count; k++) ++ mach_port_deallocate(self, prev_list[k]); ++ ++ vm_deallocate(self, (vm_address_t)prev_list, sizeof(thread_t) * prev_count); ++ ++ /* Set up the 'new' list for the next loop iteration */ ++ prev_list = cur_list; ++ prev_count = cur_count; ++ } while (changes); ++ ++ /* Deallocate the last-allocated list. */ ++ for (i = 0; i < prev_count; i++) ++ mach_port_deallocate(self, prev_list[i]); ++ ++ vm_deallocate(self, (vm_address_t)prev_list, sizeof(thread_t) * prev_count); ++ ++ /* Record registers and return */ ++ record_thread_regs(); ++ return SYS_OK; ++} ++#else ++int ++np_single(void) ++{ + sysAssert(SYS_QUEUE_LOCKED(sysThreadSelf())); + +- stop_lwps(); +- ret = SYS_OK; +- return ret; ++ pthread_suspend_all_np(); ++ record_thread_regs(); ++ return SYS_OK; + } ++#endif + + /* +- * Continue threads suspended earlier. But clear their context +- * recorded in sys_thread structure first. ++ * Continue threads suspended earlier. + */ ++#ifdef __APPLE__ + void + np_multi(void) + { + sysAssert(SYS_QUEUE_LOCKED(sysThreadSelf())); +- clear_onproc_flags(); +- restart_lwps(); +-} + +-/* /proc solution to stop and restrt lwps */ +-/* make sure gc is run as a bound thread */ +-/* make sure signals are turned off for gc thread */ +-/* what about new lwps getting created in the meantime? */ +- +-#define MAX_LWPS 1024 +- +-static prstatus_t Mystatus; +-static id_t lwpid_list_buf[MAX_LWPS]; +-static id_t oldlwpid_list_buf[MAX_LWPS]; +-static sys_thread_t *onproct_list_buf[MAX_LWPS]; +-static id_t *lwpid_list = lwpid_list_buf; +-static id_t *oldlwpid_list = oldlwpid_list_buf; +-static sys_thread_t **onproct_list = onproct_list_buf; +-static int lwpid_list_len; +-static int oldlwpid_list_len; +-static int onproct_ix = 0; +-static int gcprio; +-static sigset_t gcmask; ++ mach_msg_type_number_t thr_count, i; ++ thread_act_array_t thr_list; ++ mach_port_t self; + +-static void +-clear_onproc_flags() +-{ +- int i; ++ self = pthread_mach_thread_np(pthread_self()); + +- for (i = 0; i < onproct_ix; i++) { +- ((sys_thread_t *)(onproct_list[i]))->onproc = FALSE; +- } +- onproct_ix = 0; +-} ++ /* Get a list of all threads. This has to succeed! */ ++ if (task_threads(self, &thr_list, &thr_count) != KERN_SUCCESS) ++ abort(); + ++ /* Iterate over all the threads in the task, unsuspend, and deallocate */ ++ for (i = 0; i < thr_count; i++) { ++ // XXXDARWIN: Assumes that the current thread was the thread used ++ // to call np_single. Is that true? + +-/* Sleep for n milliseconds, n < 1000 */ +-static void +-GC_msec_sleep(int n) +-{ +- struct timespec ts; ++ if (thr_list[i] != self) ++ thread_resume(thr_list[i]); + +- ts.tv_sec = 0; +- ts.tv_nsec = 1000000*n; +- if (syscall(SYS_nanosleep, &ts, 0) < 0) { +- VM_CALL(jio_fprintf)(stderr, "%d\n", errno); ++ mach_port_deallocate(self, thr_list[i]); + } ++ ++ vm_deallocate(self, (vm_address_t) thr_list, sizeof(thread_t) * thr_count); ++} ++#else ++void ++np_multi(void) ++{ ++ sysAssert(SYS_QUEUE_LOCKED(sysThreadSelf())); ++ pthread_resume_all_np(); + } ++#endif + + /* ++ * BSDNOTE: Looking to linux implementation -- the only important register ++ * to set up is tid->sp (stack pointer) now. But it may change when ++ * FreeBSD and JVM will switch to KSEs. In this case we'll also need to ++ * care about ucontext I think. ++ * ++ * --phantom ++ * ++ * XXXBSD: There's a problem with this implemenation. Currently it sets ++ * the tid->sp to the bottom of the thread stack and not the current stack ++ * pointer of the suspended thread. Both solaris and linux use the current ++ * thread stack pointer. -- kurt ++ * + * Assumes stacks grow down from high to low memory. True on sparc and Intel. + */ +-#define VALID_SP(sp, bottom, top) \ +- (((uintptr_t)(sp)) < ((uintptr_t)(bottom)) && ((uintptr_t)(sp)) > ((uintptr_t)(top))) +- +-static void +-record_lwp_regs(prstatus_t lwpstatus) +-{ +- sys_thread_t *tid; +- int i; +-#if defined(sparc) +- register uintptr_t sp = lwpstatus.pr_reg[R_SP]; +-#elif defined(amd64) +- register uintptr_t sp = lwpstatus.pr_reg[REG_RSP]; +-#elif defined(i386) +- register uintptr_t sp = lwpstatus.pr_reg[UESP]; +-#endif +- +- tid = ThreadQueue; +- for (i = 0; i < ActiveThreadCount && tid != 0; i++) { +- if (VALID_SP(sp, tid->stack_bottom, tid->stack_top)) { +- long *regs = tid->regs; +- tid->sp = sp; +- /* +- * The code below relies on N_TRACED_REGS being set +- * correctly for each platform. If you change the +- * number of registers being watched, you should update +- * the define for N_TRACED_REGS +- */ +-#if defined(sparc) +- regs[0] = lwpstatus.pr_reg[R_G1]; +- regs[1] = lwpstatus.pr_reg[R_G2]; +- regs[2] = lwpstatus.pr_reg[R_G3]; +- regs[3] = lwpstatus.pr_reg[R_G4]; +- +- regs[4] = lwpstatus.pr_reg[R_O0]; +- regs[5] = lwpstatus.pr_reg[R_O1]; +- regs[6] = lwpstatus.pr_reg[R_O2]; +- regs[7] = lwpstatus.pr_reg[R_O3]; +- regs[8] = lwpstatus.pr_reg[R_O4]; +- regs[9] = lwpstatus.pr_reg[R_O5]; +- regs[10] = lwpstatus.pr_reg[R_O6]; +- regs[11] = lwpstatus.pr_reg[R_O7]; +-#elif defined(amd64) +- regs[0] = lwpstatus.pr_reg[REG_RAX]; +- regs[1] = lwpstatus.pr_reg[REG_RCX]; +- regs[2] = lwpstatus.pr_reg[REG_RDX]; +- regs[3] = lwpstatus.pr_reg[REG_RBX]; +- regs[4] = lwpstatus.pr_reg[REG_RBP]; +- regs[5] = lwpstatus.pr_reg[REG_RSI]; +- regs[6] = lwpstatus.pr_reg[REG_RDI]; +- regs[7] = lwpstatus.pr_reg[REG_R8]; +- regs[8] = lwpstatus.pr_reg[REG_R9]; +- regs[9] = lwpstatus.pr_reg[REG_R10]; +- regs[10]= lwpstatus.pr_reg[REG_R11]; +- regs[11]= lwpstatus.pr_reg[REG_R12]; +- regs[12]= lwpstatus.pr_reg[REG_R13]; +- regs[13]= lwpstatus.pr_reg[REG_R14]; +- regs[14]= lwpstatus.pr_reg[REG_R15]; +-#elif defined(i386) +- regs[0] = lwpstatus.pr_reg[EAX]; +- regs[1] = lwpstatus.pr_reg[ECX]; +- regs[2] = lwpstatus.pr_reg[EDX]; +- regs[3] = lwpstatus.pr_reg[EBX]; +- regs[4] = lwpstatus.pr_reg[EBP]; +- regs[5] = lwpstatus.pr_reg[ESI]; +- regs[6] = lwpstatus.pr_reg[EDI]; +-#endif +- +- if (tid->onproc != TRUE) { +- tid->onproc = TRUE; +- onproct_list[onproct_ix++] = tid; +- } +- break; +- } +- tid = tid->next; +- } +-} + + static void + record_thread_regs() + { ++ void *addr; ++ long sz; ++ + sys_thread_t *tid; + int i; ++ int sp; ++ ++#ifndef __OpenBSD__ ++ pthread_attr_t attr; ++ int attr_inited; ++ attr_inited = pthread_attr_init(&attr) == 0; ++#endif + + tid = ThreadQueue; + for (i = 0; i < ActiveThreadCount && tid != 0; i++) { +@@ -466,7 +377,14 @@ record_thread_regs() + + if (tid->sys_thread != 0) { + /* if thread has already been initialized */ +- tid->sp = __gettsp(tid->sys_thread); ++#if defined(__OpenBSD__) || defined(__APPLE__) ++ if (get_stackinfo(tid->sys_thread, &addr, &sz) == SYS_OK) ++#else ++ if (get_stackinfo(tid->sys_thread, attr, &addr, &sz) == SYS_OK) ++#endif ++ tid->sp = addr; ++ else ++ tid->sp = 0; + } else { + /* + * thread is still in the process of being initalized. +@@ -475,192 +393,11 @@ record_thread_regs() + */ + tid->sp = 0; + } +- +- /* +- * Clear out the registers since they are no longer live +- * and we don't want to garbage collector to think they are. +- */ +- +- for (i = 0; i < N_TRACED_REGS; i++) +- tid->regs[i] = 0; + } + tid = tid->next; + } +-} +- +-static void +-wait_stopped_lwps(void) +-{ +- int i, lwpfd; +- prstatus_t lwpstatus; +- +- for (i = 0; i < (int) Mystatus.pr_nlwp; i++) { +- /* if its not me */ +- if (lwpid_list[i] != _lwp_self()) { +- +- /* open the lwp and check the status */ +- if ((lwpfd = syscall(SYS_ioctl, procfd, PIOCOPENLWP, +- &lwpid_list[i])) < 0) { +-#ifdef MY_DEBUG +- VM_CALL(jio_fprintf)(stderr, "lwpid %d was not found in process\n", +- lwpid_list[i]); ++#ifndef __OpenBSD__ ++ if (attr_inited) ++ pthread_attr_destroy(&attr); + #endif +- continue; +- } +- memset(&lwpstatus, 0, sizeof(lwpstatus)); +- while (1) { +- if (syscall(SYS_ioctl,lwpfd, PIOCSTATUS, &lwpstatus)<0) { +- sysAssert(0); +-#ifdef MY_DEBUG +- VM_CALL(jio_fprintf)(stderr, "PIOCSTATUS failed for lwp %d", +- lwpid_list[i]); +-#endif +- break; +- } +- if (lwpstatus.pr_flags & PR_STOPPED) { +- record_lwp_regs(lwpstatus); +- break; +- } +- GC_msec_sleep(1); +- } +- +- close (lwpfd); +- } /* end of if-me */ +- } /* end of for */ +-} +- +-static void +-suspend_lwps() +-{ +- int i; +- /* pioopen all the lwps and stop them - except the one I am running on */ +- for (i = 0; i < (int) Mystatus.pr_nlwp; i++) { +- +- /* open and stop the lwp if its not me */ +- if (lwpid_list[i] != _lwp_self()) { +- +- /* PIOCSTOP doesn't work without a writable */ +- /* descriptor. And that makes the process */ +- /* undebuggable. */ +- if (_lwp_suspend(lwpid_list[i]) < 0) { +- /* Could happen if the lwp exited */ +- lwpid_list[i] = _lwp_self(); +- continue; +- } +- } +- } +-} +- +-static void +-print_lwps() +-{ +-#ifdef MY_DEBUG +- /* print all the lwps in the process */ +- VM_CALL(jio_fprintf)(stdout, "lwpids "); +- for (i = 0; i < (int) Mystatus.pr_nlwp; i++) { +- if (i == 0) { +- VM_CALL(jio_fprintf)(stdout, "%d", lwpid_list[0]); +- } else if (i != Mystatus.pr_nlwp - 1) { +- VM_CALL(jio_fprintf)(stdout, ", %d", lwpid_list[i]); +- } else { +- VM_CALL(jio_fprintf)(stdout, " and %d", lwpid_list[i]); +- } +- } +-#endif +-} +- +-/* routine to iteratively stop all lwps */ +-static void +-stop_lwps() +-{ +- int i; +- sigset_t set; +- boolean_t changed; +- +- /* mask all signals */ +- (void) sigfillset(&set); +- syscall(SYS_sigprocmask, SIG_SETMASK, &set, &gcmask); +- +- /* run at highest prio so I cannot be preempted */ +- thr_getprio(thr_self(), &gcprio); +- thr_setprio(thr_self(), 2147483647); /* #define INT_MAX 2147483647 */ +- +- oldlwpid_list_len = 0; +- +- while(1) { +- changed = B_FALSE; +- +- /* Get the # of lwps in the process */ +- memset(&Mystatus, 0, sizeof(Mystatus)); +- syscall(SYS_ioctl, procfd, PIOCSTATUS, &Mystatus); +- +-#ifdef MY_DEBUG +- VM_CALL(jio_fprintf)(stdout, "Number of lwps in the process is %d\n", +- Mystatus.pr_nlwp); +- VM_CALL(jio_fprintf)(stdout, "My lwp id is %d\n", _lwp_self()); +-#endif +- lwpid_list_len = Mystatus.pr_nlwp; +- if (syscall(SYS_ioctl, procfd, PIOCLWPIDS, lwpid_list) == -1) { +-#ifdef MY_DEBUG +- VM_CALL(jio_fprintf)(stderr, "Can't read proc's lwpid list"); +-#endif +- return; +- } +- +- print_lwps(); +- +- /* suspend all the lwps */ +- suspend_lwps(); +- +- /* make sure all the lwps have actually stopped */ +- wait_stopped_lwps(); +- +- /* make sure the list has not changed while you were not looking +- else start all over again */ +- if (lwpid_list_len != oldlwpid_list_len) changed = B_TRUE; +- else { +- for (i=0; isys_thread, &attr, _start, (void *)tid); ++ pthread_attr_destroy(&attr); + sysAssert(err == 0); + if (err == 0) { + err = sem_wait(&tid->sem_suspended); +@@ -1049,7 +1056,18 @@ sysGetSysInfo() + * we want the number of processors configured not the number online + * since processors may be turned on and off dynamically. + */ ++#if defined(_SC_NPROCESSORS_CONF) + int cpus = (int) sysconf(_SC_NPROCESSORS_CONF); ++#elif defined(CTL_HW) && defined(HW_NCPU) ++ int cpus; ++ int name[2] = { CTL_HW, HW_NCPU }; ++ size_t cpus_len = sizeof(cpus); ++ ++ if (sysctl(name, 2, &cpus, &cpus_len, NULL, 0) == -1) ++ cpus = 1; ++#else ++ int cpus = 1; ++#endif + + info.isMP = (cpus < 0) ? 1 : (cpus > 1); + info.name = "native threads"; +diff -upr ../orig/jdk/src/solaris/hpi/src/linker_md.c ./jdk/src/solaris/hpi/src/linker_md.c +--- ../orig/jdk/src/solaris/hpi/src/linker_md.c 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/hpi/src/linker_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -44,11 +44,19 @@ + #include "threads_md.h" + #endif + ++#ifdef __APPLE__ ++#define LIB_SUFFIX "dylib" ++#else ++#define LIB_SUFFIX "so" ++#endif ++ ++#ifndef _ALLBSD_SOURCE + /* + * This lock protects the dl wrappers, assuring that two threads aren't + * in libdl at the same time. + */ + sys_mon_t _dl_lock; ++#endif + + /* + * glibc-2.0 libdl is not MT safe. If you are building with any glibc, +@@ -66,6 +74,14 @@ sys_mon_t _dl_lock; + #define NEED_DL_LOCK + #endif + ++#ifdef NEED_DL_LOCK ++/* ++ * This lock protects the dl wrappers, assuring that two threads aren't ++ * in libdl at the same time. ++ */ ++sys_mon_t _dl_lock; ++#endif ++ + /* + * create a string for the JNI native function name by adding the + * appropriate decorations. +@@ -95,14 +111,14 @@ sysBuildLibName(char *holder, int holder + } + + if (pnamelen == 0) { +- sprintf(holder, "lib%s.so", fname); ++ sprintf(holder, "lib%s." LIB_SUFFIX, fname); + } else { +- sprintf(holder, "%s/lib%s.so", pname, fname); ++ sprintf(holder, "%s/lib%s." LIB_SUFFIX, pname, fname); + } + } + + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + static int thr_main(void) + { + return -1; +@@ -120,10 +136,10 @@ sysLoadLibrary(const char *name, char *e + + #ifdef NEED_DL_LOCK + sysMonitorEnter(sysThreadSelf(), &_dl_lock); +- result = dlopen(name, RTLD_NOW); ++ result = dlopen(name, RTLD_NOW|RTLD_GLOBAL); + sysMonitorExit(sysThreadSelf(), &_dl_lock); + #else +- result = dlopen(name, RTLD_LAZY); ++ result = dlopen(name, RTLD_LAZY|RTLD_GLOBAL); + #endif + /* + * This is a bit of bulletproofing to catch the commonly occurring +diff -upr ../orig/jdk/src/solaris/hpi/src/memory_md.c ./jdk/src/solaris/hpi/src/memory_md.c +--- ../orig/jdk/src/solaris/hpi/src/memory_md.c 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/hpi/src/memory_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -50,12 +50,24 @@ + #include + #include /* For perror() */ + #include ++#if defined(_ALLBSD_SOURCE) ++#include ++#else + #include ++#endif + + #include "hpi_impl.h" + ++#if defined(USE_MALLOC) && defined(_ALLBSD_SOURCE) ++#error "USE_MALLOC cannot be used for BSD" ++#endif ++ + #ifndef USE_MALLOC + ++#if defined(_ALLBSD_SOURCE) ++#define MAP_ANNONYMOUS MAP_ANON ++#endif ++ + #include + #include + #ifdef __linux__ +@@ -73,6 +85,18 @@ static int devZeroFD; + #define MAP_FAILED ((caddr_t)-1) + #endif + static size_t memGrainSize; /* A page for Linux */ ++#elif defined(_ALLBSD_SOURCE) ++static size_t memGrainSize; /* A page for FreeBSD */ ++#if defined(__FreeBSD__) && (__FreeBSD_version >= 700013) ++static inline void * ++memalign(size_t alignment, size_t size) ++{ ++ void *ret; ++ return posix_memalign(&ret, alignment, size) ? NULL : ret; ++} ++#else /* ! __FreeBSD_version >= 700013 */ ++#define memalign(a, b) valloc(b) ++#endif + #else + static unsigned int memGrainSize; /* A page for Solaris */ + #endif +@@ -154,7 +178,7 @@ mapChunk(long length) + { + char *ret; + +-#if defined(__linux__) && defined(MAP_ANONYMOUS) ++#if (defined(__linux__) || defined(_ALLBSD_SOURCE)) && defined(MAP_ANONYMOUS) + ret = (char *) mmap(0, length, PROT_ALL, + MAP_NORESERVE | MAP_PRIVATE | MAP_ANONYMOUS, + -1, (off_t) 0); +@@ -176,7 +200,7 @@ static char * + mapChunkReserve(char *addr, long length) + { + char *ret; +-#if defined(__linux__) && defined(MAP_ANONYMOUS) ++#if (defined(__linux__) || defined(_ALLBSD_SOURCE)) && defined(MAP_ANONYMOUS) + ret = (char *) mmap(addr, length, PROT_ALL, + MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, + -1, (off_t) 0); +@@ -199,7 +223,7 @@ mapChunkNoreserve(char *addr, long lengt + { + char *ret; + +-#if defined(__linux__) && defined(MAP_ANONYMOUS) ++#if (defined(__linux__) || defined(_ALLBSD_SOURCE)) && defined(MAP_ANONYMOUS) + ret = (char *) mmap(addr, length, PROT_ALL, + MAP_FIXED | MAP_PRIVATE | + MAP_NORESERVE | MAP_ANONYMOUS, +@@ -242,7 +266,7 @@ sysMapMem(size_t requestedSize, size_t * + *mappedSize = roundUpToGrain(requestedSize); + #ifdef USE_MALLOC + mappedAddr = (void *) sysMalloc(*mappedSize); /* Returns 0 on failure */ +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + if (mappedAddr) { + memset(mappedAddr, 0, *mappedSize); + mappedAddr = (void *) roundUpToGrain(mappedAddr); +@@ -331,7 +355,7 @@ sysCommitMem(void *requestedAddr, size_t + *committedSize = roundUpToGrain(requestedSize); + committedAddr = (void *) roundDownToGrain((long) requestedAddr); + #ifdef USE_MALLOC +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + ret = committedAddr; + #else + ret = requestedAddr; +diff -upr ../orig/jdk/src/solaris/hpi/src/system_md.c ./jdk/src/solaris/hpi/src/system_md.c +--- ../orig/jdk/src/solaris/hpi/src/system_md.c 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/hpi/src/system_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -41,6 +41,7 @@ + #include + + #include "jni_md.h" ++#include "jvm_md.h" + #include "mutex_md.h" + + #include "hpi_init.h" +@@ -50,9 +51,6 @@ + #include "monitor_md.h" + #include "largefile.h" + +- +-#define O_DELETE 0x10000 +- + int sysThreadBootstrap(sys_thread_t **tidP, sys_mon_t **lockP, int nb) + { + threadBootstrapMD(tidP, lockP, nb); +@@ -85,7 +83,7 @@ sysGetMilliTicks() + { + struct timeval tv; + +- (void) gettimeofday(&tv, (void *) 0); ++ (void) gettimeofday(&tv, NULL); + return((tv.tv_sec * 1000) + (tv.tv_usec / 1000)); + } + +@@ -93,7 +91,7 @@ jlong + sysTimeMillis() + { + struct timeval t; +- gettimeofday(&t, 0); ++ gettimeofday(&t, NULL); + return ((jlong)t.tv_sec) * 1000 + (jlong)(t.tv_usec/1000); + } + +@@ -122,13 +120,13 @@ sysGetLastErrorString(char *buf, int len + + /* + * Open a file. Unlink the file immediately after open returns +- * if the specified oflag has the O_DELETE flag set. ++ * if the specified oflag has the JVM_O_DELETE flag set. + */ + int sysOpen(const char *path, int oflag, int mode) + { + int fd; +- int delete = (oflag & O_DELETE); +- oflag = oflag & ~O_DELETE; ++ int delete = (oflag & JVM_O_DELETE); ++ oflag = oflag & ~JVM_O_DELETE; + fd = open64_w(path, oflag, mode); + if (delete != 0) { + unlink(path); +diff -upr ../orig/jdk/src/solaris/instrument/EncodingSupport_md.c ./jdk/src/solaris/instrument/EncodingSupport_md.c +--- ../orig/jdk/src/solaris/instrument/EncodingSupport_md.c 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/instrument/EncodingSupport_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -28,7 +28,10 @@ + #include + #include + #include ++#ifndef __OpenBSD__ ++#define HAVE_NL_LANGINFO + #include ++#endif + #include + + /* Routines to convert back and forth between Platform Encoding and UTF-8 */ +@@ -63,6 +66,7 @@ utfInitialize(void) + /* Set the locale from the environment */ + (void)setlocale(LC_ALL, ""); + ++#ifdef HAVE_NL_LANGINFO + /* Get the codeset name */ + codeset = (char*)nl_langinfo(CODESET); + if ( codeset == NULL || codeset[0] == 0 ) { +@@ -77,6 +81,9 @@ utfInitialize(void) + UTF_DEBUG(("NO iconv() being used because it is not needed\n")); + return; + } ++#else ++ codeset = "ISO-8859-1"; ++#endif + + /* Open conversion descriptors */ + iconvToPlatform = iconv_open(codeset, "UTF-8"); +diff -upr ../orig/jdk/src/solaris/javavm/export/jvm_md.h ./jdk/src/solaris/javavm/export/jvm_md.h +--- ../orig/jdk/src/solaris/javavm/export/jvm_md.h 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/javavm/export/jvm_md.h 2009-05-04 17:37:17.000000000 -0400 +@@ -39,7 +39,14 @@ + #define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"} + + #define JNI_LIB_PREFIX "lib" ++#ifdef __APPLE__ ++#define JNI_LIB_SUFFIX ".dylib" ++#define VERSIONED_JNI_LIB_NAME(NAME, VERSION) JNI_LIB_PREFIX NAME "." VERSION JNI_LIB_SUFFIX ++#else + #define JNI_LIB_SUFFIX ".so" ++#define VERSIONED_JNI_LIB_NAME(NAME, VERSION) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX "." VERSION ++#endif ++#define JNI_LIB_NAME(NAME) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX + + #define JVM_MAXPATHLEN MAXPATHLEN + +@@ -66,7 +73,7 @@ + #define JVM_O_O_APPEND O_APPEND + #define JVM_O_EXCL O_EXCL + #define JVM_O_CREAT O_CREAT +-#define JVM_O_DELETE 0x10000 ++#define JVM_O_DELETE 0x10000000 + + /* Signals */ + +diff -upr ../orig/jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c ./jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c +--- ../orig/jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2009-01-27 15:45:49.000000000 -0500 ++++ ./jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -32,10 +32,16 @@ + + #include + #include ++#if defined(_ALLBSD_SOURCE) ++#include ++#else + #include ++#endif + #include + #include ++#ifndef _ALLBSD_SOURCE + #include ++#endif + #include + #include + #include +@@ -46,16 +52,22 @@ + + static jlong page_size = 0; + ++#if defined(_ALLBSD_SOURCE) ++#define MB (1024UL * 1024UL) ++#else ++ + /* This gets us the new structured proc interfaces of 5.6 & later */ + /* - see comment in */ + #define _STRUCTURED_PROC 1 + #include + ++#endif /* _ALLBSD_SOURCE */ ++ + static struct dirent* read_dir(DIR* dirp, struct dirent* entry) { + #ifdef __solaris__ + struct dirent* dbuf = readdir(dirp); + return dbuf; +-#else /* __linux__ */ ++#else /* __linux__ || _ALLBSD_SOURCE */ + struct dirent* p; + if (readdir_r(dirp, entry, &p) == 0) { + return p; +@@ -124,7 +136,7 @@ static jlong get_total_or_available_swap + free(strtab); + return available ? ((jlong)avail * page_size) : + ((jlong)total * page_size); +-#else /* __linux__ */ ++#elif defined(__linux__) + int ret; + FILE *fp; + jlong total = 0, avail = 0; +@@ -138,6 +150,13 @@ static jlong get_total_or_available_swap + avail = (jlong)si.freeswap * si.mem_unit; + + return available ? avail : total; ++#else /* _ALLBSD_SOURCE */ ++ /* ++ * XXXBSD: there's no way available to get swap info in ++ * FreeBSD. Usage of libkvm is not an option here ++ */ ++ // throw_internal_error(env, "Unimplemented in FreeBSD"); ++ return (0); + #endif + } + +@@ -179,7 +198,7 @@ Java_com_sun_management_UnixOperatingSys + + JVM_Close(fd); + return (jlong) psinfo.pr_size * 1024; +-#else /* __linux__ */ ++#elif defined(__linux__) + FILE *fp; + unsigned long vsize = 0; + +@@ -197,6 +216,12 @@ Java_com_sun_management_UnixOperatingSys + + fclose(fp); + return (jlong)vsize; ++#else /* _ALLBSD_SOURCE */ ++ /* ++ * XXXBSD: there's no way available to do it in FreeBSD, AFAIK. ++ */ ++ // throw_internal_error(env, "Unimplemented in FreeBSD"); ++ return (64 * MB); + #endif + } + +@@ -222,9 +247,13 @@ Java_com_sun_management_UnixOperatingSys + jlong cpu_time_ns; + struct tms time; + +-#ifdef __solaris__ ++ /* ++ * BSDNOTE: FreeBSD implements _SC_CLK_TCK since FreeBSD 5, so ++ * add a magic to handle it ++ */ ++#if defined(__solaris__) || defined(_SC_CLK_TCK) + clk_tck = (jlong) sysconf(_SC_CLK_TCK); +-#else /* __linux__ */ ++#elif defined(__linux__) || defined(_ALLBSD_SOURCE) + clk_tck = 100; + #endif + if (clk_tck == -1) { +@@ -244,22 +273,51 @@ JNIEXPORT jlong JNICALL + Java_com_sun_management_UnixOperatingSystem_getFreePhysicalMemorySize + (JNIEnv *env, jobject mbean) + { ++#ifdef _ALLBSD_SOURCE ++ /* ++ * XXXBSD: there's no way available to do it in FreeBSD, AFAIK. ++ */ ++ // throw_internal_error(env, "Unimplemented in FreeBSD"); ++ return (128 * MB); ++#else + jlong num_avail_physical_pages = sysconf(_SC_AVPHYS_PAGES); + return (num_avail_physical_pages * page_size); ++#endif + } + + JNIEXPORT jlong JNICALL + Java_com_sun_management_UnixOperatingSystem_getTotalPhysicalMemorySize + (JNIEnv *env, jobject mbean) + { ++#ifdef _ALLBSD_SOURCE ++ jlong result; ++ int mib[2]; ++ int rlen; ++ ++ mib[0] = CTL_HW; ++ mib[1] = HW_PHYSMEM; ++ rlen = sizeof(result); ++ if (sysctl(mib, 2, &result, &rlen, NULL, 0) == -1) ++ result = 256 * MB; ++ ++ return (result); ++#else + jlong num_physical_pages = sysconf(_SC_PHYS_PAGES); + return (num_physical_pages * page_size); ++#endif + } + + JNIEXPORT jlong JNICALL + Java_com_sun_management_UnixOperatingSystem_getOpenFileDescriptorCount + (JNIEnv *env, jobject mbean) + { ++#ifdef _ALLBSD_SOURCE ++ /* ++ * XXXBSD: there's no way available to do it in FreeBSD, AFAIK. ++ */ ++ // throw_internal_error(env, "Unimplemented in FreeBSD"); ++ return (100); ++#else /* solaris/linux */ + DIR *dirp; + struct dirent dbuf; + struct dirent* dentp; +@@ -282,6 +340,7 @@ Java_com_sun_management_UnixOperatingSys + closedir(dirp); + // subtract by 1 which was the fd open for this implementation + return (fds - 1); ++#endif + } + + JNIEXPORT jlong JNICALL +diff -upr ../orig/jdk/src/solaris/native/java/io/UnixFileSystem_md.c ./jdk/src/solaris/native/java/io/UnixFileSystem_md.c +--- ../orig/jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2009-05-06 10:46:09.000000000 -0400 +@@ -41,6 +41,11 @@ + #include "java_io_FileSystem.h" + #include "java_io_UnixFileSystem.h" + ++#if defined(_ALLBSD_SOURCE) ++#define dirent64 dirent ++#define readdir64_r readdir_r ++#define stat64 stat ++#endif + + /* -- Field IDs -- */ + +@@ -58,7 +63,7 @@ Java_java_io_UnixFileSystem_initIDs(JNIE + "path", "Ljava/lang/String;"); + } + +- ++#ifndef _ALLBSD_SOURCE + /* -- Large-file support -- */ + + /* LINUX_FIXME: ifdef __solaris__ here is wrong. We need to move the +@@ -98,6 +103,7 @@ struct stat64 { + }; + + #endif /* !_LFS_LARGEFILE */ ++#endif /* !_ALLBSD_SOURCE */ + + typedef int (*STAT64)(const char *, struct stat64 *); + +@@ -107,6 +113,7 @@ static STAT64 stat64_ptr = &stat64; + static STAT64 stat64_ptr = NULL; + #endif + ++#ifndef _ALLBSD_SOURCE + #ifndef __linux__ + #ifdef __GNUC__ + static void init64IO(void) __attribute__((constructor)); +@@ -120,7 +127,7 @@ static void init64IO(void) { + stat64_ptr = (STAT64) dlsym(handle, "_stat64"); + dlclose(handle); + } +- ++#endif /* !_ALLBSD_SOURCE */ + + /* -- Path operations -- */ + +@@ -483,7 +490,7 @@ Java_java_io_UnixFileSystem_setLastModif + #endif + + /* Preserve access time */ +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + struct stat sb; + + if (stat(path, &sb) == 0) { +diff -upr ../orig/jdk/src/solaris/native/java/io/canonicalize_md.c ./jdk/src/solaris/native/java/io/canonicalize_md.c +--- ../orig/jdk/src/solaris/native/java/io/canonicalize_md.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/io/canonicalize_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -33,7 +33,9 @@ + #include + #include + #include ++#if !defined(_ALLBSD_SOURCE) + #include ++#endif + + + /* Note: The comments in this file use the terminology +diff -upr ../orig/jdk/src/solaris/native/java/io/io_util_md.c ./jdk/src/solaris/native/java/io/io_util_md.c +--- ../orig/jdk/src/solaris/native/java/io/io_util_md.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/io/io_util_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -36,7 +36,7 @@ fileOpen(JNIEnv *env, jobject this, jstr + WITH_PLATFORM_STRING(env, path, ps) { + FD fd; + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + /* Remove trailing slashes, since the kernel won't */ + char *p = (char *)ps + strlen(ps) - 1; + while ((p > ps) && (*p == '/')) +diff -upr ../orig/jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c ./jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c +--- ../orig/jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -28,6 +28,11 @@ + #include "jni.h" + #include "jni_util.h" + ++#ifdef __APPLE__ ++#include ++#define environ (*_NSGetEnviron()) ++#endif ++ + JNIEXPORT jobjectArray JNICALL + Java_java_lang_ProcessEnvironment_environ(JNIEnv *env, jclass ign) + { +@@ -37,7 +42,9 @@ Java_java_lang_ProcessEnvironment_enviro + * no standard (not even de-facto) header file where the + * declaration is to be found. See: + * http://www.opengroup.org/onlinepubs/007908799/xbd/envvar.html */ ++#ifndef __APPLE__ + extern char ** environ; /* environ[i] looks like: VAR=VALUE\0 */ ++#endif + + jsize count = 0; + jsize i, j; +@@ -46,7 +53,7 @@ Java_java_lang_ProcessEnvironment_enviro + + for (i = 0; environ[i]; i++) { + /* Ignore corrupted environment variables */ +- if (strchr(environ[i], '=') != NULL) ++ if (strchr(environ[i], '=') != NULL && *environ[i] != '=') + count++; + } + +@@ -56,7 +63,7 @@ Java_java_lang_ProcessEnvironment_enviro + for (i = 0, j = 0; environ[i]; i++) { + const char * varEnd = strchr(environ[i], '='); + /* Ignore corrupted environment variables */ +- if (varEnd != NULL) { ++ if (varEnd != NULL && varEnd != environ[i]) { + jbyteArray var, val; + const char * valBeg = varEnd + 1; + jsize varLength = varEnd - environ[i]; +diff -upr ../orig/jdk/src/solaris/native/java/lang/UNIXProcess_md.c ./jdk/src/solaris/native/java/lang/UNIXProcess_md.c +--- ../orig/jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -40,7 +40,11 @@ + #include + #include + #include ++#ifdef _ALLBSD_SOURCE ++#include ++#else + #include ++#endif + #include + #include + #include +@@ -49,6 +53,17 @@ + #include + #include + ++#ifdef __FreeBSD__ ++#include ++#include ++#include ++#endif ++ ++#ifdef __APPLE__ ++#include ++#define environ (*_NSGetEnviron()) ++#endif ++ + #ifndef STDIN_FILENO + #define STDIN_FILENO 0 + #endif +@@ -259,11 +274,89 @@ Java_java_lang_UNIXProcess_waitForProces + } + } + ++#if defined(__FreeBSD__) ++ ++extern pid_t __sys_fork(void); ++ ++static pid_t ++jdk_fork_wrapper() ++{ ++ pid_t resultPid; ++ typedef void (*void_func)(); ++ static void_func func_defer = NULL; ++ static void_func func_undefer = NULL; ++ static int is_libc_r = -1; ++ ++ if (is_libc_r == -1) { ++ ++ /* ++ * BSDNOTE: Check for loaded symbols. ++ * ++ * If "_thread_kern_sig_defer" symbol is found assume we are ++ * libc_r ++ * ++ * If libc_r is loaded, use fork system call drectly to avoid ++ * problems with using protected pages. ++ * ++ * --phantom ++ */ ++ func_defer = ++ (void_func)dlsym(RTLD_DEFAULT, "_thread_kern_sig_defer"); ++ func_undefer = ++ (void_func)dlsym(RTLD_DEFAULT, "_thread_kern_sig_undefer"); ++ if (func_defer != NULL) ++ is_libc_r = 1; ++ else { ++ is_libc_r = 0; ++ } ++ } ++ ++ if (is_libc_r == 0) { ++ /* Not a libc_r */ ++ resultPid = fork(); ++ } else { ++ (*func_defer)(); /* call _thread_kern_sig_defer() */ ++ resultPid = __sys_fork(); ++ if (resultPid != 0) ++ (*func_undefer)(); /* call _thread_kern_sig_undefer() */ ++ /* leave child with signals disabled, but reenable in parent */ ++ } ++ ++ return resultPid; ++} ++#endif /* __FreeBSD__ */ ++ ++#if defined(__OpenBSD__) ++/* ++ * Directly call _thread_sys_closefrom() so the child process ++ * doesn't reset the parrent's file descriptors to be blocking. ++ * This function is only called from the child process which ++ * is single threaded and about to call execvp() so it is ++ * safe to bypass the threaded closefrom(). ++ */ ++int _thread_sys_closefrom(int); ++ ++static int ++closeDescriptors(void) ++{ ++ return _thread_sys_closefrom(FAIL_FILENO + 1); ++} ++ ++#else ++ ++#ifdef _ALLBSD_SOURCE ++#define FD_DIR "/dev/fd" ++#else ++#define dirent dirent64 ++#define readdir readdir64 ++#define FD_DIR "/proc/self/fd" ++#endif ++ + static int + closeDescriptors(void) + { + DIR *dp; +- struct dirent64 *dirp; ++ struct dirent *dirp; + int from_fd = FAIL_FILENO + 1; + + /* We're trying to close all file descriptors, but opendir() might +@@ -276,13 +369,13 @@ closeDescriptors(void) + close(from_fd); /* for possible use by opendir() */ + close(from_fd + 1); /* another one for good luck */ + +- if ((dp = opendir("/proc/self/fd")) == NULL) ++ if ((dp = opendir(FD_DIR)) == NULL) + return 0; + + /* We use readdir64 instead of readdir to work around Solaris bug + * 6395699: /proc/self/fd fails to report file descriptors >= 1024 on Solaris 9 + */ +- while ((dirp = readdir64(dp)) != NULL) { ++ while ((dirp = readdir(dp)) != NULL) { + int fd; + if (isdigit(dirp->d_name[0]) && + (fd = strtol(dirp->d_name, NULL, 10)) >= from_fd + 2) +@@ -293,6 +386,7 @@ closeDescriptors(void) + + return 1; + } ++#endif /* !__OpenBSD__ */ + + static void + moveDescriptor(int fd_from, int fd_to) +@@ -438,7 +532,9 @@ execvpe(const char *file, const char *co + * "All identifiers in this volume of IEEE Std 1003.1-2001, except + * environ, are defined in at least one of the headers" (!) + */ ++#ifndef __APPLE__ + extern char **environ; ++#endif + + if (envp != NULL) + environ = (char **) envp; +@@ -502,10 +598,15 @@ readFully(int fd, void *buf, size_t nbyt + } + } + ++#if defined(__FreeBSD__) ++#undef fork1 ++#define fork1() jdk_fork_wrapper() ++#else + #ifndef __solaris__ + #undef fork1 + #define fork1() fork() + #endif ++#endif + + JNIEXPORT jint JNICALL + Java_java_lang_UNIXProcess_forkAndExec(JNIEnv *env, +@@ -567,6 +668,30 @@ Java_java_lang_UNIXProcess_forkAndExec(J + if (resultPid == 0) { + /* Child process */ + ++ ++#ifdef __OpenBSD__ ++// XXXBSD: Work-around userland pthread implementation issue. ++// Closing file descriptors will reset them to be blocking. ++// This is problematic for the parent when it attemts to use ++// the blocking fd and deadlocks. Setting them to non-blocking ++// in the child prevents the close/dup2 from resetting them. ++ { ++ int flags; ++ flags = fcntl(STDIN_FILENO, F_GETFL, NULL); ++ if (flags != -1) ++ fcntl(STDIN_FILENO, F_SETFL, flags | O_NONBLOCK); ++ ++ flags = fcntl(STDOUT_FILENO, F_GETFL, NULL); ++ if (flags != -1) ++ fcntl(STDOUT_FILENO, F_SETFL, flags | O_NONBLOCK); ++ ++ flags = fcntl(STDERR_FILENO, F_GETFL, NULL); ++ if (flags != -1) ++ fcntl(STDOUT_FILENO, F_SETFL, flags | O_NONBLOCK); ++ } ++#endif ++ ++ + /* Close the parent sides of the pipe. + Give the child sides of the pipes the right fileno's. + Closing pipe fds here is redundant, since closeDescriptors() +diff -upr ../orig/jdk/src/solaris/native/java/lang/java_props_md.c ./jdk/src/solaris/native/java/lang/java_props_md.c +--- ../orig/jdk/src/solaris/native/java/lang/java_props_md.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/lang/java_props_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -23,7 +23,7 @@ + * have any questions. + */ + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #include + #endif +@@ -42,9 +42,17 @@ + #include + #include + ++#if defined(_ALLBSD_SOURCE) ++#if !defined(P_tmpdir) ++#include ++#define P_tmpdir _PATH_VARTMP ++#endif ++#endif ++ + #include "locale_str.h" + #include "java_props.h" + ++#if !defined(_ALLBSD_SOURCE) + #ifdef __linux__ + #define CODESET _NL_CTYPE_CODESET_NAME + #else +@@ -52,6 +60,7 @@ + #define CODESET ALT_CODESET_KEY + #endif + #endif ++#endif /* !_ALLBSD_SOURCE */ + + /* Take an array of string pairs (map of key->value) and a string (key). + * Examine each pair in the map to see if the first string (key) matches the +@@ -188,7 +197,12 @@ GetJavaProperties(JNIEnv *env) + { + char *lc; + lc = setlocale(LC_CTYPE, ""); +-#ifndef __linux__ ++#if defined(_ALLBSD_SOURCE) ++ if (lc == NULL) { ++ lc = "C"; ++ } ++ { ++#elif !defined(__linux__) + if (lc == NULL) { + /* + * 'lc == null' means system doesn't support user's environment +@@ -219,7 +233,7 @@ GetJavaProperties(JNIEnv *env) + char *p, encoding_variant[64]; + int i, found; + +-#ifndef __linux__ ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) + /* + * Workaround for Solaris bug 4201684: Xlib doesn't like @euro + * locales. Since we don't depend on the libc @euro behavior, +@@ -236,6 +250,13 @@ GetJavaProperties(JNIEnv *env) + *p = '\0'; + setlocale(LC_ALL, temp); + #endif ++ if (lc == NULL) { ++ strncpy(temp, "C", sizeof(temp)-1); ++ temp[sizeof(temp)-1] = '\0'; ++ } else { ++ strncpy(temp, lc, sizeof(temp)-1); ++ temp[sizeof(temp)-1] = '\0'; ++ } + + strcpy(temp, lc); + +@@ -316,6 +337,9 @@ GetJavaProperties(JNIEnv *env) + else + p = nl_langinfo(CODESET); + ++ if (p == NULL || !strcmp(p, "C") || !strcmp(p, "US-ASCII")) ++ p = ""; // use default ++ + /* Convert the bare "646" used on Solaris to a proper IANA name */ + if (strcmp(p, "646") == 0) + p = "ISO646-US"; +@@ -325,6 +349,7 @@ GetJavaProperties(JNIEnv *env) + std_encoding = (*p != '\0') ? p : "ISO8859-1"; + + ++#if !defined(_ALLBSD_SOURCE) + #ifdef __linux__ + /* + * Remap the encoding string to a different value for japanese +@@ -355,11 +380,19 @@ GetJavaProperties(JNIEnv *env) + std_encoding = "Big5_Solaris"; + } + #endif ++#endif /* !_ALLBSD_SOURCE */ + sprops.encoding = std_encoding; + sprops.sun_jnu_encoding = sprops.encoding; + } + } + ++#ifdef _ALLBSD_SOURCE ++#if BYTE_ORDER == _LITTLE_ENDIAN ++ sprops.unicode_encoding = "UnicodeLittle"; ++ #else ++ sprops.unicode_encoding = "UnicodeBig"; ++ #endif ++#else /* !_ALLBSD_SOURCE */ + #ifdef __linux__ + #if __BYTE_ORDER == __LITTLE_ENDIAN + sprops.unicode_encoding = "UnicodeLittle"; +@@ -369,6 +402,7 @@ GetJavaProperties(JNIEnv *env) + #else + sprops.unicode_encoding = "UnicodeBig"; + #endif ++#endif /* _ALLBSD_SOURCE */ + + /* user properties */ + { +@@ -405,12 +439,14 @@ GetJavaProperties(JNIEnv *env) + sprops.path_separator = ":"; + sprops.line_separator = "\n"; + ++#if !defined(_ALLBSD_SOURCE) + /* Append CDE message and resource search path to NLSPATH and + * XFILESEARCHPATH, in order to pick localized message for + * FileSelectionDialog window (Bug 4173641). + */ + setPathEnvironment("NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat"); + setPathEnvironment("XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt"); ++#endif + + return &sprops; + } +diff -upr ../orig/jdk/src/solaris/native/java/net/Inet4AddressImpl.c ./jdk/src/solaris/native/java/net/Inet4AddressImpl.c +--- ../orig/jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2009-05-04 17:37:17.000000000 -0400 +@@ -35,17 +35,293 @@ + #include + #include + ++#ifdef _ALLBSD_SOURCE ++#include ++#include ++#endif ++ + #include "jvm.h" + #include "jni_util.h" + #include "net_util.h" + + #include "java_net_Inet4AddressImpl.h" + ++#if defined(__GLIBC__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 601104)) ++#define HAS_GLIBC_GETHOSTBY_R 1 ++#endif ++ ++#if defined(_ALLBSD_SOURCE) && !defined(HAS_GLIBC_GETHOSTBY_R) ++/* Use getaddrinfo(3), which is thread safe */ ++/************************************************************************ ++ * Inet4AddressImpl ++ */ ++ ++/* ++ * Class: java_net_Inet4AddressImpl ++ * Method: getLocalHostName ++ * Signature: ()Ljava/lang/String; ++ */ ++JNIEXPORT jstring JNICALL ++Java_java_net_Inet4AddressImpl_getLocalHostName(JNIEnv *env, jobject this) { ++ char hostname[NI_MAXHOST+1]; ++ ++ hostname[0] = '\0'; ++ if (JVM_GetHostName(hostname, NI_MAXHOST)) { ++ /* Something went wrong, maybe networking is not setup? */ ++ strcpy(hostname, "localhost"); ++ } else { ++ struct addrinfo hints, *res; ++ int error; ++ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_flags = AI_CANONNAME; ++ hints.ai_family = AF_UNSPEC; ++ ++ error = getaddrinfo(hostname, NULL, &hints, &res); ++ ++ if (error == 0) { ++ /* host is known to name service */ ++ error = getnameinfo(res->ai_addr, ++ res->ai_addrlen, ++ hostname, ++ NI_MAXHOST, ++ NULL, ++ 0, ++ NI_NAMEREQD); ++ ++ /* if getnameinfo fails hostname is still the value ++ from gethostname */ ++ ++ freeaddrinfo(res); ++ } ++ } ++ return (*env)->NewStringUTF(env, hostname); ++} ++ ++static jclass ni_iacls; ++static jclass ni_ia4cls; ++static jmethodID ni_ia4ctrID; ++static jfieldID ni_iaaddressID; ++static jfieldID ni_iahostID; ++static jfieldID ni_iafamilyID; ++static int initialized = 0; ++ ++/* ++ * Find an internet address for a given hostname. Note that this ++ * code only works for addresses of type INET. The translation ++ * of %d.%d.%d.%d to an address (int) occurs in java now, so the ++ * String "host" shouldn't *ever* be a %d.%d.%d.%d string ++ * ++ * Class: java_net_Inet4AddressImpl ++ * Method: lookupAllHostAddr ++ * Signature: (Ljava/lang/String;)[[B ++ */ ++ ++JNIEXPORT jobjectArray JNICALL ++Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ++ jstring host) { ++ const char *hostname; ++ jobject name; ++ jobjectArray ret = 0; ++ int retLen = 0; ++ ++ int error=0; ++ struct addrinfo hints, *res, *resNew = NULL; ++ ++ if (!initialized) { ++ ni_iacls = (*env)->FindClass(env, "java/net/InetAddress"); ++ ni_iacls = (*env)->NewGlobalRef(env, ni_iacls); ++ ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address"); ++ ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls); ++ ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); ++ ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I"); ++ ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I"); ++ ni_iahostID = (*env)->GetFieldID(env, ni_iacls, "hostName", "Ljava/lang/String;"); ++ initialized = 1; ++ } ++ ++ if (IS_NULL(host)) { ++ JNU_ThrowNullPointerException(env, "host is null"); ++ return 0; ++ } ++ hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE); ++ CHECK_NULL_RETURN(hostname, NULL); ++ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_flags = AI_CANONNAME; ++ hints.ai_family = AF_INET; ++ ++ /* ++ * Workaround for Solaris bug 4160367 - if a hostname contains a ++ * white space then 0.0.0.0 is returned ++ */ ++ if (isspace(hostname[0])) { ++ JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", ++ (char *)hostname); ++ JNU_ReleaseStringPlatformChars(env, host, hostname); ++ return NULL; ++ } ++ ++ error = getaddrinfo(hostname, NULL, &hints, &res); ++ ++ if (error) { ++ /* report error */ ++ JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", ++ (char *)hostname); ++ JNU_ReleaseStringPlatformChars(env, host, hostname); ++ return NULL; ++ } else { ++ int i = 0; ++ struct addrinfo *itr, *last, *iterator = res; ++ while (iterator != NULL) { ++ int skip = 0; ++ itr = resNew; ++ ++ while (itr != NULL) { ++ struct sockaddr_in *addr1, *addr2; ++ ++ addr1 = (struct sockaddr_in *)iterator->ai_addr; ++ addr2 = (struct sockaddr_in *)itr->ai_addr; ++ if (addr1->sin_addr.s_addr == ++ addr2->sin_addr.s_addr) { ++ skip = 1; ++ break; ++ } ++ ++ itr = itr->ai_next; ++ } ++ ++ if (!skip) { ++ struct addrinfo *next ++ = (struct addrinfo*) malloc(sizeof(struct addrinfo)); ++ if (!next) { ++ JNU_ThrowOutOfMemoryError(env, "heap allocation failed"); ++ ret = NULL; ++ goto cleanupAndReturn; ++ } ++ memcpy(next, iterator, sizeof(struct addrinfo)); ++ next->ai_next = NULL; ++ if (resNew == NULL) { ++ resNew = next; ++ } else { ++ last->ai_next = next; ++ } ++ last = next; ++ i++; ++ } ++ iterator = iterator->ai_next; ++ } ++ ++ retLen = i; ++ iterator = resNew; ++ i = 0; ++ ++ name = (*env)->NewStringUTF(env, hostname); ++ if (IS_NULL(name)) { ++ goto cleanupAndReturn; ++ } ++ ++ ret = (*env)->NewObjectArray(env, retLen, ni_iacls, NULL); ++ if (IS_NULL(ret)) { ++ /* we may have memory to free at the end of this */ ++ goto cleanupAndReturn; ++ } ++ ++ while (iterator != NULL) { ++ /* We need 4 bytes to store ipv4 address; */ ++ int len = 4; ++ ++ jobject iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID); ++ if (IS_NULL(iaObj)) { ++ /* we may have memory to free at the end of this */ ++ ret = NULL; ++ goto cleanupAndReturn; ++ } ++ (*env)->SetIntField(env, iaObj, ni_iaaddressID, ++ ntohl(((struct sockaddr_in*)(iterator->ai_addr))->sin_addr.s_addr)); ++ (*env)->SetObjectField(env, iaObj, ni_iahostID, name); ++ (*env)->SetObjectArrayElement(env, ret, retLen - i -1, iaObj); ++ i++; ++ iterator = iterator->ai_next; ++ } ++ } ++ ++cleanupAndReturn: ++ { ++ struct addrinfo *iterator, *tmp; ++ iterator = resNew; ++ while (iterator != NULL) { ++ tmp = iterator; ++ iterator = iterator->ai_next; ++ free(tmp); ++ } ++ JNU_ReleaseStringPlatformChars(env, host, hostname); ++ } ++ ++ freeaddrinfo(res); ++ ++ return ret; ++ ++} ++ ++/* ++ * Class: java_net_Inet4AddressImpl ++ * Method: getHostByAddr ++ * Signature: (I)Ljava/lang/String; ++ */ ++JNIEXPORT jstring JNICALL ++Java_java_net_Inet4AddressImpl_getHostByAddr(JNIEnv *env, jobject this, ++ jbyteArray addrArray) { ++ jstring ret = NULL; ++ ++ char host[NI_MAXHOST+1]; ++ jfieldID fid; ++ int error = 0; ++ jint family; ++ struct sockaddr *him ; ++ int len = 0; ++ jbyte caddr[4]; ++ jint addr; ++ ++ struct sockaddr_in him4; ++ struct sockaddr *sa; ++ ++ /* ++ * For IPv4 addresses construct a sockaddr_in structure. ++ */ ++ (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr); ++ addr = ((caddr[0]<<24) & 0xff000000); ++ addr |= ((caddr[1] <<16) & 0xff0000); ++ addr |= ((caddr[2] <<8) & 0xff00); ++ addr |= (caddr[3] & 0xff); ++ memset((char *) &him4, 0, sizeof(him4)); ++ him4.sin_addr.s_addr = (uint32_t) htonl(addr); ++ him4.sin_family = AF_INET; ++ sa = (struct sockaddr *) &him4; ++ len = sizeof(him4); ++ ++ error = getnameinfo(sa, len, host, NI_MAXHOST, NULL, 0, ++ NI_NAMEREQD); ++ ++ if (!error) { ++ ret = (*env)->NewStringUTF(env, host); ++ } ++ ++ if (ret == NULL) { ++ JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", NULL); ++ } ++ ++ return ret; ++ ++} ++ ++#else /* defined(_ALLBSD_SOURCE) && !defined(HAS_GLIBC_GETHOSTBY_R) */ ++ + /* the initial size of our hostent buffers */ + #define HENT_BUF_SIZE 1024 + #define BIG_HENT_BUF_SIZE 10240 /* a jumbo-sized one */ + +-#ifndef __GLIBC__ ++#if !defined(__GLIBC__) && !defined(_ALLBSD_SOURCE) + /* gethostname() is in libc.so but I can't find a header file for it */ + extern int gethostname(char *buf, int buf_len); + #endif +@@ -85,13 +361,13 @@ Java_java_net_Inet4AddressImpl_getLocalH + char buf2[HENT_BUF_SIZE]; + int h_error=0; + +-#ifdef __GLIBC__ ++#ifdef HAS_GLIBC_GETHOSTBY_R + gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error); + #else + hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error); + #endif + if (hp) { +-#ifdef __GLIBC__ ++#ifdef HAS_GLIBC_GETHOSTBY_R + gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET, + &res2, buf2, sizeof(buf2), &hp, &h_error); + #else +@@ -178,7 +454,7 @@ Java_java_net_Inet4AddressImpl_lookupAll + } + + /* Try once, with our static buffer. */ +-#ifdef __GLIBC__ ++#ifdef HAS_GLIBC_GETHOSTBY_R + gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error); + #else + hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error); +@@ -191,7 +467,7 @@ Java_java_net_Inet4AddressImpl_lookupAll + */ + if (hp == NULL && errno == ERANGE) { + if ((tmp = (char*)malloc(BIG_HENT_BUF_SIZE))) { +-#ifdef __GLIBC__ ++#ifdef HAS_GLIBC_GETHOSTBY_R + gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE, + &hp, &h_error); + #else +@@ -281,7 +557,7 @@ Java_java_net_Inet4AddressImpl_getHostBy + addr |= ((caddr[2] <<8) & 0xff00); + addr |= (caddr[3] & 0xff); + addr = htonl(addr); +-#ifdef __GLIBC__ ++#ifdef HAS_GLIBC_GETHOSTBY_R + gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent, + buf, sizeof(buf), &hp, &h_error); + #else +@@ -295,7 +571,7 @@ Java_java_net_Inet4AddressImpl_getHostBy + */ + if (hp == NULL && errno == ERANGE) { + if ((tmp = (char*)malloc(BIG_HENT_BUF_SIZE))) { +-#ifdef __GLIBC__ ++#ifdef HAS_GLIBC_GETHOSTBY_R + gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, + &hent, tmp, BIG_HENT_BUF_SIZE, &hp, &h_error); + #else +@@ -317,6 +593,8 @@ Java_java_net_Inet4AddressImpl_getHostBy + return ret; + } + ++#endif /* _ALLBSD_SOURCE */ ++ + #define SET_NONBLOCKING(fd) { \ + int flags = fcntl(fd, F_GETFL); \ + flags |= O_NONBLOCK; \ +diff -upr ../orig/jdk/src/solaris/native/java/net/Inet6AddressImpl.c ./jdk/src/solaris/native/java/net/Inet6AddressImpl.c +--- ../orig/jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2009-05-04 17:37:17.000000000 -0400 +@@ -32,6 +32,9 @@ + #include + #include + #include ++#ifdef _ALLBSD_SOURCE ++#include /* gethostname */ ++#endif + + #include "jvm.h" + #include "jni_util.h" +@@ -48,7 +51,7 @@ + #define NI_MAXHOST 1025 + #endif + +-#ifndef __GLIBC__ ++#if !defined(__GLIBC__) && !defined(_ALLBSD_SOURCE) + /* gethostname() is in libc.so but I can't find a header file for it */ + extern int gethostname(char *buf, int buf_len); + #endif +@@ -71,10 +74,18 @@ Java_java_net_Inet6AddressImpl_getLocalH + /* Something went wrong, maybe networking is not setup? */ + strcpy(hostname, "localhost"); + } else { +-#ifdef __linux__ +- /* On Linux gethostname() says "host.domain.sun.com". On ++#if defined(__linux__) && defined(_ALLBSD_SOURCE) ++ /* On Linux/FreeBSD gethostname() says "host.domain.sun.com". On + * Solaris gethostname() says "host", so extra work is needed. + */ ++ /* ++ * XXXBSD: Though on FreeBSD it's possible case then hostname does ++ * not contain '.' (depends on previous sethostname() call). Maybe ++ * we need to proceed with Solaris way, but using getnameinfo() ++ * in conjunction with gethostby*() breaks thread-safeness, so ++ * we need to protect all calls to gethostby*() and getnameinfo() ++ * using same mutex. ++ */ + #else + /* Solaris doesn't want to give us a fully qualified domain name. + * We do a reverse lookup to try and get one. This works +@@ -110,7 +121,7 @@ Java_java_net_Inet6AddressImpl_getLocalH + } + } + #endif /* AF_INET6 */ +-#endif /* __linux__ */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + } + return (*env)->NewStringUTF(env, hostname); + } +diff -upr ../orig/jdk/src/solaris/native/java/net/NetworkInterface.c ./jdk/src/solaris/native/java/net/NetworkInterface.c +--- ../orig/jdk/src/solaris/native/java/net/NetworkInterface.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/net/NetworkInterface.c 2009-05-04 17:37:17.000000000 -0400 +@@ -23,13 +23,13 @@ + * have any questions. + */ + ++#include ++#include + #include + #include + #include + #include + #include +-#include +-#include + #include + #include + #include +@@ -47,6 +47,19 @@ + #else + #include + #endif ++#if defined(_ALLBSD_SOURCE) ++#include ++#include ++#if defined(__FreeBSD__) || defined(__APPLE__) ++#include ++#include ++#elif defined(__OpenBSD__) ++#include ++#endif ++#include ++#include ++#include ++#endif + + #ifdef __linux__ + #define ifr_index ifr_ifindex +@@ -584,6 +597,7 @@ static netif *enumInterfaces(JNIEnv *env + } + + ++#if !defined(_ALLBSD_SOURCE) + /* + * Enumerates and returns all IPv4 interfaces + */ +@@ -694,6 +708,176 @@ static netif *enumIPv4Interfaces(JNIEnv + return ifs; + } + ++#else /* _ALLBSD_SOURCE */ ++ ++/* ++ * Enumerates and returns all IPv4 interfaces ++ * ++ * WARNING! Make sure that it's correctly synchronized on future JDK ++ * versions imports! ++ */ ++static netif *enumIPv4Interfaces(JNIEnv *env, netif *ifs) ++{ ++ int sock; ++ struct ifaddrs *ifa, *origifa; ++ ++ sock = JVM_Socket(AF_INET, SOCK_DGRAM, 0); ++ if (sock < 0) { ++ /* ++ * If EPROTONOSUPPORT is returned it means we don't have ++ * IPv4 support so don't throw an exception. ++ */ ++ if (errno != EPROTONOSUPPORT) { ++ NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", ++ "Socket creation failed"); ++ } ++ return ifs; ++ } ++ ++ if (getifaddrs(&origifa) != 0) { ++ NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", ++ "getifaddrs() function failed"); ++ close(sock); ++ return ifs; ++ } ++ ++ for (ifa = origifa; ifa != NULL; ifa = ifa->ifa_next) { ++ ++ /* ++ * Skip non-AF_INET entries. ++ */ ++ if (ifa->ifa_addr == NULL || ifa->ifa_addr->sa_family != AF_INET) ++ continue; ++ ++ /* ++ * Add to the list. ++ * ++ * BSDNOTE: in order to optimize code, interface index detection ++ * logic was added directly to addif(). ++ */ ++ ifs = addif(env, ifs, ifa->ifa_name, (-1), AF_INET, ++ ifa->ifa_addr, sizeof(struct sockaddr_in), 0); ++ ++ /* ++ * If an exception occurred then free the list. ++ */ ++ if ((*env)->ExceptionOccurred(env)) { ++ close(sock); ++ freeifaddrs(origifa); ++ freeif(ifs); ++ return NULL; ++ } ++ } ++ ++ /* ++ * Free socket and buffer ++ */ ++ close(sock); ++ freeifaddrs(origifa); ++ return ifs; ++} ++ ++#if defined(AF_INET6) ++/* ++ * Determines the prefix on BSD for IPv6 interfaces. ++ */ ++static ++int prefix(void *val, int size) { ++ u_char *name = (u_char *)val; ++ int byte, bit, plen = 0; ++ ++ for (byte = 0; byte < size; byte++, plen += 8) ++ if (name[byte] != 0xff) ++ break; ++ if (byte == size) ++ return (plen); ++ for (bit = 7; bit != 0; bit--, plen++) ++ if (!(name[byte] & (1 << bit))) ++ break; ++ for (; bit != 0; bit--) ++ if (name[byte] & (1 << bit)) ++ return (0); ++ byte++; ++ for (; byte < size; byte++) ++ if (name[byte]) ++ return (0); ++ return (plen); ++} ++ ++/* ++ * Enumerates and returns all IPv6 interfaces on FreeBSD ++ * ++ * BSDNOTE: it's done in same as IPv4 enumeration and should be carefully ++ * reviewed with each JDK update (according to Solaris/Linux version) ++ */ ++static netif *enumIPv6Interfaces(JNIEnv *env, netif *ifs) { ++ ++ int sock; ++ struct ifaddrs *ifa, *origifa; ++ struct sockaddr_in6 *sin6; ++ struct in6_ifreq ifr6; ++ ++ // Open IPv6 UDP socket. ++ sock = JVM_Socket(AF_INET6, SOCK_DGRAM, 0); ++ if (sock < 0) { ++ NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", ++ "Failed to create IPv6 socket"); ++ return ifs; ++ } ++ ++ if (getifaddrs(&origifa) != 0) { ++ NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", ++ "getifaddrs() function failed"); ++ close(sock); ++ return ifs; ++ } ++ ++ for (ifa = origifa; ifa != NULL; ifa = ifa->ifa_next) { ++ ++ /* ++ * Skip non-AF_INET6 entries. ++ */ ++ if (ifa->ifa_addr == NULL || ifa->ifa_addr->sa_family != AF_INET6) ++ continue; ++ ++ memset(&ifr6, 0, sizeof(ifr6)); ++ strlcpy(ifr6.ifr_name, ifa->ifa_name, sizeof(ifr6.ifr_name)); ++ memcpy(&ifr6.ifr_addr, ifa->ifa_addr, MIN(sizeof(ifr6.ifr_addr), ifa->ifa_addr->sa_len)); ++ ++ if (ioctl(sock, SIOCGIFNETMASK_IN6, (caddr_t)&ifr6) < 0) { ++ NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", ++ "ioctl SIOCGIFNETMASK_IN6 failed"); ++ close(sock); ++ freeifaddrs(origifa); ++ freeif(ifs); ++ return NULL; ++ } ++ ++ /* Add to the list. */ ++ sin6 = (struct sockaddr_in6 *)&ifr6.ifr_addr; ++ ifs = addif(env, ifs, ifa->ifa_name, (-1), AF_INET6, ++ ifa->ifa_addr, sizeof(struct sockaddr_in6), ++ prefix(&sin6->sin6_addr, sizeof(struct in6_addr))); ++ ++ /* If an exception occurred then free the list. */ ++ if ((*env)->ExceptionOccurred(env)) { ++ close(sock); ++ freeifaddrs(origifa); ++ freeif(ifs); ++ return NULL; ++ } ++ } ++ ++ /* ++ * Free socket and ifaddrs buffer ++ */ ++ close(sock); ++ freeifaddrs(origifa); ++ return ifs; ++} ++#endif /* AF_INET6 */ ++ ++#endif /* !_ALLBSD_SOURCE */ + + #if defined(__solaris__) && defined(AF_INET6) + /* +@@ -1014,7 +1198,13 @@ netif *addif(JNIEnv *env, netif *ifs, ch + JNU_ThrowOutOfMemoryError(env, "heap allocation failed"); + return ifs; + } ++#if defined(_ALLBSD_SOURCE) ++ currif->index = if_nametoindex(name); ++ if (currif->index == 0) ++ currif->index = -1; ++#else + currif->index = index; ++#endif + currif->addr = NULL; + currif->childs = NULL; + currif->virtual = isVirtual; +@@ -1302,6 +1492,31 @@ int getMacAddress(JNIEnv *env, const str + * All bytes to 0 means no hardware address. + */ + return -1; ++#elif defined(_ALLBSD_SOURCE) ++ struct ifaddrs *ifa0, *ifa; ++ struct sockaddr *saddr; ++ int i; ++ ++ /* Grab the interface list */ ++ if (!getifaddrs(&ifa0)) { ++ /* Cycle through the interfaces */ ++ for (i = 0, ifa = ifa0; ifa != NULL; ifa = ifa->ifa_next, i++) { ++ saddr = ifa->ifa_addr; ++ /* Link layer contains the MAC address */ ++ if (saddr->sa_family == AF_LINK && !strcmp(ifname, ifa->ifa_name)) { ++ struct sockaddr_dl *sadl = (struct sockaddr_dl *) saddr; ++ /* Check the address is the correct length */ ++ if (sadl->sdl_alen == ETHER_ADDR_LEN) { ++ memcpy(buf, (sadl->sdl_data + sadl->sdl_nlen), ETHER_ADDR_LEN); ++ freeifaddrs(ifa0); ++ return ETHER_ADDR_LEN; ++ } ++ } ++ } ++ freeifaddrs(ifa0); ++ } ++ ++ return -1; + #else + struct arpreq arpreq; + struct sockaddr_in* sin; +@@ -1467,7 +1682,7 @@ JNIEXPORT jint JNICALL Java_java_net_Net + "Socket creation failed"); + } else { + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + memset((char *) &if2, 0, sizeof(if2)); + strcpy(if2.ifr_name, name_utf); + +diff -upr ../orig/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c ./jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c +--- ../orig/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2009-05-04 17:37:17.000000000 -0400 +@@ -23,12 +23,12 @@ + * have any questions. + */ + ++#include ++#include + #include + #include + #include + #include +-#include +-#include + + #ifdef __solaris__ + #include +@@ -335,7 +335,7 @@ Java_java_net_PlainDatagramSocketImpl_di + /* The fdObj'fd */ + jint fd; + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + SOCKADDR addr; + int len; + #endif +@@ -345,26 +345,39 @@ Java_java_net_PlainDatagramSocketImpl_di + } + fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID); + ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #ifdef __linux__ + if (isOldKernel) { + int t = 1; + setsockopt(fd, SOL_SOCKET, SO_BSDCOMPAT, (char*) &t, sizeof(int)); + } else { ++#endif /* __linux__ */ + memset(&addr, 0, sizeof(addr)); + #ifdef AF_INET6 + if (ipv6_available()) { + struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&addr; ++#ifdef __FreeBSD__ ++ him6->sin6_family = AF_INET6; ++#else + him6->sin6_family = AF_UNSPEC; ++#endif + len = sizeof(struct sockaddr_in6); + } else + #endif + { + struct sockaddr_in *him4 = (struct sockaddr_in*)&addr; ++#ifdef __FreeBSD__ ++ him4->sin_family = AF_INET; ++#else + him4->sin_family = AF_UNSPEC; ++#endif + len = sizeof(struct sockaddr_in); + } + JVM_Connect(fd, (struct sockaddr *)&addr, len); ++ /* XXXBSD: here we can get EADDRNOTAVAIL which need to be ignored ++ but since return value is not checked, ignore it */ + ++#ifdef __linux__ + // After disconnecting a UDP socket, Linux kernel will set + // local port to zero if the port number comes from implicit + // bind. Successive send/recv on the same socket will fail. +@@ -387,6 +400,7 @@ Java_java_net_PlainDatagramSocketImpl_di + NET_Bind(fd, (struct sockaddr *)&addr, len); + } + } ++#endif + #else + JVM_Connect(fd, 0, 0); + #endif +@@ -2374,18 +2388,30 @@ static void mcast_join_leave(JNIEnv *env + mname6.ipv6mr_interface = idx; + } + ++#if defined(_ALLBSD_SOURCE) ++#define ADD_MEMBERSHIP IPV6_JOIN_GROUP ++#define DRP_MEMBERSHIP IPV6_LEAVE_GROUP ++#define S_ADD_MEMBERSHIP "IPV6_JOIN_GROUP" ++#define S_DRP_MEMBERSHIP "IPV6_LEAVE_GROUP" ++#else ++#define ADD_MEMBERSHIP IPV6_ADD_MEMBERSHIP ++#define DRP_MEMBERSHIP IPV6_DROP_MEMBERSHIP ++#define S_ADD_MEMBERSHIP "IPV6_ADD_MEMBERSHIP" ++#define S_DRP_MEMBERSHIP "IPV6_DROP_MEMBERSHIP" ++#endif ++ + /* Join the multicast group */ +- if (JVM_SetSockOpt(fd, IPPROTO_IPV6, (join ? IPV6_ADD_MEMBERSHIP : IPV6_DROP_MEMBERSHIP), ++ if (JVM_SetSockOpt(fd, IPPROTO_IPV6, (join ? ADD_MEMBERSHIP : DRP_MEMBERSHIP), + (char *) &mname6, sizeof (mname6)) < 0) { + + if (join) { +- NET_ThrowCurrent(env, "setsockopt IPV6_ADD_MEMBERSHIP failed"); ++ NET_ThrowCurrent(env, "setsockopt " S_ADD_MEMBERSHIP " failed"); + } else { + if (errno == ENOENT) { + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", + "Not a member of the multicast group"); + } else { +- NET_ThrowCurrent(env, "setsockopt IPV6_DROP_MEMBERSHIP failed"); ++ NET_ThrowCurrent(env, "setsockopt " S_DRP_MEMBERSHIP " failed"); + } + } + } +diff -upr ../orig/jdk/src/solaris/native/java/net/PlainSocketImpl.c ./jdk/src/solaris/native/java/net/PlainSocketImpl.c +--- ../orig/jdk/src/solaris/native/java/net/PlainSocketImpl.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/net/PlainSocketImpl.c 2009-05-04 17:37:17.000000000 -0400 +@@ -528,9 +528,11 @@ Java_java_net_PlainSocketImpl_socketConn + if (connect_rv == JVM_IO_INTR) { + JNU_ThrowByName(env, JNU_JAVAIOPKG "InterruptedIOException", + "operation interrupted"); ++#if defined(EPROTO) + } else if (errno == EPROTO) { + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ProtocolException", + "Protocol error"); ++#endif + } else if (errno == ECONNREFUSED) { + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", + "Connection refused"); +diff -upr ../orig/jdk/src/solaris/native/java/net/bsd_close.c ./jdk/src/solaris/native/java/net/bsd_close.c +--- ../orig/jdk/src/solaris/native/java/net/bsd_close.c 2009-05-04 18:32:16.000000000 -0400 ++++ ./jdk/src/solaris/native/java/net/bsd_close.c 2009-05-04 17:37:15.000000000 -0400 +@@ -57,7 +57,7 @@ typedef struct { + /* + * Signal to unblock thread + */ +-static int sigWakeup = (__SIGRTMAX - 2); ++static int sigWakeup = SIGIO; + + /* + * The fd table and the number of file descriptors +diff -upr ../orig/jdk/src/solaris/native/java/net/net_util_md.c ./jdk/src/solaris/native/java/net/net_util_md.c +--- ../orig/jdk/src/solaris/native/java/net/net_util_md.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/net/net_util_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -34,6 +34,15 @@ + #include + #include + ++#ifdef _ALLBSD_SOURCE ++#include ++#include ++#endif ++ ++#ifdef __OpenBSD__ ++#include ++#endif ++ + #ifdef __solaris__ + #include + #include +@@ -219,6 +228,14 @@ NET_GetFileDescriptorID(JNIEnv *env) + return (*env)->GetFieldID(env, cls, "fd", "I"); + } + ++#if defined(DONT_ENABLE_IPV6) ++jint IPv6_supported() ++{ ++ return JNI_FALSE; ++} ++ ++#else /* !DONT_ENABLE_IPV6 */ ++ + jint IPv6_supported() + { + #ifndef AF_INET6 +@@ -355,6 +372,7 @@ jint IPv6_supported() + close(fd); + return JNI_TRUE; + } ++#endif /* DONT_ENABLE_IPV6 */ + + void + NET_AllocSockaddr(struct sockaddr **him, int *len) { +@@ -689,6 +707,10 @@ NET_InetAddressToSockaddr(JNIEnv *env, j + him6->sin6_family = AF_INET6; + *len = sizeof(struct sockaddr_in6) ; + ++#if defined(_ALLBSD_SOURCE) && defined(_AF_INET6) ++// XXXBSD: should we do something with scope id here ? see below linux comment ++#endif ++ + /* + * On Linux if we are connecting to a link-local address + * we need to specify the interface in the scope_id (2.4 kernel only) +@@ -1133,6 +1155,24 @@ NET_SetSockOpt(int fd, int level, int o + #define IPTOS_PREC_MASK 0xe0 + #endif + ++#if defined(_ALLBSD_SOURCE) ++#if defined(KIPC_MAXSOCKBUF) ++ int mib[3]; ++ size_t rlen; ++#endif ++ ++ int *bufsize; ++ ++#ifdef __APPLE__ ++ static int maxsockbuf = -1; ++#else ++ static long maxsockbuf = -1; ++#endif ++ ++ int addopt; ++ struct linger *ling; ++#endif ++ + /* + * IPPROTO/IP_TOS :- + * 1. IPv6 on Solaris: no-op and will be set in flowinfo +@@ -1165,6 +1205,10 @@ NET_SetSockOpt(int fd, int level, int o + *iptos &= (IPTOS_TOS_MASK | IPTOS_PREC_MASK); + } + ++#if defined(AF_INET6) && defined(_ALLBSD_SOURCE) ++// XXXBSD: to be implemented ? ++#endif ++ + /* + * SOL_SOCKET/{SO_SNDBUF,SO_RCVBUF} - On Solaris need to + * ensure that value is <= max_buf as otherwise we get +@@ -1212,6 +1256,83 @@ NET_SetSockOpt(int fd, int level, int o + } + #endif + ++#if defined(_ALLBSD_SOURCE) ++ /* ++ * SOL_SOCKET/{SO_SNDBUF,SO_RCVBUF} - On FreeBSD need to ++ * ensure that value is <= kern.ipc.maxsockbuf as otherwise we get ++ * an ENOBUFS error. ++ */ ++ if (level == SOL_SOCKET) { ++ if (opt == SO_SNDBUF || opt == SO_RCVBUF) { ++#ifdef KIPC_MAXSOCKBUF ++ if (maxsockbuf == -1) { ++ mib[0] = CTL_KERN; ++ mib[1] = KERN_IPC; ++ mib[2] = KIPC_MAXSOCKBUF; ++ rlen = sizeof(maxsockbuf); ++ if (sysctl(mib, 3, &maxsockbuf, &rlen, NULL, 0) == -1) ++ maxsockbuf = 1024; ++ ++#if 1 ++ /* XXXBSD: This is a hack to workaround mb_max/mb_max_adj ++ problem. It should be removed when kern.ipc.maxsockbuf ++ will be real value. */ ++ maxsockbuf = (maxsockbuf/5)*4; ++#endif ++ } ++#elif defined(__OpenBSD__) ++ maxsockbuf = SB_MAX; ++#else ++ maxsockbuf = 64 * 1024; /* XXX: NetBSD */ ++#endif ++ ++ bufsize = (int *)arg; ++ if (*bufsize > maxsockbuf) { ++ *bufsize = maxsockbuf; ++ } ++ ++ if (opt == SO_RCVBUF && *bufsize < 1024) { ++ *bufsize = 1024; ++ } ++ ++ } ++ } ++ ++ /* ++ * On Solaris, SO_REUSEADDR will allow multiple datagram ++ * sockets to bind to the same port. The network jck tests ++ * for this "feature", so we need to emulate it by turning on ++ * SO_REUSEPORT as well for that combination. ++ */ ++ if (level == SOL_SOCKET && opt == SO_REUSEADDR) { ++ int sotype, arglen; ++ ++ arglen = sizeof(sotype); ++ if (getsockopt(fd, SOL_SOCKET, SO_TYPE, (void *)&sotype, &arglen) < 0) { ++ return -1; ++ } ++ ++ if (sotype == SOCK_DGRAM) { ++ addopt = SO_REUSEPORT; ++ setsockopt(fd, level, addopt, arg, len); ++ } ++ } ++ ++ /* ++ * Don't allow SO_LINGER value to be too big. ++ * Current max value (240) is empiric value based on tcp_timer.h's ++ * constant TCP_LINGERTIME, which was doubled. ++ * ++ * XXXBSD: maybe we should step it down to 120 ? ++ */ ++ if (level == SOL_SOCKET && opt == SO_LINGER) { ++ ling = (struct linger *)arg; ++ if (ling->l_linger > 240 || ling->l_linger < 0) { ++ ling->l_linger = 240; ++ } ++ } ++#endif ++ + return setsockopt(fd, level, opt, arg, len); + } + +diff -upr ../orig/jdk/src/solaris/native/java/net/net_util_md.h ./jdk/src/solaris/native/java/net/net_util_md.h +--- ../orig/jdk/src/solaris/native/java/net/net_util_md.h 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/net/net_util_md.h 2009-05-04 17:37:17.000000000 -0400 +@@ -37,7 +37,7 @@ + #endif + + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__FreeBSD__) + extern int NET_Timeout(int s, long timeout); + extern int NET_Read(int s, void* buf, size_t len); + extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, +diff -upr ../orig/jdk/src/solaris/native/java/nio/MappedByteBuffer.c ./jdk/src/solaris/native/java/nio/MappedByteBuffer.c +--- ../orig/jdk/src/solaris/native/java/nio/MappedByteBuffer.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/nio/MappedByteBuffer.c 2009-05-04 17:37:17.000000000 -0400 +@@ -38,7 +38,11 @@ Java_java_nio_MappedByteBuffer_isLoaded0 + jlong address, jlong len) + { + jboolean loaded = JNI_TRUE; ++#if defined(_ALLBSD_SOURCE) ++ jint pageSize = getpagesize(); ++#else + jint pageSize = sysconf(_SC_PAGESIZE); ++#endif + jint numPages = (len + pageSize - 1) / pageSize; + int result = 0; + int i = 0; +@@ -92,7 +96,11 @@ JNIEXPORT void JNICALL + Java_java_nio_MappedByteBuffer_force0(JNIEnv *env, jobject obj, jlong address, + jlong len) + { ++#if defined(_ALLBSD_SOURCE) ++ jlong pageSize = getpagesize(); ++#else + jlong pageSize = sysconf(_SC_PAGESIZE); ++#endif + unsigned long lAddress = address; + + jlong offset = lAddress % pageSize; +diff -upr ../orig/jdk/src/solaris/native/java/util/FileSystemPreferences.c ./jdk/src/solaris/native/java/util/FileSystemPreferences.c +--- ../orig/jdk/src/solaris/native/java/util/FileSystemPreferences.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/util/FileSystemPreferences.c 2009-05-04 17:37:17.000000000 -0400 +@@ -47,8 +47,11 @@ Java_java_util_prefs_FileSystemPreferenc + return (jint) result; + } + +- ++#if defined(_ALLBSD_SOURCE) ++typedef struct flock FLOCK; ++#else + typedef struct flock64 FLOCK; ++#endif + + /** + * Try to open a named lock file. +@@ -86,7 +89,11 @@ Java_java_util_prefs_FileSystemPreferenc + if (fd < 0) { + result[0] = 0; + } else { ++#if defined(_ALLBSD_SOURCE) ++ rc = fcntl(fd, F_SETLK, &fl); ++#else + rc = fcntl(fd, F_SETLK64, &fl); ++#endif + result[1] = errno; + if (rc < 0) { + result[0]= 0; +@@ -116,7 +123,11 @@ Java_java_util_prefs_FileSystemPreferenc + fl.l_start = 0; + fl.l_type = F_UNLCK; + ++#if defined(_ALLBSD_SOURCE) ++ rc = fcntl(fd, F_SETLK, &fl); ++#else + rc = fcntl(fd, F_SETLK64, &fl); ++#endif + + if (rc < 0) { + close(fd); +diff -upr ../orig/jdk/src/solaris/native/java/util/TimeZone_md.c ./jdk/src/solaris/native/java/util/TimeZone_md.c +--- ../orig/jdk/src/solaris/native/java/util/TimeZone_md.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/java/util/TimeZone_md.c 2009-05-05 17:44:22.000000000 -0400 +@@ -31,7 +31,7 @@ + #include + #include + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #include + #include +@@ -49,11 +49,14 @@ + #define fileclose fclose + #endif + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + ++#ifdef __linux__ + static const char *sysconfig_clock_file = "/etc/sysconfig/clock"; ++#endif ++ + static const char *zoneinfo_dir = "/usr/share/zoneinfo"; +-static const char *defailt_zoneinfo_file = "/etc/localtime"; ++static const char *default_zoneinfo_file = "/etc/localtime"; + + /* + * Returns a point to the zone ID portion of the given zoneinfo file +@@ -199,7 +202,9 @@ getPlatformTimeZoneID() + int fd; + char *buf; + size_t size; ++ char zoneinfo_file[PATH_MAX+1]; + ++#ifdef __linux__ + /* + * First, try the ZONE entry in /etc/sysconfig/clock. However, the + * ZONE entry is not set up after initial Red Hat Linux +@@ -254,14 +259,18 @@ getPlatformTimeZoneID() + return tz; + } + } ++#endif /* __linux__ */ + + /* + * Next, try /etc/localtime to find the zone ID. + */ +- if (lstat(defailt_zoneinfo_file, &statbuf) == -1) { ++ if (lstat(default_zoneinfo_file, &statbuf) == -1) { + return NULL; + } + ++ strlcpy(zoneinfo_file, default_zoneinfo_file, PATH_MAX+1); ++ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + /* + * If it's a symlink, get the link name and its zone ID part. (The + * older versions of timeconfig created a symlink as described in +@@ -270,21 +279,25 @@ getPlatformTimeZoneID() + * from /etc/localtime.) + */ + if (S_ISLNK(statbuf.st_mode)) { +- char linkbuf[PATH_MAX+1]; + int len; + +- if ((len = readlink(defailt_zoneinfo_file, linkbuf, sizeof(linkbuf)-1)) == -1) { ++ if ((len = readlink(default_zoneinfo_file, zoneinfo_file, sizeof(zoneinfo_file)-1)) == -1) { + jio_fprintf(stderr, (const char *) "can't get a symlink of %s\n", +- defailt_zoneinfo_file); ++ default_zoneinfo_file); + return NULL; + } +- linkbuf[len] = '\0'; +- tz = getZoneName(linkbuf); ++ zoneinfo_file[len] = '\0'; ++ tz = getZoneName(zoneinfo_file); + if (tz != NULL) { + tz = strdup(tz); ++ return tz; ++ } else { ++ if (lstat(zoneinfo_file, &statbuf) == -1) { ++ return NULL; ++ } + } +- return tz; + } ++#endif /* __linux__ || _ALLBSD_SOURCE */ + + /* + * If it's a regular file, we need to find out the same zoneinfo file +@@ -295,7 +308,7 @@ getPlatformTimeZoneID() + if (buf == NULL) { + return NULL; + } +- if ((fd = open(defailt_zoneinfo_file, O_RDONLY)) == -1) { ++ if ((fd = open(zoneinfo_file, O_RDONLY)) == -1) { + free((void *) buf); + return NULL; + } +@@ -524,7 +537,7 @@ findJavaTZ_md(const char *java_home_dir, + + tz = getenv("TZ"); + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + if (tz == NULL) { + #else + #ifdef __solaris__ +@@ -563,19 +576,32 @@ getGMTOffsetID() + { + time_t offset; + char sign, buf[16]; ++#if defined(_ALLBSD_SOURCE) ++ struct tm *local_tm; ++ time_t clock; ++ ++ clock = time(NULL); ++ tzset(); ++ local_tm = localtime(&clock); ++ if (local_tm->tm_gmtoff >= 0) { ++ offset = (time_t) local_tm->tm_gmtoff; ++ sign = '+'; ++ } else { ++ offset = (time_t) -local_tm->tm_gmtoff; ++ sign = '-'; ++ } ++#else + + if (timezone == 0) { + return strdup("GMT"); +- } +- +- /* Note that the time offset direction is opposite. */ +- if (timezone > 0) { ++ } else if (timezone > 0) { + offset = timezone; + sign = '-'; + } else { + offset = -timezone; + sign = '+'; + } ++#endif + sprintf(buf, (const char *)"GMT%c%02d:%02d", + sign, (int)(offset/3600), (int)((offset%3600)/60)); + return strdup(buf); +diff -upr ../orig/jdk/src/solaris/native/sun/awt/CUPSfuncs.c ./jdk/src/solaris/native/sun/awt/CUPSfuncs.c +--- ../orig/jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2009-05-04 17:37:17.000000000 -0400 +@@ -25,6 +25,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -65,10 +66,11 @@ fn_ppdPageSize j2d_ppdPageSize; + JNIEXPORT jboolean JNICALL + Java_sun_print_CUPSPrinter_initIDs(JNIEnv *env, + jobject printObj) { +- void *handle = dlopen("libcups.so.2", RTLD_LAZY | RTLD_GLOBAL); ++ void *handle = dlopen(VERSIONED_JNI_LIB_NAME("cups", "2"), ++ RTLD_LAZY | RTLD_GLOBAL); + + if (handle == NULL) { +- handle = dlopen("libcups.so", RTLD_LAZY | RTLD_GLOBAL); ++ handle = dlopen(JNI_LIB_NAME("cups"), RTLD_LAZY | RTLD_GLOBAL); + if (handle == NULL) { + return JNI_FALSE; + } +diff -upr ../orig/jdk/src/solaris/native/sun/awt/VDrawingArea.c ./jdk/src/solaris/native/sun/awt/VDrawingArea.c +--- ../orig/jdk/src/solaris/native/sun/awt/VDrawingArea.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/VDrawingArea.c 2009-05-04 17:37:17.000000000 -0400 +@@ -31,7 +31,11 @@ + #endif /* !HEADLESS */ + + #include ++#if defined(_ALLBSD_SOURCE) ++#include ++#else + #include ++#endif + + #ifdef __linux__ + /* XXX: Shouldn't be necessary. */ +diff -upr ../orig/jdk/src/solaris/native/sun/awt/X11Color.c ./jdk/src/solaris/native/sun/awt/X11Color.c +--- ../orig/jdk/src/solaris/native/sun/awt/X11Color.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/X11Color.c 2009-05-04 17:37:17.000000000 -0400 +@@ -33,7 +33,9 @@ + #include + #include + #include ++#if !defined(_ALLBSD_SOURCE) + #include ++#endif + #ifndef HEADLESS + #include + #include +diff -upr ../orig/jdk/src/solaris/native/sun/awt/XDrawingArea.c ./jdk/src/solaris/native/sun/awt/XDrawingArea.c +--- ../orig/jdk/src/solaris/native/sun/awt/XDrawingArea.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/XDrawingArea.c 2009-05-04 17:37:17.000000000 -0400 +@@ -30,7 +30,11 @@ + #include + + #include ++#if defined(_ALLBSD_SOURCE) ++#include ++#else + #include ++#endif + + #ifdef DEBUG + #include /* To get jio_fprintf() */ +diff -upr ../orig/jdk/src/solaris/native/sun/awt/awt_Font.c ./jdk/src/solaris/native/sun/awt/awt_Font.c +--- ../orig/jdk/src/solaris/native/sun/awt/awt_Font.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/awt_Font.c 2009-05-04 17:37:17.000000000 -0400 +@@ -334,7 +334,7 @@ loadFont(Display * display, char *name, + if (strcmp(style, "regular") == 0) { + altstyle = "roman"; + } +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + if (!strcmp(family, "lucidasans")) { + family = "lucida"; + } +diff -upr ../orig/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c ./jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c +--- ../orig/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2009-05-04 17:37:17.000000000 -0400 +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -51,6 +52,8 @@ + #include + #include "Trace.h" + ++#include "jvm_md.h" ++ + #ifdef NETSCAPE + #include + extern int awt_init_xt; +@@ -122,7 +125,7 @@ static char *x11GraphicsConfigClassName + */ + + #define MAXFRAMEBUFFERS 16 +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + typedef struct { + int screen_number; + short x_org; +@@ -631,19 +634,22 @@ void checkNewXineramaScreen(JNIEnv* env, + #endif /* HEADLESS */ + + #ifndef HEADLESS +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + static void xinerama_init_linux() + { +- void* libHandle = 0; +- char* XineramaLibName= "libXinerama.so.1"; ++ void* libHandle = NULL; + int32_t locNumScr = 0; + XineramaScreenInfo *xinInfo; + char* XineramaQueryScreensName = "XineramaQueryScreens"; + XineramaQueryScreensFunc* XineramaQueryScreens = NULL; + + /* load library */ +- libHandle = dlopen(XineramaLibName, RTLD_LAZY | RTLD_GLOBAL); +- if (libHandle != 0) { ++ libHandle = dlopen(VERSIONED_JNI_LIB_NAME("Xinerama", "1"), ++ RTLD_LAZY | RTLD_GLOBAL); ++ if (libHandle == NULL) { ++ libHandle = dlopen(JNI_LIB_NAME("Xinerama"), RTLD_LAZY | RTLD_GLOBAL); ++ } ++ if (libHandle != NULL) { + XineramaQueryScreens = (XineramaQueryScreensFunc*) + dlsym(libHandle, XineramaQueryScreensName); + +@@ -679,11 +685,10 @@ static void xinerama_init_linux() + } + } + #endif +-#ifndef __linux__ /* Solaris */ ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) /* Solaris */ + static void xinerama_init_solaris() + { +- void* libHandle = 0; +- char* XineramaLibName= "libXext.so"; ++ void* libHandle = NULL; + unsigned char fbhints[MAXFRAMEBUFFERS]; + int32_t locNumScr = 0; + /* load and run XineramaGetInfo */ +@@ -692,8 +697,8 @@ static void xinerama_init_solaris() + XineramaGetInfoFunc* XineramaSolarisFunc = NULL; + + /* load library */ +- libHandle = dlopen(XineramaLibName, RTLD_LAZY | RTLD_GLOBAL); +- if (libHandle != 0) { ++ libHandle = dlopen(JNI_LIB_NAME("Xext"), RTLD_LAZY | RTLD_GLOBAL); ++ if (libHandle != NULL) { + XineramaSolarisFunc = (XineramaGetInfoFunc*)dlsym(libHandle, XineramaGetInfoName); + XineramaSolarisCenterFunc = + (XineramaGetCenterHintFunc*)dlsym(libHandle, XineramaGetCenterHintName); +@@ -740,11 +745,11 @@ static void xineramaInit(void) { + } + + DTRACE_PRINTLN("Xinerama extension is available"); +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + xinerama_init_linux(); + #else /* Solaris */ + xinerama_init_solaris(); +-#endif /* __linux__ */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + } + #endif /* HEADLESS */ + +@@ -1600,7 +1605,7 @@ Java_sun_awt_X11GraphicsEnvironment_getX + { + jobject point = NULL; + #ifndef HEADLESS /* return NULL in HEADLESS, Linux */ +-#ifndef __linux__ ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) + int x,y; + + AWT_LOCK(); +@@ -1613,7 +1618,7 @@ Java_sun_awt_X11GraphicsEnvironment_getX + DTRACE_PRINTLN("unable to call XineramaSolarisCenterFunc: symbol is null"); + } + AWT_FLUSH_UNLOCK(); +-#endif /* __linux __ */ ++#endif /* __linux __ || _ALLBSD_SOURCE */ + #endif /* HEADLESS */ + return point; + } +@@ -1678,7 +1683,11 @@ X11GD_InitXrandrFuncs(JNIEnv *env) + { + int rr_maj_ver = 0, rr_min_ver = 0; + +- void *pLibRandR = dlopen("libXrandr.so.2", RTLD_LAZY | RTLD_LOCAL); ++ void *pLibRandR = dlopen(VERSIONED_JNI_LIB_NAME("Xrandr", "2"), ++ RTLD_LAZY | RTLD_LOCAL); ++ if (pLibRandR == NULL) { ++ pLibRandR = dlopen(JNI_LIB_NAME("Xrandr"), RTLD_LAZY | RTLD_LOCAL); ++ } + if (pLibRandR == NULL) { + J2dRlsTraceLn(J2D_TRACE_ERROR, + "X11GD_InitXrandrFuncs: Could not open libXrandr.so.2"); +diff -upr ../orig/jdk/src/solaris/native/sun/awt/awt_InputMethod.c ./jdk/src/solaris/native/sun/awt/awt_InputMethod.c +--- ../orig/jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2009-05-04 17:37:17.000000000 -0400 +@@ -69,7 +69,7 @@ static void PreeditDrawCallback(XIC, XPo + XIMPreeditDrawCallbackStruct *); + static void PreeditCaretCallback(XIC, XPointer, + XIMPreeditCaretCallbackStruct *); +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + static void StatusStartCallback(XIC, XPointer, XPointer); + static void StatusDoneCallback(XIC, XPointer, XPointer); + static void StatusDrawCallback(XIC, XPointer, +@@ -83,7 +83,7 @@ static void StatusDrawCallback(XIC, XPoi + #define PreeditDoneIndex 1 + #define PreeditDrawIndex 2 + #define PreeditCaretIndex 3 +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #define StatusStartIndex 4 + #define StatusDoneIndex 5 + #define StatusDrawIndex 6 +@@ -101,14 +101,14 @@ static XIMProc callback_funcs[NCALLBACKS + (XIMProc)PreeditDoneCallback, + (XIMProc)PreeditDrawCallback, + (XIMProc)PreeditCaretCallback, +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + (XIMProc)StatusStartCallback, + (XIMProc)StatusDoneCallback, + (XIMProc)StatusDrawCallback, + #endif + }; + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #define MAX_STATUS_LEN 100 + typedef struct { + Window w; /*status window id */ +@@ -148,7 +148,7 @@ typedef struct _X11InputMethodData { + #endif /* XAWT */ + jobject x11inputmethod; /* global ref to X11InputMethod instance */ + /* associated with the XIC */ +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + StatusWindow *statusWindow; /* our own status window */ + #else + #ifndef XAWT +@@ -427,7 +427,7 @@ destroyX11InputMethodData(JNIEnv *env, X + static void + freeX11InputMethodData(JNIEnv *env, X11InputMethodData *pX11IMData) + { +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + if (pX11IMData->statusWindow != NULL){ + StatusWindow *sw = pX11IMData->statusWindow; + XFreeGC(awt_display, sw->lightGC); +@@ -533,7 +533,7 @@ awt_x11inputmethod_lookupString(XKeyPres + pX11IMData = getX11InputMethodData(env, currentX11InputMethodInstance); + + if (pX11IMData == NULL) { +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + return False; + #else + return result; +@@ -541,7 +541,7 @@ awt_x11inputmethod_lookupString(XKeyPres + } + + if ((ic = pX11IMData->current_ic) == (XIC)0){ +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + return False; + #else + return result; +@@ -650,7 +650,7 @@ awt_x11inputmethod_lookupString(XKeyPres + return result; + } + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + static StatusWindow *createStatusWindow( + #ifdef XAWT + Window parent) { +@@ -994,7 +994,7 @@ void adjustStatusWindow(Widget shell){ + } + } + } +-#endif /*__linux__*/ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + /* + * Creates two XICs, one for active clients and the other for passive + * clients. All information on those XICs are stored in the +@@ -1051,7 +1051,7 @@ createXIC(Widget w, X11InputMethodData * + return FALSE ; + } + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + on_the_spot_styles |= XIMStatusNothing; + + /*kinput does not support XIMPreeditCallbacks and XIMStatusArea +@@ -1064,7 +1064,7 @@ createXIC(Widget w, X11InputMethodData * + break; + } + } +-#else /*! __linux__ */ ++#else /*! __linux__ && !_ALLBSD_SOURCE */ + #ifdef XAWT + on_the_spot_styles |= XIMStatusNothing; + #else /* !XAWT */ +@@ -1087,7 +1087,7 @@ createXIC(Widget w, X11InputMethodData * + on_the_spot_styles |= XIMStatusNothing; + + #endif /* XAWT */ +-#endif /* __linux__ */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + + for (i = 0; i < im_styles->count_styles; i++) { + active_styles |= im_styles->supported_styles[i] & on_the_spot_styles; +@@ -1135,7 +1135,7 @@ createXIC(Widget w, X11InputMethodData * + NULL); + if (preedit == (XVaNestedList)NULL) + goto err; +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + /*always try XIMStatusCallbacks for active client...*/ + { + status = (XVaNestedList)XVaCreateNestedList(0, +@@ -1157,7 +1157,7 @@ createXIC(Widget w, X11InputMethodData * + XFree((void *)status); + XFree((void *)preedit); + } +-#else /* !__linux__ */ ++#else /* !__linux__ && !_ALLBSD_SOURCE */ + #ifndef XAWT + if (on_the_spot_styles & XIMStatusArea) { + Widget parent; +@@ -1185,7 +1185,7 @@ createXIC(Widget w, X11InputMethodData * + } + #endif /* XAWT */ + XFree((void *)preedit); +-#endif /* __linux__ */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + pX11IMData->ic_passive = XCreateIC(X11im, + XNClientWindow, XtWindow(w), + XNFocusWindow, XtWindow(w), +@@ -1344,7 +1344,7 @@ PreeditCaretCallback(XIC ic, XPointer cl + + } + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + static void + StatusStartCallback(XIC ic, XPointer client_data, XPointer call_data) + { +@@ -1412,7 +1412,7 @@ StatusDrawCallback(XIC ic, XPointer clie + finally: + AWT_UNLOCK(); + } +-#endif /*__linux__*/ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + + static void CommitStringCallback(XIC ic, XPointer client_data, XPointer call_data) { + JNIEnv *env = GetJNIEnv(); +@@ -1522,14 +1522,14 @@ Java_sun_awt_motif_MInputMethod_openXIMN + /* Use IMInstantiate call back only on Linux, as there is a bug in Solaris + (4768335) + */ +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + registered = XRegisterIMInstantiateCallback(dpy, NULL, NULL, + NULL, (XIMProc)OpenXIMCallback, NULL); + if (!registered) { + /* directly call openXIM callback */ + #endif + OpenXIMCallback(dpy, NULL, NULL); +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + } + #endif + +@@ -1593,13 +1593,13 @@ Java_sun_awt_motif_MInputMethod_createXI + #endif /* XAWT */ + globalRef = (*env)->NewGlobalRef(env, this); + pX11IMData->x11inputmethod = globalRef; +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + pX11IMData->statusWindow = NULL; +-#else /* __linux__ */ ++#else /* !__linux__ && !_ALLBSD_SOURCE */ + #ifndef XAWT + pX11IMData->statusWidget = (Widget) NULL; + #endif /* XAWT */ +-#endif /* __linux__ */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + + pX11IMData->lookup_buf = 0; + pX11IMData->lookup_buf_len = 0; +@@ -1746,14 +1746,14 @@ Java_sun_awt_X11_XInputMethod_setXICFocu + setXICFocus(pX11IMData->current_ic, req); + currentX11InputMethodInstance = pX11IMData->x11inputmethod; + currentFocusWindow = XtWindow(w); +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + if (active && pX11IMData->statusWindow && pX11IMData->statusWindow->on) + onoffStatusWindow(pX11IMData, w, True); + #endif + } else { + currentX11InputMethodInstance = NULL; + currentFocusWindow = 0; +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + onoffStatusWindow(pX11IMData, 0, False); + if (pX11IMData->current_ic != NULL) + #endif +@@ -1770,7 +1770,7 @@ JNIEXPORT void JNICALL + Java_sun_awt_X11InputMethod_turnoffStatusWindow(JNIEnv *env, + jobject this) + { +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + X11InputMethodData *pX11IMData; + StatusWindow *statusWindow; + +@@ -1867,7 +1867,7 @@ Java_sun_awt_motif_MInputMethod_configur + X11InputMethodData *pX11IMData; + XVaNestedList status; + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + /*do nothing for linux? */ + #else + AWT_LOCK(); +@@ -1973,7 +1973,7 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_ + JNIEXPORT void JNICALL Java_sun_awt_X11_XInputMethod_adjustStatusWindow + (JNIEnv *env, jobject this, jlong window) + { +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + AWT_LOCK(); + adjustStatusWindow(window); + AWT_UNLOCK(); +diff -upr ../orig/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c ./jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c +--- ../orig/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2009-05-04 17:37:17.000000000 -0400 +@@ -260,7 +260,11 @@ AWT_OnLoad(JavaVM *vm, void *reserved) + } + } + ++#ifdef __APPLE__ ++ strcat(p, ".dylib"); ++#else + strcat(p, ".so"); ++#endif + + JNU_CallStaticMethodByName(env, NULL, "java/lang/System", "load", + "(Ljava/lang/String;)V", +diff -upr ../orig/jdk/src/solaris/native/sun/awt/awt_MToolkit.c ./jdk/src/solaris/native/sun/awt/awt_MToolkit.c +--- ../orig/jdk/src/solaris/native/sun/awt/awt_MToolkit.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/awt_MToolkit.c 2009-05-04 17:37:17.000000000 -0400 +@@ -63,8 +63,9 @@ + extern JavaVM *jvm; + + #ifndef HEADLESS +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + extern void statusWindowEventHandler(XEvent event); ++Boolean awt_dnd_process_event(XEvent* event); + #endif + #endif /* !HEADLESS */ + +@@ -1642,7 +1643,7 @@ processOneEvent(XtInputMask iMask) { + */ + Widget widget=XtWindowToWidget(awt_display, xev.xany.window); + eventNumber++; +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + statusWindowEventHandler(xev); + #endif + xembed_eventHandler(&xev); +diff -upr ../orig/jdk/src/solaris/native/sun/awt/awt_Mlib.c ./jdk/src/solaris/native/sun/awt/awt_Mlib.c +--- ../orig/jdk/src/solaris/native/sun/awt/awt_Mlib.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/awt_Mlib.c 2009-05-04 17:37:17.000000000 -0400 +@@ -32,6 +32,7 @@ + #include + #include "jni.h" + #include ++#include "jvm_md.h" + #include "awt_Mlib.h" + #include "java_awt_image_BufferedImage.h" + +@@ -67,11 +68,11 @@ mlib_status awt_getImagingLib(JNIEnv *en + ((strncmp(name.machine, "sun4v" , 5) == 0) && + (getenv("USE_VIS_ON_SUN4V") != NULL))) + { +- handle = dlopen("libmlib_image_v.so", RTLD_LAZY); ++ handle = dlopen(JNI_LIB_NAME("mlib_image_v"), RTLD_LAZY); + } + + if (handle == NULL) { +- handle = dlopen("libmlib_image.so", RTLD_LAZY); ++ handle = dlopen(JNI_LIB_NAME("mlib_image"), RTLD_LAZY); + } + + if (handle == NULL) { +diff -upr ../orig/jdk/src/solaris/native/sun/awt/awt_Robot.c ./jdk/src/solaris/native/sun/awt/awt_Robot.c +--- ../orig/jdk/src/solaris/native/sun/awt/awt_Robot.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/awt_Robot.c 2009-05-04 17:37:17.000000000 -0400 +@@ -45,7 +45,7 @@ + #include "wsutils.h" + #include "list.h" + #include "multiVis.h" +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #endif + +diff -upr ../orig/jdk/src/solaris/native/sun/awt/awt_util.h ./jdk/src/solaris/native/sun/awt/awt_util.h +--- ../orig/jdk/src/solaris/native/sun/awt/awt_util.h 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/awt_util.h 2009-05-04 17:37:17.000000000 -0400 +@@ -187,15 +187,20 @@ JNU_GetCharField(JNIEnv *env, jobject se + #ifdef __solaris__ + extern Widget awt_util_getXICStatusAreaWindow(Widget w); + #else ++#if defined(_ALLBSD_SOURCE) ++int32_t awt_util_getIMStatusHeight(Widget vw); ++Widget awt_util_getXICStatusAreaWindow(Widget w); ++#else + int32_t awt_util_getIMStatusHeight(Widget vw); + XVaNestedList awt_util_getXICStatusAreaList(Widget w); + Widget awt_util_getXICStatusAreaWindow(Widget w); + #endif ++#endif + + + + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + typedef struct _XmImRefRec { + Cardinal num_refs; /* Number of referencing widgets. */ + Cardinal max_refs; /* Maximum length of refs array. */ +diff -upr ../orig/jdk/src/solaris/native/sun/awt/awt_wm.c ./jdk/src/solaris/native/sun/awt/awt_wm.c +--- ../orig/jdk/src/solaris/native/sun/awt/awt_wm.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/awt_wm.c 2009-05-04 17:37:17.000000000 -0400 +@@ -121,12 +121,19 @@ static Atom XA_KWM_WIN_ICONIFIED; + static Atom XA_KWM_WIN_MAXIMIZED; + + /* OpenLook */ ++static Atom _XA_OL_DECOR_ADD; + static Atom _XA_OL_DECOR_DEL; + static Atom _XA_OL_DECOR_HEADER; + static Atom _XA_OL_DECOR_RESIZE; + static Atom _XA_OL_DECOR_PIN; + static Atom _XA_OL_DECOR_CLOSE; + ++/* AfterStep */ ++static Atom _XA_AS_STYLE; ++ ++/* WindowMaker */ ++static Atom _XA_WINDOWMAKER_STATE; ++ + /* For _NET_WM_STATE ClientMessage requests */ + #define _NET_WM_STATE_REMOVE 0 /* remove/unset property */ + #define _NET_WM_STATE_ADD 1 /* add/set property */ +@@ -193,7 +200,12 @@ awt_wm_initAtoms(void) + { &_XA_OL_DECOR_HEADER, "_OL_DECOR_HEADER" }, + { &_XA_OL_DECOR_RESIZE, "_OL_DECOR_RESIZE" }, + { &_XA_OL_DECOR_PIN, "_OL_DECOR_PIN" }, +- { &_XA_OL_DECOR_CLOSE, "_OL_DECOR_CLOSE" } ++ { &_XA_OL_DECOR_CLOSE, "_OL_DECOR_CLOSE" }, ++ { &_XA_OL_DECOR_ADD, "_OL_DECOR_ADD" }, ++ ++ { &_XA_AS_STYLE, "_XA_AS_STYLE" }, ++ ++ { &_XA_WINDOWMAKER_STATE, "_XA_WINDOWMAKER_STATE" } + }; + #define ATOM_LIST_LENGTH (sizeof(atom_list)/sizeof(atom_list[0])) + +@@ -942,6 +954,39 @@ awt_wm_isMotif(void) + return True; + } + ++/* ++ * Window Maker. ++ */ ++static Boolean ++awt_wm_isWindowmaker() ++{ ++ if (awt_wm_atomInterned(&_XA_WINDOWMAKER_STATE, "_WINDOWMAKER_STATE")) ++ return True; ++ return False; ++} ++ ++/* ++ * Afterstep. ++ */ ++static Boolean ++awt_wm_isAfterstep() ++{ ++ if (awt_wm_atomInterned(&_XA_AS_STYLE, "_AS_STYLE")) ++ return True; ++ return False; ++} ++ ++/* ++ * FVWM 2. ++ */ ++static Boolean ++awt_wm_isFvwm2() ++{ ++ if (awt_wm_atomInterned(&_XA_OL_DECOR_ADD, "_OL_DECOR_ADD") ++ && !awt_wm_atomInterned(&_XA_OL_DECOR_PIN, "_OL_DECOR_PIN")) ++ return True; ++ return False; ++} + + static Boolean + awt_wm_isNetWMName(char *name) +@@ -1280,6 +1325,12 @@ awt_wm_getRunningWM(void) + else if (awt_wm_isKDE2()) { + awt_wmgr = KDE2_WM; + } ++ else if (awt_wm_isWindowmaker()) { ++ awt_wmgr = WINDOWMAKER_WM; ++ } ++ else if (awt_wm_isAfterstep()) { ++ awt_wmgr = AFTERSTEP_WM; ++ } + /* + * We don't check for legacy WM when we already know that WM + * supports WIN or _NET wm spec. +@@ -1302,6 +1353,9 @@ awt_wm_getRunningWM(void) + awt_wmgr = MOTIF_WM; + } + else if (awt_wm_isOpenLook()) { ++ awt_wmgr = OPENLOOK_WM; ++ } ++ else if (awt_wm_isFvwm2()) { + awt_wmgr = OPENLOOK_WM; + } + else { +diff -upr ../orig/jdk/src/solaris/native/sun/awt/awt_wm.h ./jdk/src/solaris/native/sun/awt/awt_wm.h +--- ../orig/jdk/src/solaris/native/sun/awt/awt_wm.h 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/awt_wm.h 2009-05-04 17:37:17.000000000 -0400 +@@ -45,7 +45,10 @@ enum wmgr_t { + KDE2_WM, + SAWFISH_WM, + ICE_WM, +- METACITY_WM ++ METACITY_WM, ++ AFTERSTEP_WM, ++ WINDOWMAKER_WM, ++ FVWM2_WM + }; + + extern void awt_wm_init(void); +diff -upr ../orig/jdk/src/solaris/native/sun/awt/extutil.h ./jdk/src/solaris/native/sun/awt/extutil.h +--- ../orig/jdk/src/solaris/native/sun/awt/extutil.h 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/extutil.h 2009-05-04 17:37:17.000000000 -0400 +@@ -58,7 +58,7 @@ in this Software without prior written a + */ + /* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */ + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + + #ifndef _EXTUTIL_H_ + #define _EXTUTIL_H_ +@@ -248,4 +248,4 @@ char *proc (Display *dpy, int code, XExt + char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n) + #endif + +-#endif /* __linux__ */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ +diff -upr ../orig/jdk/src/solaris/native/sun/awt/fontpath.c ./jdk/src/solaris/native/sun/awt/fontpath.c +--- ../orig/jdk/src/solaris/native/sun/awt/fontpath.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/fontpath.c 2009-05-04 17:37:17.000000000 -0400 +@@ -23,7 +23,7 @@ + * have any questions. + */ + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #endif /* __linux__ */ + #include +@@ -40,6 +40,7 @@ + + #include + #include ++#include + #include + #ifndef HEADLESS + #include +@@ -58,10 +59,24 @@ + extern Display *awt_display; + #endif /* !HEADLESS */ + ++#ifdef __APPLE__ ++// XXXDARWIN: Hard-code the path to Apple's freetype, as it is ++// not included in the dyld search path by default, and 10.4 ++// does not support -rpath. ++// ++// This ignores the build time setting of ALT_FREETYPE_LIB_PATH, ++// and should be replaced with -rpath/@rpath support on 10.5 or later, ++// or via support for a the FREETYPE_LIB_PATH define. ++#define FONTCONFIG_DLL_VERSIONED X11_PATH "/lib/" VERSIONED_JNI_LIB_NAME("fontconfig", "1") ++#define FONTCONFIG_DLL X11_PATH "/lib/" JNI_LIB_NAME("fontconfig") ++#else ++#define FONTCONFIG_DLL_VERSIONED VERSIONED_JNI_LIB_NAME("fontconfig", "1") ++#define FONTCONFIG_DLL JNI_LIB_NAME("fontconfig") ++#endif + + #define MAXFDIRS 512 /* Max number of directories that contain fonts */ + +-#ifndef __linux__ ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) + /* + * This can be set in the makefile to "/usr/X11" if so desired. + */ +@@ -111,24 +126,40 @@ static char *fullSolarisFontPath[] = { + NULL, /* terminates the list */ + }; + ++#elif _ALLBSD_SOURCE ++static char *fullBSDFontPath[] = { ++ X11_PATH "/lib/X11/fonts/TrueType", ++ X11_PATH "/lib/X11/fonts/truetype", ++ X11_PATH "/lib/X11/fonts/tt", ++ X11_PATH "/lib/X11/fonts/TTF", ++ X11_PATH "/lib/X11/fonts/OTF", ++ PACKAGE_PATH "/share/fonts/TrueType", ++ PACKAGE_PATH "/share/fonts/truetype", ++ PACKAGE_PATH "/share/fonts/tt", ++ PACKAGE_PATH "/share/fonts/TTF", ++ PACKAGE_PATH "/share/fonts/OTF", ++ X11_PATH "/lib/X11/fonts/Type1", ++ PACKAGE_PATH "/share/fonts/Type1", ++ NULL, /* terminates the list */ ++}; + #else /* __linux */ + /* All the known interesting locations we have discovered on + * various flavors of Linux + */ + static char *fullLinuxFontPath[] = { +- "/usr/X11R6/lib/X11/fonts/TrueType", /* RH 7.1+ */ +- "/usr/X11R6/lib/X11/fonts/truetype", /* SuSE */ +- "/usr/X11R6/lib/X11/fonts/tt", +- "/usr/X11R6/lib/X11/fonts/TTF", +- "/usr/X11R6/lib/X11/fonts/OTF", /* RH 9.0 (but empty!) */ +- "/usr/share/fonts/ja/TrueType", /* RH 7.2+ */ +- "/usr/share/fonts/truetype", +- "/usr/share/fonts/ko/TrueType", /* RH 9.0 */ +- "/usr/share/fonts/zh_CN/TrueType", /* RH 9.0 */ +- "/usr/share/fonts/zh_TW/TrueType", /* RH 9.0 */ ++ X11_PATH "/lib/X11/fonts/TrueType", /* RH 7.1+ */ ++ X11_PATH "/lib/X11/fonts/truetype", /* SuSE */ ++ X11_PATH "/lib/X11/fonts/tt", ++ X11_PATH "/lib/X11/fonts/TTF", ++ X11_PATH "/lib/X11/fonts/OTF", /* RH 9.0 (but empty!) */ ++ PACKAGE_PATH "/share/fonts/ja/TrueType", /* RH 7.2+ */ ++ PACKAGE_PATH "/share/fonts/truetype", ++ PACKAGE_PATH "/share/fonts/ko/TrueType", /* RH 9.0 */ ++ PACKAGE_PATH "/share/fonts/zh_CN/TrueType", /* RH 9.0 */ ++ PACKAGE_PATH "/share/fonts/zh_TW/TrueType", /* RH 9.0 */ + "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType", /* Debian */ +- "/usr/X11R6/lib/X11/fonts/Type1", +- "/usr/share/fonts/default/Type1", /* RH 9.0 */ ++ X11_PATH "/lib/X11/fonts/Type1", ++ PACKAGE_PATH "/share/fonts/default/Type1", /* RH 9.0 */ + NULL, /* terminates the list */ + }; + #endif +@@ -351,7 +382,7 @@ static char **getX11FontPath () + + #endif /* !HEADLESS */ + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + /* from awt_LoadLibrary.c */ + JNIEXPORT jboolean JNICALL AWTIsHeadless(); + #endif +@@ -476,8 +507,10 @@ static char *getPlatformFontPathChars(JN + */ + fcdirs = getFontConfigLocations(); + +-#ifdef __linux__ ++#if defined(__linux__) + knowndirs = fullLinuxFontPath; ++#elif defined(_ALLBSD_SOURCE) ++ knowndirs = fullBSDFontPath; + #else /* IF SOLARIS */ + knowndirs = fullSolarisFontPath; + #endif +@@ -488,7 +521,8 @@ static char *getPlatformFontPathChars(JN + * be initialised. + */ + #ifndef HEADLESS +-#ifdef __linux__ /* There's no headless build on linux ... */ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) ++ /* There's no headless build on linux ... */ + if (!AWTIsHeadless()) { /* .. so need to call a function to check */ + #endif + AWT_LOCK(); +@@ -496,7 +530,7 @@ static char *getPlatformFontPathChars(JN + x11dirs = getX11FontPath(); + } + AWT_UNLOCK(); +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + } + #endif + #endif /* !HEADLESS */ +@@ -608,7 +642,7 @@ Java_sun_font_FontManager_populateFontFi + } + + #include +-#ifndef __linux__ /* i.e. is solaris */ ++#if !(defined(__linux__) || defined(__APPLE__)) + #include + #endif + +@@ -654,9 +688,9 @@ static void* openFontConfig() { + * certain symbols - and functionality - to be available. + * Also add explicit search for .so.1 in case .so symlink doesn't exist. + */ +- libfontconfig = dlopen("libfontconfig.so.1", RTLD_LOCAL|RTLD_LAZY); ++ libfontconfig = dlopen(FONTCONFIG_DLL_VERSIONED, RTLD_LOCAL|RTLD_LAZY); + if (libfontconfig == NULL) { +- libfontconfig = dlopen("libfontconfig.so", RTLD_LOCAL|RTLD_LAZY); ++ libfontconfig = dlopen(FONTCONFIG_DLL, RTLD_LOCAL|RTLD_LAZY); + if (libfontconfig == NULL) { + return NULL; + } +diff -upr ../orig/jdk/src/solaris/native/sun/awt/gtk2_interface.c ./jdk/src/solaris/native/sun/awt/gtk2_interface.c +--- ../orig/jdk/src/solaris/native/sun/awt/gtk2_interface.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/gtk2_interface.c 2009-05-04 17:37:17.000000000 -0400 +@@ -30,8 +30,9 @@ + #include + #include "gtk2_interface.h" + #include "java_awt_Transparency.h" ++#include "jvm_md.h" + +-#define GTK2_LIB "libgtk-x11-2.0.so.0" ++#define GTK2_LIB VERSIONED_JNI_LIB_NAME("gtk-x11-2.0", "0") + + #define G_TYPE_INVALID G_TYPE_MAKE_FUNDAMENTAL (0) + #define G_TYPE_NONE G_TYPE_MAKE_FUNDAMENTAL (1) +diff -upr ../orig/jdk/src/solaris/native/sun/awt/list.c ./jdk/src/solaris/native/sun/awt/list.c +--- ../orig/jdk/src/solaris/native/sun/awt/list.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/list.c 2009-05-04 17:37:17.000000000 -0400 +@@ -66,7 +66,11 @@ from the X Consortium. + ----------------------------------------------------------------------- **/ + + #include ++#ifdef _ALLBSD_SOURCE ++#include ++#else + #include ++#endif + #include "list.h" + + +diff -upr ../orig/jdk/src/solaris/native/sun/awt/robot_common.c ./jdk/src/solaris/native/sun/awt/robot_common.c +--- ../orig/jdk/src/solaris/native/sun/awt/robot_common.c 2009-01-27 15:45:50.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/awt/robot_common.c 2009-05-04 17:37:17.000000000 -0400 +@@ -27,6 +27,9 @@ + #error This file should not be included in headless library + #endif + ++#ifdef _ALLBSD_SOURCE ++#include ++#endif + #include "robot_common.h" + + /* +diff -upr ../orig/jdk/src/solaris/native/sun/font/X11FontScaler.c ./jdk/src/solaris/native/sun/font/X11FontScaler.c +--- ../orig/jdk/src/solaris/native/sun/font/X11FontScaler.c 2009-01-27 15:45:51.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/font/X11FontScaler.c 2009-05-04 17:37:17.000000000 -0400 +@@ -32,7 +32,11 @@ + * into X11FontScaler_md.c, which is compiled into another library. + */ + #include ++#if defined(_ALLBSD_SOURCE) ++#include ++#else + #include ++#endif + #include + #include + +diff -upr ../orig/jdk/src/solaris/native/sun/font/X11TextRenderer.c ./jdk/src/solaris/native/sun/font/X11TextRenderer.c +--- ../orig/jdk/src/solaris/native/sun/font/X11TextRenderer.c 2009-01-27 15:45:51.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/font/X11TextRenderer.c 2009-05-04 17:37:17.000000000 -0400 +@@ -39,7 +39,11 @@ + #include "GraphicsPrimitiveMgr.h" + #include "glyphblitting.h" + #include "sunfontids.h" ++#if defined(_ALLBSD_SOURCE) ++#include ++#else + #include ++#endif + + + JNIEXPORT void JNICALL AWTDrawGlyphList +diff -upr ../orig/jdk/src/solaris/native/sun/java2d/j2d_md.h ./jdk/src/solaris/native/sun/java2d/j2d_md.h +--- ../orig/jdk/src/solaris/native/sun/java2d/j2d_md.h 2009-01-27 15:45:51.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/java2d/j2d_md.h 2009-05-04 17:37:17.000000000 -0400 +@@ -28,11 +28,11 @@ + #include + + /* +- * Linux version of does not define intptr_t ++ * Linux and BSD's version of does not define intptr_t + */ +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include +-#endif /* __linux__ */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + + typedef unsigned char jubyte; + typedef unsigned short jushort; +diff -upr ../orig/jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c ./jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c +--- ../orig/jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c 2009-01-27 15:45:51.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c 2009-05-04 17:37:17.000000000 -0400 +@@ -66,6 +66,10 @@ + * MLIB_EDGE_SRC_PADDED + */ + ++#ifdef __OpenBSD__ ++#include ++#endif ++#include + #include + #include + +@@ -102,7 +106,7 @@ typedef union { + + /***************************************************************/ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + static const mlib_u32 mlib_bit_mask4[16] = { + 0x00000000u, 0xFF000000u, 0x00FF0000u, 0xFFFF0000u, +@@ -111,7 +115,7 @@ static const mlib_u32 mlib_bit_mask4[16] + 0x0000FFFFu, 0xFF00FFFFu, 0x00FFFFFFu, 0xFFFFFFFFu + }; + +-#else /* _LITTLE_ENDIAN */ ++#else /* BIG_ENDIAN */ + + static const mlib_u32 mlib_bit_mask4[16] = { + 0x00000000u, 0x000000FFu, 0x0000FF00u, 0x0000FFFFu, +@@ -120,7 +124,7 @@ static const mlib_u32 mlib_bit_mask4[16] + 0xFFFF0000u, 0xFFFF00FFu, 0xFFFFFF00u, 0xFFFFFFFFu + }; + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* LITTLE_ENDIAN */ + + /***************************************************************/ + +@@ -344,11 +348,11 @@ mlib_status mlib_ImageZoom_BIT_1_Nearest + #ifdef _NO_LONGLONG + + typedef struct { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + mlib_u32 uint1, uint0; +-#else /* _LITTLE_ENDIAN */ ++#else /* BIG_ENDIAN */ + mlib_u32 uint0, uint1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* LITTLE_ENDIAN */ + } two_uint; + + /***************************************************************/ +@@ -511,11 +515,11 @@ mlib_status mlib_ImageZoom_BitToGray_1_N + DTYPE mask; + MASK(mask); + off *= 8; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + LSHIFT(dd_old, da[0], 64 - off); +-#else /* _LITTLE_ENDIAN */ ++#else /* BIG_ENDIAN */ + RSHIFT(dd_old, da[0], 64 - off); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* LITTLE_ENDIAN */ + + #ifdef __SUNPRO_C + #pragma pipeloop(0) +@@ -540,30 +544,30 @@ mlib_status mlib_ImageZoom_BitToGray_1_N + + res = (res & 0xff) | (res >> 8); + dd = gray_mask[res]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + /* *da++ = (dd_old >> (64 - off)) | (dd << off);*/ + RSHIFT(dd_old, dd_old, 64 - off); + LSHIFT(dtmp, dd, off); +-#else /* _LITTLE_ENDIAN */ ++#else /* BIG_ENDIAN */ + /* *da++ = (dd_old << (64 - off)) | (dd >> off);*/ + LSHIFT(dd_old, dd_old, 64 - off); + RSHIFT(dtmp, dd, off); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* LITTLE_ENDIAN */ + LOGIC(*da++, dd_old, dtmp, |); + dd_old = dd; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + /* da[0] = (dd_old >> (64 - off)) | (da[0] & ((mlib_u64)((mlib_s64) -1) << off));*/ + LSHIFT(dtmp, mask, off); + LOGIC(dtmp, da[0], dtmp, &); + RSHIFT(dtmp1, dd_old, 64 - off); +-#else /* _LITTLE_ENDIAN */ ++#else /* BIG_ENDIAN */ + /* da[0] = (dd_old << (64 - off)) | (da[0] & ((mlib_u64)((mlib_s64) -1) >> off));*/ + RSHIFT(dtmp, mask, off); + LOGIC(dtmp, da[0], dtmp, &); + LSHIFT(dtmp1, dd_old, 64 - off); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* LITTLE_ENDIAN */ + LOGIC(da[0], dtmp, dtmp1, |); + } + else { /* aligned */ +diff -upr ../orig/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c ./jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c +--- ../orig/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2009-01-27 15:45:51.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2009-05-04 17:37:17.000000000 -0400 +@@ -794,7 +794,7 @@ static AnyFunc* hash_table_vis[HASH_SIZE + static int initialized; + static int usevis = JNI_TRUE; + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + # define ULTRA_CHIP "sparc64" + #else + # define ULTRA_CHIP "sun4u" +diff -upr ../orig/jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h ./jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h +--- ../orig/jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h 2009-01-27 15:45:51.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h 2009-05-04 17:37:17.000000000 -0400 +@@ -27,7 +27,10 @@ + #define OGLFuncs_md_h_Included + + #include ++#ifndef __APPLE__ + #include ++#endif ++#include "jvm_md.h" + #include "J2D_GL/glx.h" + #include "OGLFuncMacros.h" + +@@ -113,7 +116,7 @@ do { \ + { \ + char *libGLPath = getenv("J2D_ALT_LIBGL_PATH"); \ + if (libGLPath == NULL) { \ +- libGLPath = "libGL.so.1"; \ ++ libGLPath = VERSIONED_JNI_LIB_NAME("GL", "1"); \ + } \ + OGL_LIB_HANDLE = dlopen(libGLPath, RTLD_LAZY | RTLD_LOCAL); \ + } \ +diff -upr ../orig/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c ./jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c +--- ../orig/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2009-01-27 15:45:51.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2009-05-04 17:37:17.000000000 -0400 +@@ -32,6 +32,7 @@ + #include "gdefs.h" + + #include "jni_util.h" ++#include "jvm_md.h" + #include "awt_Component.h" + #include "awt_GraphicsEnv.h" + +@@ -128,7 +129,7 @@ Java_sun_java2d_x11_X11SurfaceData_initI + + if (tryDGA && (getenv("NO_J2D_DGA") == NULL)) { + /* we use RTLD_NOW because of bug 4032715 */ +- lib = dlopen("libsunwjdga.so", RTLD_NOW); ++ lib = dlopen(JNI_LIB_NAME("sunwjdga"), RTLD_NOW); + } + dgaAvailable = JNI_FALSE; + if (lib != NULL) { +diff -upr ../orig/jdk/src/solaris/native/sun/jdga/dgalock.c ./jdk/src/solaris/native/sun/jdga/dgalock.c +--- ../orig/jdk/src/solaris/native/sun/jdga/dgalock.c 2009-01-27 15:45:51.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/jdga/dgalock.c 2009-05-04 17:37:17.000000000 -0400 +@@ -44,6 +44,7 @@ + #include + + #include "jni.h" ++#include "jvm_md.h" + #include "jdga.h" + #include "jdgadevice.h" + +@@ -84,10 +85,10 @@ Drawable GetVirtualDrawableStub(Display + static GetVirtualDrawableFunc * GetVirtualDrawable = GetVirtualDrawableStub; + + static void Solaris_DGA_XineramaInit(Display *display) { +- void * handle = 0; ++ void * handle = NULL; + if (IsXineramaOn == NULL) { +- handle = dlopen("libxinerama.so", RTLD_NOW); +- if (handle != 0) { ++ handle = dlopen(JNI_LIB_NAME("xinerama"), RTLD_NOW); ++ if (handle != NULL) { + void *sym = dlsym(handle, "IsXineramaOn"); + IsXineramaOn = (IsXineramaOnFunc *)sym; + if (IsXineramaOn != 0 && (*IsXineramaOn)(display)) { +diff -upr ../orig/jdk/src/solaris/native/sun/management/FileSystemImpl.c ./jdk/src/solaris/native/sun/management/FileSystemImpl.c +--- ../orig/jdk/src/solaris/native/sun/management/FileSystemImpl.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/management/FileSystemImpl.c 2009-05-04 17:37:17.000000000 -0400 +@@ -26,6 +26,10 @@ + #include + #include + ++#if defined(_ALLBSD_SOURCE) ++#include "largefile_bsd.h" ++#endif ++ + #include "jni.h" + #include "jni_util.h" + #include "sun_management_FileSystemImpl.h" +diff -upr ../orig/jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c ./jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c +--- ../orig/jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c 2009-05-04 17:37:17.000000000 -0400 +@@ -33,7 +33,7 @@ + #include + #endif + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #endif + +diff -upr ../orig/jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c ./jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c +--- ../orig/jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c 2009-05-04 17:37:17.000000000 -0400 +@@ -26,11 +26,12 @@ + #include "jni.h" + #include "jni_util.h" + #include "jvm.h" ++#include "jvm_md.h" + #include "jlong.h" + #include "sun_net_spi_DefaultProxySelector.h" + #include + #include +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #else + #include +@@ -109,8 +110,9 @@ Java_sun_net_spi_DefaultProxySelector_in + /** + * Let's try to load le GConf-2 library + */ +- if (dlopen("libgconf-2.so", RTLD_GLOBAL | RTLD_LAZY) != NULL || +- dlopen("libgconf-2.so.4", RTLD_GLOBAL | RTLD_LAZY) != NULL) { ++ if (dlopen(JNI_LIB_NAME("gconf-2"), RTLD_GLOBAL | RTLD_LAZY) != NULL || ++ dlopen(VERSIONED_JNI_LIB_NAME("gconf-2", "4"), ++ RTLD_GLOBAL | RTLD_LAZY) != NULL) { + gconf_ver = 2; + } + if (gconf_ver > 0) { +diff -upr ../orig/jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c ./jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c +--- ../orig/jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2009-05-04 17:37:17.000000000 -0400 +@@ -35,7 +35,7 @@ + #include + #include + +-#if __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #endif + +@@ -86,7 +86,7 @@ Java_sun_nio_ch_DatagramChannelImpl_disc + rv = connect(fd, 0, 0); + #endif + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + { + int len; + SOCKADDR sa; +@@ -96,17 +96,30 @@ Java_sun_nio_ch_DatagramChannelImpl_disc + #ifdef AF_INET6 + if (ipv6_available()) { + struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&sa; ++#if defined(_ALLBSD_SOURCE) ++ him6->sin6_family = AF_INET6; ++#else + him6->sin6_family = AF_UNSPEC; ++#endif + len = sizeof(struct sockaddr_in6); + } else + #endif + { + struct sockaddr_in *him4 = (struct sockaddr_in*)&sa; ++#if defined(_ALLBSD_SOURCE) ++ him4->sin_family = AF_INET; ++#else + him4->sin_family = AF_UNSPEC; ++#endif + len = sizeof(struct sockaddr_in); + } + + rv = connect(fd, (struct sockaddr *)&sa, len); ++ ++#if defined(_ALLBSD_SOURCE) ++ if (rv < 0 && errno == EADDRNOTAVAIL) ++ rv = errno = 0; ++#endif + } + #endif + +diff -upr ../orig/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c ./jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c +--- ../orig/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2009-05-04 17:37:17.000000000 -0400 +@@ -26,15 +26,21 @@ + #include "jni.h" + #include "jni_util.h" + #include "jvm.h" ++#include "jvm_md.h" + #include "jlong.h" + #include + #include ++#include + #include "sun_nio_ch_FileChannelImpl.h" + #include "java_lang_Integer.h" + #include "nio.h" + #include "nio_util.h" + #include + ++#if defined(_ALLBSD_SOURCE) ++#include "largefile_bsd.h" ++#endif ++ + static jfieldID chan_fd; /* jobject 'fd' in sun.io.FileChannelImpl */ + + #ifdef __solaris__ +@@ -59,6 +65,10 @@ sendfile_func* my_sendfile_func = NULL; + typedef ssize_t sendfile64_func(int out_fd, int in_fd, off64_t *offset, size_t count); + + sendfile64_func* my_sendfile64_func = NULL; ++#elif defined(_ALLBSD_SOURCE) ++#include ++#include ++#include + #endif + + JNIEXPORT jlong JNICALL +@@ -68,7 +78,8 @@ Java_sun_nio_ch_FileChannelImpl_initIDs( + chan_fd = (*env)->GetFieldID(env, clazz, "fd", "Ljava/io/FileDescriptor;"); + + #ifdef __solaris__ +- if (dlopen("/usr/lib/libsendfile.so.1", RTLD_GLOBAL | RTLD_LAZY) != NULL) { ++ if (dlopen("/usr/lib/" VERSIONED_JNI_LIB_NAME("sendfile", "1"), ++ RTLD_GLOBAL | RTLD_LAZY) != NULL) { + my_sendfile_func = (sendfile_func*) dlsym(RTLD_DEFAULT, "sendfilev64"); + } + #endif +@@ -278,6 +289,58 @@ Java_sun_nio_ch_FileChannelImpl_transfer + return result; + } + #endif ++ ++#ifdef _ALLBSD_SOURCE ++ /* ++ * XXXBSD: make sure that we're returning what java class may understand ++ * ++ * XXXBSD: I'd prefer to have it implemented with sendfile(), but since ++ * FreeBSD's sendfile() is only supposed to be used in file->socket ++ * schema we need to provide some kind of fall-back operation, if ++ * sendfile() failed with ENOTSOCK error only. ++ */ ++ void *buf; ++ off_t offset = (off_t)position; ++ int r, w = 0; ++ ++ buf = malloc(4096); ++ if (buf == NULL) { ++ JNU_ThrowOutOfMemoryError(env, "heap allocation failed"); ++ return IOS_THROWN; ++ } ++ ++ while ((r = pread(srcFD, buf, 4096, offset)) > 0) { ++ w = write(dstFD, buf, r); ++ if (w == -1) ++ break; ++ offset += w; ++ } ++ free(buf); ++ ++ /* ++ * Similar to solaris if we've transferred any data return ++ * the number of bytes and ignore any error ++ */ ++ if (offset - (off_t)position > 0) ++ return (offset - (off_t)position); ++ ++ /* ++ * Deal with NBIO EAGAIN & EINTR the same as solaris. ++ */ ++ if (r == -1 || w == -1) { ++ switch (errno) { ++ case EAGAIN: ++ return IOS_UNAVAILABLE; ++ case EINTR: ++ return IOS_INTERRUPTED; ++ default: ++ JNU_ThrowIOExceptionWithLastError(env, "Transfer failed"); ++ return IOS_THROWN; ++ } ++ } ++ ++ return (0); ++#endif + } + + JNIEXPORT jint JNICALL +@@ -329,6 +392,23 @@ Java_sun_nio_ch_FileChannelImpl_release0 + fl.l_start = (off64_t)pos; + fl.l_type = F_UNLCK; + lockResult = fcntl(fd, cmd, &fl); ++#if defined(__FreeBSD__) || defined(__OpenBSD__) ++ /* XXXFREEBSD: While doing of preClose0() we're closing actual fd which ++ was locked, so here we'll get an error which need to be ignored to ++ satisfy TCK FileLock test */ ++ /* XXXFREEBSD: backport to 1.4.2 */ ++ if (lockResult < 0 && errno == EBADF) ++ lockResult = errno = 0; ++#endif ++#if defined(__NetBSD__) ++ /* XXXNETBSD: The dup2 in preClose0 is being done onto 1 end of a ++ socketpair which isn't a valid target for F_UNLCK. No good way to see ++ this vs. a bad lock setup so just return errno = 0 there ++ to pass JCK (lock will get removed once all fd's close anyways) */ ++ /* XXXNETBSD: backport to 1.4.2 */ ++ if (lockResult < 0 && errno == EINVAL) ++ lockResult = errno = 0; ++#endif + if (lockResult < 0) { + JNU_ThrowIOExceptionWithLastError(env, "Release failed"); + } +diff -upr ../orig/jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c ./jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c +--- ../orig/jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c 2009-05-04 17:37:17.000000000 -0400 +@@ -32,8 +32,12 @@ + #include + #include + #include ++#include + #include "nio_util.h" + ++#if defined(_ALLBSD_SOURCE) ++#include "largefile_bsd.h" ++#endif + + static int preCloseFD = -1; /* File descriptor to which we dup other fd's + before closing them for real */ +diff -upr ../orig/jdk/src/solaris/native/sun/nio/ch/FileKey.c ./jdk/src/solaris/native/sun/nio/ch/FileKey.c +--- ../orig/jdk/src/solaris/native/sun/nio/ch/FileKey.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/nio/ch/FileKey.c 2009-05-04 17:37:17.000000000 -0400 +@@ -30,6 +30,10 @@ + #include "nio_util.h" + #include "sun_nio_ch_FileKey.h" + ++#if defined(_ALLBSD_SOURCE) ++#include "largefile_bsd.h" ++#endif ++ + static jfieldID key_st_dev; /* id for FileKey.st_dev */ + static jfieldID key_st_ino; /* id for FileKey.st_ino */ + +diff -upr ../orig/jdk/src/solaris/native/sun/nio/ch/Net.c ./jdk/src/solaris/native/sun/nio/ch/Net.c +--- ../orig/jdk/src/solaris/native/sun/nio/ch/Net.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/nio/ch/Net.c 2009-05-04 17:37:17.000000000 -0400 +@@ -140,8 +140,31 @@ Java_sun_nio_ch_Net_localPort(JNIEnv *en + SOCKADDR sa; + int sa_len = SOCKADDR_LEN; + if (getsockname(fdval(env, fdo), (struct sockaddr *)&sa, &sa_len) < 0) { ++#ifdef _ALLBSD_SOURCE ++ /* ++ * XXXBSD: ++ * ECONNRESET is specific to the BSDs. We can not return an error, ++ * as the calling Java code with raise a java.lang.Error given the expectation ++ * that getsockname() will never fail. According to the Single UNIX Specification, ++ * it shouldn't fail. As such, we just fill in generic Linux-compatible values. ++ */ ++ if (errno == ECONNRESET) { ++ struct sockaddr_in *sin; ++ sin = (struct sockaddr_in *) &sa; ++ bzero(sin, sizeof(*sin)); ++ sin->sin_len = sizeof(struct sockaddr_in); ++ sin->sin_family = AF_INET; ++ sin->sin_port = htonl(0); ++ sin->sin_addr.s_addr = INADDR_ANY; ++ } else { ++ handleSocketError(env, errno); ++ return -1; ++ } ++#else /* _ALLBSD_SOURCE */ + handleSocketError(env, errno); + return -1; ++#endif /* _ALLBSD_SOURCE */ ++ + } + return NET_GetPortFromSockaddr((struct sockaddr *)&sa); + } +@@ -153,12 +176,76 @@ Java_sun_nio_ch_Net_localInetAddress(JNI + int sa_len = SOCKADDR_LEN; + int port; + if (getsockname(fdval(env, fdo), (struct sockaddr *)&sa, &sa_len) < 0) { +- handleSocketError(env, errno); +- return NULL; ++#ifdef _ALLBSD_SOURCE ++ /* ++ * XXXBSD: ++ * ECONNRESET is specific to the BSDs. We can not return an error, ++ * as the calling Java code with raise a java.lang.Error with the expectation ++ * that getsockname() will never fail. According to the Single UNIX Specification, ++ * it shouldn't fail. As such, we just fill in generic Linux-compatible values. ++ */ ++ if (errno == ECONNRESET) { ++ struct sockaddr_in *sin; ++ sin = (struct sockaddr_in *) &sa; ++ bzero(sin, sizeof(*sin)); ++ sin->sin_len = sizeof(struct sockaddr_in); ++ sin->sin_family = AF_INET; ++ sin->sin_port = htonl(0); ++ sin->sin_addr.s_addr = INADDR_ANY; ++ } else { ++ handleSocketError(env, errno); ++ return NULL; ++ } ++#else /* _ALLBSD_SOURCE */ ++ handleSocketError(env, errno); ++ return NULL; ++#endif /* _ALLBSD_SOURCE */ ++ + } + return NET_SockaddrToInetAddress(env, (struct sockaddr *)&sa, &port); + } + ++#ifdef _ALLBSD_SOURCE ++ ++#ifndef IP_BLOCK_SOURCE ++ ++#define IP_ADD_SOURCE_MEMBERSHIP 70 /* join a source-specific group */ ++#define IP_DROP_SOURCE_MEMBERSHIP 71 /* drop a single source */ ++#define IP_BLOCK_SOURCE 72 /* block a source */ ++#define IP_UNBLOCK_SOURCE 73 /* unblock a source */ ++ ++#endif /* IP_BLOCK_SOURCE */ ++ ++#ifndef MCAST_BLOCK_SOURCE ++ ++#define MCAST_JOIN_SOURCE_GROUP 82 /* join a source-specific group */ ++#define MCAST_LEAVE_SOURCE_GROUP 83 /* leave a single source */ ++#define MCAST_BLOCK_SOURCE 84 /* block a source */ ++#define MCAST_UNBLOCK_SOURCE 85 /* unblock a source */ ++ ++#endif /* MCAST_BLOCK_SOURCE */ ++ ++#ifndef IPV6_ADD_MEMBERSHIP ++ ++#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP ++#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP ++ ++#endif /* IPV6_ADD_MEMBERSHIP */ ++ ++struct my_ip_mreq_source { ++ struct in_addr imr_multiaddr; ++ struct in_addr imr_interface; ++ struct in_addr imr_sourceaddr; ++}; ++ ++struct my_group_source_req { ++ uint32_t gsr_interface; /* interface index */ ++ struct sockaddr_storage gsr_group; /* group address */ ++ struct sockaddr_storage gsr_source; /* source address */ ++}; ++ ++#endif /* _ALLBSD_SOURCE */ ++ + + #ifdef NEEDED + +@@ -224,7 +311,7 @@ Java_sun_nio_ch_Net_getIntOption0(JNIEnv + int result; + struct linger linger; + void *arg; +- int arglen; ++ socklen_t arglen; + + if (NET_MapSocketOption(opt, &klevel, &kopt) < 0) { + JNU_ThrowByNameWithLastError(env, +@@ -262,7 +349,7 @@ Java_sun_nio_ch_Net_setIntOption0(JNIEnv + int result; + struct linger linger; + void *parg; +- int arglen; ++ socklen_t arglen; + + if (NET_MapSocketOption(opt, &klevel, &kopt) < 0) { + JNU_ThrowByNameWithLastError(env, +@@ -304,9 +391,11 @@ handleSocketError(JNIEnv *env, jint erro + switch (errorValue) { + case EINPROGRESS: /* Non-blocking connect */ + return 0; ++#ifdef EPROTO + case EPROTO: + xn = JNU_JAVANETPKG "ProtocolException"; + break; ++#endif + case ECONNREFUSED: + xn = JNU_JAVANETPKG "ConnectException"; + break; +diff -upr ../orig/jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c ./jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c +--- ../orig/jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c 2009-05-04 17:37:17.000000000 -0400 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#ifndef __APPLE__ + #include ++#endif + #include "NativeFunc.h" + + /* standard GSS method names (ordering is from mapfile) */ +diff -upr ../orig/jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c ./jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c +--- ../orig/jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -28,12 +28,19 @@ + #include + + #include ++#ifndef __APPLE__ + #include ++#endif + + #include + + #include "j2secmod.h" + ++#ifndef RTLD_NOLOAD ++/* A gross hack that will work if the NSS library is only opened once */ ++static void *nssLibHandle = NULL; ++#endif ++ + void *findFunction(JNIEnv *env, jlong jHandle, const char *functionName) { + void *hModule = (void*)jHandle; + void *fAddress = dlsym(hModule, functionName); +@@ -51,7 +58,11 @@ JNIEXPORT jlong JNICALL Java_sun_securit + { + const char *libName = (*env)->GetStringUTFChars(env, jLibName, NULL); + // look up existing handle only, do not load ++#ifdef RTLD_NOLOAD + void *hModule = dlopen(libName, RTLD_NOLOAD); ++#else ++ void *hModule = nssLibHandle; ++#endif + dprintf2("-handle for %s: %u\n", libName, hModule); + (*env)->ReleaseStringUTFChars(env, jLibName, libName); + return (jlong)hModule; +@@ -65,6 +76,9 @@ JNIEXPORT jlong JNICALL Java_sun_securit + + dprintf1("-lib %s\n", libName); + hModule = dlopen(libName, RTLD_LAZY); ++#ifndef RTLD_NOLOAD ++ nssLibHandle = hModule; ++#endif + (*env)->ReleaseStringUTFChars(env, jLibName, libName); + dprintf2("-handle: %u (0X%X)\n", hModule, hModule); + +diff -upr ../orig/jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c ./jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c +--- ../orig/jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -64,7 +64,9 @@ + #include + + #include ++#ifndef __APPLE__ + #include ++#endif + + #include + +diff -upr ../orig/jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c ./jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c +--- ../orig/jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -29,7 +29,9 @@ + #include + + #include ++#ifndef __APPLE__ + #include ++#endif + + #include + +diff -upr ../orig/jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c ./jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c +--- ../orig/jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c 2009-05-04 18:32:16.000000000 -0400 ++++ ./jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c 2009-05-04 17:37:15.000000000 -0400 +@@ -1,461 +1,3 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. +- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +- * +- * This code is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License version 2 only, as +- * published by the Free Software Foundation. Sun designates this +- * particular file as subject to the "Classpath" exception as provided +- * by Sun in the LICENSE file that accompanied this code. +- * +- * This code is distributed in the hope that it will be useful, but WITHOUT +- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +- * version 2 for more details (a copy is included in the LICENSE file that +- * accompanied this code). +- * +- * You should have received a copy of the GNU General Public License version +- * 2 along with this work; if not, write to the Free Software Foundation, +- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +- * +- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +- * CA 95054 USA or visit www.sun.com if you need additional information or +- * have any questions. ++ * Dummy file - needs to be implemented for bsd + */ +- +-#include "jni.h" +-#include "jni_util.h" +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "sun_tools_attach_BsdVirtualMachine.h" +- +-#define RESTARTABLE(_cmd, _result) do { \ +- do { \ +- _result = _cmd; \ +- } while((_result == -1) && (errno == EINTR)); \ +-} while(0) +- +-/* +- * Defines a callback that is invoked for each process +- */ +-typedef void (*ProcessCallback)(const pid_t pid, void* user_data); +- +-/* +- * Invokes the callback function for each process +- */ +-static void forEachProcess(ProcessCallback f, void* user_data) { +- DIR* dir; +- struct dirent* ptr; +- +- /* +- * To locate the children we scan /proc looking for files that have a +- * position integer as a filename. +- */ +- if ((dir = opendir("/proc")) == NULL) { +- return; +- } +- while ((ptr = readdir(dir)) != NULL) { +- pid_t pid; +- +- /* skip current/parent directories */ +- if (strcmp(ptr->d_name, ".") == 0 || strcmp(ptr->d_name, "..") == 0) { +- continue; +- } +- +- /* skip files that aren't numbers */ +- pid = (pid_t)atoi(ptr->d_name); +- if ((int)pid <= 0) { +- continue; +- } +- +- /* invoke the callback */ +- (*f)(pid, user_data); +- } +- closedir(dir); +-} +- +- +-/* +- * Returns the parent pid of a given pid, or -1 if not found +- */ +-static pid_t getParent(pid_t pid) { +- char state; +- FILE* fp; +- char stat[2048]; +- int statlen; +- char fn[32]; +- int i, p; +- char* s; +- +- /* +- * try to open /proc/%d/stat +- */ +- sprintf(fn, "/proc/%d/stat", pid); +- fp = fopen(fn, "r"); +- if (fp == NULL) { +- return -1; +- } +- +- /* +- * The format is: pid (command) state ppid ... +- * As the command could be anything we must find the right most +- * ")" and then skip the white spaces that follow it. +- */ +- statlen = fread(stat, 1, 2047, fp); +- stat[statlen] = '\0'; +- fclose(fp); +- s = strrchr(stat, ')'); +- if (s == NULL) { +- return -1; +- } +- do s++; while (isspace(*s)); +- i = sscanf(s, "%c %d", &state, &p); +- return (pid_t)p; +-} +- +- +-/* +- * Class: sun_tools_attach_BsdVirtualMachine +- * Method: socket +- * Signature: ()I +- */ +-JNIEXPORT jint JNICALL Java_sun_tools_attach_BsdVirtualMachine_socket +- (JNIEnv *env, jclass cls) +-{ +- int fd = socket(PF_UNIX, SOCK_STREAM, 0); +- if (fd == -1) { +- JNU_ThrowIOExceptionWithLastError(env, "socket"); +- } +- return (jint)fd; +-} +- +-/* +- * Class: sun_tools_attach_BsdVirtualMachine +- * Method: connect +- * Signature: (ILjava/lang/String;)I +- */ +-JNIEXPORT void JNICALL Java_sun_tools_attach_BsdVirtualMachine_connect +- (JNIEnv *env, jclass cls, jint fd, jstring path) +-{ +- jboolean isCopy; +- const char* p = GetStringPlatformChars(env, path, &isCopy); +- if (p != NULL) { +- struct sockaddr_un addr; +- int err = 0; +- +- addr.sun_family = AF_UNIX; +- strcpy(addr.sun_path, p); +- +- if (connect(fd, (struct sockaddr*)&addr, sizeof(addr)) == -1) { +- err = errno; +- } +- +- if (isCopy) { +- JNU_ReleaseStringPlatformChars(env, path, p); +- } +- +- /* +- * If the connect failed then we throw the appropriate exception +- * here (can't throw it before releasing the string as can't call +- * JNI with pending exception) +- */ +- if (err != 0) { +- if (err == ENOENT) { +- JNU_ThrowByName(env, "java/io/FileNotFoundException", NULL); +- } else { +- char* msg = strdup(strerror(err)); +- JNU_ThrowIOException(env, msg); +- if (msg != NULL) { +- free(msg); +- } +- } +- } +- } +-} +- +-/* +- * Class: sun_tools_attach_BsdVirtualMachine +- * Method: isBsdThreads +- * Signature: ()V +- */ +-JNIEXPORT jboolean JNICALL Java_sun_tools_attach_BsdVirtualMachine_isBsdThreads +- (JNIEnv *env, jclass cls) +-{ +-# ifndef _CS_GNU_LIBPTHREAD_VERSION +-# define _CS_GNU_LIBPTHREAD_VERSION 3 +-# endif +- size_t n; +- char* s; +- jboolean res; +- +- n = confstr(_CS_GNU_LIBPTHREAD_VERSION, NULL, 0); +- if (n <= 0) { +- /* glibc before 2.3.2 only has BsdThreads */ +- return JNI_TRUE; +- } +- +- s = (char *)malloc(n); +- if (s == NULL) { +- JNU_ThrowOutOfMemoryError(env, "malloc failed"); +- return JNI_TRUE; +- } +- confstr(_CS_GNU_LIBPTHREAD_VERSION, s, n); +- +- /* +- * If the LIBPTHREAD version include "NPTL" then we know we +- * have the new threads library and not BsdThreads +- */ +- res = (jboolean)(strstr(s, "NPTL") == NULL); +- free(s); +- return res; +-} +- +-/* +- * Structure and callback function used to count the children of +- * a given process, and record the pid of the "manager thread". +- */ +-typedef struct { +- pid_t ppid; +- int count; +- pid_t mpid; +-} ChildCountContext; +- +-static void ChildCountCallback(const pid_t pid, void* user_data) { +- ChildCountContext* context = (ChildCountContext*)user_data; +- if (getParent(pid) == context->ppid) { +- context->count++; +- /* +- * Remember the pid of the first child. If the final count is +- * one then this is the pid of the BsdThreads manager. +- */ +- if (context->count == 1) { +- context->mpid = pid; +- } +- } +-} +- +-/* +- * Class: sun_tools_attach_BsdVirtualMachine +- * Method: getBsdThreadsManager +- * Signature: (I)I +- */ +-JNIEXPORT jint JNICALL Java_sun_tools_attach_BsdVirtualMachine_getBsdThreadsManager +- (JNIEnv *env, jclass cls, jint pid) +-{ +- ChildCountContext context; +- +- /* +- * Iterate over all processes to find how many children 'pid' has +- */ +- context.ppid = pid; +- context.count = 0; +- context.mpid = (pid_t)0; +- forEachProcess(ChildCountCallback, (void*)&context); +- +- /* +- * If there's no children then this is likely the pid of the primordial +- * created by the launcher - in that case the BsdThreads manager is the +- * parent of this process. +- */ +- if (context.count == 0) { +- pid_t parent = getParent(pid); +- if ((int)parent > 0) { +- return (jint)parent; +- } +- } +- +- /* +- * There's one child so this is likely the embedded VM case where the +- * the primordial thread == BsdThreads initial thread. The BsdThreads +- * manager in that case is the child. +- */ +- if (context.count == 1) { +- return (jint)context.mpid; +- } +- +- /* +- * If we get here it's most likely we were given the wrong pid +- */ +- JNU_ThrowIOException(env, "Unable to get pid of BsdThreads manager thread"); +- return -1; +-} +- +-/* +- * Structure and callback function used to send a QUIT signal to all +- * children of a given process +- */ +-typedef struct { +- pid_t ppid; +-} SendQuitContext; +- +-static void SendQuitCallback(const pid_t pid, void* user_data) { +- SendQuitContext* context = (SendQuitContext*)user_data; +- pid_t parent = getParent(pid); +- if (parent == context->ppid) { +- kill(pid, SIGQUIT); +- } +-} +- +-/* +- * Class: sun_tools_attach_BsdVirtualMachine +- * Method: sendQuitToChildrenOf +- * Signature: (I)V +- */ +-JNIEXPORT void JNICALL Java_sun_tools_attach_BsdVirtualMachine_sendQuitToChildrenOf +- (JNIEnv *env, jclass cls, jint pid) +-{ +- SendQuitContext context; +- context.ppid = (pid_t)pid; +- +- /* +- * Iterate over all children of 'pid' and send a QUIT signal to each. +- */ +- forEachProcess(SendQuitCallback, (void*)&context); +-} +- +-/* +- * Class: sun_tools_attach_BsdVirtualMachine +- * Method: sendQuitTo +- * Signature: (I)V +- */ +-JNIEXPORT void JNICALL Java_sun_tools_attach_BsdVirtualMachine_sendQuitTo +- (JNIEnv *env, jclass cls, jint pid) +-{ +- if (kill((pid_t)pid, SIGQUIT)) { +- JNU_ThrowIOExceptionWithLastError(env, "kill"); +- } +-} +- +-/* +- * Class: sun_tools_attach_BsdVirtualMachine +- * Method: checkPermissions +- * Signature: (Ljava/lang/String;)V +- */ +-JNIEXPORT void JNICALL Java_sun_tools_attach_BsdVirtualMachine_checkPermissions +- (JNIEnv *env, jclass cls, jstring path) +-{ +- jboolean isCopy; +- const char* p = GetStringPlatformChars(env, path, &isCopy); +- if (p != NULL) { +- struct stat64 sb; +- uid_t uid, gid; +- int res; +- +- /* +- * Check that the path is owned by the effective uid/gid of this +- * process. Also check that group/other access is not allowed. +- */ +- uid = geteuid(); +- gid = getegid(); +- +- res = stat64(p, &sb); +- if (res != 0) { +- /* save errno */ +- res = errno; +- } +- +- /* release p here before we throw an I/O exception */ +- if (isCopy) { +- JNU_ReleaseStringPlatformChars(env, path, p); +- } +- +- if (res == 0) { +- if ( (sb.st_uid != uid) || (sb.st_gid != gid) || +- ((sb.st_mode & (S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) != 0) ) { +- JNU_ThrowIOException(env, "well-known file is not secure"); +- } +- } else { +- char* msg = strdup(strerror(res)); +- JNU_ThrowIOException(env, msg); +- if (msg != NULL) { +- free(msg); +- } +- } +- } +-} +- +-/* +- * Class: sun_tools_attach_BsdVirtualMachine +- * Method: close +- * Signature: (I)V +- */ +-JNIEXPORT void JNICALL Java_sun_tools_attach_BsdVirtualMachine_close +- (JNIEnv *env, jclass cls, jint fd) +-{ +- int res; +- RESTARTABLE(close(fd), res); +-} +- +-/* +- * Class: sun_tools_attach_BsdVirtualMachine +- * Method: read +- * Signature: (I[BI)I +- */ +-JNIEXPORT jint JNICALL Java_sun_tools_attach_BsdVirtualMachine_read +- (JNIEnv *env, jclass cls, jint fd, jbyteArray ba, jint off, jint baLen) +-{ +- unsigned char buf[128]; +- size_t len = sizeof(buf); +- ssize_t n; +- +- size_t remaining = (size_t)(baLen - off); +- if (len > remaining) { +- len = remaining; +- } +- +- RESTARTABLE(read(fd, buf+off, len), n); +- if (n == -1) { +- JNU_ThrowIOExceptionWithLastError(env, "read"); +- } else { +- if (n == 0) { +- n = -1; // EOF +- } else { +- (*env)->SetByteArrayRegion(env, ba, off, (jint)n, (jbyte *)(buf+off)); +- } +- } +- return n; +-} +- +-/* +- * Class: sun_tools_attach_BsdVirtualMachine +- * Method: write +- * Signature: (I[B)V +- */ +-JNIEXPORT void JNICALL Java_sun_tools_attach_BsdVirtualMachine_write +- (JNIEnv *env, jclass cls, jint fd, jbyteArray ba, jint off, jint bufLen) +-{ +- size_t remaining = bufLen; +- do { +- unsigned char buf[128]; +- size_t len = sizeof(buf); +- int n; +- +- if (len > remaining) { +- len = remaining; +- } +- (*env)->GetByteArrayRegion(env, ba, off, len, (jbyte *)buf); +- +- RESTARTABLE(write(fd, buf, len), n); +- if (n > 0) { +- off += n; +- remaining -= n; +- } else { +- JNU_ThrowIOExceptionWithLastError(env, "write"); +- return; +- } +- +- } while (remaining > 0); +-} +diff -upr ../orig/jdk/src/solaris/native/sun/xawt/XWindow.c ./jdk/src/solaris/native/sun/xawt/XWindow.c +--- ../orig/jdk/src/solaris/native/sun/xawt/XWindow.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/xawt/XWindow.c 2009-05-04 17:37:17.000000000 -0400 +@@ -228,10 +228,10 @@ KeymapEntry keymapTable[] = + {java_awt_event_KeyEvent_VK_DOWN, XK_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD}, + + /* Keypad equivalents of Triangular Navigation Block */ +- {java_awt_event_KeyEvent_VK_KP_LEFT, XK_KP_Left, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, +- {java_awt_event_KeyEvent_VK_KP_UP, XK_KP_Up, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, +- {java_awt_event_KeyEvent_VK_KP_RIGHT, XK_KP_Right, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, +- {java_awt_event_KeyEvent_VK_KP_DOWN, XK_KP_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, ++ {java_awt_event_KeyEvent_VK_LEFT, XK_KP_Left, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, ++ {java_awt_event_KeyEvent_VK_UP, XK_KP_Up, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, ++ {java_awt_event_KeyEvent_VK_RIGHT, XK_KP_Right, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, ++ {java_awt_event_KeyEvent_VK_DOWN, XK_KP_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, + + /* Other vendor-specific Triangular Navigation Block */ + {java_awt_event_KeyEvent_VK_LEFT, osfXK_Left, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD}, +@@ -865,7 +865,7 @@ handleKeyEventWithNumLockMask(XEvent *ev + { + KeySym originalKeysym = *keysym; + +-#ifndef __linux__ ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) + /* The following code on Linux will cause the keypad keys + * not to echo on JTextField when the NumLock is on. The + * keysyms will be 0, because the last parameter 2 is not defined. +diff -upr ../orig/jdk/src/solaris/native/sun/xawt/awt_Desktop.c ./jdk/src/solaris/native/sun/xawt/awt_Desktop.c +--- ../orig/jdk/src/solaris/native/sun/xawt/awt_Desktop.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/native/sun/xawt/awt_Desktop.c 2009-05-04 17:37:17.000000000 -0400 +@@ -24,6 +24,7 @@ + */ + + #include ++#include + #include + + typedef int gboolean; +@@ -36,7 +37,7 @@ int init(){ + gboolean (*gnome_vfs_init) (void); + const char *errmsg; + +- vfs_handle = dlopen("libgnomevfs-2.so.0", RTLD_LAZY); ++ vfs_handle = dlopen(VERSIONED_JNI_LIB_NAME("gnomevfs-2", "0"), RTLD_LAZY); + if (vfs_handle == NULL) { + #ifdef INTERNAL_BUILD + fprintf(stderr, "can not load libgnomevfs-2.so\n"); +@@ -54,7 +55,7 @@ int init(){ + // call gonme_vfs_init() + (*gnome_vfs_init)(); + +- gnome_handle = dlopen("libgnome-2.so.0", RTLD_LAZY); ++ gnome_handle = dlopen(VERSIONED_JNI_LIB_NAME("gnome-2", "0"), RTLD_LAZY); + if (gnome_handle == NULL) { + #ifdef INTERNAL_BUILD + fprintf(stderr, "can not load libgnome-2.so\n"); +diff -upr ../orig/jdk/src/solaris/npt/npt_md.h ./jdk/src/solaris/npt/npt_md.h +--- ../orig/jdk/src/solaris/npt/npt_md.h 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/npt/npt_md.h 2009-05-04 17:37:17.000000000 -0400 +@@ -32,9 +32,10 @@ + #include + #include + #include ++#ifndef __APPLE__ + #include +- +-#define NPT_LIBNAME "libnpt.so" ++#endif ++#include + + #define NPT_INITIALIZE(pnpt,version,options) \ + { \ +@@ -43,7 +44,7 @@ + \ + if ( (pnpt) == NULL ) NPT_ERROR("NptEnv* is NULL"); \ + *(pnpt) = NULL; \ +- _handle = dlopen(NPT_LIBNAME, RTLD_LAZY); \ ++ _handle = dlopen(JNI_LIB_NAME("npt"), RTLD_LAZY); \ + if ( _handle == NULL ) NPT_ERROR("Cannot open library"); \ + _sym = dlsym(_handle, "nptInitialize"); \ + if ( _sym == NULL ) NPT_ERROR("Cannot find nptInitialize"); \ +diff -upr ../orig/jdk/src/solaris/transport/socket/socket_md.c ./jdk/src/solaris/transport/socket/socket_md.c +--- ../orig/jdk/src/solaris/transport/socket/socket_md.c 2009-01-27 15:45:52.000000000 -0500 ++++ ./jdk/src/solaris/transport/socket/socket_md.c 2009-05-04 17:37:17.000000000 -0400 +@@ -36,7 +36,7 @@ + #ifdef __solaris__ + #include + #endif +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #include + #endif +@@ -283,7 +283,7 @@ dbgsysTlsGet(int index) { + + #endif + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + int + dbgsysTlsAlloc() { + pthread_key_t key; +diff -upr ../orig/langtools/src/share/classes/com/sun/tools/javah/Util.java ./langtools/src/share/classes/com/sun/tools/javah/Util.java +--- ../orig/langtools/src/share/classes/com/sun/tools/javah/Util.java 2009-01-27 15:46:42.000000000 -0500 ++++ ./langtools/src/share/classes/com/sun/tools/javah/Util.java 2009-05-04 17:37:17.000000000 -0400 +@@ -180,6 +180,14 @@ public class Util { + os = "win32"; + } else if (os.indexOf("Linux") >= 0) { + os = "Linux"; ++ } else if (os.indexOf("FreeBSD") >= 0) { ++ os = "FreeBSD"; ++ } else if (os.indexOf("Darwin") >= 0) { ++ os = "Darwin"; ++ } else if (os.indexOf("NetBSD") >= 0) { ++ os = "NetBSD"; ++ } else if (os.indexOf("OpenBSD") >= 0) { ++ os = "OpenBSD"; + } + String arch = System.getProperty("os.arch"); + String resname = "com.sun.tools.javah.resources." + os + "_" + arch; Added: trunk/dports/java/openjdk6_bootstrap/Portfile =================================================================== --- trunk/dports/java/openjdk6_bootstrap/Portfile (rev 0) +++ trunk/dports/java/openjdk6_bootstrap/Portfile 2009-05-17 22:15:10 UTC (rev 51092) @@ -0,0 +1,40 @@ +# $Id: $ + +PortSystem 1.0 + +name openjdk6_bootstrap +version b16-r1 +set builddate 24_apr_2009 + +categories java +maintainers landonf +platforms darwin + +homepage http://landonf.bikemonkey.org/static/soylatte +description A binary build of OpenJDK6 to be used for bootstrapping the OpenJDK6 port. +long_description \ + OpenJDK is an open-source implementation of the Java Platform, Standard Edition. \ + This port provides binaries to be used for bootstrapping the openjdk6 port, \ + as a Java 6 bootstrap environment is currently required, and Apple's Java 6 \ + is both incompatible with the bootstrapping requirements and not available \ + on 32-bit platforms. + +distname openjdk6-b16-24_apr_2009-r1 +use_bzip2 yes +master_sites http://hg.bikemonkey.org/archive/openjdk6_darwin_macports/ +checksums md5 56b57e1bfbffc65ed7588d2b7166f3ed\ + sha1 0a78144c75380ae5a611d66b724fad348ff29f61 + +use_configure no + +depends_lib port:freetype \ + port:openmotif \ + port:xorg-libX11 + +build {} + +destroot { + set path "${destroot}${prefix}/share/java/${name}/" + xinstall -m 755 -d ${path} + system "(cd ${worksrcpath} && tar cf - *) | (tar -C ${path} -xf -)" +} -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------------------------------------------------------------------------- Previous message: [51091] trunk/dports/devel Next message: [51093] trunk/dports/gnome/gedit/Portfile Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] -------------------------------------------------------------------------------- More information about the macports-changes mailing list ------ Note: ------ hi everyone, I am running my application on AIX 5 which has the mlock() system call(for locking files in memory). When I run this application with root privileges , it runs fine. But since we are denied root privileges for certain machines , we are compelled to use suid bit technique. So using this when I run, execution aborts with the error message "IOT/Abort Trap" and no core dump is created. Can anyone tell why this happens and how can this be solved ? ------ Note: ------ This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project. -------------------------------------------------------------------------------- Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index] Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next] Other format: [Raw text] [Bug c++/18024] New: IOT/Abort trap (core dumped) on AIX with -pthread From: "askees at appfluent dot com" To: gcc-bugs at gcc dot gnu dot org Date: 15 Oct 2004 20:10:45 -0000 Subject: [Bug c++/18024] New: IOT/Abort trap (core dumped) on AIX with -pthread Reply-to: gcc-bugzilla at gcc dot gnu dot org -------------------------------------------------------------------------------- I'm running on a 32-bit AIX 5.1 box. GCC 3.3.5 was configured as follows and bootstrapped. # This directory was configured as follows: /home/downloads/gcc/gcc-3.3.5/configure --with-gcc-version-trigger=/home/downloa ds/gcc/gcc-3.3.5/gcc/version.c --host=powerpc-ibm-aix5.1.0.0 --enable-threads=po six --prefix=/usr/local/gcc/gcc-3.3.5 --enable-languages=c,c++ --norecursion When I compile any program that uses -pthread and also throws exceptions, an "IOT/Abort trap (core dumped)" occurs. To reproduce this bug, use the following program. FILE: main.cpp (begin) int main(int argc, char** argv) { try { throw "bug"; } catch(...) { } return 0; } FILE: main.cpp (end) * When compiled with "g++ main.cpp" the application runs fine. * When compiled with "g++ -pthread main.cpp" the error occurs at runtime. * When compiled with "g++ -lpthread main.cpp" the application runs fine. However, this does not link libgcc_s_pthread which leads to instability in the real threaded application. This bug is similiar to #13391, but 3.3.5 did not contain the patches referenced. -- Summary: IOT/Abort trap (core dumped) on AIX with -pthread Product: gcc Version: 3.3.5 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: askees at appfluent dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18024 -------------------------------------------------------------------------------- Follow-Ups: [Bug c++/18024] IOT/Abort trap (core dumped) on AIX with -pthread From: pinskia at gcc dot gnu dot org [Bug c++/18024] IOT/Abort trap (core dumped) on AIX with -pthread From: pinskia at gcc dot gnu dot org [Bug c++/18024] IOT/Abort trap (core dumped) on AIX with -pthread From: askees at appfluent dot com [Bug c++/18024] IOT/Abort trap (core dumped) on AIX with -pthread From: askees at appfluent dot com [Bug target/18024] IOT/Abort trap (core dumped) on AIX with -pthread From: pinskia at gcc dot gnu dot org Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index] Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next] After many attempts with various configure settings, I was able to get 3.4.2 (with both libstdc++-v3 and libgcc_s_pthread) installed. As in 3.3.5, the problem still exists if both libpthread (in /usr/lib/libpthreads.a) and libgcc_s_pthread are linked. If I explicitly remove libgcc_s_pthread, the core does not occur. However, this library is linked automatically by the -pthread option, so I assume it is important and required. As a side note, I tried the example code in bug #13391 and those test cases are broken as well. ------ Note: ------ Hi I am finding thi error while using ls -la to particular directory. and when I am using cd to other directory then the eroor is IOT/Abort trap(coredump. This is happening with oracle user. root it's ok. Please suggest -------------------------------------------------------------------------------- Replies To This Message Topic: Re: ls: 0653-345 ./..: Permission denied. IOT/Abort trap(coredump) Posted by: michael felt ® 07/13/2006, 20:55:13 Author Profile | Post Reply | Alert | Recommend | Current page | Edit | Main Forum as root try doing su to oracle userid and use cd to the same area and see if it is possible or not. also try as su - oracle. -------------------------------------------------------------------------------- Topic: Re: ls: 0653-345 ./..: Permission denied. IOT/Abort trap(coredump) Posted by: michael felt ® 07/13/2006, 21:00:04 Author Profile | Post Reply | Alert | Recommend | Current page | Edit | Main Forum as root try doing su to oracle userid and use cd to the same area and see if it is possible or not. also try as su - oracle. -------------------------------------------------------------------------------- Topic: Re: ls: 0653-345 ./..: Permission denied. IOT/Abort trap(coredump) Posted by: michael felt ® 07/13/2006, 21:30:41 Author Profile | Post Reply | Alert | Recommend | Current page | Edit | Main Forum as root try doing su to oracle userid and use cd to the same area and see if it is possible or not. also try as su - oracle. ------ Note: ------ APAR status Closed as program error. Error description LoadL 32 core dump in IOT/Abort trap in pthread_kill . pthread_kill(??, ??) at 0xd0062514 _p_raise(??) at 0xd0061f98 abort() at 0xd0212d64 __assert_c99(??, ??, ??, ??) at 0xd0290280 __apl__9BitVectorFCi() at 0xd1974654 .() at 0x10010794 .() at 0x10068240 .() at 0x100638a0 .() at 0x10060f68 .() at 0x100489b4 startup__6ThreadFPv() at 0xd1955234 Local fix Problem summary Negotiator coredumps when a reconfig was done due to bitmap vector out of range when using the API scheduler. Problem conclusion Negotiator will not coredump when a reconfig is done because the bitmap are dynamically resized when using the API scheduler. Temporary fix Comments APAR information APAR number IY63890 Reported component name LOADLEVELER Reported component ID 5765E6900 Reported release 320 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2004-10-27 Closed date 2004-11-17 Last modified date 2004-11-17 APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: ------ Note: ------ IZ01035: NEGOTIATOR ABORTS DUE TO MISSING RUN CLASS DATA STRUCTURE. A fix is available Obtain fix for this APAR APAR status Closed as program error. Error description Negotiator aborts due to missing run class data structure. . The LoadLeveler negotiator daemon aborted when it was unable to locate an internal run class data structure which had mistakenly been deleted. The following traceback is from a core dump produced using a optimized version of LoadLeveler: Type 'help' for help. [using memory image in /tmp/core] reading symbolic information ... IOT/Abort trap in pthread_kill at 0xd005d288 ($t7150) 0xd005d288 (pthread_kill+0x98) 80410014 lwz r2,0x14(r1) pthread_kill(??, ??) at 0xd005d288 _p_raise(??) at 0xd005cd20 raise.raise(??) at 0xd01eff30 abort() at 0xd02102c4 llexcept__FPce() at 0xd1e8d43c .() at 0x10056c6c .() at 0x100a128c .() at 0x1000c408 .() at 0x1009bd04 reExecute__11TransActionFv() at 0xd1f13770 .() at 0x1003a7f4 receive_command__21NetProcessTransActionFP7Machine() at 0xd1f1fd24 do_command__17StreamTransActionFv() at 0xd1f1f8b8 drive_execute__11TransActionFPv() at 0xd1f1bb80 startup__6ThreadFPv() at 0xd20bf4f8 _pthread_body(??) at 0xd004c7e4 The following traceback is from a core dump produced using a debug version of LoadLeveler: Type 'help' for help. [using memory image in /tmp/core] reading symbolic information ... IOT/Abort trap in pthread_kill at 0xd005d288 ($t1545) 0xd005d288 (pthread_kill+0x98) 80410014 lwz r2,0x14(r1) pthread_kill(??, ??) at 0xd005d288 _p_raise(??) at 0xd005cd20 raise.raise(??) at 0xd01eff30 abort() at 0xd02102c4 llexcept(char*,...)(fmt = "Server run class record not found for class %s on machine %s, for step %s", 0x300c7f88, 0x300cd38c, 0x301c2958, 0x0, 0x10015bf1, 0x10015bf1, 0xf047dddc), line 70 in "LlExcep t.C" unnamed block $b601, line 862 in "cmStep.C" unnamed block $b600, line 862 in "cmStep.C" unnamed block $b599, line 862 in "cmStep.C" cmStep::decrement_count()(this = 0x301ec8c8), line 862 in "cmStep.C" cm::enqueue_step_completed(cmStep*,int)(this = 0x3009dac8, cm_step = 0x301ec8c8, call ing_itself = 0), line 991 in "Queues.C" cm::enqueue_step(cmStep*)(this = 0x3009dac8, cm_step = 0x301ec8c8), line 533 in "Queu es.C" unnamed block $b1108, line 1605 in "NegotiatorCmd.C" unnamed block $b1106, line 1605 in "NegotiatorCmd.C" JobCompletedCommand::do_command()(this = 0x301af3d8), line 1605 in "NegotiatorCmd.C" TransAction::reExecute()(this = 0x301af3d8), line 106 in "TransAction.C" LL_CM.execute()(0x301af3d8), line 122 in "TransAction.h" run(LlStream&,Machine*,void*)(s = &(...), m = 0x300c9748, parm = (nil)), line 248 in "CommandTable.h" CommandTable::execute(int,LlStream&,Machine*,void*)(this = 0x300a1338, n = 10, s = &( ...), caller = 0x300c9748, parm= (nil)), line 194 in "CommandTable.h" unnamed block $b4120, line 181 in "NetProcessTransAction.C" NetProcessTransAction::receive_command(Machine*)(this = 0x301c8a58, machine = 0x300c9 748), line 181 in "NetProcessTransAction.C" unnamed block $b4119, line 119 in "NetProcessTransAction.C" StreamTransAction::do_command()(this = 0x301c8a58), line 119 in "NetProcessTransActio n.C" TransAction::reExecute()(this = 0x301c8a58), line 106 in "TransAction.C" LL_Fwork.TransAction::execute()(this = 0x301c8a58), line 122 in "TransAction.h" TransAction::drive_execute(void*)(t = 0x301c8a58), line 84 in "TransAction.C" Thread::startup(void*)(void_running = 0x301f10a8), line 638 in "Thread.pthread.C" _pthread_body(??) at 0xd004c7e4 Local fix Problem summary References to an internal run class data structure by one thread was not sufficiently synchronized with a separate thread which deleted the data structure in situations where classes were drained by the administrator. Subsequent references to the deleted data structure led to unpredictable behavior including a negotiator core dump. Problem conclusion LoadLeveler was changed to re-fetch the run class data structure when necessary to avoid referencing deallocated memory. Temporary fix Comments APAR information APAR number IZ01035 Reported component name LOADLEVELER Reported component ID 5765E6900 Reported release 341 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2007-07-03 Closed date 2007-07-03 Last modified date 2007-09-26 APAR is sysrouted FROM one or more of the following: IZ00862 APAR is sysrouted TO one or more of the following: Publications Referenced Fix information Fixed component name LOADLEVELER Fixed component ID 5765E6900 Applicable component levels R341 PSY U813877 UP07/09/26 I 1000 PTF to Fileset Mapping U813877 LoadL.full 3.4.1.3 U813001 LoadL.full 3.4.1.2 U813877 LoadL.full 3.4.1.3 U813001 LoadL.full 3.4.1.2 Operating system(s): AIX Software version: 341 Reference #: IZ01035 IBM Group: IBM Server Group Modified date: 2007-09-26 ------ Note: ------ IY94031: CSH ABORT WITH ERROR IOT/ABORT TRAP FOR COMMAND CD .. APPLIES TO AIX 5200-10 A fix is available Obtain fix for this APAR APAR status Closed as program error. Error description If csh is started from a path in which the user does not have read permission for at least one directory in the path, an attempt to cd to the parent directory (..) will exit with the error message "IOT/Abort trap". Reproduction procedure: # id uid=0(root) gid=0(system)... # mkdir /home/xkatoh # chmod 751 /home/xkatoh # mkuser home=/home/xkatoh/test shell=/usr/bin/csh test .. set password for test user etc... # lsuser test ... pgrp=staff groups=staff home=/home/xkatoh/test shell=/usr/bin/csh ... # su - test % cd .. IOT/Abort trap <<<<<<<<<<<<<<<< Local fix Problem summary If csh is started from a path in which the user does not have read permission for at least one directory in the path, an attempt to cd to the parent directory (..) will exit with the error message "IOT/Abort trap". Problem conclusion Make sure initialising the variable holding the working directory. Temporary fix Comments 5200-10 - use AIX APAR IY94031 5300-06 - use AIX APAR IY93624 5300-07 - use AIX APAR IY95886 APAR information APAR number IY94031 Reported component name AIX 5L POWER V5 Reported component ID 5765E6200 Reported release 520 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2007-01-25 Closed date 2007-03-02 Last modified date 2007-12-06 APAR is sysrouted FROM one or more of the following: IY93624 APAR is sysrouted TO one or more of the following: Publications Referenced Fix information Fixed component name AIX 5L POWER V5 Fixed component ID 5765E6200 Applicable component levels R520 PSY U805563 UP07/06/06 I 1000 PTF to Fileset Mapping U805563 bos.rte.shell 5.2.0.105 Copyright and trademark information IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml. Rate this page Please take a moment to complete this form to help us better serve you. This material provides me with the information I need. Strongly Agree Agree Neutral Disagree Strongly Disagree This material is clear and easy to understand. Strongly Agree Agree Neutral Disagree Strongly Disagree ------ Note: ------ Re: IOT core dump caused by an exception thrown and catched in shared lib (g++ 3.3.2, AIX 5.1, 64 bit) From: Reto Stahel (reto.stahel_at_nsp-profidatagroup.com) Date: 02/24/04 Next message: chris: "ibm rs6000 microcode on an exabyte" Previous message: P L: "dbx and truss bothers my application" In reply to: Reto Stahel: "Re: IOT core dump caused by an exception thrown and catched in shared lib (g++ 3.3.2, AIX 5.1, 64 bit)" Next in thread: Paul Pluzhnikov: "Re: IOT core dump caused by an exception thrown and catched in shared lib (g++ 3.3.2, AIX 5.1, 64 bit)" Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] -------------------------------------------------------------------------------- Date: Tue, 24 Feb 2004 17:00:51 +0100 "Reto Stahel" schrieb im Newsbeitrag news:c1fkir$srk$1@newshispeed.ch... > "Reto Stahel" schrieb im Newsbeitrag > news:c12662$puj$1@newshispeed.ch... > > > > "Paul Pluzhnikov" schrieb im Newsbeitrag > > news:m34qtnsjdl.fsf@salmon.parasoft.com... > > > "Reto Stahel" writes: > > > > > > > If I compile this sample with gcc 3.3.2 (32bit) it works ok. > > > > If I compile this sample with gcc 2.95.3 (64bit) it works ok. > > > > If I compile this sample with gcc 2.95.3 (32bit) it works ok. > > > > > > I've got a different result from gcc-2.95.3 and gcc-3.3 on AIX5.1: > > > > > > gcc-2.95, 32 and 64-bit works fine > > > gcc-3.3, 32 and 64-bit *both* crash (due to a call to terminate()) > > > > It definitely works on my machine with 32bit and gcc 3.3.2, so this > doesn't > > seem to be the same problem. > > In fact I just tried the same sample on Solaris 8 and it works fine in all > > combinations there (32/64bit, gcc2.95/3.3), so I think it could be a > linking > > problem on AIX. We're using the native linker (bos.rte.bind_cmds > 5.1.0.50). > > > > > > > > > > So the "unwind stack and find handlers, if any" mechanism in gcc-3.3 > > > appears to be broken, and you should probably report this to gcc > > > maintainers. > > > > > > > So it seems that gcc 3.3.2 has a problem with the exception handling > in > > > > shared libraries for 64 bit applications. Or am I just missing a > > > > compiler/linker option? > > > > > > Don't think so. > > > > > > Cheers, > > > -- > > > In order to understand recursion you must first understand recursion. > > > Remove /-nsp/ for email. > > > > I got some more information about this problem now: > It seems that this is not a gcc problem, but a (runtime) linker problem. I > have a bit enhanced the sample and it looks now like this: > > ==== > testlib.cpp > ==== > #include > > class MyException : public std::exception > { > public: > MyException::MyException() > { > cout << "MyException constructor" << endl; > } > > MyException::MyException( const MyException& ref ) > { > m_i = ref.m_i; > cout << "MyException copy constructor" << endl; > } > > int m_i; > }; > > void testthrow() > { > cout << "before try{}" << endl; > try > { > cout << "before throw MyException;" << endl; > throw MyException(); > cout << "After throw MyException;" << endl; > } > catch (MyException ref) > { > cout << "in catch" << endl; > } > cout << "after try{}" << endl; > > return; > } > > ==== > testthrow.cpp > ==== > #include > > extern void testthrow(); > > int main() > { > cout << "before testthrow();" << endl; > testthrow(); > cout << "after testthrow();" << endl; > > return 0; > } > > This is how I make the binary (testthrow1) and the shared object > (libtestlib1.a): > > g++ -Wno-deprecated -fPIC -maix64 -c testlib.cpp > > g++ -shared -Wl,-b64 -maix64 -o libtestlib1.a testlib.o > > g++ -Wno-deprecated -fPIC -maix64 > testthrow.cpp -L/home/sre/64bitTests/cso64 -ltestlib1 -o testthrow1 > > Now if I start the executable the first time on a clean machine I get the > following correct output: > > testthrow1 > before testthrow(); > before try{} > before throw MyException; > MyException constructor > MyException copy constructor > in catch > after try{} > after testthrow(); > > Now if I just rebuild the library and then run the executable again, I get > the IOT core dump: > > > g++ -shared -Wl,-b64 -maix64 -o libtestlib1.a testlib.o > > testthrow1 > before testthrow(); > before try{} > before throw MyException; > MyException constructor > IOT/Abort trap (core dumped) > Here is the dbx-output of the core > dbx testthrow1 Type 'help' for help. reading symbolic information ... [using memory image in core] IOT/Abort trap in . at 0x377c 0x000000000000377c warning: Unable to access address 0x377c from core (dbx) t warning: could not locate trace table from starting address 0x377c raise(??) at 0x900000000020ed4 abort() at 0x90000000002fcac _ZN10__cxxabiv111__terminateEPFvvE(??), line 47 in "eh_terminate.cc" _ZSt9terminatev(), line 57 in "eh_terminate.cc" unnamed block $b16347, line 80 in "eh_throw.cc" __cxa_free_exception(??, ??, ??), line 80 in "eh_throw.cc" _Z9testthrowv() at 0x9000000002f45b8 main() at 0x100000548 > When I look what shared objects are loaded I get the following output > > genkld | grep testlib > 900000000321000 384e /home/sre/64bitTests/cso64/libtestlib1.a/ > 90000000030e000 384e /home/sre/64bitTests/cso64/libtestlib1.a/ > > So the library is now loaded twice which might be one possible source of the > problem. > After I clean up the shared libraries in memory with slibclean the > exectuable testthrow1 runs ok again, as long as I don't rebuild the library. > > Has anybody any idea what's wrong here? > Thanks, > Reto > --- > Remove nsp- for email > > ------ Note: ------ Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare" to compare 2 big buffer : TCL This is a discussion on Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare" to compare 2 big buffer within the TCL forums in Programming Languages category; Hi, I found a problem of TCL under IBM AIX 5.3, if I use some tcl code to compare 2 big files(size > 18M) , I found the tcl will core dump and report message: "unable to realloc 36882016 bytes IOT/Abort trap (core dumped) " I do a test and found maybe it is a special problem of TCL on AIX. Other Unix platforms(hpux,sunos,linux) does not have this problem. The test code is as below: # test "compare 2 big file(>18M) with string compare" --- test.tcl-- # step 1 create 2 big files, size > 18M set string "" for ... ObjectMix Forum > Programming Languages > TCL Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare" to compare 2 big buffer User Name Remember Me? Password Object Mix Register FAQ Calendar Today's Posts Search Search Forums Show Threads Show Posts Advanced Search Google™ Search Go to Page... Page 1 of 2 1 2 > LinkBack Thread Tools #1 03-25-2007, 12:43 PM usenet Guest Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare" to compare 2 big buffer -------------------------------------------------------------------------------- Hi, I found a problem of TCL under IBM AIX 5.3, if I use some tcl code to compare 2 big files(size > 18M) , I found the tcl will core dump and report message: "unable to realloc 36882016 bytes IOT/Abort trap (core dumped) " I do a test and found maybe it is a special problem of TCL on AIX. Other Unix platforms(hpux,sunos,linux) does not have this problem. The test code is as below: # test "compare 2 big file(>18M) with string compare" --- test.tcl-- # step 1 create 2 big files, size > 18M set string "" for {set i 0} {$i < 512} {incr i} { append string test } if {[file exists ./BigFile1 ]} { file delete ./BigFile1 } if {[file exists ./BigFile2 ]} { file delete ./BigFile2 } set fd [open ./BigFile1 w] for {set i 0} {$i < 9000} {incr i} { puts $fd $string } close $fd file copy ./BigFile1 ./BigFile2 # use string compare set fd1 [open ./BigFile1] set fd2 [open ./BigFile2] string compare [read -nonewline $fd1] [read -nonewline $fd2] ; # then tcl will core dump # after up line , tcl will core dump under AIX 5.3(default installation) All the version of tcl 8.4.12, tcl8.4.13 , tcl8.4.14 and tcl 8.5 will occur this problem on AIX 5.3 I test this problem on 2 AIX boxs, both AIX 5.3, with default installation, both of them will core dump. If it has no relation with AIX kernel configuration setting, I think it's a bug, maybe from tcl core,maybe from C lib of AIX. Any suggestion, pls post it or mail me Thanks a lot Eax #2 03-25-2007, 03:17 PM usenet Guest Re: Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare"to compare 2 big buffer -------------------------------------------------------------------------------- eax.wang{} wrote: > Hi, > I found a problem of TCL under IBM AIX 5.3, if I use some tcl code > to compare 2 big files(size > 18M) , I found the tcl will core dump > and report message: > "unable to realloc 36882016 bytes > IOT/Abort trap (core dumped) " Looks like it's running out of memory. Any useful information from the core file? A back-trace might be useful to see where it dumped core. .... > string compare [read -nonewline $fd1] [read -nonewline $fd2] ; # then .... Are you sure this is a problem of [string compare] and not with [read]? Could you try changing that code to: set s1 [read -nonewline $fd1] set s2 [read -nonewline $fd2] string compare $s1 $s2 That might show better exactly which command is causing the problem. If it is the reads then it might be worth trying to increase the buffersize: fconfigure $fd1 -buffersize 1000000 fconfigure $fd2 -buffersize 1000000 Certainly, it looks like a bug somewhere (Tcl shouldn't have a problem dealing with very large strings). You might like to submit a bug to http://sourceforge.net/tracker/?grou...94&atid=110894 . It may well turn out to be an AIX issue, but it's best to have that recorded. -- Neil #3 03-25-2007, 04:44 PM usenet Guest Re: Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare"to compare 2 big buffer -------------------------------------------------------------------------------- Neil Madden wrote: > eax.wang{} wrote: >> I found a problem of TCL under IBM AIX 5.3, if I use some tcl code >> to compare 2 big files(size > 18M) , I found the tcl will core dump >> and report message: >> "unable to realloc 36882016 bytes >> IOT/Abort trap (core dumped) " > > Looks like it's running out of memory. Any useful information from the > core file? A back-trace might be useful to see where it dumped core. That's definitely an out-of-memory problem. They're fatal because there's no practical way to recover, no way to know how much memory would be required to let the program continue or even exit gracefully. >> string compare [read -nonewline $fd1] [read -nonewline $fd2] ; # then > > Are you sure this is a problem of [string compare] and not with [read]? > Could you try changing that code to: > > set s1 [read -nonewline $fd1] > set s2 [read -nonewline $fd2] > string compare $s1 $s2 > > That might show better exactly which command is causing the problem. If > it is the reads then it might be worth trying to increase the buffersize: > > fconfigure $fd1 -buffersize 1000000 > fconfigure $fd2 -buffersize 1000000 That won't help. Using the length argument to [read] to only get 1MB or so at a time will be much more efficient; after all, if they're equal they're also equal by chunks. > Certainly, it looks like a bug somewhere (Tcl shouldn't have a problem > dealing with very large strings). You might like to submit a bug to > http://sourceforge.net/tracker/?grou...94&atid=110894 . It may well > turn out to be an AIX issue, but it's best to have that recorded. As far as I'm aware, Tcl's happy with string sizes up to around 1 billion characters. Beyond that point, things get tricky because of a long-standing bug in the memory management API (can't allocate more than 2GB at once, which isn't an issue on 32bit systems, but is severely limiting on 64bit systems) that won't be fixed until 9.0. But around 36MB shouldn't hit that limit by a long shot. Either the machine is genuinely short of memory (other processes can cause this, which is why Tcl really can't do much to guard against it) or the script is leaking. (Tcl itself is pretty good on the leak front, but can only be as good as the Tcl program being executed; if that leaks, you've still got a problem.) Or an old version is in use that leaks; I wouldn't want to warrant that every old version of Tcl is leak-free. Donal. #4 03-25-2007, 07:05 PM usenet Guest Re: Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare"to compare 2 big buffer -------------------------------------------------------------------------------- Donal K. Fellows wrote: > Neil Madden wrote: >> eax.wang{} wrote: >>> I found a problem of TCL under IBM AIX 5.3, if I use some tcl code >>> to compare 2 big files(size > 18M) , I found the tcl will core dump >>> and report message: >>> "unable to realloc 36882016 bytes >>> IOT/Abort trap (core dumped) " >> >> Looks like it's running out of memory. Any useful information from the >> core file? A back-trace might be useful to see where it dumped core. > > That's definitely an out-of-memory problem. They're fatal because > there's no practical way to recover, no way to know how much memory > would be required to let the program continue or even exit gracefully. > >>> string compare [read -nonewline $fd1] [read -nonewline $fd2] ; # then >> >> Are you sure this is a problem of [string compare] and not with >> [read]? Could you try changing that code to: >> >> set s1 [read -nonewline $fd1] >> set s2 [read -nonewline $fd2] >> string compare $s1 $s2 >> >> That might show better exactly which command is causing the problem. >> If it is the reads then it might be worth trying to increase the >> buffersize: >> >> fconfigure $fd1 -buffersize 1000000 >> fconfigure $fd2 -buffersize 1000000 > > That won't help. Using the length argument to [read] to only get 1MB or > so at a time will be much more efficient; after all, if they're equal > they're also equal by chunks. > >> Certainly, it looks like a bug somewhere (Tcl shouldn't have a problem >> dealing with very large strings). You might like to submit a bug to >> http://sourceforge.net/tracker/?grou...94&atid=110894 . It may >> well turn out to be an AIX issue, but it's best to have that recorded. > > As far as I'm aware, Tcl's happy with string sizes up to around 1 > billion characters. Beyond that point, things get tricky because of a > long-standing bug in the memory management API (can't allocate more than > 2GB at once, which isn't an issue on 32bit systems, but is severely > limiting on 64bit systems) that won't be fixed until 9.0. But around > 36MB shouldn't hit that limit by a long shot. Either the machine is > genuinely short of memory (other processes can cause this, which is why > Tcl really can't do much to guard against it) or the script is leaking. > (Tcl itself is pretty good on the leak front, but can only be as good as > the Tcl program being executed; if that leaks, you've still got a > problem.) Or an old version is in use that leaks; I wouldn't want to > warrant that every old version of Tcl is leak-free. Does AIX have a max process size tuning parameter that might be bitting him (can not remember, been too long since I played on AIX -- but I seem to recall either AIX or HP-UX having such a paramter). Re: Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare" to compare 2 big buffer -------------------------------------------------------------------------------- > Does AIX have a max process size tuning parameter that might be bitting him > (can not remember, been too long since I played on AIX -- but I seem to > recall either AIX or HP-UX having such a paramter). > HP/UX definately has that as a tunable kernel parameter. I just hit that over the stupid DST change. Robert #6 03-26-2007, 02:11 AM usenet Guest Re: Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare" to compare 2 big buffer -------------------------------------------------------------------------------- On Mar 26, 4:17 am, Neil Madden wrote: > Are you sure this is a problem of [string compare] and not with [read]? > Could you try changing that code to: > > set s1 [read -nonewline $fd1] > set s2 [read -nonewline $fd2] > string compare $s1 $s2 > > That might show better exactly which command is causing the problem. If > it is the reads then it might be worth trying to increase the buffersize: > > fconfigure $fd1 -buffersize 1000000 > fconfigure $fd2 -buffersize 1000000 > I test it again with the code > fconfigure $fd1 -buffersize 1000000 > fconfigure $fd2 -buffersize 1000000 > set s1 [read -nonewline $fd1] > set s2 [read -nonewline $fd2] > string compare $s1 $s2 It still core dump and the crash line is at "string compare" part. Thanks for your suggestion, maybe I should report it as a bug. > Certainly, it looks like a bug somewhere (Tcl shouldn't have a problem > dealing with very large strings). You might like to submit a bug tohttp://sourceforge.net/tracker/?group_id=10894&atid=110894. It may well > turn out to be an AIX issue, but it's best to have that recorded. > > -- Neil #7 03-26-2007, 05:21 AM usenet Guest Re: Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare" to compare 2 big buffer -------------------------------------------------------------------------------- On Mar 26, 9:11 am, eax.w...{} wrote: > > It still core dump and the crash line is at "string compare" part. > Thanks for your suggestion, maybe I should report it as a bug. Please do so, and don't forget to give: - the values returned by 'ulimit -a' (in sh or ksh or bash) - the stack crawl where the abort occurs (use a debugger on the core) -Alex #8 03-28-2007, 01:52 AM usenet Guest Re: Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare" to compare 2 big buffer -------------------------------------------------------------------------------- ulimit -a core file size (blocks, -c) 1048575 data seg size (kbytes, -d) 131072 file size (blocks, -f) 1048575 max memory size (kbytes, -m) 32768 open files (-n) 2000 pipe size (512 bytes, -p) 64 stack size (kbytes, -s) 32768 cpu time (seconds, -t) unlimited max user processes (-u) 128 virtual memory (kbytes, -v) 163840 gdb for core dump Program terminated with signal 6, Aborted. #0 0xd0126af0 in ?? () #9 03-28-2007, 08:58 AM usenet Guest Re: Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare" to compare 2 big buffer -------------------------------------------------------------------------------- eax.wang{} wrote: > > ulimit -a > core file size (blocks, -c) 1048575 > data seg size (kbytes, -d) 131072 I had this same issue with FreeBSD when building really large starpacks. I fixed it by adding this to my /boot/loader.conf file: kern.maxdsiz=2147483648 kern.maxssiz=2147483648 I have no idea how to add this to AIX, but hopefully you do! Joey #10 03-28-2007, 10:41 AM usenet Guest Re: Tcl crashed(core dump) under IBM AIX 5.3 when use "string compare" to compare 2 big buffer -------------------------------------------------------------------------------- eax.w...{} wrote: > data seg size (kbytes, -d) 131072 That's your problem; the heap size is limited to 128MB (131072 == 128*1024). Couple that to the facts that memory has to be managed dynamically by Tcl (you're not giving any hints that could make the job easier, such as using the length parameter to [read]), you're working with unicode characters, and some memory fragmentation (which happens easily and can add 50% or more to the memory consumption of a system if you're unlucky) and you've run out. Easiest fix: compare the files a chunk (e.g. 1MB) at a time. That'll work better. Consider working with binary files (that'll be faster and smaller). Or raise the standard limit, however that's done on AIX. Donal. Page 1 of 2 1 2 > « Previous Thread | Next Thread » Thread Tools Show Printable Version Email this Page Similar Threads Thread Thread Starter Forum Replies Last Post How to compare String with " ? usenet Java 4 12-01-2007 11:04 PM Re: How do you compare strings. I merely wish to see if"three" is equal to "three". usenet labview 0 10-25-2007 02:10 PM "Inappropriate ioctl" or core dump when saving address book usenet Pine 0 03-27-2007 01:43 PM Compare shuts down Acrobat "Memory could not be "read"" usenet Adobe Acrobat 4 02-02-2007 09:46 AM Can I Debug jvm "core" dump file? usenet Java 1 09-18-2004 08:13 PM All times are GMT -5. The time now is 09:01 AM. Privacy Statement - Powered by vBulletin® Version 3.7.2 Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. Search Engine Optimization by vBSEO 3.2.0 vB Ad Management by =RedTyger= In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy. LinkBack LinkBack URL About LinkBacks ------ Note: ------ 'libc_r: enter/leave_cancellation_point() by Norbert Koch Oct 21, 2008; 09:45am :: Rate this Message: - Use ratings to moderate (?) Reply | Reply to Author | Print | View Threaded | Show Only this Message Hello, I was just inspecting libc_r for trying to understand some things and found this: <------------------------- --- src/lib/libc_r/uthread/uthread_cond.c 2002/05/24 04:32:28 1.33 +++ src/lib/libc_r/uthread/uthread_cond.c 2002/11/13 18:13:26 1.34 ... int -_pthread_cond_signal(pthread_cond_t * cond) +__pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, + const struct timespec *abstime) +{ + int ret; + + _thread_enter_cancellation_point(); + ret = _pthread_cond_timedwait(cond, mutex, abstime); + _thread_enter_cancellation_point(); + return (ret); +} ----------------------------> Shouldn't that be _thread_leave_cancellation_point() after calling _pthread_cond_timedwait() ? What effect should I see if this is wrong? Best regards, Norbert Koch _______________________________________________ freebsd-threads@... mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-threads To unsubscribe, send any mail to "freebsd-threads-unsubscribe@..." Re: 'libc_r: enter/leave_cancellation_point() by Alfred Perlstein-2 Oct 21, 2008; 11:04pm :: Rate this Message: - Use ratings to moderate (?) Reply | Reply to Author | Print | View Threaded | Show Only this Message Hey Norbert, this is probably a bug, but might not be addressed because libc_r is not really supported any longer. Someone may pick it up, but I'm uncertain of that. * Norbert Koch [081021 01:32] wrote: > Hello, > > I was just inspecting libc_r for trying to understand > some things and found this: > > <------------------------- > > --- src/lib/libc_r/uthread/uthread_cond.c 2002/05/24 04:32:28 1.33 > +++ src/lib/libc_r/uthread/uthread_cond.c 2002/11/13 18:13:26 1.34 > > ... > > int > -_pthread_cond_signal(pthread_cond_t * cond) > +__pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, > + const struct timespec *abstime) > +{ > + int ret; > + > + _thread_enter_cancellation_point(); > + ret = _pthread_cond_timedwait(cond, mutex, abstime); > + _thread_enter_cancellation_point(); > + return (ret); > +} > > > ----------------------------> > > Shouldn't that be _thread_leave_cancellation_point() after > calling _pthread_cond_timedwait() ? > What effect should I see if this is wrong? > > Best regards, > > Norbert Koch > > _______________________________________________ > freebsd-hackers@... mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@..." > _______________________________________________ > freebsd-threads@... mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@..." ...[show rest of quote] -- - Alfred Perlstein _______________________________________________ freebsd-threads@... mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-threads To unsubscribe, send any mail to "freebsd-threads-unsubscribe@..." ------ Note: ------ Hello, first of all, I know that libc_r is an ancient and no more supported library. But what I found looks like such a huge bug that I would like to hear a different opinion about that. Because, may be I am totally wrong with that. (Btw. I am doing this under FreeBSD 4.11 but libc_r looks the same under 7.1) I am having two threads A (low priority) and B (high priority). This is the pseudo code: Thread A: forever { sleep_some_time() call common_func() set global ponter P to NULL } Thread B: forever { sleep_some_time() set global pointer P to not NULL call common_func() assert P is not NULL } common_func() { pthread_lock_mutex(M) do something completely_unrelated pthread_mutex_unlock(M) } Without calling common_func() all is ok. With common_func the assertion fails from time to time. The problem I found is in pthread_mutex_unlock(). As far as I understand the code, the next thread waiting on the mutex is made runnable, but there is no call of the scheduler! This means, that the lower priority thread will continue running until blocking itself or being switched away by running out of time. I see the same (wrong?) code in pthread_cond_signal() and pthread_cond_broadcast(). So, could anyone please enlighten me if I am totally wrong here or if there is perhaps some weird hidden aspect in the posix standard I missed? If I found a bug here, what about libthr/libpthread? Are they behaving correctly? Best regards, Norbert Koch ------ Note: ------ ------ Note: ------ ------ Note: ------ ############################################################## SECTION 21: Other stuff: ############################################################## lrud: ===== lrud (least recently used) is a page managing memory process in AIX. Solaris uses a completely different page stealing algorythm to AIX, so you cannot compare the 2. AIX uses LRUD and Solaris uses LIFO (last in 1st out). Again, AIX will build as large a filesystem cache as possible by default. when it hits minperm it is going to scan for pages to free up and free them according to LRUD algorythm... the pages it frees up are dependant on the number of filepages cached and the maxperm / minperm settings. If numperm is above maxperm it is non discriminate over what pages to mark as candidates to free up, but if numperm is below maxperm, then it will only mark file (persistient) pages as candidates to get the size of the fs cache down. NOTE: by default it only does this once you hit minfree.. To strictly set the maximum number of file pages cached you would set strict_maxperm, but you usually do not have to do this unless you are working with a very large amount of memory (64Gb and up) ... so, i would leave well alone if you only have a couple of GB... gil: ==== GIL is a kernel process, which does TCP/IP timing. It handles transmission errors, ACKs, etc. Normally it shouldn't consume too much CPU, but it can take quite a lot of CPU when the system is using the network a lot (like with NFS filesystems which are heavily used). . The kproc gil runs the TCP/IP timer driven operations. Every 200ms, and every 500ms the GIL thread is kicked to go run protocol timers. With TCP up (which is ALWAYS the case), TCP timers are called which end up looking at every connection on the system (to do retransmission, delayed acks,etc). In version 4 this work is all done on a multi-threaded kproc to promote concurrency and SMP scalability.gil. GIL is one of the kprocs (kernel processes) in AIX 4.3.3, 5.1 and 5.2. Since the advent of topas in AIX 4.3.3 and changes made to the ps command in AIX 5.1, system administrators have become aware of this class of processes, which are not new to AIX. These kprocs have no user interfaces and have been largely undocumented in base documentation. Once a kproc is started, typically it stays in the process table until the next reboot. The system resources used by any one kproc are accounted as kernel resources, so no separate account is kept of resources used by an individual kproc. . Most of these kprocs are NOT described in base AIX documentation and the descriptions below may be the most complete that can be found. . GIL term is an acronym for "Generalized Interrupt Level" and was created by the Open Software Foundation (OSF), This is the networking daemon responsible for processing all the network interrupts, including incoming packets, tcp timers, etc. . Exactly how these kprocs function and much of their expected behavior is considered IBM proprietary information. picld: ------ The Platform Information and Control Library (PICL) provides a mechanism to publish platform-specific information for clients to access in a platform-independent way. picld maintains and controls access to the PICL information from clients and plug-in modules. The daemon is started in both single-user and multi-user boot mode. Upon startup, the PICL daemon loads and initializes the plug-in modules. These modules use the libpicltree(3PICLTREE) interface to create nodes and properties in the PICL tree to publish platform configuration information. After the plug-in modules are initialized, the daemon opens the PICL daemon door to service client requests to access information in the PICL tree. arraymon: --------- arraymon is the disk array daemon process sometimes found in Solaris. It performs these major functions: - Monitoring of the error information maintained by the disk array controllers. - Reporting of events that require operator attention in a manner selected by the user via the rmparams file and the rmscript file. - Launching of the parityck utility at the designated time, if the parity check option is enabled. arraymon maintains logs of the messages currently outstanding on the system console and in the file /etc/raid/rmlog.log. In addition, all error information is written to the system error log /var/adm/messages ). sar: ---- System activity data can be accessed at the special request of a user (see sar(1)) and automatically, on a routine basis, as described here. The operating system contains several counters that are incremented as various system actions occur. These include counters for CPU utilization, buffer usage, disk and tape I/O activity, TTY device activity, switching and system-call activity, file-access, queue activity, inter-process communications, and paging. For more general system statistics, use iostat (1M), sar(1), or vmstat(1M). Note 1: ------- I'm paring down processes and port listners on a Solaris 8 server to have the very minimal services/ports open. I have followed their guidelines/blueprints for Solaris 6 hardening. I need to find out what is listening on the ports below and how to disable services for them. Specifically, listners on ports 5987, 898, and 32768. (See netstat output below) Also what are: root 181 1 0 15:08:10 ? 0:00 /usr/sadm/lib/smc/bin/smcboot root 182 181 0 15:08:10 ? 0:00 /usr/sadm/lib/smc/bin/smcboot root 56 1 0 15:08:04 ? 0:00 /usr/lib/sysevent/syseventd root 58 1 0 15:08:05 ? 0:00 /usr/lib/sysevent/syseventconfd root 67 1 0 15:08:05 ? 0:01 /usr/lib/picl/picld root 202 1 0 15:08:12 ? 0:00 /usr/lib/efcode/sparcv9/efdaemon And can they be disabled? How? This host will only run standalone firewall and sendmail only. On Solaris 2.6 these listners and procs do not exist. Regarding the "smcboot" process the answer is simple. This is the boot process for the Solaris Management Console (SMC) which is a GUI (well - more a framework with a several existing modules) to manage your system. If you're not interested to manage your host using SMC, then you can safely disable this (remove or diable /etc/rc2.d/S90wbem). This smc process is also responsible for listening on port 898 and 5987. The port 32768 is not used for a fixed service. You should check your system to idenfity which process is using this port. This can be done by using the pfiles command, e.g. "cd /proc; /usr/proc/bin/pfiles * > /tmp/pfiles.out" and then look in /tmp/pfiles.out for the portnumber. The picld process is a new abstraction layer for programs who want to access platform specific information. Instead of using some platform specific program applications can use the picl library to access information in a generic way. Disabling the picld daemon will affect applications which are using the libpicltree. You can use the "ldd" command to identify such applications and decide whether you're using them or not. Example applications are "prtpicl" or "locator" (see the manpages). The "syseventd" is responsible for delivering system events and disabling this service will affect your ability to create new devices on the fly (e.g. for dynamic reconfiguration). The "efdaemon" is another example of such a process which is needed for dynamic reconfiguration. Disabling syseventd and/or efdaemon havily depends on your required services. After creating your devices (boot -r) you can safely turn of these daemons but you'll run into trouble when trying dynamic reconfiguration... Without knowing your requirements we can't tell whether it's ok to disable those services or not. bpbkar: ======= bpbkar is part of the Veritas Netbackup client, usually installed at /usr/openv/netbackup . process: ================== Note 1: In general, defunct processes are caused by a parent process not reaping its children. Find out which process is the parent process of all those zombies (ps -e). It's that process that has a bug. In Solaris 2.3 (and presumably earlier) there is a bug in the pseudo tty modules that makes them hang in close. This causes processes to hang forever while exiting. Fix: Apply patch 101415-02 (for 2.3). In all Solaris 2 releases prior to 2.5 (also fixed in the latest 2.4 kernel jumbo patch), init (process 1) calls sync() every five minutes which can hang init for some considerable time. This can cause a lot of zombies accumulating with process 1 as parent, but occurs only in rare circumstances. Note 2: My app has a parent that forks a child. Sometimes, one of them dies and leaves a defunct process, along with shared memory segments. I try to get rid of the shared memory and kill the defunct task, but to no avail. I then have to reboot the system to clean up the shared memory and to get rid of the defunct process. How can I kill a defunct process and get rid of the associated shared memory ? A defunct task is already dead. You can not kill a "zombie". The problem is obviously that the app does not expect a child to die and does not make the necessary wait calls to relieve the child from its return code. Did you stopp the app and see what happens? use ipcrm to release shared memory. But a zombie indicates also a programming problem with the application. So it is time to redesign the application. Note 3: A zombie process is a process which has died and whose parent process is still running and has not wait()ed for it. In other words, if a process becomes a zombie, it means that the parent process has not called wait() or waitpid() to obtain the child process's termination status. Once the parent retrieves a child's termination status, that child process no longer appears in the process table. You cannot kill a zombie process, because it's already dead. It is taking up space in the process table, and that's about it. If any process terminates before its children do, init inherits those children. When they die, init calls one of the wait() functions to retrieve the child's termination status, and the child disappears from the process table. A zombie process is not, in and of itself, harmful, unless there are many of them taking up space in the process table. But it's generally bad programming practice to leave zombies lying around, in the same way that it's generally a Bad Thing to never bother to free memory you've malloc()ed. Note 4: Other than Windows, unix manages an explicit parent-child relationships between processes. When a child process dies, the parent will receive a notification. It is then the duty of the parent process to explicitly take notice of the childs demise by using the wait() system call. The return value of the wait() is the process ID of the child, which gives the parent exact control about which of its children are still alive. As long as the parent hasn't called wait(), the system needs to keep the dead child in the global process list, because that's the only place where the process ID is stored. The purpose of the "zombies" is really just for the system to remember the process ID, so that it can inform the parent process about it on request. If the parent "forgets" to collect on its children, then the zombie will stay undead forever. Well, almost forever. If the parent itself dies, then "init" (the system process with the ID 0) will take over fostership over its children and catch up on the neglected parental duties S_IFCHR and S_IFDOOR: ===================== Suppose you use the pfiles command on a PID # /usr/proc/bin/pfiles 194 194: /usr/sbin/nscd Current rlimit: 256 file descriptors 0: S_IFCHR mode:0666 dev:85,1 ino:3291 uid:0 gid:3 rdev:13,2 O_RDWR 1: S_IFCHR mode:0666 dev:85,1 ino:3291 uid:0 gid:3 rdev:13,2 O_RDWR 2: S_IFCHR mode:0666 dev:85,1 ino:3291 uid:0 gid:3 rdev:13,2 O_RDWR 3: S_IFDOOR mode:0777 dev:275,0 ino:0 uid:0 gid:0 size:0 O_RDWR FD_CLOEXEC door to nscd[194] # /usr/proc/bin/pfiles 254 254: /usr/dt/bin/dtlogin -daemon Current rlimit: 2014 file descriptors 0: S_IFDIR mode:0755 dev:32,24 ino:2 uid:0 gid:0 size:512 O_RDONLY|O_LARGEFILE 1: S_IFDIR mode:0755 dev:32,24 ino:2 uid:0 gid:0 size:512 O_RDONLY|O_LARGEFILE 2: S_IFREG mode:0644 dev:32,24 ino:143623 uid:0 gid:0 size:41 O_WRONLY|O_APPEND|O_LARGEFILE 3: S_IFCHR mode:0666 dev:32,24 ino:207727 uid:0 gid:3 rdev:13,12 O_RDWR 4: S_IFSOCK mode:0666 dev:174,0 ino:4686 uid:0 gid:0 size:0 O_RDWR|O_NONBLOCK 5: S_IFREG mode:0644 dev:32,24 ino:143624 uid:0 gid:0 size:4 O_WRONLY|O_LARGEFILE advisory write lock set by process 245 7: S_IFSOCK mode:0666 dev:174,0 ino:3717 uid:0 gid:0 size:0 O_RDWR 8: S_IFDOOR mode:0444 dev:179,0 ino:65516 uid:0 gid:0 size:0 O_RDONLY|O_LARGEFILE FD_CLOEXEC door to nscd[171] This listing shows the files open by the dtlogin process. Notice how easy it is to decipher the file types in this output. We have: S_IFDIR directory files S_IFREG regular files S_IFCHR character mode device S_IFSOCK sockets S_IFDOOR a "door" file Flags That Specify Access Type The following OFlag parameter flag values specify type of access: O_RDONLY The file is opened for reading only. O_WRONLY The file is opened for writing only. O_RDWR The file is opened for both reading and writing. Limits on the number of files that a process can open can be changed system-wide in the /etc/system file. If you support a process that opens a lot of sockets, then you can monitor the number of open files and socket connections by using a command such as this: # /usr/proc/bin/pfiles | grep mode | wc -l The third limit determines how many file references can be held in memory at any time (in the inode cache). If you're running the sar utility, then a sar -v command will show you (in one column of its output (inod-sz)) the number of references in memory and the maximum possible. On most systems, these two numbers will be oddly stable throughout the day. The system maintains the references even after a process has stopped running -- just in case it might need them again. These references will be dropped and the space reused as needed. The sar output might look like this: 00:00:00 proc-sz ov inod-sz ov file-sz ov 11:20:00 400/20440 0 41414/46666 0 1400/1400 0 0/0 The 4th field reports the number of files currently referenced in the inode cache and the maximum that can be stored. EXP shell script: ================= #!/usr/bin/ksh NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 export NLS_LANG ORACLE_SID=ECM export ORACLE_SID cd /u03/dumps/ECM mv ECM.dmp.Z ECMformer.dmp.Z exp system/arcturus81 file=ECM.dmp full=y statistics=none cp ECM.dmp /u01/dumps/ECM compress -v ECM.dmp xntpd: ====== The xntpd daemon sets and maintains a Unix system time-of-day in compliance with Internet standard time servers. The xntpd daemon is a complete implementation of the Network Time Protocol (NTP) version 3 standard, as defined by RFC 1305, and also retains compatibility with version 1 and 2 servers as defined by RFC 1059 and RFC 1119, respectively. The xntpd daemon does all computations in fixed point arithmetic and does not require floating point code. The xntpd daemon reads from a configuration file (/etc/ntp.conf is the default) at startup time. You can override the configuration file name from the command line. You can also specify a working, although limited, configuration entirely on the command line, eliminating the need for a configuration file. Use this method when configuring the xntpd daemon as a broadcast or multicast client, that determines all peers by listening to broadcasts at runtime. You can display the xntpd daemon internal variables with the ntpq command (Network Time Protocol (NTP) query program). You can alter configuration options with the xntpdc command. Note for AIX: checking the status of the xntpd subsystem: # lssrc -s xntpd utmpd: ====== Solaris: NAME utmpd - utmpx monitoring daemon SYNOPSIS utmpd [-debug] DESCRIPTION The utmpd daemon monitors the /var/adm/utmpx file. See utmpx(4) (and utmp(4) for historical information). utmpd receives requests from pututxline(3C) by way of a named pipe. It maintains a table of processes and uses poll(2) on /proc files to detect process termination. When utmpd detects that a process has terminated, it checks that the process has removed its utmpx entry from /var/adm/utmpx. If the process' utmpx entry has not been removed, utmpd removes the entry. By periodically scanning the /var/adm/utmpx file, utmpd also monitors processes that are not in its table. OPTIONS -debug Run in debug mode, leaving the process connected to the controlling terminal. Write debugging information to standard output. HP-UX 11i: NAME [Toc] [Back] utmpd - user accounting database daemon SYNOPSIS [Toc] [Back] /usr/sbin/utmpd DESCRIPTION [Toc] [Back] utmpd, user accounting database daemon, manages the user accounting database which is the database of currently logged-in users. This was previously maintained by /etc/utmp and /etc/utmpx files on HP-UX. Upon startup, utmpd writes its pid to the file /etc/useracct/utmpd_pid. Applications can add, update, or query entries into the database using the getuts() APIs. See the getuts(3C) manual page for more information. utmpd(1M) takes care of synchronizing the legacy /etc/utmpx file and its own in-memory database. The synchronization is bi-directional from the utmpd's database to the /etc/utmpx and from the /etc/utmpx file to utmpd's database. However, this synchronization does not happen in real time. There is a time lag which could span from a few seconds on a lightly loaded system to a few minutes on a heavily loaded system. pwconv: ======= NAME pwconv - installs and updates /etc/shadow with information from /etc/passwd DESCRIPTION The pwconv command creates and updates /etc/shadow with information from /etc/passwd. pwconv relies on a special value of 'x' in the password field of /etc/passwd. This value of 'x' indicates that the password for the user is already in /etc/shadow and should not be modified. If the /etc/shadow file does not exist, this command will create /etc/shadow with information from /etc/passwd. The command populates /etc/shadow with the user's login name, password, and password aging information. If password aging information does not exist in /etc/passwd for a given user, none will be added to /etc/shadow. However, the last changed information will always be updated. If the /etc/shadow file does exist, the following tasks will be performed: Entries that are in the /etc/passwd file and not in the /etc/shadow file will be added to the /etc/shadow file. Entries that are in the /etc/shadow file and not in the /etc/passwd file will be removed from /etc/shadow. Password attributes (for example, password and aging information) that exist in an /etc/passwd entry will be moved to the corresponding entry in /etc/shadow. The pwconv command can only be used by the super-user. ESCON: ====== The Enterprise System Connection ArchitectureY, ESCON, was developed by IBM as a channel connection architecture with the intent of improving connectivity by incorporating fibre optics into a network. ESCON uses fibre optics to replace existing bus and tag cables in a new or existing data centre. Designed to connect a wide range of peripherals to IBM mainframe computers, the architecture supports data communications at a speed of 200Mbps. Basically, its a fiber optic switch, connecting Control Units or other nodes. FICON: ====== FICON (for Fiber Connectivity) is a high-speed input/output (I/O) interface for mainframe computer connections to storage devices or other nodes. As part of IBM's S/390 or z servers, FICON channels increase I/O capacity through the combination of a new architecture and faster physical link rates to make them up to eight times as efficient as ESCON (Enterprise System Connection), IBM's previous fiber optic channel standard. nscd: ===== nscd is a process that provides a cache for the most common name service requests. It starts up during multi-user boot. The default configuration-file /etc/nscd.conf determines the behavior of the cache daemon. See nscd.conf(4). nscd provides caching for the passwd(4), group(4), hosts(4), ipnodes(4), exec_attr(4), prof_attr(4), and user_attr(4) databases through standard libc interfaces, such as gethostbyname(3NSL), getipnodebyname(3SOCKET), gethostbyaddr(3NSL), and others. Each cache has a separate time-to-live for its data; modifying the local database (/etc/hosts, /etc/resolv.conf, and so forth) causes that cache to become invalidated upon the next call to nscd. The shadow file is specifically not cached. getspnam(3C) calls remain uncached as a result. nscd also acts as its own administration tool. If an instance of nscd is already running, commands are passed to the running version transparently. In order to preserve NIS+ security, the startup script for nscd (/etc/init.d/nscd) checks the permissions on the passwd table if NIS+ is being used. If this table cannot be read by unauthenticated users, then nscd will make sure that any encrypted password information returned from the NIS+ server is supplied only to the owner of that password. A sample /etc/nscd.conf file, which minimizes the functionality of nscd, is as follows: logfile /var/adm/nscd.log enable-cache passwd no enable-cache group no positive-time-to-live hosts 3600 negative-time-to-live hosts 5 suggested-size hosts 211 keep-hot-count hosts 20 old-data-ok hosts no check-files hosts yes enable-cache exec_attr no enable-cache prof_attr no enable-cache user_attr no If your system has any instability with respect to host names and/or IP addresses, it is possible to substitute the following line for all the above lines containing hosts. This may slow down host name lookups, but it should fix the name translation problem. enable-cache hosts no EBCDIC and unix: ================ thread 1: --------- Take a look at the dd command with the option dd conv=ebcdic See man dd for more details. thread 2: --------- 1. nvdmetoa command: How to convert EBCDIC files to ASCII: On your AIX system, the tool nvdmetoa might be present. Examples: nvdmetoa AIXver3.dat Converts an EBCDIC file taken off an AS400 and converts to an ASCII file for the pSeries or RS/6000 nvdmetoa 132 AIXver3.txt Converts an EBCDIC file with a record length of 132 characters to an ASCII file with 132 bytes per line PLUS 1 byte for the linefeed character. thread 3: --------- od command: The od command translate a file into other formats, like for example hexadecimal format. To translate a file into several formats at once, enter: # od -t cx a.out > a.xcd This command writes the contents of the a.out file, in hexadecimal format (x) and character format (c), into the a.xcd file. thread 4: --------- I'm using the DD command in UNIX to convert ASCII to EBCDIC so that I can print via "lp" to a AS/400 attached printer. I'm using the AS/400 as a print server. The command below works fine except that the carriage return/line feed disappear. The file prints without the carriage return line feed. Here is the unix command: cat $file | dd ibs=80 cbs=132 conv=ebcdic | lp -d AS400PRNT -s utmp, wtmp, failedlogin File Format: ==================================== AIX: ---- Purpose Describes formats for user and accounting information. Description The utmp file, the wtmp file, and the failedlogin file contain records with user and accounting information. When a user attempts to logs in, the login program writes entries in two files: The /etc/utmp file, which contains a record of users logged into the system. The /var/adm/wtmp file (if it exists), which contains connect-time accounting records. On an invalid login attempt, due to an incorrect login name or password, the login program makes an entry in: The /etc/security/failedlogin file, which contains a record of unsuccessful login attempts. The records in these files follow the utmp format, defined in the utmp.h header file. To convert a binary record in wtmp format to an ASCII record called dummy.file, enter: /usr/sbin/acct/fwtmp < /var/adm/wtmp > /etc/dummy.file The content of a binary wtmp file is redirected to a dummy ASCII file. failedlogin: Use the who command to read the contents of the /etc/security/failedlogin file: # who /etc/security/failedlogin # who /etc/security/failedlogin > /tmp/failed_login.txt To clear the file use: # cp /dev/null /etc/security/failedlogin The /etc/default/login file: ==========================I= If you uncomment, or put, the line CONSOLE=/dev/console into the "/etc/default/login" file, root can only logon from the console, and not from other terminals. Ofcourse, on a normal terminal, you can still logon with your useraccount and then su to root. Notes on the libc libary in AIX 5L: =================================== What is it? ----------- Most unixes has a couple of important shared libraries. One of them is the libc.a lib on AIX. libc = C Libary glibc = GNU C library (on linux and open systems) It is an XCOFF shared library under AIX and hence a critical part of the running system. The standard C library, `libc.a', is automatically linked into your programs by the `gcc' control program. Or it is used by C/C++ compilers to create statically linked programs. It provides many of the functions that are normally associated with C programs For each function or variable that the library provides, the definition of that symbol will include information on which header files to include in your source to obtain prototypes and type definitions relevant to the use of that symbol. Note that many of the functions in `libm.a' (the math library) are defined in `math.h' but are not present in libc.a. Some are, which may get confusing, but the rule of thumb is this--the C library contains those functions that ANSI dictates must exist, so that you don't need the -lm if you only use ANSI functions. In contrast, `libm.a' contains more functions and supports additional functionality such as the matherr call-back and compliance to several alternative standards of behavior in case of FP errors. Version: -------- On AIX, you can determine the version of the libc fileset on your machine as follows: # lslpp -l bos.rte.libc Its gone, now what? ------------------- Note: You might want to look at the "recsh" recovery shell command first. Other ways to recover: You can recover from this without rebooting or reinstalling, if you have another copy of libc.a available that is also named "libc.a". If you moved libc.a to a different directory, you're in luck -- do the following: export LIBPATH=/other/directory And your future commands will work. But if you renamed libc.a, this won't do it. If you have an NFS mounted directory somewhere, you can put libc.a on the that host, and point LIBPATH to that directory as shown above. Or.. If you have a good copy of from somewhere.. Copy the libc.a fix into place, e.g., a. # cp -f your_dir/locale_format/lib/libc.a /usr/ccs/lib/ b. # chown bin.bin /usr/ccs/lib/libc.a c. # chmod 555 /usr/ccs/lib/libc.a d. # ln -sf /usr/ccs/lib/libc.a /usr/lib/libs.a e. # unset LIBPATH f. # slibclean Make sure that the new libraries will be picked up at the next reboot. Now Reboot. IBM's version on how to recover: -------------------------------- Restore Access to an Unlinked or Deleted System Library When the existing libc.a library is not available, most operating system commands are not recognized. The most likely causes for this type of problem are the following: The link in /usr/lib no longer exists. The file in /usr/ccs/lib has been deleted. The following procedure describes how to restore access to the libc.a library. This procedure requires system downtime. If possible, schedule your downtime when it least impacts your workload to protect yourself from a possible loss of data or functionality. The information in this how-to was tested using AIXr 5.3. If you are using a different version or level of AIX, the results you obtain might vary significantly. Restore a Deleted Symbolic Link Use the following procedure to restore a symbolic link from the /usr/lib/libc.a library to the /usr/ccs/lib/libc.a path: With root authority, set the LIBPATH environment variable to point to the /usr/ccs/lib directory by typing the following commands: # LIBPATH=/usr/ccs/lib:/usr/lib # export LIBPATH At this point, you should be able to execute system commands. To restore the links from the /usr/lib/libc.a library and the /lib directory to the /usr/lib directory, type the following commands: ln -s /usr/ccs/lib/libc.a /usr/lib/libc.a ln -s /usr/lib /lib At this point, commands should run as before. If you still do not have access to a shell, skip the rest of this procedure and continue with the next section, Restore a Deleted System Library File. Type the following command to unset the LIBPATH environment variable. unset LIBPATH Symbol resolution failed for /usr/lib/libc_r.alibc_r.a: ======================================================= Note 1: ------- libc_r.a is a standard re-entrant C library, which allows synchronization of the tasks at exit. Note 2: ------- thread: Q: Hi there I've just tried to install Informix 9.3 64-bit on AIX 52. It failed with the error shown below. Any suggestions as to what could be wrong? I tried to find information on the web as to what versions of Informix (if any) are supported on AIX52, but could not find anything. I would be grateful for any advice in this matter. Disk Initializing Demo IBM Informix Dynamic Server exec(): 0509-036 Cannot load program /u01/app/informix-9.3-64/server/bin/oninit because of the following errors: 0509-130 Symbol resolution failed for /usr/lib/libc_r.a[aio_64.o] becau e: 0509-136 Symbol kaio_rdwr64 (number 0) is not exported from dependent module /unix. 0509-136 Symbol listio64 (number 1) is not exported from dependent module /unix. 0509-136 Symbol acancel64 (number 2) is not exported from dependent module /unix. 0509-136 Symbol iosuspend64 (number 3) is not exported from dependent module /unix. 0509-136 Symbol aio_nwait (number 4) is not exported from dependent module /unix. 0509-150 Dependent module libc_r.a(aio_64.o) could not be loaded. 0509-026 System error: Cannot run a file that does not have a valid for at. 0509-192 Examine .loader section symbols with the 'dump -Tv' command. Bundle Install program has finished A: Did you enable AIX aio? If not then run the following smit command. $ smit aio Choose "Change / Show Characteristics of Asynchronous I/O" Set the state to be configure at system restart to Available. Set state of fast path to Enable. Also check that you enabled 64-bit version of AIX run time. Note 3: ------- Q: Suppose you get the error: Symbol resolution failed for /usr/lib/libc_r.a Examples: Error: Exec(): 0509-036 Cannot load program Article ID: 20180 Software: ArcGIS - ArcInfo 8.0.1, 8.0.2, 8.1 ArcView GIS 3.1, 3.2, 3.2a Platforms: AIX 4.3.2.0, 4.3.3.0 Error Message Executing some ArcInfo Workstation commands, or running ArcView GIS cause the following errors to occur: Exec(): 0509-036 Cannot load program ... because of the 0509-130 Symbol resolution failed for /usr/lib/libc_r.a(aio.o) because: 0509-136 Symbol kaio_rdwr (number 0) is not exported from dependant module /unix 0509-136 Symbol listio (number 1) is not exported from dependant module /unix 0509-136 Symbol acancel (number 2) is not exported from dependant module /unix 0509-136 Symbol iosuspend (number 3) is not exported from dependant module /unix 0509-136 Symbol aio_nwait (number 4) is not exported from dependant module /unix 0509-192 Examine .loader section symbols with the 'dump -Tv' command. root@n5110l13:/appl/emcdctm/dba/log#cat dmw_et.log Could not load program ./documentum: Symbol resolution failed for /usr/lib/libc_r.a(aio.o) because: Symbol kaio_rdwr (number 0) is not exported from dependent module /unix. Symbol listio (number 1) is not exported from dependent module /unix. Symbol acancel (number 2) is not exported from dependent module /unix. Symbol iosuspend (number 3) is not exported from dependent module /unix. Symbol aio_nwait (number 4) is not exported from dependent module /unix. Symbol aio_nwait64 (number 5) is not exported from dependent module /unix. Symbol aio_nwait_timeout (number 6) is not exported from dependent module /unix. Symbol aio_nwait_timeout64 (number 7) is not exported from dependent module /unix. System error: Error 0 A: Cause The AIX asynchronous I/O module has not been loaded. Solution or Workaround Load asynchronous I/O. You must do this as a ROOT user: Use SMITTY and navigate to Devices > Async I/O > Change/Show. Make the defined option available. Reboot the machine. or Enable AIO by running the following commands: /usr/sbin/chdev -l aio0 -a autoconfig=available /usr/sbin/mkdev -l aio0 KDB kernel debugger and kdb command: ==================================== AIX Only KDB kernel debugger and kdb command This document describes the KDB kernel debugger and kdb command. The KDB kernel debugger and the kdb command are the primary tools a developer uses for debugging device drivers, kernel extensions, and the kernel itself. Although they appear similar to the user, the KDB kernel debugger and the kdb command are two separate tools: -- KDB kernel debugger: The KDB kernel debugger is integrated into the kernel and allows full control of the system while a debugging session is in progress. The KDB kernel debugger allows for traditional debugging tasks such as setting breakpoints and single-stepping through code. -- kdb command: This command is implemented as an ordinary user-space program and is typically used for post-mortem analysis of a previously-crashed system by using a system dump file. The kdb command includes subcommands specific to the manipulation of system dumps. Both the KDB kernel debugger and kdb command allow the developer to display various structures normally found in the kernel's memory space. Both do the following: -Provide numerous subcommands to decode various data structures found throughout the kernel. -Print the data structures in a user-friendly format. -Perform debugging at the machine instruction level. Although this is less convenient than source level debugging, it allows the KDB kernel debugger and the kdb command to be used in the field where access to source code might not be possible. -Process the debugging information found in XCOFF objects. This allows the use of symbolic names for functions and global variables. slibclean: ========== AIX: Note 1: Removes any currently unused modules in kernel and library memory. Syntax # slibclean Description The slibclean command unloads all object files with load and use counts of 0. It can also be used to remove object files that are no longer used from both the shared library region and in the shared library and kernel text regions by removing object files that are no longer required. Files /usr/sbin/slibclean Contains the slibclean command. thread_getregs, thread_waitlock, sigprocmask: ============================================= Note 1: ------- thread: Q: thread_waitlock Hello all Can someone please provide me with a link to where the above function is documented ?? I know its part of libc_r.a and is used for thread synchronization ... I need to get some details on the function as to what exactly it does since a program I'm trying to debug is getting a ENOTSUP error while calling this function ... Would really appreciate the help. A: thread_waitlock() Reply from Richard Joltes on 8/25/2003 5:48:00 PM This doesn't seem to be documented anywhere, but it appears this function is _not_ in libc(_r). I found this elsewhere: "...kernel symbols are defined by import lists found in /usr/lib. You'll need threads.exp and syscalls.exp. Look at the -bI option in the ld documentation." You'll find references to this function if you look through these two file so maybe that's your best option. Threads.exp even specifically says "the system calls listed below are not imported by libc.a." Note 2: ------- thread: APAR: IY17298 COMPID: 5765C3403 REL: 430 ABSTRACT: ASSERT IN THREAD_SETSTATE_FAST PROBLEM DESCRIPTION: Program termination due to an assert in thread_setstate_fast. PROBLEM SUMMARY: Assert in thread_setstate_fast PROBLEM CONCLUSION: Increase lock scope. Note 3: ------- thread: Paul Pluzhnikov wrote: > "pankajtakawale" writes: > > Here is the snippet of truss output > ... > > sbrk(0x00000060) Err#12 ENOMEM > > Do i need to increase swap space or thread stack size? > Increasing swap might help, but I would not expect it. > You are running out of *heap* space. Check your limits, e.g. 'ulimit > -a' in *sh or 'limit' in *csh. Yes process was running out of heap space. In my local environment I decreased soft limit of data segment and ran app. truss showed 'sbrk faild with ENOMEM'. Now Im planning to run app in very heavy configuration such that 'unlimited data segment' too will be insufficient. And on same configuration I will make app large addr space model by setting env variable LDR_CNTRL (app shud run in large addr space model). And will update thread with results. Thanks for your valuable help Paul. Note 4: ------- + On Linux, the interface exports a bunch of "#define __NR_foo 42" style + definitions, so there is no implementation. + + On AIX, syscall numbers are not fixed ahead of time; in principle + each process can have its own assignment of numbers to actual + syscalls. As a result we have a bunch of global variables to store + the number for each syscall, which are assigned to at system + startup, and a bunch of #defines which map "__NR_foo" names to + these global variables. Initially, when we don't know what a + syscall's number is, it is set to __NR_AIX5_UNKNOWN. + + Therefore, on AIX, this module provides a home for those variables. + + It also provides VG_(aix5_register_syscall) to assign numbers to + those variables. +*/ e.g. +Int VG_(aix5_NR__sigqueue) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR__sigsuspend) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR__sigaction) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_sigprocmask) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_siglocalmask) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_count_event_waiters) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_waitact) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_waitlock_local) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_waitlock) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_wait) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_unlock) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_twakeup_unlock) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_twakeup_event) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_twakeup) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_tsleep_event) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_tsleep_chkpnt) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_tsleep) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_post_many) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_post) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_ue_proc_unregister) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_ue_proc_register) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_kthread_ctl) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR__thread_setsched) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_threads_runnable) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_getregs) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_terminate_unlock) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_terminate_ack) = __NR_AIX5_UNKNOWN; +Int VG_(aix5_NR_thread_setstate_fast) = __NR_AIX5_UNKNOWN; etc.... skulker command: ================ AIX: The skulker command is a command file for periodically purging obsolete or unneeded files from file systems. Candidate files include files in the /tmp directory, files older than a specified age, a.out files, core files, or ed.hup files. The skulker command is normally invoked daily, often as part of an accounting procedure run by the cron command during off-peak periods. Modify the skulker command to suit local needs following the patterns shown in the distributed version. System users should be made aware of the criteria for automatic file removal. The find command and the xargs command form a powerful combination for use in the skulker command. Most file selection criteria can be expressed conveniently with find expressions. The resulting file list can be segmented and inserted into rm commands using the xargs command to reduce the overhead that would result if each file were deleted with a separate command. Note Because the skulker command is run by a root user and its whole purpose is to remove files, it has the potential for unexpected results. Before installing a new skulker command, test any additions to its file removal criteria by running the additions manually using the xargs -p command. After you have verified that the new skulker command removes only the files you want removed, you can install it. To enable the skulker command, you should use the crontab -e command to remove the comment statement by deleting the # (pound sign) character from the beginning of the /usr/sbin/skulker line in the /var/spool/cron/crontabs/root file. L1 cache, L2 cache, L3 cache and differences: ============================================= Note 1: ------- Q: Question from cmos "What is L2 cache? What is L3 cache? What is the major difference between the two." A: Answer from LinksMaster "CPU Cache (the example CPU is a little old but the concepts are still the same) * The initial level of storage on a processor are the registers. The registers are where the actually processing input and output takes place. * L1 cache - Then the level 1 cache comes next. It is logically the closest high speed memory to the CPU core / registers. It usually runs at the full speed (meaning the same as the CPU core clockspeed). L1 often comes in size of 8kB, 16kB, 32kB, 64kB or 128kB. But, it is very high speed even though the amount is relatively small. * L2 cache - The next level of cache is L2, or level 2. Nowadays L2 is larger than L1 and it often comes in 256kB, 512kB and 1,024MB amounts. L2 often runs at 1/4, 1/2 or full speed in relation to the CPU core clockspeed. * L3 cache - Level 3 cache is something of a luxury item. Often only high end workstations and servers need L3 cache. L3 has been both "on-die", meaning part of the CPU or "external" meaning mounted near the CPU on the motherboard. It comes in many sizes and speeds. Note 2: ------- L2 cachhe, short for Level 2 cache, cache memory that is external to the microprocessor. In general, L2 cache memory, also called the secondary cache, resides on a separate chip from the microprocessor chip. Although, more and more microprocessors are including L2 caches into their architectures. As more and more processors begin to include L2 cache into their architectures, Level 3 cache is now the name for the extra cache built into motherboards between the microprocessor and the main memory. Quite simply, what was once L2 cache on motherboards now becomes L3 cache when used with microprocessors containing built-in L2 caches. xcom: ===== Used for filetransfer between systems with many nice features like printing a report of the transfer, queuing of transfers, EBCIDIC - ASCII conversion, scheduling etc.. The command "xcom62" is used for SNA networks. The command "xcomtcp" is used for the tcpip networks. The xcom daemon is "xcomd" in /opt/xcom/bin Use: xcomd -c to kill/stop xcomd to start the daemon. logging and config of xcom events can be found in: /usr/spool/xcom - xcom.glb has all conf. settings and is a superset of xcom.cnf - After reconfig, stop and start the daemon - atoe files are for ascii / ebcdic conversions - xcomqm for maintaining queues - xcom.trusted must be defined for each trusted transfer - xcomtool is for GUI sending of files is done with "xcomtcp -c[1234] other options" where -c1 means sending a file Example commands: xcomtcp -c1 -f /tmp/xcom.cnf LOCAL_FILE=/tmp/xcomtest.txt REMOTE_FILE=Q:\ REMOTE_SYSTEM=NLPA020515.patest.nl.eu.abnamro.com QUEUE=NO PROTOCOL=TCPIP PORT=8044 xcomtcp -c1 -f /tmp/xcom.cnf LOCAL_FILE=/tmp/xcomtest.txt REMOTE_FILE=c:\test.txt REMOTE_SYSTEM=NLPR020796.branches.nl.eu.abnamro.com QUEUE=NO PROTOCOL=TCPIP PORT=8044 xcomtcp -c1 -f /tmp/xcom.cnf LOCAL_FILE=/tmp/xcomtest.txt REMOTE_FILE=Q:\XCOM\DATA\IN\t.txt REMOTE_SYSTEM=NLPA020515.patest.nl.eu.abnamro.com QUEUE=NO PROTOCOL=TCPIP PORT=8044 xcomtcp -c1 -f /tmp/xcom.cnf LOCAL_FILE=/tmp/xcomtest.txt REMOTE_FILE=Q:\ REMOTE_SYSTEM=NLPA020515.patest.nl.eu.abnamro.com QUEUE=NO PROTOCOL=TCPIP PORT=8044 where "/tmp/xcom.cnf" contains parameters (e.g. userid, password etc..) not specified at the prompt. vmcid: IBM minor code: E02 =========================== Note 1: ------- Seems there is no port 32888 assign on this systeem ZD111L08 /etc/services # 32775-32895 # Unassigned Maybe this is the issue.. Note 2: ------- AIX: 0403-031 The fork function failed: ======================================== run "svmon -P" to see the top consumers. You might try using: 1. increase the paging space chps -s number_of_PP's hd6 Or 2. increase the maxuproc might help if its too low: maxuproc: Specifies the maximum number of processes per user ID. Values: Default: 40; Range: 1 to 131072 Display: lsattr -E -l sys0 -a maxuproc Change: chdev -l sys0 -a maxuproc=NewValue 3. Actually, you should increase RAM memory as a structural solution, or decrease the number of processes. AIX create Ramdisk: =================== Example: # mkramdisk 40000 # ls -l /dev | grep ram # mkfs -V jfs /dev/ramdiskx # mkdir /ramdiskx # mount -V jfs -o nointegrity /dev/ramdiskx /ramdiskx AIX 5.3 ping error: =================== thread: Q: Hi all, If a normal use trys to ping to my workstation then it gives the followin error "0821-067 ping: The socket creation call failed.: The file access permissions do not allow the specified action" And in my workstation if i login as non-root user then if I ping to some other system it gives the same error.. whereas it is not so with root user. Any suggestions what can be the problem? A: Hi, looks like problems in program file ping rights... in my AIX system i have the following for /usr/sbin/ping # ls -l /usr/sbin/ping -r-sr-xr-x 1 root system 31598 Dec 17 2002 /usr/sbin/ping # 100kggoud A: Technote IBM Cannot ping as Non-root user Technote (FAQ) Problem When trying to ping as a user that is not root, the following error message was displayed: 0821-067 Ping: the socket creation call failed. the file access permissions do not allow the specified actions. Solution -------------------------------------------------------------------------------- Environment AIX Version 5.x Change the setuid bit permissions for /usr/sbin/ping. Enter: chmod 4555 /usr/sbin/ping Root Password Recovery on Solaris : =================================== Go to the OK Prompt - by pressing Stop +A . Put the 1st cd for Solaris in the cdrom £ At OK prompt give the command # boot cdrom -s £ Now mount the boot device onto /a ( To check boot device you can use df command) #mount /dev/dsk/c0t0d0s0 /a Now open the password file and remove the password entry i.e. the second field root:$1$NYDu1c8p$Mdm2n6IPb9k14pP2s2FXZ.:13063:0:99999:7::: # vi /a/etc/shadow Now unmount the /a mount point #umount /a Reboot the server in single mode #ok boot -s Give a new password for root: #passwd New Password: Verify Password: This will reset the password for root and you will be able to login to the box using this password. itm_ora_App2 AIX: 0403-006 Execute permission denied: ======================================== Note 1: ------- thread Q: hello all,now,I want to exe a shell script,the result of command "ls -l",it's permission: -rwxr-x--x but i use the "./proname" to exe it,the result is: 0403-006 Execute permission denied WHY?? the permission is all eXecute!!! A: If permissions seems ok, then chcek this: Make sure there are no "empty" lines with an "~" below the last statement, like ~ because "~" cannot be executed. AIX: The certlist command: ========================== You can use the certlist command without any parameters or flags, which will show you all installed certificates for your account on your system. The man page of certlist: certlist Command Purpose certlist lists the contents of one or more certificates. Syntax certlist [-c] [-a attr [attr....] ]tag [username] Description The certlist command lists the contents of one or more certificates. Using the -c option causes the output to be formatted as colon-separated data with the attribute names associated with each field on the previous line as follows: # name: attribute1: attribute2: ... User: value1: value2: ... The -f option causes the output to be formatted in stanza file format with the username attribute given as the stanza name. Each attribute=value pair is listed on a separate line: user: attribute1=value attribute2=value attribute3=value When neither of these command line options are selected, the attributes are output as attribute=value pairs. The -a option selects a list of one or more certificate attributes to output. In addition to the attributes supported by the load module, several pseudo-attributes shall also be provided for each certificate. Those attributes are: auth_user User's authentication certificate. distinguished_name User's subject distinguished name in the certificate. alternate_name User's subject alternate name in the certificate. validafter The date the user's certificate becomes valid. validuntil The date the user's certificate becomes invalid. tag The name that uniquely identifies this certificate. issuer The distinguished name of the certificate issuer. label The label that identifies this certificate in the private keystore. keystore The location of the private keystore for the private key of the certificate. serialnumber The serial number of the certificate. verified true indicates that the user poved that he is in possession of the private key. Flags -c Displays the output in colon-separated records. -f Displays the output in stanzas. -a attr Selects one or more attributes to be displayed. The tag parameter selects which of the user's certificates is to be output. The reserved value ALL indicates that all certificates for the user are to be listed. The username parameter specifies the name of the AIX user to be queried. If invoked without the username parameter, the certdelete command uses the name of the current user. Exit Status 0 If successful. EINVAL If the command is ill-formed or the arguments are invalid. ENOENT If a) the user doesn't exist, b) the tag does not exist c) the file does not exist. EACCES If the attribute cannot be listed, for example, if the invoker does not have read_access to the user data-base. EPERM If the user identification and authentication fails. errno If system error. Security This command can be executed by any user in order to list the attributes of a certificate. Certificates listed may be owned by another user. Audit This command records the following event information: CERT_List Examples $ certlist -f -a verified keystore label signcert bob bob: verified=false keystore=file:/var/pki/security/keys/bob label=signcert $ certlist -c -a validafter validbefore issuer signcert bob #name:validafter:validuntil:issuer bob:1018091201:1018091301:c=US,o=xyz $ certlist -f ALL bob bob: auth_cert=logincert distinguished_name=c=US,o=xyz,cn=bob alternate_name=bob@xyz.com validafter=0921154701 validuntil=0921154801 issuer=c=US,o=xyz tag=logincert verified=true label=loginkey keystore=file:/var/pki/security/keys/bob serialnumber=03 bob: auth_cert=logincert distinguished_name=c=US,o=xyz,cn=bob alternate_name=bob@ibm.com validafter=1018091201 validuntil=1018091301 issuer=c=US,o=xyz tag=signcert verified=false label=signkey keystore=file:/var/pki/security/keys/bob serialnumber=02Files /usr/lib/security/pki/acct.cfg /usr/lib/security/pki/policy.cfg SAM on HP-UX: ============= The easiest way to administer HP-UX is to use Sam. As root, simply type "sam"... easy, huh? If you're in text-mode, you'll get a curses-based window, and if you're in CDE / VUE, you will get a new window on your workspace... Simply navigate your way through - you can do a lot of your administration via sam. Some example screens in textmode sam # sam .. .. Starting the terminal version of sam... To move around in sam: - use the "Tab" key to move between screen elements - use the arrow keys to move within screen elements - use "Ctrl-F" for context-sensitive help anywhere in sam On screens with a menubar at the top like this: ------------------------------------------------------ |File View Options Actions Help| | ---- ---- ------- ------------------------------- ---| - use "Tab" to move from the list to the menubar - use the arrow keys to move around - use "Return" to pull down a menu or select a menu item - use "Tab" to move from the menubar to the list without selecting a menu item - use the spacebar to select an item in the list On any screen, press "CTRL-K" for more information on how to use the keyboard. + === System Administration Manager (gavnh300) (1) + YFile View Options Actions Help Y Y Press CTRL-K for keyboard help. Y YSAM Areas Y Y------------------------------------------------------------------------------Y Y Source Area Y Y+---------------------------------------------------------------------------+ Y YY SAM Accounts for Users and Groups -> ^ Y YY SAM Auditing and Security -> Y YY SAM Backup and Recovery -> Y YY SAM Clusters -> Y YY SAM Disks and File Systems -> Y YY SAM Display -> Y YY SAM Kernel Configuration -> Y YY SAM Networking and Communications -> Y YY SAM Performance Monitors -> Y YY SAM Peripheral Devices -> Y YY SAM Printers and Plotters -> Y YY SAM Process Management -> Y YY Other Resource Management -> Y YY SAM Routine Tasks -> v Y Y+---------------------------------------------------------------------------+ Y Y Y +------------------------------------------------------------------------------+ Choose "Accounts for Users and Groups" and the following screen shows: + === System Administration Manager (gavnh300) (1) + YFile View Options Actions Help Y Y Press CTRL-K for keyboard help. Y YSAM Areas:Accounts for Users and Groups Y Y------------------------------------------------------------------------------Y Y Source Area Y Y+---------------------------------------------------------------------------+ Y YY ..(go up) ^ Y YY SAM Groups Y YY SAM Users Y YY Y YY Y YY Y YY Y YY Y YY Y YY Y YY Y YY Y YY Y YY v Y Y+---------------------------------------------------------------------------+ Y Y Working... Y +------------------------------------------------------------------------------+ + === Accounts for Users and Groups (gavnh300) (1) + YFile List View Options Actions Help Y Y Y Add... Y Y YTemplate In Use: None Y User Templates -> Y Y YFiltering: Displaying Y Task Customization... Y Y Y-----------------------Y ===================================== Y--------------Y YUsers Y Modify... Yf 314 selectedY Y-----------------------Y Remove... Y--------------Y Y Login User ID Y Modify Secondary Group Membership... Yce Of Y Y Name (UID) Y Modify User's Password Ye Lo Y Y+----------------------Y Reset User's Password Y------------+ Y YY ru1160 6243 Y ------------------------------------- YLDEV R. ^ Y YY sa2064 6975 Y Deactivate... YRATOR I Y Y YY sa2194 8172 Y ------------------------------------- YLMAN S Y Y YY sc3060 5318 Y Modify Security Policies... YMAN KE Y Y YY sc4634 8140 Y Set Authorized Login Times... YDONLY JH Y Y YY sc6228 7027 +---------------------------------------+LMAN P. Y YY se1223 8170 SEL sysman SYSMAN VA Y Y YY sh0403 7735 SHARIF oper OPERATOR T. Y Y YY si1608 7479 Sinha support APPLMAN R Y Y YY si1624 7391 Sinha support APPLMAN A v Y Y <------------------------------------------------------------------------->+ Y Y Y +------------------------------------------------------------------------------+ AIX 5L vmstat output issues: ============================ Suppose you see output like this: [pl003][tdbaeduc][/dbms/tdbaeduc/educroca/admin/dump/bdump] vmstat -v 1572864 memory pages 1506463 lruable pages 36494 free pages 7 memory pools 336124 pinned pages 80.0 maxpin percentage 20.0 minperm percentage 80.0 maxperm percentage 43.4 numperm percentage 654671 file pages 0.0 compressed percentage 0 compressed pages 45.8 numclient percentage 80.0 maxclient percentage 690983 client pages 0 remote pageouts scheduled 0 pending disk I/Os blocked with no pbuf --> 8868259 paging space I/Os blocked with no psbuf --> 2740 filesystem I/Os blocked with no fsbuf --> 13175 client filesystem I/Os blocked with no fsbuf --> 319766 external pager filesystem I/Os blocked with no fsbuf What is the meaning, and interpretation, of the outputlines like "pending disk I/Os blocked with no pbuf" ? Note 1: ------- http://www.circle4.com/jaqui/eserver/eserver-AugSep06-AIXPerformance.pdf .. .. The last five lines of the vmstat -v report are useful when you're looking for I/O problems. The first line is for disk I/Os that were blocked because there were no pbufs. Pbufs are pinned memory buffers used to hold I/O requests at the logical volumemanager layer. Prior to AIX v5.3, this was a systemwide parameter. It's now tuneable on a volume-group basis using the lvmo command. The ioo parameter that controls the default number of pbufs to add when a disk is added to a volume groupis pv_min_pbuf, and it defaults to 512. This specifies the minimum number of pbufs per PV that the LVM uses, and it's a global value that applies to all VGs on the system. If you see the pbuf blocked I/Os field above increasing over time, you may want to use the lvmo -a command to find out which volume groups are having problems with pbufs and then slowly increase pbufs for that volume group using the lvmo command. A reasonable value could be 1024. Paging space I/Os blocked with no psbuf refers to the number of paging space I/O requests blocked because no psbuf was available. These are pinned memory buffers used to hold I/O requests at the virtual memory manager layer. If you see these increasing, then you need to either find out why the system is paging or increase the size of the page datasets. Filesystem I/Os blocked with no fsbufs refers to the number of filesystem I/O requests blocked because no fsbuf was available. Fsbufs are pinned memory buffers used to hold I/O requests in the filesystem layer. If this is constantly increasing, then it may be necessary to use ioo to increase numfsbufs so that more bufstructs are available. The default numfsbufs value is determined by the system and seems to normally default to 196. I regularly increase this to either 1,024 or 2,048. Client filesystem I/Os blocked with no fsbuf refers to the number of client filesystem I/O requests blocked because no fsbuf was available. Fsbufs are pinned memory buffers used to hold I/O requests in the filesystem layer. This includes NFS, VxFS (Veritas) and GPFS filesystems. Finally, ext pager filesystem I/Os blocked with no fsbuf refers to the number of external pager client filesystem I/O requests blocked because no fsbuf was available. JFS2 is an external pager client filesystem. If I see this growing, I typically set j2_nBufferPerPagerDevice=1024 Note 2: ------- thread: Q: we have I/O issue on the AIX box for our Oracle DB the disks having the Database files are always 100% busy and the wa column in vmstat hits above 50 and the vmstat -v show the I/O's being blocked 2238141 pending disk I/Os blocked with no pbuf 13963233 paging space I/Os blocked with no psbuf 2740 filesystem I/Os blocked with no fsbuf 1423313 client filesystem I/Os blocked with no fsbuf 1128548 external pager filesystem I/Os blocked with no fsbuf What does these indicate, short of real mem or does some kernal parameters need to be adjusted? A: I'd up the number of fsbufs per filesystem. What are your current settings? ioo -L|egrep 'numfsbufs|j2_nBufferPerPagerDevice' numfsbufs is for jfs filesystems j2_nBuffer... is for jfs2 filesystems if I'm not mistaken. Note, if you change these values, you have to umount/mount the filesystems to take effect. I.e. you have to bring Oracle down. HTH, p5wizard p5wizard, Thanks, I dont have the access to it,i will get the SA to get me the output. Are these figures cummulative since the last reboot of the box. what a good setting for this dbinsight (TechnicalUser) 10 Mar 06 14:06 ioo -L |egrep 'numfsbufs|j2_nBufferPerPagerDevice' numfsbufs 512 196 512 1 2G-1 M j2_nBufferPerPagerDevice 512 512 512 0 2G-1 The above are our settings, Are these the default settings? p5wizard (IS/IT--Management) 13 Mar 06 3:35 answers to your questions: yes, cumulative (so depends on how long the system's been running to interpret the values). no, already been increased for jfs yes, defaults for jfs2 1st value = current situation 2nd value = system default 3rd value = value for nextboot # ioo -L|head -3; ioo -L|egrep 'numfs|j2_nBuff' NAME CUR DEF BOOT MIN MAX UNIT TYPE DEPENDENCIES -------------------------------------------------------------------------------- j2_nBufferPerPagerDevice 512 512 512 0 256K M numfsbufs 400 196 400 1 2G-1 M But as I said before, doesn't help to increase 'em unless you unmount/mount the filesystems. As your SA has upped the 'NEXTBOOT' values, I guess (s)he knows about that. Run "topas 2" for a few iterations, and post that screenful please. Also "vmo -L|egrep 'perm%|client%'" output please. You have a very high value: 13963233 paging space I/Os blocked with no psbuf On my large DB servers this is close to zero. Run "lsps -a" and post that output also please. I googled for "aix psbufs" and found an Oracle AIX performance Technical Brief, here's an excerpt: # vmstat -v | tail -5 (we only need last 5 lines) 0 pending disk I/Os blocked with no pbuf o for pbufs, increase pv_min_pbuf using ioo, 0 paging space I/Os blocked with no psbuf o for psbufs, stop paging or add more paging space, 8755 filesystem I/Os blocked with no fsbuf ?? JFS o for fsbufs, increase numfsbufs using ioo, o default is 196, recommended starting value is 568, 0 client filesystem I/Os blocked with no fsbuf (NFS/Veritas) o for client filesystem fsbufs, increase: nfso's nfs_v3_pdts and nfs_v3_vm_bufs 2365 external pager filesystem I/Os blocked with no fsbuf (JFS2) o for external pager fsbufs, increase: j2_nBufferPerPagerDevice, default is 512, recommended value is 2048, j2_dynamicBufferPreallocation using ioo. Note 3: ------- thread: 4.2) File System Buffers. By default, the number of file system buffers is set to 196. For high I/O systems, this is typically too small. To see if you are blocking I/O due to not having enough file system buffers, run: vmstat -v. For JFS file systems, look at the "filesystem I/Os blocked with no fsbuf" line. For JFS2 file systems, look at the "client filesystem I/Os blocked with no fsbuf" line. If these values are more than a couple thousand, you may need to increase the respective parameters. For JFS file systems, you will need to change the numfsbufs parameter. For JFS2 file systems, change the j2_nBufferPerPagerDevice parameter. Changing this parameter does not require a reboot, but will only take effect when the file system is mounted, so you will have to unmount/mount the file system. 4.2) JFS Log Devices. Heavily used filesystems should ALWAYS have their own JFS log on a separate physical disk. All writes to a JFS (or JFS2) file system are written to the JFS log. By default, there is only one JFS log created for any volume group containing JFS file systems. This means that ALL writes to ALL the file systems in the volume group go to ONE PHYSICAL DISK!! (This is, unless, your underlying disk structure is striped or another form of RAID for performance.) Creating separate JFS logs on different physical disks is very important to getting the most out of the AIX I/O subsystem. /usr/ccs/bin/shlap64: ===================== The /usr/ccs/bin/shlap64 process is the Shared Library Support Daemon. The muxatmd, snmpmibd and aixmibd are Simple Network Managaement Protocol (SNMP) daemons for AIX. All can be turned off by commenting out the entries that start them in /etc/rc.tcpip. shlap64 is part of the 64-bit environment and needs to be running if you are using a 64-bit kernel. The IBM.* programs are part of the Reliable Scalable Cluster Technology which IBM added to AIX v5 from their SP cluster systems. These programs provide additional system monitoring (and alerting if configured to do so). You should probably leave them running. ntpdate: ======== The ntpdate command sets the local date and time by polling the NTP servers specified to determine the correct time. It obtains a number of samples from each server specified and applies the standard NTP clock filter and selection algorithms to select the best of the samples. To set the local date and time by polling the NTP servers at address 9.3.149.107, enter: /usr/sbin/ntpdate 9.3.149.107 Output similar to the following appears: 28 Feb 12:09:13 ntpdate [18450]: step time server 9.3.149.107 offset 38.417792 sec /etc/ncs/glbd: ============== glbd Daemon Purpose Manages the global location broker database. Syntax /etc/ncs/glbd [ -create { -first [-family FamilyName] | -from HostName } ] [ -change_family FamilyName ] [ -listen FamilyList] [ -version ] Description The glbd daemon manages the global location broker (GLB) database. The GLB database, part of the Network Computing System (NCS), helps clients to clients to locate servers on a network or internet. The GLB database stores the locations (specifically, the network addresses and port numbers) of servers on which processes are running. The glbd daemon maintains this database and provides access to it. There are two versions of the GLB daemon, glbd and nrglbd. RBAC: ===== Role Based Access Control AIXr has provided a limited RBAC implementation since AIX 4.2.1. Most environments require that different users manage different system administration duties. It is necessary to maintain separation of these duties so that no single system management user can accidentally or maliciously bypass system security. While traditional UNIXr system administration cannot achieve these goals, Role Based Access Control can. RBAC allows the creation of roles for system administration and the delegation of administrative tasks across a set of trusted system users. In AIXr, RBAC provides a mechanism through which the administrative functions typically reserved for the root user can be assigned to regular system users. Beginning with AIX 6.1, a new implementation of RBAC provides for a very fine granular mechanism to segment system administration tasks. Since these two RBAC implementations differ greatly in functionality, the following terms are used: -Legacy RBAC Mode The historic behavior of AIX roles that was introduced in AIX 4.2.1 -Enhanced RBAC Mode The new implementation introduced with AIX 6.1 Both modes of operation are supported. However, Enhanced RBAC Mode is the default on a newly installed AIX 6.1 system. llbd: ===== llbd Daemon Purpose Manages the information in the local location broker database. Syntax llbd [-family FamilyName] [ -version] Description The llbd daemon is part of the Network Computing System (NCS). It manages the local location broker (LLB) database, which stores information about NCS-based server programs running on the local host. A host must run the llbd daemon to support the location broker forwarding function or to allow remote access (for example, by the lb_admin tool) to the LLB database. In general, any host that runs an NCS-based server program should run an llbd daemon, and llbd should be running before any such servers are started. Additionally, any network or internet supporting NCS activity should have at least one host running a global location broker daemon (glbd). The llbd daemon is started in one of two ways: Through the System Resource Controller (the recommended method), by entering on the command line: startsrc -s llbd By a person with root user authority entering on the command line: /etc/ncs/llbd & TCP/IP must be configured and running on your system before you start the llbd daemon. (You should start the llbd daemon before starting the glbd or nrglbd daemon.) tripwire: ========= Tripwire data integrity assurance software monitors the reliability of critical system files and directories by identifying changes made to them. Tripwire configuration options include the ability to receive alerts via email if particular files are altered and automated integrity checking via a cron job. Using Tripwire for intrusion detection and damage assessment helps you keep track of system changes. Because Tripwire can positively identify files that have been added, modified, or deleted, it can speed recovery from a break-in by keeping the number of files which must be restored to a minimum. Tripwire compares files and directories against a database of file locations, dates modified, and other data. The database contains baselines, which are snapshots of specified files and directories at a specific point in time. The contents of the baseline database should be generated before the system is at risk of intrusion. After creating the baseline database, Tripwire then compares the current system to the baseline and reports any modifications, additions, or deletions. While Tripwire is a valuable tool for auditing the security state of Red Hat Linux systems, Tripwire is not supported by Red Hat, Inc. Refer to the Tripwire project's website (http://www.tripwire.org/) for more information about Tripwire. SA-Agent uctsp0: ================ CONTROL-SA is a client/server solution that enables you to manage security systems distributed across multiple platforms. CONTROL-SA synchronizes accounts and passwords across those systems. On AIX, you can find the binaries and files in /usr/lpp/uctsp0. On HP, you can find the binaries and files in /usr/local/uctsp0. To stop the agent: # su - uctsp0 -c stop-ctsa To start the agent: # su - uctsp0 -c start-ctsa EMC Documentum: =============== General: -------- The following components are associated with the Content Server: - A database containing relationships that relate to stored content (on filesystems). This database thus contains metadata (and not content). - file storage of the actual content being managed. The file store and database constitue the Documentum Repository abstraction, called Docbase. - A set of key processes that implement the Documentum content management solution such as the Document Broker. - A set of housekeeping utilities, including a Web-based Admin tool. Client Connect: --------------- Access to Documentum Docbases is controlled through the Documentum client file dmcl.ini. You need to understand the architecture of Content Server and docbroker and how DMCL connects. Content Server and docbroker are 2 separate processes which are started (usually but not necessarily) on the same machine. Since they are separate processes they listen on different ports. Docbroker usually listens on a well-known port 1489. Content Server will listen on the port you configure in the services file. When you issue a DMCL connect (which is what DAB does - it is a documentum client using DMCL) the DMCL first locates a docbroker. It asks the docbroker for a list of docbases it knows about. The docbroker returns the names of the docbases and provides details of the Content Server(s) that service the docbase. This includes the host and port details. The DMCL then issues requests directly to the Content Server bypassing the docbroker. Thus you need both the docbroker and the Content Server port open. BPS http Listener (Installation and Configuration) -------------------------------------------------- What is BPS Business Process Services (BPS) provides the gateway to access Docbase for a non Documentum user. It allows HTTP, SMTP of JMS message to be stored directly in the Docbase. When an http, SMTP or JMS message is sent to BPS http listener Servlet URL, email address or JMS queue; the listener intercepts the message and processes it to a protocol neutral format. The message is then passed to the BPS message handler. The message handler opens a connection to the Docbase and stores the message as virtual document. The attachment gets stored as child nodes of the virtual document. How http Listener Works The http message listener is implemented as a Servlet. It gets installed as a part of BPS web application. The URL to access the http listener Servlet is http://:/bps/http/http or https://:/bps/http/http As you can see from the URL, the http listener can use both http and https protocol. However it should be kept in mind that application server uses two separate ports to communicate with http and https protocol. If we provide http protocol port number (say 8080) to construct the https URL, it will not work. This is a common error one can make while configuring BPS http listener. In the following pages we will step through the installation, configuration and testing of BPS http listener. Configuring the BPS Handlers BPS configuration for handlers are kept in default.xml file. It is be located at drive:\Documentum\config\bps 1) Navigate to The default.xml file and open it for edit using a ASCII editor like Notepad. 2) Configuring element of this file. In the element we have to provide the connection details to Docbase, such as Docbasename, username, password etc. A sample element entry should look like this:- zebra dmadmin mypassword 3) Configuring element. This element specifies the message handlers available to BPS message listeners. Many out of the box handlers are provided with BPS but all of them are disabled by surrounding them within XML comment tag Either enable some of them or point towards your own custom handler class like this .. .. com.documentum.bps.handlers.LinkToFolderService 4) Configuring element Listeners element turns on the SSL capabilities of Local and remote listeners. Set the flag true or false as per your requirements. For our http listener test, we would use non-ssl connection, so make sure the value for the element is "true". 5) Save the default.xml. A complete default.xml file for our test setup will look something like this. Replace the bold letters with your own Docbase, user, password and connection names. You can have multiple connections defined for multiple docbases. ?xml version="1.0? encoding="UTF-8??> mydocbase2 myname2 mypassword2 com.documentum.bps.handlers.ErrorHandlerService com.documentum.bps.handlers.SubjectMessageFilter com.documentum.bps.handlers.LinkToFolderService true true Creating a Test html Page We would need a test html page to test the http listener. Create html page out of the code provided below. This simple page submits a form to http listener after populating BPS http listener parameters in the form parameters.

BPS http listener and LinkToFolder handler test

Create a file called test.html out of this code and save it in the bps root folder. Testing the Application Start the application server where BPS is deployed and then invoke the html page by typing the following URL in your browser http://:/bps/test.html A page should appear in your browser. If not then please check if your application server is running or if it has been installed properly Fill up the connection name such as myconnection1 and then select a file to upload and then hit submit. This will cause the html form to be submitted to the BPS http listener, which will pass the message to LinkToFolder message handler and the file will be stored in bpsinbound folder. Once message handler succeeded, it will present a success page. Locating the Saved Message in the Docbase We have configured the LinkToFolder handler to save the message to bpsinbound folder. If you browse to the bpsinbound folder, you will found a new virtual document has been created by the LinkToFolder handler. Expanding the root virtual document will show the attached file. Summary- BPS http Installation and Configuration BPS http listener can be installed by selecting proper option in the BPS installer. To run the http listener, you will require an application server like Tomcat. The handler is implemented as Servlet. Before using the listener and the message handlers, BPS default.xml file needs to be configured. Please follow the instruction provided in this Whitepaper.to configure the default.xml file. Once it is configured; the http listener is ready for test. Use the test.html file provided in this White Paper to test the http listener Example start and stop of Documentum processes: ----------------------------------------------- TAKE NOTICE: First of all, on any documentum server, find the account of the software owner. Since there are serveral accounts, depending on the site, you must check this before starting or stopping a Service. You can allways check for the correct owner by looking at the owner of the "/appl/emcdctm" directory Example: on ZD111L13 you check root@zd111l13:/appl#ls -al total 16 drwxr-xr-x 4 root staff 256 Jul 13 15:43 . drwxr-xr-x 24 root system 4096 Aug 21 15:09 .. drwxr-xr-x 13 emcdmeu emcdgeu 4096 Aug 9 15:04 emcdctm drwxr-xr-x 3 root staff 256 Jun 29 15:35 oracle Now you do a swich user to the owner. In the example it would be "su - emcdmeu" If you logon as the software owner (e.g."su - emcdmeu"), you have several environment variables available, like $DOCUMENTUM which points to "/appl/emcdctm". 1. Docbroker processes: ----------------------- Start $DOCUMENTUM/dba/dm_launch_Docbroker Stop $DOCUMENTUM/dba/dm_stop_Docbroker the startup calls ./dmdocbroker -port 1489 $@ >> $tlogfile 2>&1 & (/product/5.3/bin/dmdocbroker) Logs: tail -f $DOCUMENTUM/dba/log/docbroker..1489.log * for example tail -f $DOCUMENTUM/dba/log/docbroker.ZD110L12.nl.eu.abnamro.com.1489.log 2. Content Server: ------------------ Content servers have Docbrokers and a "Java Method Server" There is also a service for each repository that has been installed Start $DOCUMENTUM/dba/dm_launch_Docbroker $DOCUMENTUM/dba/dm_start_dmwpreu1 $DM_HOME/tomcat/bin/startup.sh $DM_HOME/tomcat/bin/shutdown.sh $DOCUMENTUM/dba/dm_shutdown_dmwpreu1 $DOCUMENTUM/dba/dm_stop_Docbroker Stop $DM_HOME/tomcat/bin/shutdown.sh $DOCUMENTUM/dba/dm_shutdown_dmw_eu $DOCUMENTUM/dba/dm_stop_Docbroker Or if there are 2 filestores, like in ETNL: Start $DOCUMENTUM/dba/dm_launch_Docbroker $DOCUMENTUM/dba/dm_start_dmw_et $DOCUMENTUM/dba/dm_start_dmw_et3 $DM_HOME/tomcat/bin/startup.sh Stop $DM_HOME/tomcat/bin/shutdown.sh $DOCUMENTUM/dba/dm_shutdown_dmw_et $DOCUMENTUM/dba/dm_shutdown_dmw_et3 $DOCUMENTUM/dba/dm_stop_Docbroker Logs *Repository tail -f $DOCUMENTUM/dba/log/dmw_et.log *JMS tail -f $DM_HOME/tomcat/logs/catalina.out Or: 1) kill all processes that are being run by emcdm user. 2) Run the following commands as user emcdm: $DOCUMENTUM/dba/dm_launch_Docbroker $DOCUMENTUM/dba/dm_start_dmw_et $DM_HOME/tomcat/bin/startup.sh 3. BPS: ------- Start # As user {NL} emcdm, or {EU} wasemceu cd $DOCUMENTUM/dfc/bps/inbound/bin ./start_jms_listener.sh Better is: nohup ./start_jms_listener.sh & Stop # As user {NL} emcdm, or {EU} wasemceu ps -ef | grep bps kill -9 4. Index Server: ---------------- Indexer - server IX Index servers have 3 services: Docbroker, Index Server, and Index Agent {per repository} Start $DOCUMENTUM/dba/dm_launch_Docbroker $DOCUMENTUM/fulltext/IndexServer/bin/startup.sh $DOCUMENTUM_SHARED/IndexAgents/IndexAgent1/startupIndexAgent.sh Stop $DOCUMENTUM_SHARED/IndexAgents/IndexAgent1/shutdownIndexAgent.sh $DOCUMENTUM/fulltext/IndexServer/bin/shutdown.sh $DOCUMENTUM/dba/dm_stop_Docbroker Logs tail -f $DOCUMENTUM/dfc/logs/IndexAgent1.log 5. Websphere: ------------- example 1: Syntax if rc.appserver exists: su - wasemceu /etc/rc.appserver start ETM1DAE /etc/rc.appserver start ETM1DEU /etc/rc.appserver stop ETM1DEU /etc/rc.appserver stop ETM1DAN /etc/rc.appserver stop ETM1DNL /etc/rc.appserver start ETM1DAN /etc/rc.appserver start ETM1DNL example 2: Syntax if just using websphere scripts: START: /appl/was51/bin/startNode.sh /appl/was51/bin/startServer.sh server1 /appl/was51/bin/startServer.sh STM1DNL /appl/was51/bin/startServer.sh STM1DAN tail -f /beheer/log/was51/server1/SystemOut.log tail -f /beheer/log/was51/STM1DNL/SystemOut.log tail -f /beheer/log/was51/STM1DNL/SystemErr.log tail -f /beheer/log/was51/STM1DAN/SystemOut.log STOP: /appl/was51/bin/stopServer.sh STM1DAN /appl/was51/bin/stopServer.sh STM1DNL /appl/was51/bin/stopServer.sh server1 /appl/was51/bin/stopNode.sh Backup options EMC Documentum: ------------------------------ 1 cold backup: -------------- If you want to backup a docbase the Documentum recommended way is: 1) Stop the Content Server 2) Stop the database 3) Backup the database using standard database or OS tools as appropriate for your database 4) Backup the Content Store(s) using OS tools. Using is referred to as a full, cold backup. There are options for hot and/or incremental backups but it does get more complicated (and possibly expensive). The full,cold backup is the simplest option available. 2. Online Hot backup: --------------------- 2.1 CYA hot backup software 2.2 Platform Dynamics: Recovery management for EMC Documentum 2.3 EMC NetWorker Module for Documentum Catalina: ========= The Java Serlvet womb part of Apache Tomcat server. It lets Java Servlets handle HTTP requests. Catalina is the name of the Java class of Tomcat from version 4.0 Tomcat's servlet container was redesigned as Catalina in Tomcat version 4.x XMWLM: ====== Note 1: ------- xmwlm Command Purpose Provides recording of system performance or WLM metrics. Syntax xmwlm [ -d recording_dir ] [ -n recording_name ] [ -t trace_level ] [ -L ] Description The xmwlm agent provides recording capability for a limited set of local system performance metrics. These include common CPU, memory, network, disk, and partition metrics typically displayed by the topas command. Daily recordings are stored in the /etc/perf/daily directory. The topasout command is used to output these recordings in raw ASCII or speadsheet format. The xmwlm agent can also be used to provide recording data from Workload Management (WLM). This is the default format used when xmwlm is run without any flags. Daily recordings are stored in the /etc/perf/wlm directory. The wlmmon command can be used to process WLM-related recordings. The xmwlm agent can be started from the command line, from a user script, or can be placed near the end of the /etc/inittab file. All recordings cover 24- hour periods and are only retained for two days. #ps -ef | grep -i xmwlm root 266378 1 0 Aug 06 - 272:17 /usr/bin/xmwlm -L Note 2: ------- IY78009: XMWLM HIGH RESOURCE CONSUMPTION, TOPASOUT COUNTERS A fix is available Obtain fix for this APAR APAR status Closed as program error. Error description xmwlm daemon may consume well over 1% of CPU resources some disk counter values may be inaccurate in topasout output Local fix Problem summary xmwlm daemon may consume well over 1% of CPU resources some disk counter values may be inaccurate in topasout output Problem conclusion Reduce SPMI instrumentations internal polling frequency for filesystem metrics. Update topasout for certain counter data types. Temporary fix Comments APAR information APAR number IY78009 Reported component name AIX 5.3 Reported component ID 5765G0300 Reported release 530 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2005-10-21 Closed date 2005-10-21 Last modified date 2005-11-17 APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Publications Referenced Fix information Fixed component name AIX 5.3 Fixed component ID 5765G0300 Note 3: ------- IY95912: XMWLM LOOPING IN SIGNAL HANDLERS INFINITELY Subscribe to this APAR By subscribing, you will receive periodic email alerting you to the status of the APAR, and a link to download the fix once it becomes available. A specific fix for this item is not yet available electronically This record will be updated with a link to the fix if the APAR is new. For APARs older than 365 days, contact your support center. APAR status Closed as program error. Error description High cpu consumption by xmwlm Local fix Problem summary High cpu consumption by xmwlm Problem conclusion Stop xmwlm from looking infinitely in signal handler and avoid xmwlm from crashing when it has to record more than 4096 metrics by recording only 4096 metrics at max. Temporary fix Comments APAR information APAR number IY95912 Reported component name AIX 5.3 Reported component ID 5765G0300 Reported release 530 Status CLOSED PER PE NoPE HIPER NoHIPER Submitted date 2007-03-11 Closed date 2007-03-11 Last modified date 2007-03-15 APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: IY96091 Second superuser: ================= For safety reasons, you might want to have a second root user on your system. Note 1: ------- -- Creating a second root user Follow these steps to create a second root user: Create a user. Manually edit the user ID field and group ID field in the /etc/passwd file. Change the user ID to ID 0. For a typical user ID, for example, change the entry from: russ:!:206:1::/u/russ:/bin/ksh to russ:!:0:0::/u/russ:/bin/ksh This creates a user (in this case, russ) with identical permissions to root. -- Creating special users with root authority Special users that have root authority but can only execute one command may also be created. For instance, to create a user that can only reboot the system, create a regular user called shutdown and modify the /etc/passwd command to change the user and group ID to 0. For example, in AIX 3.2: shutdown:!:0:0::/u/shutdown:/bin/ksh Change the initial program from /bin/ksh to /etc/shutdown -Fr: shutdown:!:0:0::/u/shutdown:/etc/shutdown -Fr For AIX 4, the /etc/passwd entry for the user called shutdown should be: shutdown:!:0:0::/u/shutdown:/usr/sbin/shutdown -Fr The shutdown command on AIX Version 4.1 is located in /usr/sbin. Now when user shutdown logs in, the system will shut down and reboot. ioctl and related: ================== The ioctl subroutine performs a variety of control operations on the object associated with the specified open file descriptor. This function is typically used with character or block special files, sockets, or generic device support such as the termio general terminal interface. The control operation provided by this function call is specific to the object being addressed, as are the data type and contents of the Argument parameter. The ioctlx form of this function can be used to pass an additional extension parameter to objects supporting it. The ioct132 and ioct132x forms of this function behave in the same way as ioctl and ioctlx, but allow 64-bit applications to call the ioctl routine for an object that does not normally work with 64-bit applications. Performing an ioctl function on a file descriptor associated with an ordinary file results in an error being returned. EBADF The FileDescriptor parameter is not a valid open file descriptor. EFAULT The Argument or Ext parameter is used to point to data outside of the process address space. EINTR A signal was caught during the ioctl or ioctlx subroutine and the process had not enabled re-startable subroutines for the signal. EINTR A signal was caught during the ioctl , ioctlx , ioctl32 , or ioct132x subroutine and the process had not enabled re-startable subroutines for the signal. EINVAL The Command or Argument parameter is not valid for the specified object. ENOTTY The FileDescriptor parameter is not associated with an object that accepts control functions. ENODEV The FileDescriptor parameter is associated with a valid character or block special file, but the supporting device driver does not support the ioctl function. ENXIO The FileDescriptor parameter is associated with a valid character or block special file, but the supporting device driver is not in the configured state. Object-specific error codes are defined in the documentation for associated objects. tecad error: ============ IZ37728: TECAD_SNMP CRASHES ON AIX 5.3 SP8 OR GREATER A fix is available 3.9.0.8-TIV-TEC-IF0106 IBM Tivoli Enterprise Console Version 3.9 Interim Fix APAR status Closed as program error. Error description TEC 3.9 AIX 5.3 SP8 or greater When traps are received by the snmp adapter, it crashes Following is some data from the truss and adapter output: Truss 1 Output: open("/usr/lib/nls/msg/en_US/libc.cat", O_RDONLY) = 9 kioctl(9, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY kfcntl(9, F_SETFD, 0x00000001) = 0 kioctl(9, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY kread(9, "\0\001 ?\007\007 I S O 8".., 4096) = 4096 lseek(9, 0, 1) = 4096 lseek(9, 0, 1) = 4096 lseek(9, 0, 1) = 4096 _getpid() = 101604 lseek(9, 0, 1) = 4096 lseek(9, 8069, 0) = 8069 kread(9, " T h e s y s t e m c".., 4096) = 4096 close(9) = 0 __loadx(0x07000000, 0xF01E0438, 0x0000001A, 0xF015B6F8, 0x100140A3) = 0xF015C35C __loadx(0x07000000, 0xF01E0444, 0x0000001A, 0xF015B6F8, 0x100140A3) = 0xF015C3A4 __loadx(0x07000000, 0xF01E0450, 0x0000001A, 0xF015B6F8, 0x100140A3) = 0xF015C314 __loadx(0x07000000, 0xF01E045C, 0x0000001A, 0xF015B6F8, 0x100140A3) = 0xF015C3EC __loadx(0x07000000, 0xF01E0468, 0x0000001A, 0xF015B6F8, 0x100140A3) = 0xF015C428 __loadx(0x05000000, 0x2FF1F6A8, 0x00000960, 0xF015B6F8, 0x00000000) = 0x00000000 kread(8, " h o s t s n i s _ l d".., 4096) = 0 close(8) = 0 getdomainname(0xF023D178, 1024) = 0 getdomainname(0xF023D178, 1024) = 0 getdomainname(0xF023D178, 1024) = 0 getdomainname(0xF023D178, 1024) = 0 _getpid() = 101604 getuidx(1) = 0 kwrite(7, " 2 7", 2) Err#32 EPIPE Received signal #13, SIGPIPE [default] *** process killed *** Truss 2 Output open("/tmp/tec_ed ", O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) = 5 kioctl(5, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY kfcntl(5, F_GETFL, 0x00000008) = 1 close(5) = 0 kread(4, " #\r\n # " $ I d : @".., 4096) = 0 close(4) = 0 open("/tmp/tec_ed ", O_WRONLY|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) = 4 klseek(4, 0, 0, 0x00000002) = 0 kioctl(4, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY kioctl(4, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY kwrite(4, " S e p 2 2 2 3 : 2 2".., 114) = 114 close(4) = 0 kread(3, " # M o n J u l 2 1".., 4096) = 0 kfcntl(3, F_GETFL, 0x00000008) = 0 klseek(3, 0, 0, 0x00000000) = 0 kread(3, " # M o n J u l 2 1".., 4096) = 195 kread(3, " # M o n J u l 2 1".., 4096) = 0 kfcntl(3, F_GETFL, 0x00000008) = 0 klseek(3, 0, 0, 0x00000000) = 0 kread(3, " # M o n J u l 2 1".., 4096) = 195 kread(3, " # M o n J u l 2 1".., 4096) = 0 close(3) = 0 kioctl(1, 22528, 0x00000000, 0x00000000) = 0 kwrite(1, 0xF0220C70, 68) = 68 sigprocmask(0, 0xF029D7B0, 0xF029D7A8) = 0 kfork() = 149840 thread_setmymask_fast(0x00000000, 0x00000000, 0x00000000, 0xD006DC80, 0x00000000, 0x1004671F, 0x1004671F, 0x00000000) = 0x00000000 _exit(0) tecad_snmp.err output: Tue Sep 23 15:05:57 2008 NORMAL: SELECT ,(00), ibtecad/select.c line 0220: Correct is TRUE Tue Sep 23 15:05:57 2008 NORMAL: SELECT ,(00), ibtecad/select.c line 0267: Finished TECAD_EvalSelect, returning TRUE Tue Sep 23 15:05:57 2008 LOW: KERNEL ,(00), ibtecad/kernel.c line 0247: Found action is Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0086: Entered Eval_Fetch Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0109: --get FetchVar, i=0 Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0120: --calling EvalFetchExpression Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0187: Entered Eval_Fetch_Expression Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0190: -- argc1 Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0197: -- argv not null Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0203: -- loop over all fetches, i=0 Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0212: -- Current_Expression not null Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0187: Entered Eval_Fetch_Expression Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0190: -- argc0 Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0197: -- argv not null Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0236: -- do the required operation Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0245: -- Expression->Index=6 Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0246: -- argc=0 Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0250: -- argv not NULL Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0255: -- Expression->Operator not NULL Tue Sep 23 15:05:57 2008 VERBOSE: KERNEL ,(00), cad/evaluation.c line 0271: TECAD_GetGlobalEntry Index <6> Tue Sep 23 15:05:57 2008 VERBOSE: UTILS ,(00), /configuration.c line 0521: Entering TECAD_CopyAttributeEntry Tue Sep 23 15:05:57 2008 VERBOSE: UTILS ,(00), /configuration.c line 0161: Entering TECAD_MakeAttributeEntry Tue Sep 23 15:05:57 2008 VERBOSE: UTILS ,(00), /configuration.c line 0185: Leaving TECAD_MakeAttributeEntry Tue Sep 23 15:05:57 2008 VERBOSE: UTILS ,(00), /configuration.c line 0563: Leaving TECAD_CopyAttributeEntry Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0267: -- clear the memory Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0270: Finished Eval_Fetch_Expression Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0222: -- result not null Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0236: -- do the required operation Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0245: -- Expression->Index=1 Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0246: -- argc=1 Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0250: -- argv not NULL Tue Sep 23 15:05:57 2008 NORMAL: FETCH ,(00), libtecad/fetch.c line 0255: -- Expression->Operator not NULL Local fix Problem summary **************************************************************** * USERS AFFECTED: All TEC users running the SNMP adapter on AIX. **************************************************************** * PROBLEM DESCRIPTION: When traps are received by the SNMP * adapter running on AIX, it crashes. **************************************************************** * RECOMMENDATION: Apply the maintenance listed below. **************************************************************** Problem conclusion The adapter was being killed due to a SIGPIPE signal. This signal will now be ignored. The fix for this APAR is contained in the following maintenance packages: | interim fix | 3.9.0.8-TIV-TEC-IF0106 Temporary fix Comments Universal Command: ================== UC facilitates jobscheduling from Mainframe to AIX and HP-UX systems. AIX: # lslpp -La 'UCmdP' HP: # swlist -l subproduct UCmd Tiger: ====== Tiger is a security tool that can be used as a security and intrusion detection system. It works at many platforms and is provided under the GPL license. So its free software. Its written entirely in shell language. 5FC2DD4B PING TO REMOTE HOST FAILED: ===================================== AIX ONLY: In errpt you might find: [pl101][tdbaprod][/home/tdbaprod] errpt IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 5FC2DD4B 0225151808 I H ent2 PING TO REMOTE HOST FAILED 9F7B0FA6 0225151108 I H ent2 PING TO REMOTE HOST FAILED LABEL: ECH_PING_FAIL_BCKP IDENTIFIER: 5FC2DD4B Date/Time: Mon Feb 25 14:41:06 2008 Sequence Number: 2140 Machine Id: 00CB85FF4C00 Node Id: pl101 Class: H Type: INFO Resource Name: ent2 Resource Class: adapter Resource Type: ibm_ech Location: Description PING TO REMOTE HOST FAILED Probable Causes CABLE SWITCH ADAPTER Failure Causes CABLES AND CONNECTIONS Recommended Actions CHECK CABLE AND ITS CONNECTIONS IF ERROR PERSISTS, REPLACE ADAPTER CARD. Detail Data FAILING ADAPTER ent1 SWITCHING TO ADAPTER ent0 Unable to reach remote host through backup adapter: switching over to primary adapter -- thread 1: All our servers every three minutes logs this message: 9F7B0FA6 0602080605 I H ent2 PING TO REMOTE HOST FAILED The details of the message says it can't ping the default gateway through backup adapter. Why does it try this? Why does it fail because if we pull the primary cable it switches to the backup adapter with no problems. Cheers -- thread 2: Hello: I've seen similar things happen when the switch is not on "port host" (meaning the port begins receiving and sending packets quickly, instead of running Spanning Tree Protocol before going in the FORWARDING state): in this case, the EtherChannel sends the ping packets, they are dropped because the switch is still initializing, and the cycle continues on and on. Still, 30 minutes sounds like a long time. You can try the following: - verify that the EtherChannel switch ports are set to "port host" (i.e., STP should be disabled) on the VIOS, set the num_retries to a higher value (default is 3) and/or set the retry_time to a higher value (default is 1) Does this ONLY happen when updating from FP74 to FP8, or every time the VIOS boots? Kind regards, -- thread 3: Hi All, I am getting the following error consistently on one of my servers. when i do a entstat -d ent3 | grep "Active channel", it does come back with Active channel: primary channel. Could you please provide me with any suggestions or steps I can take to fix this error? entstat -d ent2 | grep "Active channel" Hi Just Etherchannel or Etherchannel with Backup Adapter connected to a failover Switch just in case everything fails ?? If so, please take a read of the following: http://publib.boulder.ibm.com/infocenter/clresctr/v xrx/index.jsp?topic=/com.ibm.cluster.rsct.doc/rsct _aix5l53/bl5adm05/bl5adm0559.html Hope this helps -- thread 4: A VIOS network failover test produces the above error messages, so in that case there is no real problem. midaemon, scopeux, measureware: =============================== The scopeux data collector, the midaemon (measurement interface daemon), and the alarmgen (alarm generator) process, are all part of HP Openview Measureware software that can run on a node. A typical process list might show the following: zd57l08:/home/root>ps -ef | grep /usr/lpp/perf/bin/ root 176232 1 0 Dec 20 - 0:17 /usr/lpp/perf/bin/midaemon root 188536 1 0 Dec 20 - 0:00 /usr/lpp/perf/bin/ttd root 200830 254112 0 Dec 20 - 5:06 /usr/lpp/perf/bin/alarmgen -svr 254112 -t alarmgen /var/opt/perf/datafiles// root 204918 1 0 Dec 20 - 106:40 /usr/lpp/perf/bin/scopeux root 233644 1 0 Dec 20 - 0:07 /usr/lpp/perf/bin/llbd root 254112 266370 0 Dec 20 - 6:56 /usr/lpp/perf/bin/agdbserver -t alarmgen /var/opt/perf/datafiles/ root 266370 1 0 Dec 20 - 3:42 /usr/lpp/perf/bin/perflbd root 307362 266370 0 Dec 20 - 8:22 /usr/lpp/perf/bin/rep_server -t SCOPE /var/opt/perf/datafiles/logglob You can start or stop or view the status of the processes, by using the mwa command: oranh202:/home/se1223>mwa status MeasureWare scope status: WARNING: scopeux is not active (MWA data collector) MeasureWare background daemon status: (Should always be running when the system is up) Running ttd (Transaction Tracker daemon) pid 1493 MeasureWare server status: Running alarmgen (alarm generator) pid 12547 Running agdbserver (alarm database server) pid 12546 Running perflbd (location broker) pid 12075 The following data sources have running repository servers: PID DATA SOURCE Running rep_server 12521 SCOPE How does mwa start on boot? --------------------------- There is an entry in "/etc/inittab": root@zd110l01.nl.eu.abnamro.com:/etc#cat inittab | grep mwa mwa:2:wait:/etc/rc.mwa start >/dev/console # Start MeasureWare Check on whether its running: oper@zd110l03:/home/oper$ ps -ef | grep /usr/lpp/ root 147480 1 0 May 15 - 0:10 /usr/lpp/perf/bin/midaemon root 151694 1 0 May 02 - 38:59 /usr/lpp/perf/bin/llbd root 229394 340068 0 May 15 - 7:30 /usr/lpp/perf/bin/rep_server -t SCOPE /var/opt/perf/datafiles/logglob root 258142 393340 0 Jul 18 - 9:04 /usr/lpp/mmfs/bin/aix64/mmfsd64 root 270588 372908 0 May 15 - 4:07 /usr/lpp/perf/bin/alarmgen -svr 372908 -t alarmgen /var/opt/perf/datafiles// root 315572 1 0 May 15 - 40:33 /usr/lpp/perf/bin/scopeux root 340068 1 0 May 15 - 4:45 /usr/lpp/perf/bin/perflbd root 352326 1 0 May 15 - 0:00 /usr/lpp/perf/bin/ttd root 372908 340068 0 May 15 - 6:19 /usr/lpp/perf/bin/agdbserver -t alarmgen /var/opt/perf/datafiles/ root 393340 1 0 Jul 18 - 0:00 /bin/ksh /usr/lpp/mmfs/bin/runmmfs uctsp0 434430 1 0 May 04 - 58:36 /usr/lpp/uctsp0/control-sa/exe/AIX-51/p_ctsce uctsp0 503814 434430 0 22:41:01 - 0:00 /usr/lpp/uctsp0/control-sa/exe/AIX-51/./p_ctscd 57671683 57671682 434430 uctsp0 536756 434430 0 22:41:01 - 0:00 /usr/lpp/uctsp0/control-sa/exe/AIX-51/./p_ctscs 57671681 60817408 434430 -- How to stop and start the agents: 1. Use the /etc/rc.mwa script, if its available on your system: root@zd110l13:/etc#rc.mwa stop Shutting down Measureware collection software Shutting down scopeux, pid(s) 192688 Waiting on 192688 (10 more tries) The Measureware collector, scopeux has been shut down successfully. Shutting down the MeasureWare server daemons Shutting down the alarmgen process. This may take a while depending upon how many monitoring systems have to be notified that MeasureWare Server is shutting down. Shutting down the perflbd process The perflbd process has terminated Shutting down the agdbserver process The agdbserver process has terminated Shutting down the rep_server processes The rep_server processes have terminated The MeasureWare Server has been shut down successfully root@zd110l13:/etc#rc.mwa start The MeasureWare scope collector is being started. The Transaction Tracking daemon /usr/lpp/perf/bin/ttd has been started. The performance collection daemon /usr/lpp/perf/bin/scopeux has been started. The MeasureWare server daemon "llbd" is being started. The MeasureWare server daemons are being started. The MeasureWare Location Broker daemon /usr/lpp/perf/bin/perflbd has been started. root@zd110l13:/etc# Notes about mwa: ---------------- About MWA(MeasureWare Agent) Introduction: MeasureWare Agent software captures performance, resource, and transaction data from your HP 9000 server or workstation system. Using minimal system resources, the software continuously collects, logs, summarizes, and timestamps data,and detects alarm conditions on current and historical data across your system. You can analyze the data using spreadsheet programs, Hewlett-Packard analysis products such as PerfView, or third-party analysis products. Also, MeasureWare Agent provides data access to PerfView and sends alarm notifications to PerfView, HP OpenView, and IT/Operations. HP OpenView MeasureWare Agent for UNIX has been renamed to HP OpenView Performance Agent for UNIX. MeasureWare Agent uses data source integration (DSI) technology to receive, alarm on, and log data from external data sources such as applications, databases, networks, and other operating systems. The comprehensive data logged and stored by MeasureWare Agent allows you to: Characterize the workloads in the environment. Analyze resource usage and load balance. Perform trend analyses on historical data to isolate and identify bottlenecks. Perform service-level management based on transaction response time. Perform capacity planning. Respond to alarm conditions. Solve system management problems before they arise. Starting MWA Automatically The process of starting MeasureWare Agent automatically whenever the system reboots is controlled by the configuration file /etc/rc.config.d/mwa. This file defines two shell variables, MWA_START and MWA_START_COMMAND. The default /etc/rc.config.d/mwa configuration file shipped with this version of MeasureWare Agent resides in /opt/perf/newconfig/ and assigns the following values to these variables: MWA_START=1 MWA_START_COMMAND="/opt/perf/bin/mwa start" When MeasureWare Agent is installed, the file is conditionally copied to /etc/rc.config.d/mwa and will not replace any existing /etc/rc.config.d/mwa configuration file that may have been customized by the user for a previous version of MeasureWare Agent. When the file is copied to /etc/rc.config.d/mwa, the variable MWA_START=1 causes MeasureWare Agent to automatically start when the system reboots. The variable MWA_START_COMMAND="/opt/perf/bin/mwa start" causes all MeasureWare Agent processes to initiate when the system reboots. If you want MeasureWare Agent to start at system reboot using special options, modify the /etc/rc.config.d/mwa file by changing MWA_START_COMMAND from its default value of "/opt/perf/bin/mwa start" to the desired value. For example, to start up scopeux but not the servers, change the value to "/opt/perf/bin/mwa start scope". To disable MeasureWare Agent startup when the system reboots, change the variable MWA_START=1 to MWA_START=0. MWA Command: SYNOPSIS mwa [action] [subsystem] [parms] DESCRIPTION mwa is a script that is used to start, stop, and re-initialize MeasureWare Agent processes. ACTION -? List all mwa options. If your shell interprets ? as a wildcard character, use an invalid option such as -xxx nstead of -?. start Start all or part of MeasureWare Agent. (default) stop Stop all or part of MeasureWare Agent. restart Reinitialize all or part of MWA. This option causes some processes to be stopped and restarted. status List the status of all or part of MWA processes. version List the version of the all or part of MWA files. SUBSYSTEM all Perform the selected action on all MWA components. (default) scope Perform the selected action on the scopeux collector. The restart operation causes the scopeux collector to stop, then restart. This causes the parm and ttd.conf files to be re-read. server Perform the selected action on the MWA server components. This affects the data repositories as well as the alarm generation subsystem. The restart operation causes all repository server processes to terminate and restart. This causes the perflbd.rc and alarmdef files to be re-read. alarm Perform the selected action on the MWA server alarm component. Restart is the only valid option and causes the alarmdef file to be reprocessed. db Perform the selected action on the MWA server db component. PARMS -midaemon Provide the midaemon with parameters to initiate it with other than default parameters. Example: phred01:/> mwa status MeasureWare scope status: WARNING: scopeux is not active (MWA data collector) MeasureWare background daemon status: (Should always be running when the system is up) Running ttd (Transaction Tracker daemon) pid 1900 MeasureWare server status: Running alarmgen (alarm generator) pid 2816 Running agdbserver (alarm database server) pid 2815 Running perflbd (location broker) pid 1945 The following data sources have running repository servers: PID DATA SOURCE Running rep_server 2810 SCOPE phred01:/> mwa stop Shutting down Measureware collection software.. NOTE: The Transaction Tracker daemon, ttd will be left running. pid 1900 Shutting down the MeasureWare server daemons.. Shutting down the alarmgen process. This may take awhile depending upon how many monitoring systems have to be notified that MeasureWare Server is shutting down. The alarmgen process has terminated Shutting down the perflbd process The perflbd process has terminated The agdbserver process terminated The rep_server processes have terminated The MeasureWare Server has been shut down successfully phred01:/> mwa start The Transaction Tracker daemon is being started. The Transaction Tracker daemon /opt/perf/bin/ttd, is already running. The MeasureWare scope collector is being started. The performance collection daemon /opt/perf/bin/scopeux has been started. The MeasureWare server daemons are being started. The MeasureWare Location Broker daemon /opt/perf/bin/perflbd has been started. phred01:/> mwa status MeasureWare scope status: Running scopeux (MWA data collector) pid 12361 Running midaemon (measurement interface daemon) pid 1936 MeasureWare background daemon status: Running ttd (Transaction Tracker daemon) pid 1900 MeasureWare server status: Running alarmgen (alarm generator) pid 12907 Running agdbserver (alarm database server) pid 12906 Running perflbd (location broker) pid 12369 The following data sources have running repository servers: PID DATA SOURCE Running rep_server 12905 SCOPE References: HP OpenView Performance Agent for HP-UX 10.20 and 11 Installation & Configuration Guide man mwa(Command) Thread 1 about scopeaux: ------------------------ Subject: restart vrs. start scopeux mwa status reports scopeux not running. Manual states to use restart command to retain existing logs (status.scope). But, I'm more concerned about the database collected prior to "mysterious" end of scopeux. Will restart (or start) of scope (scopeux) preserve existing data? Thanks. Vic. Once the data is written to the log files, it stays there when scopeux stops and starts. The data is deleted after the logfile reachs its size limit and starts to wrap. The oldest data is overwritten first. I just do a "mwa start scope" to restart scope. I usually don't do a "mwa restart" as sometimes one of the processes may not stop, usually perflbd. I do a "mwa stop", check everything "mwa status" then do a "mwa start". Sometimes when scopeux crashes, it was in the act of writing a record and only a partial record is written. This partial record will corrupt the database and scopeux will not start. In this case, the only way to start scopeux is to delete the database. It is a good idea to backup the databases frequently if the data is important to you. HTH Marty If you only want to work with the Scope Collector itself (I.E. All other MeasureWare processes are running) do the following: mwa start scope or mwa restart scope This will narrow down what part of the MeasureWare product you are working with. The status.scope file might help you figure out why scope stopped. To see what may have happened to the scope daemon, look in its status file /var/opt/perf/status.scope. You can also use "perfstat -t" to see the last few lines of all the OVPA status files. Since the "perfstat" command shows glance and OVPA (mwa) status, I recommend using perfstat instead of "mwa status" (also less to type!). Since I'm in a recommending mood, I also recommend AGAINST doing a "mwa start scope" (or restart scope). The reason is that its always better to restart the datacomm daemons when the underlying collector is restarted. Thus its better to just do a "mwa restart" or "mwa start" instead of restarting scope out from under rep_server and friends. In any case, if perfstat shows everything running but scopeux, then first find out why scope died (by looking at status.scope) before doing any restarts. Thread 2 about scopeux: ----------------------- Subject: HELP OVPA: midaemon and scopeux won't start Jamie Chui Jun 21, 2007 03:23:12 GMT I could not get midaemon and scopeux to start. When using glance, the following error messages appears and what does it mean? midaemon: Mon Jun 11 15:51:05 2007 mi_ki_init - only able to allocate 3 bufsets Not enough space. I am using HP-UX 11.11 with OVPA C.04.55.00. Measureware ran for 10 days, and during this period, it had the following error message and then finally one day it stopped running. **** /opt/perf/bin/scopeux : 06/15/07 13:35:01 **** WARNING: Measurement Buffers Lost see metric GBL_LOST_MI_TRACE_BUFFERS. (PE221-5 0) How can I troubleshoot and get it running again? It looks like your OS is not allocating enough buffer space. You will need to increase your kernel parameters pertaining to buffer space and regen the kernel. HTH Marty ctcasd daemon: ============== The ctcasd daemon is used by the cluster security services library when UNIX-identity-based authentication is configured and active within the cluster environment. The cluster security services uses ctcasd when service requesters and service providers try to create a secured execution environment through a network connection. ctcasd is not used when service requesters and providers establish a secured execution environment through a local operating system connection such as a UNIX domain socket. The daemon is actually part of RSCT, the reliable scalable cluster technology. The Cluster Security (CtSec) component of RSCT provides a subservice that performs authentication functions based on host identities. This subservice, called "ctcas", comes with a text formatted configuration file shipped in /usr/sbin/rsct/cfg/ctcasd.cfg. Tivoli endpoint, lcfd process: ============================== Tivoli Management Framework is the software infrastructure for many Tivoli software products. Using Tivoli Management Framework and a combination of Tivoli Enterprise products, you can manage large distributed networks with multiple operating systems, various network services, diverse system tasks, and constantly changing nodes and users. Tivoli Management Framework provides management services that are used by the installed Tivoli Enterprise products. Tivoli Management Framework provides centralized control of a distributed environment, which can include mainframes, UNIX(R) operating systems, or Microsoft Windows operating systems. Using Tivoli Enterprise products, a single system administrator can perform the following tasks for thousands of networked systems: -Manage user and group accounts -Deploy new or upgrade existing software -Inventory existing system configurations -Monitor the resources of systems either inside or outside the Tivoli environment -Manage Internet and intranet access and control -Manage third-party applications Tivoli Management Framework lets you securely delegate system administration tasks to other administrators, giving you control over which systems an administrator can manage and what tasks that administrator can perform. Tivoli Management Framework includes the base infrastructure and base set of services that its related products use to provide direct control over specific resources in a distributed computing environment. Tivoli Management Framework provides a simple, consistent interface to diverse operating systems, applications, and distributed services. >> Architecture overview: Using this three-tiered hierarchy, the amount of communication with the Tivoli server is reduced. Endpoints do not communicate with the Tivoli server, except during the initial login process. All endpoint communication goes through the gateway. In most cases, the gateway provides all the support an endpoint needs without requiring communication with the Tivoli server. In a smaller workgroup-size installation, you can create the gateway on the Tivoli server. The server can handle communication requirements when fewer computer systems are involved. This is not an acceptable option in large deployments. The Tivoli server in a large installation will be overloaded if it also serves as a gateway. Refer to Endpoints and gateways for more information about endpoint communication. -- Tivoli servers The Tivoli server includes the libraries, binaries, data files, and the graphical user interface (GUI) (the Tivoli desktop) needed to install and manage your Tivoli environment. The Tivoli server performs all authentication and verification necessary to ensure the security of Tivoli data. The following components comprise a Tivoli server: - An object database, which maintains all object data for the entire Tivoli region. - An object dispatcher, which coordinates all communication with managed nodes and gateways. The object dispatcher process is the oserv, which is controlled by the oserv command. - An endpoint manager, which is responsible for managing all of the endpoints in the Tivoli region. When you install the Tivoli server on a UNIX operating system, the Tivoli desktop is automatically installed. When you install the Tivoli server on a Windows operating system, you must install Tivoli Desktop for Windows separately to use the Tivoli desktop. -- Managed nodes A managed node runs the same software that runs on a Tivoli server. Managed nodes maintain their own object databases that can be accessed by the Tivoli server. When managed nodes communicate directly with other managed nodes, they perform the same communication or security operations that are performed by the Tivoli server. The difference between a Tivoli server and a managed node is that the Tivoli server object database is global to the entire region including all managed nodes. In contrast, the managed node database is local to the particular managed node. To manage a computer system that hosts the managed node, install an endpoint on that managed node. -- Gateways A gateway controls communication with and operations on endpoints. Each gateway can support thousands of endpoints. A gateway can launch methods on an endpoint or run methods on behalf of the endpoint. A gateway is generally created on an existing managed node. This managed node provides access to the endpoint methods and provides the communication with the Tivoli server that the endpoints occasionally require. Refer to Endpoints and gateways for more information about gateways. -- Endpoints An endpoint provides the primary interface for system management. An endpoint is any system that runs the lcfd service (or daemon), which is configured using the lcfd command. Typically, an endpoint is installed on a computer system that is not used for daily management operations. Endpoints run a very small amount of software and do not maintain an object database. The majority of systems in a Tivoli environment should be endpoints. The Tivoli desktop is not installed with the endpoint software. If you choose to run a desktop on an endpoint, you must install Tivoli Desktop for Windows or telnet to a UNIX managed node. Refer to Endpoints and gateways for more information about endpoints. --- Autostart: thread: Autostart of the LCFD process on AIX server Technote (FAQ) Problem The AIX server comes preloaded with the Tivoli Endpoint software installed. How can you make this process autostart at bootup? Solution Create the /etc/inittab entry: mkitab "rctma1:2:wait:/etc/rc.tma1 > /dev/console 2>&1 # Tivoli Management Agent" Create the startup file "/etc/rc.tma1" #!/bin/sh # # Start the Tivoli Management Agent # if [ -f /Tivoli/lcf/dat/1/lcfd.sh ]; then /Tivoli/lcf/dat/1/lcfd.sh start fi When the OS reboot the LCFD process will automatically start. thread: aix comes with tivoli agents installed (but not configured). you should configure the last.cfg file (usually, you can find this in /../lcf/dat/1) add a line 'lcs.logininterfaces=gatewayip+9494' this line will instruct the endpoint to report on you existing tivoli gateway. Hi, previous info is correct accept an writing mistake. It should be lcs.login_interfaces=ipoftmrserver stop the endpoint (sh lcfd.sh stop) and start it (sh lcfd.sh start) After succ. registration you should see an lcf.dat file in the lcf/dat/1 folder. Note 1: ------- thread: Q: Dear friends, When i run "lslpp -l" i have in a line : "Tivoli_Management_Agent.client.rte 3.7.1.0 COMMITTED Management Framework Endpoint Runtime" ". What's the purpose of this fileset ? Ps : I have Aix 5.3 thank's a lot. A: The purpose of Tivoli Management Agent Reply from nlx6976 on 3/6/2006 5:56:00 PM Its an agent that runs on your system as part of the Tivoli Distributed Monitoring. It reports various things about your sysem back to the Tivoli Enterprise Console - usually your help desk. The basic monitors include things like file system usage (e.g if a FS is more than 80% used the system gets flagged at the console), or monitoring log files. Basically you can configure it to monitor whatever you want. Note 2: ------- Problem The AIX server comes preloaded with the Tivoli Endpoint software installed. How can you make this process autostart at bootup? Solution Create the /etc/inittab entry: mkitab "rctma1:2:wait:/etc/rc.tma1 > /dev/console 2>&1 # Tivoli Management Agent" Create the startup file "/etc/rc.tma1" #!/bin/sh # # Start the Tivoli Management Agent # if [ -f /Tivoli/lcf/dat/1/lcfd.sh ]; then /Tivoli/lcf/dat/1/lcfd.sh start fi When the OS reboot the LCFD process will automatically start. Note 3: ------- The lcfd.log file, found on each endpoint in the lcf/dat directory, contains logging messages for upcall methods, downcall methods, and the login activities of the endpoint. You also can view this log file from the http interface. In addition, lcfd.log can have different levels of debugging information written to it. To set the level of debugging, use the lcfd command with the -dlevel option, which sets the log_threshold option in the last.cfg file. Set the log_threshold at level 2 for problem determination, because level 3 often provides too much information. Of the three log files, the lcfd.log file is sometimes the most useful for debugging endpoint problems. However, remote access to the endpoint is necessary for one-to-one contact. Endpoint log messages have the following format: timestamp level app_name messageThe message elements are as follows: timestamp Displays the date and time that the message was logged. level Displays the logging level of the message. app_name Displays the name of the application that generated the message. message Displays the full message text. The content of message is provided by the application specified in app_name. The default limit of the log file is 1 megabyte, which you can adjust with the lcfd (or lcfd.sh) command with the -D log_size =max_size option. The valid range is 10240 through 10240000 bytes. When the maximum size is reached, the file reduces to a size of approximately 200 messages and continues to log. In addition to these three log files, the following files help troubleshoot endpoint problems located on the endpoint: last.cfg A text file that contains the endpoint and gateway login configuration information from the last time the endpoint successfully logged in to its assigned gateway. Use this file to review the configuration settings for an endpoint. lcf.id A text file that contains a unique ID number to represent the endpoint. This file is uniquely generated if the TMEID.tag file does not exist. lcf.dat A binary file that contains the gateway login information. You cannot modify this information; however, you can view network configuration information from the http interface. Of these files, the last.cfg file can be useful in determining problems with an endpoint. The last.cfg file resides in the \dat subdirectory of the endpoint installation and also can be viewed from the http interface. This file contains configuration information for the endpoint. The following example shows the contents of a last.cfg file: lcfd_port=9495 lcfd_preferred_port=9495 gateway_port=9494 protocol=TCPIP log_threshold=1 start_timeout=120 run_timeout=120 lcfd_version=41100 logfile=C:\Program Files\Tivoli\lcf\dat\1\lcfd.log config_path=C:\Program Files\Tivoli\lcf\dat\1\last.cfg run_dir=C:\Program Files\Tivoli\lcf\dat\1 load_dir=C:\Program Files\Tivoli\lcf\bin\w32-ix86\mrt lib_dir=C:\Program Files\Tivoli\lcf\bin\w32-ix86\mrt cache_loc=C:\Program Files\Tivoli\lcf\dat\1\cache cache_index=C:\Program Files\Tivoli\lcf\dat\1\cache\Index.v5 cache_limit=20480000 log_queue_size=1024 log_size=1024000 udp_interval=300 udp_attempts=6 login_interval=1800 lcs.machine_name=andrew1 lcs.crypt_mode=196608 lcfd_alternate_port=9496 recvDataTimeout=2 recvDataNumAttempts=10 recvDataQMaxNum=50 login_timeout=300 login_attempts=3 When you change endpoint configuration with the lcfd command, the last.cfg file changes. Therefore, you should not modify the last.cfg file. If you require changes, use the lcfd command to make any changes. However, running the lcfd command requires stopping and restarting the endpoint. Another useful tool for endpoint problem determination is the output from the wtrace command. The wtrace command is useful for tracking upcall and downcall method failures. To learn more about the wtrace command, see Troubleshooting the Tivoli environment. sample logfile "root@zd110l13:/beheer/Tivoli/lcf/dat/1/lcfd.log" Nov 15 09:14:13 1 engineUpdate Sending msg amRaAdd Nov 15 09:14:13 1 engineUpdate Sending msg amTmrRemove Nov 15 09:14:13 1 engineUpdate Sending msg amMpeRemove Nov 15 09:14:13 1 engineUpdate Sending msg amRaRemove Nov 15 09:14:13 1 engineUpdate Sending msg amTmrAdd Nov 15 09:14:13 1 engineUpdate Sending msg amMpeAdd Nov 15 09:14:13 1 engineUpdate Sending msg amRaAdd Nov 15 09:14:13 1 engineUpdate Sending msg amRaAdd Nov 15 09:14:13 1 engineUpdate Sending msg amRaAdd Nov 15 09:14:13 1 engineUpdate Sending msg amRaAdd Nov 15 09:14:13 1 engineUpdate Sending msg amRaAddTasks Nov 15 09:14:13 1 engineUpdate Sending msg amEndPush Nov 15 09:18:48 1 lcfd Spawning: /beheer/Tivoli/lcf/dat/1/cache/bin/aix4-r1/TME/Tmw2k/tmw2k_ep, ses: 215c89e6 Nov 15 09:28:46 1 lcfd Spawning: /beheer/Tivoli/lcf/dat/1/cache/bin/aix4-r1/TME/Tmw2k/tmw2k_ep, ses: 215c8a22 Nov 15 09:33:51 1 lcfd Spawning: /beheer/Tivoli/lcf/dat/1/cache/bin/aix4-r1/TME/Tmw2k/tmw2k_ep, ses: 215c8a4e Nov 15 09:48:55 1 lcfd Spawning: /beheer/Tivoli/lcf/dat/1/cache/bin/aix4-r1/TME/Tmw2k/tmw2k_ep, ses: 215c8ac6 Nov 15 10:03:58 1 lcfd Spawning: /beheer/Tivoli/lcf/dat/1/cache/bin/aix4-r1/TME/Tmw2k/tmw2k_ep, ses: 215c8b5b Nov 15 10:19:02 1 lcfd Spawning: /beheer/Tivoli/lcf/dat/1/cache/bin/aix4-r1/TME/Tmw2k/tmw2k_ep, ses: 215c8c4a Nov 15 10:34:05 1 lcfd Spawning: /beheer/Tivoli/lcf/dat/1/cache/bin/aix4-r1/TME/Tmw2k/tmw2k_ep, ses: 215c8cb6 root@zd110l05:/#find . -name "*tecad*" -print ./tmp/.tivoli/.tecad_logfile.fifo.zd110l05.aix-default ./tmp/.tivoli/.tecad_logfile.lock.zd110l05.aix-default ./tmp/.tivoli/.tecad_logfile.fifo.zd110l05.aix-defaultlogsourcepipe ./etc/Tivoli/tecad ./etc/Tivoli/tecad.1011792 ./etc/Tivoli/tecad.1011792/bin/init.tecad_logfile ./etc/Tivoli/tec/tecad_logfile.cache ./etc/rc.tecad_logfile ./etc/rc.shutdown-pre-tecad_logfile ./etc/rc.tecad_logfile-pre-tecad_logfile ./etc/rc.tivoli_tecad_mqseries find: 0652-023 Cannot open file ./proc/278708. find: 0652-023 Cannot open file ./proc/315572. find: 0652-023 Cannot open file ./proc/442616. find: 0652-023 Cannot open file ./proc/475172. ./beheer/Tivoli/lcf/dat/1/cache/out-of-date/init.tecad_logfile ./beheer/Tivoli/lcf/dat/1/cache/out-of-date/tecad-remove-logfile.sh ./beheer/Tivoli/lcf/dat/1/cache/bin/aix4-r1/TME/TEC/adapters/bin/tecad_logfile.cfg ./beheer/Tivoli/lcf/dat/1/LCFNEW/CTQ/logs/trace_mqs_start_tecad__MQS_CC.Q3P0063__1__p1052790.log ./beheer/Tivoli/lcf/bin/aix4-r1/TME/TEC/adapters/bin/tecad_logfile ./beheer/Tivoli/lcf/bin/aix4-r1/TME/TEC/adapters/bin/init.tecad_logfile ./beheer/Tivoli/lcf/bin/aix4-r1/TME/TEC/adapters/bin/tecad-remove-logfile.sh ./beheer/Tivoli/lcf/bin/aix4-r1/TME/TEC/adapters/aix-default/etc/C/tecad_logfile.fmt ./beheer/Tivoli/lcf/bin/aix4-r1/TME/TEC/adapters/aix-default/etc/tecad_logfile.err ./beheer/Tivoli/lcf/bin/aix4-r1/TME/TEC/adapters/aix-default/etc/tecad_logfile.conf ./beheer/Tivoli/lcf/bin/aix4-r1/TME/TEC/adapters/aix-default/etc/tecad_logfile.cds ./beheer/Tivoli/lcf/bin/aix4-r1/TME/MQS/bin/tecad_mqseries.cfg ./beheer/Tivoli/lcf/bin/aix4-r1/TME/MQS/bin/tecad_mqseries.mqsc ./beheer/Tivoli/lcf/bin/aix4-r1/TME/MQS/bin/tecad_mqseries_nontme ./beheer/Tivoli/lcf/bin/aix4-r1/TME/MQS/bin/tecad_mqseries_tmegw ./beheer/Tivoli/lcf/bin/generic_unix/TME/MQS/sh/mqs_start_tecad.sh ./beheer/Tivoli/lcf/bin/generic_unix/TME/MQS/sh/mqs_stop_tecad.sh ./beheer/Tivoli/lcf/bin/generic_unix/TME/MQS/teccfg/tecad_mqseries.Q3P0063.cfg dircmp: ======= Linux / Unix dircmp command About dircmp Lists files in both directories and indicates whether the files in the directories are the same and/or different. Syntax dircmp [-d] [-s] [-w n] directoryone directorytwo. -d Compare the contents of files with the same name in both directories and output a list telling what must be changed in the two files to bring them into agreement. The list format is described in diff(1). -s Does not tell you about the files that are the same. -w n Change the width of the output line to n characters. The default width is 72. directoryone The first directory for comparing. directorytwo The second directory for comparing. Examples dircmp dir1 dir2 - Compares the directory dir1 with the directory dir2. Below is an example of the output you may receive when typing this command. Feb 8 17:18 2001 Comparison of help issues Page 1 directory . same ./favicon.ico same ./logo.gif same ./question.gif kmcrca: ======= Part of the IBM Tivoli OMEGAMON XE for WebSphere MQ suite. KMCRCA Starts IBM Tivoli OMEGAMON XE for WebSphere MQ Configuration KMQIRA Starts IBM Tivoli OMEGAMON XE for WebSphere MQ Monitoring KRARLOFF Converts the historical data file to a neutral file format for use with various analytical programs FLASHCOPY: ========== Some notes about flashcopy implementations: Note 1: ======= What is FlashCopy? FlashCopy is a function designed to create an instant "copy" of some data. When an administrator issues a FlashCopy command that essentially says "make a copy of this data," SVC via FlashCopy immediately provides the appearance of having created a copy of the data, when in reality it creates the physical copy in the background before moving that copy to an alternative data-storage device, which can take some time depending on the size of the backup copy. However, it creates the appearance of having completed the copy instantaneously, so customers can have a backup copy available as soon as the command is issued, even though copying to a different storage medium takes place behind the scenes. "Because it operates very quickly in this way, FlashCopy allows customers to make a copy and immediately move on to other work without having to wait for the data to actually physically be copied from one place to another," says Saul. "In that regard, SVC FlashCopy is very similar to FlashCopy on the DS8000, for example, with the difference being SVC FlashCopy operates on most storage devices attached to the SVC, spanning many different disk systems." Note 2: ======= FlashCopy FlashCopy is an IBM feature supported on ESS (Enterprise Storage Servers) that allows you to make nearly instantaneous Point in Time copies of entire logical volumes or data sets. The HDS (Hitachi Data Systems) implementation providing similar function is branded as ShadowImage. Using either implementation, the copies are immediately available for both read and write access. -- FlashCopy Version 1 The first implementation of FlashCopy, Version 1 allowed entire volumes to be instantaneously "copied" to another volume by using the facilities of the newer Enterprise Storage Subsystems (ESS). Version 1 of FlashCopy had its limitations however. Although the copy (or "flash" of a volume occurred instantaneously, the FlashCopy commands were issued sequentially and the ESS required a brief moment to establish the new pointers. Because of this minute processing delay, the data residing on two volumes that were FlashCopied are not exactly time consistent. -- FlashCopy Version 2 FlashCopy Version 2 introduced the ability to flash individual data sets and more recently added support for "consistency groups". FlashCopy consistency groups can be used to help create a consistent point-in-time copy across multiple volumes, and even across multiple ESSs, thus managing the consistency of dependent writes. FlashCopy consistency groups are used in a single-site scenario in order to create a time-consistent copy of data that can then be backed-up and sent offsite, or in a multi-site Global Mirror for ESS implementation to force time consistency at the remote site. The implementation of consistency groups is not limited to FlashCopy. Global Mirror for z/Series (formerly known as XRC or eXtended Remote Copy) also creates consistency groups to asynchronously mirror disk data from one site to another over any distance. Note 3: ------- http://www.ibm.com/developerworks/forums/thread.jspa?messageID=13967589 Q: Using target volume from FlashCopy on same LPAR as source volume going thru VIO server Posted: Jun 28, 2007 12:21:09 PM Reply Synopsis: DS4500 logical drive mapped to a p5 550 VIO server, then mapped to an AIX partition. Without interrupting the source drive, created a flashcopy of the drive and mapped it to the same VIO server, then again to the same partition. This caused duplicate VGID on the system. Had to varyoff and export the volume group to run recreatevg against the flashcopy hdisk and make a new volume group with it. This works fine the first time, however after I varyoff the vg and export it, then disable the flashcopy, and re-create it I cannot import or varyon the vg on the partition. importvg and recreatevg both say the hdisk belongs to a different vg so they don't work. The varyvg fails because the descriptors are not constitent. How do I create a flashcopyvg on this partition using virtual disk from the VIO so that the process is repeatable and thus scriptable without having to interrupt the source volume group everytime I do this. The intent is to be able run a backup process against the flashcopy then disable it and do it again a few hours later and repeat it several times each day. We are using legacy vsam instead of a DB and need to keep the data accessible to our CICS system, while being able to capture point in time backups throughout the day. A: Did you rmdev the vpath and hdisks before recreating the flash copy? Then you will need to run recreatevg again, as restarting the flash copy will change the pvid back to the same as the source volume. Why not just attach the flash copy to another host? Then you won't need to run recreate vg and you could assign the flash copy to the original host if you need to recover the data.