[FreeNX-kNX] Crashes when closing an application
Mario Becroft
mb at gem.win.co.nz
Tue Oct 27 23:49:24 UTC 2009
Alex King <alexcking at gmail.com> writes:
> I don't think so. Where would the cores end up?
In the user's home directory, probably. Check the ulimit -c setting
though. Many linux distros set it to 0, disabling core dumps, meaning
you can't really debug anything. Make sure it's set to unlimited.
> It doesn't do it consistently with ooo. I can't easily make it happen, but
> some users always crash when exiting the same document.
If you can find a way to reliably repeat the problem, this would of
course make analysis much easier.
> I initially thought it was a problem with gnome-session, but it turns out it
> happens with at least XFCE and blackbox as well. I think I tried KDE as well.
Definitely seems to be a problem with nx.
Before going further, make sure you are running the latest versions (if
you're using a package from your linux distro, it may not be fully
up-to-date). Many crash bugs have been fixed relatively recently.
You may have already mentioned this, but when the problem occurs, does
the user's session die completely (i.e. when he reconnects he gets a new
session) or does it just get suspended (i.e. there is still an nxagent
process running, owned by the user, and when he reconnects he gets his
existing session back)?
If it is being suspended, then the problem is most likely in the client
(the client is dying, so the server suspends the session). If the
nxagent is completely gone, then it must be a server problem. Almost
certainly a nxagent crash, and if you get a core dump then we should be
able to analyse it. (I am assuming here that you are running an agent
session.)
> I am thinking I need to build nx agent and nx libs and do a debug build, if
> there is an option for that.
Yes, if you are using the binaries from Nomachine or your distro,
they've probably been stripped, making debugging nearly
impossible. Please see below my brief notes on building nx for
debugging. It's quite easy.
--8<---------------cut here---------------start------------->8---
Building
Building is very simple once you know what to do.
Get all the nx packages from the nomachine web site. Unpack them.
In each package directory (nxcomp, nxcompext, nxcompshad, nxssh etc.):
./configure && make
Building nxagent (the X server) is different:
cd nx-X11
make World
To install in /usr/NX, run /mnt/qc/it/nx/install_nx. [1]
Building for debugging
Configure each package like this:
./configure --with-symbols --with-valgrind
Then edit the makefile, changing both occurance of -O3 to -O0.
Build them as normal.
for the X server, patch host.def as follows:
--- nx-X11/config/cf/host.def-dist 2009-01-04 19:07:10.754083772 +1300
+++ nx-X11/config/cf/host.def 2009-01-09 18:17:37.983928079 +1300
@@ -507,7 +507,8 @@
* Enable all the optimizations on AMD64.
*/
-#define DefaultGcc2AMD64Opt -g -O3 GccAliasingArgs
+/*#define DefaultGcc2AMD64Opt -g -O3 GccAliasingArgs*/
+#define DefaultGcc2AMD64Opt -g -O0 GccAliasingArgs
/*
* This allows the GCC warning flags to be set. The default is shown here.
@@ -789,6 +790,7 @@
*
#define DebuggableLibraries YES
*/
+#define DebuggableLibraries YES
#if defined(LinuxArchitecture)
#define DebuggableLibraries YES
#endif /* #if defined(LinuxArchitecture) */
--8<---------------cut here---------------end--------------->8---
1: install_nx
--8<---------------cut here---------------start------------->8---
#!/bin/sh
# Install libraries etc.
# Libraries
#You can use the following schema to do the install to /usr/NX/:
NXPREFIX=/usr/NX
mkdir -p ${NXPREFIX}/lib ${NXPREFIX}/bin ${NXPREFIX}/etc
install nx-X11/lib/X11/libX11.so* ${NXPREFIX}/lib
install nx-X11/lib/Xext/libXext.so* ${NXPREFIX}/lib
install nx-X11/lib/Xrender/libXrender.so* ${NXPREFIX}/lib
install nxcomp/libXcomp.so* ${NXPREFIX}/lib
install nxcompext/libXcompext.so* ${NXPREFIX}/lib
install nxcompshad/libXcompshad.so* ${NXPREFIX}/lib
# binaries
install nx-X11/programs/Xserver/nxagent ${NXPREFIX}/bin
install nxproxy/nxproxy ${NXPREFIX}/bin
--8<---------------cut here---------------end--------------->8---
--
Mario Becroft <mb at gem.win.co.nz>
More information about the FreeNX-kNX
mailing list