A customer installed a third party application on a Citrix XenApp 5 server which in turn broke all ICA connections. Users were no longer able to launch any applications once this third party application was installed. If the application was uninstalled, all ICA connections began to work again.
The name of the application that was installed is Data Transformation Studio. Notepad is published on the same server. As notepad is launched clicked in Web Interface it appeared that the application would launch.
A short time later the following message would appear.
“Notepad 1” failed to start.
The Citrix server is unable to process your request to start thish published application at this time.
Please try again later. If the problem persists, contact your administrator.”
Once Data Transformation Studio is uninstalled, Notepad launches correctly. The ideal tool(s) for troubleshooting this issue come from the SysInternals Suite. The two primary tools used for this case were Process Monitor and Process Explorer.
The first step was to use Process Explorer to see what processes were starting when attempting to launch an application. Process explorer offers many advantages over Task Manager including a process tree view and the shading.
The update speed can be modifed to clearly identify newly started processes and exiting processes.
In this case, the update speed was changed to 2 seconds. An addition column was also added for session ID from view > select columns.
New processes are highlighted in green and exiting processes are highlighted in red. Some screen shots were taken of the processes during an attempting application launch of Notepad.
The launch error was reproduced and the following processes were left behind.
By luck, something stood out when looking at the data above. The icon for CMStart.exe looked exactly like the icon for the newly installed application.
Data Transformation Studio should not be invoked while launching Notepad from the server. Further investigation was needed.
A Process Monitor trace was started and the application launch error was reproduced. A quick filter was set up to see the process name cmstart.exe.
Hovering the process clearly indicated that this executable is running from the Data Transformation Studio directory.
A new column was added to vew the parent process ID. The parent process ID is 2496. A new filter was added to view the parent process.
The parent process is found to be userinit.exe and it is clearly seen that userinit.exe is loading cmstart.exe from the Data Transformation directory.
Citrix also uses an executable file named cmstart.exe. This clearly seems to be the issue. CMStart.exe should be loading from Program Files\Citrix\System32\cmstart.exe. Cmstart.exe gets loaded from the AppSetup string value in the Winlogon key under HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon.
CMSTART.EXE is responsible for starting WFSHELL.EXE which load the virtual channels and CLTMGR.EXE which is the client manager.
The biggest question now, why is cmstart.exe loading from Data Transformation rather than Citrix? The answer lies in the Environment PATH variable.
The PATH variable contains a semicolon-delimited list of directories in which the command interpreter will search for executable files.
By opening System Properties > Advanced > Environment Variables the answer becomes clear. Data transformation studio created a path value at the beginning of the path variable before the Citrix path. The system uses this directory list and will load the first binary available through the PATH, which in this case CMSTART.EXE is found first in the Data Transformation Studio directory.
The simple solution to this case was to move the Data Transformation Studio path to the end of the PATH variable, therefore allowing the proper cmstart.exe to load during app launch.
CTX983798 – Purpose of CMSTART command