Tag

Deadlock

0 views collected around this technical thread.

Deepin Linux
Deepin Linux
May 20, 2025 · Fundamentals

Understanding and Preventing Deadlocks in C++ Multithreaded Programming

This article explains what deadlocks are in C++ multithreaded programming, outlines their causes and four necessary conditions, presents common scenarios and code examples, and offers practical strategies such as consistent lock ordering, std::lock, std::scoped_lock, recursive mutexes, and lock hierarchies to avoid them.

C++DeadlockLock
0 likes · 20 min read
Understanding and Preventing Deadlocks in C++ Multithreaded Programming
Code Ape Tech Column
Code Ape Tech Column
May 14, 2025 · Databases

Designing Short Numeric ID Generation with MySQL: From Snowflake to Segment Allocation

This article explores the evolution from using the Snowflake algorithm to a MySQL‑based short numeric ID generation scheme, detailing challenges such as long IDs, deadlocks with REPLACE INTO, and presenting a segment‑based solution that allocates ID blocks, tracks unused IDs, and avoids concurrency issues.

DeadlockID generationMySQL
0 likes · 11 min read
Designing Short Numeric ID Generation with MySQL: From Snowflake to Segment Allocation
Deepin Linux
Deepin Linux
May 3, 2025 · Backend Development

Analyzing and Resolving Uninterruptible Thread States During System Suspend

This article examines why a thread may remain in an uninterruptible wake‑up state during system suspend, explains deadlock fundamentals, outlines thread lifecycle states, and provides practical debugging steps and mitigation strategies using Java concurrency tools and system monitoring.

DeadlockJavaThread
0 likes · 23 min read
Analyzing and Resolving Uninterruptible Thread States During System Suspend
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 2, 2025 · Databases

Demonstrating MySQL Deadlock with a Practical Example

This article explains MySQL deadlocks by creating a test table, running two concurrent transactions—one using SLEEP to hold a lock and another attempting the same resource—to reproduce a deadlock error, and discusses how this approach aids debugging and understanding of transaction conflicts.

DatabaseDeadlockMySQL
0 likes · 4 min read
Demonstrating MySQL Deadlock with a Practical Example
Zhuanzhuan Tech
Zhuanzhuan Tech
Apr 23, 2025 · Databases

Quick 3‑Step Guide to Locate and Analyze MySQL InnoDB Deadlocks

This article explains how to find the MySQL deadlock log, parse its contents to determine the time, order, and affected rows, identify the lock types and root cause, and provides extended examples of special locking scenarios, all illustrated with real‑world SQL and code snippets.

DatabaseDeadlockInnoDB
0 likes · 15 min read
Quick 3‑Step Guide to Locate and Analyze MySQL InnoDB Deadlocks
IT Xianyu
IT Xianyu
Apr 3, 2025 · Databases

Understanding Transactions and Locks in MySQL: Concepts, Isolation Levels, and Practical Examples

This article explains how MySQL transactions and locking mechanisms ensure data consistency and handle high concurrency, covering basic transaction commands, isolation levels, practical lock implementations, deadlock simulation, and best‑practice recommendations for avoiding common concurrency problems.

DeadlockIsolation LevelsLocks
0 likes · 7 min read
Understanding Transactions and Locks in MySQL: Concepts, Isolation Levels, and Practical Examples
Code Mala Tang
Code Mala Tang
Feb 20, 2025 · Fundamentals

Mastering Lock Mechanisms: From Mutexes to Distributed Locks in Python

This comprehensive guide explores why locks are essential in concurrent programming, explains the principles behind mutexes, semaphores, read‑write locks, and re‑entrant locks, provides Python code examples, discusses common pitfalls like deadlocks, and offers best‑practice strategies for production environments.

DeadlockMultiprocessingPython
0 likes · 22 min read
Mastering Lock Mechanisms: From Mutexes to Distributed Locks in Python
FunTester
FunTester
Feb 18, 2025 · Fundamentals

Understanding Mutex Locks and Their Use in Go Concurrency

This article explains what a mutex is, why it is needed in concurrent programming, shows basic lock/unlock operations with Go code examples, compares mutexes with atomic operations, and provides best‑practice guidelines to avoid deadlocks and improve performance.

DeadlockGoSynchronization
0 likes · 8 min read
Understanding Mutex Locks and Their Use in Go Concurrency
IT Services Circle
IT Services Circle
Feb 13, 2025 · Databases

Resolving ORA-000060 Deadlock in Oracle Batch Updates with MyBatis

The article describes a production deadlock (ORA-000060) caused by unsorted, duplicate user_id rows in a file processed in parallel batch updates, shows MyBatis XML code, illustrates conflicting thread execution, and provides practical solutions such as sorting the input and deduplicating records.

Batch UpdateDatabaseDeadlock
0 likes · 4 min read
Resolving ORA-000060 Deadlock in Oracle Batch Updates with MyBatis
Architecture & Thinking
Architecture & Thinking
Jan 28, 2025 · Fundamentals

Understanding Java Deadlocks: Causes, Examples, and Prevention Strategies

This article explains the concept of deadlocks in concurrent programming, outlines the four necessary conditions, examines common causes in Java, provides a runnable code example, and presents practical prevention, avoidance, detection, and recovery techniques to keep multithreaded applications running smoothly.

DeadlockJavaSynchronization
0 likes · 7 min read
Understanding Java Deadlocks: Causes, Examples, and Prevention Strategies
Sohu Tech Products
Sohu Tech Products
Jan 8, 2025 · Databases

Analysis of MySQL Deadlock Issues in Multi-threaded Scenarios

