Questions tagged [deadlock]

A situation caused by two or more processes being unable to proceed (and thus release their locks) because they are blocked by locks on resources held by the other process.

Filter by
Sorted by
Tagged with
0
votes
2answers
755 views

Deadlock on inserts to a single table with a single key. (Mysql)

I have a simple game server. One of the requirement i received was to handle a single request for a single player at a time. so in order to achieve that i decided to create a lock table: CREATE TABLE ...
2
votes
1answer
41 views

Deadlock and schema modification lock

I have a deadlock that I need some input for <deadlock> <victim-list> <victimProcess id="process4c86a61868" /> </victim-list> <process-list> <process id=&...
13
votes
2answers
3k views

If a Parallelism Exchange Event deadlock is victim-less, is it a problem?

We're seeing a lot of these Intra-Query Parallel Thread Deadlocks in our Production environment (SQL Server 2012 SP2 - yes...I know...), however when looking at the Deadlock XML that has been captured ...
0
votes
1answer
604 views

How to gracefully handle MySQL deadlocks involving SAVEPOINT?

I have a concurrency problem where 2 (or more) processes are making inserts at the same time and are all locking the same index page (I guess) among with a on a SELECT FOR UPDATE clause Here is a ...
14
votes
1answer
3k views

Why are there Victimless Entries on the Deadlock Graph?

I am trying to learn how to analyze SQL Server 2008's deadlock graph, and I'm finding alot of entries with an empty <victim-list> node. I don't understand what these entries represent: if there ...
1
vote
2answers
3k views

View information on historical deadlocks

I've been tasked with investigating an issue where an application's job has failed due to deadlocks. I'm aware of using traces to capture deadlocks, however as this is something that occurred 16 hours ...
2
votes
1answer
738 views

Help understanding InnoDB Deadlock Detection

I have a deadlock occurring when executing an Update and a Select in seperate threads but I'm not sure what can be done about it. Previously my understanding was that this could happen in parallel but ...
0
votes
1answer
24 views

Can PostgreSQL UPDATEs in autocommit mode deadlock?

Is it possible for UPDATEs in PostgreSQL to deadlock when in autocommit mode? If so, how, and why? (Or, why not?)
0
votes
1answer
418 views

Deadlocks appeared after moving to MariaDB10.2 from MySQL5.5

After moving to mariadb-server-10.2 from mysql5.5 I am facing deadlock issues. Please see the output of 'show full processlist'. Can someone give some suggestion? | 162506 | catalog | ...
0
votes
0answers
31 views

Rolling back transaction with trx_mysql_thread_id of 0 create deadlocks on update

I'm using MySQL 5.6.41 on AWS RDS. I have seen, recently, lot of transactions ending as deadlocks. Using SELECT * FROM information_schema.innodb_trx; I found that a transaction was always there. +-----...
7
votes
1answer
906 views

Oracle Ref Partitioning: Deadlock due to child table row migration

My ordering application uses Oracle 11g Database. This DB has a primary table ORDERS and multiple child tables like ORDER_DETAILS, PLAN etc. ORDERS table is LIST partitioned on STATUS column and all ...
1
vote
1answer
765 views

deadlock in mariadb: with non-index & fk table

when i try to do an operation concurrently, there exists an deadlock from mariadb show engine innodb status, the deadlock log is as follows ------------------------ LATEST DETECTED DEADLOCK ----------...
5
votes
2answers
2k views

Should an INSERT cause an exclusive lock on a foreign key?

I'm working on a deadlock issue. Process A is doing a simple INSERT into TableA which has a FK to TableB Process B is doing a complicated SELECT on a join that includes TableA and TableB I'll ...
17
votes
4answers
11k views

How can I convert a key in a SQL Server deadlock report to the value?

I have a deadlock report that tells me that there was a conflict involving waitresource="KEY: 9:72057632651542528 (543066506c7c)" and I can see this: <keylock hobtid="...
1
vote
1answer
168 views

Should simultaneous bulk inserts cause deadlocks, with a PK being an identity column, in SQL Server?

When analyzing a deadlock graph, it looks like the victim is a bulk insert, and the blockers are the same bulk insert. Using a message bus, many subscribers can end up doing a bulk insert at roughly ...
2
votes
1answer
451 views

Why has deadlock behaviour changed between MariaDB 10.1.22 and 10.2.14?

Since upgrading MariaDB 10.1.22 to 10.2.14 our MariaDB slaves are encountering deadlocks that are not handled in less than 600 seconds thus the classic semaphore decision to crash the server. The ...
8
votes
1answer
136 views

