A method, device, equipment and storage medium for recovering and locating a system hang failure
Through the watchdog timing dog feeding mechanism and the hot reset and core dump technology of the safe island system, the problem of timely detection and on-site recording of the intelligent driving operating system hang-up fault is solved, and the safety performance and fault location efficiency are improved.
Patent Information
- Application Number
- CN202111465505.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-12-01
AI Technical Summary
When the intelligent driving operating system encounters a hang-up failure, it cannot detect and recover in time, which makes it difficult to locate safety hazards and problems. Especially when the CPU cannot respond, abnormal on-site information cannot be recorded.
The watchdog timing dog feeding mechanism is used to detect the system status, and interrupt signals are sent when continuous timeout occurs. The safe island system is used for hot reset and abnormal on-site recording, and the kernel dump tool is used to dump the information to disk media to achieve rapid system development. Recovery and preservation of fault scenes.
It realizes rapid fault detection and recovery of the intelligent driving operating system, improves product safety performance, facilitates developers to locate and analyze problems, and saves vehicle production expenses.
Smart Images

Figure CN114138534B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle safe driving, and in particular to a method, device, equipment and storage medium for recovering and locating a system deadlock fault. Background Art
[0002] With the advancement of intelligent vehicle technology, various driving assistance devices in intelligent vehicles have also made great progress. In the automotive field, intelligent driving operating systems have gradually come into people's view. Intelligent driving operating systems can assist while driving, such as providing AR navigation, emergency avoidance and other functions. In the near future, intelligent driving operating systems can even provide automatic driving services. Taking the emergency avoidance function as an example, the emergency avoidance function can be used to avoid the front vehicle when it stops suddenly or the rear vehicle overtakes dangerously. When the intelligent driving operating system is working, the intelligent driving operating system can control the vehicle's driving direction and brakes in a short time.
[0003] Due to the memory, computing power or other objective factors of the car computer, in some cases, the intelligent driving operating system may hang. At this time, the CPU needs to detect the fault in time and recover as soon as possible. However, in many actual situations, the CPU has completely hung and cannot execute instructions, and even cannot respond to non-maskable interrupts (NMI). It can only be manually powered off and restarted, which poses a huge safety hazard to the vehicle in motion. At the same time, when the only option is to manually power off and restart, it is impossible to record the abnormal on-site information of the intelligent driving operating system hanging, which makes it difficult for developers to locate the problem later. Summary of the invention
[0004] In view of the above-mentioned problems in the prior art, the purpose of the present invention is to provide a method, device, equipment and storage medium for recovering and locating a system hang failure, which can promptly handle and locate the hang failure problem of an intelligent driving operating system.
[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0006] A method for recovering and locating a system hang fault according to an embodiment of the present invention is applied to an intelligent vehicle, wherein the intelligent vehicle includes an intelligent driving operating system and a safety island system, and the intelligent driving operating system includes at least one SoC with a watchdog. The method includes:
[0007] The central processor of the SoC initiates a feeding action to the watchdog at every preset time interval; when the watchdog does not receive the feeding action for two consecutive preset time intervals, the watchdog sends an external interrupt signal to the safety island domain system, so that the safety island domain system reads the hardware register of the intelligent driving operating system to record the abnormal scene and performs a hot reset on the intelligent driving operating system;
[0008] After the intelligent driving operating system has been hot-reset in the safety island area system, the dump kernel is started through the kernel dump tool to dump the abnormal scene and dump the abnormal scene to the disk medium;
[0009] After the intelligent driving operating system is dumped, restart the intelligent driving operating system.
[0010] In one embodiment of the present invention, when the watchdog does not receive a dog feeding action within two consecutive preset time intervals, the watchdog sends an external interrupt signal to the safety island domain system, so that the safety island domain system reads the hardware register of the intelligent driving operating system to record the abnormal scene and performs a hot reset on the intelligent driving operating system, including:
[0011] When the watchdog does not receive the first feeding action within the preset time interval, the watchdog sends an interrupt to the intelligent driving operating system;
[0012] When the watchdog still does not receive the feeding action after the second preset time interval, it sends an external interrupt signal to the safety island domain system, allowing the safety island domain system to read the hardware registers of the intelligent driving operating system to record the abnormal scene, and perform a hot reset on the intelligent driving operating system to restart the basic input and output system.
[0013] In one embodiment of the present invention, when the watchdog still does not receive the dog feeding action after the second preset time interval, an external interrupt signal is sent to the safety island domain system, so that the safety island domain system reads the hardware register of the intelligent driving operating system to record the abnormal scene, and performs a hot reset on the intelligent driving operating system, including:
[0014] The safety island system reads the hardware registers of the intelligent driving operating system and records the abnormalities in the hardware registers into the black box.
[0015] The safety island system sets an identifier in the intelligent driving operating system to notify the intelligent driving operating system to perform a hot reset.
[0016] In one embodiment of the present invention, after the safe island system is hot reset, the intelligent driving operating system starts the dump kernel through the kernel dump tool to dump the abnormal scene, and dumps the abnormal scene to the disk medium, including:
[0017] The kernel dump tool starts the dump kernel and transmits the dump kernel information to the basic input and output system of the intelligent driving operating system through the shared memory;
[0018] The basic input and output system captures the abnormal scene generated when the intelligent driving operating system fails and hangs up by dumping the kernel and stores it in the reserved memory;
[0019] The intelligent driving operating system dumps the exception scene in the reserved memory to the disk medium.
[0020] In one embodiment of the present invention, the information includes: a target address of the dump kernel and jump parameters.
[0021] In one embodiment of the present invention, the kernel dump tool starts dumping the kernel and transmits information of the dumped kernel to the basic input and output system of the intelligent driving operating system through the shared memory, including:
[0022] The basic input and output system performs a magic number check on the target address. If the magic number check passes, the basic input and output system can jump to the target address.
[0023] Another embodiment of the present invention further provides an electronic device, the electronic device including an intelligent driving operating system and a safety island system, the intelligent driving operating system including at least one SoC provided with a watchdog, including:
[0024] The dog feeding module is used to initiate the dog feeding action to the watchdog at a preset interval;
[0025] The watchdog module is used to send an interrupt to the intelligent driving operating system and the safety island system when no dog feeding action is received within a preset interval;
[0026] The safe island system includes:
[0027] The abnormal scene recording module is used to receive the external interrupt sent by the watchdog module to the safety island domain system when the watchdog module does not receive the dog feeding action within the preset interval, and read the hardware register of the intelligent driving operating system to record the abnormal scene;
[0028] The hot reset module is used to notify the intelligent driving operating system to perform a hot reset so that the basic input and output system of the intelligent driving operating system is dumped through the dump kernel and the intelligent driving operating system is restarted.
[0029] In one embodiment of the present invention, the watchdog module is used to:
[0030] When the watchdog fails to receive the dog feeding action for the first time at the preset interval, the watchdog sends an interrupt to the intelligent driving operating system;
[0031] If the dog feeding action is still not received after the second preset time interval, an external interrupt signal is sent to the safety island domain system, so that the safety island domain system reads the hardware register of the intelligent driving operating system to record the abnormal scene and perform a hot reset of the intelligent driving operating system.
[0032] In one embodiment of the present invention, the abnormal scene recording module is used to:
[0033] The safety island system reads the hardware registers of the intelligent driving operating system and records the abnormalities in the hardware registers into the black box.
[0034] In one embodiment of the present invention, the thermal reset module is used to:
[0035] A flag is set in the black box to notify the intelligent driving operating system to perform a hot reset.
[0036] In one embodiment of the present invention, the electronic device comprises:
[0037] The address information transmission module is used to transfer the dump kernel information to the basic input and output system of the intelligent driving operating system through the shared memory so that the basic input and output system can capture the abnormal scene generated when the intelligent driving operating system fails and hangs through the dump kernel and store it in the reserved memory, and restart the intelligent driving operating system after the dump is completed.
[0038] In one embodiment of the present invention, the address information transmission module is used to:
[0039] The basic input and output system performs a magic number check on the information. If the magic number check passes, the basic input and output system can jump to the target address of the dumped kernel.
[0040] Another embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for recovering and locating a system hang failure described in any one of the above methods is implemented.
[0041] Another embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the method for recovering and locating a system hang failure in any one of the above methods are implemented.
[0042] The above technical solution of the present invention has at least one of the following beneficial effects:
[0043] 1. The method for recovering and locating a system deadlock fault according to an embodiment of the present invention can detect the fault in a timely manner when a deadlock fault occurs in the intelligent driving operating system, and use the safety island system to perform a hot reset on the intelligent driving operating system, thereby effectively improving the product safety performance;
[0044] 2. The method for recovering and locating a system hang failure in an embodiment of the present invention saves the abnormal hang scene of the intelligent driving operating system through a safety island system, which facilitates developers to locate the problem later;
[0045] 3. The method for recovering and locating a system hang failure in an embodiment of the present invention saves the abnormal scene of the intelligent driving operating system hang through the safety island system and can upload it to the cloud. There is no need to set up an additional debugging interface on the vehicle, which is beneficial to saving vehicle production expenses. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram of an implementation environment of a method for recovering and locating a system hang failure according to an embodiment of the present invention;
[0047] Figure 2 A flowchart of a method for recovering and locating a system hang failure according to an embodiment of the present invention;
[0048] Figure 3 A schematic diagram of the structure of an electronic device with a hang-up failure in an intelligent driving operating system according to an embodiment of the present invention;
[0049] Figure 4 This is a SoC block diagram of an electronic device with a hang-up failure of the intelligent driving operating system in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0052] The working principle of the present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0053] Reference Manual Attached Figure 1 , which shows a schematic diagram of the implementation environment of a method for recovering and locating a system hang failure provided by an embodiment of the present invention, such as Figure 1As shown, the implementation environment may include an intelligent driving operating system and a safety island domain (Safety lsland) system. In actual applications, during vehicle driving, the intelligent driving operating system is responsible for providing driving assistance services or automatic driving services, but it may be hung due to various objective factors. After the hang, it is necessary to detect the fault in time and recover as soon as possible. For example, the safety island domain system can be notified to switch the driving system between the main and standby or emergency braking, etc. At the same time, it is also necessary to record the abnormal scene to facilitate developers to locate the problem. Therefore, a watchdog can be set in the SoC in the intelligent driving operating system and feed the dog regularly. After the system hangs, the system cannot continue to feed the dog. When the watchdog detects the dog feeding timeout for the first time, it will send an interrupt to the intelligent driving operating system. When the watchdog detects the dog feeding timeout for the second time, it indicates that the CPU of the intelligent driving operating system has been unable to execute instructions, and an external system is required to perform a hot reset on the intelligent driving operating system. The watchdog can send an external interrupt to the safety island domain system. After receiving the external interrupt, the safety island domain system can record the abnormal scene when the intelligent driving operating system is hung and record it to the black box, and at the same time, the basic input and output system (Basic Input Output System, BIOS) of the intelligent driving operating system is hot reset. Then use the kernel dump tool to start Kdump to run the dump kernel, and pass the target address of the dump kernel to the basic input and output system of the intelligent driving operating system through shared memory. At this time, the basic input and output system can jump to and dump the abnormal scene through the dump kernel according to the target address to restart the intelligent driving operating system.
[0054] Therefore, when the CPU of the intelligent driving operating system cannot execute instructions, the stuck intelligent driving operating system is restarted through the safety island system, which effectively improves the response speed of the deadlock restart and improves driving safety. At the same time, the safety island system also saves relevant information of the abnormal scene, which is convenient for developers to analyze the cause of the problem in the future.
[0055] It should be noted that Figure 1 It is just an example. Those skilled in the art will understand that although Figure 1 Only some modules in the intelligent driving operating system and the safety island system are shown, but it does not constitute a limitation of the embodiments of the present invention, and may include more or fewer modules than shown in the figure.
[0056] Combine the following Figure 2 A method for recovering and locating a system hang fault provided by an embodiment of the present invention is specifically described. Figure 2This is a flow chart of a method for detecting and recovering a hang of an intelligent driving operating system according to an embodiment of the present invention. The method is applied to a vehicle equipped with an intelligent driving operating system, the vehicle also includes a safety island system, the intelligent driving operating system includes at least one SoC equipped with a watchdog, and the central processor of the SoC feeds the watchdog regularly. The flow chart includes S210-S240, and the following steps are described in detail:
[0057] S210, the central processor of the SoC initiates a dog feeding action to the watchdog at a preset time interval.
[0058] In one embodiment of the present invention, a watchdog timer is a timer circuit. When the CPU of the intelligent driving operating system works normally, it will output a signal to the watchdog at regular intervals to clear the watchdog timer. This operation is called feeding the dog. If an accident occurs in the intelligent driving operating system, causing the CPU to hang and unable to feed the dog on time, that is, no dog feeding action is received within a preset time period, the watchdog will detect that the scheduled dog feeding has timed out and will send an interrupt signal to the intelligent driving operating system to cause a hot reset of the intelligent driving operating system.
[0059] S220, when the watchdog does not receive a feeding action within two consecutive preset time intervals, the watchdog sends an external interrupt signal to the safety island domain system, so that the safety island domain system reads the hardware register of the intelligent driving operating system to record the abnormal scene and performs a hot reset on the intelligent driving operating system.
[0060] In an embodiment of the present invention, when the watchdog fails to receive a dog feeding action for the first time after an interval of a preset time length, the watchdog sends an interrupt to the intelligent driving operating system; when the watchdog still fails to receive a dog feeding action after an interval of a second preset time length, an external interrupt signal is sent to the safety island domain system, so that the safety island domain system reads the hardware registers of the intelligent driving operating system to record the abnormal scene and perform a hot reset on the intelligent driving operating system.
[0061] Specifically, in one embodiment of the present invention, when the watchdog detects a dog feeding timeout for the second time, that is, within the second preset time, the dog feeding action is still not received, indicating that the CPU of the intelligent driving operating system is no longer able to execute instructions, and an external system is required to operate the intelligent driving operating system to restart the intelligent driving operating system. After the watchdog sends an external interrupt to the safety island domain system, the safety island domain system reads the hardware registers of the intelligent driving operating system to record the abnormal scene, and can send the kernel dump to the developer through cloud or local debugging, thereby providing a basis for the developer to analyze the cause of the hang later.
[0062] More specifically, after reading the hardware registers of the intelligent driving operating system, the safety island system will save the abnormal scene information it reads to the black box. The black box is essentially a custom signal processing function that can replace the kernel's default processing to save the abnormal scene information, making it easier to locate the problem later. At the same time, the safety island system will also set a restart flag in the intelligent driving operating system to perform a hot reset of the intelligent driving operating system.
[0063] S230, after the safe island system is hot reset, the intelligent driving operating system starts the dump kernel through the kernel dump tool to dump the abnormal scene, and dumps the abnormal scene to the disk medium.
[0064] In an embodiment of the present invention, after the intelligent driving operating system undergoes a hot reset of the safety island domain system, the kexec tool can be used to load kdump to run the dump kernel, and the information of the dump kernel can be passed to the basic input and output system of the intelligent driving operating system through shared memory. The kexec tool can skip the entire boot loader stage and directly jump to a new kernel, and kdump can dump memory running parameters when the system crashes, deadlocks or freezes. Therefore, after kexec loads kdump, kdump can run a new kernel, namely the dump kernel, through the kexec tool, and pass the information of the dump kernel to the basic input and output system of the intelligent driving operating system through shared memory; the basic input and output system captures the abnormal scene generated when the intelligent driving operating system fails and hangs through the dump kernel and stores it in the reserved memory; the intelligent driving operating system dumps the abnormal scene in the reserved memory to the disk medium.
[0065] Specifically, in one embodiment of the present invention, the kexec tool can send the target address and address parameters of the dump kernel, that is, the address of the dump kernel, to the basic input and output system through shared memory according to the pre-configured information so that the basic input and output system jumps to the address where the dump kernel is located according to the target address and address parameters. The basic input and output system is a set of programs solidified on a read-only memory (ROM) chip on the motherboard in the computer. The dump kernel can be used to capture the abnormal scene generated when the intelligent driving operating system fails and hangs and is stored in the reserved memory. The abnormal scene may include memory information, register status, stack pointer, memory management information and other information when the system is running, and the intelligent driving operating system dumps the abnormal scene in the reserved memory to the disk medium. Thus, the basic input and output system can jump to the target address of the dump kernel and use the dump kernel to perform abnormal dumping and restart the intelligent driving operating system.
[0066] More specifically, before jumping to the target address of the dump kernel, the basic input and output system will read the magic number in the target address and verify it with the stored magic number. If the verification is consistent, the basic input and output system can jump to the target address. The magic number is a custom check number. Since the memory address information is relatively long, the time complexity of memory address verification is relatively high. At this time, one or more magic numbers can be set to verify the address. The target address is the address where the dump kernel is stored. When the basic input and output system jumps to the target address, it provides a prerequisite for the basic input and output system to use the dump kernel to perform a dump operation for hot service.
[0067] S240: After the intelligent driving operating system is dumped, restart the intelligent driving operating system.
[0068] It should be noted that the method of the embodiment of the present invention can be applied not only to the intelligent driving operating system of intelligent vehicles, but also to other safety systems that need to quickly hot reset and save abnormal scenes.
[0069] Another embodiment of the present invention further provides an electronic device, such as Figure 3 As shown, the electronic device includes an intelligent driving operating system and a safety island system, and the intelligent driving operating system includes at least one SoC with a watchdog, including:
[0070] The dog feeding module is used to initiate the dog feeding action to the watchdog at a preset interval;
[0071] The watchdog module is used to send an interrupt to the intelligent driving operating system and the safety island system when no dog feeding action is received within a preset interval;
[0072] The safe island system includes:
[0073] The abnormal scene recording module is used to receive the external interrupt sent by the watchdog module to the safety island domain system when the watchdog module does not receive the dog feeding action within the preset interval, and read the hardware register of the intelligent driving operating system to record the abnormal scene;
[0074] The hot reset module is used to notify the intelligent driving operating system to perform a hot reset so that the basic input and output system of the intelligent driving operating system is dumped through the dump kernel and the intelligent driving operating system is restarted.
[0075] In one embodiment of the present invention, the watchdog module is used to:
[0076] When the watchdog fails to receive the dog feeding action for the first time at the preset interval, the watchdog sends an interrupt to the intelligent driving operating system;
[0077] If the dog feeding action is still not received after the second preset time interval, an external interrupt signal is sent to the safety island domain system, so that the safety island domain system reads the hardware register of the intelligent driving operating system to record the abnormal scene and perform a hot reset of the intelligent driving operating system.
[0078] In one embodiment of the present invention, the abnormal scene recording module is used to:
[0079] The safety island system reads the hardware registers of the intelligent driving operating system and records the abnormalities in the hardware registers into the black box.
[0080] In one embodiment of the present invention, the thermal reset module is used to:
[0081] A flag is set in the black box to notify the intelligent driving operating system to perform a hot reset.
[0082] In one embodiment of the present invention, the electronic device comprises:
[0083] The address information transmission module is used to transfer the dump kernel information to the basic input and output system of the intelligent driving operating system through the shared memory so that the basic input and output system can capture the abnormal scene generated when the intelligent driving operating system fails and hangs through the dump kernel and store it in the reserved memory, and restart the intelligent driving operating system after the dump is completed.
[0084] In one embodiment of the present invention, the address information transmission module is used to:
[0085] The basic input and output system performs a magic number check on the information. If the magic number check passes, the basic input and output system can jump to the target address of the dumped kernel.
[0086] It should be noted that the device provided in the above embodiment, when implementing its functions, only uses the division of the above functional modules as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment and the corresponding method embodiment belong to the same concept, and the specific implementation process is detailed in the corresponding method embodiment, which will not be repeated here.
[0087] Another embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for recovering and locating the system hang failure in the above method is implemented.
[0088] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0089] Another embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the method for recovering and locating a system hang failure in the above method are implemented.
[0090] Take running on the car computer as an example, Figure 4 As shown, it shows a block diagram of a SoC (System on Chip) 1300 provided by an embodiment of the present application. Figure 4 In the FIG, similar components have the same reference numerals. In addition, the dashed boxes are optional features of more advanced SoCs. Figure 4 In the embodiment, SoC 1300 includes: an interconnect unit 1350, which is coupled to an application processor 1310; a system agent unit 1380; a bus controller unit 1390; an integrated memory controller unit 1340; a group or one or more coprocessors 1320, which may include integrated graphics logic, an image processor, an audio processor, and a video processor; a static random access memory (SRAM) unit 1330; and a direct memory access (DMA) unit 1360. In one embodiment, the coprocessor 1320 includes a dedicated processor, such as, for example, a network or communication processor, a compression engine, a GPGPU, a high throughput MIC processor, or an embedded processor.
[0091] The static random access memory (SRAM) unit 1330 may include one or more computer-readable media for storing data and / or instructions. The computer-readable storage medium may store instructions, specifically, temporary and permanent copies of the instructions. The instructions may include: when executed by at least one unit in the processor, the Soc 1300 performs the calculation method according to the above embodiment, which may be specifically referred to in the above embodiment. Figure 2 The method shown will not be repeated here.
[0092] It can be understood by those skilled in the art that Figure 4The structure shown is for illustration only. SoC1300 may also include Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown.
[0093] One embodiment of the present invention also provides a computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to a method for recovering and locating a system hang failure. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method for recovering and locating a system hang failure provided in the above-mentioned various optional embodiments.
[0094] Optionally, in an embodiment of the present invention, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0095] An embodiment of the present invention further provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the system hang failure recovery and location method provided in the above various optional embodiments.
[0096] It should be noted that the sequence of the embodiments of the present invention described above is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0097] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0098] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0099] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for recovering and locating a system deadlock fault, applied to an intelligent vehicle, characterized in that: The intelligent vehicle includes an intelligent driving operating system and a safety island system, the intelligent driving operating system includes at least one SoC with a watchdog, and the method includes: The central processor of the SoC initiates a dog feeding action to the watchdog at intervals of a preset time length; when the watchdog fails to receive the dog feeding action at two consecutive intervals of the preset time length, the watchdog sends an external interrupt signal to the safety island domain system, so that the safety island domain system reads the hardware register of the intelligent driving operating system to record the abnormal scene, and performs a hot reset on the intelligent driving operating system; After the safe island domain system is hot reset, the intelligent driving operating system starts the dump kernel through the kernel dump tool to dump the abnormal scene, and dumps the abnormal scene to the disk medium; After the intelligent driving operating system is dumped, the intelligent driving operating system is restarted.
2. The method according to claim 1, characterized in that When the watchdog does not receive a dog feeding action within two consecutive intervals of the preset time length, the watchdog sends an external interrupt signal to the safety island domain system, so that the safety island domain system reads the hardware register of the intelligent driving operating system to record the abnormal scene, and performs a hot reset on the intelligent driving operating system, including: When the watchdog fails to receive the dog feeding action for the first time within the preset time interval, the watchdog sends an interrupt to the intelligent driving operating system; When the watchdog still does not receive the dog feeding action within the second preset time interval, an external interrupt signal is sent to the safety island domain system, so that the safety island domain system reads the hardware register of the intelligent driving operating system to record the abnormal scene and performs a hot reset on the intelligent driving operating system.
3. The method according to claim 2, characterized in that When the watchdog still does not receive the dog feeding action after the second preset time interval, an external interrupt signal is sent to the safety island domain system, so that the safety island domain system reads the hardware register of the intelligent driving operating system to record the abnormal scene, and performs a hot reset on the intelligent driving operating system, including: The safety island domain system reads the hardware register of the intelligent driving operating system and records the abnormal scene in the hardware register into the black box; The safety island system sets an identifier in the intelligent driving operating system to notify the intelligent driving operating system to perform a hot reset to restart the basic input and output system.
4. The method according to claim 1, characterized in that: After the safe island domain system is hot reset, the intelligent driving operating system starts the dump kernel through the kernel dump tool to dump the abnormal scene, and dumps the abnormal scene to the disk medium, including: The kernel dump tool starts the dump kernel and transmits information of the dump kernel to the basic input and output system of the intelligent driving operating system through the shared memory; The basic input and output system captures the abnormal scene generated when the intelligent driving operating system fails and hangs up through the dump kernel and stores it in the reserved memory; The intelligent driving operating system dumps the abnormal scene in the reserved memory to the disk medium.
5. The method according to claim 4, characterized in that The information includes: the target address and jump parameters of the dump kernel.
6. The method according to claim 5, characterized in that The kernel dump tool starts the dump kernel and transmits information of the dump kernel to the basic input and output system of the intelligent driving operating system through shared memory, including: The basic input and output system performs a magic number check on the target address. If the magic number check passes, the basic input and output system may jump to the target address.
7. An electronic device, comprising an intelligent driving operating system and a safety island system, characterized in that: The intelligent driving operating system includes at least one SoC provided with a watchdog, including: A dog feeding module, used to initiate a dog feeding action to the watchdog at a preset time interval; A watchdog module, configured to send an interrupt to the intelligent driving operating system and the safety island system when the dog feeding action is not received within the preset time interval; The safety island system includes: An abnormal scene recording module is used to receive an external interrupt sent by the watchdog module to the safety island domain system when the watchdog module does not receive the dog feeding action within the preset time interval, and read the hardware register of the intelligent driving operating system to record the abnormal scene; The hot reset module is used to notify the intelligent driving operating system to perform a hot reset so that the basic input and output system of the intelligent driving operating system is dumped through a dump kernel and the intelligent driving operating system is restarted.
8. The electronic device according to claim 7, characterized in that: The watchdog module is used to: When the dog feeding action is not received for the first time during the preset time interval, the watchdog sends an interrupt to the intelligent driving operating system; If the dog feeding action is still not received after the second preset time interval, an external interrupt signal is sent to the safety island domain system, so that the safety island domain system reads the hardware register of the intelligent driving operating system to record the abnormal scene and performs a hot reset on the intelligent driving operating system.
9. The electronic device according to claim 8, characterized in that: The abnormal scene recording module is used for: The safety island system reads the hardware register of the intelligent driving operating system and records the abnormal scene in the hardware register into the black box.
10. The electronic device according to claim 9, characterized in that: The thermal reset module is used for: An identifier is set in the black box to notify the intelligent driving operating system to perform a hot reset.
11. The electronic device according to claim 10, characterized in that: The electronic device comprises: The address information transmission module is used to transfer the information of the dump kernel to the basic input and output system of the intelligent driving operating system through the shared memory so that the basic input and output system can capture the abnormal scene generated when the intelligent driving operating system fails and hangs through the dump kernel and store it in the reserved memory, and restart the intelligent driving operating system after the dump is completed.
12. The electronic device according to claim 11, characterized in that: The address information transmission module is used for: The basic input and output system is made to perform a magic number check on the information. If the magic number check passes, the basic input and output system can jump to the target address of the dump kernel.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for recovering and locating a system hang failure according to any one of claims 1 to 6 is implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for recovering and locating a system hang failure according to any one of claims 1 to 6 is implemented.
