deadlock

Python multiprocessing.Queue deadlocks on put and get

I'm having deadlock problems with this piece of code: def _entropy_split_parallel(data_train, answers_train, weights): CPUS = 1 #multiprocessing.cpu_count() NUMBER_TASKS = len(data_train[0]) processes = [] multi_list = zip(data_train, answers_train, weights) task_queue = multiprocessing.Queue() done_queue = mu...

Order of locks in query (postgresql)

Database has table X and tables An, Bn, Cn, Dn that inherits from X. Process 1 queries periodically data from X. Process 2 updates data in child tables. For example, to update tables An and Bn it creates new tables Am and Bm, loads data into them, locks in access exclusive An, Bn, drops An and Bn and alters Am and Bm to inherit X. The...

Difference between racearound condition and deadlock

What is the difference between a dead lock and a race around condition in programming terms? ...

Trace a deadlock in Ruby

I use BrB to share a datasource for various worker processes in Ruby 1.9 that I fork with Process#fork like the following: Thread.abort_on_exception = true fork do puts "Initializing data source process... (PID: #{Process.pid})" data = DataSource.new(files) BrB::Service.start_service(:object => data, :verbose => false, :host => ...

why is Ricart-Agrawala algorithm deadlock free?

Can someone explain why this algorithm is free from deadlock specifically? thanks ...

What should happen when a deadlock is detected

Say I want to implement a database with a lock system, and I use lock avoidance and try to avoid a potential deadlock before acquiring it. My question is: When the session/transaction has already successfully acquired some resource A, and now it tries to acquire lock on resource B, when a deadlock is detected. Hence, the session fails...

Python2.7 Active Console to Prevent Deadlock?

I noticed an interesting behavior for my system on Windows XP To debug my system, I used cmd console to start the server xProcess = subprocess.Popen(args='Python.exe ClntMgrSvrFact.py', creationflags=CreationFlags|win32con.CREATE_NEW_CONSOLE) For each client(MSExcel) connected via TCP/IP, server factory will spawn a new process using...

SQl statement to monitor Sql Server Locks

Wich SQL sentence (function or stored procedure) i can use to monitor an SQL Server DeadLock , caused by an UPDATE statement? ...

Resource Allocation Graph with Deadlock

I am doing project in computer science, and i came know the term 7-process resource allocation graph with deadlocks. I wonder how does it look because i dont know anything about deadlocks. ...

JDBC & Deadlock avoidance question (Basic)

I'm using JDBC (through Spring's JDBCTemplate) to access a small number of tables in a database. Although I haven't had anything happen yet, I'm concerned about the possibility of deadlock. I was under the impression there was a way to specify a lock order for queries that access multiple tables for deadlock avoidance, but I don't know...

Am I deadlocking? Why?

I have a Silverlight 3 application which needs to call WCF service. The WCF service in turn calls an ASMX web service. When the WCF service call completes, the silverlight UI needs to be updated. WCF is being called in async. The thing is that the Silverlight app needs to call the WCF method(which later calls asmx internally) hundreds ...

How to debug a deadlock under mac osx?

I'm developing a port of audio player to Mac environment. It works fine under windows, but not with Mac. I got an unpredictable deadlock when I'm playing the music with the player, the only information I can get is to dump the stack of threads of the hanging process. Here is the call stack I get: Sampling process 1808 for 1 seconds w...

Deadlock on logging variable value changes using a SQL task

Morning I've been reading "SQL Server 2008 Integration Services Problem - Design - Solution". It outlines a way of logging variable changes which I'm trying to replicate in SQL 2005. Create variables e.g. PackageId, RecordsAffected. - Set Raise ChangeEvent to true. Create a string variable g.g. strVariableValue. - Set Raise ChangeEve...

Deadlocks - Will this really help?

So I've got a query that keeps deadlocking on me. People who know the system well can't figure out why the sproc is deadlocking, but they tell me that I should just add this to it: SET NOCOUNT ON SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED Is this really a valid solution? What does that do? ...

Handle NHibernate Transaction Errors

Our application (which uses NHibernate and ASP.NET MVC), when put under stress tests throws a lot of NHibernate transaction errors. The major types are: Transaction not connected, or was disconnected Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) Transaction (Process ID 177) was deadlocked on...

minimizing table deadlock in my scenario with oracle and innodb

Hi, I have 35 functions that update 1 to 3 tables, in a transaction. However, they don't just execute updates, but they do queries as well. Table 1 does row update only actions, and some queries. Table 2 does queries and row level updates to existing rows, and sometimes deletes and adds rows. Table 2 may have queries within the trans...

Why can I deadlock in a single-threaded FLTK application?

I have a supposedly single-threaded FLTK application with a popup menu, created with Fluid. I have a class that sub-classes Fl_Gl_Window and implements a handle() method. The handle() method calls a function that creates a popup window on right-click. I have a long operation that I do for one of the menu items. My application has cre...

How can multiple Stored Procedures update same row at same time?

I am using SSIS 2008 to execute multiple stored procedures in parallel in control flow. Each SP is supposed to ultimately update 1 row in a table. The point to note is that each SP has a defined responsibility to update specific columns only. It is guaranteed that the different SPs will not update each other's columns. So the columns t...

DEADLOCK, EJB 3.1 with asynchronous Method and TimerService in Singleton

In my Singleton-EJB i start a TimerService every 2 minutes. When a client access the test method sometimes the application runs into a deadlock. The problem is, the test method calls a asynchronous method inside the EJB (see Method determineABC). The deadlock happens when the scheduleMethod tries to create a single action timer and there...

Is it possible for a thread to Deadlock itself?

Is it technically possible for a thread in Java to deadlock itself? I was asked this at an interview a while back and responded that it wasn't possible but the interviewer told me that it is. Unfortunately I wasn't able to get his method on how to acheive this deadlock. This got me thinking and the only situation that I can think of is...