Tagged articles

Deadlock

232 articles · Page 1 of 3
Raymond Ops
Raymond Ops
Aug 17, 2026 · Databases

How to Diagnose and Fix MySQL Deadlocks Without Just Restarting the Service

This article explains why MySQL deadlocks occur in production, distinguishes them from simple lock waits, and provides a step‑by‑step guide—including enabling deadlock logging, analyzing InnoDB lock types, and applying four practical solutions such as distributed locks, unique constraints, isolation‑level changes, and SQL reordering—to reliably troubleshoot and prevent deadlocks.

DeadlockInnoDBMySQL
0 likes · 31 min read
How to Diagnose and Fix MySQL Deadlocks Without Just Restarting the Service
Golang Shines
Golang Shines
Aug 10, 2026 · Backend Development

Understanding Go Goroutine and Channel: Usage, Pitfalls, and Deadlock Diagnosis

The article explains Go's native concurrency with lightweight goroutines and channel communication, outlines common deadlock errors, details unbuffered and buffered channel behavior, proper close rules, select usage, and presents graceful shutdown techniques using channels, context, and sync.WaitGroup, plus practical code examples.

DeadlockGochannel
0 likes · 20 min read
Understanding Go Goroutine and Channel: Usage, Pitfalls, and Deadlock Diagnosis
IT Learning Made Simple
IT Learning Made Simple
Aug 9, 2026 · Fundamentals

Deadlock Illustrated: Two Programmers Stuck Over a Meeting Room

The article explains deadlock by describing two programmers who each hold a meeting room and wait for the other, defines deadlock and its four necessary conditions, provides real‑world analogies, shows a Python threading example that deadlocks, and outlines prevention, avoidance, detection, and best‑practice strategies.

DeadlockOperating SystemsPython
0 likes · 8 min read
Deadlock Illustrated: Two Programmers Stuck Over a Meeting Room
IT Learning Made Simple
IT Learning Made Simple
Aug 8, 2026 · Fundamentals

Processes and Threads: The Boss with N Clones

The article explains processes as independent execution units and threads as lightweight CPU‑scheduled workers, using a boss‑and‑employees metaphor, code samples in Python and Java, practical scenarios, common pitfalls like race conditions and deadlocks, and guidance on when to choose multiprocessing versus multithreading.

Deadlockconcurrencymultiprocessing
0 likes · 9 min read
Processes and Threads: The Boss with N Clones
Raymond Ops
Raymond Ops
Aug 6, 2026 · Databases

Diagnosing and Eliminating MySQL Deadlocks in Production

This article explains how MySQL deadlocks arise, details the four necessary conditions, compares lock types, shows how to enable detailed deadlock logging, query lock metadata, interpret logs, and provides practical code‑level and configuration strategies to prevent and resolve common deadlock scenarios in production environments.

DeadlockInnoDBMySQL
0 likes · 20 min read
Diagnosing and Eliminating MySQL Deadlocks in Production
Data Party THU
Data Party THU
Aug 4, 2026 · Operations

Why Multi-Agent Systems Are Fundamentally Distributed Systems

The article argues that multi‑agent workflows behave like traditional distributed systems, showing how deadlocks, state pollution, and silent drift arise from coordination failures rather than AI shortcomings, and it offers concrete engineering practices—timeouts, idempotency, cycle detection, and audit trails—to build reliable production‑grade agent pipelines.

DeadlockOperationsOrchestration
0 likes · 14 min read
Why Multi-Agent Systems Are Fundamentally Distributed Systems
liandk
liandk
Aug 2, 2026 · Databases

Why Transaction Timeouts and Deadlocks Occur: Master MySQL Row, Table, Gap Locks

This article breaks down MySQL’s locking mechanisms—table, row, and gap locks—explaining their principles, performance trade‑offs, when they are triggered, how they relate to index usage, and provides practical deadlock avoidance techniques and a concise cheat‑sheet for common concurrency problems.

DeadlockGap LockLocks
0 likes · 7 min read
Why Transaction Timeouts and Deadlocks Occur: Master MySQL Row, Table, Gap Locks
YiSu Grain
YiSu Grain
Jul 30, 2026 · Fundamentals

Day44: Master OS Fundamentals—Processes, Threads, PV, Deadlock, Memory & I/O

This tutorial walks through core operating‑system concepts—including resource management, user vs. kernel mode, processes and threads, state transitions, synchronization, PV (producer‑consumer) semantics, deadlock conditions and prevention, paging address translation, virtual memory, page‑replacement algorithms, file‑system allocation, and I/O models such as blocking, non‑blocking, multiplexing, and asynchronous I/O—using a regional medical imaging platform as a running example.

Deadlockio-modeloperating-system
0 likes · 44 min read
Day44: Master OS Fundamentals—Processes, Threads, PV, Deadlock, Memory & I/O
Top Architect
Top Architect
Jul 20, 2026 · Databases

Why You Should Stop Using Snowflake for IDs and Try a Shorter MySQL Auto‑Increment Solution