MySQL deadlock: upsert query acquiring gap lock twice?

I am trying to debug a deadlock scenario which has been puzzling me for quite some time now. I am wondering if someone can shed any light into how this can happen. Here is the deadlock output: ------...
1
vote
1answer
600 views

mysql deadlock when update some items whose id are selected from another table

I'm sorry, I just can speak a little English. I have two machines(10.10.102.101, 10.10.102.104) which connect to the same mysql datebase. This is a table and deadlock happened on it. mysql> ...
4
votes
2answers
1k views

Missing statement information from 'LATEST DETECTED DEADLOCK' InnoDB status output

I'm learning how to interpret the LATEST DETECTED DEADLOCK section in the output of SHOW ENGINE INNODB STATUS, and had a question about the output. Some sample output of SHOW ENGINE INNODB STATUS ...
0
votes
1answer
40 views

Is my theory on INSERT deadlocks correct?

I originally had this (as three separate PG queries, from my applications): INSERT INTO table1 (col1) VALUES ($1) ON CONFLICT DO NOTHING; INSERT INTO table2 (col1) VALUES ($1) ON CONFLICT DO NOTHING; ...
0
votes
2answers
150 views

MySQL 5.6.26 high concurrency dead lock

Table structure: CREATE TABLE `extend_0` ( `id` bigint(20) NOT NULL, `code` varchar(30) NOT NULL, `data_key` varchar(50) NOT NULL, `data_value` varchar(200) NOT NULL, `create_time` timestamp NOT ...
2
votes
2answers
2k views

What happens when SELECT … FOR UPDATE returns multiple rows?

I'm working on some dead-lock troubleshooting, particularly involving a row-swap. Currently the statements look like this, all running under the same transaction: SELECT IDENTIFIER FROM tables WHERE ...
3
votes
3answers
135 views

(Deadlock) Select Query Causes Insert Query to be Blocking in Transaction

Database: MySQL I have a running app with concurrency transactions in it. I noticed that there are so many errors occur related to deadlock. The error says SQLSTATE[40001]: Serialization failure: 1213 ...
2
votes
2answers
298 views

Deadlocks With Trigger Based Replication

A table ORIGINAL exists with the following structure: ID VARCHAR Length 10 (key) VALUE VARCHAR Length 10 (non-key) A table REPLICATION exists with the following structure: ID ...
8
votes
3answers
8k views

MySql Gap Lock Deadlock on Inserts

I'm getting Deadlocks from gap locks on a table when inserting into it frequently from multiple sources. Here is an overview of my processes. START TRANSACTION UPDATE vehicle_image SET active = 0 ...
1
vote
1answer
254 views

MySQL/innodb trying to lock uncommitted row from parallel transaction, deadlock in result

MySQL 8.0.16, 2 simple RC transactions, each trying to insert and delete rows: CREATE TABLE test1 ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(100), PRIMARY KEY (id) ) ...
0
votes
1answer
109 views

deadlock detected during oracle expdp

I have an Oracle 11g and I wanted to export all my shcema objects, with this command: expdp as '/ as sysdba' directory=DIR dumpfile=DWH%U.dmp logfile=DWH.log filesize=40000m parallel=32 schemas=DWH ...
0
votes
1answer
16 views

SQL Sever Transactional Replication on DB with deadlocks and blocking issues

Is it feasible to try and start Transactional Replication on a SQL Server DB with deadlocks and blocking issues. Are there any other options for a close to hot backup?
1
vote
1answer
1k views

AWS RDS mysql deadlock

Everything in our production environment was working well. Yesterday, suddenly out of no where we were getting "lock wait" on any transaction related to a specific row. Same transaction on another row ...
0
votes
1answer
208 views

Transaction (Process ID) was deadlocked on lock resources with another process and has been chosen as the deadlock victim (Msg 1205) when update

I have some issue when i test 100 user fill in attendance with same time. i got error message like this Transaction (Process ID) was deadlocked on lock resources with another process and has ...
0
votes
1answer
414 views

Understanding INSERT … ON DUPLICATE KEY UPDATE deadlock scenario

I'm trying to understand a scenario where an INSERT ... ON DUPLICATE KEY UPDATE statement is causing deadlocks under high concurrency. The two tables in question: hosts: "CREATE TABLE `...
0
votes
1answer
166 views

Oracle 10g Database Locking Session Issue

I have a problem with locking and not timing out in one of my Oracle databases. This session locks occur on certain transactions that come from Oracle Forms users. For instance, when some user ...
1
vote
0answers
30 views

InnoDB trigger deadlocks itself?

