由买买提看人间百态

topics

全部话题 - 话题: deadlock
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
D**s
发帖数: 6361
1
【 以下文字转载自 USANews 讨论区 】
发信人: MVPYao (退役了 | Hall of Famer), 信区: USANews
标 题: Obama: court deadlock 'takes us further from the country we
发信站: BBS 未名空间站 (Thu Jun 23 12:17:08 2016, 美东)
http://www.theguardian.com/us-news/live/2016/jun/23/gun-control-sit-in-democrats-john-lewis
Obama: 'I have pushed to the limits of my executive authority'
Obama says that while the supreme court deadlock “does not substantially
change what has been the status quo,” congressional action on immigration
is now the only... 阅读全帖
c**y
发帖数: 172
2
来自主题: JobHunting版 - deadlock一问
From operating system perspective, four conditions are necessary for
deadlock. Note that none of them is sufficient.
1. finite resources
2. circular wait
3. wait and hold
4. non preemptive
Deadlock can be avoided. Among the four conditions mentioned above, only
condition 2 can be regulated to avoid deadlock. In general the solution is
to put order in multiple locks, and a thread must acquire all necessary
locks in the same order. This way is usually called "canonical lock".
g*********e
发帖数: 14401
3
来自主题: JobHunting版 - 怎样 avoid deadlock ??
there are 4 conditions, all of which have to be satisfied for deadlock to
happen.
A deadlock situation can arise if and only if all of the following
conditions hold simultaneously in a system:[1]
Mutual Exclusion: At least one resource must be non-shareable.[1] Only one
process can use the resource at any given instant of time.
Hold and Wait or Resource Holding: A process is currently holding at least
one resource and requesting additional resources which are being held by
other processes.
No Pr... 阅读全帖
f*****e
发帖数: 5177
4
来自主题: Database版 - SQLServer Deadlock. Need help
Server: SQLServer 2000
Deadlock Log:
Deadlock encountered .... Printing deadlock information
2008-01-14 12:28:35.90 spid2
2008-01-14 12:28:35.90 spid2 Wait-for graph
2008-01-14 12:28:35.90 spid2
2008-01-14 12:28:35.90 spid2 Node:1
2008-01-14 12:28:35.90 spid2 KEY: 5:743673697:5 (9c04f775c7cf) CleanCnt:
1 Mode: X Flags: 0x0
2008-01-14 12:28:35.90 spid2 Grant List 0::
2008-01-14 12:28:35.90 spid2 Owner:0x474ebaa0 Mode: X Flg:0x0
Ref:0 Life:02000000 SPID:62 EC
c**t
发帖数: 2744
5
来自主题: Database版 - Deadlock on merge (oracle)
Two processes to merge data into same target/physical table:
A -> T; B -> T
SizeOf(A): 10K; SizeOf(B): 30K; SizeOf(T): 3 Million
As the tow processes running in parallel, it always cause deadlock:
Merge into T using A/B,
I am thinking to merge&commit A/B record by record to eliminate deadlock. Is
there any better way to avoid deadlock?
y*****n
发帖数: 11251
6
来自主题: Database版 - SQL server 2005 deadlock
做了一个windows service,多线程的对一个table 做insert. 结果出现sql server
deadlock. Exception
Exception: System.Data.SqlClient.SqlException: Transaction (Process ID 128)
was deadlocked on lock resources with another process and has been chosen as
the deadlock victim. Rerun the transaction.
at System.Data.SqlClient.SqlConnection.OnError(SqlException
觉得简单insert应该不会lock太多index太久吧? 每次insert 1000条.
我对SQL server不熟, DBA上个月辞职不干了.大家多帮帮忙吧,我好能早点回家睡觉.
L******e
发帖数: 136
7
来自主题: DotNet版 - 这样的deadlock如何debug? (转载)
【 以下文字转载自 Programming 讨论区 】
发信人: Leyunque (Le yunque), 信区: Programming
标 题: 这样的deadlock如何debug?
发信站: BBS 未名空间站 (Sun Jan 6 14:01:10 2013, 美东)
一个多线程程序,(C#),所有的Lock看起来都没有问题,运行起来会有Deadlock。程
序本身读取多个文件并存入数据库,(SQL server),有可能是C# Lock和SQL server
lock相互产生deadlock。
如何debug这样的情况呢?
M****o
发帖数: 4860
8
http://www.theguardian.com/us-news/live/2016/jun/23/gun-control-sit-in-democrats-john-lewis
Obama: 'I have pushed to the limits of my executive authority'
Obama says that while the supreme court deadlock “does not substantially
change what has been the status quo,” congressional action on immigration
is now the only way forward:
I have pushed to the limits of my executive authority. We now have to have
congress act.
Obama: Trump immigration policy is 'fantasy'
Obama does not mention Trump by nam... 阅读全帖
I******y
发帖数: 176
9
来自主题: JobHunting版 - careercup 150 deadlock 一题
design a class which provides a lock only if there are no possible deadlocks
解答并没有给出到底什么时候可以acquire lock阿.这个canAcquireResource具体怎么
实现呢
For our solution, we implement a wait / die deadlock prevention scheme.
1 class MyThread extends Thread {
2 long time;
3 ArrayList res = new ArrayList();
4 public ArrayList getRes() { return res; }
5
6 public void run() {
7 /*run infinitely*/
8 time = System.currentTimeMillis();
9 int count = 0;
10 while (true) {
11 if (count < 4) {
... 阅读全帖
u****g
发帖数: 402
10
来自主题: JobHunting版 - 怎么样避免deadlock?
deadlock的四个条件很清楚,但如何避免deadlock呢?
一直没找到啥比较好的答案
t******e
发帖数: 98
11
来自主题: JobHunting版 - Deadlock in Java
事后分析的话可以看JVM的dump文件,一般有cyclic resource dependency就说明有
deadlock。Debug SQL Server deadlock就常常看lock manager log file.
g*****g
发帖数: 34805
12
来自主题: JobHunting版 - Deadlock in Java
Nah, take a thread dump and lots of tools can find the deadlock for you.
You call run kill -3 on Linux to do that.
For large scale application, you want to also use JMX to monitor your job
thread pool, a critical deadlock will get your jobs piled up.
d*****h
发帖数: 8
13
I was asked with a question: In linux, your production process is deadlocked
. How to break the deadlock so that the production can proceed?
Is there any system tool in linux and kill one thread in another process?
What do they look for?
Thanks,
dt
g*****g
发帖数: 34805
14
来自主题: Database版 - Oracle Deadlock
I am getting a deadlock in Oracle
Single resource deadlock: blocking enqueue which blocks itself, f 0
Didn't find any useful result from google, does anyone know what this means?
i****a
发帖数: 36252
15
来自主题: Database版 - SQL server 2005 deadlock
keep it at 2 threads and you should be ok. above 2 then you'll get deadlocks
but depends on what you are doing, it may not be a big deal if you can just
insert records again of the deadlock victims

)
as
c*********e
发帖数: 16335
16
【 以下文字转载自 Programming 讨论区 】
发信人: convergence (Rex), 信区: Programming
标 题: c#怎么测试deadlock, race condition啊?
发信站: BBS 未名空间站 (Tue Jul 28 21:28:21 2015, 美东)
貌似有个chess,但是只有用于32位计算机的,不能用于64位。貌似就是几个学生为了完
成研究生论文搞的一个项目,现在都没进展,也没有提供下载。
c#大侠们,你们写的multi-threading code怎么test,怎么fix deadlock啊?
L******e
发帖数: 136
17
来自主题: Programming版 - 这样的deadlock如何debug?
一个多线程程序,(C#),所有的Lock看起来都没有问题,运行起来会有Deadlock。程
序本身读取多个文件并存入数据库,(SQL server),有可能是C# Lock和SQL server
lock相互产生deadlock。
如何debug这样的情况呢?
c*********e
发帖数: 16335
18
怎么测试?有没有专业软件测试?
看起来,java multi-threading project很容易有deadlock, race condition;而且很
难测试出来。大家的java multi-threading project,写出来之后怎么测试deadlock,
race condition的?
w******n
发帖数: 214
19
By MICHAEL TARM and DON BABWIN, Associated Press Writers – 8 mins ago
CHICAGO – A federal jury deadlocked Tuesday on all but one of 24 charges
against former Illinois Gov. Rod Blagojevich, including the most explosive
of all — that he tried to sell an appointment to President Barack Obama's
old Senate seat. Blagojevich was convicted on a single count of lying to
federal agents, one of the least serious charges.
Prosecutors pledged to retry the case as soon as possible.
"This jury shows you that
h*****g
发帖数: 312
20
来自主题: JobHunting版 - careerup 150 上一道deadlock 题
Design a class which provides a lock only if there are no possible deadlocks
.P86
书上给的答案没看懂。哪位能不能给说说这题啥意思?或者给写个code?
多谢了!
h*********3
发帖数: 111
21
来自主题: JobHunting版 - deadlock一问
deadlock 可以避免吗?
如果不行,说明原因。
如果可以,如何避免?
j********x
发帖数: 2330
22
来自主题: JobHunting版 - deadlock一问
deadlock avoidance and prevention is possible.
But may cause live lock if I remember right.
h*****f
发帖数: 248
23
来自主题: JobHunting版 - Deadlock in Java
Q: how do you know a deadlock happen?
一开始号我在想是看到100%的CPU usage,后来想一下,好像也不一定。因为
underneath的implementation可能是mutex而不是spin lock。那考官问,那为什么会有
100%的CPU使用率?当时没想到,后来想一下,不知道那100%的CPU使用率是来自应用
程序本身?
c****p
发帖数: 6474
24
来自主题: JobHunting版 - Deadlock in Java
deadlock发生的时候CPU占用率也有可能为0吧
p*****2
发帖数: 21240
25
来自主题: JobHunting版 - Deadlock in Java
deadlock的主要表现是程序freeze吧?
l*******b
发帖数: 2586
26
来自主题: JobHunting版 - 怎样 avoid deadlock ??
不太懂。。。deadlock和语言关系不大吧,都是对thread和数据加锁来实现
m****v
发帖数: 780
27
来自主题: JobHunting版 - 问一个deadlock的问题
Can there be a deadlock situation with single thread?
c*****d
发帖数: 6045
28
来自主题: Database版 - Deadlock on merge (oracle)
不应该呀?A->T,B->T 都是insert吗?
出现了deadlock错误提示?
c*****d
发帖数: 6045
29
来自主题: Database版 - Deadlock on merge (oracle)
B和A的做法一样
因为没有update操作,所以B->T, A->T同时操作也不会出现deadlock
c*****d
发帖数: 6045
30
来自主题: Database版 - Deadlock on merge (oracle)
???没看懂你的意思
我的意思是,在A->T, B->T的操作中,使用delete+insert替换update
所以A->T, B->T的操作可以同时进行,不会出现deadlock
c**t
发帖数: 2744
31
来自主题: Database版 - Deadlock on merge (oracle)
there are two apps running in parallel:
App1, every m minutes, select ETL.load_feed1 from dual;
App2, every n minutes, select ETL.load_feed2 from dual;
Assuming m > n; when app1 update/insert targetTable, app2 comes in and does
same thing. Now app1 will see different state of targetTable, deadlock
happens.
c**t
发帖数: 2744
32
来自主题: Database版 - Deadlock on merge (oracle)
tried:
merge into T using A
and
merge into T using B-A
still hit deadlock;

merge into T using AUB should fix that, but it's too time consuming. Where A
is fairly small, current hour data; B is historical-future data
a*******t
发帖数: 891
33
来自主题: Database版 - Oracle Deadlock
I don't know oracle, but is it just blocking, or the proccess actually got
killed as a deadlock victim?
multi-threaded proccess blocking itself's threads can be normal
B*****g
发帖数: 34098
34
来自主题: Database版 - Oracle DML deadlock problem
mutiple sessions insert (2 tables and only insert), 00060 error, oracle 9i,
deadlock似乎两个table都有。能是什么原因? 一个table好像有bitmap,另一个不确定
。会不会是ITL shortage?DBA不help。
谢谢
g***l
发帖数: 18555
35
来自主题: Database版 - SQL server 2005 deadlock
一般INSERT时间太长就容易DEADLOCK,一INSERT,就开始TABLE BLOCKING,如果
TRANSACTION太长,另外的INSERT就要等很久.注意光SELECT的话就WITH (NOLOCK)
DIRTY READ好了
y*****n
发帖数: 11251
36
来自主题: Database版 - SQL server 2005 deadlock
insert加了row lock了也不行。是不是insert都是lock整个table啊?
select with nolock也有deadlock。
y*****n
发帖数: 11251
37
来自主题: Database版 - SQL server 2005 deadlock
要求至少20个thread。看来没法用2个了。

deadlocks
just
z***y
发帖数: 7151
38
来自主题: Database版 - SQL server 2005 deadlock
很多情况造成Deadlock
你可以打开trace flag 1204 , 1222
然后可以在log里看到具体的情况。
如果是sql 2005+, 你可以试验一下snapshot isolation。

)
as
m******u
发帖数: 12400
39
if a deadlock occurs, system will kill one session as a victim. However the
query for the victim anyway should be executed. My question is how to set up
an automatic task to re-execute the victim's query. Thanks in advance.
w*s
发帖数: 7227
40
来自主题: Programming版 - How to avoid deadlock ?
How about c++ ?
i searched online, seems there're algorithms to detect deadlocks,
but not sure companies will implements these.
The only thing i remember is to acquire locks in orders for each thread. But
was not accepted in the interview.
L******e
发帖数: 136
41
来自主题: Programming版 - 这样的deadlock如何debug?
谢谢楼上的回答。不是说一次暂时解决数据读写问题,而是要从程序里找出哪里产生
Deadlock并且彻底解决这个问题。有什么主意吗?
f*******t
发帖数: 7549
42
deadlock: 看stack dump
race condition: 读log
c*****e
发帖数: 3226
43
Erlang, 也解决了99% deadlock 的问题。
i**i
发帖数: 1500
44
deadlock只要能重复出来就好弄。
race condition你能确定是这个原因已经是高手了。多线程相互无关还行,要有资源共
享,还没共享的统一策略,你就good luck吧。
r***s
发帖数: 737
45
死锁好办,每次acquire lock不成功的话走一下waiting graph 看有没有环就是了。
有现成工具。不满意的话自己用jvmti写一个
http://stackoverflow.com/questions/8126711/get-deadlock-detecti
race condition比较难找。一般是用function test来找。

,
c*********e
发帖数: 16335
46
我一个同事,用multi-threading做一个c# 课题,出现deadlock,半天都搞不定,最后
用single thread async做,交差了。

你懂个P.
p*****2
发帖数: 21240
47
这就是node的优势呀
不会有race condition 不需要lock 也就没有deadlock
c*********e
发帖数: 16335
48
我已经快看完了,确实很有帮助,至少让我知道改怎么写multi-threading code了。但
是,怎么测试race condition, deadlock, 书里没怎么讲。
--------------
c*********e
发帖数: 16335
49
来自主题: Programming版 - c#怎么测试deadlock, race condition啊?
貌似有个chess,但是只有用于32位计算机的,不能用于64位。貌似就是几个学生为了完
成研究生论文搞的一个项目,现在都没进展,也没有提供下载。
c#大侠们,你们写的multi-threading code怎么test,怎么fix deadlock啊?
p*a
发帖数: 592
50
来自主题: Programming版 - c#怎么测试deadlock, race condition啊?
re +1
做到这个应该不会deadlock。大部分情况用tpl,很少需要自己写thread了。
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)