The article examines the drawbacks of using Snowflake for generating short numeric user IDs, details a MySQL auto‑increment based approach, reveals deadlock problems with REPLACE INTO, evaluates alternative schemes, and presents a final sharding‑friendly short‑ID design that meets performance and usability requirements.

DeadlockMySQLSharding
0 likes · 14 min read
Why You Should Stop Using Snowflake for IDs and Try a Shorter MySQL Auto‑Increment Solution
Coder Trainee
Coder Trainee
Jul 12, 2026 · Backend Development

10 Must‑Know Java Concurrency Interview Questions

This article walks through ten essential Java concurrency interview topics—including the Java Memory Model, volatile semantics, synchronized lock upgrades, CAS pitfalls, AQS internals, ReentrantLock versus synchronized, ThreadPoolExecutor parameters, ThreadLocal memory‑leak issues, CountDownLatch vs CyclicBarrier, and deadlock conditions—providing code snippets, tables and detailed explanations to help candidates answer interview questions confidently.

AQSCASDeadlock
0 likes · 12 min read
10 Must‑Know Java Concurrency Interview Questions
Tinker Programmer
Tinker Programmer
Jul 10, 2026 · Backend Development

Go Concurrency Interview: Alternating Print with Dual‑Channel Relay Technique

This article dissects the classic Go interview problem of printing numbers and letters alternately (1a2b…26z), explains why sleep‑based solutions fail, details deadlock and token‑count pitfalls, and presents a robust dual‑channel token relay implementation with step‑by‑step code and three key takeaways.

ChannelsDeadlockgoroutine
0 likes · 9 min read
Go Concurrency Interview: Alternating Print with Dual‑Channel Relay Technique
Coder Trainee
Coder Trainee
Jul 9, 2026 · Backend Development

Java Concurrency Deep Dive – Part 8: Real‑World Pitfalls and Post‑mortem

This article reviews common Java concurrency pitfalls—including deadlocks, ThreadLocal memory leaks, Integer‑cache loops, unbounded thread‑pool queues, and swallowed exceptions—illustrates each with code samples, analyzes real production incidents, and provides a concise checklist and tool‑selection guide for safe concurrent programming.

ConcurrentHashMapDeadlockThreadLocal
0 likes · 9 min read
Java Concurrency Deep Dive – Part 8: Real‑World Pitfalls and Post‑mortem
Tinker Programmer
Tinker Programmer
Jul 9, 2026 · Backend Development

What Does This Go Channel Code Actually Print? A Step‑by‑Step Interview Guide

The article explains how to reliably predict the output of Go channel interview questions by drawing execution timelines, distinguishing synchronization points from print order, handling buffered vs unbuffered channels, and spotting deadlocks, providing four concrete heuristics backed by code examples and runtime observations.

DeadlockGoInterview
0 likes · 12 min read
What Does This Go Channel Code Actually Print? A Step‑by‑Step Interview Guide
Architect Chen
Architect Chen
Jun 12, 2026 · Databases

How to Prevent MySQL Deadlocks in High‑Concurrency Apps: 5 Proven Solutions

The article defines MySQL deadlocks, illustrates how circular lock waits between transactions cause them, and presents five practical mitigation techniques—consistent lock ordering, shortening transactions, optimizing indexes, breaking large SQL statements into smaller batches, and implementing application‑level retry logic—to reduce deadlock occurrences in high‑concurrency environments.

DeadlockMySQLTransaction
0 likes · 5 min read
How to Prevent MySQL Deadlocks in High‑Concurrency Apps: 5 Proven Solutions
Cloud Architecture
Cloud Architecture
Jun 11, 2026 · Databases

MySQL Deadlock Elimination: 9 Golden Rules and Production‑Ready Defense

Deadlocks in MySQL are not random glitches but the inevitable result of uncontrolled concurrency, lock granularity, transaction boundaries, and resource ordering; this article explains the underlying lock mechanisms, common deadlock scenarios, and presents nine practical, production‑grade rules for architecture design, lock management, and observability to keep deadlocks within acceptable SLA limits.

DeadlockInnoDBMySQL
0 likes · 31 min read
MySQL Deadlock Elimination: 9 Golden Rules and Production‑Ready Defense
Architect Chen
Architect Chen
Jun 11, 2026 · Fundamentals

Understanding Java Thread Deadlocks: 5 Common Scenarios and How to Fix Them

The article defines Java thread deadlock, illustrates five typical deadlock patterns with diagrams, shows how they cause threads to wait indefinitely, and presents five practical solutions—including consistent lock ordering, reducing nested locks, shrinking lock scope, using timed locks, and adopting lock‑free designs.

DeadlockLockconcurrency
0 likes · 3 min read
Understanding Java Thread Deadlocks: 5 Common Scenarios and How to Fix Them
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 12, 2026 · Backend Development

Reproducing Three Classic Spring Boot Concurrency Deadlocks in Just 10 Lines

The article explains three typical deadlock scenarios in Spring Boot 3.5—circular‑wait, connection‑pool starvation, and implicit DML deadlocks—shows minimal 10‑line code reproductions, demonstrates the resulting errors, and provides concrete fixes such as ordered locking, removing REQUIRES_NEW propagation, and using asynchronous events.

DeadlockSpring BootTransactional
0 likes · 9 min read
Reproducing Three Classic Spring Boot Concurrency Deadlocks in Just 10 Lines
Deepin Linux
Deepin Linux
May 10, 2026 · Fundamentals

Do You Really Understand pthread Internals? Master Linux Multithreading Basics

This article dives deep into Linux pthread fundamentals, covering process‑vs‑thread concepts, the POSIX API, kernel implementation via the clone syscall, thread lifecycle, synchronization primitives, common pitfalls such as deadlocks, stack overflows and thread leaks, and provides practical debugging and mitigation techniques with real code examples.

DeadlockLinuxThread Synchronization
0 likes · 55 min read
Do You Really Understand pthread Internals? Master Linux Multithreading Basics
Deepin Linux
Deepin Linux
Apr 29, 2026 · Fundamentals

Master Linux Kernel Deadlock Detection to Truly Understand Synchronization

This article explains the four necessary conditions for Linux deadlocks, demonstrates each with concrete pthread examples, reviews kernel lock types, introduces detection tools such as Lockdep, gdb, pstack and ftrace, and walks through a real‑world cluster case study with step‑by‑step analysis and remediation.

DeadlockDebuggingLinux
0 likes · 38 min read
Master Linux Kernel Deadlock Detection to Truly Understand Synchronization
MaGe Linux Operations
MaGe Linux Operations
Apr 27, 2026 · Databases

Production MySQL Deadlocks: Diagnosis Strategies and Permanent Fixes

The article explains how MySQL InnoDB deadlocks occur, details the four necessary conditions, shows how to enable full deadlock logging, demonstrates queries against information_schema and performance_schema, and provides concrete scenarios with code‑level solutions to prevent and resolve deadlocks in production environments.

DeadlockInnoDBMySQL
0 likes · 22 min read
Production MySQL Deadlocks: Diagnosis Strategies and Permanent Fixes
Deepin Linux
Deepin Linux
Apr 25, 2026 · Fundamentals

Mastering Mutex Locks: Solving Linux Kernel Synchronization Challenges in One Article

This article provides a comprehensive deep‑dive into Linux kernel mutex locks, explaining their principles, implementation, and APIs, and demonstrates through detailed C/C++ examples how to use them safely to avoid data races, deadlocks, and performance bottlenecks in multithreaded kernel and user‑space code.

DeadlockLinux kernelmultithreading
0 likes · 46 min read
Mastering Mutex Locks: Solving Linux Kernel Synchronization Challenges in One Article
LuTiao Programming
LuTiao Programming
Apr 18, 2026 · Backend Development

Beyond @Transactional: Build a Java Ticket System, Master Deadlocks & Isolation Levels

The article shows why a simple @Transactional approach fails under 300,000 concurrent users, explains MVCC behavior, demonstrates how to use row‑level pessimistic locks, sorting, FOR NO KEY UPDATE, short transactions, optimistic locking, and proper isolation levels, and outlines a production‑ready architecture with read/write splitting, Redis rate limiting and connection‑pool tuning.

DeadlockIsolation LevelSpring Boot
0 likes · 10 min read
Beyond @Transactional: Build a Java Ticket System, Master Deadlocks & Isolation Levels
Architecture & Thinking
Architecture & Thinking
Apr 16, 2026 · Databases

Mastering Database Performance: From Slow Queries to Deadlock Resolution

This guide presents a systematic, end-to-end diagnostic workflow for high-concurrency database environments, covering slow-SQL detection, execution-plan analysis, lock-conflict monitoring, deadlock investigation, and practical optimization techniques, illustrated with real-world cases, commands, and tool integrations to swiftly resolve performance bottlenecks.

Database DiagnosticsDeadlockLock Monitoring
0 likes · 18 min read
Mastering Database Performance: From Slow Queries to Deadlock Resolution
MaGe Linux Operations
MaGe Linux Operations
Apr 1, 2026 · Databases

Master PostgreSQL 17 Locks: From Fundamentals to Advanced Monitoring & Optimization

This comprehensive guide explores PostgreSQL 17's lock mechanisms, covering lock classifications, table‑ and row‑level lock behavior, MVCC interaction, common pitfalls such as deadlocks and lock contention, and provides practical SQL queries, Bash monitoring scripts, advisory‑lock techniques, and best‑practice recommendations for performance tuning and reliable production deployment.

AdvisoryLocksDeadlockLocks
0 likes · 36 min read
Master PostgreSQL 17 Locks: From Fundamentals to Advanced Monitoring & Optimization
Tech Musings
Tech Musings
Mar 27, 2026 · Backend Development

Why Go’s database/sql Deadlock Needed a New closingMutex and How It Works

Go’s database/sql package can deadlock when a Scan holds a read lock, a cancelled context triggers Close, and Columns attempts another read lock, but the new closingMutex introduced in Go’s source replaces the generic sync.RWMutex to allow reads during pending writes, preventing the deadlock.

DeadlockGoclosingMutex
0 likes · 16 min read
Why Go’s database/sql Deadlock Needed a New closingMutex and How It Works
dbaplus Community
dbaplus Community
Feb 27, 2026 · Databases

Understanding MySQL Locks: From Global to Row‑Level and Deadlock Prevention

The article explains why concurrent transactions cause data inconsistencies, describes MySQL’s lock hierarchy—including global, table, and row locks—covers AUTO_INCREMENT locking, illustrates lock compatibility tables, details common deadlock scenarios, and offers practical strategies such as fixed access order, optimistic locking, short transactions, proper indexing, and isolation‑level tuning to prevent deadlocks.

DeadlockInnoDBLocks
0 likes · 18 min read
Understanding MySQL Locks: From Global to Row‑Level and Deadlock Prevention
IT Learning Made Simple
IT Learning Made Simple
Feb 12, 2026 · Fundamentals

Why Computer Fundamentals Are the Director’s Core Skills for System Architects

This chapter uses vivid analogies and exam‑focused breakdowns to explain the Von Neumann architecture, CPU performance metrics, memory hierarchy, operating‑system concepts such as processes, threads, scheduling, memory management, virtual memory, file systems and deadlock, showing how mastering these basics gives architects a decisive edge in system‑design exams.

CPUDeadlockMemory Management
0 likes · 38 min read
Why Computer Fundamentals Are the Director’s Core Skills for System Architects
IT Services Circle
IT Services Circle
Dec 14, 2025 · Backend Development

What Lenovo Backend Interview Reveals: Salary Insights, Deadlock Basics, DNS, TLS Handshake, and Java ArrayList Deep Dive

This article shares Lenovo's 2026 graduate hiring salary breakdown, explains deadlock conditions and prevention, outlines DNS resolution steps, details the TLS handshake process, and provides an in‑depth guide to Java's ArrayList implementation, performance, and thread‑safety concerns.

DNSDeadlockTLS Handshake
0 likes · 18 min read
What Lenovo Backend Interview Reveals: Salary Insights, Deadlock Basics, DNS, TLS Handshake, and Java ArrayList Deep Dive
Sohu Tech Products
Sohu Tech Products
Nov 13, 2025 · Databases

Why MySQL Deadlocks Happen and How to Prevent Them

An in‑depth guide walks through MySQL InnoDB deadlock logs, explains two‑phase locking, reproduces the issue with step‑by‑step SQL commands, details lock types and compatibility, outlines common deadlock scenarios, and offers practical strategies and configuration tweaks to prevent and monitor deadlocks.

DeadlockInnoDBMySQL
0 likes · 21 min read
Why MySQL Deadlocks Happen and How to Prevent Them
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Oct 30, 2025 · Databases

Master MySQL Locks: From Basics to Advanced Optimizations

This article provides a comprehensive overview of MySQL's lock mechanisms, covering lock granularity, lock types, intention locks, record/gap/next‑key locks, their interaction with transaction isolation levels, two‑phase locking, deadlock handling, and practical optimization techniques for high‑concurrency applications.

DeadlockIsolation LevelsMySQL
0 likes · 20 min read
Master MySQL Locks: From Basics to Advanced Optimizations
Sanyou's Java Diary
Sanyou's Java Diary
Aug 25, 2025 · Databases

Understanding MySQL Next-Key Locks: Preventing Phantom Reads and Deadlocks

This article explains MySQL InnoDB's Next-Key Lock mechanism, how it combines row and gap locks to prevent phantom reads under the REPEATABLE READ isolation level, illustrates lock ranges with examples, discusses when it degrades to row or gap locks, and highlights its advantages and potential deadlock risks.

DeadlockInnoDBMySQL
0 likes · 8 min read
Understanding MySQL Next-Key Locks: Preventing Phantom Reads and Deadlocks
ITPUB
ITPUB
Aug 18, 2025 · Databases

Generating Ultra‑Short Numeric IDs in MySQL: From Snowflake to Custom Schemes

This article explores how to replace long Snowflake IDs with concise numeric account IDs by leveraging MySQL auto‑increment tables, addressing deadlock pitfalls of REPLACE INTO, and evaluating alternative batch‑allocation and sharding strategies before presenting a final free‑ID table design.

Database DesignDeadlockMySQL
0 likes · 15 min read
Generating Ultra‑Short Numeric IDs in MySQL: From Snowflake to Custom Schemes
Tech Freedom Circle
Tech Freedom Circle
Jul 15, 2025 · Databases

One‑Order Four‑Split: Solving MySQL Deadlocks in Million‑Row Imports

During massive daily imports of up to one million reconciliation records, MySQL deadlocks can cripple performance; this article dissects the four classic deadlock conditions, then presents a systematic “One‑Order Four‑Split” strategy—ordered writes, transaction splitting, index management, partitioning, and gap‑lock removal—backed by benchmarks, code samples, and configuration tweaks that cut lock rates by up to 90% and reduce batch times to under ten minutes.

Batch InsertDeadlockMySQL
0 likes · 27 min read
One‑Order Four‑Split: Solving MySQL Deadlocks in Million‑Row Imports
Su San Talks Tech
Su San Talks Tech
Jul 15, 2025 · Databases

Unlock MySQL Performance: 8 Lock Types, Deadlock Solutions, and Optimization Tips

