deadlock

Deadlock on 2 pages

依然范特西╮ 提交于 2019-12-05 22:48:46
I'm troubleshooting some deadlocks I'm seeing in a production environment and I'm new to this but something seemed odd to me. So I have the deadlock graph below: The right side of the deadlock is an update that is the following: UPDATE order_sub_line SET sub_line_status = 300 WHERE order_sub_line_id = '75C387EC-A1A7-4587-9FA0-DD33A49009BC' It looks to me in the graph that this update is trying to acquire 2 page locks. order_sub_line_id is a clustered index. Should this be trying to acquire 2 page locks and if so why? Additional Information: The deadlock victim is a view (joins a few other

Troubleshooting a COM+ application deadlock

谁说胖子不能爱 提交于 2019-12-05 21:26:43
I'm trying to troubleshoot a COM+ application that deadlocks intermittently. The last time it locked up, I was able to take a usermode dump of the dllhost process and analyze it using WinDbg. After inspecting all the threads and locks, it all boils down to a critical section owned by this thread: ChildEBP RetAddr Args to Child 0deefd00 7c822114 77e6bb08 000004d4 00000000 ntdll!KiFastSystemCallRet 0deefd04 77e6bb08 000004d4 00000000 0deefd48 ntdll!ZwWaitForSingleObject+0xc 0deefd74 77e6ba72 000004d4 00002710 00000000 kernel32!WaitForSingleObjectEx+0xac 0deefd88 75bb22b9 000004d4 00002710

Java deadlock problem

大憨熊 提交于 2019-12-05 21:03:17
I am using java sockets for communication. On the client side I have some processing and at this point I send an object to the cient. The code is as follows: while (true) { try { Socket server = new Socket("localhost", 3000); OutputStream os = server.getOutputStream(); InputStream is = server.getInputStream(); CommMessage commMessage = new CommMessageImpl(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(commMessage); os.write(bos.toByteArray()); os.flush(); byte[] buff = new byte[512]; int bytesRead = 0;

Simulating a deadlock on a thread

送分小仙女□ 提交于 2019-12-05 20:59:04
I have 3 threads, that are currently running simultaneously. def f1(): print "running first thread\n" sleep(10) def f2(): print "running second thread\n" sleep(10) def f3(): print "running third thread\n" sleep(10) if __name__ == "__main__": thread1 = Thread(target = f1) thread2 = Thread(target = f2) thread3 = Thread(target = f3) try: thread1 = Thread(target = f1) thread1.start() thread2 = Thread(target = f2) thread2.start() thread3 = Thread(target = f3) thread3.start() while(thread1.isAlive() or thread2.isAlive() or thread3.isAlive()): thread1.join() thread2.join() thread3.join() except

Deadlock with no user code

♀尐吖头ヾ 提交于 2019-12-05 19:34:28
I'm getting a deadlock in my C++ program, which used std::thread, std::mutex, std::condition_variable, etc. There's nothing in itself strange about that, until I look at the stacks for each of the threads in my process: 8532 0 Main Thread Main Thread msvcr120.dll!Concurrency::details::ExternalContextBase::Block Normal ntdll.dll!_ZwWaitForSingleObject@12() KernelBase.dll!_WaitForSingleObjectEx@12() kernel32.dll!_WaitForSingleObjectExImplementation@12() msvcr120.dll!Concurrency::details::ExternalContextBase::Block() Line 145 ntdll.dll!_ZwQueryVirtualMemory@24() kernel32.dll!_BasepFillUEFInfo@8()

When does InnoDB time out instead of reporting deadlock?

拜拜、爱过 提交于 2019-12-05 18:38:32
I have a "Lock wait timeout exceeded" error from MySQL that I can't reproduce or diagnose. I'm sure it's deadlock (as opposed to a transaction grabbing a lock then twiddling its thumbs), because my logs show that another process started at the same time, also hung, then continued when the first timed out. But normally, InnoDB detects deadlocks without timing out. So I am trying to understand why this deadlock was not detected. Both transactions are using isolation level serializable. (I have a fair understanding of InnoDB locking in this isolation level.) There is one non-InnoDB (MyISAM) table

Deadlock at Microsoft.Win32.Win32Native.CreateFile

这一生的挚爱 提交于 2019-12-05 18:31:40
We have a WCF service that reads and writes documents on a network file storage (shared folder). Occasionally we see a situation where threads start to get stuck in the Win32Native code. Once a thread gets blocked, all the consequent calls are blocked as well. The interesting thing is that the issue does not go away after the windows service is restarted. Very first thread that tries to work with the document storage blocks and the issue repeats. Only after the server is rebooted, the service continues to work without issues for some time (sometimes a few days, and sometimes a few weeks). This

Deadlock vs Lockwait Timeout on MySQL [closed]

﹥>﹥吖頭↗ 提交于 2019-12-05 18:16:33
Can anyone explain me on details the difference of Deadlock and Lockwait errors found on MySQL 5.1. Is it just the same? When does the deadlock error occur and when does the lockwait timeout occur? A deadlock occurs where a circular dependency exists amongst the locks that transactions must acquire in order to proceed: for example, imagine that transaction 1 holds lock A but needs to acquire lock B to proceed; and transaction 2 holds lock B but needs to acquire lock A to proceed—the transactions are immediately deadlocked (no timeout required) and neither can proceed until one releases its

How to diagnose or detect deadlocks in Java static initializers

半腔热情 提交于 2019-12-05 17:18:03
问题 (Whether using static initializers in Java is a good idea is out of scope for this question.) I am encountering deadlocks in my Scala application, which I think are caused by interlocking static initializers in the compiled classes. My question is how to detect and diagnose these deadlocks -- I have found that the normal JVM tools for deadlocks do not seem to work when static initializer blocks are involved. Here is a simple example Java app which deadlocks in a static initializer: public

Query is locking tables, can't kill that process

送分小仙女□ 提交于 2019-12-05 11:59:58
I have a query locking tables in MySQL (using InnoDB): UPDATE table SET status = 2 WHERE status = 3 This query caused a deadlock on the table and can't bypass it. I tried to do: show processlist then kill the process id but i can't seems to kill it I tried: kill 9588 9588 is the process id. Then I do show processlist I still see the same query on the list. How can I force killing this process and then why would this query cause a dead lock? how can I fix it? When you run a MySQL instance on RDS and want to kill a thread or a query for some reason, you’ll find you cannot use KILL or mysqladmin