Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171396 - [PATCH] x11-base/xorg-server-1.2.0-r2: Memory leaks, crashes and trivial fixes.
Summary: [PATCH] x11-base/xorg-server-1.2.0-r2: Memory leaks, crashes and trivial fixes.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2007-03-19 00:16 UTC by Peter Alfredsen (RETIRED)
Modified: 2007-08-01 23:51 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
1.2.0-check-for-clientgone.patch (1.2.0-check-for-clientgone.patch,2.61 KB, patch)
2007-03-19 00:17 UTC, Peter Alfredsen (RETIRED)
Details | Diff
1.2.0-fix-amd-cpu-detection.patch (1.2.0-fix-amd-cpu-detection.patch,1.67 KB, patch)
2007-03-19 00:17 UTC, Peter Alfredsen (RETIRED)
Details | Diff
1.2.0-plug-memory-leak-in-doloadmodule.patch (1.2.0-plug-memory-leak-in-doloadmodule.patch,1.38 KB, patch)
2007-03-19 00:18 UTC, Peter Alfredsen (RETIRED)
Details | Diff
1.2.0-properly-free-device-devprivates-memory-leak-fix.patch (1.2.0-properly-free-device-devprivates-memory-leak-fix.patch,1.17 KB, patch)
2007-03-19 00:18 UTC, Peter Alfredsen (RETIRED)
Details | Diff
1.2.0-typo-fix.patch (1.2.0-typo-fix.patch,1.29 KB, patch)
2007-03-19 00:19 UTC, Peter Alfredsen (RETIRED)
Details | Diff
1.2.0-zero-out-client-devprivates-on-allocation.patch (1.2.0-zero-out-client-devprivates-on-allocation.patch,1.25 KB, patch)
2007-03-19 00:19 UTC, Peter Alfredsen (RETIRED)
Details | Diff
xorg-server-1.2.0-r2.patch (patch,877 bytes, patch)
2007-03-19 00:24 UTC, Peter Alfredsen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Alfredsen (RETIRED) gentoo-dev 2007-03-19 00:16:12 UTC
Backport various fixes for memory leaks, crashes and trivial fixes.


http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=b5fde366e2e21234ac0b81222fd5c42ca3e49cba
Properly free device devPrivates - memory leak fix.
	author  Eamon Walsh <ewalsh@tycho.nsa.gov>
	Wed, 7 Mar 2007 17:29:55 +0000 (12:29 -0500)
	committer  Eamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil>
	Wed, 7 Mar 2007 17:29:55 +0000 (12:29 -0500)
	commit  b5fde366e2e21234ac0b81222fd5c42ca3e49cba
	tree  21c4d64fc97f8a7b0ec39f7e7a408540dd78691e  tree
	parent  a3d2c5d622d9ca36d6fa2966aff09524e3ea39ac  commit | commitdiff
Properly free device devPrivates - memory leak fix.

http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=d9e079d2a385203fdd18d958cfc19d759cab4ba8
Zero out client devPrivates on allocation.
	author  Eamon Walsh <ewalsh@tycho.nsa.gov>
	Fri, 22 Dec 2006 18:07:09 +0000 (13:07 -0500)
	committer  Eamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil>
	Fri, 22 Dec 2006 18:07:09 +0000 (13:07 -0500)
	commit  d9e079d2a385203fdd18d958cfc19d759cab4ba8
	tree  20548a2b4ab268c5a32c5883f3d06816c9f5d43e  tree
	parent  e437f357b6850a6c87ca6696870b3abd40e5b8ed  commit | commitdiff
Zero out client devPrivates on allocation.

http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=967865393c08f53c70da9c8cd2824978f2601aa4
Plug memory leak in doLoadModule()
	author  Alan Coopersmith <alan.coopersmith@sun.com>
	Thu, 25 Jan 2007 04:20:48 +0000 (20:20 -0800)
	committer  Eric Anholt <eric@anholt.net>
	Tue, 13 Feb 2007 21:25:46 +0000 (13:25 -0800)
	commit  967865393c08f53c70da9c8cd2824978f2601aa4
	tree  3a195e349958669be90c6ec0c80da2f1c5a5dd7e  tree
	parent  46e3ed88ccc738e6b99d0fc957617b4345392237  commit | commitdiff
Plug memory leak in doLoadModule()
(cherry picked from cf7ca9d09cba14d107152a5179de38e5ef7bd784 commit)

