Subject: Bug#77: Fwd: Bug report, unknown package: X2Go corrupts CygWin

From: Mike Gabriel <[email-masked]>
Date: Thu, 06 Dec 2012 09:58:21 +0100

Package: x2goclient
Version: 3.99.2.2-win32
Severity: normal

forwarding this mail to X2Go BTS... found in my [email-masked] mails...

@Anders: please use a body header for bug mails like the one above...

Thanks,
Mike

----- Weitergeleitete Nachricht von [email-masked] -----
      Datum: Wed, 21 Nov 2012 14:54:31 +0100
        Von: "Hallstrom, Anders" <[email-masked]>
    Betreff: Bug report, unknown package: X2Go corrupts CygWin
         An: "[email-masked]" <[email-masked]>

Hello.

I am following the following advice from “How to report a Bug in X2Go”  
(http://bugs.x2go.org/Reporting.html):

"If you can't seem to determine which package contains the problem,  
please send e-mail to the [email-masked] asking for advice."

Since I installed X2Go I have experienced that CygWin is rendered unusable.

System: Windows XP Professional version 2002 SP 3

X2Go: X2Go-client V. 3.99.2.2 (Qt - 4.8.1)
(I had to type that! Why can't I select&copy from the "about" window??)

CygWin: CYGWIN_NT-5.1
(Yes, that's really old, but "so what"...)

What happens is that directories from the X2Go installation are
suddenly mounted as /etc and /bin in CygWin.
Since fundamental commands such as "/bin/ls" are thereby missing,  
nothing works.

To repair, I do the following:
- Start a Windows command prompt (the cygwin path in Windows is still  
working).
- umount /etc
- umount /bin
Now CygWin is working normally.

After this fix, I can still use X2Go without problems and without
the mounts coming back, so I just cannot see why the mounts were
necessary in the first place.

Sometimes, however, the harmful mounts do come back.
I cannot pinpoint exactly when this happens,
but at least it is not every time I restart the computer and not every  
time I run X2Go.

Is this known?
Could some developer explain what is happening?

Best Regards
Anders Hallström

"This is an e-mail from a DeLaval company. This e-mail is confidential
and may also be privileged. Please delete the email and notify us
immediately if you are not the intended recipient. DeLaval does not
enter into contracts or contractual obligations via electronic mail,
unless otherwise agreed in writing between parties concerned.
Thank you."

----- Ende der weitergeleiteten Nachricht -----

-- 

DAS-NETZWERKTEAM
mike gabriel, rothenstein 5, 24214 neudorf-bornstein
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email-masked], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb

---

From: Stefan Baur <[email-masked]>
Date: Thu, 06 Dec 2012 11:34:05 +0100

> (I had to type that! Why can't I select&copy from the "about" window??)

You're doing it wrong.

Press Control+A, followed by Control+C, and the entire text is in your 
clipboard (this is the standard behavior of *every* sane Windows 
application, nothing X2Go-specific):

---------------------------
Über X2GoClient
---------------------------
<b>X2GoClient V. 3.99.3.0 </b >(Qt - 4.8.1)</b><br> (C. 2006-2012 
<b>obviously nice</b>: Oleksandr Shneyder, Heinz-Markus 
Graesing)<br><br>Ein Client für den Zugriff auf die serverbasierende 
Anwendungsumgebung X2Go. Mit Hilfe dieser Anwendung können Sie Sitzungen 
eines X2GoServers starten, stoppen, laufende Sitzungen fortführen oder 
anhalten und verschiedene Sitzungskonfigurationen verwalten. Die 
Authentifizierung kann über LDAP erfolgen und das Programm kann im 
Vollbildmodus (als Ersatz für XDM) gestartet werden. Weitere 
Informationen erhalten SIe auf x2go.org.
---------------------------
OK
---------------------------

---

From: Stefan Baur <[email-masked]>
Date: Thu, 06 Dec 2012 12:29:39 +0100

Am 06.12.2012 09:58, schrieb Anders Hallström:
[...]

> Since fundamental commands such as "/bin/ls" are thereby missing,

[...]

> Could some developer explain what is happening?

Well, X2Go uses some Cygwin code for its Windows client.
I've seen weird things happen before when two applications brought their 
own set of Cygwin libraries and they belonged to different versions, 
maybe this is a similar issue.
Probably something like whoever loads cygwin1.dll first "wins", the 
other application is blocked from loading its own version of cygwin1.dll 
and just has to make do with whatever cygwin1.dll is already in memory. 
  After that, it's either an application from the old Cygwin failing 
because the newer cygwin1.dll is doing something unexpected, or it's a 
new application failing because the old cygwin1.dll doesn't offer the 
function that it is expecting.

So, to debug this issue, it would be interesting to see what happens 
when you first run X2GoClient and keep it in the background, then try to 
rund your old Cygwin applications, and what happens when you run your 
old applications first (keeping at least one window of them open) and 
start X2GoClient afterwards.
Also, be aware that it is wrong to assume that all X2Go tasks have been 
terminated just because you don't see an X2Go icon in your task bar. 
Running task manager after closing X2GoClient, you may still encounter a 
running pulseaudio, sshd and/or vcxsrv on your Windows client.
If you see these, terminete them from within task manager before running 
your old cygwin applications and see if that helps.
I'm not suggesting that this is the solution to your problem, but I am 
sure the results will be helpful for the devs to pinpoint the issue.

-Stefan

---

From: "Hallstrom, Anders" <[email-masked]>
Date: Mon, 17 Dec 2012 14:51:56 +0100

[Note that I removed dev and submit from the send list and just kept 77@bugs, for right or wrong...]

Thank you Stefan for your valuable advice, and I am sorry about the delay.

I can now state the following.

State 0: No cygwin or x2go running, presumably no cygwin1.dll loaded/active.

State 1: cygwin running, cmd.exe -> bash.exe -> cygwin1.dll version 1001.8.0.0 (Wed Jan 31 16:09:39 2001). No x2go running.

State 2: x2go running, x2goclient.exe -> sshd.exe -> cygwin1.dll version 1005.25.0.0 (Thu Jun 12 19:35:47 2008). No cygwin running.

State 3: Both cygwin and x2go running.
Process Viewer still reports
cmd.exe -> bash.exe -> cygwin1.dll version 1001.8.0.0
x2goclient.exe -> sshd.exe -> cygwin1.dll version 1005.25.0.0
(So it seems different versions can be active simultaneously...)

Repeatably, when I go from state 0 to 2,
x2goclient causes its directories to be mounted in the cygwin environment;
this remains in effect (stored in registry) until it is manually unmounted using umount in cmd.exe.
Cygwin (bash.exe) is now crippled if it is started because fundamental commands are not found.

When I go from state 0 to 1 and then to 3, this does not happen,
and as far as I can see, x2go works fine anyway.
So I use this strategy as workaround.

I hope this was helpful.

Regards,
Anders

> -----Original Message-----
> From: Stefan Baur [mailto:[email-masked]]
> Sent: den 6 december 2012 12:30
> To: Mike Gabriel; [email-masked]; [email-masked]
> Cc: [email-masked]; Hallstrom, Anders
> Subject: Re: [X2Go-Dev] Bug#77: Fwd: Bug report, unknown package: X2Go
> corrupts CygWin
>