Questions tagged [deadlock]

1

votes
3

answer
720

Views

How to handle deadlock in Doctrine?

I have a mobile application and server based on Symfony which gives API for the mobile app. I have a situation, where users can like Post. When users like Post I add an entry in ManyToMany table that this particular user liked this particular Post (step 1). Then in Post table I increase likesCounter...
Tom
1

votes
0

answer
274

Views

Analyzing the ANR I occurred in android 8.0

The ANR was from a Monkey test, the probability of this issue is about 10%. It seems that there was a deadlock happened in binder driver, but I can't get more information from this ANR log, anyone could give me some hints or suggestions on tackling this issue, the ANR main thread log is blow: main'...
alexunder
1

votes
1

answer
128

Views

SQL Server deadlock occurs when executing 2 application/instance simultaneously(Error code:1205)

We have an application through which a large amount of string values (like 5000 character string- a column of datatype nvarchar(MAX)) is coming to a SQL script. The script has various transactions with 3 tables, where one of them is the master, another one is the history and the third is the LOG t...
Soumen Halder
1

votes
1

answer
54

Views

deadlock c++ thread condition variable

I have a problem with a class called Workers. Workers::Workers(int _nbThreads): goWork(false), progressWork(false), endWork(false), endFinishedWork(false), nbThreads(_nbThreads) { for(int i=0;istartWork(0); workers->stopWork(0); The problem is that the variable endWork is never found to true in fo...
Nicolas
1

votes
0

answer
537

Views

Has MongoDB a solution for Deadlocks?

Has Mongodb a solution for Deadlock? Does it happen essentially in mongodb? If yes, How can I resolve that? Tnx
Amir.Ojvar
1

votes
1

answer
373

Views

SQL Server: getting deadlock victim error on a stored procedure without transaction

I have a table called Storage with this design: CREATE TABLE [dbo].[Storage] ( [Id] [INT] IDENTITY(1,1) NOT NULL, [GameId] [INT] NOT NULL, [UserId] [INT] NOT NULL, [Status] [TINYINT] NOT NULL, [CreatedAt] [DATETIME] NOT NULL, [UpdatedAt] [DATETIME] NULL, [Data] [NVARCHAR](MAX) NOT NULL, CONSTRAINT [...
Imran Shamszadeh
1

votes
0

answer
595

Views

Postgres - ShareLock on Transaction

I am getting transaction deadlock while multiple processes try to insert the same row in a table. The only column with a non-null value in the insert is the one that has a unique constraint on it and is not a primary key. I am using SQLAlchemy version: 1.1.15, psycopg2 version: 2.7.3.2, python versi...
shaffooo
1

votes
0

answer
46

Views

Phidget API 22 : libusb deadlock

I currently have a thread of the Phidget API which deadlocks; here is a stack trace of my main thread: 1 __lll_lock_wait 0x7ffff5b3173c 2 __lll_lock_elision 0x7ffff5b343c7 3 mos_mutex_lock mos_lock-pthread.c...
1

votes
1

answer
167

Views

How to solve Deadlock in query with sub select?

When I try to make UPDATE with subselect I catch deadlocks. I caught this deadlock in my application I am using Hibernate for get data from DB and in my log, I see next: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarti...
Volodymyr Bilovus
1

votes
0

answer
42

Views

A dead lock in Mysql 5.7

Today, I encountered a strange dead lock problem in mysql 5.7. Here is the detail: and the table is : CREATE TABLE `xs_pv` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `nh_id` int(10) unsigned NOT NULL COMMENT '小说编号', `day` date NOT NULL COMMENT '日期', `pv` int(10) unsig...
David
1

votes
0

answer
74

Views

Best way to handle Insert/Update statements in SQL Server 2008?

I have been working on design of new system and there is many situation where function will handle Insert/Update statements. Usually this kind of process is handled old fashion way using server side language to determine which query will be executed. There is few things that I would like to eliminat...
espresso_coffee
1

votes
1

answer
513

Views

com.ibm.db2.jcc.am.SqlTransactionRollbackException: DB2 SQL Error: SQLCODE=-911, SQLSTATE=40001, SQLERRMC=68, DRIVER=3.65.110

Know that there is a lot of question of this. This is cause by the row of data is update by other thread, and the other thread could not acquire the lock. However, I am trying to ask in more details: I have some code as follow: // catch all for hibernate super exception public SystemErrorCode map(fi...
Panadol Chong
1

votes
0

answer
25

Views

Python multiprocessing program possible deadlock?

Could some explain to me why this hangs sometimes? (This is just for learning purposes, I wouldn't sum a list like that) import multiprocessing as mp q = mp.JoinableQueue() def worker(): S = 0 while not q.empty(): S += q.get() q.task_done() print(S) procs = [] for i in range(1000): q.put(i) for i in...
Theo Stefou
1

votes
0

answer
298

Views

Deadlock in Locking Functionality in Laravel

I am developing a bidding application in laravel. In this, I have to run cronjob after each minute and user can also bid from front end. So to avoid collision I am using lockForUpdate() of laravel. I have placed this in two different functions where bid ids are being processed. And In one place I am...
1

votes
1

answer
171

Views

Deadlock when writing to Console StreamWriter

Edit1: Simplified question: How do I find out what is the current (native) stack waiting on?: # Child-SP RetAddr Call Site 00 000000bb`62e6de78 00007fff`e7b07489 ntdll!NtWriteFile+0x14 01 000000bb`62e6de80 00007fff`a6bfb526 KERNELBASE!WriteFile+0x79 02 000000bb`62e6def0 00007fff`a...
Jan
1

votes
0

answer
42

Views

Mongodb driver deadlock in asp.net core

I have simple asp.net WebApi project with two controllers. First controller use System.Linq and has a deadlock under heavy loading. Second use MongoDB.Driver.Linq and work great. I used ab -c 10 -n 200000 -p post -H 'Content-Type: application/json' -T 'application/json' 'http://localhost:1989/api/...
1

votes
1

answer
117

Views

Why are my async continuations scheduled outside of the thread pool?

Please read the questions before marking as duplicate. This question implements the solution provided in this question and still experiences a deadlock. I am debugging a large multi-threaded application that makes many concurrent calls to various Google APIs using the .Net client libraries and we ar...
Alden
1

votes
0

answer
17

Views

MySQL InnoDB Deadlock on two instances of the same query with primary key

Two instances of the same query, executed from the same code path, each in their own transaction, are non-deterministically deadlocking on one another in my MySQL 5.7 database. The issue is only observed when application servers are under heavy load. The queries are select'ing the row to update by i...
Jason
1

votes
1

answer
50

Views

Ruby: Concurrent::Semaphore yields deadlock

I'm testing Concurrent::Semaphore, require 'concurrent' loop do semaphore = Concurrent::Semaphore.new(3) (1..5).each_with_object([]) do |_n, result| result
ryochin
1

votes
0

answer
37

Views

Deadlock issue in package/update query for concurrent access

I am using oracle package for one of the reports in out project. When this package accessed concurrently, below query is causing deadlock. Please suggest anyway to improve this query: UPDATE temp_final t SET notnullcol = ( select COALESCE(h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13,h14,h15,h16,h17,h...
Khushi
1

votes
0

answer
60

Views

Clustered index scan on a foreign key assertion

I have a stored procedure that gets executed for any change to the objects in a table A(The stored procedure is triggered by an after update trigger). The stored procedure in turn updates a table B which has a foreign key reference to table A(and another table say Table C) and two indexes. Now this...
user_me
1

votes
0

answer
65

Views

Update SQL query is deadlocking itself

I have re-created my query: MERGE [Unshipped] u USING [Order] order or ON or.ID = u.ID WHEN MATCHED AND u.Date or.Date THEN UPDATE SET u.Date = or.Date WHEN NOT MATCHED THEN INSERT (ID, FK, Date) VALUES (or.ID, or.FK, or.Date) Table2 In my real life example this appears to be dead locking itself....
Ryan Gadsdon
1

votes
0

answer
70

Views

How does “insert into select” work with huge amount of data

I have the query INSERT INTO A SELECT ... FROM B JOIN C on B.ID = C.ID Will table B or C be locked? If table B and C contains a huge amount of data and the query itself is executed for a few minutes, is it possible to execute (select, insert, delete) a request for tables B or C? What is the fundame...
sergeypast Znatok
1

votes
2

answer
40

Views

Operating Systems Deadlocks

Consider the following procedure to eliminate deadlock: When a process requests a resource, it specifies a time limit. If the process blocks because the resource is not available, a timer is started. If the time limit is exceeded, the process is released and allowed to run again. Does this eliminate...
Natasha1234
1

votes
0

answer
71

Views

arbiter solution for dining philosopher problem

In the given solution, I have implemented the arbiter solution. My philosopher is picking up any 2 random chopsticks. Before locking these chopsticks, I have used waiter lock. I am unable to get the problem with this solution. I'm still getting deadlock for this solution. void *philosopher_program(i...
Ankush Khobragade
1

votes
1

answer
71

Views

why concurrentQueue.sync DON'T cause deadlock

This code will deadlock because: they are in same thread print(2) has to wait print(3) print(3) has to wait print(2) For example: DispatchQueue.main.async { print(Thread.current) DispatchQueue.main.sync { print(Thread.current) print(2) } print(3) } Why in the concurrentQueue won't cause deadlock? Th...
pangyulei
1

votes
1

answer
66

Views

Looking for advice on how to avoid a Deadlock

I have in my application a similar situation to this: public class Example { private static A aClass = new A(); private static B bClass = new B(); public static void main(String[] args) { new Thread(new Runnable() { @Override public void run() { bClass.start(); } }, '>>>>>>>>>>').start(); new Thread...
Marius Manastireanu
1

votes
0

answer
119

Views

Deadlock when insert on duplicate key update sql using on multi unique key

Is sql like insert ... on duplicate key update will generate gap locks on every unique key index/primary key, disordered, when the row is not in table? I found that when using multi transactions to execute insert on duplicate key update sql on table with more than one unique key may cause deadlock....
Jeff Lee
1

votes
0

answer
98

Views

.Net MVC C# - Reading file takes too long

Occasionally our web service seems to stop. All transactions can not be processed instantaneously and errors occur after tens of seconds. Below is the Stactrace when the symptom occurs. Position: Microsoft.Win32.Win32Native.CreateFile(String lpFileName, Int32 dwDesiredAccess, FileShare dwShareMode,...
user3405759
1

votes
0

answer
38

Views

Possible to force order of TX locks in ORA?

While analyzing a deadlock caused by two concurrent SELECT FOR UPDATE statements I found following interesting article: https://hoopercharles.wordpress.com/2011/11/21/select-for-update-in-what-order-are-the-rows-locked/ The article proofs that Oracle behaves differently to MySQL & PostgreSQL by perf...
freecraver
1

votes
0

answer
49

Views

org.xnio.BrokenPipeException: Remote side closed the message stream intermittently exception in wildfly-9.0.1.Final causes deadlock

We are using wildfly-9.0.1.Final.EJB lookup throws following exception which causes Java-level deadlock.Can any one help me on this regard? Thanks in advance. Below error found in thread dump Found one Java-level deadlock: 'EJB default - 357': waiting to lock monitor 0x000000004913dc18 (object 0x00...
Babu
1

votes
0

answer
44

Views

JVM hang, unable to print stack information

One of my services is deadlocked, I can't print the stack information. Is there any way to troubleshoot the problem?
Frank Dsc
1

votes
0

answer
42

Views

SQL Server deadlock on junction table

I'm confronted with a deadlock on a junction table while one process deletes some entry and another process select another entry (in SQL Server 2014). Schema looks like this: CREATE TABLE Junction ( JunctionId BIGINT IDENTITY(1,1) PRIMARY KEY, Table1Id INT NOT NULL, Table2Id INT NOT NULL, FOREIGN KE...
KnightOfHell
1

votes
0

answer
107

Views

How to set a timeout for a lock (that has been acquired)?

I am recently working on a multithreaded project, and come across with a problem. SafeCreateProcessThread(); is being called every 220ms as long as the sensor is streaming. public void StreamingDisplayMonitor() { var dtStartTemp = DateTime.Now; while (IsStreaming) { if ((DateTime.Now - dtStartTemp)....
wenkang
1

votes
0

answer
18

Views

Sails Transaction DeadLock

Currently, I am developing an app under Sails 1.1.0. Following, you can find when the code seems to throw a deadlock. Basically, it is about an user visiting a web_url, which create for him a Token and an UnassignedGame models. During this creation process, I received sometimes a DeadLock in the dr...
Navid EMAD
1

votes
2

answer
46

Views

Is it possible for two threads to face deadlock with a single object instance?

As far as I know,two threads need at least two objects and a cycle wait situation to face deadlock.But is it possible for two threads to face deadlock centering one object instance?
Nafis Iqbal
1

votes
2

answer
77

Views

Resolving deadlock - SQL Server

I am getting a deadlock between these 2 queries from 2 separate stored procedures: 1. UPDATE ord SET [Num] = @Num, [Ref] = @Re, [Date] = @Date FROM [Order] ord INNER JOIN [Orders_Open] oo ON oo.Id = ord.ID 2. UPDATE oo SET oo.Name = i.Name, oo.Email = i.Email, oo.PostCode = i.PostCode, FROM Item_Ord...
Ryan Gadsdon
1

votes
0

answer
26

Views

iOS handle keychain cause deadLock?

I received a crash report as follow,is this handle keychain cause deadlock?
apricot
1

votes
0

answer
37

Views

Getting Deadlock while updating in bulk in django

Getting Deadlock while updating transactions in bulk using django function bulk_update in with transaction.atomic()? can someone help me here? Error :- deadlock detected DETAIL: Process 'abc' waits for ShareLock on transaction 'xyz'; blocked by process 'qaz'. Process 'tgb' waits for ShareLock on tr...
Rahul Yadav
1

votes
0

answer
52

Views

Can a call to printStackTrace hangs my program

I have 2 threads running. One for network event, the other one for the program logic. Since I need some synchronization, I use the Java ReetrantLock class. Network thread workflow: - Receive a message - Wait for the lock (myLock.lock()) - Pass the message to the logic thread - Release the lock (myLo...
Django

View additional questions