Subject: Bug#1279: Idle connection crashes and is unable to resume

From: Michael Schneider <[email-masked]>
Date: Wed, 28 Mar 2018 09:12:10 -0400

Package: x2goserver

Version: 4.1.0.0

I recently upgraded x2goserver for Ubuntu 16.04.1.  The output of
x2goversion is below

x2golxdebindings: 1.0.2.4

x2gomatebindings: 0.0.1.5

x2goserver: 4.1.0.0

x2goserver-common: 4.1.0.0

x2goserver-extensions: 4.1.0.0

x2goserver-fmbindings: 4.1.0.0

x2goserver-printing: 4.1.0.0

x2goserver-x2goagent: 3.5.99.16

x2goserver-xsession: 4.1.0.0

After doing so now Idle sessions crash and are unable to resume.  The
`nxagent` process for the user begins eating up 100% CPU.  When I log in I
get a pulse audio error.

If I suspend the session (close the client without logging out) then reopen
it right away (with just a few minutes) I am able to successfully resume
the session.  However, if I leave the connection active but idle for
sometimes 15 minutes sometimes a few hours, the connection terminates.  The
client displays an error about the connection being terminated.  When I try
to log back in.  The client pops up an error about the remote proxy and
won't let me connect.

To reconnect I have to log in with putty and manually terminate the session
using:

$ x2goterminatesession <session_id>

Below are excerpts from syslog and session.log

*Syslog*

Mar 27 14:23:39 myhost systemd[1]: Started Session 5372 of user <user>.

Mar 27 14:23:39 myhost console-kit-daemon[2848]: (process:14605):
GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

Mar 27 14:23:39 myhost console-kit-daemon[2848]: missing action

Mar 27 14:23:44 myhost /usr/bin/x2gostartagent: successfully started X2Go
Agent session with ID <user>-53-1522175022_stDMATE_dp32

Mar 27 14:23:58 myhost /usr/bin/x2gosetkeyboard: Setting X keyboard
according to /home/<user>/.x2go/C-<user>-53-1522175022_stDMATE_dp32/keyboard

Mar 27 14:23:58 myhost /usr/bin/x2goruncommand: launching session with
Xsession-x2go mechanism, using STARTUP="mate-session"/x2

Mar 27 14:23:58 myhost /usr/bin/x2goruncommand: dbus wrapper available as
/usr/bin/dbus-run-session

Mar 27 14:23:59 myhost /usr/bin/x2gomountdirs[15174]: successfully
mounted <client_user>@127.0.0.1:33302/cygdrive/C/Users/<client_user_id>/DOWNLO~1
to /tmp/.x2go-<user>/media/disk/_cygdrive_C_Users_<client_user_id>_DOWNLO1
<[email-masked]:33302/cygdrive/C/Users/c10639/DOWNLO~1%20to%20/tmp/.x2go-schnemi/media/disk/_cygdrive_C_Users_c10639_DOWNLO1>

Mar 27 14:24:00 myhost pulseaudio[15611]: [pulseaudio] core-util.c: Failed
to open configuration file
'/home/<user>/.x2go/C-<user>-53-1522175022_stDMATE_dp32/.pulse-client.conf':
No such file or directory

Mar 27 14:24:01 myhost /usr/bin/x2gomountdirs[15174]: successfully
mounted <client_user>@127.0.0.1:33302/cygdrive/C/Users/<client_user_id>/X2GO~1/S-1249~1/spool
to /tmp/.x2go-<user>/spool/C-<user>-53-1522175022_stDMATE_dp32
<[email-masked]:33302/cygdrive/C/Users/c10639/X2GO~1/S-1249~1/spool%20to%20/tmp/.x2go-schnemi/spool/C-schnemi-53-1522175022_stDMATE_dp32>

…

…

…

