X2Go Bug report logs - #543
x2golistdesktops locks up if xwininfo does

version graph

Package: x2godesktopsharing; Maintainer for x2godesktopsharing is X2Go Developers <x2go-dev@lists.x2go.org>;

Reported by: "Gregory R. Warnes" <greg@warnes.net>

Date: Wed, 9 Jul 2014 22:00:02 UTC

Severity: normal

Tags: patch, pending

Found in version 3.1.1.1-0~131~ubuntu12

Fixed in version 4.0.1.16

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#543: x2golistdesktops locks up if xwininfo does
Reply-To: "Gregory R. Warnes" <greg@warnes.net>, 543@bugs.x2go.org
Resent-From: "Gregory R. Warnes" <greg@warnes.net>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Wed, 09 Jul 2014 22:00:02 +0000
Resent-Message-ID: <handler.543.B.140494304532225@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 543
X-X2Go-PR-Package: x2godesktopsharing
X-X2Go-PR-Keywords: 
Received: via spool by submit@bugs.x2go.org id=B.140494304532225
          (code B); Wed, 09 Jul 2014 22:00:02 +0000
Received: (at submit) by bugs.x2go.org; 9 Jul 2014 21:57:25 +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=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE
	autolearn=ham version=3.3.2
Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id C88F65DB24
	for <submit@bugs.x2go.org>; Wed,  9 Jul 2014 23:57:21 +0200 (CEST)
Received: by mail-vc0-f170.google.com with SMTP id hy10so8781315vcb.29
        for <submit@bugs.x2go.org>; Wed, 09 Jul 2014 14:57:19 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:content-type:subject:message-id:date:to
         :mime-version;
        bh=CM1H/QdzwcUufuX1NKoMpVTRxgTLuMJUDOxmuRSr3RY=;
        b=byRf5Xk95MYrgKSv9BDaSKuQkSSpdDmuvYhYybUo9RKT8hurMXCS80jCG+Jhn3+c/d
         dqCZfmQtE2XJeCaiKfaLNrOwVvD16ps5+Q3STVMawdqrp4inB/BALK5WLQH4stLomAfb
         vb0ItYDJbsHkcpyY/03LIkBWqeh/Nd5ULPM/GCgFnEkXA/ShNylq3TaOKkd0uNSF4OEl
         VOBJuPkr3SPAT6I/aF6x9UpytIj/jdrLR3zcW7wud3fIG8soTL33qEjJUpg5quc6ANk5
         6aypsDfOu9TBja3MxiZSAmqhhWi4vxhntJoJYEoaD/bzavCr3oVhfFouS8GLFILwHF1n
         0zUA==
X-Gm-Message-State: ALoCoQnsvHoGPqMWwLSkeiZfeJ+G7u7XJ0vSmCVNjSgku6QcFv9ImY0BlMfVegN4CGUerOOzQb9u
X-Received: by 10.52.157.164 with SMTP id wn4mr397250vdb.81.1404943039657;
        Wed, 09 Jul 2014 14:57:19 -0700 (PDT)
Received: from [10.59.27.114] (97-64-141-154.client.mchsi.com. [97.64.141.154])
        by mx.google.com with ESMTPSA id p55sm76621896yhh.34.2014.07.09.14.57.18
        for <submit@bugs.x2go.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 09 Jul 2014 14:57:18 -0700 (PDT)
From: "Gregory R. Warnes" <greg@warnes.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_F905D346-9CCF-4E4B-8DE8-A0CDAB407632"
Message-Id: <DF03EDF1-51CB-4E07-B316-4411BC0D97CB@warnes.net>
Date: Wed, 9 Jul 2014 17:57:09 -0400
To: submit@bugs.x2go.org
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
X-Mailer: Apple Mail (2.1878.6)
[Message part 1 (text/plain, inline)]
Package:  x2godesktopsharing
Version: 3.1.1.1-0~131~ubuntu12


Hi,  my server had a ‘weird’ file in /tmp/.X11-unix/ for which xwininfo would never return, locking up x2golistdesktops.

The solution is to provide a timeout for the shell call to xwininfo.  This can be accomplished either using the shell command ‘timeout’ or the Perl IPC::Run module (as described in the first response to http://stackoverflow.com/questions/16918005/time-out-when-using-system-cmd-in-perl).

For my purpose, I’ve used the shell timeout command. Patch below.

-Greg


--- /usr/bin/x2golistdesktops	2014-04-03 10:14:22.000000000 -0500
+++ x2golistdesktops	2014-07-09 16:43:54.000000000 -0500
@@ -43,7 +43,7 @@
 	$serv=hostname;
 }

-my $rsess=`x2golistsessions x2goserver |grep _stR`;
+my $rsess=`timeout 1s x2golistsessions x2goserver |grep _stR`;
 my @rsess=split("\n","$rsess");
 my @rdisplays;
 for (my $i=0;$i<@rsess;$i++)
@@ -67,7 +67,7 @@
 	$checkdisp="${checkdisp}I";
 	if (!( $rdisp =~ m/$checkdisp/ ))
 	{
-		my $inf=`xwininfo -root -display $display 2> /dev/null`;
+		my $inf=`timeout 1s xwininfo -root -display $display 2> /dev/null`;
 		if ( $inf=~ m/geometry/)
 		{
 			print "$uname\@$display\n";
@@ -88,4 +88,4 @@
 }

 # closing syslog
-closelog;
\ No newline at end of file
+closelog;
w


[Message part 2 (text/html, inline)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Thu Nov 21 14:47:56 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.