[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Memory Leak in XFree86



On Wed, Sep 10, 2003 at 03:05:10AM -0500, Branden Robinson wrote:
> On Tue, Sep 09, 2003 at 10:56:27AM -0500, Jim Crumley wrote:
> > I have been experiencing I think is a  nasty memory leak since I 
> > upgrade to 4.3.0-0pre1v1 several weeks ago.  I thought that it
> > might be kernel related problem because I was running a couple
> > month old 2.5 kernel, but I have upgrade to 2.6.0 test4  and I
> > still have the problem.
> [...]
> > Let me know any thing else that I can do to isolate this.
> 
> Please read the Debian X FAQ.

I had read the FAQ previously, though it had been a while, so
thank you for reminding me to read it again.

I assume the relevant part of the FAQ is question is question on
why X takes so much memory (I'll admit to only skimming the rest
of the FAQ).  The main points of this section seem to be that yes
X can take up a lot of memory, often for other processes, but
that it is OK because even if it is not deallocated, the memory
will eventually become inactive and be swapped out.

Well, my problem is that this memory is not being swapped out. Or
rather some of it is swapped out, but then swap fills up. As
I said in the portion of of my message that was snipped above, I
get to a sitaution where processes can no longer allocate memory
because X has control of too much. At that point processes start
dying spontaneously, starting whith big memory users like
mozilla, but eventually even smaller processes apt-get and some
wm* apps start dying.  At this point I am forced to reboot.  So
this is not just another case of looking at top and thinking that
X is too big.  X, or some process that it is allocating memory
for, is holding too much memory and it won't let it go.

Which leads new that the FAQ did teach me, 
cat /proc/$(pidof X)/maps . Unfortunately I haven't been able to
decipher it.

I waited a while to reply because I wanted to try adding some more
swap, to see if that would help.  It has increased the time
until I start to get problems to 5 days, but the problems still
occur.  Mozilla just died on me because it couldn't get memory, and 
other processes will start doing the same soon if the behavior
holds.

Below I have attached my XF86Config-4 and the results of 
cat /proc/$(pidof X)/maps .

Thanks for your help.

-- 
Jim Crumley                  |
crumley@fields.space.umn.edu |
Work: 612 624-6804 or -0378  |

### BEGIN DEBCONF SECTION
# XF86Config-4 (XFree86 server configuration file) generated by dexconf, the
# Debian X Configuration tool, using values from the debconf database.
#
# Edit this file with caution, and see the XF86Config-4 manual page.
# (Type "man XF86Config-4" at the shell prompt.)
#
# If you want your changes to this file preserved by dexconf, only make changes
# before the "### BEGIN DEBCONF SECTION" line above, and/or after the
# "### END DEBCONF SECTION" line below.
#
# To change things within the debconf section, run the command:
#   dpkg-reconfigure xserver-xfree86
# as root.  Also see "How do I add custom sections to a dexconf-generated
# XF86Config or XF86Config-4 file?" in /usr/share/doc/xfree86-common/FAQ.gz.

Section "Files"
        FontPath        "unix/:7100"                    # local font server
        # if the local font server has problems, we can fall back on these
        FontPath        "/usr/lib/X11/fonts/Type1"
        FontPath        "/usr/lib/X11/fonts/CID"
        FontPath        "/usr/lib/X11/fonts/Speedo"
        FontPath        "/usr/lib/X11/fonts/misc"
        FontPath        "/usr/lib/X11/fonts/cyrillic"
        FontPath        "/usr/lib/X11/fonts/100dpi"
        FontPath        "/usr/lib/X11/fonts/75dpi"
EndSection

Section "Module"
        Load    "GLcore"
        Load    "bitmap"
        Load    "dbe"
        Load    "ddc"
        Load    "dri"
        Load    "extmod"
        Load    "freetype"
        Load    "glx"
        Load    "int10"
        Load    "record"
        Load    "speedo"
        Load    "type1"
        Load    "vbe"
EndSection

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "keyboard"
        Option          "CoreKeyboard"
        Option          "XkbRules"      "xfree86"
        Option          "XkbModel"      "pc104"
        Option          "XkbLayout"     "us"
        Option          "XkbOptions"    "ctrl:nocaps"
EndSection

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
        Option          "CorePointer"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "PS/2"
        Option          "Emulate3Buttons"       "true"
        Option          "ZAxisMapping"          "4 5"
EndSection

Section "InputDevice"
        Identifier      "Generic Mouse"
        Driver          "mouse"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/input/mice"
        Option          "Protocol"              "ImPS/2"
        Option          "Emulate3Buttons"       "true"
        Option          "ZAxisMapping"          "4 5"
EndSection

Section "Device"
        Identifier      "Intel Extreme 845G chipset"
        Driver          "vesa"
        VideoRam        32000
EndSection

Section "Monitor"
        Identifier      "Compaq P700"
        HorizSync       30-94
        VertRefresh     50-75
        Option          "DPMS"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Device          "Intel Extreme 845G chipset"
        Monitor         "Compaq P700"
        DefaultDepth    24
        SubSection "Display"
                Depth           1
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           4
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           8
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           15
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           16
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           24
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
        InputDevice     "Generic Mouse"
EndSection

Section "DRI"
        Mode    0666
EndSection

### END DEBCONF SECTION
 
00000000-000a0000 rw-s 00000000 00:06 65537      /SYSV00000001\040(deleted)
000a0000-000c0000 rwxs 000a0000 03:01 2277422    /dev/mem\040(deleted)
000c0000-000f0000 rwxs 000c0000 03:01 2277422    /dev/mem\040(deleted)
000f0000-00100000 r-xs 000f0000 03:01 2277422    /dev/mem\040(deleted)
08048000-08195000 r-xp 00000000 03:01 852160     /usr/X11R6/bin/XFree86
08195000-081c6000 rw-p 0014d000 03:01 852160     /usr/X11R6/bin/XFree86
081c6000-3ffff000 rwxp 00000000 00:00 0 
40000000-40011000 r-xp 00000000 03:01 213068     /lib/ld-2.3.1.so
40011000-40012000 rw-p 00011000 03:01 213068     /lib/ld-2.3.1.so
40022000-4002d000 r-xp 00000000 03:01 2228889    /usr/lib/libz.so.1.1.4
4002d000-4002f000 rw-p 0000b000 03:01 2228889    /usr/lib/libz.so.1.1.4
4002f000-40030000 rw-p 00000000 00:00 0 
40030000-40050000 r-xp 00000000 03:01 213316     /lib/libm-2.3.1.so
40050000-40051000 rw-p 0001f000 03:01 213316     /lib/libm-2.3.1.so
40051000-40053000 r-xp 00000000 03:01 213315     /lib/libdl-2.3.1.so
40053000-40054000 rw-p 00001000 03:01 213315     /lib/libdl-2.3.1.so
40054000-4015c000 r-xp 00000000 03:01 213313     /lib/libc-2.3.1.so
4015c000-40162000 rw-p 00107000 03:01 213313     /lib/libc-2.3.1.so
40162000-401b5000 rw-p 00000000 00:00 0 
401b5000-40255000 rw-s 00000000 00:06 65537      /SYSV00000001\040(deleted)
40255000-40a25000 rw-s f0000000 03:01 2277422    /dev/mem\040(deleted)
40a25000-40a35000 rw-s 000a0000 03:01 2277422    /dev/mem\040(deleted)
40a35000-40f36000 rw-p 00000000 00:00 0 
40f37000-40f70000 rw-p 00502000 00:00 0 
40f71000-40fac000 rw-p 0053c000 00:00 0 
414aa000-419ab000 rw-p 00000000 00:00 0 
419ab000-41a0b000 rw-s 00000000 00:06 144900098  /SYSV00000000\040(deleted)
41a0b000-41a0d000 rw-p 00000000 00:00 0 
41a0e000-41a0f000 rw-p 00000000 00:00 0 
41eab000-423ac000 rw-p 00000000 00:00 0 
4457e000-445de000 rw-s 00000000 00:06 127172628  /SYSV00000000\040(deleted)
445de000-4470b000 rw-p 00000000 00:00 0 
4472d000-447d7000 rw-p 00000000 00:00 0 
4534b000-4534d000 rw-p 00026000 00:00 0 
45601000-45701000 rw-p 00000000 00:00 0 
45900000-45a00000 rw-p 00000000 00:00 0 
45adb000-45bdb000 rw-p 0070c000 00:00 0 
45c00000-46100000 rw-p 00025000 00:00 0 
462dc000-463dc000 rw-p 00000000 00:00 0 
46600000-46700000 rw-p 0002e000 00:00 0 
467f1000-47bf1000 rw-p 00ae9000 00:00 0 
47c00000-47d00000 rw-p 0000f000 00:00 0 
47e3f000-4963f000 rw-p 02137000 00:00 0 
49700000-49800000 rw-p 000c1000 00:00 0 
4988e000-4a78e000 rw-p 03b86000 00:00 0 
4a800000-4a900000 rw-p 00072000 00:00 0 
4a9dd000-4aedd000 rw-p 04cd5000 00:00 0 
4b02c000-4b52c000 rw-p 05324000 00:00 0 
4b67b000-4bf7b000 rw-p 05973000 00:00 0 
4bfea000-4c4ea000 rw-p 062e2000 00:00 0 
4c639000-4cb39000 rw-p 06931000 00:00 0 
4cc88000-4d188000 rw-p 06f80000 00:00 0 
4d2d7000-4dbd7000 rw-p 075cf000 00:00 0 
4dc00000-4dd00000 rw-p 00029000 00:00 0 
4de26000-4f226000 rw-p 0811e000 00:00 0 
4f375000-50c75000 rw-p 0966d000 00:00 0 
50dc4000-516c4000 rw-p 0b0bc000 00:00 0 
51700000-51800000 rw-p 0003c000 00:00 0 
51913000-51e13000 rw-p 0bc0b000 00:00 0 
51f62000-52462000 rw-p 0c25a000 00:00 0 
525b1000-52ab1000 rw-p 0c8a9000 00:00 0 
52c00000-53600000 rw-p 0cef8000 00:00 0 
5374f000-54b4f000 rw-p 0da47000 00:00 0 
54c9e000-5649e000 rw-p 0ef96000 00:00 0 
565ed000-56eed000 rw-p 108e5000 00:00 0 
56f00000-57000000 rw-p 00013000 00:00 0 
5713c000-5843c000 rw-p 11434000 00:00 0 
58500000-58600000 rw-p 000c4000 00:00 0 
5868b000-5958b000 rw-p 12983000 00:00 0 
59600000-59700000 rw-p 00075000 00:00 0 
597da000-59cda000 rw-p 13ad2000 00:00 0 
59e29000-5a329000 rw-p 14121000 00:00 0 
5a478000-5af78000 rw-p 14770000 00:00 0 
5afc7000-5c2c7000 rw-p 152bf000 00:00 0 
5c300000-5c500000 rw-p 00039000 00:00 0 
5c516000-5df16000 rw-p 1680e000 00:00 0 
5df65000-5e565000 rw-p 1825d000 00:00 0 
5e5b4000-5f9b4000 rw-p 188ac000 00:00 0 
5fa03000-60303000 rw-p 19cfb000 00:00 0 
60400000-60500000 rw-p 000fd000 00:00 0 
60552000-61952000 rw-p 1a84a000 00:00 0 
61aa1000-61fa1000 rw-p 1bd99000 00:00 0 
62000000-62300000 rw-p 0005f000 00:00 0 
62600000-629fa000 rw-p 000be000 00:00 0 
629fa000-62a00000 ---p 00000000 00:00 0 
62a00000-62c00000 rw-p 00006000 00:00 0 
62e00000-631ff000 rw-p 000be000 00:00 0 
631ff000-63200000 ---p 00000000 00:00 0 
63200000-63300000 rw-p 00001000 00:00 0 
6330a000-6350a000 rw-p 00000000 00:00 0 
63600000-639fa000 rw-p 000be000 00:00 0 
639fa000-63a00000 ---p 00000000 00:00 0 
63a00000-63b00000 rw-p 00000000 00:00 0 
63d00000-643fe000 rw-p 000be000 00:00 0 
643fe000-64400000 ---p ffd63000 00:00 0 
64500000-65300000 rw-p 000be000 00:00 0 
653a3000-654a3000 rw-p 00761000 00:00 0 
65500000-658ff000 rw-p 000be000 00:00 0 
658ff000-65900000 ---p 00000000 00:00 0 
65900000-660fd000 rw-p 00001000 00:00 0 
660fd000-66100000 ---p 00000000 00:00 0 
66100000-66300000 rw-p 00003000 00:00 0 
66500000-66a00000 rw-p 000be000 00:00 0 
66c00000-67200000 rw-p 000be000 00:00 0 
67400000-67a00000 rw-p 000be000 00:00 0 
67c00000-68100000 rw-p 000be000 00:00 0 
68400000-687ee000 rw-p 000be000 00:00 0 
687ee000-68800000 ---p 00000000 00:00 0 
68800000-68900000 rw-p 00012000 00:00 0 
68a00000-68dff000 rw-p 0008a000 00:00 0 
68dff000-68e00000 ---p 00000000 00:00 0 
68e00000-68f00000 rw-p 00001000 00:00 0 
69200000-69600000 rw-p 000be000 00:00 0 
69900000-69e00000 rw-p 000be000 00:00 0 
69fcc000-6a0cc000 rw-p 00000000 00:00 0 
6a100000-6a500000 rw-p 000be000 00:00 0 
6a800000-6ad00000 rw-p 000be000 00:00 0 
6b000000-6b500000 rw-p 000be000 00:00 0 
6b800000-6bd00000 rw-p 000be000 00:00 0 
6c000000-6c200000 rw-p 000be000 00:00 0 
bffac000-c0000000 rwxp fffad000 00:00 0 



Reply to: