NetBSD Problem Report #46926

From www@NetBSD.org  Sat Sep  8 22:35:46 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 3690B63C4B1
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  8 Sep 2012 22:35:46 +0000 (UTC)
Message-Id: <20120908223545.9700D63B9BC@www.NetBSD.org>
Date: Sat,  8 Sep 2012 22:35:45 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: High cpu usage Xorg DragonFly x86_64, suspect cairo
X-Send-Pr-Version: www-1.0

>Number:         46926
>Category:       pkg
>Synopsis:       High cpu usage Xorg DragonFly x86_64, suspect cairo
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 08 22:40:00 +0000 2012
>Closed-Date:    Sat Jan 12 04:16:33 +0000 2013
>Last-Modified:  Sat Jan 12 04:16:33 +0000 2013
>Originator:     David Shao
>Release:        DragonFly 3.1-DEVEL i386 and x86_64
>Organization:
>Environment:
DragonFly 3.1-DEVEL x86_64
>Description:
Some change between the end of Thursday, 2012-09-06 and current pkgsrc
on DragonFly 3-1-DEVEL x86_64, Shuttle SG45H7, Intel Core 2 Quad CPU Q9400, I believe ICH10, Radeon 4550

commit 0059b35c3db980... Sat Sep 8 07:07:14 2012 -0700

is producing high cpu usage, sometimes near 100%.  It is particularly bad opening multiple applications such as gvim.  I suspect the cairo update described in
http://mail-index.netbsd.org/pkgsrc-changes/2012/09/07/msg077984.html

I rate this bug as serious because it essentially renders Xorg, Xfce4, etc. unusable on this machine.


>How-To-Repeat:
Update to
commit 0059b35c3db980... Sat Sep 8 07:07:14 2012 -0700
and pkg_rolling-replace -uv on DragonFly 3-1-DEVEL x86_64
>Fix:

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/46926: High cpu usage Xorg DragonFly x86_64, suspect cairo
Date: Sun, 9 Sep 2012 17:21:08 +0000

 On Sat, Sep 08, 2012 at 10:40:01PM +0000, davshao@gmail.com wrote:
  > Some change between the end of Thursday, 2012-09-06 and current pkgsrc
  > on DragonFly 3-1-DEVEL x86_64, Shuttle SG45H7, Intel Core 2 Quad
  > CPU Q9400,
  > I believe ICH10, Radeon 4550
  > 
  > commit 0059b35c3db980... Sat Sep 8 07:07:14 2012 -0700
  > 
  > is producing high cpu usage, sometimes near 100%.  It is
  > particularly bad opening multiple applications such as gvim.  I
  > suspect the cairo update described in 
  > http://mail-index.netbsd.org/pkgsrc-changes/2012/09/07/msg077984.html
  > 
  > I rate this bug as serious because it essentially renders Xorg,
  > Xfce4, etc. unusable on this machine.

 Does reverting cairo fix the problem?

 -- 
 David A. Holland
 dholland@netbsd.org

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/46926: High cpu usage Xorg DragonFly x86_64, suspect cairo
Date: Sun, 9 Sep 2012 13:15:14 -0700

 On Sun, Sep 9, 2012 at 10:25 AM, David Holland
 <dholland-pbugs@netbsd.org> wrote:

 >  Does reverting cairo fix the problem?

 The high cpu usage problem has been reproduced on NetBSD 6.99.11
 (GENERIC) amd64, an Asus M5A87 amd64 machine with Radeon HD4350
 graphics card, latest pkgsrc as of some time last night, trying to run
 xfce4.

 Reverting cairo 1.12.2nb1 to a previously compiled on NetBSD 6.99.10
 cairo-1.10.2nb5 appears to fix the high cpu usage problem running
 xfce4 on that machine.

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/46926: High cpu usage Xorg DragonFly x86_64, suspect cairo
Date: Mon, 10 Sep 2012 09:55:48 -0700

 It appears that FreeBSD ports was forced to revert from cairo 1.12.2
 back to cairo 1.10.2 a few months ago.

 http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/cairo/Makefile

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/46926: High cpu usage Xorg DragonFly x86_64, suspect cairo
Date: Fri, 14 Sep 2012 18:15:48 -0700

 As a specific example of how to reproduce the high cpu usage problem,
 on an Asus M5A87 motherboard machine, AMD 870 / SB850 chipset, with
 MSI R4350 graphics card, RV710 Microcode,

 /var/log/Xorg.0.log reads:

 (EE) AIGLX error: dlopen of /usr/pkg/lib/dri/r600_dri.so failed
 (Cannot open "/usr/pkg/lib/dri/r600_dri.so")
 (EE) AIGLX: reverting to software rendering
 (II) AIGLX: Loaded and initialized /usr/pkg/lib/dri/swrast_dri.so
 (II) GLX: Initialized DRISWRAST GL provider for screen 0

 in DragonFly x86_64 or NetBSD amd64 using cairo 1.12.2, in Xfce4, open
 a Terminal window, run
 $ top
 then open another Terminal window, run
 $ gvim
 and see near 100% cpu usage on the Xorg server line in top.

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/46926: High cpu usage Xorg DragonFly x86_64, suspect cairo
Date: Sat, 15 Sep 2012 17:13:03 +0000

 On Sat, Sep 15, 2012 at 01:20:06AM +0000, David Shao wrote:
  >  As a specific example of how to reproduce the high cpu usage problem,
  >  on an Asus M5A87 motherboard machine, AMD 870 / SB850 chipset, with
  >  MSI R4350 graphics card, RV710 Microcode,
  >  
  >  /var/log/Xorg.0.log reads:
  >  
  >  (EE) AIGLX error: dlopen of /usr/pkg/lib/dri/r600_dri.so failed
  >  (Cannot open "/usr/pkg/lib/dri/r600_dri.so")
  >  (EE) AIGLX: reverting to software rendering
  >  (II) AIGLX: Loaded and initialized /usr/pkg/lib/dri/swrast_dri.so
  >  (II) GLX: Initialized DRISWRAST GL provider for screen 0

 Do you get hardware rendering with the old cairo? This doesn't really
 look related.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Adam Hoka <adam.hoka@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/46926
