Hi,
I’ve a program developed using xlib and cairo. Just for the reference I do mix calls between cairo and xlib, although I’m not sure If that might be the cause of the error.
I get a deadlock or a block in some situations.
I’ve three threads that work with xlib. One is the main UI thread which makes calls to both xlib and cairo, anothe...
I have a Python daemon running in production. It employs between 7 and 120 threads. Recently the smallest instance (7 threads) started to show hangs while all other instances never showed this kind of problem. Attaching strace to the python process shows that all threads are calling futex FUTEX_WAIT_PRIVATE, so they are probably trying t...
Hello,
I have a ongoing issue with my website, where it appears the W3wp.exe crashes and in turn anyone attempting to connect to the site will receive a SQL server timeout error.
The error is this...
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is no...
Code from Java concurrency in practice book Listing 8.1
Why is the code deadlocking? Is it because the rpt.call in main() is basically the same thread as that in Executors?
Even if I use 10 thread for exec = Executors.newFixedThreadPool(10); it still deadlocks?
public class ThreadDeadlock {
ExecutorService exec = Executors.newSingle...
Putting peoples opinions about garbage collection aside are there any deadlocking issues with the following:
private static readonly object lockObj = new object();
lock(lockObj )
{
///Load objects into a cache List<object> from DB call
GC.Collect(2);
GC.WaitForPendingFinalizers();
GC.Collect(...
Read that deadlock can happen in a single threaded java program. I am wondering how since there won't be any competition after all. As far as I can remember, books illustrate examples with more than one thread. Can you please give an example if it can happen with a single thread.
...
I am using SQLServer 2005 and designed a DAO running insert sql like this:
INSERT INTO eventsources (recevied_event_time_stamp, recevied_event_curve_name, recevied_event_curve_value, recevied_event_quote_date, total_time_for_event_processing, number_of_published_events{0}, triggered_curve, recevied_event_day)
however, the system throw...
I have a question, I am always asked this in the interviews multiple times--
How is synchronization implemented in java..
I have answered--
using trylock() mechanism
using wait, notify ,and notifyAll() methods in java
using synchronized blocks
using synchronized for class and object level
using mutexes for synchronization
using re-entr...
I have heard about this problem and now I am looking for more specific information?
How does it happens, what are the reasons for that, detailed explanation of the mechanism of the deadlock to try to avoid it. How to detect the deadlock, solve it and protect the data from being corrupted because of it. The case is when using MySQL with ...
I have an insert statement that was deadlocking using linq. So I placed it in a stored proc incase the surrounding statements were affecting it.
Now the Stored Proc is dead locked. Something about the insert statement is locking itself according to the Server Profiler. It claims that two of those insert statements were waiting for the ...
I have old code in Java which deadlocks... I never used netbeans as a development tool... however, I need to fix the code.
I ran the application in debug mode, clicked on check for deadlock and netBeans brought a screen. Two out of four threads were in red... see the screen dump below.
I'm new to multithreading, and on the top of that ...
I have a Asp.net web service that I connect to and that insert, update or delete max 30 rows in a large MySql table using transaction to make the process faster. The whole process should just run in a few secs. Sometimes I can see in the logs that the user gets error:
Timeout expired. The timeout period elapsed prior to completion of th...
I have GDB attached to a deadlocked application written with pthreads. There are ~10 threads that are all blocked, and I'd like to know which locks are held by which threads. This is possible in WinDbg using SOS.dll; is this possible in GDB?
...
I've been working on a small sand-boxed example to help me figure out how to use rwlocks. Everything seems fairly straightforward, however I'm getting deadlocks in my example every once and a while and don't understand why it's happening.
I've put the code example on pastebin because it's more than a few lines of code: http://pastebin.o...
What pattern/architecture do you use in a 3-tiered application using NHibernate that needs to support retries on transaction failures, when you are using the Session-Per-Request pattern? (as ISession becomes invalid after an exception, even if this is a deadlock or timeout or livelock exception).
...
Hi can any of you tell me how I can achieve the same or atleast mimic the behaviour.
What i want to achieve is that there are two independent tasks each having no clue of the others existence and one of the tasks reads from a table and the other deletes and writes into this table. I want the delete and write to occur only when there are...
Are there any plugins for Rails 3 (or ActiveRecord 3) that replicate the old deadlock_retry plugin? Or, does that plugin still work with Rails 3?
...
If innodb detects a 3 way deadlock, would it report on all the involved transactions in the "LAST DEADLOCK DETECTED" section of "show engine innodb status" ?
Also when innodb reports a deadlock, why doesn't it ever report the locks TRANSACTION (1) holds?
It reports locks TRANSACTION (1) is waiting for,
It reports locks TRANSACTION (2) is...
I've been searching information on Peterson's algorithm but have come across references stating it does not satisfy starvation but only deadlock. Is this true? and if so can someone elaborate on why it does not?
Peterson's algorithm:
flag[0] = 0;
flag[1] = 0;
turn;
P0: flag[0] = 1;
turn ...
if there are two threads as producer/consumer is it good idea to have following line to prevent deadlocks. I'm aware of live locks but suppose they do a lot of work before calling this Wait() method:
// member variable
object _syncLock = new object();
void Wait()
{
lock (_syncLock)
{
Monitor.Pulse(_syncLock);
...