deadlock

find mysql deadlock reasons

1.I have a script, that executes some update/delete operations 2.All sql operations are executed inside transaction(InnoDb tables) 3.From time to time I get "Deadlock found when trying to get lock; try restarting transaction" There are some other jobs in this application, that perform database operations. My problem is to find which ...

iOS iPad GUI deadlock on startup. Hung on splash screen.

My iPad app hangs on startup sometimes. It looks like the main thread is getting deadlocked with another thread but not sure why. Any ideas on what's causing this and how to debug this? FYI my app starts as a splitview controller with a listview on the left and a webview on the right. If I start in portrait mode with the list view hidd...

Entity Framework deadlock problem

I'm having a strange problem with new Entity Framework for .NET 4 I have a SQL Server 2005 (EXPRESS) database and my service writes data to two tables using entity framework. Let's say tables are TableA and TableB. TableB has foreign key to TableA. In my program there are several threads that writes data in parallel. Each thread has its...

Yet another C# Deadlock Debugging Question

Hi All, I have a multi-threaded application build in C# using VS2010 Professional. It's quite a large application and we've experienced the classing GUI cross-threading and deadlock issues before, but in the past month we've noticed the appears to lock up when left idle for around 20-30 minutes. The application is irresponsive and alth...

Debugging a Deadlock with Windbg's !clrstack command

When I issued clrstack command, I got the following output. It is the callstack of a blocking thread which owns a deadlock and results in a deadlock. Is that its exact purpose? Does it have any other purposes (without any parameters). Where can I get more information? !clrstack OS Thread Id: 0x1b2c (6956) ESP EIP 0012f370 7c9...

Is there any way to get NHibernate to emit a deadlock hint?

Is there any way to get NHibernate to emit a deadlock hint? e.g. for SQL server "SET DEADLOCK_PRIORITY LOW". At the moment I'm just executing a raw SQL query. ...

Multiple isolation levels needed for a TransactionScope?

I am running into situations in my application where I need to use table lock hints or set the transaction isolation level to something other than the default Read Committed, in order to resolve deadlock issues. I am using a service oriented architecture, with each service call operating as an atomic operation, and Linq To Sql is servin...

Do in-memory objects limited to user/session scope need to be thread-safe?

// Not thread-safe class ShoppingCart { private List<Product> products; public void Add(Product p) { products.Add(p); } public void Remove(Product p) { products.Remove(p); } } Whenever user triggers an action associated with shopping cart, we pull it out and do what is needed. // Could be a HTTP GET or AJAX pull Add(Produ...

Dead-locks in Java: When they occur?

I am working on an app for the J2ME and sometime it freezes completely and it takes quite some time for the AMS to close it. It seems to me like a dead-lock issue. Could you advise me as to what could cause dead locks? Would, for instance, calling a synchronized method of a object cause dead lock if it calls another synchronized method ...

Is there a way to prevent from deadlocks (and what happens is one occurs and one is victimized)

Hi, I've tried to read an article on locks and deadlocks, and it just doesn't land, al the different kind of locks. We're running 2 different processes which try to edit records in the same table. The first process reads the new data and sends it to an external party and updates the status accordingly, the other one receives the receive...

Would the following SQL Statements be the cause of a deadlock?

Hi, I'm looking for a way to explain a deadlocking issue. I think I know what is causing it, but I'm not sure of the exact events. We have a long-running view (several seconds). We are updating one of the tables that is used in that view. The updates can also take several seconds. The update statements that are running when the dea...

Deadlocked when allocating an std::string

Hi, I have an application with several threads running. I have 2 threads that seem deadlocked when trying to allocate an std::string. Inspecting the backtrace of both threads suggest that at some point one has tried to allocate an std::string, and got a bad_alloc exception. In its catch block, another string is created in an attempt to ...

Hibernate joined-subclass deadlocks with MSSQL

I'm using Hibernate with Joined-SubClasses to Map a class hierarchy to a database. Unfortunately this causes deadlocks when an object is updated while a different thread is trying to load the same object. With objects that are mapped to a single table this is no problem. This seems to be caused the way MSSQL acquires locks on the table...

.NET SyncLock order deadlock

If I have two Synclocks synclock a synclock b end synclock end synclock am I in danger of a deadlock if I never have synclock b synclock a end synclock end synclock in my code, but I do synclock on a or b randomly? ...

Deadlock issue with SQL Server 2008 and ADO.NET

In our applications we don't use either ADO.NET transaction or SQL Server transactions in procedures and now we are getting the below error in our website when multiple people are using. Transaction (Process ID 73) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim...

Does a Deadlock Occur in This Case?

Am I right in saying that a deadlock is supposed to happen in the following case: Object P calls a synch method of object A, that calls a synch method of object B, that calls a synch method of object A. Sorry if it looks stupid of me, most probably it is. But that's why I'm asking. Thanks! ...

Threading problems in Java

I have the following problem. My J2ME app goes totally dead. I though it was a deadlock, but using NetBeans' built-in functionality, it couldn't find such. After some time however, it started throwing out the following messages in the console: 8242276 - CORE - CRITICAL - 2 - **event queue 3 full, dropping event 8242284 - CORE - CRITICA...

How to find BOTH threads of a deadlock ?

Hi guys, We're having the classic spring/hibernate/mysql stack running in Tomcat 5.5. Once in a while we're getting a deadlock when the attempt times out to lock a table row. Some kind of deadlock exception is thrown. The exception is clear and the stack trace indicate what went wrong. But it doesn't show the other thread which is hold...

Understanding deadlocks with SQL Server query notifications

Hi I'm running into trouble with Query Notifications on SQL Server 2008 sp1. I have a table _sys_Events that multiple writers write entries into, and multiple readers perform SELECT statements with Query Notification to get latest entries immediately (this is done through .Net System.Data.SqlClient.SqlDependency class). Our database is ...

Deadlock caused by SELECT JOIN statement with SQL Server

When executing a SELECT statement with a JOIN of two tables SQL Server seems to lock both tables of the statement individually. For example by a query like this: SELECT ... FROM table1 LEFT JOIN table2 ON table1.id = table2.id WHERE ... I found out that the order of the locks depends on the WHERE condition. The que...