Advanced Debugging Tips

Follow

You can force a memory.dmp to be created when a system hang occurs by enabling the following registry key and rebooting the server. To initiate the dump simply hold down the right CTRL key and press Scroll Lock twice.

Registry Settings
System Key:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters]
Value Name: CrashOnCtrlScroll
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = disabled, 1 = enabled)

You can configure additional "command line" arguments that get passed to the JRE by the nfserverr2 service by setting
HKLM\SYSTEM\CurrentControlSet\Services\NFServerR2\Parameters

In particular you can run the service in such a way that you can later attach the JDB debugger (or Eclipse or JBuilder if you're feeling adventurous).

The trick to getting this to work is to separate the options in the Parameters value using the tab char. But regedit doesn't allow you to put a tab char in the edit window. So you get around this by editing in notepad (etc) then cut&paste.

-Xdebug -Xrunjdwp:transport=dt_socket,address=5678,server=y,suspend=n
and then run jdb like this:
jdb -connect com.sun.jdi.SocketAttach:port=5678
You can pick a port.
You can also attach remotely:
jdb -connect com.sun.jdi.SocketAttach:port=5678,hostname=xxxx
And Eclise etc can be configured to talk to this port.
---------------------------------------------

However, before you could make that work, you need two other files (from \\192.168.1.1\Installables\QAtools\JDBDbg):
1. tools.jar : put it into $NFHinstalled_path\R2\jre\lib\ext\
2. jdb.exe : put it into $NFHinstalled_path$\R2\jre\bin\
Also, you can put the command line to run jdb into a batch file (eg.
jdbStart.bat) and put it into the same directory as jdb.exe. So that you can
run the batch file rather than type the command every time.

PLEASE NOTE THAT YOU SHOULD ONLY RUN THE JDB DEBUG WHEN THE NFH IS STUCK ON SOMEWHERE. OTHERWISE, IT MIGHT STOP NFH'S PROCESSING AT EVERY SINGLE POINT WHEN EXCEPTIONS ARE THROWN.

KBID-281

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.