How to capture a dump of a crash using the “ntsd” tool

How to capture a dump of a crash using the "ntsd" tool

If a LoadRunner component (Vugen, Controller, Analysis, Mdrv, etc) crashes during use, further information is required to allow LoadRunner R&D to investigate the issue.

One of the most useful means to analyze the root cause of the crash is the call stack from the crash, which when combined with the source code allow the identification of the problem and provision of a workaround.

Solution

Follow these steps to generate a crash dump file:

Verify that "ntsd.exe" is present in the "windows\system32" folder. In some versions of Microsoft Windows this executable is missing and can be downloaded from the Microsoft website,

Start the business process,

Open Windows’ Task Manager (WTM) and get the ID of the process that is crashing (in WTM, use View->Select Columns… and tick the "PID (Process Identifier)" item),

Open command line (start -> run -> cmd),

Type "ntsd -p <ID retrieved in step (3)>. This operation will attach the debugger to the process and while it happens the process will be paused,

Type "g" after the step (5) finishes to continue with the process’s run,

Once the crash occurs, type ".dump <full file path>". For example ".dump c:\temp\mydump.dmp".

It is recommended that details of the scenario in which the crash occurs are also provided with the dump file.

Error -86801:Host access denied, not available or missing

Error -86801:Host access denied, <hostname> not available or missing

Problem

Media Player scripts fail with the error: Error -86801:Host access denied, <hostname> not available or missing.

Fix

Call the mms_disable_host_check function in all Media Player scripts

How to set the system’s TEMP and TMP directories

How to set the system’s TEMP and TMP directories

Changing the system’s temporary directories

To create a temporary directory:
1. Bring up Windows Explorer, find a drive that has sufficient space.
2. If TEMP folder does not exits, create a directory called "TEMP" in the root location of the drive.
Example: C:\TEMP

To add/change the temporary environemnt:

1. For Windows 2000 or Windows XP machine:

a. Right-click on the ‘My Computer’ icon on the desktop and select ‘Properties’.
b. Go to the Advanced tab and click on the ‘Environmental Variables’ button.
c. There are two sections listed: User Variables and System Variables. Under each section, you should see a variable for TEMP and TMP.
d. Double-click on these entries, and modify the location to the temporary environment created above.
Example:
Change from C:\Documents and Settings\<user>\Local Settings\Temp
Change to C:\TEMP
e. Click <Apply>.

2. For Windows NT machine:

a. Right-click on the ‘My Computer’ icon on the desktop and select ‘Properties’.
b. Go to the ‘Environmental’ tab.
c. There are two sections listed: User Variables and System Variables. Under each section, you should see a variable for TEMP and TMP.
d. Double-click on these entries, and modify the location to the temporary environment created above.
Example:
Change from C:\Documents and Settings\<user>\Local Settings\Temp
Change to C:\TEMP
e. Click <Apply>.

Windows limitation of maximum path length on the temporary directory of Performance Center load generator

Windows limitation of maximum path length on the temporary directory of Performance Center load generator

Problem

When running VuGen scripts in Performance Center and the following error appears:

"Error: The user files were not transferred to the local load generator."

Cause

The controller cannot transfer the script files to the Load Generator.

When running a scenario in LoadRunner Controller / Performance Center, the Controller transfers the Vugen script files to the temporary location on the Load Generators. The temporary location will be created under <the load generator’s temporary directory>\<brr folder>\netdir\<Path to the results folder on the controller>\<results name>.

For example, if the script in Controller is stored in c:\VugenScript\Script1 and the Load Generator has the temporary folder set to C:\Documents and Settings\Default User\Local Settings\Temp, the Load Generator would save this script file in C:\Documents and Settings\Default User\Local Settings\Temp\<brr folder>\netdir\c\VugenScript\Script1.

This is caused by a limitation of the maximum path length on Windows OS. The length limitation is 255 bytes in Windows XP and 260 bytes in Windows Vista. Please refer to MSDN: File Names, Paths, and Namespaces(http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx) for more details on this limitation.