http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=8a42af6a935b1cf0e15102e986bb527f4fab31a8
Check for clientGone before sending events from XFixes (bug #1753).
	author  Keith Packard <keithp@neko.keithp.com>
	Mon, 19 Feb 2007 23:28:37 +0000 (15:28 -0800)
	committer  Keith Packard <keithp@neko.keithp.com>
	Mon, 19 Feb 2007 23:28:37 +0000 (15:28 -0800)
	commit  8a42af6a935b1cf0e15102e986bb527f4fab31a8
	tree  47e7b514da212dbe2f4571f9d2797829fbd3e038  tree
	parent  4660eaaffb36f526f71d5847ae1309c10ee133c6  commit | commitdiff
	Check for clientGone before sending events from XFixes (bug #1753).
 
Freeing resources during client closedown can cause cursor changes which
attempt to send cursor events through the XFixes extension; a client in the
process of closing down has no file to send events to, causing a crash when
this path is hit.

http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=876b806ec09d5ff0c6cd19df91006c4eefedfaa6
Reapply patch to fix AMD CPU detection
	author  Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com>
	Tue, 6 Feb 2007 22:16:23 +0000 (17:16 -0500)
	committer  Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com>
	Tue, 6 Feb 2007 22:16:23 +0000 (17:16 -0500)
	commit  876b806ec09d5ff0c6cd19df91006c4eefedfaa6
	tree  0c30b71f2adbbea5641bc4611c6360e23a2e172d  tree
	parent  13568d2aa43da4216bbcb46e1125ff28c323ac54  commit | commitdiff
Reapply patch to fix AMD CPU detection

http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=a23b0b069cac8a48e2b306b2095515d75f647705
Typo fix.
	author  Adam Jackson <ajax@benzedrine.nwnk.net>
	Mon, 12 Feb 2007 22:50:00 +0000 (17:50 -0500)
	committer  Adam Jackson <ajax@benzedrine.nwnk.net>
	Mon, 12 Feb 2007 22:50:00 +0000 (17:50 -0500)
	commit  a23b0b069cac8a48e2b306b2095515d75f647705
	tree  44d98fa9da8b879e4d610a9fc484804a418d217c  tree
	parent  d21c95f80bdba2f29eedd57fb0b00e580391c08e  commit | commitdiff
Typo fix.

Reproducible: Always
Comment 1 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-19 00:17:05 UTC
Created attachment 113728 [details, diff]
1.2.0-check-for-clientgone.patch
Comment 2 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-19 00:17:40 UTC
Created attachment 113729 [details, diff]
1.2.0-fix-amd-cpu-detection.patch
Comment 3 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-19 00:18:09 UTC
Created attachment 113731 [details, diff]
1.2.0-plug-memory-leak-in-doloadmodule.patch
Comment 4 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-19 00:18:40 UTC
Created attachment 113732 [details, diff]
1.2.0-properly-free-device-devprivates-memory-leak-fix.patch
Comment 5 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-19 00:19:16 UTC
Created attachment 113733 [details, diff]
1.2.0-typo-fix.patch
Comment 6 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-19 00:19:40 UTC
Created attachment 113734 [details, diff]
1.2.0-zero-out-client-devprivates-on-allocation.patch
Comment 7 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-19 00:24:01 UTC
Created attachment 113736 [details, diff]
xorg-server-1.2.0-r2.patch

Patch against xorg-server-1.2.0-r2.ebuild.
Comment 8 Joshua Baergen (RETIRED) gentoo-dev 2007-03-20 01:56:03 UTC
Ah, thanks for this.  I'll mark it for inclusion, but if the 1.3 server is release soon and contains most of these fixes, they might never get added.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-04-11 03:21:31 UTC
joshuabaergen: Could you please make a -r4 ebuild with these since I haven't seen any move to 1.3 yet?

My X was up to 800Mb RSS yesterday (and this box only has 1Gb of memory, so I was deep into swap).
Comment 10 ifreecarve 2007-04-30 05:22:08 UTC
my xorg-server (1.2.0-r2 with ati driver) is using an incredible amount of memory.  

this is what i get from top:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                        
 5430 root      15   0 1030m 426m  10m R  1.0 42.5  81:42.09 X       


am i in the right place?  is this patch intended to fix the problem i'm seeing?  
Comment 11 Joshua Baergen (RETIRED) gentoo-dev 2007-04-30 23:34:31 UTC
(In reply to comment #10)
> am i in the right place?  is this patch intended to fix the problem i'm seeing? 
> 

Try updating to xorg-server-1.3 and see if that fixes your issue.
Comment 12 georgia_tech_swagger 2007-05-17 04:17:32 UTC
Thanks for these patches.   Xorg-server-1.2.0-r2 is devouring a stunning amount of memory for me as well.
Comment 13 ifreecarve 2007-05-17 14:04:52 UTC
i'm now running x11-base/xorg-server-1.3.0.0, amd64 with ati driver

still seems to use up a lot of memory.  my last X session with 1.3.0 lasted at least a few weeks, and ended with my system hanging (no remote access, no pinging it, nothing).  not sure if X was to blame for the hang, but it was using close to 1GB of memory at the time.  

do you have a good test script for reproducing this?  my memory usage seems to jump up the most (and not come back down) when i do a lot of browsing or use picasa under wine -- anything where i'm viewing a lot of images.  

although i'm not familiar enough with X to know what image-displaying function that might be, a possibility for reproducing this problem more quickly than running X for several weeks would be to randomly generate and show jpg images.  
Comment 14 hiyuh 2007-06-19 09:08:28 UTC
Just FYI, I dug the 1.3.0.0 sources, this includes 2 patches which are
filed at comment #1 and #3. Others are not applied ATM, I guess.
Comment 15 hiyuh 2007-06-21 09:37:38 UTC
I've remerged 1.3.0.0 w/ #2, 4, 5, 6 patches, it just works here.
And memory use looks like smaller than vanilla.
Comment 16 devsk 2007-06-21 18:32:16 UTC
can we get the fixes in #4 and #6 included in the portage please? I am hitting this too after days of uptime.
Comment 17 Donnie Berkholz (RETIRED) gentoo-dev 2007-08-01 22:18:36 UTC
Just committed to 1.3.0.0, thanks for your patience!
Comment 18 devsk 2007-08-01 23:32:55 UTC
Was the release intentionally not bumped?
Comment 19 Donnie Berkholz (RETIRED) gentoo-dev 2007-08-01 23:51:54 UTC
(In reply to comment #18)
> Was the release intentionally not bumped?

Yes. Not enough people have been having problems with this (as evidenced by the short CC list on this bug) to make everyone recompile for it. Plus, I want to stabilize 1.3 in the next week or so with these fixes.