While investigating problems related to a sudden termination of the session, the Support Team could request to run the GDB debugger in the user's environment to examine what happened when the program terminated.
Prerequisite: the system is configured to generate core files.
Many Linux distributions (e.g. RHEL/CentOS) have it disabled by default. Ensure to turn on the creation of core files.
The following instructions should help in most cases, but we recommend to consult the official documentation of your Linux.
Edit the /etc/profile file and change the ulimit line as it follows:
ulimit -c unlimited >/dev/null 2>&1
Edit the /etc/sysctl.conf file and add the following lines to the end of the file:
kernel.core_uses_pid = 1
kernel.core_pattern = /tmp/core-%e--%u-%g-%p-%t
fs.suid_dumpable = 2
Reproduce the problem and proceed to analyze the core dump with GDB as explained below.
Run GDB with NoMachine
1. Install GDB if is it's not already installed: http://www.gnu.org/software/gdb/
2. Verify if a core file has been generated on the remote machine where you are connecting to.
3. If there is a core file, run GDB as root or as sudo user:
# gdb -core=<path_to_core_file> -se=/usr/NX/bin/nxnode.bin
4. in the GDB command line type:
set height 0
set logging file /tmp/nodeBacktrace.log
set logging on
thr apply all bt
5. Send the /tmp/nodeBacktrace.log to the Support Team.
If the core file has been generated by nxserver.bin, nxclient.bin or nxplayer.bin, replace command at point 3. with any of the following:
gdb -core=<path_to_core_file> -se=/usr/NX/bin/nxserver.bin
gdb -core=<path_to_core_file> -se=/usr/NX/bin/nxclient.bin
gdb -core=<path_to_core_file> -se=/usr/NX/bin/nxplayer.bin