(19)
(11)EP 1 779 245 B1

(12)EUROPEAN PATENT SPECIFICATION

(45)Mention of the grant of the patent:
13.06.2018 Bulletin 2018/24

(21)Application number: 05772448.6

(22)Date of filing:  18.07.2005
(51)International Patent Classification (IPC): 
G06F 11/07(2006.01)
G06F 11/14(2006.01)
(86)International application number:
PCT/US2005/025250
(87)International publication number:
WO 2006/020094 (23.02.2006 Gazette  2006/08)

(54)

METHOD AND SYSTEM FOR MINIMIZING LOSS IN A COMPUTER APPLICATION

VERFAHREN UND SYSTEM ZUR MINIMIERUNG VON VERLUSTEN IN EINER COMPUTERANWENDUNG

PROCEDE ET SYSTEME POUR MINIMISER LA PERTE DANS UNE APPLICATION SUR ORDINATEUR


(84)Designated Contracting States:
AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LI LT LU LV MC NL PL PT RO SE SI SK TR

(30)Priority: 20.07.2004 US 589262 P

(43)Date of publication of application:
02.05.2007 Bulletin 2007/18

(73)Proprietor: Microsoft Technology Licensing, LLC
Redmond, WA 98052 (US)

(72)Inventor:
  • SCHAEFER, Stuart
    Marblehead, MA 01945 (US)

(74)Representative: Grünecker Patent- und Rechtsanwälte PartG mbB 
Leopoldstraße 4
80802 München
80802 München (DE)


(56)References cited: : 
EP-A- 0 433 979
US-A1- 2002 133 738
US-B1- 6 708 291
US-A- 5 274 813
US-A1- 2003 037 291
  
  • "An Overview of Software Performance Analysis Tools and Techniques: From GProf to DTrace", , 4 July 2008 (2008-07-04), Retrieved from the Internet: URL:http://www.cse.wustl.edu/~jain/cse567- 06/ftp/sw_monitors1/index.html#sec2.3.1 [retrieved on 2017-01-25]
  • WILLIAM E COHEN ED - WILLIAM E COHEN: "Tuning Programs with OProfile", INTERNET CITATION, 1 January 2004 (2004-01-01), pages 53-61, XP002740721, Retrieved from the Internet: URL:http://people.redhat.com/wcohen/Oprofi le.pdf [retrieved on 2015-06-10]
  • GALEN HUNT AND DOUG BRUBACHER MICROSOFT RESEARCH ONE MICROSOFT WAY REDMOND ET AL: "Detours: Binary Interception of Win32 Functions", USENIX,, 22 July 1999 (1999-07-22), pages 1-10, XP061011409, [retrieved on 1999-07-22]
  
Note: Within nine months from the publication of the mention of the grant of the European patent, any person may give notice to the European Patent Office of opposition to the European patent granted. Notice of opposition shall be filed in a written reasoned statement. It shall not be deemed to have been filed until the opposition fee has been paid. (Art. 99(1) European Patent Convention).


Description

CROSS-REFERENCE TO RELATED APPLICATIONS



[0001] This application claims priority to U.S. Provisional Patent Application No. 60/589,262, filed on July 20, 2004.

TECHNICAL FIELD



[0002] This invention relates to general fault tolerance of computer software applications and methods and systems for making individual applications able to operate in faulty scenarios for which they were not programmed or intended.

BACKGROUND



[0003] Computer systems and software applications have become increasingly complex and distributed. Both of these factors contribute to the common problem of data loss. As an end user operates a software application, they will commonly save the results of the operations in one or more data files, to a database, or elsewhere. The action of committing these operations creates a state change in the system that can effectively act as a checkpoint. Application programmers spend significant amounts of time ensuring that their software programs will perform as intended at these checkpoints, either committing or rejecting the changes.

[0004] It is also common, however, for state changes to accumulate in between these checkpoints. In most software applications there can be an appreciable amount of time elapsed or operations taken between commits. If the application fails during this interval, the actions taken by the user may be lost, back to the last checkpoint. The user must then re-open the application, study its viewable state to understand what was lost, and recreate those actions taken.

[0005] Application failures can occur for several reasons, including network failures, hardware failures, server or systemic failures, or other operating glitches. In new software modes, where users disconnect laptops or other mobile devices from a network, or where applications are streamed or delivered in pieces to client computers, the possibilities for failures increase. Many applications are not designed to be operated while disconnected from the network, or to be operated without the entirety of the program and its assets present at runtime.

[0006] It is desirable to provide a means to accommodate or overcome these and other forms of failures, eliminating lost work both at and between checkpoints without requiring applications to be rewritten or to take into consideration all forms of failure, as this would be cost and time prohibitive. A set of simple, general purpose methods are proposed to provide desired resiliency without modification to any software application, nor access to the software application code or design.

[0007] Methods have been proposed to accomplish solutions to this problem for specific applications or purposes at design time, such as the methods described in US Patent No. 6,014,681 to Walker, et al., entitled Method for Saving a Document Using a Background Save Thread. U.S. Patent No. 5,748,882 to Huang entitled Apparatus and Method for Fault-Tolerant Computing discloses libraries of fault tolerant routines that have been created for application developers to use. The method of the present invention overcomes the limitation of requiring an application to be designed and built to be fault tolerant by using such libraries. The invention provides an extensible solution framework for handling the many requirements of past, present and future software systems.

[0008] US B1 6 708 291 relates to computer systems and methods of data processing in which hierarchical descriptors define levels of fault management in order to intelligently monitor hardware and software and proactively take action in accordance with a defined fault policy. It is also described in the context of a computer system, such as a network switch for use in the internet, WAN or LAN. It is also stated that the modular software architecture can be implemented on any network device or other types of computer systems and is not restricted to a network device.

[0009] US 2002/133738 A1 relates to pre-emptive multitasking systems and a crashed program, where an unfreezing program is invoked upon the detection of a crashed program. For example, operating system calls made by a crashed program are monitored and a selected group of operating system calls are intercepted before they are executed by the operating system. Further, a sub-set of the selected group of intercepted operating system calls is logged in a memory.

[0010] US A 5 274 813 relates to a method and system providing an operating system for a computer, which can re-execute a job from an interrupted point even after resources assigned to the job in advance are used up. The system comprises means for monitoring an execution position of a user program, and means for monitoring a value of a used resource.

[0011] EP A 0 433 979 relates to the provision of a high-reliability computer system in which the performance, measured in reliability as well as speed and software compatibility, is capable of executing an operating system which uses virtual memory management, and which is capable of detecting faulty system components and placing them offline. Further, the system should also provide an improved operation in power-fail situations.

SUMMARY



[0012] It is the object of the invention to provide a method and system with an improved fault detection mechanism for minimizing loss of data while using a computer application.

[0013] This object is solved by the present invention as claimed in the independent claims.

[0014] Preferred embodiments are defined by the dependent claims.

[0015] The present invention provides a method and system for preventing or minimizing the loss of data when a fault or potential fault occurs in a computer application. The method and system of the present invention can minimize or prevent the loss of data without requiring any modification or access to the code for the application that is in use.

[0016] In the present invention, a helper application is provided to monitor a primary application running on a target computer to detect the presence of a fault or a potential fault in the primary application. When a fault is detected, the helper application selects a method for handling the fault, and then performs the selected method.

[0017] The helper application monitors the primary application by intercepting calls to the primary application and inspecting the results of the calls. The helper application monitors internal operations of the application (such as logic failures) and/or external operations (such as loss of network connectivity, failure of external services required by the application, failure of attached devices, and failure of peer or server networks).

[0018] If a fault is identified, the helper application determines which fault handler is most appropriate. In the preferred embodiment of the present invention there are provisions for fault handlers including a redirection handler, a suspending handler and a snapshot handler. The system is extensible to provide the ability to utilize any number of different handlers for different purposes. Examples of other handlers might be an automatic restart handler or a rewinding handler.

[0019] If the redirection handler is selected, the redirection handler invokes a save logic of primary application. The save logic can be invoked by (a) directly calling the primary application save entry point, (b) resetting the program counter to the save entry point, or (c) inserting jump instructions to force call of the save.

[0020] If the suspension handler is selected, the suspension handler suspends the application, and waits for notification that resumption can occur. Once it gets this notification, the suspension handler either (a) resumes the primary application or (b) resets the program counter of the primary application or (c) reinvokes the originally faulty API. The suspensions handler prevents stray resumption of the primary application while the primary application is suspended by making the primary application controllable only through pre-determined means. The primary application may be suspended for the duration of the fault, or it can be suspended by a user interface in anticipation of a faulty state.

[0021] If the snapshot handler is selected, the snapshot handler suspends the processes and threads of the primary application in response to the presence of a fault or potential fault in the primary application. The snapshot handler then takes a memory snapshot of the primary application, stores the memory to non-volatile storage, terminates the primary application, and on invocation, restores the primary application. The snapshot handler prevents the primary application from being invoked again until the fault is cleared or explicitly confirmed by the user.

[0022] In the embodiments described above, the helper application classifies which set of faults it will handle as well as what handlers it may invoke. The system may get this knowledge offline or online through a variety of techniques. In the most basic system, the handler will simply register to detect all faults.

[0023] According to another aspect of the invention, an additional step is taken to perform static analysis on the primary application code to determine both its composition and its potential for faults, as well as its common program entry points such as "save" or "exit". After the analysis is complete, the analyzer can present a list of those faults which are recoverable and those which are not recoverable and recommendations on handling. For both sets of faults, actions can then be proscribed for configuring the fault handlers. For those faults which are not recoverable, the redirection handler is commonly used. If no "save" code exists or is identifiable, the system can be setup to simply exit gracefully, though data would not necessarily be preserved.

[0024] To analyze program entry points, the helper application can use platform knowledge to discover sources. In an alternate embodiment, faults and entry points can be identified using dynamic analysis. The program can therefore be traced during its execution to identify these signatures.

BRIEF DESCRIPTION OF THE DRAWINGS



[0025] 

Figure 1 shows a schematic diagram of one embodiment of the system and method of the present invention;

Figure 2 shows a schematic diagram of the fault detection processes utilized in the system and method of the present invention shown in Figure 1;

Figure 3 shows schematic diagram of the operation of the program counters in the system and method of the present invention shown in Figure 1;

Figure 4 shows a schematic diagram of a program analyzer used by the system and method of the present invention shown in Figure 1; and

Figure 5 shows a flow chart of the steps performed by the method of the present invention shown in Figure 1 to detect and handle faults.


DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS



[0026] A software application 100 executes on a target computer 101 as shown in Figure 1. A helper application 102 executes on the same computer concurrently, though it may also exist in whole or in part as a service program on an alternate computer 103. This helper application 102 can either reside as a standalone process, injected into the primary application's memory space, or as part of the computer's operating system as a device driver or otherwise. It is not necessary to recompile or otherwise modify the primary application 100. The primary application 100 may exist as a standalone program or in communication with one or more peer or server computers in a network.

[0027] Referring to Figure 2, the helper application 102 includes a fault detector 201, a fault hander 203, and a knowledge base 203. As the primary application 100 executes, the fault detector 201 monitors the primary application 100 to attempt to detect the presence of a fault. Fault detection is done both in response to internal operations of the primary application 100, and in response to other external factors, such as loss of network connectivity, failure of external services required by the application, failure of attached devices such as printers and modems, failure of peer or server computers in its network. To accommodate internal errors, the fault detector intercepts various messages and actions taken by the primary application 100. In one example method (shown in Figure 2), the helper application 102 monitors the primary application's call to memory allocation routines, such as the use of malloc() and failed() in the standard C runtime library. If the malloc() routine is unable to allocate the memory that was requisitioned, a memory fault has occurred.

[0028] In this example, the call of the primary application to the malloc() routine is intercepted by the fault detector 201. Note that in an alternative embodiment of the present invention, the fault detector could operate in a manner as to not actually intercept the routine call, but monitor its output for faults such as exceptions, bad return codes or other incorrect behavior. The intercepted call is forwarded to the malloc() routine. On return, the fault detector will inspect the results of the call. At this point, the fault detector will branch and either return control back to the primary application 100, or invoke a fault handler 202. The fault handler 202 may contain statically coded decisions and/or a system such as a configurable Knowledge Base (203) (as shown in Figure 2) to invoke a fault handling routine based on a larger set of behaviors and heuristics.

[0029] In one example, the Knowledge Base 203 contains a set of rules and behaviors which are configurable to respond to a variety of failure scenarios. In being a rule base, it is also extensible over time. Simply by adding rules, one can extend the ability of the system to handle new faults, employ new behaviors, or make different decisions based on the available information. The fault handler will query the Knowledge Base using the information available about the current fault. In the current example, the fault handler would signal the Knowledge Base that a malloc_failed event occurred within the current program. The Knowledge Base would then invoke its rule base to make a decision based on any rules it has concerning the application and machines current state, the type of fault that occurred, any severity or extended error information available with the fault, or any application specific fault handling rules. The Knowledge Base can be implemented in a variety of ways including decision trees, cased-based reasoners, or combinations of techniques. The result of the Knowledge Base processing is selection of an action, or no action, to take in response to the fault. This return instruction will indicate to the fault handler how to proceed with the current fault.

[0030] The fault detector 201 also responds to external events on the target computer 101, or in the network of which it is a part. For example, the target computer 101 may indicate that its power is low, as when a mobile device is running on batteries. The fault detection system 201 can observe this event and invoke the fault handler to select an appropriate recovery action via the Knowledge Base. In other implementations, the fault detector 201 can be configured to respond to loss of network connectivity, failure of external services required by the application, failure of attached devices such as printers and modems, failure of peer or server computers in its network, and other important events. The fault detector can be seen then to contain two different modules, one for observing application specific faults and a second for observing general system failures or environmental problems.

[0031] The fault detector 201 can be used in connection with a mobile device, capable of disconnecting from a network. In this type of device, network interruptions can be frequent and the code of the primary application 100 may not be designed for mobility. In addition, in mobile devices, the code of the primary application 100 may be streamed, a delivery mode in which the primary application 100 is broken down into code segments that are needed to operate certain functions of the primary application 100. These code segments are delivered to the mobile device just-in-time, so that the primary application 100 can be deployed quickly, with a minimal footprint. In this mode, it is common for the mobile device operator to request a function of the primary application 100 during offline use that may not be available. At the time that this function is requested, the code segment will not be present and will not be accessible from the network.

[0032] In one example of this invention, if the mobile device operating system issues a page fault indicating a failure to access a system code page of the primary application, the fault detector 201 traps this fault and invokes the fault handler 202. In an alternate example, the fault detector 201 is embedded within the mobile device operating system, as part of the system for streaming the application. In this system, the fault can be detected before the page fault occurs, as the network request for the data packet fails, and the faulty behavior detected directly.

[0033] Since the mobile device may disconnect from the network, it may lose contact with or be unable to contact network resources. If the primary application 100 attempts and fails to connect to the network, another class of faults can occur. With this class of faults, the fault detector 201 can intercept the request to the network and execute an appropriate fault behavior on failure.

[0034] As noted above, after a fault is detected, the fault handler 202 determines which fault handler is most appropriate. In some cases, the fault handler will invoke the helper application 102 to allow the user to decide on a course of action, or to invoke actions which may be configured by the helper application. The helper application can notify the user of the presence of a fault, log the fault internally, or forward the fault notification to various monitoring systems such as SNMP, WMI or the Windows Event Log. The helper application may also ask the user if they choose to handle the fault or allow the failure to occur, and further ask the user to choose an appropriate action if many are possible.

[0035] Primary fault handlers include a redirection handler, a suspension handler, and a snapshot handler. Each of these fault handlers will now be described in detail below.

Redirection Handler



[0036] When the redirection handler is invoked, the redirection handler redirects the primary application to "save and exit" logic of the primary application and then exits. An embodiment of the invention using the redirection handler is shown in Figure 3. At the point the fault has occurred, the primary application 100 is running inside of the intercept routine of the fault detector 201. The operating system's program counter will currently point to this intercept routine and would normally continue to execute the next instruction after the call to the faulty API. The redirection handler will alternately invoke the application's save logic 302 and then exit the primary application 100. In an example, this invoking of the save logic is implemented by (a) directly calling the primary application 100 save entry point, (b) resetting the program counter to the save entry point, or (c) inserting a jump instruction in the calling program to force call of the save and exit logic.

[0037] In the example shown in Figure 3, the primary application attempts to call the API call_thesaurus(). The code segment for this routine has not been paged in by the operating system 303. Thus, the operating systems 303 intercepts the call and queries its virtual memory manager 304 to retrieve the code page. When this fails, the operating system 303 will raise a page fault, normally terminating the primary application 100. The page fault is then intercepted by the redirection handler 306. Alternatively, the redirection handler 306 can receive the "failure to retrieve the code" page directly from the routine.

[0038] In some cases, the primary application may have several variants to saving and exiting. There may be "save as", "disconnect", or "exit" which encapsulates the saving functionality. Fault handler 306 ensures that the user is given a safe means to save the work that has been done and exit from the application, avoiding a fault and/or a crash of the application. The user may restart the application after exit, but he/she will know that the fault has occurred and may occur again.

[0039] In one embodiment of the fault handler, the primary application invokes its "save" logic, but its data file will be redirected to a local data source, or proxy store, so that the primary application can complete its save operation in the case where the data file is either corrupt and causing write failures, or is a network file and the network is unavailable. Normally the program would generate a further error as it could not communicate with the network file server or save its file effectively. On reconnection, the data file or proxy store can be synchronized with or replace the source data file.

Suspension Handler



[0040] When the suspension handler is invoked, the suspension handler suspends all processes, children and threads that comprise the primary application 100. Once the primary application 100 has been suspended, the suspension handler waits for notification that resumption can occur (e.g., an event such as the network being reestablished, or the user selecting a control to indicate its desire to continue). On request to continue, the suspension handler can (a) resume the primary application directly, (b) reset the program counter, or (c) reinvoke the originally faulty API.

[0041] During suspension, the primary application 100 will remain in existence in its entire form and will still be visible as an application on the target computer 101. In one embodiment, the suspension handler will prevent stray resumption of the primary application through simple system tools such as the Windows Task Manager. It will suspend the primary application to be controllable only through explicit means or through the internal helper application 102.

[0042] The suspension handler is often used for applications in which there is no explicit "save" functionality. The application saves its state as a series of side effects, or through communication with an external server, database or other system. In one example, the application is a hypertext application, and connection to the HTTP server is lost. In this example, the user side state of the hypertext application can be stored, or the entire hypertext browser application can be stored. When the server is back online, the application can continue, using its saved state.

Snapshot Handler



[0043] If the fault indicates of a long-term problem, and suspension will not survive the duration of the problem, as the target computer may be power cycled, or suffer from additional faults, and the snapshot handler is invoked. In this situation, it is desired to backup the running state of the primary application, for later restoration.

[0044] When the snapshot handler is invoked, the snapshot handler suspends the processes and threads of the primary application, takes a memory snapshot of the primary application, including kernel data structures not part of the application, but used for restoring it as a process. This memory snapshot can then be written to disk, for later recovery. In an alternate method, the snapshot handler can periodically, proactively snapshot the primary application to provide a finer grain means of recovery. In order to avoid overwhelming overhead, the memory snapshot can be quickly taken, and in the background store the memory to disk or other non-volatile storage. Once the snapshot is complete, the snapshot handler can then terminate the primary application if the snapshot is being taken because of a long-term problem.

[0045] Once the primary application has been terminated, the helper application 102 can then act to prevent the application from being invoked again until the fault has cleared, or the user has explicitly confirmed that the user wants the application invoked again. On invocation, the helper application can then restore the primary application 100, or simply allow another instance of the primary application to be created instead. Alternately, the helper application can transfer the snapshot image to a peer or server computer in the network for resumption there.

[0046] On restoration, the fault handler will map back the memory of the process and reset internal operating system kernel data structures to ensure that the program is able to continue exactly as it had left off. As an example, if the application 100 has several files open at the time of fault, the snapshot handler will need to reopen the files and reassign the known file handles so that the primary application does not generate errors trying to use its old file handles. Also, the file handles must point to the appropriate offset in the file if they are set for stream access.

[0047] Figure 5 shows a flow chart of one embodiment of the helper application of the present invention. A potentially faulty API is called in steps 501, 502 and the helper application 102 asks whether the call was successful or whether a fault has occurred in step 504. If a fault has not occurred, the application returns the API results in step 505. If a fault has occurred, the helper application 102 identifies the fault handler, choosing between the redirection handler and the suspension handler. If the suspension handler is selected in step 508, the helper program asks whether the primary application may be resumed. If the program is resumed, it returns the API results in step 505. If the primary application is not resumed, the helper application asks whether to reinvoke the API in step 510. If the API is not to be reinvoked, the helper application asks whether a snapshot is available. If a snapshot is available, in step 511 the helper application reverts the PC to the snapshot in step 513. If the snapshot is not available, it resets the program counter in step 512.

[0048] In yet another example of this invention, the helper application 102 will also restore external connections such as to a database, a TCP/IP socket, or other IPC mechanism. In order to do so, the helper application 102 may ask the user for assistance such as with database login or authentication with an HTTP server. As described above, the system may need to reset some primary application internals or redirect handles to entities that have changed, like a socket descriptor. In an alternate embodiment, a user interface can be provided to allow the user to explicitly invoke this behavior, regardless of the (non)existence of faults.

[0049] The helper application classifies which set of faults that it will handle in addition to what handlers that it may invoke. The helper application may get this knowledge offline or online through a variety of techniques. In one example, the fault handler will register to detect all faults.

[0050] In another embodiment of the invention, an additional step is taken to perform static analysis on the primary application code to determine its composition and potential for faults, as well as its common program entry points such as "save" or "exit". In examination for potential faults, the analysis routines look for the use of a set of common API's such as access to files, or to databases through ODBC, or as described above use of memory routines such as malloc() and free() or IPC routines such as socket() or Windows GetNamedPipe().

[0051] After the analysis is complete, the analyzer 403 can present a list of those faults which are known to be recoverable through the systems available fault handlers and those which are not recoverable and recommendations for handling the faults (See Figure 4). For both sets of faults, actions can then be proscribed for configuring the fault handlers. For those faults which are not recoverable, the of redirection handler is commonly used. If no "save" code exists or is identifiable, the system can be setup to simply exit gracefully.

[0052] To analyze program entry points, the system can use platform knowledge to discover sources. For example, on the Microsoft Windows platform, a message handler that can respond to the WM_EXIT message may correspond to the "exit" routine of the program. Thus, a search for WM_EXIT will indicate this function point. Alternately, a resource file may describe the File:Exit menu command and the Windows message that it will generate on invocation. If these indicators do not exist, the analyzer can go further to look for use of API's such as the Windows ExitProcess() or exit() functions. In searching for the "save" routine, the analyzer can look for any use of files or external data sources.

[0053] In an alternate embodiment, faults and entry points can be identified using dynamic analysis. The program can be traced during its execution to identify these signatures. In one embodiment, dynamic analysis is done with an entry point identifier UI 404 that records entry points in a manner similar to macro recording. As the user indicates that they will be identifying the "save" function, the identifier records all UI and program activity. From these signatures, the entry point and associated code can be identified. For streamed applications in which the application is used offline, the code identified with the "save" and "exit" functions is tagged specially to indicate that it must always be streamed and present in the offline mode to ensure that this behavior can be invoked.

[0054] The present invention also provides a means to allow disruption in the use of or faults in an application to be accommodated without the loss of work. Normally, failure during the use of an application would cause some amount of work done in that program, whether complete or not, to be abandoned. The system and method of the present invention provide for more than simple recovery of the program, but instead enable a means to ensure no data loss is suffered. Furthermore, it is done without requiring any modification, recompilation, or redesign of software, and allows new software to be built with this paradigm in mind.

[0055] While the invention has been described in connection with certain preferred embodiments, it will be understood that it is not intended to limit the invention to those particular embodiments. On the contrary, it is intended to cover alternatives, modifications and equivalents as well. Some specific components, figures and types of materials are mentioned, but it is to be understood that such component values, dimensions and types of materials are, however, given as examples only and are not intended to limit the scope of this invention in any manner.


Claims

1. A method for minimizing loss of data while using a computer application (100, 200, 300) comprising the steps of:

monitoring a call from the computer application to a routine to detect (504) the presence of a fault, wherein the step of monitoring the call from the computer application to the routine comprises monitoring the output of the routine call for faults such as exceptions, bad return codes or other incorrect behavior, and on return, inspecting results of the call;

if a fault has not occurred, returning control back to the computer application; and

if a fault has occurred,
selecting (506) a method for handling the fault, the method for handling the fault being selected from the following methods: redirecting (507) execution of code of the computer application, and suspending (508) the computer application; and performing the selected method for handling the fault, wherein performing a redirection comprises invoking an identified save logic of the computer application in order to save data.


 
2. The method of claim 1 wherein performing the selected method for handling the fault comprises communicating (204) with a user of the computer application regarding the fault.
 
3. The method of claim 1 further comprising recording the fault internally in the system running the computer application.
 
4. The method of claim 1 further comprising forwarding a fault notification to an external monitoring system.
 
5. The method of claim 1 further comprising communicating with a user of the computer application regarding the fault.
 
6. The method of claim 5 wherein the step of communicating with a user of the computer application regarding the fault comprises asking (204) the user if it wants the fault to be handled or whether the fault should be allowed to occur.
 
7. The method of claim 1 wherein when the selected method is suspending (508) the computer application in response to detection of a fault, the method further comprises:

monitoring (509) the computer application for an indication that resumption can occur; and

selecting one of resuming the computer application or resetting (512) to a program counter of the computer application.


 
8. The method of claim 7 further comprising preventing unwanted resumption of the computer application while the computer application is suspended.
 
9. The method of claim 8 wherein the step of preventing unwanted resumption of the computer application comprises making the computer application controllable only through predetermined means.
 
10. The method of claim 7 wherein the computer application is suspended for the duration of a detected fault.
 
11. The method of claim 7 wherein the step of suspending the computer application comprises the step of communicating with a user via a user interface to determine whether the user wishes to have the computer application suspended in anticipation of a faulty state.
 
12. The method of claim 1, wherein when the selected method is suspending (508) the computer application, the method further comprises storing a memory snapshot to an auxiliary memory device.
 
13. The method of claim 12 further comprising:

terminating the computer application after the memory snapshot is stored; and

on invocation, either restoring the computer application or allowing another instance of the computer application to be created.


 
14. The method of claim 13 wherein the stored memory snapshot is recoverable after termination of the computer application.
 
15. The method of claim 12 further comprising: preventing the computer application from being invoked after suspension of the computer application until a detected fault is cleared or explicitly confirmed by a user.
 
16. The method of claim 13 wherein the step of restoring the computer application comprises mapping memory of the computer application and resetting internal operating system kernel data structures.
 
17. The method of claim 12 further comprising the steps of restoring an external connection to a computer on which the computer application is used in response to detection of a fault that the external connection is disconnected.
 
18. The method of claim 1 further comprising analyzing (403) code (402) of the computer application to identify save entry points.
 
19. The method of claim 18 wherein the step of analyzing the code to identify save entry points comprises tracing the application during its execution.
 
20. A computer system arranged for performing the method of one of claims 1 to 19.
 


Ansprüche

1. Verfahren zum Minimieren von Datenverlust während der Verwendung einer Computeranwendung (100, 200, 300), umfassend folgende Schritte:

Überwachen eines Aufrufes von der Computeranwendung an eine Routine, um die Anwesenheit eines Fehlers zu ermitteln (504), wobei der Schritt zum Überwachen des Aufrufes von der Computeranwendung an die Routine das Überwachen der Ausgabe des Routineaufrufs hinsichtlich Fehlern wie beispielsweise Ausnahmen, ungültigen Rückgabecodes oder anderem unkorrekten Verhalten umfasst, und bei der Rückgabe, Untersuchen der Ergebnisse des Aufrufes;

wenn kein Fehler aufgetreten ist, Zurückkehren der Steuerung zu der Computeranwendung; und

wenn ein Fehler aufgetreten ist,
Auswählen (508) eines Verfahrens zum Handhaben des Fehlers, wobei das Verfahren zum Handhaben des Fehlers aus folgenden Verfahren ausgewählt wird: Umleiten (507) der Ausführung von Code der Computeranwendung und Aussetzen (508) der Computeranwendung; und