Date: Sun, 07 Oct 2012 20:09:14 +0200

 Hi!

 I can reproduce this on NetBSD current and Cairo downgrade indeed helps.

From: Jose Luis Rodriguez Garcia <joseyluis@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/46926
Date: Mon, 22 Oct 2012 00:03:08 +0200

 It could be a duplicate of pkg/45448.

 It is easy to confirm. Don't open any xfce terminal (close them). Use
 xterm (launch->Run Program->xterm).
 Execute top and wait 20-30 seconds. Cpu goes to 0.

 Launch gvim an tell if it is ok.

 If is this, the problem is with xfce terminal

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/46926
Date: Tue, 23 Oct 2012 06:46:35 -0700

 High CPU usage persists using the Xfce 4.6 desktop, in particular
 multiple Terminal, on NetBSD 6.99.14 amd64, current pkgsrc with cairo
 updated to 1.12.6.

 The best performance upgrade remains reversion to cairo 1.10.2 as
 FreeBSD ports did months ago.  As FreeBSD has continued to update
 Xfce4 to 4.8 months ago and now even parts to 4.10, it seems doubtful
 that upgrading Xfce4 alone would be a solution.

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: tech-pkg@netbsd.org, John Marino <netbsd@marino.st>
Subject: Re: pkg/46926: High cpu usage Xorg DragonFly x86_64, suspect cairo
Date: Thu, 27 Dec 2012 15:56:09 -0800

 I have tested the patch submitted by Dave Tyson for x11/xfce4-terminal

 http://mail-index.netbsd.org/pkgsrc-users/2012/12/20/msg017513.html
 "xfce4-terminal uses 100% CPU"

 on both DragonFly 3.3-DEVELOPMENT i386 and x86_64, and this patch
 corrects the near 100% cpu usage observed when using Terminal(s) in
 xfce4.

 Please include this patch in upcoming pkgsrc-2012Q4 and possibly
 backport to pkgsrc-2012Q3.  It is the difference between usable xfce4
 on at least DragonFly, and according to Dave Tyson, NetBSD 6 as well.

 The source is DragonFly master through
 commit 742052891704ee32e333f0baef0a013f27e0d0c3
 Date:   Wed Dec 26 00:00:38 2012 +0100

     kernel/powernow: Remove two unused variables.

 using pkgsrc current master
 commit 0faf7775a201217b90e4c995dc12d8366d6fb966
 Author: pkgsrc fixup <pkgsrc@dragonflybsd.org>
 Date:   Wed Dec 26 18:28:15 2012 -0800

From: John Marino <netbsd@marino.st>
To: gnats-bugs@netbsd.org
Cc: David Shao <davshao@gmail.com>, tech-pkg@netbsd.org
Subject: Re: Re: pkg/46926: High cpu usage Xorg DragonFly x86_64, suspect
 cairo
Date: Fri, 04 Jan 2013 23:08:00 +0100

 On 12/28/2012 00:56, David Shao wrote:
 > I have tested the patch submitted by Dave Tyson for x11/xfce4-terminal
 >
 > http://mail-index.netbsd.org/pkgsrc-users/2012/12/20/msg017513.html
 > "xfce4-terminal uses 100% CPU"
 >
 > on both DragonFly 3.3-DEVELOPMENT i386 and x86_64, and this patch
 > corrects the near 100% cpu usage observed when using Terminal(s) in
 > xfce4.
 >
 > Please include this patch in upcoming pkgsrc-2012Q4 and possibly
 > backport to pkgsrc-2012Q3.  It is the difference between usable xfce4
 > on at least DragonFly, and according to Dave Tyson, NetBSD 6 as well.
 >
 > The source is DragonFly master through
 > commit 742052891704ee32e333f0baef0a013f27e0d0c3
 > Date:   Wed Dec 26 00:00:38 2012 +0100
 >
 >      kernel/powernow: Remove two unused variables.
 >
 > using pkgsrc current master
 > commit 0faf7775a201217b90e4c995dc12d8366d6fb966
 > Author: pkgsrc fixup<pkgsrc@dragonflybsd.org>
 > Date:   Wed Dec 26 18:28:15 2012 -0800


 This is a pretty interesting patch for both DragonFly and NetBSD.  I am 
 not set up to evaluate XFCE4 right now, I can only take Dave's and 
 David's recommendation that it should be applied.

 In any case, if this patch works as advertised, it would be a pull-up 
 candidate.  Is there somebody more equipped to test this patch?

 John

From: Bernd Ernesti <netbsd@lists.veego.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/46926: High cpu usage Xorg DragonFly x86_64, suspect cairo
Date: Mon, 7 Jan 2013 21:20:31 +0100

 On Mon, Jan 07, 2013 at 05:05:49PM +0100, John Marino wrote:
 > On 1/7/2013 16:36, Jorge Marizan wrote:
 > >Hello,
 > >
 > >I'm a XFCE4 user and I've tested this patch on my xfce terminal, before
 > >I've applied the patch the app was using near 100% of 1 CPU core, after
 > >the patch was applied the terminal was behaving like expected with CPU
 > >usage near 0%.
 > >
 > >FYI this is my "uname -a" command output:
 > >NetBSD jorge 6.0 NetBSD 6.0 (GENERIC) amd64
 > >
 > >--
 > >_______________________
 > 
 > Thanks for the confirmation, Jorge.
 > I will try to commit this patch soon then!
 > John

 It looks like the patch from http://mail-index.netbsd.org/pkgsrc-users/2012/12/20/msg017513.html is from:
 https://bugzilla.xfce.org/show_bug.cgi?id=6921

 So, an update to 0.4.8 will include that bug fix:

 http://mcs.une.edu.au/doc/Terminal-0.4.8/ChangeLog
 http://mail.xfce.org/pipermail/xfce4-commits/2011-January/016750.html

 The commit was: ec22089c8a5eed30e6991e18c5049ab5e2da8ce9

