Crashes when closing an application

View: New views
4 Messages — Rating Filter:   Alert me  

Crashes when closing an application

by Alex King-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am running a server system on Debian stable (Lenny), with freenx server packages from the Ubuntu PPA (0.7.3+teambzr104-0freenxteam1~intrepid1).

The clients are the nomachine 3.3.0-6 debian package running on Debian stable.

I am having a problem that when some particular programs are exited, the whole session crashes.  This happens consistently when a particular windows program is run under wine, and also often with openoffice.org (Debian backports version 1:3.1.1-1~bpo50+1).

With the wine program, I have told users to minimise the program instead of exiting it, and this is a reasonable short-term workaround.  It is impossible for them to keep open every openoffice window they use though.

After the sessions crash, subsequent logins often have problems starting gnome-panel or nautilus, and we have to kill and restart them to get them working OK.

There appear to be few clues left in the logs - the users' xsession logs show the x server has gone away.

The following message appears in the nx log:

1004 Error: NX Agent exited with exit status 1. To troubleshoot set SESSION_LOG_CLEAN=0 in node.conf and investigate "/home/marilyn/.nx/F-C-cushn14-1025-B46698BBE414DD5A651FB3B3E242892C/session".

I have done that but I can't see anything there to help me.

If I bypass nx altogether by using xdmcp logins, everything works fine without the crashes.

How should I go about debugging in a situation like this?

Cheers,
Alex

________________________________________________________________
     Were you helped on this list with your FreeNX problem?
    Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ
 
         Don't forget to check the NX Knowledge Base:
                 http://www.nomachine.com/kb/ 

________________________________________________________________
       FreeNX-kNX mailing list --- FreeNX-kNX@...
      https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________

Re: Crashes when closing an application

by Mario Becroft :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alex King <alexcking@...> writes:

> The following message appears in the nx log:
>
> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set
> SESSION_LOG_CLEAN=0 in node.conf and investigate "/home/marilyn/.nx/
> F-C-cushn14-1025-B46698BBE414DD5A651FB3B3E242892C/session".
>
> I have done that but I can't see anything there to help me.
>
> If I bypass nx altogether by using xdmcp logins, everything works fine without
> the crashes.
>
> How should I go about debugging in a situation like this?

Is nxagent actually crashing? If so, get a stack trace from the core
dump. That will almost certainly help someone diagnose the problem.

If it is just exiting, and there is no diagnostic output pointing to
why, then that's rather tricky.

Does the problem happen every time you close an openoffice.org window,
even if the app is still running, or does it happen only when closing
the last window? Is the result the same when clicking on the close
button in the window decoration, and when choosing the Close option from
the File menu?

One thing you could try is run with a different window manager (or no
window manager) and see if anything changes.

--
Mario Becroft <mb@...>
________________________________________________________________
     Were you helped on this list with your FreeNX problem?
    Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ
 
         Don't forget to check the NX Knowledge Base:
                 http://www.nomachine.com/kb/ 

________________________________________________________________
       FreeNX-kNX mailing list --- FreeNX-kNX@...
      https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________

Re: Crashes when closing an application

by Alex King-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Wed, Oct 28, 2009 at 10:48 AM, Mario Becroft <mb@...> wrote:
Alex King <alexcking@...> writes:

> The following message appears in the nx log:
>
> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set
> SESSION_LOG_CLEAN=0 in node.conf and investigate "/home/marilyn/.nx/
> F-C-cushn14-1025-B46698BBE414DD5A651FB3B3E242892C/session".
>
> I have done that but I can't see anything there to help me.
>
> If I bypass nx altogether by using xdmcp logins, everything works fine without
> the crashes.
>
> How should I go about debugging in a situation like this?

Is nxagent actually crashing? If so, get a stack trace from the core
dump. That will almost certainly help someone diagnose the problem.

I don't think so.  Where would the cores end up?
If it is just exiting, and there is no diagnostic output pointing to
why, then that's rather tricky.

Does the problem happen every time you close an openoffice.org window,
even if the app is still running, or does it happen only when closing
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.
the last window? Is the result the same when clicking on the close
button in the window decoration, and when choosing the Close option from
the File menu?

Yes, the same through WM or app exit.
One thing you could try is run with a different window manager (or no
window manager) and see if anything changes.

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.

I am thinking I need to build nx agent and nx libs and do a debug build, if there is an option for that.

Cheers,
Alex
--
Mario Becroft <mb@...>
________________________________________________________________
    Were you helped on this list with your FreeNX problem?
   Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ

        Don't forget to check the NX Knowledge Base:
                http://www.nomachine.com/kb/

________________________________________________________________
      FreeNX-kNX mailing list --- FreeNX-kNX@...
     https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________


________________________________________________________________
     Were you helped on this list with your FreeNX problem?
    Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ
 
         Don't forget to check the NX Knowledge Base:
                 http://www.nomachine.com/kb/ 

________________________________________________________________
       FreeNX-kNX mailing list --- FreeNX-kNX@...
      https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________

Re: Crashes when closing an application

by Mario Becroft :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alex King <alexcking@...> 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@...>
________________________________________________________________
     Were you helped on this list with your FreeNX problem?
    Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ
 
         Don't forget to check the NX Knowledge Base:
                 http://www.nomachine.com/kb/ 

________________________________________________________________
       FreeNX-kNX mailing list --- FreeNX-kNX@...
      https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________