Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!q40g2000prh.googlegroups.com!not-for-mail From: Joe Snodgrass Newsgroups: comp.lang.java.programmer,comp.lang.c++ Subject: Re: What's the deal with deadlocks Date: Wed, 20 Apr 2011 17:00:21 -0700 (PDT) Organization: http://groups.google.com Lines: 72 Message-ID: <1c19dce4-211f-4092-93e9-e580397b9ddd@q40g2000prh.googlegroups.com> References: <23020668-d86c-489a-988b-7b379f34851c@j13g2000pro.googlegroups.com> <575d7b43-51c4-4905-ba16-15fe9b78373e@t16g2000vbi.googlegroups.com> <913q7eFpdlU3@mid.individual.net> <7c038630-5773-4ef1-8b59-1a0d6fa9acd5@z7g2000prh.googlegroups.com> NNTP-Posting-Host: 76.241.191.203 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1303344021 17870 127.0.0.1 (21 Apr 2011 00:00:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 21 Apr 2011 00:00:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q40g2000prh.googlegroups.com; posting-host=76.241.191.203; posting-account=9QAC6QoAAAAzuHuC9e_PYiXCW3Uf2Pex User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16 ( .NET CLR 3.5.30729),gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3170 comp.lang.c++:4096 On Apr 19, 11:01=A0pm, Lew wrote: > Joe Snodgrass wrote: > > Ok, so tell me if this is how it works. > > I'm going to respond to your /reductio ad absurdum/ as though you were > presenting a serious argument. > > > You got a concurrent programming project, let's say in C++, and you're > > climbing the walls, because the results are unpredictable, the > > debugger shows nothing and the code looks fine. > > The argument breaks down right here. > > The code *looks* fine is a function of how one looks, not of the code. = =A0Buying > OCCAM or MAGICBOOJUM won't fix diddly, because the failure is in the Mark= 1 > Eyeball and associated neural control and analysis circuits, not the soft= ware > tools. > > "The debugger shows nothing" is useless because debuggers don't diagnose > concurrency issues until they happen, and then only if you catch them in = the > right place. =A0But hey, you throw enough shit at the wall and some of it= will > stick, right? > > "The results are unpredictable" only because one hasn't gathered enough > information to make a prediction. =A0The problem isn't in the results, on= ce > again. =A0The failure is in the one gathering the information. > > So given the failure in the premises, any correctness in the conclusion w= ill > be pure coincidence. > > > You say to yourself "It's gotta be a race condition, right? =A0I mean > > I've tried everything else, and the behavior is consistent with that." > > Right, because incomplete information gathering combined with lame and > ridiculously insufficient and misguided analysis should always be followe= d > immediately by an baseless leap to an unfounded conclusion, followed by a= rush > to a randomly-chosen and utterly misunderstood ameliorative strategy. > > > > > The solution is to push C++ onto the back burner, whip out your credit > > card and buy a copy of Occam (or Linda, or whatever the kids are using > > these days.) > > > Your job now becomes to interface Occam into your existing C++ code > > and use the Occam features to find and fix the race condition. =A0Then > > you go back to C++ and work on whatever the boss says he wants done > > next. > > > But the key is to give up all hope of ever fixing the race condition > > WITHOUT a language like Occam, because if you don't buy Occam, you're > > gonna be twisting in the wind until you're so far behind schedule that > > the boss fires you. > > > Am I correct that my description is a highly reliable portrayal of how > > these situations develop? > > No. =A0At least, there's no evidence here that you are. OK, so two of you have just contradicted me sarcastically, which means my post must have been wrong. In other words, there ARE ways to find and fix race conditions with without using a language like Occam. What are they, and where can I read up on them?