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

Fixed in version

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

Bug is archived. No further changes may be made.

Full log

Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 9 Jul 2014 21:57:25 +0000
From greg@warnes.net  Wed Jul  9 23:57:24 2014
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
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 [])
	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;
X-Gm-Message-State: ALoCoQnsvHoGPqMWwLSkeiZfeJ+G7u7XJ0vSmCVNjSgku6QcFv9ImY0BlMfVegN4CGUerOOzQb9u
X-Received: by with SMTP id wn4mr397250vdb.81.1404943039657;
        Wed, 09 Jul 2014 14:57:19 -0700 (PDT)
Received: from [] (97-64-141-154.client.mchsi.com. [])
        by mx.google.com with ESMTPSA id p55sm76621896yhh.34.2014.
        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"
Subject: x2golistdesktops locks up if xwininfo does
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

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.


--- /usr/bin/x2golistdesktops	2014-04-03 10:14:22.000000000 -0500
+++ x2golistdesktops	2014-07-09 16:43:54.000000000 -0500
@@ -43,7 +43,7 @@

-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 @@
 	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
\ No newline at end of file

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

Send a report that this bug log contains spam.

X2Go Developers <owner@bugs.x2go.org>. Last modified: Mon Jul 22 11:46:41 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.