From: "John Marino" <marino@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46926 CVS commit: pkgsrc/x11/xfce4-terminal
Date: Tue, 8 Jan 2013 01:23:19 +0000

 Module Name:	pkgsrc
 Committed By:	marino
 Date:		Tue Jan  8 01:23:19 UTC 2013

 Modified Files:
 	pkgsrc/x11/xfce4-terminal: Makefile distinfo
 Added Files:
 	pkgsrc/x11/xfce4-terminal/patches: patch-terminal_terminal-screen.c

 Log Message:
 x11/xfce4-terminal: PR#46926 PR#45448 Fix 100% CPU usage

 Patch provided by Dave Tyson has multiple confirmations that it fixes
 the issue of 100% CPU usage simply from opening terminal window.


 To generate a diff of this commit:
 cvs rdiff -u -r1.27 -r1.28 pkgsrc/x11/xfce4-terminal/Makefile
 cvs rdiff -u -r1.6 -r1.7 pkgsrc/x11/xfce4-terminal/distinfo
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/x11/xfce4-terminal/patches/patch-terminal_terminal-screen.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Matthias Scheler" <tron@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46926 CVS commit: [pkgsrc-2012Q4] pkgsrc/x11/xfce4-terminal
Date: Wed, 9 Jan 2013 10:13:38 +0000

 Module Name:	pkgsrc
 Committed By:	tron
 Date:		Wed Jan  9 10:13:38 UTC 2013

 Modified Files:
 	pkgsrc/x11/xfce4-terminal [pkgsrc-2012Q4]: Makefile distinfo
 Added Files:
 	pkgsrc/x11/xfce4-terminal/patches [pkgsrc-2012Q4]:
 	    patch-terminal_terminal-screen.c

 Log Message:
 Pullup ticket #4005 - requested by marino
 x11/xfce4-terminal: bug fix patch

 Revisions pulled up:
 - x11/xfce4-terminal/Makefile                                   1.28
 - x11/xfce4-terminal/distinfo                                   1.7
 - x11/xfce4-terminal/patches/patch-terminal_terminal-screen.c   1.1

 ---
    Module Name:	pkgsrc
    Committed By:	marino
    Date:		Tue Jan  8 01:23:19 UTC 2013

    Modified Files:
    	pkgsrc/x11/xfce4-terminal: Makefile distinfo
    Added Files:
    	pkgsrc/x11/xfce4-terminal/patches: patch-terminal_terminal-screen.c

    Log Message:
    x11/xfce4-terminal: PR#46926 PR#45448 Fix 100% CPU usage

    Patch provided by Dave Tyson has multiple confirmations that it fixes
    the issue of 100% CPU usage simply from opening terminal window.


 To generate a diff of this commit:
 cvs rdiff -u -r1.27 -r1.27.2.1 pkgsrc/x11/xfce4-terminal/Makefile
 cvs rdiff -u -r1.6 -r1.6.26.1 pkgsrc/x11/xfce4-terminal/distinfo
 cvs rdiff -u -r0 -r1.1.2.2 \
     pkgsrc/x11/xfce4-terminal/patches/patch-terminal_terminal-screen.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: PR/46926 CVS commit: [pkgsrc-2012Q4] pkgsrc/x11/xfce4-terminal
Date: Wed, 9 Jan 2013 15:58:01 -0800

 The committed fix in pkgsrc current master

 commit 6d6788ce908faec62db310fa2db37140c92d9b0c
 Date:   Tue Jan 8 18:27:31 2013 -0800

 from Dave Tyson for xfce4-terminal's high cpu usage works for me on
 DragonFly 3.3-DEVELOPMENT systems including a i386 Pentium 4 with
 Radeon 9250 and a Lenovo Ideapad netbook with Intel integrated
 graphics 945GM.  It is the difference enabling the ability to work
 with xfce4 on these lower spec machines.  Thanks!

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 12 Jan 2013 04:16:33 +0000
State-Changed-Why:
Confirmed fixed, thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.