Durchführen des ausgewählten Verfahrens zum Handhaben des Fehlers, wobei das Durchführen einer Umleitung das Aufrufen einer identifizierten Speicherlogik der Computeranwendung umfasst, um Daten zu speichern.


 
2. Verfahren nach Anspruch 1, wobei das Durchführen des ausgewählten Verfahrens zum Handhaben des Fehlers das Kommunizieren (204) mit einem Benutzer der Computeranwendung hinsichtlich des Fehlers umfasst.
 
3. Verfahren nach Anspruch 1, des Weiteren umfassend das Aufzeichnen des Fehlers in dem System, welches die Computeranwendung ausführt.
 
4. Verfahren nach Anspruch 1, des Weiteren umfassend das Weiterleiten einer Fehlermeldung an ein externes Überwachungssystem.
 
5. Verfahren nach Anspruch 1, des Weiteren umfassend das Kommunizieren mit einem Benutzer der Computeranwendung hinsichtlich des Fehlers.
 
6. Verfahren nach Anspruch 5, wobei der Schritt zum Kommunizieren mit einem Benutzer der Computeranwendung hinsichtlich des Fehlers das Fragen (204) des Benutzers umfasst, ob er eine Handhabung des Fehlers wünscht oder ob ein Auftreten des Fehlers zugelassen werden soll.
 
7. Verfahren nach Anspruch 1, wobei das ausgewählte Verfahren das Aussetzen (508) der Computeranwendung in Reaktion auf die Ermittlung eines Fehlers ist, wobei das Verfahren des Weiteren umfasst:

Überwachen (509) der Computeranwendung hinsichtlich einer Anzeige, dass die Wiederaufnahme einsetzen kann; und

Auswählen von einem aus Wiederaufnehmen der Computeranwendung oder Zurücksetzen (512) auf einen Programmzähler der Computeranwendung.


 
8. Verfahren nach Anspruch 7, des Weiteren umfassend das Verhindern der unerwünschten Wiederaufnahme der Computeranwendung, während die Computeranwendung ausgesetzt ist.
 
9. Verfahren nach Anspruch 8, wobei der Schritt zum Verhindern der unerwünschten Wiederaufnahme der Computeranwendung das Steuerbarmachen der Computeranwendung nur durch ein vorgegebenes Mittel umfasst.
 
10. Verfahren nach Anspruch 7, wobei die Computeranwendung für die Dauer eines ermittelten Fehlers ausgesetzt wird.
 
11. Verfahren nach Anspruch 7, wobei der Schritt zum Aussetzen der Computeranwendung den Schritt zum Kommunizieren mit einem Benutzer über eine Benutzeroberfläche umfasst, um zu bestimmen, ob der Benutzer die Aussetzung der Computeranwendung in Erwartung eines fehlerhaften Zustandes wünscht.
 
12. Verfahren nach Anspruch 1, wobei das ausgewählte Verfahren das Aussetzen (508) der Computeranwendung ist, wobei das Verfahren des Weiteren das Speichern eines Speicherschnappschusses in einer Hilfsspeichervorrichtung umfasst.
 
13. Verfahren nach Anspruch 12, des Weiteren umfassend:

Beenden der Computeranwendung, nachdem der Speicherschnappschuss gespeichert wurde; und

beim Aufrufen, entweder Wiederherstellen der Computeranwendung oder Zulassen, dass eine weitere Instanz der Computeranwendung erstellt wird.


 
14. Verfahren nach Anspruch 13, wobei der gespeicherte Speicherschnappschuss nach Beendigung der Computeranwendung wiederherstellbar ist.
 
15. Verfahren nach Anspruch 12, des Weiteren umfassend: Verhindern, dass die Computeranwendung nach Aussetzung der Computeranwendung aufgerufen wird, bis ein ermittelter Fehler von einem Benutzer gelöscht oder explizit bestätigt wird.
 
16. Verfahren nach Anspruch 13, wobei der Schritt zum Wiederherstellen der Computeranwendung das Zuordnen des Speichers der Computeranwendung und das Zurücksetzen der internen Betriebssystem-Kerneldatenstrukturen umfasst.
 
17. Verfahren nach Anspruch 12, des Weiteren umfassend die Schritte zum Wiederherstellen einer externen Verbindung mit einem Computer, auf dem die Computeranwendung verwendet wird, in Reaktion auf die Ermittlung eines Fehlers, dass die externe Verbindung getrennt wurde.
 
18. Verfahren nach Anspruch 1, des Weiteren umfassend das Analysieren (403) von Code (402) der Computeranwendung, um Speichereinstiegspunkte zu identifizieren.
 
19. Verfahren nach Anspruch 18, wobei der Schritt zum Analysieren des Codes, um Speichereinstiegspunkte zu identifizieren, das Nachverfolgen der Anwendung während ihrer Ausführung umfasst.
 
20. Computersystem, das zur Ausführung des Verfahrens nach einem der Ansprüche 1 bis 19 eingerichtet ist.
 


Revendications

1. Procédé pour une minimisation d'une perte de données au cours d'une utilisation d'une application informatique (100, 200, 300) comprenant les étapes de :