This article explains MySQL's eight lock mechanisms, their purposes and classifications, demonstrates row‑level, gap, next‑key, table and metadata locks with code examples, discusses deadlock scenarios and detection, and provides practical monitoring and optimization strategies to improve concurrency and reliability.

DeadlockIsolation LevelsMySQL
0 likes · 10 min read
Unlock MySQL Performance: 8 Lock Types, Deadlock Solutions, and Optimization Tips
Tech Freedom Circle
Tech Freedom Circle
Jul 8, 2025 · Backend Development

How to Diagnose and Prevent Java Deadlocks (Alibaba & Other Big‑Company Interviews)

This article explains what a deadlock is, the four necessary conditions that cause it, demonstrates classic synchronized‑based and Lock‑based deadlock examples in Java, shows how to detect deadlocks with tools such as Arthas, jstack, jvisualvm and JMC, and provides practical strategies—including lock ordering, timeout locks, and two‑phase locking—to break each condition and avoid deadlocks in production code.

ArthasDeadlockLock
0 likes · 24 min read
How to Diagnose and Prevent Java Deadlocks (Alibaba & Other Big‑Company Interviews)
Deepin Linux
Deepin Linux
Jul 2, 2025 · Backend Development

How to Detect and Fix C++ Deadlocks on Linux Using Shell and GDB

This guide explains why deadlocks occur in Linux C++ multithreaded programs, demonstrates how to reproduce them with sample code, and shows step‑by‑step how to use shell commands and GDB to identify and resolve the deadlock, ensuring stable and efficient execution.

C++DeadlockDebugging
0 likes · 18 min read
How to Detect and Fix C++ Deadlocks on Linux Using Shell and GDB
dbaplus Community
dbaplus Community
May 25, 2025 · Databases

How to Generate Short, Sequential Numeric IDs Without Snowflake Overhead

To replace long UUIDs with short, sequential numeric account IDs, the article explores the limitations of Snowflake’s 64‑bit IDs, evaluates MySQL auto‑increment and REPLACE INTO approaches, identifies deadlock issues, and ultimately proposes a segmented free‑ID table with batch allocation to achieve compact, ordered IDs.

DeadlockMySQLauto_increment
0 likes · 14 min read
How to Generate Short, Sequential Numeric IDs Without Snowflake Overhead
Sohu Tech Products
Sohu Tech Products
May 21, 2025 · Databases

How to Quickly Diagnose MySQL InnoDB Deadlocks in 3 Simple Steps

This guide walks you through locating MySQL deadlock logs, analyzing their contents to pinpoint transaction timing, order, and lock details, and identifying the root cause of the deadlock, including special locking scenarios that can trigger deadlocks.

Database TroubleshootingDeadlockInnoDB
0 likes · 16 min read
How to Quickly Diagnose MySQL InnoDB Deadlocks in 3 Simple Steps
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
Sohu Tech Products
Sohu Tech Products
May 14, 2025 · Databases

How to Quickly Diagnose MySQL InnoDB Deadlocks in 3 Simple Steps

This guide walks you through locating the deadlock log, analyzing its contents to determine the time, order, and involved SQL statements, and pinpointing the root cause of MySQL InnoDB deadlocks, including special locking scenarios and how to interpret lock structures.

Database TroubleshootingDeadlockInnoDB
0 likes · 16 min read
How to Quickly Diagnose MySQL InnoDB Deadlocks in 3 Simple Steps
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.

Deadlockconcurrencyjava
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
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Apr 1, 2025 · Fundamentals

Why Do Deadlocks Happen and How Can You Prevent Them?

This article explains what deadlocks are, outlines the four classic conditions that cause them, provides Java thread and MySQL transaction examples, and offers practical solutions such as consistent lock ordering, timeout settings, batch updates, and shortening transaction duration to prevent deadlocks.

DatabaseDeadlockTransaction
0 likes · 5 min read
Why Do Deadlocks Happen and How Can You Prevent Them?
Linux Kernel Journey
Linux Kernel Journey
Feb 23, 2025 · Fundamentals

Debugging C++ Deadlocks on Linux with Shell Commands and GDB

This article explains how to identify and resolve multithreaded deadlocks in Linux C++ programs by using shell utilities such as ps and top for initial diagnosis, then attaching GDB to inspect thread stacks and pinpoint the exact lock contention causing the freeze.

C++DeadlockLinux
0 likes · 20 min read
Debugging C++ Deadlocks on Linux with Shell Commands and GDB
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.

DeadlockSemaphoreconcurrency
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.

Deadlockatomicconcurrency
0 likes · 8 min read
Understanding Mutex Locks and Their Use in Go Concurrency
Su San Talks Tech
Su San Talks Tech
Feb 14, 2025 · Databases

How to Fix Oracle ORA-000060 Deadlock in Bulk User Updates

The article describes a real‑world Oracle ORA‑000060 deadlock encountered during bulk updates of user records, explains the root cause of unsorted duplicate user_id entries across parallel threads, and outlines practical solutions such as sorting input files and adjusting transaction order, illustrated with MyBatis code and DeepSeek insights.

DeadlockMyBatisOracle
0 likes · 5 min read
How to Fix Oracle ORA-000060 Deadlock in Bulk User Updates
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.

Deadlockconcurrencymultithreading
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.

DeadlockMySQLON DUPLICATE KEY UPDATE
0 likes · 18 min read
Analysis of MySQL Deadlock Issues in Multi-threaded Scenarios
BirdNest Tech Talk
BirdNest Tech Talk
Jan 6, 2025 · Fundamentals

Mastering Go Concurrency: From Basics to Advanced Patterns

This article outlines a comprehensive guide to Go's concurrency model, covering fundamental concepts, goroutine scheduling, synchronization primitives, channel communication, common patterns, deadlock avoidance techniques, and performance‑optimizing mechanisms with concrete code examples and step‑by‑step explanations.

ChannelsDeadlockGo
0 likes · 13 min read
Mastering Go Concurrency: From Basics to Advanced Patterns
Raymond Ops
Raymond Ops
Jan 4, 2025 · Backend Development

Why This Simple Go Program Deadlocks: The Hidden Goroutine Trap

The article explains why a seemingly straightforward Go program that creates an unbuffered channel, launches a goroutine to print a received value, and then sends a value deadlocks, analyzes the evaluation order of go statements, and shows how to fix the issue by moving the receive into a separate goroutine.

Deadlockchannel
0 likes · 7 min read
Why This Simple Go Program Deadlocks: The Hidden Goroutine Trap
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.

BytecodeDeadlockR8
0 likes · 10 min read
Deadlock Caused by Do-While Loop in Plugin
JavaEdge
JavaEdge
Oct 28, 2024 · Databases

Why Do MySQL Transactions Deadlock? Reproduce and Prevent InnoDB Deadlocks

This article explains how MySQL InnoDB deadlocks occur during order‑record idempotency checks, demonstrates step‑by‑step reproduction with SQL scripts, analyzes the lock types involved, and provides practical strategies to avoid and resolve such deadlocks in production systems.

DatabaseDeadlockInnoDB
0 likes · 13 min read
Why Do MySQL Transactions Deadlock? Reproduce and Prevent InnoDB Deadlocks
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.

Data ConsistencyDeadlockPython
0 likes · 10 min read
Understanding Race Conditions, Deadlocks, Resource Contention, and Data Consistency in Multithreaded Python
Aikesheng Open Source Community
Aikesheng Open Source Community
Sep 24, 2024 · Databases

Why Does a SELECT on performance_schema.data_locks Hang MySQL? Deep Dive & Fix

A batch INSERT triggers a massive lock record buildup, and a concurrent SELECT on performance_schema.data_locks causes a memory allocation error that leaves trx_sys‑mutex unreleased, leading to a full MySQL hang; the article reproduces the bug, analyses the stack, explains the root cause, and shows the official fix in MySQL 8.0.37.

Bug AnalysisDatabaseDeadlock
0 likes · 9 min read
Why Does a SELECT on performance_schema.data_locks Hang MySQL? Deep Dive & Fix
Tencent Cloud Developer
Tencent Cloud Developer
Sep 10, 2024 · Fundamentals

Why Does This Go Code Block? Uncovering Channel and Select Pitfalls

This article analyzes a Go program that deadlocks due to misuse of unbuffered channels and select, explains the underlying behavior of channels, blocking conditions, and select semantics, and provides a simple fix by buffering the stop channel while also covering Go's CSP roots and best‑practice guidelines.

DeadlockGoSELECT
0 likes · 20 min read
Why Does This Go Code Block? Uncovering Channel and Select Pitfalls
Sohu Tech Products
Sohu Tech Products
Sep 5, 2024 · Databases

How to Diagnose and Resolve MySQL InnoDB Deadlocks: A Step-by-Step Guide

This article walks through a real‑world MySQL InnoDB deadlock case, detailing log analysis, reproducing the issue with test data, explaining gap and insert‑intention locks, and presenting a practical solution that checks existence before updating or inserting to prevent deadlocks.

Database PerformanceDeadlockInnoDB
0 likes · 14 min read
How to Diagnose and Resolve MySQL InnoDB Deadlocks: A Step-by-Step Guide
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
Su San Talks Tech
Su San Talks Tech
Aug 14, 2024 · Operations

How to Diagnose and Fix the 8 Most Common Production Issues

This article outlines practical troubleshooting steps for eight frequent production problems—including OOM, CPU spikes, interface timeouts, index failures, deadlocks, disk issues, MQ backlogs, and API errors—providing clear guidance and code snippets to help engineers quickly identify root causes and resolve them.

APICPUDeadlock
0 likes · 14 min read
How to Diagnose and Fix the 8 Most Common Production Issues
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.

CountDownLatchDeadlockThread Pool
0 likes · 11 min read
Why Does My ThreadPool Freeze? Uncovering the Hidden Deadlock Pitfall
Zhuanzhuan Tech
Zhuanzhuan Tech
Jul 3, 2024 · Databases

Analysis of MySQL DELETE Deadlock and Locking Mechanisms

This article examines why identical DELETE statements on a MySQL table with a unique index can cause deadlocks, reviews InnoDB lock types, reproduces the issue with SQL and Java code, and discusses mitigation strategies such as version upgrades, isolation level changes, and distributed locks.

DELETEDatabaseDeadlock
0 likes · 14 min read
Analysis of MySQL DELETE Deadlock and Locking Mechanisms
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 12, 2024 · Backend Development

Fixing Spring Boot 3 Deadlock: Reproduce, Analyze, and Resolve Custom Event Publishing Issues

This article demonstrates how a custom event published from a constructor in Spring Boot 3.2.5 can cause a deadlock, explains the underlying lock contention, and provides two solutions: using SmartInitializingSingleton to defer publishing and upgrading to Spring 6.2's multithreaded bean initialization.

Deadlockcustom-eventjava
0 likes · 6 min read
Fixing Spring Boot 3 Deadlock: Reproduce, Analyze, and Resolve Custom Event Publishing Issues
Cognitive Technology Team
Cognitive Technology Team
May 8, 2024 · Databases

Introduction to InnoDB Transaction Lock System in MySQL

This article provides a comprehensive overview of InnoDB's transaction lock subsystem in MySQL, explaining row‑level and table‑level lock types, their internal implementations, lock‑compatibility rules, practical SQL examples, and common deadlock scenarios with detailed code illustrations.

DeadlockInnoDBMySQL
0 likes · 29 min read
Introduction to InnoDB Transaction Lock System in MySQL
Programmer XiaoFu
Programmer XiaoFu
Apr 26, 2024 · Backend Development

8 Code Patterns That Can Spike Your CPU to 100%

The article enumerates eight common coding practices—such as fetching massive data at once, using Kafka auto‑acknowledgement, infinite loops, aggressive multithreaded imports, bulk file synchronization, deadlocks, poorly designed regexes, and heavy real‑time calculations—that can cause Java services to hit 100% CPU usage, explaining the underlying mechanisms like full GC, thread‑context switching, and NFA backtracking.

CPU usageDeadlockFull GC
0 likes · 9 min read
8 Code Patterns That Can Spike Your CPU to 100%
MaGe Linux Operations
MaGe Linux Operations
Apr 9, 2024 · Databases

How to Simulate and Prevent SQL Server Deadlocks: A Step-by-Step Guide

This article explains what SQL Server deadlocks are, why they occur, demonstrates a reproducible deadlock scenario with T‑SQL code, and provides practical strategies such as proper schema design, indexing, query optimization, shorter transactions, appropriate isolation levels, and monitoring to minimize deadlock occurrences.

DeadlockSQL ServerTransaction
0 likes · 9 min read
How to Simulate and Prevent SQL Server Deadlocks: A Step-by-Step Guide
MaGe Linux Operations
MaGe Linux Operations
Apr 1, 2024 · Backend Development

Why This Simple Go Channel Code Always Deadlocks and How to Fix It

The article explains why a minimal Go program that creates an unbuffered channel, launches a goroutine to print a received value, and then sends a value deadlocks, analyzes the evaluation order of the go statement, and shows how restructuring the code eliminates the deadlock.

DeadlockGo languagechannel
0 likes · 7 min read
Why This Simple Go Channel Code Always Deadlocks and How to Fix It
JD Tech
JD Tech
Feb 28, 2024 · Databases

Detecting and Monitoring Database Deadlocks with EasyBI: A Practical Case Study

This article recounts how a production database deadlock was uncovered during testing, explains the use of the EasyBI monitoring tool to collect and visualize error and claim statistics, and shares the step‑by‑step configuration, analysis, and lessons learned for preventing similar issues in future systems.

DatabaseDeadlockEasyBI
0 likes · 8 min read
Detecting and Monitoring Database Deadlocks with EasyBI: A Practical Case Study
IT Services Circle
IT Services Circle
Feb 27, 2024 · Backend Development

Common Causes of 100% CPU Usage in Java Backend Systems and Their Solutions

This article analyzes typical reasons why Java backend services experience sustained 100% CPU usage—such as bulk data retrieval, Kafka auto‑acknowledgement, infinite loops, excessive multithreading, massive file synchronization, deadlocks, inefficient regular expressions, and heavy real‑time calculations—and offers practical mitigation strategies.

CPUDeadlockKafka
0 likes · 9 min read
Common Causes of 100% CPU Usage in Java Backend Systems and Their Solutions
FunTester
FunTester
Feb 20, 2024 · Backend Development

Deadlock, Livelock, and Thread Starvation in Java Concurrency

This article explains Java concurrency issues such as deadlock, livelock, and thread starvation, demonstrates deadlock examples, discusses prevention techniques like timeouts and lock ordering, and provides an overview of the java.util.concurrent package including executors, locks, semaphores, latches, barriers, and concurrent collections.

DeadlockJava Util ConcurrentThread Starvation
0 likes · 33 min read
Deadlock, Livelock, and Thread Starvation in Java Concurrency
Cognitive Technology Team
Cognitive Technology Team
Feb 19, 2024 · Databases

Understanding MySQL Deadlocks and How to Prevent Them

