Bug 92131 - DisableDevice() leaks SyncCounter resources
Summary: DisableDevice() leaks SyncCounter resources
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.7 (2012.06)
Hardware: All All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-26 23:15 UTC by spikycaterpillar_opensourcesupport_leave_spamblocker_in_to_maintain_deliverability
Modified: 2018-12-13 22:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to free SyncCounters. (1.41 KB, text/plain)
2015-09-26 23:15 UTC, spikycaterpillar_opensourcesupport_leave_spamblocker_in_to_maintain_deliverability
no flags Details

Description spikycaterpillar_opensourcesupport_leave_spamblocker_in_to_maintain_deliverability 2015-09-26 23:15:10 UTC
Created attachment 118459 [details]
Patch to free SyncCounters.

DisableDevice() leaks SyncCounter resources when you ctrl-alt-F# out of X,
ultimately leading to resource exhaustion.  I've verified the leak on Debian
xorg-server packages 1.16.4-1 and 1.17.2-1.1.

To reproduce the leak: Start an X server.  Start xrestop, and take a look
at the line for res-base 0000000.  It looks something like:
res-base Wins  GCs Fnts Pxms Misc   Pxm mem  Other   Total   PID Identifier
0000000     1    0    2    0   48        0B      3K      3K   ?   <unknown>

Use control-alt-function-key to switch to another VT, then switch back to
X.  The Misc column, on my computer, goes up by seven on each switch out of X.

I've attached a patch that seemss to fix the problem (tested against Debian xorg-server 1.16.4-1 and 1.17.2-1.1 source packages, seems to be working so far)  It should be noted that I don't know how FreeResource() is supposed to be called, it just looks right and hasn't crashed yet.

I'm assuming this will affect all architectures and any OS that triggers DisableDevice(); the affected machine is a Debian Linux machine with an amd64 processor.
Comment 1 GitLab Migration User 2018-12-13 22:33:02 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/482.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.