IISState output, hung on critical section?

  • Thread starter James Hunter Ross
  • Start date
J

James Hunter Ross

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()
 
B

Bruce Barker

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 said:
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()
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,900
Latest member
Nell636132

Latest Threads

Top