surveillance d'un appel provenant de l'application informatique à une routine pour détecter (504) la présence d'une défaillance, dans lequel l'étape de surveillance de l'appel provenant de l'application informatique à la routine comprend une surveillance de la génération de l'appel à la routine pour des défaillances telles que des exceptions, des codes de retours erronés ou un autre comportement incorrect, et en retour, une inspection de résultats de l'appel ;

si aucune défaillance ne s'est produite, retour du contrôle à l'application informatique ; et

si une défaillance s'est produite,

sélection (506) d'un procédé pour une gestion de la défaillance, le procédé pour une gestion de la défaillance étant sélectionné à partir des procédés suivants : redirection (507) d'une exécution d'un code de l'application informatique, et suspension (508) de l'application informatique ; et

exécution du procédé sélectionné pour une gestion de la défaillance, dans lequel une exécution d'une redirection comprend un appel à une logique de sauvegarde identifiée de l'application informatique afin de sauvegarder des données,


 
2. Le procédé de la revendication 1 dans lequel une exécution du procédé sélectionné pour une gestion de la défaillance comprend une communication (204) avec un utilisateur de l'application informatique concernant la défaillance.
 
3. Le procédé de la revendication 1 comprenant en outre un enregistrement de la défaillance en interne dans le système qui exécute l'application informatique.
 
4. Le procédé de la revendication 1 comprenant en outre un transfert d'une notification de défaillance à un système de surveillance externe,
 
5. Le procédé de la revendication 1 comprenant en outre une communication avec un utilisateur de l'application informatique concernant la défaillance.
 
6. Le procédé de la revendication 5 dans lequel l'étape de communication avec un utilisateur de l'application informatique concernant la défaillance comprend une demande (204) à l'utilisateur s'il souhaite que la défaillance soit gérée ou si la défaillance doit être autorisée à se produire.
 
7. Le procédé de la revendication 1 dans lequel lorsque le procédé sélectionné est une suspension (508) de l'application informatique en réponse à une détection d'une défaillance, le procédé comprend en outre :

surveillance (509) de l'application informatique pour une indication que la reprise peut intervenir ; et

sélection d'une reprise de l'application informatique ou d'une réinitialisation (512) selon un compteur de programme de l'application informatique.


 
8. Le procédé de la revendication 7 comprenant en outre un empêchement d'une reprise non souhaitée de l'application informatique lorsque l'application informatique est suspendue.
 
9. Le procédé de la revendication 8 dans lequel l'étape d'empêchement d'une reprise non souhaitée de l'application informatique comprend le fait de rendre l'application informatique contrôlable uniquement par un moyen prédéterminé.
 
10. Le procédé de la revendication 7 dans lequel l'application informatique est suspendue pour la durée d'une défaillance détectée.
 
11. Le procédé de la revendication 7 dans lequel l'étape de suspension de l'application informatique comprend l'étape de communication avec un utilisateur via une interface utilisateur pour déterminer si l'utilisateur souhaite ou non que l'application informatique soit suspendue par anticipation d'un état de défaillance.
 
12. Le procédé de la revendication 1, dans lequel lorsque le procédé sélectionné est une suspension (508) de l'application informatique, le procédé comprend en outre un stockage d'un instantané de mémoire sur un dispositif mémoire auxiliaire.
 
13. Le procédé de la revendication 12, comprenant en outre :

un arrêt de l'application informatique après que l'instantané de mémoire est stocké ; et

sur appel, soit une restauration de l'application informatique ou une autorisation de créer une autre instance de l'application informatique.


 
14. Le procédé de la revendication 13 dans lequel l'instantané de mémoire stocké est récupérable après arrêt de l'application informatique.
 
15. Le procédé de la revendication 12 comprenant en outre : un empêchement de l'application informatique d'être appelée après suspension de l'application informatique tant qu'une défaillance détectée n'est pas éliminée ou explicitement confirmée par un utilisateur.
 
16. Le procédé de la revendication 13 dans lequel l'étape de restauration de l'application informatique comprend un mappage d'une mémoire de l'application informatique et une réinitialisation de structures de données de noyau de système d'exploitation internes.
 
17. Le procédé de la revendication 12 comprenant en outre les étapes de restauration d'une connexion externe à un ordinateur sur lequel l'application informatique est utilisée en réponse à une détection d'une défaillance correspondant à une déconnexion de la connexion externe.
 
18. Le procédé de la revendication 1 comprenant en outre une analyse (403) d'un code (402) de l'application informatique pour identifier des points d'entrée de sauvegarde.
 
19. Le procédé de la revendication 18 dans lequel l'étape d'analyse du code pour identifier des points d'entrée de sauvegarde comprend un traçage de l'application pendant son exécution.
 
20. Système informatique organisé pour exécuter le procédé d'une des revendications 1 à 19.
 




Drawing




















Cited references

REFERENCES CITED IN THE DESCRIPTION



This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

Patent documents cited in the description