From unknown Thu Mar 28 10:35:18 2024 X-Loop: owner@bugs.x2go.org Subject: Bug#626: [X2Go-Dev] Bug#626: NX agent dies not reliably remove socket files under /tmp/.X11-unix Reply-To: Mike Gabriel , 626@bugs.x2go.org Resent-From: Mike Gabriel Resent-To: x2go-dev@lists.x2go.org Resent-CC: X2Go Developers X-Loop: owner@bugs.x2go.org Resent-Date: Fri, 03 Oct 2014 22:40:02 +0000 Resent-Message-ID: Resent-Sender: owner@bugs.x2go.org X-X2Go-PR-Message: followup 626 X-X2Go-PR-Package: x2goserver X-X2Go-PR-Keywords: pending Received: via spool by 626-submit@bugs.x2go.org id=B626.141237580728761 (code B ref 626); Fri, 03 Oct 2014 22:40:02 +0000 Received: (at 626) by bugs.x2go.org; 3 Oct 2014 22:36:47 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on ymir.das-netzwerkteam.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=ham version=3.3.2 Received: from freya.das-netzwerkteam.de (freya.das-netzwerkteam.de [88.198.48.199]) by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 687D23D460 for <626@bugs.x2go.org>; Sat, 4 Oct 2014 00:36:46 +0200 (CEST) Received: from grimnir.das-netzwerkteam.de (grimnir.das-netzwerkteam.de [78.46.204.98]) by freya.das-netzwerkteam.de (Postfix) with ESMTPS id B51623445; Sat, 4 Oct 2014 00:36:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id 89DB83BBB1; Sat, 4 Oct 2014 00:36:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at grimnir.das-netzwerkteam.de Received: from grimnir.das-netzwerkteam.de ([127.0.0.1]) by localhost (grimnir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oPNWxkoCFaDl; Sat, 4 Oct 2014 00:36:45 +0200 (CEST) Received: from grimnir.das-netzwerkteam.de (localhost [127.0.0.1]) by grimnir.das-netzwerkteam.de (Postfix) with ESMTPS id 366943BBA2; Sat, 4 Oct 2014 00:36:45 +0200 (CEST) Received: from p5B285952.dip0.t-ipconnect.de (p5B285952.dip0.t-ipconnect.de [91.40.89.82]) by mail.das-netzwerkteam.de (Horde Framework) with HTTP; Fri, 03 Oct 2014 22:36:45 +0000 Date: Fri, 03 Oct 2014 22:36:45 +0000 Message-ID: <20141003223645.Horde.ZUDZfWVg2Hu1KBOoB6vx8Q1@mail.das-netzwerkteam.de> From: Mike Gabriel To: Horst Schirmeier , 626@bugs.x2go.org In-Reply-To: <20141003194721.GN10719@quickstop.soohrt.org> User-Agent: Internet Messaging Program (IMP) H5 (6.2.2) Accept-Language: en,de Organization: DAS-NETZWERKTEAM X-Originating-IP: 91.40.89.82 X-Remote-Browser: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Iceweasel/32.0 Content-Type: multipart/signed; boundary="=_sD1PJqYPoyLuOEMjG68FSw2"; protocol="application/pgp-signature"; micalg=pgp-sha1 MIME-Version: 1.0 This message is in MIME format and has been PGP signed. --=_sD1PJqYPoyLuOEMjG68FSw2 Content-Type: text/plain; charset=us-ascii; format=flowed; DelSp=Yes Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Control: clone -1 -2 -3 Control: reopen -2 -3 Control: retitle -2 clean up stable /tmp/.X-lock files Control: retitle -3 develop X2Go Server session manager Control: severity -2 important Control: severity -3 wishlist On Fr 03 Okt 2014 21:47:21 CEST, Horst Schirmeier wrote: > Automatic workaround: x2gocleansessions should probably take care of the > /tmp file removal. LART will still need to be applied manually. This is partly already implemented in X2Go Server 4.0.1.17. However, I=20= =20 missed=20providing some code that removes the /tmp/.X-lock file.=20= =20 For=20this I have clone a new bug with the title "clean up stable=20=20 /tmp/.X-lock=20files". I won't be working on X2Go over the=20=20 weekend,=20so from anyone else: patches are welcome. > A "real" fix would move the usual, immediate cleanup step out of the > user's control. This could, for example, happen by a daemon running as > root, that spawns a nxagent at a user's request, under the user's UID. > Once the nxagent dies (from whatever cause), the daemon's SIGCHLD > handler does the cleanup. This would also remove the race condition (up > to 2s delay before the sockets are cleaned up; connection of new users > may be impossible in this time window) introduced by the aforementioned > "automatic workaround". This actually is something we plan for X2Go Server 5.0. There will be=20=20 a=20session management daemon that the clients talk to and the session=20= =20 management=20daemon will take care of all the (internal) actions to=20=20 provide=20what clients request. The session management daemon will be=20=20 virtually=20in charge of everything X2Go-related and it will be=20=20 event-based=20and all-knowing. This feature request will be dealt with as a new bug, titled: "develop=20= =20 event-based=20X2Go Server session manager" > Another, much simpler possibility would be to use randomized/uniqe > socket names instead of the fixed /tmp/.X${DISPLAYNUM}-lock / > /tmp/.X11-unix/X${DISPLAYNUM} scheme. But I don't know enough about X11 > to judge whether this could work. In theory this could be possible, but it would interfere a great deal=20=20 with=20what other X11-related applications / libraries expect. So, this=20= =20 actually=20is a no-go IMHO. Greets, Mike --=20 DAS-NETZWERKTEAM mike=20gabriel, herweg 7, 24357 fleckeby fon: +49 (1520) 1976 148 GnuPG Key ID 0x25771B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.x= fb --=_sD1PJqYPoyLuOEMjG68FSw2 Content-Type: application/pgp-signature Content-Description: Digitale PGP-Signatur Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJULyT9AAoJEJr0azAldxsxdY0P/0dapzFMP/SA81LlamU9HYS3 pZ4quF3ECrIRXI09Z02/Lz9nEfVnIRH/FCezSf+W4GmPprliN0VRts29Md6v16PV 5JsuSfY0nUC7alJjZFfn15LDsnuac4ZgmjP1Fnz9YWrAEtut5h2IdZkW7Yk1vrPh HSi8mPRhqbt45aTTYjVaaWaQM4UtXik113bxoEdRZpc+8iE2FCksPHlNK4prZNZ+ oJOD+RKtv1LiHKQkXKuQUBtnB3aXx7H/G0nl4oPGPsbdaR402SlS1UAomIxpm4s+ FkSWzzkFs74OUcgbYekqQXRe7bfY4dCX4QhZdMwnDrc1tkhRBY9ADJMgYZs6Oz+F R36w1wWipaqlCwfHU3Ls0va+IsUpwcEHwgv0+lj8XqCCSSICHmKJSsZabhR1EBa5 8Co3WEZ0fEJAZwlQslp2VjVnab1XhyaZSNCh5IY4maJluorK/z6KnrriBlzOp6jx z6mTbCRThQWdDrzCcjURV8dR1hKYoYRfljZRvg3BXVRcP7/kMrQGk99b5wKCe7mX pZLFeqz2M66wxScv0wnsdiwnKpvss0lIMN4pkmK3Y6j/e9Jr5UYx5bWy4R9TjIx9 +uVBQQGFn97UAX7QC1/7WXo1VpBaXgxYp36Pbde4T+Dq133G/HREzg3AdyrMJeLu LDzZWMkOTwFZhCRdboSI =lbfa -----END PGP SIGNATURE----- --=_sD1PJqYPoyLuOEMjG68FSw2--