I have a MySQL 5.7.22 database using the InnoDB engine. There's a table respondents that has 6 associated triggers - three of them make CRUD operations on a completed_respondents table, and the other ...
0
votes
1answer
31 views

Why do these queries deadlock and how to work this around in MariaDB?

The following 2 queries enounter DB deadlock in my program: DELETE FROM proxies WHERE NOT EXISTS ( SELECT 1 FROM proxy_xref_proxy_list AS pxpl WHERE pxpl.ProxyID=proxies.ID AND (pxpl....
0
votes
0answers
23 views

Blocking task report is showing false positive

Here is the code I am using to send email alerts. It seems to send more false +ves, can anyone guide me how to resolve this ? DECLARE @Waiting INT; DECLARE @Message NVARCHAR(MAX); SELECT @Waiting =...
0
votes
1answer
51 views

how see parameter value on xml_deadlock_report

i have some xml_deadlock_report i got from this step management > sessions > system_health > package().even_file but when i see xml_deadlock_report i got sql query but i can't see what parameter use ...
1
vote
1answer
120 views

Interpreting XDL / Deadlock dumps in SSMS

I've generated the following XML + XDL: <deadlock> <victim-list> <victimProcess id="processc1eaf13468" /> </victim-list> <process-list> <process id="...
0
votes
0answers
33 views

SQL Deadlock History [duplicate]

What query can I run to display historical deadlocks? I can see the current days deadlocks by going into "Management - Extended Events - system_health - package0.event_file" and looking at the ...
1
vote
3answers
74 views

Constant deadlocks on a high load table

I have a table files with about 73m rows, which totals to about 45GB. The rows being inserted in a day are about 100k. But the total rows which we run IODKU can reach tens of millions a day (since ...
11
votes
2answers
8k views

Why does this query cause a deadlock?

Why does this query cause a deadlock? UPDATE TOP(1) system_Queue SET [StatusID] = 2, @ID = InternalID WHERE InternalID IN ( SELECT TOP 1 InternalID FROM system_Queue WHERE ...
0
votes
1answer
33 views

Updating column having index causing Deadlock

My update statement: Update XyzTable set state ='second' where pgmNumber = 'prog123' and state = 'first' Both state and pgmNumber columns has individual index. Deadlock is happening even if above ...
20
votes
2answers
4k views

Can foreign keys cause deadlocks and hinder READ COMMITTED SNAPSHOT?

This is a followup question from: https://stackoverflow.com/questions/7684477/is-it-possible-to-set-transaction-isolation-level-snapshot-automatically I'm still having deadlock/timeout situations in ...
3
votes
1answer
993 views

How do I understand this deadlock?

I have two threads doing inserts into a table at the same time, causing a deadlock. The interaction with the table is in a new transaction, so I'm pretty confident there is nothing else going on here. ...
0
votes
1answer
541 views

SQL Server 2008R2 - Stored Procedure with 2 updates causing deadlocks

I have a web api web service that calls an authentication stored procedure. This stored procedure calls a different stored procedure that does 1 update: UPDATE ...
4
votes
2answers
1k views

Managing and Removing data from huge table

I have the following scenario: A huge table, that is also the most use table by far in the system. By huge I mean it is huge in number of rows and also huge in actual disk size, because it has 2 byte ...
3
votes
2answers
2k views

Can two mysql SELECT FOR UPDATE FROM mytable WHERE .. IN (..) deadlock? [duplicate]

Can two or more instances of the following deadlock with one another? START TRANSACTION SELECT mycolumn FROM mytable WHERE myid IN (list-of-ids) FOR UPDATE : COMMIT Points to keep in mind: mycolumn ...
0
votes
1answer
35 views

SQL Server Deadlock OPENXML insert

I am running into a deadlock issue when I call a stored procedure in Sql Server 2014 Enterprise Edition. An XML string is passed into the stored procedure and can be called many times in quick ...
0
votes
2answers
63 views

What is the difference between lock_timeout and deadlock_timeout?

What is the play between lock_timeout and deadlock_timeout ? What is the reason for a lock_timeout to occur not leading to a deadlock timeout. I am not able to think of scenarios from database ...
2
votes
2answers
34 views

Force update statements to take page locks in the same order?

I have two update statements on the same table that take page locks in different orders. This leads to deadlocks. Process A owns an update lock on page 1, and requests an update lock on page 2. ...
0
votes
3answers
85 views

MySQL - get latest record when date and time are two fields

I have a DB in which date and time are two columns. I need to get the latest (by latest I mean the record with the highest time) row. This is used as a sub query to feed another query. DB id ...

1
2 3 4 5
10