CN117667430A - Lock-holding process detection method and related equipment - Google Patents

Lock-holding process detection method and related equipment Download PDF

Info

Publication number
CN117667430A
CN117667430A CN202211059212.8A CN202211059212A CN117667430A CN 117667430 A CN117667430 A CN 117667430A CN 202211059212 A CN202211059212 A CN 202211059212A CN 117667430 A CN117667430 A CN 117667430A
Authority
CN
China
Prior art keywords
lock
holding
detection method
thread
detection thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211059212.8A
Other languages
Chinese (zh)
Inventor
龚晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211059212.8A priority Critical patent/CN117667430A/en
Priority to PCT/CN2023/112510 priority patent/WO2024046089A1/en
Publication of CN117667430A publication Critical patent/CN117667430A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a lock holding process detection method and related equipment, and relates to the field of communication. The lock holding process detection method comprises the following steps: creating a detection thread, applying for a lock in a data structure by using the detection thread, wherein the data structure is positioned in a kernel; during the period that the detection thread waits for the lock applied to be used, the relevant information of the process holding the lock applied by the detection thread is acquired. According to the method and the device, the lock to be detected is applied by the detection thread, and the process related information of the lock is acquired during the period that the detection thread waits for using the lock, so that a developer can analyze the cause that another process is blocked due to waiting for using the lock based on the process related information of the lock.

Description

