w3wp 100% CPU usage

w3wp 100% CPU usage

am 06.09.2007 08:32:03 von Prakash

My W3Wp process is using 100% of the CPU and it keeps crashing.
one important thing i have noticed is that in the taskmanager the w3wp
process is spawning almost 2000 threads and then it crashes.
I looked at the iisstate and all the threads(excluding some 20 threads) are
in the same state as shown below. The iisstate dump is very big because of
thousands of threads, so i am sending only a part of it.

Thread ID: 35
System Thread ID: e8c
Kernel Time: 0:0:0.0
User Time: 0:0:0.46
Thread Status: Thread is in a WAIT state.
Thread Type: Other
# ChildEBP RetAddr
00 17bcf410 7c827cfb ntdll!KiFastSystemCallRet
01 17bcf414 77e6202c ntdll!NtWaitForMultipleObjects+0xc
02 17bcf4bc 791e0fa2 kernel32!WaitForMultipleObjectsEx+0x11a
03 17bcf4ec 791e1044 mscorsvr!Thread::DoAppropriateWaitWorker+0xc1
04 17bcf540 791fbf07 mscorsvr!Thread::DoAppropriateWait+0x46
05 17bcf5c4 791fbc32 mscorsvr!AwareLock::EnterEpilog+0x9d
06 17bcf5e0 791fc2ac mscorsvr!AwareLock::Enter+0x78
07 17bcf674 17157a29 mscorsvr!JITutil_MonContention+0x124
WARNING: Frame IP not in any known module. Following frames may be wrong.
08 17bcf768 791b7f92 0x17157a29
09 17bcf770 791bdd4e mscorsvr!CallDescrWorker+0x30
0a 17bcf880 791d5fc3 mscorsvr!MethodDesc::CallDescr+0x1b8
0b 17bcf93c 791d6077 mscorsvr!MethodDesc::CallDescr+0x4f
0c 17bcf964 792ec3d1 mscorsvr!MethodDesc::Call+0x97
0d 17bcf9b0 791cf976 mscorsvr!ThreadNative::KickOffThread_Worker+0x9d
0e 17bcf9f8 792ec499 mscorsvr!Thread::DoADCallBack+0x5c
0f 17bcfaa4 7922ec3f mscorsvr!ThreadNative::KickOffThread+0xbb
10 17bcffb8 77e64829 mscorsvr!Thread::intermediateThreadProc+0x44
11 17bcffec 00000000 kernel32!BaseThreadStart+0x34





I am using Windows 2003 R2 standard edition and IIS6.0 as the webserver.
This webapplication does some credit card processing and due to this
crashings, the web application looses lots of information and the client is
incurring huge loss.

Can someone please help me find the problem?

Re: w3wp 100% CPU usage

am 06.09.2007 17:06:32 von patfilot

This is a managed thread - where we can't see what code is running. It is
in a WAIT state, meaning not using any CPU. Most likely there is a bug in
some code that is spawning the threads in a loop, if the dump is taken while
the CPU is 100% then we might be able to locate the culprite. Or get a log
file while the problem is occurring.

If you get the dump/log after the CPU returns to idle then the culprit may
have exited - leaving only the threads behind.


Pat

"Prakash" wrote in message
news:19F62869-B23E-4487-BF52-319BC519B2D9@microsoft.com...
> My W3Wp process is using 100% of the CPU and it keeps crashing.
> one important thing i have noticed is that in the taskmanager the w3wp
> process is spawning almost 2000 threads and then it crashes.
> I looked at the iisstate and all the threads(excluding some 20 threads)
> are
> in the same state as shown below. The iisstate dump is very big because of
> thousands of threads, so i am sending only a part of it.
>
> Thread ID: 35
> System Thread ID: e8c
> Kernel Time: 0:0:0.0
> User Time: 0:0:0.46
> Thread Status: Thread is in a WAIT state.
> Thread Type: Other
> # ChildEBP RetAddr
> 00 17bcf410 7c827cfb ntdll!KiFastSystemCallRet
> 01 17bcf414 77e6202c ntdll!NtWaitForMultipleObjects+0xc
> 02 17bcf4bc 791e0fa2 kernel32!WaitForMultipleObjectsEx+0x11a
> 03 17bcf4ec 791e1044 mscorsvr!Thread::DoAppropriateWaitWorker+0xc1
> 04 17bcf540 791fbf07 mscorsvr!Thread::DoAppropriateWait+0x46
> 05 17bcf5c4 791fbc32 mscorsvr!AwareLock::EnterEpilog+0x9d
> 06 17bcf5e0 791fc2ac mscorsvr!AwareLock::Enter+0x78
> 07 17bcf674 17157a29 mscorsvr!JITutil_MonContention+0x124
> WARNING: Frame IP not in any known module. Following frames may be wrong.
> 08 17bcf768 791b7f92 0x17157a29
> 09 17bcf770 791bdd4e mscorsvr!CallDescrWorker+0x30
> 0a 17bcf880 791d5fc3 mscorsvr!MethodDesc::CallDescr+0x1b8
> 0b 17bcf93c 791d6077 mscorsvr!MethodDesc::CallDescr+0x4f
> 0c 17bcf964 792ec3d1 mscorsvr!MethodDesc::Call+0x97
> 0d 17bcf9b0 791cf976 mscorsvr!ThreadNative::KickOffThread_Worker+0x9d
> 0e 17bcf9f8 792ec499 mscorsvr!Thread::DoADCallBack+0x5c
> 0f 17bcfaa4 7922ec3f mscorsvr!ThreadNative::KickOffThread+0xbb
> 10 17bcffb8 77e64829 mscorsvr!Thread::intermediateThreadProc+0x44
> 11 17bcffec 00000000 kernel32!BaseThreadStart+0x34
>
>
>
>
>
> I am using Windows 2003 R2 standard edition and IIS6.0 as the webserver.
> This webapplication does some credit card processing and due to this
> crashings, the web application looses lots of information and the client
> is
> incurring huge loss.
>
> Can someone please help me find the problem?
>
>

