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
- 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".
- 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
- 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.
- Make sure that the IIS App Pool user can access the new folder structure.
- Create the .bat script "dump.bat" with the following content and save it into the "bin" folder.
@if "%_echo%"=="" echo off setlocal set TIMESTAMP=%DATE:~-9%_%TIME% set TIMESTAMP=%TIMESTAMP:/=_% set TIMESTAMP=%TIMESTAMP::=_% set TIMESTAMP=%TIMESTAMP:.=_% set TIMESTAMP=%TIMESTAMP: =_% set FILENAME=c:\autodump\dumps\dump_PID_%1_%TIMESTAMP%.dmp set LOG=c:\autodump\log.txt 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% endlocal
4. Adjust the cdb.exe path if needed.
5. Test the script in a command prompt. "c:\autodump\bin\dump.bat <pid>", where <pid> 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
- Open the IIS Manager.
- Click "Advanced Settings" for the Application Pool used by Web Player.
- Make sure that "Ping Enabled" is True and "Ping Maximum Response Time (seconds)" and "Ping Period (seconds)" are set to the values you want.
- 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.
- 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.
Dump Configuration
The parameter "/mhtpFidcu" in the script defines what to include. Changing this parameter will send different content to the dumps.
- /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.
- /ma Include all optional content, including the full memory data.
- /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.
External: Minidumps ?See the attached document (Filename: SENGR-HowToSetupAutomaticDumpCapturefromaNonRespondingWebPlayer-190215-1304-30.pdf) for the procedure with screenshots.
Comments
0 comments
Article is closed for comments.