Subject: Bug#1272: nxagent crashes on Ubuntu 16.04, making x2go server unusable

From: Maciej Puzio <[email-masked]>
Date: Wed, 14 Mar 2018 16:29:46 -0500

Package: nxagent
Version: 3.5.99.15-0~201803072246~ubuntu16.04.1
Severity: grave

I originally submitted this post for bug 1269, but as this is a somewhat different issue of greater severity, I am creating a separate bug.
Reason for grave severity: bug makes the package in question unusable, as it does the whole x2go server.

Short description:
Attempt of starting an x2go session causes the session window to briefly appear and then disappear. Server syslog shows a segfault:
kernel: [ 3899.187248] nxagent[7306]: segfault at 0 ip 0000558c9d0045fb sp 00007ffdad91c1f0 error 4 in nxagent[558c9cf39000+432000]

In my case, a routine system update (apt-get update && apt-get dist-upgrade) rendered a production server unusable, with no easy way to rollback the botched x2go update.
The issue did not appear before the update. I recreated the issue on clean install of a vanilla Ubuntu 16.04 server running in a VM. I use this install as a basis for the description below.

Versions - server:
x2goserver: 4.1.0.0-0~1517~ubuntu16.04.1 (this is the newest server from x2go stable PPA for Ubuntu 16.04)
nxagent:    3.5.99.15-0~201803072246~ubuntu16.04.1
uname -r:   4.4.0-116-generic
lsb_release -d: Ubuntu 16.04.4 LTS

Versions - client:
x2goclient: 4.0.5.1-1 (this is the newest client from Ubuntu 16.04 repo)
uname -r:   4.13.0-32-generic
lsb_release -d: Ubuntu 16.04.3 LTS

Steps to reproduce:

1. Install Ubuntu 16.04 server in a VM (from ubuntu-16.04.3-server-amd64.iso downloaded from ubuntu.com).

2. Update the system (apt-get update && apt-get dist-upgrade) and reboot.

3. Install x2go as described on https://wiki.x2go.org/doku.php/wiki:repositories:ubuntu
   All commands run as root (sudo su -)
   apt-add-repository ppa:x2go/stable
   apt-get update
   apt-get install x2goserver x2goserver-xsession --no-install-recommends

4. Install minimal XFCE desktop:
   apt-get install xfwm4 xfce4-panel xfce4-settings xfce4-session xfce4-terminal xfdesktop4 xfce4-taskmanager xfce4-appfinder xfce4-artwork --no-install-recommends

5. Attempt to connect with a x2go client from another machine:
   My x2goclient version: 4.0.5.1-1

Results:

Messages on client side

----------------------------
NXPROXY - Version 3.5.0

Copyright (C) 2001, 2011 NoMachine.
See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '16432'.
Session: Starting session at 'Tue Mar 13 16:10:36 2018'.
Info: Connecting to remote host 'localhost:37853'.
Info: Connection to remote proxy 'localhost:37853' established.
Info: Connection with remote proxy completed.
Warning: Unrecognized session type 'unix-kde-depth_24'. Assuming agent session.
Info: Using LAN link parameters 1536/24/1/0.
Info: Using pack method '16m-jpeg-9' with session 'unix-kde-depth_24'.
Info: Not using NX delta compression.
Info: Not using ZLIB data compression.
Info: Not using ZLIB stream compression.
Info: Not using a persistent cache.
Info: Forwarding X11 connections to display ':0'.
Session: Session started at 'Tue Mar 13 16:10:36 2018'.
Info: Established X server connection.
Info: Using shared memory parameters 0/0K.
Error: Failure reading from the peer proxy.
Error: Connection with remote peer broken.
Error: Please check the state of your network and retry.
Session: Terminating session at 'Tue Mar 13 16:10:37 2018'.
Session: Session terminated at 'Tue Mar 13 16:10:37 2018'.
Info: Established X server connection.
Info: Using shared memory parameters 0/0K.
----------------------------

Server syslog messages (with log level: debug)

