IISState output, hung on critical section?

Discussion in 'ASP .Net' started by James Hunter Ross, Nov 8, 2005.

  1. Friends, this is a longshot...

    Our app is done in ASP.NET/C# with calls to legacy DLLs that use MFC/ODBC to
    update the database. It's a legacy DB API that we must use.

    We're debugging an application hang; w3wp.exe appears to stop servicing all
    requests after about an hour. We have run IIState to capture some data
    about that process and find that many threads end up waiting on some
    "critical "section"; basically eventually everybody is in line for a single
    resource that apparently is never freed. Sadly, we don't really use
    ciritcal sections or mutexts much in our code, so we think this is an
    MFC/ODBC issue. But, what are we waiting on? Why isn't it freed? Etc?

    If any of you kind folks have any words to give or any experience with
    tsomething similar, I'd gretly appreciate your thoughts. For the bravest
    souls, I've pasted some IIState output below.

    Thanks in advance for you thoughts!

    James


    THE BLOCKING THREAD
    Thread ID: 21
    System Thread ID: 131c
    Kernel Time: 0:24:3.687
    User Time: 0:15:18.265
    Thread Status: Thread is in a WAIT state.
    Thread Type: Other
    # ChildEBP RetAddr
    00 0deef174 7c822124 ntdll!KiFastSystemCallRet
    01 0deef178 77e6baa8 ntdll!NtWaitForSingleObject+0xc
    WARNING: Stack unwind information not available. Following frames may be
    wrong.
    02 0deef1e8 77e6ba12 kernel32!WaitForSingleObjectEx+0x88
    03 0deef1fc 30198a73 kernel32!WaitForSingleObject+0x12
    04 0deef258 00000000
    RSSQLAPI!RSSQLDebugLog::RSWebNET::FunctionEntryExit::FunctionEntryExit+0x1847d4



    THE (FIRST OF MANY) BLOCKED THREAD
    Thread ID: 10
    System Thread ID: 17b4
    Kernel Time: 0:0:48.937
    User Time: 0:1:31.578
    *** WARNING: Unable to verify checksum for C:\Program
    Files\RS-SQL\RSSQLAPI.dll
    *** ERROR: Symbol file could not be found. Defaulted to export symbols for
    C:\Program Files\RS-SQL\RSSQLAPI.dll -
    *** WARNING: Unable to verify checksum for
    c:\windows\assembly\nativeimages1_v1.1.4322\mscorlib\1.0.5000.0__b77a5c561934e089_1423085c\mscorlib.dll
    *** ERROR: Module load completed but symbols could not be loaded for
    c:\windows\assembly\nativeimages1_v1.1.4322\mscorlib\1.0.5000.0__b77a5c561934e089_1423085c\mscorlib.dll
    Thread Status: Thread is in a WAIT state.
    Other information: Thread is waiting for a lock to be released. Looking for
    lock owner.
    Owning thread System ID: 131c
    Thread Type: Managed Thread. Possible ASP.Net page or other .Net worker
    PDB symbol for mscorsvr.dll not loaded
    succeeded
    Loaded Son of Strike data table version 5 from
    "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorsvr.dll"
    Thread 10
    ESP EIP
    0196f714 7c82ed54 [FRAME: NDirectMethodFrameStandalone] [DEFAULT] CMOD_OPT
    System.Runtime.CompilerServices.CallConvThiscall Boolean
    RSSQLTempRecordset.GetMarkSummary(CMOD_OPT Microsoft.VisualC.IsConstModifier
    CMOD_OPT Microsoft.VisualC.IsConstModifier Ptr ValueClass
    RSSQLTempRecordset,Ptr I4,Ptr I4)
    0196f728 0d775e07 [DEFAULT] [hasThis] Void
    ONeilSoft.RSSQLAPINET.TempRecordset.GetMarkSummary(ByRef I4,ByRef I4)
    0196f73c 0d775d55 [FRAME: InlinedCallFrame]
    0196f7dc 0d775d55 [DEFAULT] [hasThis] Boolean
    ONeilSoft.RSWeb.RSWebGridForm.IsGridEmpty()
    0196f7e8 0d775731 [DEFAULT] [hasThis] Void RSWEBNET.OSCart.InitMenu()
    James Hunter Ross, Nov 8, 2005
    #1
    1. Advertising

  2. James Hunter Ross

    Bruce Barker Guest

    if your DLL is STA, then asp.net has to use a single thread to access it. it
    uses mutexes to control access to this thread. if this is the case, a single
    hang in a method call, will hang all requests. you will have to fix the dll.

    if your dll is not STA, then it is probably hanging internally. this would
    lead me to believe it not thread safe under load. in this case you serialize
    access your self with a mutex, and get around it. you could also update the
    registry to say its STA.

    -- bruce (sqlwork.com)


    "James Hunter Ross" <> wrote in message
    news:...
    > Friends, this is a longshot...
    >
    > Our app is done in ASP.NET/C# with calls to legacy DLLs that use MFC/ODBC
    > to update the database. It's a legacy DB API that we must use.
    >
    > We're debugging an application hang; w3wp.exe appears to stop servicing
    > all requests after about an hour. We have run IIState to capture some
    > data about that process and find that many threads end up waiting on some
    > "critical "section"; basically eventually everybody is in line for a
    > single resource that apparently is never freed. Sadly, we don't really
    > use ciritcal sections or mutexts much in our code, so we think this is an
    > MFC/ODBC issue. But, what are we waiting on? Why isn't it freed? Etc?
    >
    > If any of you kind folks have any words to give or any experience with
    > tsomething similar, I'd gretly appreciate your thoughts. For the bravest
    > souls, I've pasted some IIState output below.
    >
    > Thanks in advance for you thoughts!
    >
    > James
    >
    >
    > THE BLOCKING THREAD
    > Thread ID: 21
    > System Thread ID: 131c
    > Kernel Time: 0:24:3.687
    > User Time: 0:15:18.265
    > Thread Status: Thread is in a WAIT state.
    > Thread Type: Other
    > # ChildEBP RetAddr
    > 00 0deef174 7c822124 ntdll!KiFastSystemCallRet
    > 01 0deef178 77e6baa8 ntdll!NtWaitForSingleObject+0xc
    > WARNING: Stack unwind information not available. Following frames may be
    > wrong.
    > 02 0deef1e8 77e6ba12 kernel32!WaitForSingleObjectEx+0x88
    > 03 0deef1fc 30198a73 kernel32!WaitForSingleObject+0x12
    > 04 0deef258 00000000
    > RSSQLAPI!RSSQLDebugLog::RSWebNET::FunctionEntryExit::FunctionEntryExit+0x1847d4
    >
    >
    >
    > THE (FIRST OF MANY) BLOCKED THREAD
    > Thread ID: 10
    > System Thread ID: 17b4
    > Kernel Time: 0:0:48.937
    > User Time: 0:1:31.578
    > *** WARNING: Unable to verify checksum for C:\Program
    > Files\RS-SQL\RSSQLAPI.dll
    > *** ERROR: Symbol file could not be found. Defaulted to export symbols
    > for C:\Program Files\RS-SQL\RSSQLAPI.dll -
    > *** WARNING: Unable to verify checksum for
    > c:\windows\assembly\nativeimages1_v1.1.4322\mscorlib\1.0.5000.0__b77a5c561934e089_1423085c\mscorlib.dll
    > *** ERROR: Module load completed but symbols could not be loaded for
    > c:\windows\assembly\nativeimages1_v1.1.4322\mscorlib\1.0.5000.0__b77a5c561934e089_1423085c\mscorlib.dll
    > Thread Status: Thread is in a WAIT state.
    > Other information: Thread is waiting for a lock to be released. Looking
    > for lock owner.
    > Owning thread System ID: 131c
    > Thread Type: Managed Thread. Possible ASP.Net page or other .Net worker
    > PDB symbol for mscorsvr.dll not loaded
    > succeeded
    > Loaded Son of Strike data table version 5 from
    > "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorsvr.dll"
    > Thread 10
    > ESP EIP
    > 0196f714 7c82ed54 [FRAME: NDirectMethodFrameStandalone] [DEFAULT]
    > CMOD_OPT System.Runtime.CompilerServices.CallConvThiscall Boolean
    > RSSQLTempRecordset.GetMarkSummary(CMOD_OPT
    > Microsoft.VisualC.IsConstModifier CMOD_OPT
    > Microsoft.VisualC.IsConstModifier Ptr ValueClass RSSQLTempRecordset,Ptr
    > I4,Ptr I4)
    > 0196f728 0d775e07 [DEFAULT] [hasThis] Void
    > ONeilSoft.RSSQLAPINET.TempRecordset.GetMarkSummary(ByRef I4,ByRef I4)
    > 0196f73c 0d775d55 [FRAME: InlinedCallFrame]
    > 0196f7dc 0d775d55 [DEFAULT] [hasThis] Boolean
    > ONeilSoft.RSWeb.RSWebGridForm.IsGridEmpty()
    > 0196f7e8 0d775731 [DEFAULT] [hasThis] Void RSWEBNET.OSCart.InitMenu()
    >
    >
    >
    Bruce Barker, Nov 8, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob Barrows
    Replies:
    0
    Views:
    392
    Bob Barrows
    Feb 27, 2004
  2. =?Utf-8?B?Q2hyaXN0aWFu?=

    Critical section in WebForms

    =?Utf-8?B?Q2hyaXN0aWFu?=, Oct 7, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,587
    =?Utf-8?B?dG9tIHdpc25vd3NraQ==?=
    Oct 8, 2004
  3. Dave Brueck
    Replies:
    2
    Views:
    468
    Skip Montanaro
    Sep 19, 2003
  4. aeromarine
    Replies:
    15
    Views:
    1,465
    Martin
    Feb 18, 2008
  5. Replies:
    0
    Views:
    159
Loading...

Share This Page