Re: [X2Go-Dev] Failing resuming session with latest X2Go Server from nightly builds

2021-08-03 Thread Paul Menzel

Dear Oleksandr,


Am 03.08.21 um 16:00 schrieb Oleksandr Shneyder:


one of my customers reported that after update x2go server from
4.1.0.4-0x2go1.2~git20210627.1936+10.heuler.1 amd64 to
4.1.0.4-0x2go1.2~git20201228.1914+10.heuler.1 amd64


So from 20201228 to 20210627?


he not able to resume sessions anymore. I checked it on my system and I
can confirm it. I figured out, that somehow x2goresume-session makes
session option file empty (size = 0).

@Mihai: I saw that you commited some changes in x2goresume-sessions
between this two versions. Do you have idea what could go wrong here,
before I'll start to debug it by myself?


As it only seems to be a few commits, maybe bisecting this might the 
fastest way to find out the commit introducing the regression?



Kind regards,

Paul
___
x2go-dev mailing list
x2go-dev@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-dev


Re: [X2Go-Dev] Pull request: add --nofork option to x2gocleansessions

2021-06-26 Thread Paul Menzel

Dear Andrew,


Am 26.06.21 um 22:15 schrieb Andrew J. Hesford:


Not a problem. A patch against release/4.1.0.x is attached. Please let
me know if you need anything else.


As the commit message summary is intended, did you copy it from `git 
show`? `git format-patch -1` (and even `git send-email …`) might be better.


Also, you could add your original message as commit message body.


Following is a pull request against the 4.1.0.x branch that separates
the no-fork behavior of x2gocleansessions from the debug output
behavior. A new flag, `--nofork` (`-n-` for short) determined whether
the program forks; `--debug` only controls the logging verbosity and
also forces `$nofork=1` to preserve old behavior.


s/determined/determines/


Kind regards,

Paul
___
x2go-dev mailing list
x2go-dev@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-dev


[X2Go-Dev] Bug#1550: X2Go/Server/DB/SQLite3.pm: Reads shadow entry ($pass) but it is never used

2021-06-02 Thread Paul Menzel

Package: x2goserver
Version: 4.1.0.3


Dear X2Go folks,


We noticed, that every two seconds our “shadow server” (similar to NIS) 
gets a request for the shadow line of the x2go user [1].


Tracing this reveals:

 x2gocleansessio-3593[112]  2334059.441996: sys_clone 
<-system_call_exception
   <...>-468193  [120]  2334059.538048: sys_clone 
<-system_call_exception
   <...>-468194  [128]  2334059.539367: sys_clone 
<-system_call_exception
 x2golistsession-468193  [120]  2334059.542178: sys_clone 
<-system_call_exception
 libx2go-server--468196  [136]  2334059.656827: tcp_connect 
<-tcp_v4_connect
 x2gocleansessio-3593[112]  2334059.695737: sys_clone 
<-system_call_exception
   <...>-468197  [128]  2334059.793699: sys_clone 
<-system_call_exception
x2gopath-468198  [137]  2334059.794604: sys_clone 
<-system_call_exception
   x2gogetstatus-468197  [128]  2334059.797066: sys_clone 
<-system_call_exception
   <...>-468200  [097]  2334059.912926: tcp_connect 
<-tcp_v4_connect


/sys/kernel/debug/tracing# ps -fp 3593
UID  PIDPPID  C STIME TTY  TIME CMD
root3593   1  0 May06 ?00:36:27 /usr/bin/perl 
/usr/sbin/x2gocleansessions


and (for example the first `libx2go-server-db-sqlite3-wrapper`) → 
`/usr/share/perl5/X2Go/Server/DB/SQLite3.pm` contains:


my ($uname, $pass, $uid, $pgid, $quota, $comment, $gcos, 
$homedir, $shell, $expire) = getpwnam($x2gouser);

my $dbfile="$homedir/x2go_sessions";


The getpwnam() function returns a pointer to a structure containing the
broken-out fields of the record in the password database (e.g., the lo‐
cal password file /etc/passwd, NIS, and LDAP) that matches the username
name.


Reading `/usr/share/perl5/X2Go/Server/DB/SQLite3.pm` [2] it looks like, 
the variable `$pass` is never used?


```
sub init_db
{
# retrieve home dir of x2gouser
my $x2gouser='x2gouser';
	my ($uname, $pass, $uid, $pgid, $quota, $comment, $gcos, $homedir, 
$shell, $expire) = getpwnam($x2gouser);

my $dbfile="$homedir/x2go_sessions";
	my 
$dbh=DBI->connect("dbi:SQLite:dbname=$dbfile","","",{sqlite_use_immediate_transaction 
=> 1, AutoCommit => 1, }) or die $_;


	# on SLE 11.x the sqlite_busy_timeout function does not exist, trying 
to work around that...

if ( $dbh->can('sqlite_busy_timeout') )
{
$dbh->sqlite_busy_timeout( 2000 );
}
return $dbh;
}
```


Kind regards,

Paul


[1]: 
https://salsa.debian.org/debian-remote-team/x2goserver/-/blob/master/x2goserver/sbin/x2gocleansessions#L166
[2]: 
https://code.x2go.org/gitweb?p=x2goserver.git;a=blob;f=X2Go/Server/DB/SQLite3.pm;h=e6fb22b884c869dc14c6471a99ba31a5d45a6c30;hb=HEAD#l64

___
x2go-dev mailing list
x2go-dev@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-dev