Version: x2goserver.x86_64 220.127.116.11-4.el6
OS: Centos 5
I accidentally stumbled upon this one: if the $USER env var is empty (in my case that was a bug in my .bashrc that generated that), then X2GO doesn't properly reject and log the connection attempt. The client freezes in 'Connecting' state and the sqllite scripts seem to enter an infinite loop trying to do insert session.
Once I kill the x2gostartagent process, I get the list of calls in x2gosqllitewrapper.pm
and can see that the provided session ID is missing the username part (as USER is empty).
Instead of being stuck in session insertion, the fact that USER is empty should be caught earlier, properly reported in syslog and session cleanly rejected.