This article explains MySQL deadlocks, describing how they occur in InnoDB due to resource contention, outlines common causes such as race conditions, poor indexing, long transactions, lock upgrades, and provides practical prevention strategies including deadlock detection, short transactions, query optimization, lock timeouts, monitoring tools, lock ordering, and appropriate lock levels.

DatabaseDeadlockInnoDB
0 likes · 5 min read
Understanding MySQL Deadlocks and How to Prevent Them
MaGe Linux Operations
MaGe Linux Operations
Feb 13, 2024 · Databases

How to Detect, Diagnose, and Prevent MySQL InnoDB Deadlocks

This guide explains what MySQL deadlocks are, shows how to use InnoDB status and performance‑schema queries to locate them, demonstrates a reproducible deadlock scenario, and provides practical prevention techniques such as reducing transaction size, quick commits, proper indexing, and consistent access order.

DeadlockInnoDBMySQL
0 likes · 11 min read
How to Detect, Diagnose, and Prevent MySQL InnoDB Deadlocks
Wukong Talks Architecture
Wukong Talks Architecture
Dec 24, 2023 · Databases

MySQL Indexes, Lock Types, Transaction Isolation Levels, and Deadlock Analysis

This article explains MySQL index structures, covers covered and back‑table queries, details InnoDB transaction isolation levels, classifies various lock types (table, row, gap, next‑key, intention, auto‑inc, metadata), analyzes lock behavior in multiple scenarios, discusses deadlock causes, and provides DDL and online schema‑change recommendations.

DDLDeadlockMySQL
0 likes · 61 min read
MySQL Indexes, Lock Types, Transaction Isolation Levels, and Deadlock Analysis
政采云技术
政采云技术
Dec 14, 2023 · Databases

Understanding MySQL Locks: Types, Mechanisms, and Deadlock Resolution

This article explains the various lock types in MySQL—including global, table, row, metadata, and intent locks—how they work under InnoDB, demonstrates lock acquisition with SQL examples, and provides practical guidance for detecting and resolving deadlocks in production environments.

DatabaseDeadlockInnoDB
0 likes · 17 min read
Understanding MySQL Locks: Types, Mechanisms, and Deadlock Resolution
Efficient Ops
Efficient Ops
Dec 3, 2023 · Backend Development

Why Our Redis Cluster Pipeline Deadlocked: Thread Locks Explained

This article walks through a production incident where a Redis Cluster pipeline caused Dubbo threads to block and eventually deadlock, detailing the root‑cause analysis, code inspection, and verification steps using jstack, jmap, and MAT to confirm the deadlock and propose fixes.

DeadlockRedisjava
0 likes · 13 min read
Why Our Redis Cluster Pipeline Deadlocked: Thread Locks Explained
Selected Java Interview Questions
Selected Java Interview Questions
Nov 22, 2023 · Backend Development

Thread Pool Pitfalls and Best Practices in Java Backend Development

This article analyzes a real production incident caused by improper thread‑pool usage, explains common misconceptions about core parameters, demonstrates faulty code examples, and provides concrete recommendations for configuring thread pools, handling timeouts, and avoiding deadlocks in Java backend services.

CompletableFutureDeadlockJava concurrency
0 likes · 14 min read
Thread Pool Pitfalls and Best Practices in Java Backend Development
MaGe Linux Operations
MaGe Linux Operations
Nov 18, 2023 · Databases

Understanding SQL Server Deadlocks: Causes, Detection, and Prevention

This article explains the principle of deadlocks, the four necessary conditions, how they manifest in SQL Server resources, methods for investigating deadlocks with system procedures and Profiler, and practical techniques—including isolation level changes, lock timeouts, and bound sessions—to avoid and resolve them.

DeadlockSQL ServerTransaction
0 likes · 17 min read
Understanding SQL Server Deadlocks: Causes, Detection, and Prevention
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 4, 2023 · Databases

Understanding MySQL Lock Types: Shared, Exclusive, Intention, Gap, Next‑Key, and Insert‑Intention Locks with Deadlock Analysis

This article explains MySQL's various lock mechanisms—including shared (S) and exclusive (X) locks, intention locks, record, gap, next‑key, and insert‑intention locks—illustrates their behavior with SQL examples, analyzes a concurrent insert deadlock scenario, and offers practical mitigation strategies.

DatabaseDeadlockInnoDB
0 likes · 11 min read
Understanding MySQL Lock Types: Shared, Exclusive, Intention, Gap, Next‑Key, and Insert‑Intention Locks with Deadlock Analysis
vivo Internet Technology
vivo Internet Technology
Oct 11, 2023 · Backend Development

Investigation of Dubbo Thread‑Pool Exhaustion Caused by Redis Cluster Pipeline Deadlock

The article details how a Dubbo thread‑pool exhaustion incident was traced to a deadlock in Redis Cluster pipeline usage, caused by Jedis pools lacking a borrow timeout, which let threads block indefinitely while holding cross‑node connections, and recommends configuring maxWaitMillis or enlarging the pool to prevent recurrence.

DeadlockDubboRedis
0 likes · 14 min read
Investigation of Dubbo Thread‑Pool Exhaustion Caused by Redis Cluster Pipeline Deadlock