Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / March 2004

Tip: Looking for answers? Try searching our database.

Strange application behavior

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ice - 09 Mar 2004 12:52 GMT
Folks -

I am observing some weird behavior in our application during shutdown, let
me see if I can explain this clearly.

Lets say I open 2 instances - A and B - of the application on my machine.
Regardless of what order I shutdown the instances, the process associated
with A always takes longer to end than the process associated with B. Also
there is a noticeable 100% CPU spike during the shutdown of instance A which
I never see with instance B.

To make this even more interesting, if I never shutdown instance A, then all
subsequent instances started shutdown and exit their processes in a timely
fashion even if instance B is shutdown. However, if I shutdown instance A,
the first (and only the first) instance started after this shutdown exhibits
the same behavior as instance A.

Has anyone seen this kind of behavior before?  Does the framework do
something different the very first time the application is started like
security checks etc? that it wouldn't do for subsequent startups/shutdowns?

Any ideas would be greatly appreciated.

Thanks.

Ice
Rico Mariani [MSFT] - 29 Mar 2004 18:43 GMT
I just got a look at this message, the only thought I had here is that you
might be seeing the security system writing out the .cch file.  This file is
basically a cached version of the policy with assorted evaluations
precomputed.

I believe that the cache is not in fact computed all at once, but rather the
machine policy precomputations are written out on the first run and then per
user information on a subsequent run.  After that the cache is good until
policy/evidence changes.

The purpose of the cache is to avoid expensive ResolvePolicy calls when the
application is loaded and instead just do some fairly simple parsing.

This might explain some of what you're seeing but it doesn't seem like a
complete answer to me.  Snoop around for .cch files being created, it might
put you on the right path.

 -Rico

Signature

This posting is provided "AS IS" with no warranties, and confers no rights.

Rico Mariani
CLR Performance Architect

--------------------------------------------------

> Folks -
>
[quoted text clipped - 22 lines]
>
> Ice
Ice - 30 Mar 2004 22:30 GMT
Well you made me look for files that are getting modified when the app
closes and I think the app.exe.ini files that get updated are the culprit.
The bigger the file, longer it takes to update it.  The first instance of
the app started is responsible in updating the .ini file when it closes.

ice
> I just got a look at this message, the only thought I had here is that you
> might be seeing the security system writing out the .cch file.  This file is
[quoted text clipped - 45 lines]
> >
> > Ice
Ice - 31 Mar 2004 15:44 GMT
I think this could be a good argument for "fewer" assemblies.

ice
> Well you made me look for files that are getting modified when the app
> closes and I think the app.exe.ini files that get updated are the culprit.
[quoted text clipped - 69 lines]
> > >
> > > Ice

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.