x2goclient using high cpu

Bug #1288631 reported by Watcharapol Tadtiang
52
This bug affects 8 people
Affects Status Importance Assigned to Milestone
x2goclient (Debian)
Fix Released
Unknown
x2goclient (Ubuntu)
Fix Released
High
Reinhard Tartler
Trusty
Fix Released
High
Reinhard Tartler
Utopic
Fix Released
High
Reinhard Tartler

Bug Description

[Impact]

 * x2goclient is polling on the X11 connection socket, taking one CPU to 100% utilization

 * Wasting lots of battery power

 * Affects the general use of x2goclient

[Test Case]

 * Connect to a remote x2go server (no special settings required to trigger this bug)

 * Check CPU usage with top/htop/similar

[Regression Potential]

 * None Known

Original report follows:

x2goclient using high cpu

# top
top - 16:36:06 up 7:41, 3 users, load average: 2.59, 2.03, 1.21
Tasks: 218 total, 1 running, 217 sleeping, 0 stopped, 0 zombie
%Cpu(s): 35.3 us, 21.4 sy, 0.0 ni, 42.9 id, 0.2 wa, 0.1 hi, 0.0 si, 0.0 st
KiB Mem: 8010800 total, 4088948 used, 3921852 free, 298072 buffers
KiB Swap: 4303372 total, 0 used, 4303372 free. 2214540 cached Mem

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21155 ukokiku 20 0 600848 37712 24612 S 200.9 0.5 18:01.83 x2goclient

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: x2goclient 4.0.1.1-1
ProcVersionSignature: Ubuntu 3.13.0-15.35-generic 3.13.5
Uname: Linux 3.13.0-15-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.13.2-0ubuntu5
Architecture: amd64
Date: Thu Mar 6 16:31:49 2014
InstallationDate: Installed on 2013-11-29 (97 days ago)
InstallationMedia: Lubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
SourcePackage: x2goclient
UpgradeStatus: Upgraded to trusty on 2014-02-28 (5 days ago)

CVE References

Revision history for this message
Watcharapol Tadtiang (aborigines) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in x2goclient (Ubuntu):
status: New → Confirmed
Revision history for this message
Horst Schirmeier (horst) wrote :

This has already been noticed upstream, but the patch seems not to have found its way into the Ubuntu 14.04 package: https://lists.berlios.de/pipermail/x2go-dev/2014-January/006863.html

Revision history for this message
Horst Schirmeier (horst) wrote :

Duplicate: Bug #1294847

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

It renders essential functionality of the package (or a dependent one) broken.

Changed in x2goclient (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
NetBit73 (mmach) wrote :

sources 0.6.2 and 0.6.3 libssh-4 have got the same error.

Revision history for this message
NetBit73 (mmach) wrote :

the last good sources libssh-4 is 0.5.5

Revision history for this message
Reinhard Tartler (siretart) wrote :

The bug is not present in 4.0.2.1-0~576~ubuntu14.04.1, but it *is* present in

 x2goclient | 4.0.1.1-1ubuntu1 | trusty/universe | source, amd64,
armhf, i386, powerpc, ppc64el
 libssh-4 | 0.6.1-0ubuntu3 | trusty | amd64, arm64,
armhf, i386, powerpc, ppc64el

I've verified by installing a clean trusty chroot and installing
x2goclient only.

I can confirm that updating to x2goclient_4.0.2.0-0~574~ubuntu14.04.1,
which is currently in the x2go/stable PPA for saucy fixes the problem.

I've tested again in a clean saucy chroot, and this bug is not present
there. Most probably because it doesn't ship libssh 0.6.

Revision history for this message
Reinhard Tartler (siretart) wrote :

As current workaround, I'd suggest to install x2goclient from the x2go stable PPA for now.

Revision history for this message
Reinhard Tartler (siretart) wrote :

I found a couple of libssh related changes between upstream release 4.0.1.0 and 4.0.2.0, but I fear the fix is somewhere hidden in this huge commit:

http://code.x2go.org/gitweb?p=x2goclient.git;a=commitdiff;h=33e81a459c191b1ce06383c4e8195bb29920fced

The other commits are

http://code.x2go.org/gitweb?p=x2goclient.git;a=commit;h=55f9b71e5d4d957235f041df86364d9e9f38767f
http://code.x2go.org/gitweb?p=x2goclient.git;a=commit;h=fa6e7b46a7d006d5c23afc03579e602f23325b76

But I don't believe them to be related to this problem.

It would be great if someone could prepare a test package that contained the first patch only.

Changed in x2goclient (Ubuntu):
milestone: none → trusty-updates
Changed in x2goclient (Ubuntu Utopic):
milestone: trusty-updates → none
Changed in x2goclient (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → High
Changed in x2goclient (Debian):
status: Unknown → New
Revision history for this message
Reinhard Tartler (siretart) wrote : Re: [X2Go-Dev] Issue with 100% cpu usage in x2goclient + libssh 0.6.0
Download full text (3.2 KiB)

On Sat, May 10, 2014 at 4:07 PM, Mike Gabriel
<email address hidden> wrote:
> HI Reinhard,
>
> thanks for your efforts on this!!! The situation around libssh and
> x2goclient is a little tricky and certainly needs a Ubuntu dev to fix those
> issues.

Which I am. What do you need me to do?

>
>
> On Sa 10 Mai 2014 16:50:55 CEST, Reinhard Tartler wrote:
>
>> Note that x2goclient itself does work, but consumes 100% CPU and makes
>> my fans very loud.
>
>
> Yes, I know that / have heard of that.
>
>
>> The bug is not present in 4.0.2.1-0~576~ubuntu14.04.1, but it *is* present
>> in
>>
>> x2goclient | 4.0.1.1-1ubuntu1 | trusty/universe | source, amd64,
>> armhf, i386, powerpc, ppc64el
>> libssh-4 | 0.6.1-0ubuntu3 | trusty | amd64, arm64,
>> armhf, i386, powerpc, ppc64el
>
>
> Ack.
>
>
>> I've verified by installing a clean trusty chroot and installing
>> x2goclient only.
>>
>> I can confirm that updating to x2goclient_4.0.2.0-0~574~ubuntu14.04.1,
>> which is currently in the x2go/stable PPA for saucy fixes the problem.
>>
>> I've tested again in a clean saucy chroot, and this bug is not present
>> there. Most probably because it doesn't ship libssh 0.6.

Please check again. I don't see any of them .

> To this mail I have attached four patches:
>
> 1. x2goclient-reduce-fan-noise-with-libssh-0.6.x.patch
>
> This patch is (IMHO, after some more reading of git diff) needed for X2Go
> Client << 4.0.1.4 to reduce the CPU fan noise when running with a libssh >=
> 0.6.1 under the hood.

I guess that should go to trusty.

> 2. libssh patches that are required with X2Go Client >= 4.0.2.0:
>
> If you want to run an X2Go Client (>= 4.0.2.0) (like the one in our PPA)
> against a libssh (<< 0.6.1) you need these two patches
>
> 0004-reset-global-request-status.patch
> 0005-multi-reverse-fwd.patch

irrelevant, trusty ships 4.0.1.x

>
> 3. Speed improvements:
>
> If you want to get things more rocking and really speed up X2Go via libssh,
> then you need this libssh patch, as well. (I think it entered libssh
> upstream at 0.6.2, but I am not sure):
>
> 0006-ssh-handle-package-zero-timeouts.patch

Also out of scope of this bug.

>> Mike, I've seen that you've uploaded 0.5.4-3~13.10.1 yesterday to
>> saucy's PPA. I fear that users of the PPA will no longer benefit from
>> future ubuntu security updates because you've replaced their system
>> libssh with an updated version.
>
>
> I am aware of this, and
>
> (a) I co-maintain libssh in Debian, so I notice security issues
> and uploads at time and CVE-2014-0017 is exactly the reason for my
> recent
> upload to our X2Go PPAs.
> (b) X2Go Client will FTBFS without 0005-multi-reverse-fwd.patch, so for
> provision of recent X2Go Client releases through ppa:x2go/stable
> I need to provide this patched libssh (taken from Debian) in X2Go's
> PPAs.

So we not only need a recent libssh, but also carry custom patches? *sigh*

> Yesterday, I finally found the time to upload x2goclient 4.0.2.0-1 to Debian
> unstable and now we can push libssh 0.6.x to unstable, as well.

If you could please upload the patch attached to #739496 to unstable,
then I could sync that ...

Read more...

Revision history for this message
Horst Schirmeier (horst) wrote :

Confirming that x2goclient 4.0.2.0-0~574~ubuntu14.04.1 fixes the issue.

Revision history for this message
Reinhard Tartler (siretart) wrote :

On Mon, May 12, 2014 at 2:48 AM, Mike Gabriel
<email address hidden> wrote:

>
> Reinhard pointed out that my previous mail did not have any patches.
> are attached to this mail now.
Thanks

> Ubuntu downstream tasks:
> ------------------------
> What needs to be done in Ubuntu IMHO is:
>
> o Test x2goclient-reduce-fan-noise-with-libssh-0.6.x.patch applied
> to x2goclient (<< 4.0.1.4) with libssh (>= 0.6.0).

That patch does not apply to x2goclient 4.0.1.1, because it changes
the method SshMasterConnection::userChallengeAuth to make a call to
the function ssh_userauth_none, which doesn't exist in this version of
x2goclient.

Can you please check the patch again?

Regarding libssh, that's fine for the x2go PPA, but for trusty main, I
think x2goclient-reduce-fan-noise-with-libssh-0.6.x.patch is the
critical one, provided that it can be made to work.

(BTW, please also keep the ubuntu bug in the look, see the CC line).

--
regards,
    Reinhard

description: updated
Changed in x2goclient (Ubuntu Utopic):
assignee: nobody → Reinhard Tartler (siretart)
Changed in x2goclient (Ubuntu Trusty):
assignee: nobody → Reinhard Tartler (siretart)
Revision history for this message
alizard (alizard) wrote : Re: [Bug 1288631] Re: x2goclient using high cpu

On 05/14/2014 04:56 AM, Reinhard Tartler wrote:

note: I grabbed a copy of X2Go Client V. 4.0.2.1 (Qt - 4.8.6) via repo
... that solved the problem, I'm using X2go right now.

A.Lizard
> ** Description changed:
>
> + [Impact]
> +
> + * x2goclient is polling on the X11 connection socket, taking one CPU to
> + 100% utilization
> +
> + * Wasting lots of battery power
> +
> + * Affects the general use of x2goclient
> +
> + [Test Case]
> +
> + * Connect to a remote x2go server (no special settings required to
> + trigger this bug)
> +
> + * Check CPU usage with top/htop/similar
> +
> + [Regression Potential]
> +
> + * None Known
> +
> +
> + Original report follows:
> +
> x2goclient using high cpu
> -
>
> # top
> top - 16:36:06 up 7:41, 3 users, load average: 2.59, 2.03, 1.21
> Tasks: 218 total, 1 running, 217 sleeping, 0 stopped, 0 zombie
> %Cpu(s): 35.3 us, 21.4 sy, 0.0 ni, 42.9 id, 0.2 wa, 0.1 hi, 0.0 si, 0.0 st
> KiB Mem: 8010800 total, 4088948 used, 3921852 free, 298072 buffers
> KiB Swap: 4303372 total, 0 used, 4303372 free. 2214540 cached Mem
>
> - PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> + PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 21155 ukokiku 20 0 600848 37712 24612 S 200.9 0.5 18:01.83 x2goclient
>
> ProblemType: Bug
> DistroRelease: Ubuntu 14.04
> Package: x2goclient 4.0.1.1-1
> ProcVersionSignature: Ubuntu 3.13.0-15.35-generic 3.13.5
> Uname: Linux 3.13.0-15-generic x86_64
> NonfreeKernelModules: wl
> ApportVersion: 2.13.2-0ubuntu5
> Architecture: amd64
> Date: Thu Mar 6 16:31:49 2014
> InstallationDate: Installed on 2013-11-29 (97 days ago)
> InstallationMedia: Lubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
> SourcePackage: x2goclient
> UpgradeStatus: Upgraded to trusty on 2014-02-28 (5 days ago)
>
> ** Changed in: x2goclient (Ubuntu Utopic)
> Assignee: (unassigned) => Reinhard Tartler (siretart)
>
> ** Changed in: x2goclient (Ubuntu Trusty)
> Assignee: (unassigned) => Reinhard Tartler (siretart)
>

--
member The Internet Society (ISOC), The HTML Writers Guild.
"All that is, is information"
Personal Website http://www.ecis.com/~alizard
business Website http://www.reptilelabs.com
backup address (if ALL else fails) <email address hidden>
PGP 8.0 key available by request or keyserver. Download PGP from:
http://www.pgpi.org for e-mail privacy.
Disaster prep info: http://www.ecis.com/~alizard/y2k.html
***Looking for INTELLIGENT new technology public policy alternatives?***
http://www.ecis.com/~alizard/technology.html

Changed in x2goclient (Debian):
status: New → Fix Released
Revision history for this message
Reinhard Tartler (siretart) wrote :

I've built, tested and synced x2goclient_4.0.2.0-2 from unstable to utopic, and can verify that this symptom no longer appears

Changed in x2goclient (Ubuntu Utopic):
status: Triaged → Fix Released
Revision history for this message
Reinhard Tartler (siretart) wrote :

I've uploaded a proposed fix for trusty to my PPA, and to trusty-proposed. It is currently waiting for approval by the Ubuntu archive administrators

Changed in x2goclient (Ubuntu Trusty):
status: Triaged → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Watcharapol, or anyone else affected,

Accepted x2goclient into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/x2goclient/4.0.1.1-1ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in x2goclient (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Reinhard Tartler (siretart) wrote :

FYIW, I've downloaded the package from https://launchpad.net/ubuntu/+source/x2goclient/4.0.1.1-1ubuntu2/+build/6013658/+files/x2goclient_4.0.1.1-1ubuntu2_amd64.deb, installed it, and followed the testing procedures in the bug description.

I can confirm that my CPU fans no longer go wild and the CPU usage remains at a reasonable level.

Revision history for this message
A. Rohou (a-rohou) wrote :

The package from trusty-proposed fixes the bug for me. CPU usage is now normal (~5-10%) whereas it was ~200% previously.
Thanks for the fix!

Package version: x2goclient 4.0.1.1-1ubuntu2

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package x2goclient - 4.0.1.1-1ubuntu2

---------------
x2goclient (4.0.1.1-1ubuntu2) trusty; urgency=low

  * Bugfix: x2goclient using high cpu, LP: #1288631
 -- Reinhard Tartler <email address hidden> Wed, 14 May 2014 07:51:56 -0400

Changed in x2goclient (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of the Stable Release Update for x2goclient has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.