A Simple Deadlock Challenge

Its been a few months since we’ve released the Alpha version of Typemock Racer. Since then we have been using it internally and we’re quite confident that it can find most deadlocks we can think of – care to prove us wrong?

It’s really simple – Can you create code that has a deadlock that Typemock Racer can’t find?

Rules:

  1. Download the latest Nightly Build of Typemock Racer.
  2. Use only supported API to create a deadlock (for example Mutex and Semaphore are not supported, ThreadPool is).
  3. No infinite loops allowed – the code has to end at some point.
  4. That’s it

Just write your answer in the comments. The first three good answers will get a free Typemock Isolator License.

Ayende, Scott Hanselmam, Sasha Goldshtein, Daniel Cazzulino and Ben Hall , hear that?

Supported API:

image

Technorati Tag:
multithreading, Net Development ,

  • dal

    I created a simple test that would deadlock almost immediately, installed Typemock racer and tried to run it. I got an error stating that Typemock did not support WaitAny. Is there a list of supported/unsupported types and methods?

    Here’s the actual exception

    TestCase ‘TestProject1.DeadlockHelperTest.ManualTest’
    failed: Typemock.Racer.Core.Exceptions.RacerMethoNotSupportedException:
    Typemock Racer does not support Int32 WaitAny(System.Threading.WaitHandle[], Int32, Boolean) in current version
    at cb.b(as A_0, MethodInfo A_1)
    at cv.a(List`1 A_0, MethodInfo A_1)
    at Typemock.Racer.ThreadTest.Typemock.Racer.ITestParameters.Start()
    TryToCreateDeadLockTestProject1DeadlockHelperTest.cs(71,0): at TestProject1.DeadlockHelperTest.ManualTest()

  • Anonymous

    dal:
    yes. WaitAny is not supported. the list of what is supported is located in the blog post on the current page.

TOP