Closed Bug 330885 Opened 14 years ago Closed 11 years ago
uninstaller hangs waiting for parent process to disappear
I was trying to debug bug 329237 , but I couldn't get the uninstaller to do anything on my laptop. After some debugging, it turns out it's churning in the loop at http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/installer/windows/wizard/uninstall/uninstall.c#137 Even though the parent process has exited, OpenProcess() continues to return a valid HANDLE value. dbradley says this might be because something is holding onto a handle from the process, but I couldn't see anything using Process Explorer. Right now this is 100% reproducible for me.
I think real problem is that this algorithm assumes that it's the only thing that would have a handle to this process. If something, such as virus software, has a handle open, this will not stop until that's released. Maybe do an OpenProcess, then WaitForSingleObject without looping. Then if the wait succeeds check to see if you can do what you need to do with the file via a Win32 file API call. Maybe loop on that check a reasonable amount of times. I haven't looked at it enough to understand what the higher level goal is, so maybe there's yet another alternative. A simpler solution would be to limit the number of times through the loop. That breaks the infinite part, but won't address the issue mentioned above. In the end luser needs to figure out the source of what is keeping the process information alive so you're sure what you're dealing with here.
I tried disabling my antivirus, no luck. Booting into safe mode, however, makes it work.
Sounds to me as though this might be a duplicate of bug 325042.
Do you think? My installer hangs way before it gets to the "launch IE" phase. It hasn't even removed any files yet. Could be similar issues with child processes, I guess.
For the record, putting CREATE_NEW_PROCESS_GROUP into the flags for CreateProcess doesn't fix this.
Assignee: nobody → darin
Severity: normal → major
Priority: -- → P2
Target Milestone: --- → Firefox1.5
-> reassign to default owner
Assignee: darin.moz → nobody
Version: Trunk → 1.5.0.x Branch
Duping over to bug 325042. Note: I don't know of a single installer that has a decent solution to this and it is behavior that is locked down by Windows itself.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 325042
You need to log in before you can comment on or make changes to this bug.