Lock-holding process detection method and related equipment
Technical Field
The present disclosure relates to the field of communications, and in particular, to a lock-holding process detection method and related devices.
Background
Existing operating systems (e.g., linux systems) typically provide a dimension measurement mechanism to detect if a process is stuck. When a process is detected to be blocked due to waiting for a lock (read-write lock, mutex lock, etc.) through the dimension measurement mechanism, the operating system can print the relevant information of the process. However, developers often need to analyze the information of the process holding the lock to locate the cause of the lock, but not the information of the process waiting for the lock, which brings great difficulty to the investigation of the developers.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a lock-holding process detection method, which solves the problem in the prior art that the problem of inconvenient troubleshooting of the locking cause is caused by the failure to acquire the process information of the lock holding process.
The first aspect of the embodiment of the application discloses a lock holding process detection method, which comprises the following steps: creating a detection thread, applying for a lock in a data structure by using the detection thread, wherein the data structure is positioned in a kernel; during the period that the detection thread waits for the lock applied to be used, the relevant information of the process holding the lock applied by the detection thread is acquired.
By adopting the technical scheme, the lock to be detected can be added into the data structure of the kernel in advance, the lock in the data structure is applied by the detection thread through creation, if the lock applied by the detection thread is occupied, the detection thread can continuously acquire the relevant information of the process holding the lock during the period of waiting for using the lock applied by the detection thread, for example, the relevant information of the process holding the lock is stored into the kernel log, so that when a developer analyzes that a certain process is blocked due to waiting for using the lock, the reason of blocking can be positioned based on the relevant information of the process holding the lock acquired by the detection thread, and the troubleshooting workload of the developer is reduced.
In some embodiments, after the detection thread is created, the lock-holding process detection method further comprises: in response to the application not responding to the event, the detection thread is run.
By adopting the technical scheme, the detection thread can be created after the electronic equipment is started, and can be in a dormant state if the application running on the electronic equipment does not generate an application program unresponsive event, and can wake up the detection thread to execute the operation of applying the lock in the data structure if the application running on the electronic equipment generates the application program unresponsive event.
In some embodiments, applying for a lock in a data structure with a detection thread includes: in response to the application not responding to the event, a lock in the data structure is applied for using the detection thread.
By adopting the technical scheme, the detection thread can be established after the electronic equipment is started, if the application running on the electronic equipment has an application program unresponsive event, the detection thread can be utilized to apply for the lock in the data structure, and if the application running on the electronic equipment has no application program unresponsive event, the detection thread can be in a dormant state or always in an active state.
In some embodiments, applying for a lock in a data structure with a detection thread includes: acquiring a state of each lock in the data structure based on the detection thread; and if the state of the first lock in the data structure is the occupied state, applying for the first lock in the data structure by using the detection thread.
By adopting the technical scheme, the state of each lock in the data structure can be acquired through the detection thread, for example, whether the state of the lock is the occupied state or the unoccupied state is acquired, the detection thread is utilized to apply for the lock in the occupied state so as to acquire the related information of the process holding the lock applied by the detection thread, and for the lock in the unoccupied state, the detection thread can not apply because other processes are not blocked due to waiting for the lock to be used.
In some embodiments, the information about the process includes stack information for holding the first lock in the process.
By adopting the technical scheme, the relevant information of the process comprises the stack information of the lock in the process, and the stack information comprises the function of the lock, so that a developer can position the function of the lock, namely, can determine which function call the blocking caused by the waiting lock occurs on, and is convenient for the developer to follow-up optimize the function or the function call logic.
In some embodiments, obtaining information about a process holding a lock to detect a thread application includes: starting a timer, and storing relevant information of a process holding a lock applied by a detection thread into a kernel log based on the timer.
By adopting the technical scheme, the detection thread can store the relevant information of the process holding the lock applied by the detection thread into the kernel log by starting a timer during the period of waiting to use the lock applied by the detection thread, for example, the printing period of the timer can be set, so that the timer can periodically store the relevant information of the process holding the lock applied by the detection thread into the kernel log during the period of waiting to use the lock applied by the detection thread, and a developer can position the reason of waiting for lock blocking based on the process relevant information of the process holding the lock applied by the detection thread printed by the timer.
In some embodiments, saving, based on a timer, information about a process holding a lock to detect a thread application into a kernel log includes: acquiring a pointer of a process holding a lock applied by the detection thread, and transmitting a given timer; and running a printing function by using the timer, wherein the printing function is used for storing relevant information of the process into a kernel log based on a pointer of the process holding the lock applied by the detection thread.
By adopting the technical scheme, the detection thread can save the relevant information of the process holding the lock applied by the detection thread into the kernel log by starting a timer and running the printing function through the timer during the period of waiting to use the lock applied by the detection thread, for example, the printing function can save the relevant information of the process into the kernel log based on the pointer of the process holding the lock applied by the detection thread.
In some embodiments, the lock-holding process detection method further comprises: if the detection thread applies for the lock, the timer is deleted.
By adopting the technical scheme, the detection thread applies for the lock in the data structure, which indicates that the lock in the data structure is not occupied currently or is released by the process which occupies the lock previously, and the detection thread can delete the timer started previously and stop printing the related information of the process which holds the lock.
In some embodiments, the lock-holding process detection method further comprises: if the detecting thread applies for the lock, the detecting thread releases the lock.
By adopting the technical scheme, the detection thread applies for the lock in the data structure, which indicates that the lock in the data structure is not occupied currently or is released by the process which occupies the lock previously, and the detection thread can release the lock, so that other processes in the electronic equipment can apply for the lock normally.
In some embodiments, the data structure includes a global linked list or global array of cores.
By adopting the technical scheme, the lock to be detected can be stored by adopting the global chain table or the global array in the kernel, so that the lock in the thread application data structure can be detected conveniently.
In some embodiments, the lock-holding process detection method further comprises: responsive to the application non-response event, obtaining a duration of the application non-response event; if the duration of the non-response event of the application program exceeds the preset time, and the process associated with the non-response event of the application program applies for the lock, closing the process holding the lock.
By adopting the technical scheme, when a certain application process in the electronic equipment is blocked due to waiting for using a certain lock, the operating system of the electronic equipment can forcedly close the process holding the lock after the lock is blocked for a preset time, so that the lock can be forcedly released, the process applying the lock can be applied to the lock smoothly, and the problem that the screen is blocked all the time due to waiting for using the lock by the process and the problem that a user uses the electronic equipment is solved.
In some embodiments, the lock-holding process detection method further comprises: responsive to the application non-response event, obtaining a duration of the application non-response event; if the duration of the non-response event of the application program exceeds the preset time, and the process associated with the non-response event of the application program applies for lock, closing the process applying for lock.
By adopting the technical scheme, when the phenomenon that a certain application process in the electronic equipment is blocked because a certain lock is waited to be used, the operating system of the electronic equipment can forcedly close the application process after the blocking is continued for a preset time, so that a user can normally touch the electronic equipment, and the problem that the screen blocking always occurs because the process waits for the lock to be used to influence the user to use the electronic equipment is avoided.
In some embodiments, the kernel is any one of a Linux kernel, a An Zhuona kernel, an iOS kernel, a Windows kernel, a hong kernel.
By adopting the technical scheme, the electronic equipment can comprise, but is not limited to, a Linux system, an android system, an iOS system, a Windows system and a hong Mongolian system, and the cores comprise, but are not limited to, a Linux core, a An Zhuona core, an iOS core, a Windows core and a hong Meng Nahe.
In a second aspect, embodiments of the present application provide a computer-readable storage medium comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the lock-holding process detection method according to the first aspect.
In a third aspect, an embodiment of the present application provides an electronic device, where the electronic device includes a processor and a memory, where the memory is configured to store instructions, and the processor is configured to invoke the instructions in the memory, so that the electronic device performs the lock-holding process detection method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product which, when run on an electronic device (e.g. a computer), causes the electronic device to perform the lock-holding process detection method as described in the first aspect.
In a fifth aspect, there is provided an apparatus having a function of implementing the behavior of the electronic device in the method provided in the first aspect. The functions may be realized by hardware, or may be realized by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
It will be appreciated that the computer readable storage medium according to the second aspect, the electronic device according to the third aspect, the computer program product according to the fourth aspect, and the apparatus according to the fifth aspect correspond to the method according to the first aspect, and therefore, the advantages achieved by the apparatus according to the fifth aspect may refer to the advantages in the corresponding method provided above, and will not be described herein.
Drawings
FIG. 1 is a schematic diagram of an electronic device printing process information of a waiting lock using a conventional maintenance mechanism;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 3 is a schematic software structure of an electronic device according to an embodiment of the present application;
fig. 4 is a schematic application scenario diagram of a lock-holding process detection technique according to an embodiment of the present application;
FIG. 5 is a flowchart of detecting a lock-holding process of an electronic device according to an embodiment of the present application;
Fig. 6 is a schematic diagram of process information of a lock obtained by printing using a lock-holding process detection technology according to an embodiment of the present application;
fig. 7 is a schematic application scenario diagram of a lock-holding process detection technique according to another embodiment of the present application;
fig. 8 is a flowchart of a lock-holding process detection method according to an embodiment of the present application.
Detailed Description
It should be noted that "at least one" in this application means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and the representation may have three relationships, for example, a and/or B may represent: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The terms "first," "second," "third," "fourth" and the like in the description and in the claims and drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
In the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
Operating System (OS): programs that manage computer hardware and software resources are the kernel and the keystone of the computer system.
And (3) a kernel: a platform for communication between computer software and hardware is established, and the kernel provides system services such as file management, virtual memory, device Input/Output (I/O), etc.
The process comprises the following steps: a process is a basic unit of dynamic execution of an operating system, and in a conventional operating system, a process is a basic allocation unit and a basic execution unit, and can be considered as an instance of a running program.
Thread: the thread can be included in the process, and is the actual operation unit in the process. Multiple threads may be concurrent in a process, each thread executing a different task in parallel.
And (3) locking: in the multithreading operation, in order to ensure the consistency of data and the safety of critical codes, an operating system introduces a locking mechanism, and through the locking mechanism, only one thread enters the critical area code at a certain time point in the multi-core and multi-process environment, thereby ensuring the consistency of operation data in the critical area.
Taking the Linux system as an example, the Linux system provides a dimension measurement mechanism to detect whether a process is blocked, for example, the dimension measurement mechanism is a Hungtask mechanism, and the Hungtask mechanism can detect whether a key process of the system is blocked every a first preset time (for example, 30 seconds). When the system key process is detected to be blocked for more than a second preset time (for example, 90 seconds), the stack information of the printing process of the operating system is triggered. The stack information of the printing process can be derived and stored to a designated position, so that a developer can conveniently acquire the stack information analysis process of the process from the designated position. As shown in FIG. 1, the init process waiting for the mutex lock exceeds 90 seconds, triggering the operating system to print the information of the init process waiting for the mutex lock. The existing maintenance mechanism can only trigger the operating system to print the information of the progress waiting for the lock, and cannot trigger the operating system to print the information of the progress holding the mutex lock. However, the reason why the developer analyzes the process seizing is that the information of the process based on holding the lock is required instead of the information of the process waiting for the lock, which brings great difficulty to the investigation work of the developer.
In order to solve the technical problems, the embodiment of the application provides a lock-holding process detection method, which can print information of a lock-holding process when the process is blocked due to waiting for lock, is convenient for a developer to check the blocked process, and reduces the check workload of the developer.
The lock holding process detection method provided by the embodiment of the application can be applied to electronic equipment. The electronic devices of the present application may include, but are not limited to, at least one of a cell phone, a foldable electronic device, a tablet computer, a personal computer (personal computer, PC), a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR) device, a Virtual Reality (VR) device, an artificial intelligence (artificial intelligence, AI) device, a wearable device, a smart home device, a car machine device, and a smart city device, a server, and the specific types of electronic devices are not particularly limited in the embodiments of the present application.
In some embodiments, the electronic device may also communicate with other electronic devices or servers over a communications network. The communication network may be a wired network or a wireless network. For example, the communication network may be a local area network (local area networks, LAN) or a wide area network (wide area networks, WAN), such as the internet. When the communication network is a local area network, the communication network may be, for example, a wireless fidelity (wireless fidelity, wi-Fi) hotspot network, a Wi-Fi P2P network, a bluetooth network, a zigbee network, or a near field communication (near field communication, NFC) network, or the like. When the communication network is a wide area network, the communication network may be, for example, a third generation mobile communication technology (3 rd-generation wireless telephone technology, 3G) network, a fourth generation mobile communication technology (the 4th generation mobile communication technology, 4G) network, a fifth generation mobile communication technology (5 th-generation mobile communication technology, 5G) network, a future evolution public land mobile network (public land mobile network, PLMN) or the internet, etc.
In some embodiments, the electronic device may install one or more APP (Application). APP may be abbreviated as an application, a software program capable of performing some or more specific functions. For example, instant messaging applications, video applications, audio applications, image capture applications, cloud desktop applications, and the like. The instant messaging application may include, for example, a short message application. Image capture class applications may include, for example, camera applications (system cameras or third party camera applications). Video-type applications may include, for example, bloom as video. The audio class application may include, for example, hua as music. The application mentioned in the following embodiments may be a system application installed when the electronic device leaves the factory, or may be a third party application that is downloaded from a network or obtained from other electronic devices by a user during the process of using the electronic device.
Electronic devices include, but are not limited to, on-boardWindows /> Or other operating system.
Fig. 2 illustrates a schematic structure of an electronic device 10.
The electronic device 10 may include a processor 110, an external memory interface 120, an internal memory 121, an antenna 1, an antenna 2, a mobile communication module 130, a wireless communication module 140, an audio module 150, a sensor module 160, a camera module 170, a display screen 180, and the like.
It should be understood that the illustrated structure of the present embodiment does not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 may be a cache memory. The memory may hold instructions or data that are used or used more frequently by the processor 110. If the processor 110 needs to use the instructions or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others. The processor 110 may be connected to modules such as an audio module, a wireless communication module, a display, a camera, etc. through at least one of the above interfaces.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative and not limiting on the structure of the electronic device 10. In other embodiments of the present application, the electronic device 10 may also employ different interfacing manners, or a combination of interfacing manners, as in the above embodiments.
The wireless communication function of the electronic device 10 may be implemented by the antenna 1, the antenna 2, the mobile communication module 130, the wireless communication module 140, a modem processor, a baseband processor, and the like.
The mobile communication module 130 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied on the electronic device 10. The mobile communication module 130 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be disposed in the same device as at least some of the modules of the processor 110.
The wireless communication module 140 may provide solutions for wireless communication including wireless local area networks (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) networks), bluetooth (BT), bluetooth low energy (bluetooth low energy, BLE), ultra Wide Band (UWB), global navigation satellite systems (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied on the electronic device 10. The wireless communication module 140 may be one or more devices integrating at least one communication processing module.
In some embodiments, the electronic device 10 may communicate with networks and other electronic devices through wireless communication technology. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 10 may implement display functions via a GPU, a display screen 180, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 180 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The camera module 170 includes a camera. The display 180 is used to display images, videos, and the like. The display 180 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 10 may include 1 or more display screens 180.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 10. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 10, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional methods or data processing of the electronic device 10 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The audio module 150 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 150 may also be used to encode and decode audio signals. In some embodiments, the audio module 150 may be disposed in the processor 110, or some functional modules of the audio module 150 may be disposed in the processor 110.
The software system of the electronic device 10 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. Taking an Android system with a layered architecture as an example, the embodiment of the application illustrates a software structure of the electronic device 10.
Fig. 3 is a software block diagram of the electronic device 10 according to an embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into five layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (ART) and native C/c++ libraries, a hardware abstraction layer (Hardware Abstract Layer, HAL), and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 3, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, an activity manager, an input manager, and so forth.
The window manager provides window management services (Window Manager Service, WMS) that may be used for window management, window animation management, surface management, and as a transfer station to the input system.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
The activity manager may provide activity management services (Activity Manager Service, AMS) that may be used for system component (e.g., activity, service, content provider, broadcast receiver) start-up, handoff, scheduling, and application process management and scheduling tasks.
The input manager may provide input management services (Input Manager Service, IMS), which may be used to manage inputs to the system, such as touch screen inputs, key inputs, sensor inputs, and the like. The IMS retrieves events from the input device node and distributes the events to the appropriate windows through interactions with the WMS.
The android runtime includes a core library and An Zhuoyun rows. The android runtime is responsible for converting source code into machine code. Android runtime mainly includes employing Advanced Or Time (AOT) compilation techniques and Just In Time (JIT) compilation techniques.
The core library is mainly used for providing the functions of basic Java class libraries, such as basic data structures, mathematics, IO, tools, databases, networks and the like. The core library provides an API for the user to develop the android application.
The native C/c++ library may include a plurality of functional modules. For example: surface manager (surface manager), media Framework (Media Framework), libc, openGL ES, SQLite, webkit, etc.
The surface manager is used for managing the display subsystem and providing fusion of 2D and 3D layers for a plurality of application programs. Media frames support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES provides for drawing and manipulation of 2D graphics and 3D graphics in applications. SQLite provides a lightweight relational database for applications of the electronic device 10.
The hardware abstraction layer runs in a user space (user space), encapsulates the kernel layer driver, and provides a call interface to the upper layer.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
An application scenario diagram of the process lock-holding detection method provided in the embodiment of the present application is described below with reference to fig. 4.
As shown in fig. 4, the electronic device 10 is described by taking a mobile phone as an example. In this embodiment, the electronic device 10 is installed with an operating system. The electronic device 10 is further provided with a plurality of APPs, and after a user clicks a certain APP, the electronic device 10 can create a corresponding application process, and the application process can realize various functions corresponding to the APP. For example, the user clicks the Hua-as video APP icon, the electronic device creates a Hua-as video APP process, and the user can realize the functions of watching videos on line in full screen or watching videos off line through the Hua-as video APP process. When a process called video APP waits for lock because of accessing certain data (e.g., data in shared memory), if the waiting lock time exceeds a threshold set by the system, the displayed video APP on the user interface of the electronic device 10 may become stuck, e.g., prompt the video to be unresponsive. The threshold may be set according to actual requirements, which is not limited in this application, and may be 5s, for example.
The embodiment of the application provides a maintenance mechanism, which can acquire the process of holding the lock applied for the video when the process of the video APP is blocked because of waiting for the lock, print the related information of the process of holding the lock, and facilitate the investigation of the blocking reason of the process of the video APP by a developer.
As shown in fig. 5, a flowchart of the lock-holding process detection implemented by the electronic device of the present application is shown.
In this embodiment, the Linux system is taken as an example of an operating system installed in the electronic device 10.
S51, adding the lock to be detected into the data structure of the kernel.
In some embodiments, the developer may add locks to be detected to the kernel's data structure according to actual requirements. The lock to be detected is not limited in this application, and may be, for example, a mutex lock, mmap_semlock, or the like. The data structure of the kernel is not limited, and can be used for storing the lock to be detected, for example, the data structure of the kernel can be a global linked list of the kernel, a global array of the kernel and the like.
S52, creating a detection thread, and applying for the lock in the data structure by using the detection thread.
In some embodiments, the detection thread may refer to a kernel thread through which the application of a lock located in a data structure of the kernel is implemented. For example, a detection thread may be created after the electronic device 10 is booted, and after the detection thread is created, the operations to apply for the lock in the data structure are performed. The data structure can be added with a plurality of locks to be detected, the detection thread can apply for the locks to be detected in a preset mode, the preset mode can be set according to actual requirements, the application is not limited to the above, for example, the application can be sequentially carried out according to the adding sequence of each lock in the data structure, and the application can also be sequentially carried out for each lock in the data structure according to a self-defined rule.
The detecting thread may execute the operation of applying for the lock in the data structure once again at intervals of a third preset time after executing the operation of applying for the lock in the data structure once, or immediately execute the operation of applying for the lock in the data structure once again without interruption, and the third preset time may be set according to the actual requirement, which is not limited in this application. The detection thread performing the operation of applying for the lock in the data structure once may refer to the detection thread performing the operation of applying for each lock in the data structure once.
In some embodiments, the detection thread may also perform the operations of applying for the lock in the data structure after creation in response to a preset event. The preset event can be set according to actual requirements, which is not limited in the application. For example, the preset event may be detecting that the electronic device 10 is stuck or stuck at run-time.
For example, the preset event may be an APP occurrence application non-response (Application Not Response, ANR) event running in the electronic device 10, when the ANR event occurs in the APP running in the electronic device 10, running a detection thread to apply for a lock in the data structure, when the ANR event does not occur in the APP running in the electronic device 10, the detection thread is in a sleep state, or when the ANR event does not occur in the APP running in the electronic device 10, the detection thread is in an active state but does not perform an operation to apply for a lock in the data structure.
In some embodiments, a lock in a data structure is applied by a detection thread in order to detect a process holding the lock, and analyze why the process holding the lock does not release the lock for a long time, resulting in other processes being stuck waiting for the lock to be used. Before the detection thread is utilized to apply for the locks in the data structure, the detection thread can be utilized to apply for the locks in the occupied state, and other processes can not be blocked due to waiting for the locks to be used, so that the detection thread can not apply for the locks in the occupied state.
In some embodiments, for a lock in an occupied state, the detection thread may attempt to apply until the application is successful.
S53, if the first lock in the data structure applied by the detection thread is in an occupied state, the relevant information of the process holding the first lock is printed by a timer during the period that the detection thread waits for using the first lock.
The first lock is a lock to be detected, which may be added to the data structure in advance by a developer, e.g. the first lock is a mutex lock. If the first lock in the data structure applied by the detection thread is in an occupied state, the detection thread can start a timer, and relevant information of a process holding the first lock is continuously printed by using the timer during the period that the detection thread waits for using the first lock. The timer printing the related information of the process with the first lock may be that the designated timer runs a printing function, and the related information of the process is saved to a designated location, for example, saved to a kernel log. For example, a timer may set a print cycle, the timer enabling periodic printing of information about a process holding the first lock based on a preset print cycle. The timer may periodically print the related information of the process holding the first lock by designating the timer to run a print function, and save the related information of the process holding the first lock to the kernel log through the print function.
In some embodiments, during the time that the detection thread waits for the first lock to be used, the detection thread may obtain a pointer to the process holding the first lock and pass on to a timer, which may run a print function periodically based on the print cycle, which may print information about the process holding the first lock based on the pointer to the process.
In some embodiments, the relevant information for the process may include stack information for holding the first lock in the process. The stack information contains the function holding the first lock, so that a developer can locate the function holding the first lock, namely, the function call on which the APP is blocked caused by the waiting lock can be determined, and the developer can conveniently optimize the function or the function call logic subsequently.
As shown in fig. 6, the related information of the progress of the first lock is printed for the timer. Taking the first lock as a mutex lock (for example, a kernfs_mutex lock) as an example, the process sh holds the mutex lock for 5 minutes and still does not release the mutex lock, the detection thread can detect that the mutex lock is held by the process sh, and stack information of the mutex lock held in the process sh is printed through a timer.
In some embodiments, when a process is created by the kernel, the kernel assigns a unique process identification number (process identification, PID) to the process, and the detecting thread can obtain a pointer to the process holding the first lock based on the PID of the process holding the first lock. The pointer may refer to a first address in the system memory where Cheng Bao resides.
S54, if the detection thread applies to the first lock in the data structure, the detection thread deletes the timer.
In some embodiments, if the detection thread applies to the first lock in the data structure, indicating that the first lock in the data structure is not occupied or released by a process that previously occupied the first lock, the detection thread may delete the previously started timer and stop printing information about the process that holds the first lock.
S55, the detection thread releases the first lock.
After the detection thread applies for the first lock in the data structure, the first lock can be released, so that other processes can apply for using the first lock.
As shown in fig. 7, the electronic device 10 is installed with a video APP, and the detection thread may be automatically created after the electronic device 10 is powered on.
The user clicks the bloom video APP icon, the electronic device 10 creates a bloom video APP process, and the user may wait to use a Lock (e.g., lock 1) because the bloom video APP process accesses a certain data and the waiting time exceeds the threshold set by the system, and in the user interface of the electronic device 10, the bloom video APP is blocked, for example, pops up a prompt box for prompting the bloom video to be unresponsive.
Assuming that Lock1 has been added in advance in the data structure of the kernel, the electronic device 10 may apply for Lock1 by detecting the thread, start the timer T1 during the period when the detecting thread waits for use of Lock1, run the print function by the timer T1, and periodically save stack information of a process holding Lock1 to the kernel log by using the timer T1, so that a developer can analyze, based on the information saved in the kernel log, a reason that the process holding Lock1 does not release Lock1 for a long time, so as to perform targeted improvement, that is, the developer can analyze, by analyzing the information saved in the kernel log by the timer T1, a reason that the time for waiting for use of Lock1 by the process of the video APP exceeds the threshold set by the system.
In some embodiments, if a process of an APP in the electronic device 10 waits for a lock to be used, and the APP is locked, the operating system may force to close the process of the APP or close the process holding the lock after the APP is locked for a preset period of time.
For example, the duration of the Lock time of the process of the video APP exceeds the fourth preset time or the Lock time of the process of the video APP exceeds the fourth preset time due to waiting for the Lock1 to be used, the operating system of the electronic device 10 may forcibly close the process of the video APP so that the user may normally touch the electronic device 10 or close the process of the video APP with the Lock1 so that the process of the video APP may apply to the Lock1. The fourth preset time may be set according to actual requirements, which is not limited in this application. For example, as shown in fig. 7, the duration of the process of the video APP that is stuck due to waiting for Lock1 to be used exceeds the fourth preset time or waiting for the Lock time to exceed the fourth preset time, the operating system of the electronic device 10 forcibly turns off the process of the video APP and returns to the main interface.
Referring to fig. 8, an embodiment of the present application provides a lock-holding process detection method, which is applied to an electronic device 10. In this embodiment, the lock-holding process detection method may include:
s81, creating a detection thread, and applying for the lock in the data structure by using the detection thread.
In some embodiments, the data structure is located in the kernel, which is not limited in this application, and may be used to store the lock to be detected. The kernel is not limited in this application, and the kernel may be any of a Linux kernel, a An Zhuona kernel, an iOS kernel, a Windows kernel, and a hong-mong kernel, for example, because the operating system installed in the electronic device 10 is different.
The detection thread may be created after the electronic device 10 is booted, and after the detection thread is created, the operations to apply for the lock in the data structure are performed. The data structure can be added with a plurality of locks to be detected, the detection thread can apply for the locks to be detected in a preset mode, the preset mode can be set according to actual requirements, the application is not limited to the above, for example, the application can be sequentially carried out according to the adding sequence of each lock in the data structure, and the application can also be sequentially carried out for each lock in the data structure according to a self-defined rule.
In some embodiments, the detection thread may also perform the operations of applying for the lock in the data structure after creation in response to a preset event. The preset event can be set according to actual requirements, which is not limited in the application. For example, the preset event may be detecting that the electronic device 10 is stuck or stuck at runtime.
For example, the preset event may be an ANR event occurring in the APP running in the electronic device 10, when the ANR event occurs in the APP running in the electronic device 10, the detection thread is running to apply for the lock in the data structure, when the ANR event does not occur in the APP running in the electronic device 10, the detection thread is in a sleep state, or when the ANR event does not occur in the APP running in the electronic device 10, the detection thread is in an active state, but does not perform the operation to apply for the lock in the data structure.
In some embodiments, a lock in a data structure is applied by a detection thread in order to detect a process holding the lock, and analyze why the process holding the lock does not release the lock for a long time, resulting in other processes being stuck waiting for the lock to be used. Before the detection thread is used for applying for the locks in the data structure, the detection thread can be used for acquiring the state (occupied state or unoccupied state) of each lock in the data structure, the detection thread is used for applying for the lock in the occupied state, and other processes can not be blocked due to waiting for the lock to be used for the lock, so that the detection thread can not apply for the lock in the occupied state.
S82, acquiring relevant information of a process holding the lock applied by the detection thread during the period that the detection thread waits for the lock applied by the detection thread to be used.
In some embodiments, if the lock in the data structure applied by the detection thread is in an occupied state, the detection thread may start a timer, and the timer is used to continuously print information about the process holding the lock while the detection thread waits for the lock to be used. The related information of the process may include stack information holding the lock in the process. The stack information contains the function holding the lock, so that a developer can locate the function holding the lock, namely, the function call on which the APP is blocked caused by waiting for using the lock at this time can be determined, and the developer can conveniently and subsequently optimize the function or function call logic.
For example, a timed print cycle may be configured when the detection thread starts a timer that effects periodic printing of stack information for the process holding the lock based on the preset print cycle. The timer may periodically print the stack information of the process holding the lock, which may be a designated timer running a print function by which the stack information of the process holding the lock is saved to the kernel log.
In some embodiments, during the time that the detection thread waits to use the lock, the detection thread may obtain a pointer to the process holding the lock and pass on to a timer, which may run a print function periodically based on the print cycle, which may save its stack information to the kernel log based on the pointer to the process holding the lock.
In some embodiments, when a process is created by the kernel, the kernel assigns a unique PID to the process, and the detecting thread may obtain a pointer to the process holding the lock based on the PID of the process holding the lock and send the pointer to the timer.
In some embodiments, if the detection thread applies to a lock in the data structure, indicating that the lock in the data structure is not occupied or is released by a process that previously occupied the lock, the detection thread may delete a previously started timer and stop printing stack information for the process that holds the lock.
In some embodiments, the detection thread may release the lock after applying to the lock in the data structure, so that other processes may apply to use the lock.
In some embodiments, if the process of APP A1 in the electronic device 10 waits for a lock to be used, and thus the APP A1 is blocked, the operating system of the electronic device 10 may also force to close the process of APP A1 or close the process of holding the lock after a predetermined duration of blocking occurs, so as to avoid the problem that the process of APP A1 always has a screen blocking due to waiting for the lock to be used, which affects the normal use of the electronic device 10 by a user. For example, if the duration of the ANR event for the process of APP A1 exceeds the fourth preset time and the process of APP A1 is due to an ANR event triggered by waiting for the lock to be used, the operating system may force shut down the process of APP A1. For example, if the duration of the ANR event for a process of APP A1 exceeds a fourth preset time and the process of APP A1 is due to an ANR event triggered by waiting to use a lock that is being held by another process of APP A2, the operating system may force the process of APP A2 holding the lock to close.
The electronic device 10 provided in the embodiments of the present application, the internal memory 121 may be used to store instructions, and the processor 110 may be configured to invoke the instructions in the internal memory 121, so that the electronic device 10 performs the related method steps to implement the lock-holding process detection method in the embodiments described above.
The embodiment of the present application further provides a computer storage medium, where computer instructions are stored, and when the computer instructions are executed on the electronic device 10, the electronic device 10 is caused to execute the related method steps to implement the lock-holding process detection method in the foregoing embodiment.
The embodiment of the application also provides a computer program product, which when running on the electronic device, causes the electronic device to execute the related steps so as to realize the lock holding process detection method in the embodiment.
In addition, the embodiment of the application also provides a device, which can be a chip, a component or a module, and the device can comprise a processor and a memory which are connected; the memory is used for storing computer executing instructions, and when the device runs, the processor can execute the computer executing instructions stored in the memory, so that the chip executes the lock-holding process detection method in each method embodiment.
The computer storage medium, the computer program product, or the chip provided in the embodiments of the present application are used to perform the corresponding methods provided above, and therefore, the beneficial effects achieved by the computer storage medium, the computer program product, or the chip can refer to the beneficial effects in the corresponding methods provided above, and are not described herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are illustrative, and the module or unit is divided into a logic function, and there may be other division manners in actual implementation, for example, multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solutions may be embodied in the form of a software product stored in a storage medium, where the software product includes several instructions to cause a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the protection scope of the present application.

Claims (16)

1. The lock-holding process detection method is characterized by comprising the following steps:
creating a detection thread, and applying for a lock in a data structure by using the detection thread, wherein the data structure is positioned in a kernel;
and acquiring relevant information of a process holding the lock applied by the detection thread during the period that the detection thread waits for the lock applied to be used.
2. The lock-holding process detection method according to claim 1, wherein after the detection thread is created, the lock-holding process detection method further comprises:
the detection thread is run in response to the application not responding to the event.
3. The lock-holding process detection method according to claim 1, wherein applying for the lock in the data structure by the detection thread includes:
and responding to an application program non-response event, and applying for a lock in a data structure by utilizing the detection thread.
4. The lock-holding process detection method according to claim 1, wherein applying for the lock in the data structure by the detection thread includes:
Acquiring a state of each lock in the data structure based on the detection thread;
and if the state of the first lock in the data structure is the occupied state, applying for the first lock in the data structure by using the detection thread.
5. A lock-holding process detection method according to any one of claims 1 to 3, wherein the information about the process includes stack information holding the lock in the process.
6. A lock-holding process detection method according to any one of claims 1 to 3, wherein said obtaining information about a process holding a lock applied by said detection thread comprises:
starting a timer, and storing relevant information of a process holding the lock applied by the detection thread into a kernel log based on the timer.
7. The lock-holding process detection method according to claim 6, wherein the storing, based on the timer, the information about the process holding the lock applied by the detection thread in the kernel log includes:
acquiring a pointer of a process holding a lock applied by the detection thread by using the detection thread, and transmitting the pointer to the timer;
and running a printing function by using the timer, wherein the printing function is used for storing relevant information of a process based on a pointer of the process holding the lock applied by the detection thread into the kernel log.
8. The lock-holding process detection method according to claim 6 or 7, characterized in that the lock-holding process detection method further comprises:
and deleting the timer if the detection thread applies to the lock.
9. The lock-holding process detection method according to claim 6 or 7, characterized in that the lock-holding process detection method further comprises:
and if the detection thread applies for the lock, the detection thread releases the lock.
10. A lock-holding process detection method according to any one of claims 1 to 9, wherein the data structure comprises a global linked list or a global array of the cores.
11. The lock-holding process detection method according to claim 1, wherein the lock-holding process detection method further comprises:
responsive to an application non-response event, obtaining a duration of the application non-response event;
and if the duration of the non-response event of the application program exceeds the preset time, and the process associated with the non-response event of the application program applies for the lock, closing the process holding the lock.
12. The lock-holding process detection method according to claim 1, wherein the lock-holding process detection method further comprises:
Responsive to an application non-response event, obtaining a duration of the application non-response event;
and if the duration of the non-response event of the application program exceeds the preset time, and the process associated with the non-response event of the application program applies for the lock, closing the process applying for the lock.
13. The lock-holding process detection method according to any one of claims 1 to 12, wherein the kernel is any one of a Linux kernel, a An Zhuona kernel, an iOS kernel, a Windows kernel, and a hong Mongolian kernel.
14. A computer readable storage medium comprising computer instructions which, when run on a processor, cause an electronic device to perform the lock-holding process detection method of any one of claims 1 to 13.
15. An electronic device comprising a processor and a memory, the memory for storing instructions, the processor for invoking the instructions in the memory to cause the electronic device to perform the lock-holding process detection method of any one of claims 1-13.
16. A computer program product comprising computer instructions which, when run on a processor, cause an electronic device to perform the lock-holding process detection method of any one of claims 1 to 13.
CN202211059212.8A 2022-08-31 2022-08-31 Lock-holding process detection method and related equipment Pending CN117667430A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211059212.8A CN117667430A (en) 2022-08-31 2022-08-31 Lock-holding process detection method and related equipment
PCT/CN2023/112510 WO2024046089A1 (en) 2022-08-31 2023-08-11 Lock-holding process detection method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211059212.8A CN117667430A (en) 2022-08-31 2022-08-31 Lock-holding process detection method and related equipment

Publications (1)

Publication Number Publication Date
CN117667430A true CN117667430A (en) 2024-03-08

Family

ID=90064945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211059212.8A Pending CN117667430A (en) 2022-08-31 2022-08-31 Lock-holding process detection method and related equipment

Country Status (2)

Country Link
CN (1) CN117667430A (en)
WO (1) WO2024046089A1 (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576830B (en) * 2009-06-04 2011-11-30 中兴通讯股份有限公司 Deadlock detection method and device of database transaction lock mechanism
CN107247630A (en) * 2017-06-05 2017-10-13 努比亚技术有限公司 Thread detection method, terminal and computer-readable recording medium
CN111045926B (en) * 2019-11-05 2023-04-14 北京字节跳动网络技术有限公司 Application program jamming detection method, device, medium and electronic equipment
CN112099960A (en) * 2020-09-21 2020-12-18 天津神舟通用数据技术有限公司 Distributed deadlock detection method based on path propulsion
CN114625545A (en) * 2020-12-10 2022-06-14 华为技术有限公司 Process lock holding detection method, electronic device and readable medium thereof
CN112579307A (en) * 2020-12-10 2021-03-30 腾讯科技(深圳)有限公司 Physical lock resource allocation detection method and device and electronic equipment
CN113778696A (en) * 2021-08-19 2021-12-10 北京小米移动软件有限公司 Thread control method, thread control device, and storage medium
CN114064300A (en) * 2021-11-01 2022-02-18 上海浦东发展银行股份有限公司 Thread deadlock detection method, device, equipment, medium and computer program product

Also Published As

Publication number Publication date
WO2024046089A1 (en) 2024-03-07

Similar Documents

Publication Publication Date Title
US11922100B2 (en) System and method for energy usage accounting in software applications
CN108572818B (en) User interface rendering method and device
CN104205109B (en) The worker process of continuation and elasticity
US10546126B2 (en) Method for detecting the tampering of application code and electronic device supporting the same
EP4095723B1 (en) Permission reuse method, permission reuse-based resource access method, and related device
WO2023065916A1 (en) Notification processing method, chip, electronic device, and computer readable storage medium
CN114625545A (en) Process lock holding detection method, electronic device and readable medium thereof
WO2019128588A1 (en) Process processing method and apparatus, electronic device, computer readable storage medium
WO2022247301A1 (en) Testing method, graphical interface and related apparatus
WO2021027772A1 (en) Method for switching running of application and device
CN116257262A (en) Kernel upgrading method, chip, electronic device and computer readable storage medium
Sharma et al. Advance woman security system based on android
CN116339818B (en) Code change type screening method, electronic device and readable storage medium
CN114816031B (en) Power saving method for terminal equipment, terminal equipment and medium
CN117667430A (en) Lock-holding process detection method and related equipment
CN116136826A (en) Memory access method, chip, electronic device and computer readable storage medium
CN117131497B (en) Software detection method and electronic equipment
CN116701320B (en) Log generation method and related device
CN116700813B (en) Method for loading widget, electronic device and readable storage medium
CN117827228A (en) Quick application deployment method and related equipment
WO2020147859A1 (en) Decentralized fat lock deflation
CN117909287A (en) Snapshot method, electronic device, computer program product, and readable storage medium
CN116795557A (en) Communication method, electronic device, and readable storage medium
CN118113289A (en) Code compiling method, code running method and related equipment
CN116701101A (en) Abnormality detection method of SensorHUB and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination