cannot delete dll

  • Thread starter Thread starter Bob Weiner
  • Start date Start date
B

Bob Weiner

I am attempting to delete a dll on our web server. I killed the dllhost
process that the IWAM user was running. Usually this is sufficient but not
this time.

I unloaded the application in IIS, and did a
tlist -m dllname*
which said that nobody was using it. I still can't delete it.

This is a dll that I wrote and no one else should even know it exists so I
doubt another user is involved.

What else can I look for in this situation?

bob
 
thanks, good suggestion but its a no go. So now we know that neither the
web server process nor the associated dllhost process is the culprit.

While I am testing the program, a
tlist -m "usermgmt*"
reveals that dllhost.exe is the one and only process using the dll.

What if I have a cyclic reference inside the dll. For instance if I create
usermgmt.user which then creates usermgmt.svr which then inadvertantly
references the user object? I believe then that even after the last process
dies the file remains locked and I cannot remove the dll. I also seem to
remember that the OS will detect the cyclic reference after about 20 minutes
and clean all object references. Then I should be able to delete the dll.
Of course, rebooting would work too but that is not always an option.

Is there anyway to force the system to speed up the above process? override
the locking in this case? is there a windows kill -9? Is Russonovich or
Solomon reading this group???

bob
 
ok, the 20 minute rule isn't correct, either

Bob Weiner said:
thanks, good suggestion but its a no go. So now we know that neither the
web server process nor the associated dllhost process is the culprit.

While I am testing the program, a
reveals that dllhost.exe is the one and only process using the dll.

What if I have a cyclic reference inside the dll. For instance if I create
usermgmt.user which then creates usermgmt.svr which then inadvertantly
references the user object? I believe then that even after the last process
dies the file remains locked and I cannot remove the dll. I also seem to
remember that the OS will detect the cyclic reference after about 20 minutes
and clean all object references. Then I should be able to delete the dll.
Of course, rebooting would work too but that is not always an option.

Is there anyway to force the system to speed up the above process? override
the locking in this case? is there a windows kill -9? Is Russonovich or
Solomon reading this group???

bob


so
 
Bob Weiner said:
thanks, good suggestion but its a no go. So now we know that neither the
web server process nor the associated dllhost process is the culprit.

While I am testing the program, a
reveals that dllhost.exe is the one and only process using the dll.

What if I have a cyclic reference inside the dll. For instance if I create
usermgmt.user which then creates usermgmt.svr which then inadvertantly
references the user object? I believe then that even after the last process
dies the file remains locked and I cannot remove the dll. I also seem to
remember that the OS will detect the cyclic reference after about 20 minutes
and clean all object references. Then I should be able to delete the dll.
Of course, rebooting would work too but that is not always an option.

Is there anyway to force the system to speed up the above process? override
the locking in this case? is there a windows kill -9? Is Russonovich or
Solomon reading this group???

bob

Here's something to try as a workaround. Sometimes you can rename the DLL,
and copy another one in its place. New processes should use the new one.
Delete the old one after a reboot. This would only work on Windows 2000 or
later.
 
On W2K and later, I just:
MOVE <old-file> <new-file>
COPY <update-file> <old-file>

Later on, delete <new-file> at your leisure.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//

Bob Weiner said:
thanks, good suggestion but its a no go. So now we know that neither the
web server process nor the associated dllhost process is the culprit.

While I am testing the program, a
reveals that dllhost.exe is the one and only process using the dll.

What if I have a cyclic reference inside the dll. For instance if I create
usermgmt.user which then creates usermgmt.svr which then inadvertantly
references the user object? I believe then that even after the last process
dies the file remains locked and I cannot remove the dll. I also seem to
remember that the OS will detect the cyclic reference after about 20 minutes
and clean all object references. Then I should be able to delete the dll.
Of course, rebooting would work too but that is not always an option.

Is there anyway to force the system to speed up the above process? override
the locking in this case? is there a windows kill -9? Is Russonovich or
Solomon reading this group???

bob

Here's something to try as a workaround. Sometimes you can rename the DLL,
and copy another one in its place. New processes should use the new one.
Delete the old one after a reboot. This would only work on Windows 2000 or
later.
 
Back
Top