Fix

On the Load Generator:

A. If you are running the agent as a process, you can change the "TEMP" system Variable of the user from C:\Documents and Settings\Default User\Local Settings\Temp to C:\Temp.

B. If you are running the agent as a service, you can change the service to use an account with Administration privileges, and change the admin account’s "TEMP" system variable to a shorter path:

– Go to Start -> Control Panel -> Administrative Tools -> Services.

– Look for the LoadRunner / Performance Center Agent Service.

– Right-click and select Properties->Log On, changing this from "Local System account" to "This account", supplying the Administrative account username and password.

– Change the admin user temporary location.

Script recording is slow and the recording platform occasionally becomes cpu bound

Script recording is slow and the recording platform occasionally becomes cpu bound

Problem

When recording a Citrix script, the recording activity is very slow and the recording platform sometimes becomes cpu bound (that is, peaks of 100% of cpu being used is observed).

However if VuGen is restarted or the recording platform is rebooted, recording performance is initially normal.

Cause

The Data Execution Prevention (DEP) feature is enabled on the recording platform.

Fix

Disable the Data Execution Prevention (DEP) feature using the procedure described in How to configure the Windows Data Execution Prevention (DEP) feature.

How to configure the Windows Data Execution Prevention (DEP) feature

How to configure the Windows Data Execution Prevention (DEP) feature

Data Execution Prevention (DEP) is a feature that has been introduced with Microsoft Windows XP SP2, Windows Server 2003, Windows Vista and newer versions of the Windows operating systems. This feature performs additional checks on memory to help prevent malicious code from running on Windows platforms. However DEP may in some cases interfere with the proper operation of software including LoadRunner components. If unusual behavior is observed when recording scripts, running load tests or analysing data then it may be necessary to modify the DEP configuration to continue working.

Solution

To modify the Windows XP or Windows Server 2003 DEP configuration, follow these steps:

1. Open Start > Control Panel > System.

2. In the Advanced tab, click Performance settings.

3. In the Performance Options Data Execution Prevention tab, select

The first option, DEP for essential services only.

5. Click OK to save the settings.

6. Reboot the machine.

To disable DEP completely in Windows XP or Windows Server 2003, follow these steps:

1. Click Start, and then click Control Panel.

2. Under Pick a category, click Performance and Maintenance (If the System is not available directly under control panel).

3. Under or Pick a Control Panel icon, click System.

4. Click the Advanced tab, and in the Startup and Recovery area, click Settings.

5. In the System startup area, click Edit.

6. In Notepad, click Edit and then click Find.

7. In the Find what field, type /noexecute and then click Find Next.

8. In the Find dialog box click Cancel.

9. Replace the policy_level (for example, “OptIn” default) with “AlwaysOff” (without the quotes).

WARNING: Be sure to enter the text carefully. Your boot.ini file switch should now read:

/noexecute=AlwaysOff

10. In Notepad, click File and then click Save.

11. Click OK to close Startup and Recovery.

12. Click OK to close System Properties and then restart your computer.

If the DEP options are greyed out then it means that DEP is completely disabled.

To enable or disable DEP in Windows Vista, follow these steps:

1. Open a Elevated Command Prompt

i. Open the Start Menu

ii. Click All Programs and Accessories

iii. Right click on Command Pront and click Run as Administrator

iv. Click on Continue

2. To Disable DEP

i. In the Elevated Command Prompt, type:

bcdedit.exe /set {current} nx AlwaysOff

ii. Restart the computer to apply

3. To Enable DEP

i. In the Elevated Command Prompt, type:

bcdedit.exe /set {current} nx OptIn

ii. Restart the computer to apply

DEP Options:

AlwaysOff

DEP is disabled for all processes.

AlwaysOn

DEP is enabled for all processes.

OptIn

DEP is enabled for only Windows system components and services that have DEP applied. This is the default setting.

Note:

This setting does not provide any DEP coverage for any part of the system, regardless of hardware DEP support.