Re: w3wp 100% CPU usage

am 10.09.2007 07:22:02 von Prakash

My problem got solved.
Actually in my code I was using Lock(this) and all other threads were
waiting for the lock to get released. Now i am using mutex and everything
looks fine.

Thank You.


"Pat [MSFT]" wrote:

> This is a managed thread - where we can't see what code is running. It is
> in a WAIT state, meaning not using any CPU. Most likely there is a bug in
> some code that is spawning the threads in a loop, if the dump is taken while
> the CPU is 100% then we might be able to locate the culprite. Or get a log
> file while the problem is occurring.
>
> If you get the dump/log after the CPU returns to idle then the culprit may
> have exited - leaving only the threads behind.
>
>
> Pat
>
> "Prakash" wrote in message
> news:19F62869-B23E-4487-BF52-319BC519B2D9@microsoft.com...
> > My W3Wp process is using 100% of the CPU and it keeps crashing.
> > one important thing i have noticed is that in the taskmanager the w3wp
> > process is spawning almost 2000 threads and then it crashes.
> > I looked at the iisstate and all the threads(excluding some 20 threads)
> > are
> > in the same state as shown below. The iisstate dump is very big because of
> > thousands of threads, so i am sending only a part of it.
> >
> > Thread ID: 35
> > System Thread ID: e8c
> > Kernel Time: 0:0:0.0
> > User Time: 0:0:0.46
> > Thread Status: Thread is in a WAIT state.
> > Thread Type: Other
> > # ChildEBP RetAddr
> > 00 17bcf410 7c827cfb ntdll!KiFastSystemCallRet
> > 01 17bcf414 77e6202c ntdll!NtWaitForMultipleObjects+0xc
> > 02 17bcf4bc 791e0fa2 kernel32!WaitForMultipleObjectsEx+0x11a
> > 03 17bcf4ec 791e1044 mscorsvr!Thread::DoAppropriateWaitWorker+0xc1
> > 04 17bcf540 791fbf07 mscorsvr!Thread::DoAppropriateWait+0x46
> > 05 17bcf5c4 791fbc32 mscorsvr!AwareLock::EnterEpilog+0x9d
> > 06 17bcf5e0 791fc2ac mscorsvr!AwareLock::Enter+0x78
> > 07 17bcf674 17157a29 mscorsvr!JITutil_MonContention+0x124
> > WARNING: Frame IP not in any known module. Following frames may be wrong.
> > 08 17bcf768 791b7f92 0x17157a29
> > 09 17bcf770 791bdd4e mscorsvr!CallDescrWorker+0x30
> > 0a 17bcf880 791d5fc3 mscorsvr!MethodDesc::CallDescr+0x1b8
> > 0b 17bcf93c 791d6077 mscorsvr!MethodDesc::CallDescr+0x4f
> > 0c 17bcf964 792ec3d1 mscorsvr!MethodDesc::Call+0x97
> > 0d 17bcf9b0 791cf976 mscorsvr!ThreadNative::KickOffThread_Worker+0x9d
> > 0e 17bcf9f8 792ec499 mscorsvr!Thread::DoADCallBack+0x5c
> > 0f 17bcfaa4 7922ec3f mscorsvr!ThreadNative::KickOffThread+0xbb
> > 10 17bcffb8 77e64829 mscorsvr!Thread::intermediateThreadProc+0x44
> > 11 17bcffec 00000000 kernel32!BaseThreadStart+0x34
> >
> >
> >
> >
> >
> > I am using Windows 2003 R2 standard edition and IIS6.0 as the webserver.
> > This webapplication does some credit card processing and due to this
> > crashings, the web application looses lots of information and the client
> > is
> > incurring huge loss.
> >
> > Can someone please help me find the problem?
> >
> >
>