Registry access denied (intermittent problem)

  • Thread starter Thread starter Eric Margheim
  • Start date Start date
E

Eric Margheim

I'm trying to narrow down the cause of a nasty and very annoying problem
we're having.

We run a 3rd party report server on a dedicated server. We have a COM+
Application, a service and then the 3rd party processes that access our
registry hive. There is specifically one part of the hive that has
problems. Every week or so our application fails to perform a certain
report related task and we discover that if we try to access the registry
hive used by our processes it's not accessible. Recycling our service and
the 3rd party report service usually frees up access but sometimes we have
to reboot.

My question is how do I troubleshoot this? Obviously something is locking
out access to the registry but I'm not familiar enough with the low-level
registry calls and just what could cause one process to prevent access to a
registry key. I need to determine if it's our service or the 3rd party
process (which is called from our code) is causing the problem and then
hopefully fix it.

I have been running regmon on this server daily hoping that when the problem
happens again I'll be able to see something in the registry, but so far the
problem hasn't happened again.

Any ideas on how to approach this or some good registry material that might
help me would be much appreciated.

Thanks

Eric
 
In said:
I'm trying to narrow down the cause of a nasty and very annoying
problem we're having.

We run a 3rd party report server on a dedicated server. We have
a COM+ Application, a service and then the 3rd party processes
that access our registry hive. There is specifically one part
of the hive that has problems. Every week or so our
application fails to perform a certain report related task and
we discover that if we try to access the registry hive used by
our processes it's not accessible. Recycling our service and
the 3rd party report service usually frees up access but
sometimes we have to reboot.

My question is how do I troubleshoot this? Obviously something
is locking out access to the registry but I'm not familiar
enough with the low-level registry calls and just what could
cause one process to prevent access to a registry key. I need
to determine if it's our service or the 3rd party process (which
is called from our code) is causing the problem and then
hopefully fix it.

I have been running regmon on this server daily hoping that when
the problem happens again I'll be able to see something in the
registry, but so far the problem hasn't happened again.

Any ideas on how to approach this or some good registry material
that might help me would be much appreciated.

If the registry ACLs have not changed ("Access Denied") and
restarting the service(s) solve it, then my *guess* is that some
resource is being exhausted. Maybe a handle into the registry is
opened and then not closed? Diagnostics for that are outside this
group's scope probably.

The Sysinternels HANDLE.EXE utiltiy can report the number of
handles ("Key") in use by a process.
 
cause one process to prevent access to a registry key. I need
If the registry ACLs have not changed ("Access Denied") and
restarting the service(s) solve it, then my *guess* is that some
resource is being exhausted. Maybe a handle into the registry is
opened and then not closed? Diagnostics for that are outside this
group's scope probably.

The Sysinternels HANDLE.EXE utiltiy can report the number of
handles ("Key") in use by a process.

Thanks for the tips. So if a process that is run repeatedly is not closing
the registry handle correctly after usage eventually it may use up all the
available handles and block registry access? Would that impact just one
hive (as appears to be our problem) or would it take the whole registry
down? Or are you saying that each process only has so many handles
available to that process now is locked out of the registry?

Thanks much
 
In said:
Thanks for the tips. So if a process that is run repeatedly is
not closing the registry handle correctly after usage eventually
it may use up all the available handles and block registry
access? Would that impact just one hive (as appears to be our
problem) or would it take the whole registry down? Or are you
saying that each process only has so many handles available to
that process now is locked out of the registry?

Sorry for the delay (hurricane).

If it is a Service that runs constantly (until it crashes), one
*possibility* is exhausting resources (including too many open
handles of any type), or heap space, or...

A Process that terminates should be "cleaned up" by the system for
any open registry handles.

I suggest that some information might be gleaned from checking
various resources used by the problem Service prior to service
failure and just after service start for "clues".

If you pin this down (as it seems you have) to a particular
Service, then the best avenue is the software vendor (that provides
the installed service).

If this is still on track one expedient solution might be to just
schedule a Service Stop/Start on a recurring basis.
 
[ big snip ]

I see you have another thread going now.

Registry handle limit?
Date: Wed, 26 Oct 2005

I'll chime in there if I come up with anything else.
 
Mark V said:
[ big snip ]

I see you have another thread going now.

Registry handle limit?
Date: Wed, 26 Oct 2005

I'll chime in there if I come up with anything else.

thanks. Yes I believe I have found and fixed the problem that was not
closing registry handles but it may take weeks to find out if it's actually
fixed it unless I can crank down the handle limit and reproduce. I did
find the USERProcessHandleQuota registry entry but I don't think it impacted
registry handles.
 
In said:
Mark V said:
In said:
cause one process to prevent access to a registry key. I
need to determine if it's our service or the 3rd party
[ big snip ]

I see you have another thread going now.
[ ]
thanks. Yes I believe I have found and fixed the problem that
was not closing registry handles but it may take weeks to find
out if it's actually fixed it unless I can crank down the handle
limit and reproduce. I did find the USERProcessHandleQuota
registry entry but I don't think it impacted registry handles.

I know nothing of that value... If you find information, perhaps
you will post it.

Perhaps write a scheduled batch to collect information and wait?
You could probably setup a PerfMon counter...perhaps on Process
Name and handle count? (Guess)
 
Mark V said:
In said:
Mark V said:
In microsoft.public.win2000.registry Eric Margheim wrote:

cause one process to prevent access to a registry key. I
need to determine if it's our service or the 3rd party
[ big snip ]

I see you have another thread going now.
[ ]
thanks. Yes I believe I have found and fixed the problem that
was not closing registry handles but it may take weeks to find
out if it's actually fixed it unless I can crank down the handle
limit and reproduce. I did find the USERProcessHandleQuota
registry entry but I don't think it impacted registry handles.

I know nothing of that value... If you find information, perhaps
you will post it.

These are the entries I was talking about.

http://support.microsoft.com/default.aspx?scid=kb;en-us;326591
 
In said:
Mark V said:
In said:
In microsoft.public.win2000.registry Eric Margheim wrote: [ ]
limit and reproduce. I did find the USERProcessHandleQuota
registry entry but I don't think it impacted registry handles.

I know nothing of that value... If you find information,
perhaps you will post it.>

Good. And here is one that you may want to read.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/user_objects.asp
"This value can be set to a number between 200 and 18,000."

But, I am not entirely sure that this is directly related.
You can of course try setting the value down but I have some doubts
about the stability of your server if you do so. I am being cautious
here because you say this is an online production server. I believe I
might prefer to just attempt to monitor the Service's resources
statically as a useful but safer option (IMO).

I believe you said that HANDLES.EXE was showing the data for the problem
Service.
 
Good. And here is one that you may want to read.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/user_objects.asp
"This value can be set to a number between 200 and 18,000."
Thanks

But, I am not entirely sure that this is directly related.
You can of course try setting the value down but I have some doubts
about the stability of your server if you do so. I am being cautious
here because you say this is an online production server. I believe I
might prefer to just attempt to monitor the Service's resources
statically as a useful but safer option (IMO).

Well actually I am trying to reproduce in a test environment. I
definitely wouldn't jack with those types of setting in production.
I believe you said that HANDLES.EXE was showing the data for the problem
Service.

No I was using RegMon to see that things weren't getting closed. When I
stopped the service I saw thousands of CloseKey operations.
 
Back
Top