Mar 27 14:25:41 myhost /usr/sbin/x2gocleansessions[40872]:
<user>-53-1522175140_stDMATE_dp32: state file for this session does not
exist: /tmp/.x2go-<user>/C-<user>-53-1522175140_stDMATE_dp32/state (this
can be ignored during session startups)

Mar 27 14:25:41 myhost /usr/sbin/x2gocleansessions[5711]:
<user>-53-1522175140_stDMATE_dp32: state file for this session does not
exist: /tmp/.x2go-<user>/C-<user>-53-1522175140_stDMATE_dp32/state (this
can be ignored during session startups)

Mar 27 14:25:41 myhost /usr/sbin/x2gocleansessions[60151]:
<user>-53-1522175140_stDMATE_dp32: state file for this session does not
exist: /tmp/.x2go-<user>/C-<user>-53-1522175140_stDMATE_dp32/state (this
can be ignored during session startups)

Mar 27 14:25:42 myhost /usr/bin/x2gostartagent: successfully started X2Go
Agent session with ID <user>-53-1522175140_stDMATE_dp32

Mar 27 14:25:46 myhost /usr/bin/x2gosetkeyboard: Setting X keyboard
according to /home/<user>/.x2go/C-<user>-53-1522175140_stDMATE_dp32/keyboard

Mar 27 14:25:46 myhost /usr/bin/x2goruncommand: launching session with
Xsession-x2go mechanism, using STARTUP="mate-session"

Mar 27 14:25:46 myhost /usr/bin/x2goruncommand: dbus wrapper available as
/usr/bin/dbus-run-session

Mar 27 14:25:47 myhost /usr/bin/x2gomountdirs[18935]: successfully
mounted <client_user>@127.0.0.1:50448/cygdrive/C/Users/<client_user_id>/DOWNLO~1
to /tmp/.x2go-<user>/media/disk/_cygdrive_C_Users_<client_user_id>_DOWNLO1
<[email-masked]:50448/cygdrive/C/Users/c10639/DOWNLO~1%20to%20/tmp/.x2go-schnemi/media/disk/_cygdrive_C_Users_c10639_DOWNLO1>

Mar 27 14:25:49 myhost /usr/bin/x2gomountdirs[18935]: successfully
mounted <client_user>@127.0.0.1:50448/cygdrive/C/Users/<client_user_id>/X2GO~1/S-3ED8~1/spool
to /tmp/.x2go-<user>/spool/C-<user>-53-1522175140_stDMATE_dp32
<[email-masked]:50448/cygdrive/C/Users/c10639/X2GO~1/S-3ED8~1/spool%20to%20/tmp/.x2go-schnemi/spool/C-schnemi-53-1522175140_stDMATE_dp32>

...

...

...

Mar 27 14:38:47 myhost /usr/bin/x2goumount-session[58516]: successfully
unmounted
"/tmp/.x2go-<user>/media/disk/_cygdrive_C_Users_<client_user_id>_DOWNLO1"

Mar 27 14:38:48 myhost /usr/bin/x2goumount-session[58516]: successfully
unmounted "/tmp/.x2go-<user>/spool/C-<user>-53-1522175140_stDMATE_dp32"

Mar 27 14:38:48 myhost /usr/bin/x2gosuspend-session: session with ID
<user>-53-1522175140_stDMATE_dp32 has been suspended successfully

Mar 27 14:38:48 myhost systemd[1]: Started Session c313 of user <user>.

Mar 27 14:39:00 myhost systemd[1]: Started Session 5377 of user <user>.

Mar 27 14:39:00 myhost console-kit-daemon[2848]: (process:58917):
GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

Mar 27 14:39:00 myhost console-kit-daemon[2848]: missing action

