Euler angles (roll angle, pitch angle, yaw angle), rotation matrix, quaternion conversion and solution to universal joint deadlock

1. Overview The description method of the pose (position and direction) of an object is generally represented by two coordinate systems. One is the world coordinate system or the ground coordinate system. Here I call it the ground coordinate system, which belongs to the reference coordinate system; the other is its own Coordinate system, it […]

Practical analysis of dump and strace commands causing watchdog problems caused by keystore deadlock

1. Problem description Recently, a system stuck problem occurred. It is speculated that a watchdog appears in system_server. Looking at the watchdog file, it is PackageManager stuck in the KeyStore.clearUid() interface: —– pid 1091 at 2023-10-26 09:40:10 —– Cmd line: system_server ABI: ‘arm64’ “PackageManager” sysTid=1352 #00 pc 000000000006e1c4 /system/lib64/libc.so (__ioctl + 4) #01 pc 00000000000290d0 […]

DEADLOCK in MYSQL batch insert concurrent scenario

1. Background On the morning of 2023-10-12 (Thursday), Yamei in the group reported that a user-generated label reported a deadlock exception. 2. Check exception logs Find the error log reported at that time The specific exception information is as follows server-provider-info-2023-10-12.0.log:2023-10-12 09:40:50.593 [TID:bf623bded189486cbb0b6a64d81b64b4.357.16970748504097047] [4ed7b7943a8a47de912e4b644d70285e] [SimpleAsyncTaskExecutor-5080] INFO com. emax.user.user.provider.UserTagAPIImpl:? – Signing completed, user tag information updated […]

[C++ Concurrent Programming Practice] Mutual Exclusion and Deadlock

std::mutex It is generally not recommended to use std::mutex directly like the following. You need to manually lock and unlock it yourself. void use_lock() {<!– –> while(true) {<!– –> mtx.lock(); shared_data + + ; std::cout << “shared_data = ” << shared_data << std::endl; std::cout << “current thread is ” << std::this_thread::get_id() << std::endl; mtx.unlock(); std::this_thread::sleep_for(std::chrono::microseconds(10)); […]

Operating System Experiment 11: Simulation Implementation of Deadlock Detection Algorithm

Article directory 1. Experimental purpose 2. Experiment content 3. Experimental requirements 4. Experimental ideas 5. Deadlock detection algorithm simulation implementation program implementation 5.1. Introduction to relevant environments 5.2.Test 6. Experiment summary 6.1. Completion of experimental requirements 6.2. Technical difficulties and solutions 6.3. Experimental thoughts and experience summary 6.4. Reference links 7. Code Appendix 1. Experiment […]

C++(Qt) software debugging—thread deadlock debugging (15)

C++ (Qt) Software Debugging-Thread Deadlock Debugging (15) Article directory C++ (Qt) software debugging — thread deadlock debugging (15) 1 Introduction 2. Common deadlocks 3. Debugging C++ deadlock with gdb under Linux 1.1 Using code 1.2 gdb debugging 3. Debugging Qt deadlock with gdb under Linux 1.1 Using code 1.2 gdb debugging 4. Gdb debugging C++ […]

Java8 parallerStream causes Spring project startup thread to block (deadlock)

Directory 1. Problems encountered 2. Root cause of the problem 3. Problem recurrence 3.1. New project 3.2. Start the project 4. Problem solving 5. Pay attention 1. Problems encountered When starting the SpringBoot project, the service startup process is directly stuck, with no exceptions and no prompts. 2. Root cause of the problem When registering […]

Thread safety and deadlock

What is thread safety In high-concurrency scenarios, the execution results of threads are certain and meet expectations; conversely, thread insecurity may lead to inconsistent results. What is a thread-safe class When multiple threads access a class, the class behaves correctly regardless of the scheduling method used by the runtime environment or how the threads will […]

Deadlock causes and implementation of deadlock detection components

1 Conditions for deadlock formation Deadlock refers to a deadlock caused by multiple threads or processes competing for limited system resources during operation. When processes or threads are in this deadlock, they will be unable to move forward without external force. As shown in the figure below, thread A wants to obtain the thread Process […]