Bug #22544 agent uninstall reports 'finished' but agent exe still present (br 1536)
Submitted: 21 Sep 2006 11:00 Modified: 10 Nov 2006 13:10
Reporter: Carsten Segieth Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Enterprise Monitor: Installing Severity:S2 (Serious)
Version:0.6.15 - 0.7.28 OS:Windows (Windows)
Assigned to: Assigned Account CPU Architecture:Any
Tags: reboot, service

[21 Sep 2006 11:00] Carsten Segieth
Description:
During / at the end of the agent unInstall no warning is shown that the agent binary is locked by running services. So the user thinks, that the unInstall was successfull, but is was not.

Also the unInstall log does not show that there were locked files, it seems that the locked files are not added to the PendingFileRenmaeOperations to be removed at the next reboot of the machine and from this no reboot is requested.

Starting a new installation, e.g. to update the agent, fails from the running and locked files: errors are shown that the mysql-service-agent.exe (and all .dlls) cannot be copied although I answered at the beginning of the installation that I like to remove the (detected) existing installation.

After clicking 'Abort' the install closes without any further notice and leaves a 'broken' installation where some files are installed, which are not removed.

Bitrock_unInstaller.log, showing that the .exe is unInstalled:
--------------------------------------------------------------
Log started 09/21/06 at 12:16:14
Preferred installation mode : win32
Mode win32 successfully initted
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\mysql-service-agent.exe...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\items-mysql-network.xml...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\items-os.xml...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\items-slavestatus-mysql-4.1.6.xml...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\items-status-mysql-5.0.11.xml...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\items-variables-mysql-5.0.11.xml...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\iconv.dll...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\intl.dll...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libcurl.dll...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libglib-2.0-0.dll...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libgthread-2.0-0.dll...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libxml2.dll...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\zlib1.dll...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\zlibwapi.dll...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\mysql.ico...
Uninstalling C:\Dokumente und Einstellungen\All Users\Startmenü\Programme\MySQL Network Service Agent\Start MySQL Network Service Agent service.lnk...
Uninstalling C:\Dokumente und Einstellungen\All Users\Startmenü\Programme\MySQL Network Service Agent\Stop MySQL Network Service Agent service.lnk...
Uninstalling C:\Dokumente und Einstellungen\All Users\Startmenü\Programme\MySQL Network Service Agent\Uninstall MySQL Network Service Agent.lnk...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\uninstall.exe...
Deleting registry keys
Skipping C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0
Skipping C:\Dokumente und Einstellungen\All Users\Startmenü\Programme\MySQL Network Service Agent
Uninstallation completed

How to repeat:
- install on Windows using the BitRock installer
- create additional service entries for the agent
- start these services
- start the unInstall of the agent (while leaving the services running)
- start an install of the next version

Suggested fix:
- check whether files are locked and cannot be replaced/removed and warn the user about (e.g. like it is done during the file copy, although the error message here does not contain any hint about a possibly locked file)
- report such problems to the log file!
- in case of an abort of the installation revert any changes that has been done already to the system
[19 Oct 2006 15:50] Carsten Segieth
tested with 0.7.5 the unInstall seems now no longer stops the 'known' standard service which is created during install. The service entry is removed, but the files seems to be locked when they shall ve removed. So they all stay on the machine and the unInstall does not show any warning about, although the log shows the failiure during the file deletes:

Log started 10/19/06 at 17:37:15
Preferred installation mode : win32
Mode win32 successfully initted
Stopping Services
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\mysql-service-agent.exe...
Failed to remove C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\mysql-service-agent.exe
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\items-mysql-network.xml...
Failed to remove C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\items-mysql-network.xml
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\items-slavestatus-mysql-4.1.6.xml...
Failed to remove C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\items-slavestatus-mysql-4.1.6.xml
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\iconv.dll...
Failed to remove C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\iconv.dll
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\intl.dll...
Failed to remove C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\intl.dll
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libcurl.dll...
Failed to remove C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libcurl.dll
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libglib-2.0-0.dll...
Failed to remove C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libglib-2.0-0.dll
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libgthread-2.0-0.dll...
Failed to remove C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libgthread-2.0-0.dll
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libxml2.dll...
Failed to remove C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\libxml2.dll
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\zlib1.dll...
Failed to remove C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\zlib1.dll
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\zlibwapi.dll...
Failed to remove C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\zlibwapi.dll
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\mysql.ico...
Uninstalling C:\Dokumente und Einstellungen\All Users\Startmenü\Programme\MySQL Network Service Agent\Start MySQL Network Service Agent service.lnk...
Uninstalling C:\Dokumente und Einstellungen\All Users\Startmenü\Programme\MySQL Network Service Agent\Stop MySQL Network Service Agent service.lnk...
Uninstalling C:\Dokumente und Einstellungen\All Users\Startmenü\Programme\MySQL Network Service Agent\Uninstall MySQL Network Service Agent.lnk...
Uninstalling C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0\uninstall.exe...
Deleting registry keys
Skipping C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0
Skipping C:\Dokumente und Einstellungen\All Users\Startmenü\Programme\MySQL Network Service Agent
Uninstallation completed
[24 Oct 2006 2:48] Keith Russell
Reported as resolved by Bitrock in versions >= 7.9
[25 Oct 2006 0:07] Carsten Segieth
- no message/warning is shown to the user that the unInstall failed, although the log shows files that could not be removed (because they are locked), so this is detected by the unInstaller
- files are not added to the PendigFileRenameOperations and no reboot is requested
[25 Oct 2006 15:03] Carsten Segieth
*not* fixed in 0.7.11:
----------------------

- installed 0.7.11 into an existing directory (where only some .ini files were present)
- started default service 'MySQLNetworkServiceAgent'
- started 2nd service 'MySQLNetworkServiceAgent_3307'
- started unInstall (interactive)
- got the info message box 'Uninstallation completed'
- the default service 'MySQLNetworkServiceAgent' is uninstalled from the Service Manager
- the 2nd service 'MySQLNetworkServiceAgent_3307' still present in the Service Manager (which I think is OK, as I created it)

BUT:

- the .dll/.exe files are still present on the machine (I removed the lines with my self-created .ini files):

16.49.29 C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0>dir
 Datenträger in Laufwerk C: ist IBM_PRELOAD
 Volumeseriennummer: 48FC-0A04

 Verzeichnis von C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0

2006-10-25  16.46    <DIR>          .
2006-10-25  16.46    <DIR>          ..
2006-10-04  22.03           888.832 iconv.dll
2006-10-25  15.14            52.625 install.debugtrace.log
2006-10-04  22.03            45.056 intl.dll
2006-10-25  05.41             4.984 items-mysql-network.xml
2006-10-25  05.41             8.061 items-slavestatus-mysql-4.1.6.xml
2006-10-04  22.03           237.568 libcurl.dll
2006-10-04  22.03           662.998 libglib-2.0-0.dll
2006-10-04  22.03            36.661 libgthread-2.0-0.dll
2006-10-04  22.03           876.032 libxml2.dll
2006-10-25  05.37         1.335.296 mysql-service-agent.exe
2006-10-25  15.16               333 mysql-service-agent.log
2006-10-04  22.03            59.904 zlib1.dll
2006-10-04  22.03            74.240 zlibwapi.dll
[27 Oct 2006 3:31] Keith Russell
Reported as resolved by Nitrock in builds =>7.14
[30 Oct 2006 15:13] Carsten Segieth
test with 0.7.15 FAILed, same behaviour as described above.
[3 Nov 2006 11:51] Carsten Segieth
no change visible with 0.7.20:

- all locked files are marked with 'failed to remove ...' in the log and remain on the system
- unInstall (started from ARP menu) shows 'completed'
[6 Nov 2006 18:29] Keith Russell
Reported by Bitrock as corrected in ver => 7.24
[10 Nov 2006 13:10] Carsten Segieth
tested OK with 0.7.28 - now all locked processes are noted in PendingFileRenameOperations and a Reboot is requested.

But much better would be if the unInstall checks after stopping the default service and before the file removal starts whether the .exe is locked from an other service. Then a warning should be shown which would give the user the possibility to stop the 'forgotten' services before, then no reboot would be needed. And supressing the need of a reboot would be the best because the product is intended to be used on server machines where each reboot is one reboot to much.

From this I change the status to 'to be fixed later' as the current solution is OK but can (should) be improved after GA.
[10 Nov 2009 16:46] Enterprise Tools JIRA Robot
Carsten Segieth writes: 
Another possible problem: there is no check at the start on an install process against existing entries in "PendingFileRenameOperations".

So if there are files marked to be deleted at the next reboot and the user chooses to (re)install without prior reboot into exact the same directory these files will be discarded at next reboot and the installation will be unusable due to suddenly missing files.
[13 Mar 2014 13:35] Omer Barnir
This bug is not scheduled to be fixed at this time.