Mar 27 14:39:01 myhost CRON[58968]: (root) CMD (  [ -x
/usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d
/var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5
$(/usr/lib/php5/maxlifetime))

Mar 27 14:39:03 myhost /usr/bin/x2goresume-session: client XXX.XXX.XXX.33
has successfully resumed session with ID <user>-53-1522175140_stDMATE_dp32

Mar 27 14:39:09 myhost /usr/bin/x2gomountdirs[59285]: successfully mounted
<client_user>@127.0.0.1:50448/cygdrive/C/Users/<client_user_id>/DOWNLO~1 to
/tmp/.x2go-<user>/media/disk/_cygdrive_C_Users_<client_user_id>_DOWNLO1

Mar 27 14:39:11 myhost /usr/bin/x2gomountdirs[59285]: successfully mounted
<client_user>@127.0.0.1:50448/cygdrive/C/Users/<client_user_id>/X2GO~1/S-3ED8~1/spool
to /tmp/.x2go-<user>/spool/C-<user>-53-1522175140_stDMATE_dp32

Mar 27 14:39:12 myhost /usr/bin/x2gosetkeyboard: Setting X keyboard
according to /home/<user>/.x2go/C-<user>-53-1522175140_stDMATE_dp32/keyboard

Mar 27 14:39:12 myhost org.mate.panel.applet.MintMenuAppletFactory[19106]:
** (mintMenu.py:19622): WARNING **: Failed to get pixmap 10486396,0,0

Mar 27 14:39:27 myhost /usr/bin/x2goumount-session[59790]: successfully
unmounted
"/tmp/.x2go-<user>/media/disk/_cygdrive_C_Users_<client_user_id>_DOWNLO1"

Mar 27 14:39:28 myhost /usr/bin/x2goumount-session[59790]: successfully
unmounted "/tmp/.x2go-<user>/spool/C-<user>-53-1522175140_stDMATE_dp32"

Mar 27 14:39:28 myhost /usr/bin/x2gosuspend-session: session with ID
<user>-53-1522175140_stDMATE_dp32 has been suspended successfully

Mar 27 14:39:28 myhost systemd[1]: Started Session c316 of user <user>.

Mar 27 14:39:29 myhost systemd[1]: Started Session c317 of user <user>.

Mar 27 14:39:36 myhost systemd[1]: Started Session 5379 of user <user>.

Mar 27 14:39:36 myhost console-kit-daemon[2848]: (process:60121):
GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

Mar 27 14:39:36 myhost console-kit-daemon[2848]: missing action

Mar 27 14:39:40 myhost /usr/bin/x2goresume-session: client XXX.XXX.XXX.33
has successfully resumed session with ID <user>-53-1522175140_stDMATE_dp32

Mar 27 14:39:47 myhost /usr/bin/x2gosetkeyboard: Setting X keyboard
according to /home/<user>/.x2go/C-<user>-53-1522175140_stDMATE_dp32/keyboard

Mar 27 14:39:49 myhost /usr/bin/x2gomountdirs[60531]: successfully mounted
<client_user>@127.0.0.1:50448/cygdrive/C/Users/<client_user_id>/DOWNLO~1 to
/tmp/.x2go-<user>/media/disk/_cygdrive_C_Users_<client_user_id>_DOWNLO1

Mar 27 14:39:52 myhost /usr/bin/x2gomountdirs[60531]: successfully mounted
<client_user>@127.0.0.1:50448/cygdrive/C/Users/<client_user_id>/X2GO~1/S-3ED8~1/spool
to /tmp/.x2go-<user>/spool/C-<user>-53-1522175140_stDMATE_dp32

…

…

…

Mar 28 08:25:40 myhost /usr/bin/x2goresume-session: client XXX.XXX.XXX.33
has successfully resumed session with ID <user>-53-1522175140_stDMATE_dp32

Mar 28 08:25:42 myhost systemd[1]: Started Session c325 of user <user>.

Mar 28 08:25:42 myhost console-kit-daemon[2848]: console-kit-daemon[2848]:
GLib-CRITICAL: Source ID 25295 was not found when attempting to remove it

Mar 28 08:25:42 myhost console-kit-daemon[2848]: GLib-CRITICAL: Source ID
25295 was not found when attempting to remove it

Mar 28 08:25:42 myhost systemd[1]: Started Session c326 of user <user>.

Mar 28 08:25:42 myhost console-kit-daemon[2848]: (process:10753):
GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

Mar 28 08:25:42 myhost console-kit-daemon[2848]: missing action

Mar 28 08:25:42 myhost console-kit-daemon[2848]: console-kit-daemon[2848]:
GLib-CRITICAL: Source ID 25284 was not found when attempting to remove it

Mar 28 08:25:42 myhost console-kit-daemon[2848]: GLib-CRITICAL: Source ID
25284 was not found when attempting to remove it

Mar 28 08:25:42 myhost console-kit-daemon[2848]: console-kit-daemon[2848]:
GLib-CRITICAL: Source ID 25303 was not found when attempting to remove it

Mar 28 08:25:42 myhost console-kit-daemon[2848]: GLib-CRITICAL: Source ID
25303 was not found when attempting to remove it

Mar 28 08:25:42 myhost console-kit-daemon[2848]: console-kit-daemon[2848]:
GLib-CRITICAL: Source ID 25313 was not found when attempting to remove it

Mar 28 08:25:42 myhost console-kit-daemon[2848]: GLib-CRITICAL: Source ID
25313 was not found when attempting to remove it

Mar 28 08:25:42 myhost systemd[1]: Started Session c327 of user <user>.

Mar 28 08:25:42 myhost console-kit-daemon[2848]: console-kit-daemon[2848]:
GLib-CRITICAL: Source ID 25340 was not found when attempting to remove it

Mar 28 08:25:42 myhost console-kit-daemon[2848]: GLib-CRITICAL: Source ID
25340 was not found when attempting to remove it

Mar 28 08:25:42 myhost console-kit-daemon[2848]: console-kit-daemon[2848]:
GLib-CRITICAL: Source ID 25329 was not found when attempting to remove it

Mar 28 08:25:42 myhost console-kit-daemon[2848]: GLib-CRITICAL: Source ID
25329 was not found when attempting to remove it

Mar 28 08:25:43 myhost console-kit-daemon[2848]: console-kit-daemon[2848]:
GLib-CRITICAL: Source ID 25353 was not found when attempting to remove it

Mar 28 08:25:43 myhost console-kit-daemon[2848]: GLib-CRITICAL: Source ID
25353 was not found when attempting to remove it

Mar 28 08:26:08 myhost systemd[1]: Started Session 5553 of user <user>.

Mar 28 08:26:08 myhost console-kit-daemon[2848]: (process:11374):
GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

Mar 28 08:26:08 myhost console-kit-daemon[2848]: missing action

Mar 28 08:26:12 myhost /usr/bin/x2gosetkeyboard:
/home/<user>/.x2go/C-<user>-53-1522175140_stDMATE_dp32/keyboard did not
appear within 30s after agent startup

*.x2go/C-<user>-53-1522175140_stDMATE_dp32/session.log*

Session: Session resumed at 'Tue Mar 27 14:39:47 2018'.

Info: Screen [0] resized to geometry [1280x1024] fullscreen [0].

Info: Screen [0] resized to geometry [1280x1024] fullscreen [0].

Info: Screen [0] resized to geometry [1280x1024] fullscreen [0].

Info: Screen [0] resized to geometry [1280x1024] fullscreen [0].

Error: Failure reading from the peer proxy.

Loop: PANIC! No shutdown of proxy link performed by remote proxy.

Error: Connection with remote peer broken.

Error: Please check the state of your network and retry.

Session: Display failure detected at 'Tue Mar 27 18:25:50 2018'.

Session: Suspending session at 'Tue Mar 27 18:25:50 2018'.

Session: Session suspended at 'Tue Mar 27 18:25:50 2018'.