----------------------------
Mar 13 16:03:59 nano systemd[1]: Started Session 5 of user testuser.
Mar 13 16:03:59 nano x2golistsessions: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:03:59 nano x2golistsessions: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:03:59 nano x2golistsessions: x2golistsessions has been called with no option
Mar 13 16:03:59 nano x2golistsessions: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: listsessions,nano
Mar 13 16:03:59 nano /usr/bin/x2gostartagent: x2gostartagent called with options: 1920x1150 lan 16m-jpeg-9 unix-kde-depth_24 us auto 1 D XFCE both
Mar 13 16:03:59 nano /usr/lib/x2go/x2gogetrandomport: x2gogetrandomport called with options:
Mar 13 16:03:59 nano /usr/lib/x2go/x2gogetrandomport: Full SSH port randomization requested.
Mar 13 16:03:59 nano /usr/bin/x2gostartagent: client announced itself as "192.168.1.100"
Mar 13 16:03:59 nano /usr/bin/x2gosessionlimit[7186]: x2gosessionlimit has been called
Mar 13 16:03:59 nano /usr/bin/x2gosessionlimit[7186]: executing external command ,,x2golistsessions'' with args: --all-servers
Mar 13 16:03:59 nano x2golistsessions: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:03:59 nano x2golistsessions: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:03:59 nano x2golistsessions: x2golistsessions has been called with options: --all-servers
Mar 13 16:03:59 nano x2golistsessions: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: listsessions_all
Mar 13 16:03:59 nano x2gogetdisplays: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:03:59 nano x2gogetdisplays: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: getdisplays,nano
Mar 13 16:03:59 nano x2gogetdisplays: db_getdisplays called, server: nano; return value:
Mar 13 16:03:59 nano x2gogetports: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:03:59 nano x2gogetports: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: getports,nano
Mar 13 16:04:00 nano x2gogetports: db_getports called, server: nano; return value:
Mar 13 16:04:00 nano /usr/bin/x2gostartagent: initializing new session with ID testuser-50-1520975040_stDXFCE_dp24
Mar 13 16:04:00 nano x2goinsertsession: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:04:00 nano x2goinsertsession: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: insertsession,50,nano,testuser-50-1520975040_stDXFCE_dp24
Mar 13 16:04:00 nano x2goinsertsession: db_insertsession called, session ID: testuser-50-1520975040_stDXFCE_dp24, server: nano, session ID: testuser-50-1520975040_stDXFCE_dp24
Mar 13 16:04:00 nano x2gogetports: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:04:00 nano x2gogetports: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: getports,nano
Mar 13 16:04:00 nano x2gogetports: db_getports called, server: nano; return value:
Mar 13 16:04:00 nano x2goinsertport: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:04:00 nano x2goinsertport: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: insertport,nano,testuser-50-1520975040_stDXFCE_dp24,49992
Mar 13 16:04:00 nano x2goinsertport: db_insertport called, session ID: testuser-50-1520975040_stDXFCE_dp24, server: nano, SSH port: 49992
Mar 13 16:04:00 nano x2gogetports: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:04:00 nano x2gogetports: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: getports,nano
Mar 13 16:04:00 nano x2gogetports: db_getports called, server: nano; return value: |49992|
Mar 13 16:04:00 nano x2goinsertport: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:04:00 nano x2goinsertport: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: insertport,nano,testuser-50-1520975040_stDXFCE_dp24,49993
Mar 13 16:04:00 nano x2goinsertport: db_insertport called, session ID: testuser-50-1520975040_stDXFCE_dp24, server: nano, SSH port: 49993
Mar 13 16:04:00 nano x2gogetports: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:04:00 nano x2gogetports: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: getports,nano
Mar 13 16:04:00 nano x2gogetports: db_getports called, server: nano; return value: |49992| |49993|
Mar 13 16:04:00 nano x2goinsertport: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:04:00 nano x2goinsertport: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: insertport,nano,testuser-50-1520975040_stDXFCE_dp24,49994
Mar 13 16:04:01 nano x2goinsertport: db_insertport called, session ID: testuser-50-1520975040_stDXFCE_dp24, server: nano, SSH port: 49994
Mar 13 16:04:01 nano /usr/bin/x2gofeature: x2gofeature called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver.features: x2goserver.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver-x2goagent.features: x2goserver-x2goagent.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver-xsession.features: x2goserver-xsession.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/bin/x2gostartagent: started nxagent: NX_TEMP=/tmp x2goagent X2GO_NXAGENT_OPTIONS (' -nolisten tcp') NOLISTOPT ('-nolisten tcp') X2GODPIOPTION_ ('-dpi 96') XDMCPPOPT ('') -SESSION_TYPE ('-D') NOEXITPARAM ('') -auth "XAUTHORITY" ('"/home/testuser/.Xauthority"') agent_geometry ('-geometry 1920x1150') -name "SESSION_WINDOW_TITLE" ('"X2GO-testuser-50-1520975040_stDXFCE_dp24"') "NX_AGENT" ('":50"') 2>"SESSION_LOG" ('"/tmp/.x2go-testuser/C-testuser-50-1520975040_stDXFCE_dp24/session.log"') &
Mar 13 16:04:01 nano /usr/bin/x2gostartagent: creating new session: testuser-50-1520975040_stDXFCE_dp24 69296b548dda88e17aa006bccb70a4e5 7306 192.168.1.100 49992 49993 49994 -1 -1
Mar 13 16:04:01 nano x2gocreatesession: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:04:01 nano x2gocreatesession: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: createsession,testuser-50-1520975040_stDXFCE_dp24,69296b548dda88e17aa006bccb70a4e5,7306,192.168.1.100,49992,49993,49994,-1,-1
Mar 13 16:04:01 nano x2gocreatesession: db_createsession called, session ID: testuser-50-1520975040_stDXFCE_dp24, cookie: 69296b548dda88e17aa006bccb70a4e5, client: 192.168.1.100, pid: 7306, graphics port: 49992, sound port: 49993, file sharing port: 49994. telekinesis ctrl port: -1, telekinesis data port: -1
Mar 13 16:04:01 nano /usr/bin/x2gostartagent: successfully started X2Go Agent session with ID testuser-50-1520975040_stDXFCE_dp24
Mar 13 16:04:01 nano /usr/bin/x2gofeature: x2gofeature called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver.features: x2goserver.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver-x2goagent.features: x2goserver-x2goagent.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver-xsession.features: x2goserver-xsession.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/bin/x2goruncommand: x2goruncommand called with options: 50 7306 testuser-50-1520975040_stDXFCE_dp24 49993 xfce4-session nosnd D
Mar 13 16:04:01 nano /usr/bin/x2gofeature: x2gofeature called with options: X2GOAGENT_RANDRXINERAMA
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver.features: x2goserver.features called with options: X2GOAGENT_RANDRXINERAMA
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver-x2goagent.features: x2goserver-x2goagent.features called with options: X2GOAGENT_RANDRXINERAMA
Mar 13 16:04:01 nano /usr/bin/x2gofeature: x2gofeature called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver.features: x2goserver.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver-x2goagent.features: x2goserver-x2goagent.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver-xsession.features: x2goserver-xsession.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:01 nano /usr/bin/x2goruncommand: running command /usr/bin/xfce4-session
Mar 13 16:04:01 nano /usr/bin/x2gosetkeyboard: x2gosetkeyboard called with options:
Mar 13 16:04:01 nano /usr/bin/x2gofeature: x2gofeature called with options: X2GO_XSESSION
Mar 13 16:04:01 nano /usr/bin/x2gosetkeyboard: Setting X keyboard according to /home/testuser/.x2go/C-testuser-50-1520975040_stDXFCE_dp24/keyboard
Mar 13 16:04:01 nano /usr/share/x2go/x2gofeature.d/x2goserver.features: x2goserver.features called with options: X2GO_XSESSION
Mar 13 16:04:02 nano /usr/share/x2go/x2gofeature.d/x2goserver-x2goagent.features: x2goserver-x2goagent.features called with options: X2GO_XSESSION
Mar 13 16:04:02 nano /usr/share/x2go/x2gofeature.d/x2goserver-xsession.features: x2goserver-xsession.features called with options: X2GO_XSESSION
Mar 13 16:04:02 nano /usr/bin/x2goruncommand: launching session with Xsession-x2go mechanism, using STARTUP="xfce4-session"
Mar 13 16:04:02 nano /usr/bin/x2goruncommand: dbus wrapper available as /usr/bin/dbus-run-session
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/20x11-common_process-args
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/30x11-common_xresources
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/35x11-common_xhost-local
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/40x11-common_xsessionrc
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/50x11-common_determine-startup
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/55xfce4-session
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/60x11-common_localhost
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/60x11-common_xdg_path
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/60xdg-user-dirs-update
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/65snappy
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/75dbus_dbus-launch
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/90x11-common_ssh-agent
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/95dbus_update-activation-env
Mar 13 16:04:02 nano /etc/x2go/Xsession: executing /etc/x2go/Xsession.d/99x11-common_start
Mar 13 16:04:02 nano kernel: [ 3899.187248] nxagent[7306]: segfault at 0 ip 0000558c9d0045fb sp 00007ffdad91c1f0 error 4 in nxagent[558c9cf39000+432000]
Mar 13 16:04:02 nano /usr/bin/x2goruncommand: command /usr/bin/xfce4-session has finished
Mar 13 16:04:02 nano /usr/bin/x2gofeature: x2gofeature called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:02 nano /usr/bin/x2gocmdexitmessage: x2gocmdexitmessage called with options: testuser-50-1520975040_stDXFCE_dp24
Mar 13 16:04:02 nano /usr/share/x2go/x2gofeature.d/x2goserver.features: x2goserver.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:02 nano /usr/bin/x2gocmdexitmessage: command output starts with: exec xfce4-session Loading profile from /etc/profile Loading profile from /home/testuser/.profile Activating service name='org.freedesktop.systemd1' Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
Mar 13 16:04:02 nano /usr/share/x2go/x2gofeature.d/x2goserver-x2goagent.features: x2goserver-x2goagent.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:03 nano /usr/share/x2go/x2gofeature.d/x2goserver-xsession.features: x2goserver-xsession.features called with options: X2GO_RUN_EXTENSIONS
Mar 13 16:04:03 nano /usr/bin/x2gofeature: x2gofeature called with options: X2GO_DESKTOPSHARING
Mar 13 16:04:03 nano /usr/share/x2go/x2gofeature.d/x2goserver.features: x2goserver.features called with options: X2GO_DESKTOPSHARING
Mar 13 16:04:03 nano /usr/share/x2go/x2gofeature.d/x2goserver-x2goagent.features: x2goserver-x2goagent.features called with options: X2GO_DESKTOPSHARING
Mar 13 16:04:03 nano /usr/share/x2go/x2gofeature.d/x2goserver-xsession.features: x2goserver-xsession.features called with options: X2GO_DESKTOPSHARING
Mar 13 16:04:03 nano x2gochangestatus: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:04:03 nano x2gochangestatus: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: changestatus,F,testuser-50-1520975040_stDXFCE_dp24
Mar 13 16:04:03 nano x2gochangestatus: db_changestatus called, session ID: testuser-50-1520975040_stDXFCE_dp24, new status: F
Mar 13 16:04:03 nano x2goumount-session: executing external command ,,x2gopath'' with args: libexec
Mar 13 16:04:03 nano x2goumount-session: x2goumount-session has been called with options: testuser-50-1520975040_stDXFCE_dp24
Mar 13 16:04:03 nano x2goumount-session: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: getdisplay,testuser-50-1520975040_stDXFCE_dp24
Mar 13 16:04:03 nano x2goumount-session: db_getdisplay called, session ID: testuser-50-1520975040_stDXFCE_dp24; return value: 50
Mar 13 16:04:03 nano x2goumount-session: executing external command ,,/usr/lib/x2go/libx2go-server-db-sqlite3-wrapper'' with args: getmounts,testuser-50-1520975040_stDXFCE_dp24
Mar 13 16:04:03 nano x2goumount-session: db_getmounts called, session ID: testuser-50-1520975040_stDXFCE_dp24; return value:
----------------------------

[my bug# 298]

---

From: Somsak Mekkluean <[email-masked]>
Date: Mon, 27 Apr 2020 11:11:50 +0000

MICROSOFT URGENT NOTICE

Many incoming messages have been suspended because your domain account has not been updated by the Microsoft review team. Click the Check link below to receive your paused messages. We apologize for the inconvenience and thank you for your understanding. Thank you very much.

CHECK NOTE<https://benny678.wixsite.com/mysite>

: Please do not ignore this email to avoid closing your account.

Microsoft Verification Team

Copyright © 2020 Webmail.Inc. All rights reserved.

---

From: Somsak Mekkluean <[email-masked]>
Date: Mon, 27 Apr 2020 11:12:12 +0000

MICROSOFT URGENT NOTICE