The article investigates a MySQL deadlock that arises when multiple threads concurrently execute INSERT … ON DUPLICATE KEY UPDATE for logistics cancellations, reproduces the issue on MySQL 5.7 and 8.0, analyzes InnoDB lock handling and internal mini‑transactions, and explains how batch processing of each value leads to the deadlock.

DatabaseDeadlockLocking Mechanism
0 likes · 18 min read
Analysis of MySQL Deadlock Issues in Multi-threaded Scenarios
Zhuanzhuan Tech
Zhuanzhuan Tech
Dec 26, 2024 · Backend Development

Analyzing MySQL 8.0 INSERT … ON DUPLICATE KEY UPDATE Deadlock and Source‑Code Investigation

This article investigates a deadlock that occurs when using INSERT … ON DUPLICATE KEY UPDATE in a multi‑threaded MySQL 8.0 environment, reproduces the issue, examines InnoDB lock logs, walks through the relevant source‑code call chain, and demonstrates how gap locks cause the deadlock.

DeadlockGap LockINSERT
0 likes · 22 min read
Analyzing MySQL 8.0 INSERT … ON DUPLICATE KEY UPDATE Deadlock and Source‑Code Investigation
DeWu Technology
DeWu Technology
Dec 9, 2024 · Fundamentals

Deadlock Caused by Do-While Loop in Plugin

A mobile app deadlock was traced to a do‑while loop introduced by a weaver plugin that concurrently copied method nodes, causing ASM label‑node mismatches; adding thread synchronization to the method‑cloning process resolved the issue and underscores the concurrency risks of bytecode instrumentation.

BytecodeDeadlockPlugin
0 likes · 10 min read
Deadlock Caused by Do-While Loop in Plugin
Aikesheng Open Source Community
Aikesheng Open Source Community
Oct 30, 2024 · Databases

MySQL InnoDB Deadlock Analysis: Locking Behavior and Resolution

This article reproduces a MySQL 8.0.32 InnoDB deadlock using two concurrent DELETE statements on the same secondary index, explains the lock types and lock‑wait graph, and details why the deadlock occurs and how it is resolved.

DatabaseDeadlockInnoDB
0 likes · 12 min read
MySQL InnoDB Deadlock Analysis: Locking Behavior and Resolution
Test Development Learning Exchange
Test Development Learning Exchange
Oct 23, 2024 · Fundamentals

Understanding Race Conditions, Deadlocks, Resource Contention, and Data Consistency in Multithreaded Python

This article explains common multithreading problems such as race conditions, deadlocks, resource contention, and data consistency issues, and provides Python code examples that demonstrate synchronization techniques, lock ordering, connection pooling, thread pools, and transaction management to ensure correct and stable concurrent execution.

DeadlockPythonconcurrency
0 likes · 10 min read
Understanding Race Conditions, Deadlocks, Resource Contention, and Data Consistency in Multithreaded Python
Zhuanzhuan Tech
Zhuanzhuan Tech
Aug 27, 2024 · Databases

MySQL InnoDB Deadlock Analysis and Resolution Guide

This article presents a detailed walkthrough of a MySQL InnoDB deadlock case, covering background, log inspection, data preparation, reproduction steps, lock analysis, root‑cause explanation, and practical solutions to prevent and resolve similar deadlock issues.

DatabaseDeadlockInnoDB
0 likes · 14 min read
MySQL InnoDB Deadlock Analysis and Resolution Guide
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 21, 2024 · Databases

Analyzing MySQL InnoDB Deadlock Logs: A Detailed Walkthrough

This article provides a step‑by‑step analysis of MySQL 8.0.32 InnoDB deadlock logs, covering preparation, log extraction, auxiliary information, transaction details, row‑lock structures, and the final summary, with full SQL examples and code snippets for deep understanding.

DatabaseDeadlockInnoDB
0 likes · 16 min read
Analyzing MySQL InnoDB Deadlock Logs: A Detailed Walkthrough
Aikesheng Open Source Community
Aikesheng Open Source Community
Jul 31, 2024 · Databases

InnoDB Deadlock Resolution: Selecting Victim Transaction, Updating Weights, Logging, and Wakeup

This article explains how InnoDB resolves a deadlock by ordering the involved transactions, selecting a victim based on priority, rollback cost and table modifications, updating transaction weights, optionally logging the deadlock details, and finally waking the victim transaction to roll back.

DatabaseDeadlockInnoDB
0 likes · 13 min read
InnoDB Deadlock Resolution: Selecting Victim Transaction, Updating Weights, Logging, and Wakeup
Sanyou's Java Diary
Sanyou's Java Diary
Jul 22, 2024 · Backend Development

Why Does My ThreadPool Freeze? Uncovering the Hidden Deadlock Pitfall

This article explains a subtle thread‑pool deadlock caused by parent‑child task interactions, demonstrates the issue with a reproducible demo, analyzes why the latch logic fails, and provides a practical solution of isolating thread pools to avoid false‑deadlock behavior in microservices.

CountDownLatchDeadlockJava
0 likes · 11 min read
Why Does My ThreadPool Freeze? Uncovering the Hidden Deadlock Pitfall
Aikesheng Open Source Community
Aikesheng Open Source Community
Jul 17, 2024 · Databases

Understanding InnoDB Deadlock Detection Thread and Lock‑Wait Snapshot Construction

This article explains how InnoDB simulates deadlocks, how the ib_srv_lock_to background thread checks for deadlocks, how it builds lock‑wait snapshots, constructs lock‑wait graphs, calculates transaction weights, and finally resolves deadlocks, illustrated with detailed SQL examples and code snippets.

Database InternalsDeadlockInnoDB
0 likes · 14 min read
Understanding InnoDB Deadlock Detection Thread and Lock‑Wait Snapshot Construction