locked
Concurrency explorer minor issue RRS feed

  • Question

  • Hi,

    I am a newbie to CHESS, thought I would test some parts of our codebase for concurrency issues with it.

    I am running it on my Windows XP box using virtual PC 2007 SP1.

    I wrote a test and ran mchess, and it finds a deadlock (thanks!).

    A minor thing I noticed:

    1. I open chessboard with chessboard results.xml
    2. I repro the test with tracing by right-clicking...
    3. Then I try to open concurrency explorer by right clicking from results R1 Found Datarace at add_Changed

    However the window opens with an error box and the concurrency explorer in the background keeps flickering with purple and green colors:

    (Note in step 3 if I choose E Deadlock, concurrency explorer  open fine).

    The detailed stack trace in the error box (with heading Concurrency Explorer II)  is:

    --- Start Error Message ---
    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentOutOfRangeException: InvalidArgument=Value of '1' is not valid for 'index'.
    Parameter name: index
       at System.Windows.Forms.ListView.ListViewItemCollection.get_Item(Int32 index)
       at Microsoft.ConcurrencyExplorer.MultiThreadView.listView1_ItemChecked(Object sender, ItemCheckedEventArgs e)
       at System.Windows.Forms.ItemCheckedEventHandler.Invoke(Object sender, ItemCheckedEventArgs e)
       at System.Windows.Forms.ListView.OnItemChecked(ItemCheckedEventArgs e)
       at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
       at System.Windows.Forms.ListView.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    ChessBoard
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files/Microsoft%20CHESS/bin/chessboard.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Xml.Linq
        Assembly Version: 3.5.0.0
        Win32 Version: 3.5.30729.1 built by: SP
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml.Linq/3.5.0.0__b77a5c561934e089/System.Xml.Linq.dll
    ----------------------------------------
    System.Core
        Assembly Version: 3.5.0.0
        Win32 Version: 3.5.30729.1 built by: SP
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    ConcurrencyExplorer
        Assembly Version: 0.1.30610.2
        Win32 Version: 0.1.30610.2
        CodeBase: file:///C:/Program%20Files/Microsoft%20CHESS/bin/ConcurrencyExplorer.EXE
    ----------------------------------------
    Microsoft.ManagedChess.MChess
        Assembly Version: 0.1.30610.2
        Win32 Version:
        CodeBase: file:///C:/Program%20Files/Microsoft%20CHESS/bin/Microsoft.ManagedChess.MChess.DLL
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    --- Start Error Message ---

    If I dismiss the error enough times, eventually the app crashes with:
    Unhandled Exception: System.ComponentModel.Win32Exception: Error creating window
     handle.
       at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
       at System.Windows.Forms.Control.CreateHandle()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
       at System.Windows.Forms.ButtonBase.OnVisibleChanged(EventArgs e)
       at System.Windows.Forms.Control.OnParentVisibleChanged(EventArgs e)
       at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
       at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
       at System.Windows.Forms.Form.OnVisibleChanged(EventArgs e)
       at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Control.set_Visible(Boolean value)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 r
    eason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason
    , ApplicationContext context)
       at System.Windows.Forms.Application.RunDialog(Form form)
       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
       at System.Windows.Forms.Form.ShowDialog()
       at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception
     t)
       at System.Windows.Forms.Timer.TimerNativeWindow.OnThreadException(Exception e
    )
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
    wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.Uns
    afeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int3
    2 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 r
    eason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason
    , ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at Microsoft.ConcurrencyExplorer.StandardView.RunGuiThread()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, C
    ontextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()


    Thanks,
    Sriram




    Tuesday, June 16, 2009 9:48 PM

Answers

All replies

  • Thanks, Sriram. Let me show this bug to Sebastian Burckhardt on the CHESS team and get back to you soon.

    -- Tom
    Tuesday, June 16, 2009 10:36 PM
  • Thanks Tom,

    Just continuing with my testing - am getting this error for other operations too, it is a little annoying since I have to restart chessboard in the middle of debugging and start again. However I am using virtual PC on my XP box, so I guess I shouldnt be complaining :)
    Tuesday, June 16, 2009 10:48 PM
  • Hi Sriram,

    Thanks for the bug report.

    I would like to take a closer look... could you send me the following files?

    (where N = number of the repro task)

    taskdirN\results.xml
    taskdirN\trace

    Thanks,
    Sebastian
    Wednesday, June 17, 2009 4:02 AM
    Answerer
  • Sent to email chequers
    Wednesday, June 17, 2009 9:19 PM
  • Got the repro. We'll try to get a fix in next week's release.

    -- Tom
    Saturday, June 20, 2009 4:28 AM
  • This should work now, with the latest CHESS release. Let me know if it does not work.
    Wednesday, July 8, 2009 10:23 PM
    Answerer