Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Memory leak

  1. #11
    Join Date
    Mar 2008
    Location
    Deep South Texas, SpaceX
    Beans
    1,890
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Memory leak

    Quote Originally Posted by houseworkshy View Post
    If it is that swap is simply not enabled that's easy. Try "man swapon" in the terminal and read up

    http://www.linuxquestions.org/questi...g-used-709485/
    swap could exist but not be enabled due to bad enumeration.
    Indeed, your second link shows a perfect example of this.
    And makes good reading
    (with one possible solution).


    BTW, the changing UUID "problem" is not a "bug" as some folks like to blame...
    Anytime a partition is created, it is given a UNIQUE ID.
    UUID stands for Universally Unique IDentification.

    Deleting and recreating swap is creating a new partition...
    hence the new UUID.
    Hence the enumeration "bug".

    Making a note of the current UUID before making changes to the swap will let you replace the original UUID in the fstab,
    easy fix if you make note of it.
    "Free software is a matter of liberty, not price." -- Richard Stallman
    So don't forget to tip your software authors!

    I'm a Fireman... what's YOUR superpower?

  2. #12
    Join Date
    Jul 2007
    Location
    UK
    Beans
    17,059
    Distro
    Ubuntu Development Release

    Re: Memory leak

    Quote Originally Posted by LordVeovis View Post
    Well it is starting to happen right now. If I just boot my computer and start a web browser I will use up about 300mb to 400mb if playing video's. All I have open now is my browser, a few tabs and system monitor.

    Code:
                 total       used       free     shared    buffers     cached
    Mem:           997        922         75          0         35        294
    -/+ buffers/cache:        592        405
    Swap:            0          0          0
    and xorg is using 65mb of ram right now (not normal) and I have unaccounted for memory, right now not much, but i have had periods of 200 - 300 mb unaccounted for (at least by system monitor showing all processes for all users)
    The above shows actual ram in use is 592 meg.
    Linux uses empty ram to cache commonly used files for better performance

  3. #13
    Join Date
    Jun 2006
    Location
    Parker, CO USA
    Beans
    9
    Distro
    Ubuntu

    Re: Memory leak

    Seeing X just suck up more and more memory here. Had to log in from another box a couple of days ago because the UI stop responding (mouse moved but could not access gnome-panel to switch desktops). When I got in from the other box, all 4GB of RAM and most of my 4GB of swap were in use since I usually just leave the machine running. Waited to see if what I needed got swapped in and finally rebooted the box.

    Here's what I see from repeated runs of "ps auxk vsz" (process status sorted on virtual memory used):

    [dave@bend ~]# ps auxk vsz
    USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
    ...
    root 1215 1.5 15.8 728612 641428 tty7 Ss+ Jan28 21:11 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-
    ...
    root 1215 1.6 16.3 753112 663184 tty7 Ss+ Jan28 22:19 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-
    ...
    root 1215 1.2 17.3 791884 704480 tty7 Rs+ Jan28 27:24 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-
    ...
    root 1215 1.2 20.1 904160 816116 tty7 Ss+ Jan28 32:12 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-
    ...
    root 1215 1.1 26.4 1162024 1072256 tty7 Ss+ Jan28 41:14 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-
    ...
    root 1215 1.1 27.3 1198996 1111752 tty7 Ss+ Jan28 42:33 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-


    The last two runs of ps are from last night and then this morning with no user activity and just whatever processes were running (firefox, thunderbird, a bunch of xterms, stuff in the panel, etc.). Also swap usage went from none last night to:

    top - 08:59:41 up 2 days, 12:16, 9 users, load average: 0.00, 0.02, 0.00
    Tasks: 175 total, 1 running, 174 sleeping, 0 stopped, 0 zombie
    Cpu0 : 0.3%us, 0.3%sy, 0.0%ni, 99.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
    Cpu1 : 0.3%us, 0.3%sy, 0.0%ni, 99.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 4058708k total, 3988924k used, 69784k free, 365732k buffers
    Swap: 4096564k total, 1532k used, 4095032k free, 1672160k cached


    I've got 9.10 on a VMware box that I can leave alone so I'll see if I can find a minimal set of running processes that causes X to suck up all of the memory.

    I don't see this kind of problem on my CentOS 5.4 server. I typically only reboot it when there's a new kernel and memory use with X running is stable. I think the last time I rebooted it had been up for around 90 days.

    Cheers,
    Dave

  4. #14
    Join Date
    Nov 2007
    Beans
    288
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Memory leak

    Quote Originally Posted by egalvan View Post
    swap is either non-existent or not enabled
    I know swap is off, that is not the problem, the problem is the ram filling up over time with no new applications being launched. This will lead to swap being filled (if enabled) and then the same issue of unresponsive state if left to complete it's course. For now I have to ctrl-alt-bkspace or restart when this happens.

  5. #15
    Join Date
    Jun 2006
    Location
    Parker, CO USA
    Beans
    9
    Distro
    Ubuntu

    Re: Memory leak

    Just restarted X since it had grown to over 2GB with about 100MB of swap used. Certain apps were starting to get slugish. After the restart X looked like:

    [dave@bend ~]# ps aux | grep X
    root 24569 6.1 1.2 138128 51964 tty7 Ss+ 21:11 0:35 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-k6sZkg/database -nolisten tcp

    That's right, it starts with a virtual size of about 138MB and eventually grows to over 2GB.

    I guess I just have to restart X every few days. Hey, this is just like ******* with its therapeutic reboots.

    Cheers,
    Dave

  6. #16
    Join Date
    Jan 2007
    Location
    Michigan, USA
    Beans
    1,184
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Memory leak

    Now it's starting to sound like a mem leak. Nobody mentioned originally that X grew huge, and swap started getting filled. Those are key peices if information.

    The OP's problem still looks very close to cache, perhaps leave your machine on for a long time, then post the free -m. If the cache number is low, and the used number is high, you may have a bug to hunt down.

    And no, it's not like Windows, because when windows crashes the whole PC crashes, not just the gui.

  7. #17
    Join Date
    Jul 2008
    Location
    Michigan, USA
    Beans
    18
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Memory leak

    I'm having a similar issue with Xorg growing in size from ~30 MiB to >3 GiB over the course of a day. Details at this thread

  8. #18
    Join Date
    Jun 2006
    Location
    Parker, CO USA
    Beans
    9
    Distro
    Ubuntu

    Re: Memory leak

    Quote Originally Posted by t4thfavor View Post
    Now it's starting to sound like a mem leak. Nobody mentioned originally that X grew huge, and swap started getting filled. Those are key peices if information.

    The OP's problem still looks very close to cache, perhaps leave your machine on for a long time, then post the free -m. If the cache number is low, and the used number is high, you may have a bug to hunt down.

    And no, it's not like Windows, because when windows crashes the whole PC crashes, not just the gui.
    Just kidding with the comparison to *******.

    I left the following running after the last restart of X:

    [dave@bend ~]# while ( 1 )
    while? date >> Xsize.log
    while? ps aux | grep '/usr/bin/X' | grep -v grep >> Xsize.log
    while? echo " " >> Xsize.log
    while? sleep 60
    while? end

    Last output is:

    Wed Feb 3 16:13:45 MST 2010
    root 24569 1.9 14.2 667036 579416 tty7 Ss+ Feb02 22:05 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-k6sZkg/database -nolisten tcp

    Let me know if you'd like to see the file or need any other information.

    A quick glance at the file shows that the size of X stops growing once the system has been unused long enough for power management to shut down the display. It's kind of odd that X didn't stop growing when I went to bed; only about an hour later after power management had shut down the display. Also, It started growing again this morning as soon as I unlocked the screen and started using the system.

    Cheers,
    Dave

  9. #19
    Join Date
    Jun 2006
    Location
    Parker, CO USA
    Beans
    9
    Distro
    Ubuntu

    Re: Memory leak

    This is strange. By Thursday morning top and ps were reporting that X had again grown to about 2GB. I wanted to try starting Ubuntu in text mode so that I could start X as a regular user from the command prompt rather than have it run as a server as user root. I rebooted, missed the grub menu and so was left with Ubuntu running in graphical mode, again.

    The reboot seems to have sorted things out. X seems to be behaving itself and there is only one oddity: ps and top disagree as to how much memory X is using. ps says:

    root 1404 1.3 2.8 206356 116376 tty7 Ss+ Feb05 27:23 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-fAKfsE/database -nolisten tcp vt7

    and top says:

    Code:
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
     1404 root      20   0  472m 113m 7976 S    4  2.9  27:24.76 Xorg
    
    the 113MB and the 116376K are pretty close to the same but the 472MB VIRT and the 106356K VSS are no where near even close.

    Cheers,
    Dave

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •