The present Application is related to the following co-pending application:
U.S. patent application Ser. No. 11/599,272, filed on Nov. 16, 2006, to Burugula, et al., entitled “METHOD AND INFRASTRUCTURE FOR DETECTING AND/OR SERVICING A FAILING/FAILED OPERATING SYSTEM INSTANCE”, having IBM Docket YOR920060744US1, assigned to the present assignee, and which is incorporated herein by reference.
1. Field of the Invention
The present invention generally relates to automatically producing an accurate diagnostic report and possibly automatically reviving a crashed or hung operating system instance. More specifically, a healthy running operating system (OS) can register a recovery/repair kernel to the firmware, so that when the OS crashes or hangs is detected, this firmware copies the system kernel memory to a reserved location and then copies the repair kernel into low memory to attempt an automatic repair. If the repair is successful, the firmware will swap back to running the original kernel without a reboot.
2. Description of the Related Art
Currently, when an OS instance fails (crashes or hangs), as demonstrated by LPAR2 102 in
1) This process is time consuming, particularly when the dump file is huge, which is getting more prevalent as system's memory continues to increase in size.
2) The OS vendor's support team may not have access to all of the OS instance's information, in which case they will have to go through multiple iterations of system dump collection and analyses.
3) The OS instance may be too damaged to be able to dump its contents to the disk. That is, the system dump component may itself fail, leaving the system in a non-diagnosable state.
Hence, it would be beneficial to both customers and to OS vendors if an online analysis of the failing OS instance can be done, and preferably done automatically. Currently there are two approaches known to the present inventors that address parts of the above problems:
1. FirmWare Assisted Dump (FWAD)
Publication “Firmware Assisted Dump in a Partitioned Environment using Reserved Partition Memory” (IP.com# IPCOM000166859D) describes a mechanism that can be used to dump an OS instance which cannot dump its own contents to disk (the third problem listed above). FWAD works by pre-registering the OS kernel's data regions to the firmware, so that those regions can be copied to safe memory regions which are preserved across the next reboot. Then the firmware and rebooting OS instance can dump the failing OS kernel's data to the dump device.
However, the FWAD does not eliminate the requirement for off-line processing of the dump data. The customer still has to collect the dump data from a device and send it to the OS vendor's technical support team, who will analyze the dump. Moreover, this solution requires an OS reboot to occur, which can take from several minutes to a few hours to complete, a very time-consuming process.
2. An Ambulance LPAR:
This is a service partition (LPAR) in the same hardware system that contains the LPAR with the failed OS instance. The OS in this ambulance LPAR can do an online diagnosis of the failed OS, and is described in the above-identified co-pending application.
The main problem with this approach is the security concern, because all the memory belonging to the failed LPAR, including application data, is exposed to the ambulance LPAR.
Another problem with the ambulance LPAR approach is that the layout of the data structures can vary among different OS versions. So, each OS version running in the hardware system needs an ambulance LPAR that runs the same OS version, making the ambulance LPAR an expensive and hard-to-manage proposition.
Therefore, a need continues to exist for improving the servicing of failed OS instances. Particularly, it would be useful to have a mechanism that can do automated and/or online analysis of a failed OS instance, but without the drawbacks associated with the FWAD or the Ambulance LPAR as described briefly above and in the above-identified co-pending application.
In view of the foregoing, and other, exemplary problems, drawbacks, and disadvantages of the conventional systems, it is an exemplary feature of the present invention to provide a structure (and method) in which, upon failure of an OS instance, an automatic firmware assisted invocation of a diagnosis & repair kernel, and this kernel will automatically diagnose the failed OS instance.
It is another exemplary feature of the present invention to provide a structure and method for automatically attempting to repair the crashed OS instance.
It is another exemplary feature of the present invention to allow the crashed OS instance, if the automatic repair has been successful, to resume operation as an OS instance without having to perform a reboot.
Therefore, in a first exemplary aspect of the present invention, to achieve the above features and objects, described herein is a method (and structure and set of machine-readable instructions) of operating an OS instance on a computer, including detecting a failure of the OS instance and automatically performing a diagnosis of the failure, using a processor on the computer.
In a second exemplary aspect of the present invention, also described herein is a mechanism to attempt to automatically recover a failed operating system (OS) instance on a computer, the mechanism including a detector that provides an indication that an OS instance has failed; a diagnosis-and-recovery kernel embedded in a protected region of the OS instance; and memory space allocated for automatically storing information during a failure of the OS instance, wherein, upon the OS instance having been detected as failed, the diagnosis-and-recovery kernel automatically performs a diagnosis of the OS failure, using the automatically-stored information, and attempts to automatically repair/recover the failed OS instance, based on the diagnosis, without rebooting.
Thus, the present invention provides a mechanism to automatically diagnose a failed OS instance, including the capability of also automatically attempting to repair/recover the failed OS instance and resume running the fixed OS instance without requiring a reboot.
The foregoing and other features, purposes, aspects, and advantages will be better understood from the following detailed description of a preferred embodiment of the invention with reference to the drawings, in which:
Referring now to the drawings and more particularly to
The exemplary embodiment explained in detail in the following discussion is described in the environment of AIX (Advanced Interactive eXecutive), which is the name given to a series of proprietary operating systems sold by IBM for several of its computer system platforms, based on UNIX System V with 4.3BSD-compatible command and programming interface extensions. However, the concepts of the present invention are clearly more general than this specific environment.
The present invention provides a mechanism that will automatically produce an accurate diagnostic report and, possibly, revive a crashed or hung AIX OS instance,
hence reducing outages and service time. Such automation of diagnosis and recovery is much more effective than a remote technical support team of people trying to obtain and analyze (possibly huge) dumps.
The present invention will reduce the time and costs of diagnosing critsits (e.g., “critical situations”, meaning critical product failures that usually involve executive level engagement) caused by OS hangs and crashes, because a large amount of diagnosis can be automated, with immediate notifications to system administrators, and the diagnosis/repair can be more effective and accurate because of the availability of much more information. The invention will, therefore, be a very useful feature in “Lights-Out” data centers.
The “Lights-Out/Touchless Systems” terminology refers to systems typically managed remotely without the ability of the system administrators to have physical access to the system in any reasonable time frame. These “Lights-out” systems are viewed as the next generation of the IT infrastructure deployment, which enables one to take the advantage of labor arbitrage using skills from the BRIC (Brazil, Russia, India, China) countries, while placing the servers in geopolitical stable countries like Germany, England, the US, etc. For example, this hybrid approach is vigorously pursued by IT leaders worldwide, including SAP® (of Germany, for their business software as Service outsourcing), IBM®, Infosys® (India), TCS® (India) and a number of University-based companies in China, etc.
As explained briefly above, when an OS crashes or hangs, the same instance of that OS kernel cannot be used or trusted to analyze and repair itself. The only option currently available is for the kernel to trigger a memory dump by the platform and reboot.
There exist mechanisms for the OS to pre-register its kernel memory in this event so that the contents of that memory can be copied to a safe reserved location higher up in memory. By having the firmware/hypervisor copy the memory contents and register states associated with the crashed kernel into a reserved region of memory, a rebooted instance of the OS kernel can then write all of the system state associated with the crash to disk. That mechanism is described in “Firmware Assisted Dump in a Partitioned Environment Using Reserved Partition Memory”, as described in IPCOM000166859D. However, this solution still requires a reboot, which can take from several minutes to several hours to complete, depending on the size of the system.
Thus, the present invention provides a method for online diagnosis, repair, and, possibly, recovery of an OS instance by augmenting the Firmware Assisted Dump invention mentioned above to transfer control to a diagnosis-and-recovery OS kernel, instead of simply rebooting. This new kernel is a specially-designed diagnosis-and-recovery OS kernel, referred to herein as a “repair kernel”, and is bundled with the OS that was originally booted. In operation, this diagnosis-and-recovery kernel, together with the necessary device drivers and diagnosis scripts, will be placed into a hidden contiguous real-address memory region of the running OS. After taking control, the repair kernel would inspect the state of the crashed OS and then attempt to manipulate the memory and saved register state to make it healthy again.
The formerly-broken kernel could then continue with normal operation, without having to be rebooted. This solution, if properly automated, would reduce the system downtime and provide an improvement over the conventional state of the art, since a few seconds of repair-kernel operation is generally more preferable compared to an OS reboot, which may cause a fair amount of disruptions and loss of states.
Thus, the Firmware Assisted Dump mechanism described in the aforementioned publication uses a registration mechanism for the OS to specify to firmware which regions of memory it wants to preserve and where those regions should be copied. Likewise, it also lets the OS specify where in memory that firmware should place a copy of the registers' states at the point of the crash. These different requests are conveyed as different dump sections in the registration call.
The present invention uses new types of dump sections, in which the OS specifies the location and size in memory of the repair kernel, along with the registers' states and page-able entries it needs loaded when firmware transfers control to the repair kernel.
The firmware would recognize these new dump sections during the registration call. When a Firmware Assisted Dump trigger occurs, the firmware still copies the crashed OS kernel memory to the location in memory reserved for it. However, after that memory copying is complete, the firmware then copies the repair kernel into low memory and loads its registers' states and page-table entries, instead of rebooting.
The repair kernel then has full control to read and overwrite the states of the crashed kernel. Once finished with the repairs, the repair kernel registers with the firmware the original kernel's memory and registers' states, to enable firmware to swap control back to the original kernel.
In the following discussion, the contents of this memory region are referred to as the Automated LPAR Diagnosis and Recovery (ALDR) image.
The ALDR image includes the ALDR kernel, a few device drivers, some commands, and a table containing addresses of key items from the original OS before it crashes. This memory region where the ALDR image resides will be hidden from the normally running OS instance, so that the OS cannot inadvertently modify the ALDR image. When the OS fails (crashes or hangs), the ALDR kernel from the ALDR image will take control, and will inspect the state of the crashed OS (memory+registers+I/O devices) to diagnose the cause of the failure. If it can determine the cause and has a repair action that can revive the OS, the ALDR image will manipulate the memory and saved registers' states of the crashed OS to fix the problem, and then transfer control back to the original OS, which can then continue its normal operation.
This ALDR solution can reduce OS downtime but does not have the problems of the ambulance LPAR. Moreover, in the case of IBM AIX, when combined with the Active Memory Sharing technology, the memory overhead of this ALDR solution can be much reduced.
In providing a mechanism to enable online diagnosis and recovery of a failed OS instance, the present invention utilizes some of the technologies and concepts developed from the Firmware Assisted Dump technology and the Ambulance LPAR technology.
A. Create an ALDR (Automated LPAR Diagnosis and Recovery) image (step 201).
B. Copy the ALDR image into a memory region that is hidden from the normal running OS instance (step 202).
C. Register the ALDR image with the firmware. When the running OS fails, control will be transferred to the ALDR image (step 203 & step 204).
D. Diagnose and if possible, repair the failed OS instance (step 205).
E. If fixed,
The contents of an ALDR image consist of an ALDR OS kernel, a few device drivers, and diagnosis and repair programs. When the system administrator wants to ALDR-enable a running OS instance, the administrator will issue a user command (e.g. aldrEnable) which will gather all the required components (kernel, device drivers, diagnose and repair programs) to create the ALDR image with OS-instance-specific information.
Step 202: Copy the ALDR Image into a Memory Region that is Hidden from the Memory of the Normal Running OS Instance
Once the ALDR image is created, it is copied into a memory region of the LPAR that is hidden from the running OS instance. To minimize the work needed to access the ALDR image after the OS fails, the ALDR image can be placed into a contiguous memory region. This memory region must be hidden from the running OS to avoid modifications by the running OS or its applications.
This mechanism also needs to reserve hidden real memory space for saving the state of the failed OS, which includes, for example, the memory region with translation-off, registers' states, and page-table entries. The failed OS's state needs to be saved because the firmware will overwrite these parts of the failed OS instance with the contents from the ALDR image. For example, when the firmware boots an OS, it requires the OS to be in the translation-off addressable part of the memory.
When the original OS instance fails, the firmware copies the ALDR kernel into the translation-off memory region. Additionally, because the ALDR diagnosis programs may need to check the translation-off portion of the failed OS instance that was overwritten by the ALDR kernel, those memory contents need to be saved before bringing in the ALDR kernel.
Steps 203/204: Register the ALDR Image with the Firmware and when the Running OS Fails Control Will be Transferred to the ALDR Image.
After copying the ALDR image from disk into memory, the OS has to register with the firmware the location of the ALDR image. The Firmware Assisted Dump has a mechanism for the OS to specify to firmware where in memory the firmware should place a copy of the OS's state at the point of an OS failure. This invention uses new types of dump sections in which the OS specifies the location and size in memory of the ALDR image, the registers' states, and the page-table entries that need to be loaded when firmware transfers control to the ALDR kernel when the OS fails. The firmware will recognize these new dump sections during the registration call.
The Firmware Assisted Dump function currently available on AIX6.1 on POWER6 platforms only has dump sections for saving the prior OS's kernel-memory and register states. The present invention adds new registration-sections to inform the hypervisor about the repair kernel.
When the OS fails, a Firmware Assisted Dump trigger occurs. The firmware then copies the failed OS's state into the above-specified reserved, hidden save-area in memory. After the copying is complete, the firmware then copies the ALDR kernel into low memory and loads its page-table entries & registers' states, instead of rebooting. The ALDR kernel then has full control to read and overwrite the state of the crashed kernel.
Step 205: Diagnose and if Possible, Repair the Failed OS Instance
The ALDR image will diagnose the cause of failure of the failed OS instance by accessing its memory, registers' states, and I/O devices. It is assumed that the ALDR image can access the standard filesystems and paging space of the failed OS instance, in order to determine the cause of the failure. The implementation of the diagnosis and repair programs is specific to the OS type and version. In generic terms, diagnosis and repair involves the following steps:
i. Check the error report entries stored by the failed OS instance, for hints about the cause of the failure.
ii. Verify and fix all damaged kernel data structures to ensure that they have valid contents.
iii. Check all the processes to find if there were dead-locks.
iv. Check the kernel tunable parameters to determine if they were incorrectly set.
v. Check if any of the critical filesystems were 100% full. If so, the ALDR image can either increase the filesystem size if possible, or delete some junk files.
It is noted that the same diagnosis logic described in the above-identified co-pending Application can be used for some of these steps. A key distinction is that, in the present invention, the diagnosis/repair is being performed in the same LPAR, as opposed to running on a separate Ambulance LPAR in the same SMP.
Steps 206/207: If Fixed Send Repair Report and Reinstate the Running of the Original OS Instance; Else Send Diagnosis Report Create a Dump & Reboot.
After the ALDR image has completed the diagnosis and successfully repaired the failed OS, it can use the FWAD infrastructure to reinstate the running of the original OS. More precisely, the ALDR kernel informs the firmware the location of the saved states of the original OS, and instructs firmware to transfer control back to the original OS. Hence the original OS instance is automatically recovered, i.e. continues to run without a reboot. A repair report can be sent to the system administrators and also logged into a file.
In situations in which the failed OS cannot be repaired, a diagnosis report will/should be sent to the administrator, and a dump plus reboot of the original OS can be triggered.
Details of a Concrete Implementation
The following discussion, related to
Details of the Contents of the ALDR Image 403 is Depicted in
The PHYP firmware will then invoke the ALDR repair image 403 as follows:
a) log [and report] actions tried,
b) optionally, do a FWAD, and
c) reboot the original AIX OS instance.
The aldrEnable command, as described in
1) Allocates Real Memory for the ALDR Memory Region.
2) Creates an ALDR image 801 on a disk.
3) Copies the ALDR image 801 into the ALDR Memory Region,
4) Initializes the following items in the ALDR Memory Region:
Just after PHYP has transferred control to the ALDR kernel, the ALDR-SoftROS and ALDR-kernel identify the address of the ALDR Item Table and retrieve the necessary information about the sick OS instance from that table. Once the ALDR kernel consumes those values from the ALDR Item Table, it is ready to perform diagnosis and repair on the sick OS image.
Exemplary Hardware Implementation
The CPUs 1010 are interconnected via a system bus 1012 to a random access memory (RAM) 1014, read-only memory (ROM) 1016, input/output (I/O) adapter 1018 (for connecting peripheral devices such as disk units 1021 and tape drives 1040 to the bus 1012), user interface adapter 1022 (for connecting a keyboard 1024, mouse 1026, speaker 1028, microphone 1032, and/or other user interface device to the bus 1012), a communication adapter 1034 for connecting an information handling system to a data processing network, the Internet, an Intranet, a personal area network (PAN), etc., and a display adapter 1036 for connecting the bus 1012 to a display device 1038 and/or printer 1039 (e.g., a digital printer or the like).
In addition to the hardware/software environment described above, a different aspect of the invention includes a computer-implemented method for performing the above method. As an example, this method may be implemented in the particular environment discussed above.
Such a method may be implemented, for example, by operating a computer, as embodied by a digital data processing apparatus, to execute a sequence of machine-readable instructions. These instructions may reside in various types of signal-bearing storage media.
Thus, this aspect of the present invention is directed to a programmed product, comprising signal-bearing storage media tangibly embodying a program of machine-readable instructions executable by a digital data processor incorporating the CPU 1010 and hardware above, to perform the method of the invention.
This signal-bearing storage media may include, for example, a RAM contained within the CPU 10010, as represented by the fast-access storage for example. Alternatively, the instructions may be contained in another signal-bearing storage media, such as a magnetic or optical data storage diskette 100 (
Whether contained in the diskette 100, the computer/CPU 1010, or elsewhere, the instructions may be stored on a variety of machine-readable data storage media, such as DASD storage (e.g., a conventional “hard drive” or a RAID array), magnetic tape, electronic read-only memory (e.g., ROM, EPROM, or EEPROM), an optical storage device (e.g. CD-ROM, WORM, DVD, digital optical tape, etc.), paper “punch” cards, or other suitable signal-bearing storage media, including storage media in transmission media, whether using digital or analog format, and including memory devices used in transmission media such as communication links and wireless devices.
In an illustrative embodiment of the invention, the machine-readable instructions may comprise software object code.
The present invention has been described in an exemplary embodiment using AIX. However, the concepts described herein clearly go beyond AIX, since even the exemplary embodiment demonstrates that any OS having a hypervisor-like component that could support a repair-image registration mechanism and the underlying VM/LPAR OS utilizing that registration mechanism. As one example, Microsoft's Hyper-V, in conjunction with Windows Server 2008 (the LPAR's OS) could implement the present invention.
Moreover, it should be clear to one having ordinary skills in the art that the concepts of the present invention could be extended to any OS environment supported by firmware that could register an OS diagnosis/repair kernel, such that this diagnosis/repair kernel could be automatically activated upon an indication to the firmware of a failure of OS.
While the invention has been described in terms of an exemplary embodiment, those skilled in the art will recognize that the invention can be practiced with modification within the spirit and scope of the appended claims.
Further, it is noted that, Applicants' intent is to encompass equivalents of all claim elements, even if amended later during prosecution.
Number | Name | Date | Kind |
---|---|---|---|
4713656 | Cliff et al. | Dec 1987 | A |
5805886 | Skarbo et al. | Sep 1998 | A |
5828882 | Hinckley | Oct 1998 | A |
6199179 | Kaufmann et al. | Mar 2001 | B1 |
6216132 | Chandra et al. | Apr 2001 | B1 |
6266716 | Wilson et al. | Jul 2001 | B1 |
6505245 | North et al. | Jan 2003 | B1 |
6549916 | Sedlar | Apr 2003 | B1 |
6718482 | Sato et al. | Apr 2004 | B2 |
6728715 | Astley et al. | Apr 2004 | B1 |
6754664 | Bush | Jun 2004 | B1 |
6829639 | Lawson et al. | Dec 2004 | B1 |
6910070 | Mishra et al. | Jun 2005 | B1 |
6910160 | Bajoria et al. | Jun 2005 | B2 |
7107497 | McGuire et al. | Sep 2006 | B2 |
7117388 | Arimilli et al. | Oct 2006 | B2 |
7260752 | Linam et al. | Aug 2007 | B2 |
7472067 | Mathur et al. | Dec 2008 | B2 |
7539986 | Grobman | May 2009 | B2 |
7558986 | Abe | Jul 2009 | B2 |
7730359 | Clarke | Jun 2010 | B2 |
7734945 | Levidow et al. | Jun 2010 | B1 |
20020035649 | Korn et al. | Mar 2002 | A1 |
20020059380 | Biliris et al. | May 2002 | A1 |
20020089526 | Buxton et al. | Jul 2002 | A1 |
20020120884 | Nakamikawa et al. | Aug 2002 | A1 |
20020124165 | Smith et al. | Sep 2002 | A1 |
20020124215 | Austen et al. | Sep 2002 | A1 |
20020129110 | Liu et al. | Sep 2002 | A1 |
20030070114 | Yasuda | Apr 2003 | A1 |
20030074601 | Schultz et al. | Apr 2003 | A1 |
20030126202 | Watt | Jul 2003 | A1 |
20030131039 | Bajoria et al. | Jul 2003 | A1 |
20030204780 | Dawkins et al. | Oct 2003 | A1 |
20040119736 | Chen et al. | Jun 2004 | A1 |
20040153834 | Oshima et al. | Aug 2004 | A1 |
20050081212 | Goud et al. | Apr 2005 | A1 |
20050086491 | Haugh et al. | Apr 2005 | A1 |
20050091354 | Lowell et al. | Apr 2005 | A1 |
20050172279 | Cook et al. | Aug 2005 | A1 |
20050204199 | Harper et al. | Sep 2005 | A1 |
20050235007 | Abali et al. | Oct 2005 | A1 |
20060005085 | Zunino et al. | Jan 2006 | A1 |
20060075171 | Wei | Apr 2006 | A1 |
20060085792 | Traut | Apr 2006 | A1 |
20060136720 | Armstrong et al. | Jun 2006 | A1 |
20060265508 | Angel et al. | Nov 2006 | A1 |
20070073751 | Morris et al. | Mar 2007 | A1 |
20070128899 | Mayer | Jun 2007 | A1 |
20080115012 | Jann et al. | May 2008 | A1 |
20080126780 | Rajkumari et al. | May 2008 | A1 |
20080235503 | Akpuokwe et al. | Sep 2008 | A1 |
20090113452 | Grigsby et al. | Apr 2009 | A1 |
20090138808 | Moromisato et al. | May 2009 | A1 |
20090172471 | Zimmer et al. | Jul 2009 | A1 |
20090182778 | Tormasov | Jul 2009 | A1 |
Number | Date | Country |
---|---|---|
1 970 807 | Sep 2008 | EP |
Number | Date | Country | |
---|---|---|---|
20110035618 A1 | Feb 2011 | US |