Все вопросы: [deadlock]

124 вопросов

похожие теги: database-deadlocks
2
голосов
4ответов
943 просмотров

Как я могу попасть в тупик в этой ситуации?

В моем клиентском приложении есть такой метод (на практике он более сложный, но я оставил основную часть): public void btnUpdate_Click(...) { ... dataAdapter.Update(...); ... dataAdapter.Fill(...); // here I got exception one time } Исключение, которое я обнаружил в журналах, гово...

2
голосов
1ответов
600 просмотров

xml Обновление столбца и блокировка на сервере Sql

У меня есть несколько сервисов windwos.Они получают столбец xml от сервера Sql, манипулируют им и обновляют его. Служба A - получает XML Служба B - получает XML Сервис A - Обновляет XML (он будет утерян) Сервис B - обновляет XML Я должен заблокировать строку и использую следующий код: ...

0
голосов
2ответов
421 просмотров

разрешение тупика

У меня вызывается процедура Store для заполнения одной таблицы всякий раз, когда мы получаем входящие файлы. Иногда мы получаем более одного файла, и процедура вызывается одновременно. Внутри Процедуры утверждения довольно просты, как показано ниже: IF NOT EXISTS (SELECT.... WHERE A=1 B=2) ...

10
голосов
1ответов
3329 просмотров

Присоединение к экземпляру boost :: thread в деструкторе

Я наблюдаю проблему, при которой вызов boost thread-> join в деструкторе приводит к тупиковой ситуации.Я не понимаю, почему, и я не слишком заинтересован в сохранении кода, который просто работает (и я не понимаю, почему он работает) в проекте. Объявление класса (для краткости я вырезал мет...

0
голосов
2ответов
378 просмотров

Получение взаимоблокировок в sqlserver

Иногда на сервере sql возникают взаимоблокировки.Я создал функцию для блокировки операций, не связанных с базой данных (обработка кредитных карт), поэтому дублирование не может происходить.Мои функции следующие (извините за tcl, но sql достаточно ясен).Кто-нибудь может понять, почему иногда случ...

5
голосов
2ответов
9918 просмотров

IPhone SendDelegateMessage не вернулся после ожидания 10 секунд

Я постоянно получаю следующее сообщение от своего iPhone 3.0 при попытке преобразовать большой объект NSData в base64Encoding для передачи http: void SendDelegateMessage(NSInvocation*): delegate failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode Если вы н...

1
голосов
5ответов
1824 просмотров

Указывает ли этот дамп стека, что у меня тупик?

У меня есть служба REST, созданная с использованием Джерси . Когда я выполнил "завиток" своего REST API, команда зависает. Я запустил jstack, и это общий вывод двух потоков в состоянии ЗАБЛОКИРОВАНО. "pool-2-thread-11" prio=6 tid=0x01d51800 nid=0x2394 waiting for monitor entry [0x05e...

0
голосов
3ответов
841 просмотров

duplicacy problems while creating a sudoku puzzle

I am trying to create my own normal 9x9 sudoku puzzle. I divided the problem into two parts - creating a fully filled sudoku, and removing unnecessary numbers from the grid Right now, I am stuck with the first part. This is the algorithm I use in brief: a) first of all I choose a number...

0
голосов
4ответов
4632 просмотров

How can I catch Sybase bcp errors reliably?

We're using named pipes with Sybase bcp so that we can compress output on-the-fly. The Sybase bcp utility does not return much information in its exit code. Sybase documentation directs the user to inspect error messages written by the process. This is a paraphrase of the error handling idiom w...

11
голосов
6ответов
1988 просмотров

Question About Deadlock Situation in Java

I'm learning about deadlocks in Java, and there's this sample code from Sun's official tutorial: Alphonse and Gaston are friends, and great believers in courtesy. A strict rule of courtesy is that when you bow to a friend, you must remain bowed until your friend has a chance to retu...

3
голосов
5ответов
544 просмотров

Problem with synchronized collections of Java when doing equals() in the reverse order from multiple threads

Example scenario: Create two SynchronizedSets (s1 and s2) Pass them to two threads (T1 and T2) Start the threads T1's run() : while (forever) s1.equals(s2) T2's run() : while (forever) s2.equals(s1) What happens? - SynchronizedSet's equals acquires lock on itself It computes t...

2
голосов
4ответов
4671 просмотров

Shared memory access without semaphores

using shared memory apis in linux, If I have one write(by A process) and only one read( by B process) do I still need semaphore.?. Is there a example to show, using sharing memory without semaphore will get into deadlock state in linux.

2
голосов
4ответов
1825 просмотров

Two BlockingQueue - deadlock

I have a requirement to manipulate two queues atomically and am not sure what is the correct synchronization strategy: This is what I was trying: public class transfer { BlockingQueue firstQ; BlockingQueue secondQ; public moveToSecond() { synchronized (this){ Ob...

1
голосов
2ответов
1500 просмотров

BlockedLinkedQueue deadlock inside synchronized method

This could be a newbie question - I am running into a deadlock situation while using BlockedLinkedQueue - Here is a snipped of my code: public class mytest { private BlockedLinkedQueue myQueue; public synchronized void consumer() { ... myQueue.take() ... } ...

7
голосов
2ответов
4243 просмотров

DeadLock Issues in Process.StandardOutput.ReadToEnd();

I read that this portion of code can cause deadlock: Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "Write500Lines.exe"; p.Start(); p.WaitForExit(); string output = p.StandardOutput.ReadToEnd(); Because ...

3
голосов
1ответов
804 просмотров

Does the MSDN example usage of ReaderWriterLockSlim contain deadlock risk?

I'm using a ReaderWriterLockSlim to protect access to the cache on my ASP.NET application. MSDN has examples of using the lock. However this article http://www.nobletech.co.uk/Articles/ReaderWriterLockMgr.aspx has me worried about deadlocks. Is this really a risk? Should the MSDN documentation me...

0
голосов
3ответов
630 просмотров

SQL Server 2005 Deadlock Problem

I’m running into a deadlock problem when trying to lock some records so that no process (Windows service) picks the items to service them, then update the status and then return a recordset. Can you please let me know why am I getting the deadlock issue when this proc is invoked? CREATE PROCEDU...

5
голосов
2ответов
4016 просмотров

SqlServer 2005: deadlock problem with no shared records

I have a deadlock problem with two transactions that do not access any common records. There is also no lock escalation. So I can't explain why a deadlock is possible. The deadlock occurs when two such transactions are executed at the same time: begin transaction update A set [value] = [value]...

2
голосов
6ответов
2722 просмотров

Is the C# "lock" construct rendered obsolete by Interlocked.CompareExchange<t>?</t>

Summary: It seems to me that: wrapping fields representing a logical state into a single immutable consumable object updating the object's authoritative reference with a call to Interlocked.CompareExchange&lt;T&gt; and handling update failures appropriately provides a kind of concurrency tha...

3
голосов
4ответов
5428 просмотров

Table locked during inserts... website unusable (sql server 2008)

I have a background process that is constantly inserting into a table in real-time. It could be thousands of inserts an hour (with a few updates). This same table is used by the web application to get some data needed to display to the user. Currently whenever the background process runs its in...

0
голосов
2ответов
1392 просмотров

Can you force a SQL Stored Procedure to take locks in a given order

I have two stored procedures, one of which is called a lot and is thus very simple and executes well. Additionally, these actually work very nicely in paralell even though they are serializable. However I have a second query that is only called in certain circumstances which needs to do many mo...

92
голосов
28ответов
133169 просмотров

Simple Deadlock Examples

I would like to explain threading deadlocks to newbies. I have seen many examples for deadlocks in the past, some using code and some using illustrations (like the famous 4 cars). There are also classic easily-deadlocked problems like The Dining Philosophers, but these may be too complex for a re...

0
голосов
2ответов
558 просмотров

What kinds of concurrency/deadlock issues should one be aware of in Rails code?

I've just come to a realization about deadlocks - namely what they are - and I'm concerned about this issue affecting my Rails code. Are there any specific deadlock issues to watch out for while developing a Rails app? Have you ever encountered a deadlock in your Rails code - or is that even po...

4
голосов
6ответов
4536 просмотров

How commonly do deadlock issues occur in programming?

I've programmed in a number of languages, but I am not aware of deadlocks in my code. I took this to mean it doesn't happen. Does this happen frequently (in programming, not in the databases) enough that I should be concerned about it?

6
голосов
7ответов
2652 просмотров

Why is lockless concurrency such a big deal (in Clojure)?

I'm told that Clojure has lockless concurrency and that this is Important. I've used a number of languages but didn't realize they were performing locks behind the scenes. Why is this an advantage in Clojure (or in any language that has this feature)?

5
голосов
3ответов
8590 просмотров

How to change locking strategy in SQL Server?

I've read articles like these: http://www.codinghorror.com/blog/archives/001166.html http://www.databasejournal.com/features/mssql/article.php/3566746/Controlling-Transactions-and-Locks-Part-5-SQL-2005-Snapshots.htm And from what I understand, SQL Server has a very pessimistic locking strategy. ...

20
голосов
2ответов
10511 просмотров

Multiprocessing debug techniques

I'm having trouble debugging a multi-process application (specifically using a process pool in python's multiprocessing module). I have an apparent deadlock and I do not know what is causing it. The stack trace is not sufficient to describe the issue, as it only displays code in the multiprocessi...

0
голосов
1ответов
1038 просмотров

ContextSwitchDeadlock when running unit (integration) tests

We get the following error when running at test: ContextSwitchDeadlock was detected Message: The CLR has been unable to transition from COM context 0x344b0c0 to COM context 0x344b230 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping...

0
голосов
4ответов
3683 просмотров

sql server 2005 deadlock times out in production, not in test environment: why?

In my development environment, I seek to recreate a production issue we face with MSSQL 2005. This issue has two parts: The Problem 1) A deadlock occurs and MSSQL selects one connection ("Connection X") as the 'victim'. 2) All subsequent attempts to use "Connection X" fail (we use connection po...

2
голосов
2ответов
823 просмотров

some good tutorials about SQL Server deadlock?

I am learning SQL Server deadlock, about why there is deadlock, how to solve dead lock issue, best practices, how to analyze why deadlock happens. I am working on SQL Server 2008 Enterprise. Any recommended readings for me? thank in advance, George