Deployment action becomes idle - Advanced Installer Community
hitendamania
Posts: 3
Joined: Tue Jun 02, 2020 1:31 pm

Deployment action becomes idle

Hi

On click of install, we have created deployment action functions which get call in following order

1. Function to take backup of SQL DB
2. If backup is successful then it executes some sets of SQL scripts.
3. After the script is successfully executed it calls a function to uninstall sets of programs.

Once all the above three are successful, then installer starts the install execution stage.

The issue what we are facing is, after the step 2 is executed completely, it does not trigger step 3 but exe and msi are still running under task manager process. Sometimes we kill the msi process then it triggers the step 3 and installation goes ahead . This issue is not getting replicated on our test VMs but it happens on 30% of the live installation.

Few observations when this issue happens:
1. Mostly the OS was Windows server 2016
2. It takes lot of time to execute step 1 and step 2, sometime single functions take more than 30 min. We tried everything to reduce the execution time.
3. Step 2 is actually execute completely.
4. There is nothing written even in event viewer

Is there any timeout before any process sleep? Why it is not triggering step 3?
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Deployment action becomes idle

Hello and welcome to our forums,

This sounds like a strange behavior, indeed.

Honestly, this does not look like a issue with your custom action, but, just to be sure, we can try to debug it.

For instance, you can add some messageboxes in it, after every uninstall operation, to see if there is a problem with any of the operations. This custom action, can, for example, display the %errorcode% returned by each process.

However, taking in consideration this:
Sometimes we kill the msi process then it triggers the step 3 and installation goes ahead .
makes me think that the above is not the case (a problem with your custom action).

As you may know, only one install / uninstall process can be run at a time. This is a Windows Installer limitation.

The above is the reason why your custom action must be executed before the "Install Execution Stage", otherwise Windows Installer will throw the "Another installation is already in progress" error.

Since you have mentioned that by killing the MSI process, the installation continues and the custom action is executed, this makes me think that the custom action hangs because another installation process is already taking place on the respective machine. For instance, the machine could install a Windows Update at that time or maybe another MSI installation runs silently.

Normally, when trying to do the uninstall, the custom action should throw the error specified above. However, this might not be the case if you have unchecked the "Fail installation if custom action returns an error" option for your custom action.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hitendamania
Posts: 3
Joined: Tue Jun 02, 2020 1:31 pm

Re: Deployment action becomes idle

Hi Catalin

Thanks for your prompt response.

The below image shows you the custom actions called on click on Install button. I have marked Step 1 - 3. In each of this it fails the installation if there is any error. "Fail installation if custom action returns an error" is checked.
advaceinstaller_01.jpg
advaceinstaller_01.jpg (81.99 KiB) Viewed 2683 times
The condition regarding RESULT_CHK_PATCH....are updated properly during the install. On step 2 this variable values are updated.

Is there something where process sleeps after it exceed some execution time?

Again I repeat the step 1 and step 2 take lot of time, when this happens it takes more than 30 min to complete the step 2.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Deployment action becomes idle

Hello,
Is there something where process sleeps after it exceed some execution time?
To be fully honest with you, I am not aware of any scenario in which this may happen.

In fact, I have tested this just now and everything seemed to be working as expected. I have tested this by scheduling a PowerShellScriptInline custom action with the following content:

Code: Select all

Start-Sleep -Seconds 1200
on the "Install" button.

After this custom action (which all it does is wait 20 minutes), I have scheduled another custom action, a MessageBox one. The message box was correctly spawned after the 20 minutes of wait from the previous custom action.

As I have mentioned in my latest thread, I believe that this might be related to another installation process taking place at the same time when the uninstall custom action is executed.

In order to see if the custom action is launched for execution, could you please try to spawn a message box right at the beginning, e.g.:

if your custom action looks like this:

Code: Select all

uninstall app1
uninstall app2
etc.
it should look like this in the end:

Code: Select all

message box
uninstall app1
uninstall app2
etc.
If the message box is spawned, it means that the custom action is indeed executed but there might be a problem with the custom aciton's content - i.e. when trying to uninstall one of your applications.

Additionally, in order for me to have a better look about this, could you please forward me the following resources:

- a copy of the .AIP file

- a verbose log of the installation process from a machine where the issue reproduces

by e-mail at support at advancedinstaller dot com?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”