Product: TIBCO Spotfire®
How to set up an automatic dump capture from an unresponsive Web Player with IIS Process Orphaning.
You can automatically trigger creation of a Web Player dump file using Internet Information Services (IIS) Process Orphaning, in order to capture a dump file at the exact moment when an intermittent or infrequent hang or crash occurs. This is useful when a dump file is required for investigation to determine a cause for a Web Player crash or hang.
If a Web Player hangs, it is useful to capture a dump while it is hung/unresponsive, to analyze the state of all threads. It is not easy to do this manually, but it can be achieved using IIS Process Orphaning. Below are the steps to set this.
Install the standard Windows Debugger
1. Go to https://msdn.microsoft.com/sv-SE/windows/desktop/bg162891 or search for "Windows Software Development Kit (SDK) for Windows" and click on "Install and download".
2. Run the Installer and select the "Debugging Tools for Windows" box. Clear all the other boxes. The installed debuggers will be located here (or similar path): "C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64" or search for "cdb.exe".
Setup Result Folder and Scripts
1. Create a new folder, for example: "c:\autodump\". Inside this folder create folders "dumps" and "bin" . Be sure that there is enough free disk space.
2. Make sure that the IIS App Pool user can access the new folder structure.
3. Create the .bat script "dump.bat" with the following content and save it into the "bin" folder.
@if "%_echo%"=="" echo off
set TIMESTAMP=%TIMESTAMP: =_%
set COMMAND="C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64\cdb.exe" -c ".dump /mhtpFidcu /o %FILENAME%;q" -p %1
echo %DATE% %TIME% %COMMAND% >> %LOG%
echo tasklist /fi "PID eq %1" >> %LOG%
tasklist /fi "PID eq %1" >> %LOG%
%COMMAND% >> %LOG%
echo %DATE% %TIME% End dump >> %LOG%
4. Adjust the cdb.exe path if needed.
5. Test the script in a command prompt. "c:\autodump\bin\dump.bat ", where is the process ID for a Web Player process.
The result should be that a dump file is created in the folder c:\autodump\dumps\
Setting up IIS to use the script
1. Open the IIS Manager.
2. Click "Advanced Settings" for the Application Pool used by Web Player.
3. Make sure that "Ping Enabled" is True and "Ping Maximum Response Time (seconds)" and "Ping Period (seconds)" are set to the values you want.
4. Enable "Process Orphaning" and point out the script like in the attached screenshot. (Filename: SENGR-HowToSetupAutomaticDumpCapturefromaNonRespondingWebPlayer-190215-1304-30.pdf) Do not forget the "Executable Parameters" field.
5. If the Web Player worker process does not respond to a ping within the ping maximum response time, the script will be called and a dump will be created. This can be tested by setting a very low ping maximum response time. Verify in the Event Viewer and System log. There should be an event. If all steps work, this configuration can be used to get automatic dumps for a Web Player that hangs.
The parameter "/mhtpFidcu" in the script defines what to include. Changing this parameter will send different content to the dumps.
1. /mhtpFidcu An attempt to include most information that may be useful when analyzing the dump, but the full memory content is not included to keep the size down.
2. /ma Include all optional content, including the full memory data.
3. /m___ If the /m___ parameter is removed, a standard minidump is generated, with not much more than the thread information included.
Note that this script generates minidumps, but a minidump captured with the /ma flag will actually contain more information than a full dump. For details, go to the following link.
See the attached document (Filename: SENGR-HowToSetupAutomaticDumpCapturefromaNonRespondingWebPlayer-190215-1304-30.pdf) for the procedure with screenshots.