Tagged articles

Deadlock

232 articles · Page 3 of 3
Youzan Coder
Youzan Coder
Feb 1, 2019 · Databases

Why Gap Locks Trigger Deadlocks in InnoDB: A Real‑World MySQL Case Study

An in‑depth MySQL case study shows how concurrent gap‑locks under REPEATABLE READ can cause a deadlock when two transactions delete non‑existent rows and then attempt inserts, includes full DDL, log excerpts, step‑by‑step analysis, and practical mitigation strategies.

DeadlockGap LockInnoDB
0 likes · 8 min read
Why Gap Locks Trigger Deadlocks in InnoDB: A Real‑World MySQL Case Study
Youzan Coder
Youzan Coder
Jan 30, 2019 · Operations

Why Do MySQL RR Transactions Deadlock? A Deep Dive into Index Locking

This article examines two MySQL deadlock scenarios under REPEATABLE READ isolation—one with a non‑unique index and another with a unique index—by presenting table definitions, test data, raw deadlock logs, and step‑by‑step analysis of lock acquisition and waiting, ultimately offering practical recommendations to avoid such deadlocks.

Database OperationsDeadlockInnoDB
0 likes · 12 min read
Why Do MySQL RR Transactions Deadlock? A Deep Dive into Index Locking
Youzan Coder
Youzan Coder
Jan 25, 2019 · Databases

MySQL/InnoDB Deadlock Analysis: Detection, Handling, and Prevention

The guide explains MySQL/InnoDB deadlocks—how circular lock waits arise, the wait‑for‑graph detection that rolls back the transaction with fewer undo logs, the various lock modes and their behavior in UPDATE/INSERT/DELETE, and practical strategies such as proper indexing, consistent access order, and configuration tweaks to detect, handle, and prevent deadlocks.

Concurrency ControlDatabase LocksDeadlock
0 likes · 13 min read
MySQL/InnoDB Deadlock Analysis: Detection, Handling, and Prevention
360 Tech Engineering
360 Tech Engineering
Jul 4, 2018 · Backend Development

Understanding and Avoiding Common Concurrency Bugs in Java

This article introduces the four major categories of multithreaded bugs—data races, atomicity failures, ordering failures, and deadlocks—explains their causes with Java examples, and provides practical techniques such as using state machines, volatile variables, consistent lock ordering, and proper exception handling to prevent them.

Data RaceDeadlockjava
0 likes · 7 min read
Understanding and Avoiding Common Concurrency Bugs in Java
Tencent TDS Service
Tencent TDS Service
Mar 8, 2018 · Mobile Development

How to Detect and Analyze Android Thread Deadlocks with Automated Monitoring

This article describes the background of Android thread freeze issues caused by deadlocks, presents a client‑server monitoring architecture that captures thread and lock information via system traces, details automated analysis methods for deadlock detection and non‑deadlock causes, and shares the observed performance improvements and future plans.

AndroidDeadlockthread monitoring
0 likes · 17 min read
How to Detect and Analyze Android Thread Deadlocks with Automated Monitoring
Architecture Digest
Architecture Digest
Jan 21, 2018 · Databases

Common MySQL Concurrency Issues: Table Locks, Metadata Locks, Deadlocks, and Lock Waits

This article examines typical MySQL concurrency problems—including table lock‑induced slow queries, metadata lock blocking during online schema changes, deadlock scenarios, and lock‑wait timeouts—provides step‑by‑step reproductions, analysis of lock behavior, and practical mitigation strategies such as using InnoDB, online DDL tools, and monitoring techniques.

DeadlockInnoDBLocks
0 likes · 15 min read
Common MySQL Concurrency Issues: Table Locks, Metadata Locks, Deadlocks, and Lock Waits
Beike Product & Technology
Beike Product & Technology
Dec 30, 2017 · Backend Development

Analysis and Solution of JVM Deadlock Problem

This article analyzes a JVM deadlock issue encountered in a Tomcat-based application, detailing the problem's cause, analysis using jstack, and the solution involving ClassLoader isolation and ParallelCapable registration.

ClassLoaderDeadlockJVM
0 likes · 15 min read
Analysis and Solution of JVM Deadlock Problem
Qunar Tech Salon
Qunar Tech Salon
Dec 20, 2017 · Databases

Diagnosing and Resolving MySQL InnoDB Deadlocks and Lock‑Wait Timeouts in Data‑Warehouse Workloads

This article explains how to quickly locate and fix online MySQL problems such as partial update failures, InnoDB deadlocks, and lock‑wait timeouts by analyzing server logs, understanding InnoDB row‑lock behavior, optimizing indexes, adjusting transaction settings, and using a custom log‑collection script.

Database PerformanceDeadlockInnoDB
0 likes · 19 min read
Diagnosing and Resolving MySQL InnoDB Deadlocks and Lock‑Wait Timeouts in Data‑Warehouse Workloads
ITPUB
ITPUB
Dec 19, 2017 · Databases

Why a Simple DELETE Triggers a MySQL Deadlock – Step‑by‑Step Log Analysis

The article walks through a puzzling MySQL deadlock caused by two concurrent transactions on a table with a unique index, explains how to read the InnoDB status output, identifies the lock types and order, and shows a detailed step‑by‑step reconstruction of the deadlock scenario.

