• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

mscorwks.dll!CreateApplicationContext issue in C#

Red Squirrel

No Lifer
I have an app that I code on my xp box, then test further on a win2k3 VM on another server. In XP it runs fine, on win2k3, there is a thread called mscorwks.dll!CreateApplicationContext that HOGS the cpu like mad. Usually about 70% or so. The whole app just grinds to a halt.

It's running .net 2.0 and has a dependancy (mysql connector) which I think may be possibly part of the issue.

Anyone ever hear of this?
 
mscorwks.dll is part of the Common Language Runtime, I believe. Are both copies of .NET 2.0 running at the same patch level?
 
Should be, is there a way I can find out? the folder names match (2.0.50727)

I tried to install 3.0 to try that but there is no csc.exe in the folder so I can't seem to compile as a 3.0 app.
 
HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727

There's a DWORD key called "SP" that will tell you the service pack level. Also, some quick googling reveals that this may be related to thread issues. Is your app multi-threaded?
 
Yeah there's actually one more thread in it. For some reason theres like 15 threads when there should only be 2 though. But on XP it does the same. Probably a C# thing I guess.

Also the win2k3 box is single core.
 
How much RAM does the 2K3 box have?

I put 2K3 on my music server and wondered why it was running so badly, then I checked the system info and saw I'd only installed 1 GB on that box not the 2 GB I had thought. It runs much better now with 2 GB.
 
there's about 1.5GB of ram, but this app only uses 783MB so I really hope I can get away with not adding more ram. Cheap to do at home, but very expensive to do in the production environment (usually 40 bucks per month extra for 1GB).

I will allocate more ram to the VM and see if there's still issues.


edit: Just tried with 2.5GB and still no change.
 
Have you run it through the debugger and looked to see what that thread is executing? Are you doing any resource intensive operations like network/file I/O that would suffer from performance hits of running in the virtual machine?
 
I've never ran a C# app through a debugger, should probably learn... how would I go about doing that?

And there is no intensive stuff going on. Basically there's the main program loop, then another loop that submits SQL queries, which arn't numerous if nobody is logged in to the game. Maybe 1 per second average. It's not using 100% but it's close. If it was using 100% non stop I would suspect something in my code such as a continuous loop but does not seem like it's the case.
 
Back
Top