DeadlockInnoDBMySQL
0 likes · 11 min read
Why a Simple DELETE Triggers a MySQL Deadlock – Step‑by‑Step Log Analysis
Qunar Tech Salon
Qunar Tech Salon
Jun 27, 2017 · Databases

Database Deadlock Cases and Their Resolutions

This article examines three real‑world MySQL deadlock incidents—unique‑key null insertion, concurrent duplicate‑key insertion, and a JDBC parameter bug—detailing their detection, analysis, and the concrete fixes applied to prevent recurrence.

DeadlockJDBCMySQL
0 likes · 9 min read
Database Deadlock Cases and Their Resolutions
dbaplus Community
dbaplus Community
May 16, 2017 · Databases

Why MySQL Hung: A Mutex Deadlock Bug and Its Fix

A MySQL 5.5 server on CentOS 6.7 hung because two internal mutexes (LOCK_index and LOCK_thread_count) deadlocked during concurrent purge binlog and reset master commands, and the issue was resolved by upgrading to a version where the bug is fixed.

DeadlockMySQLgdb
0 likes · 5 min read
Why MySQL Hung: A Mutex Deadlock Bug and Its Fix
ITPUB
ITPUB
Mar 11, 2017 · Databases

How Does MySQL InnoDB Lock Rows? Deep Dive into MVCC, 2PL, and Deadlocks

This article explains MySQL InnoDB's locking mechanisms—including MVCC snapshot vs. current reads, two‑phase locking, isolation levels, lock types, GAP locks, and deadlock scenarios—by analyzing simple and complex SQL examples and showing how different index and isolation configurations affect lock acquisition.

DeadlockInnoDBIsolation
0 likes · 25 min read
How Does MySQL InnoDB Lock Rows? Deep Dive into MVCC, 2PL, and Deadlocks
ITPUB
ITPUB
Jan 19, 2017 · Fundamentals

How to Detect and Analyze Linux Deadlocks with pstack and gdb

This article explains what a deadlock is, outlines its four necessary conditions, provides a sample pthread program that deadlocks, and shows step‑by‑step how to use pstack and gdb on Linux to identify the stuck threads and understand the root cause.

Deadlockgdbpstack
0 likes · 14 min read
How to Detect and Analyze Linux Deadlocks with pstack and gdb
dbaplus Community
dbaplus Community
May 25, 2016 · Databases

How Parallel Execution Supercharges SQL Server Queries—and the Pitfalls to Avoid

This article explains the theory behind SQL Server's parallel execution, illustrates its performance gains with Amdahl's Law, lists operators that block parallelism, discusses configuration settings, warns of deadlocks and thread starvation, and presents practical MapReduce‑style optimizations for real‑world workloads.

Amdahl's lawDeadlockMapReduce
0 likes · 16 min read
How Parallel Execution Supercharges SQL Server Queries—and the Pitfalls to Avoid
ITPUB
ITPUB
Apr 26, 2016 · Databases

Why Deleting a Single Row by Unique Index Can Still Cause MySQL Deadlocks

This article analyzes a puzzling MySQL deadlock scenario where concurrent DELETE statements on a uniquely indexed row lead to a deadlock, explaining the lock modes, InnoDB's deadlock‑prevention strategy, and the conditions that make such deadlocks possible.

DeadlockInnoDBMySQL
0 likes · 13 min read
Why Deleting a Single Row by Unique Index Can Still Cause MySQL Deadlocks
21CTO
21CTO
Apr 16, 2016 · Databases

How MySQL InnoDB Locks Work: From MVCC Basics to Deadlock Analysis

This article provides an in‑depth analysis of MySQL/InnoDB locking mechanisms, covering MVCC snapshot vs current reads, cluster indexes, two‑phase locking, isolation levels, lock behavior for simple and complex SQL statements, and practical deadlock diagnosis techniques.

Database ConcurrencyDeadlockInnoDB
0 likes · 26 min read
How MySQL InnoDB Locks Work: From MVCC Basics to Deadlock Analysis
DevOps
DevOps
Apr 3, 2016 · Fundamentals

The Life of a Thread: A Narrative on Thread Pools, Locks, and Deadlocks

A metaphorical story follows a newly created thread as it learns about extracting request parameters, performing login, handling CPU scheduling, using caches, encountering deadlocks, and ultimately witnessing a system reboot, illustrating core concepts of multithreading, concurrency control, and thread‑pool lifecycle.

CPU schedulingDeadlockLocks
0 likes · 12 min read
The Life of a Thread: A Narrative on Thread Pools, Locks, and Deadlocks
Qunar Tech Salon
Qunar Tech Salon
Mar 15, 2016 · Databases

Analysis of MySQL InnoDB Locking Mechanisms and Deadlock Scenarios

This report details a series of MySQL InnoDB experiments that examine transaction locking, lock types, gap and next‑key locks, and deadlock behavior across various SQL operations, providing practical insights for optimizing concurrency and preventing deadlocks.

DeadlockInnoDBMySQL
0 likes · 16 min read
Analysis of MySQL InnoDB Locking Mechanisms and Deadlock Scenarios