Results 1 to 8 of 8

Thread: snapper memory leak? (1.2GB per snapshop after using zypper)

  1. #1

    Default snapper memory leak? (1.2GB per snapshop after using zypper)

    I've been troubleshooting a problem with all of my memory being used. Basically, each time I go into YaST and use the Online Update feature and click OK, my used memory increased by approximately 1.2GB. I see this as used memory using htop, ksysguard, kinfocenter, free and other utilities. Although it's taking away from application memory, I can't figure out where it's going by looking at process tables (it's not being taken up by anything there that I tell).

    The same thing happens if I install a new package using zypper from command line (memory usage goes up by approximately 1.2GB and never releases).

    IOW, if I do this 8 or 10 times (install any packages, update any software, etc.), I'm out of memory (with 12GB in the machine).

    I think I may have a clue about what's doing it. I think it's snapper related. That's because if I cancel out of any software update, more memory is not used; and if the package I try to install with zypper is already installed, the memory is not increased. But, when I actually update or install any new software, memory is used (approximately 1.2GB of memory vanishes each time and is never restored to where it's available again).

    Looking at snapper, I see a pattern where it's creating new snapshots when I update software or install software using zypper. But, it doesn't create the snapshots if I don't actually install anything new when using it.

    So, I suspect it's related to some kind of memory leak with snapper that's eating up memory each time you update any software and it creates new snapshots.

    Note that I'm running 64 Bit OpenSUSE Education Li-f-e 13.1 using the KDE Desktop with all updates applied. I'm using btrfs as the file system (with the same partition used for both root and home).

    Any ideas on how to prevent this behavior (memory usage going up and up after each software update or install until you exit and restart OpenSUSE)?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,846
    Blog Entries
    15

    Default Re: snapper memory leak? (1.2GB per snapshop after using zypper)

    On Mon 12 May 2014 02:36:04 PM CDT, JimCockfield wrote:


    I've been troubleshooting a problem with all of my memory being used.
    Basically, each time I go into YaST and use the Online Update feature
    and click OK, my used memory increased by approximately 1.2GB. I see
    this as used memory using htop, ksysguard, kinfocenter, free and other
    utilities. Although it's taking away from application memory, I can't
    figure out where it's going by looking at process tables (it's not being
    taken up by anything there that I tell).

    The same thing happens if I install a new package using zypper from
    command line (memory usage goes up by approximately 1.2GB and never
    releases).

    IOW, if I do this 8 or 10 times (install any packages, update any
    software, etc.), I'm out of memory (with 12GB in the machine).

    I think I may have a clue about what's doing it. I think it's snapper
    related. That's because if I cancel out of any software update, more
    memory is not used; and if the package I try to install with zypper is
    already installed, the memory is not increased. But, when I actually
    update or install any new software, memory is used (approximately 1.2GB
    of memory vanishes each time and is never restored to where it's
    available again).

    Looking at snapper, I see a pattern where it's creating new snapshots
    when I update software or install software using zypper. But, it
    doesn't create the snapshots if I don't actually install anything new
    when using it.

    So, I suspect it's related to some kind of memory leak with snapper
    that's eating up memory each time you update any software and it creates
    new snapshots.

    Note that I'm running 64 Bit OpenSUSE Education Li-f-e 13.1 using the
    KDE Desktop with all updates applied. I'm using btrfs as the file
    system (with the same partition used for both root and home).

    Any ideas on how to prevent this behavior (memory usage going up and up
    after each software update or install until you exit and restart
    OpenSUSE)?


    Hi
    I've never seen this with snapper and btrfs, have you configured
    snapper in anyway from the defaults? Now, I never use YaST always
    zypper, it may be a bug in YaST since it's been re-written in ruby?

    Next time your updating, use zypper and see if the same memory usage
    occurs.

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-7-desktop
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  3. #3

    Default Re: snapper memory leak? (1.2GB per snapshop after using zypper)

    Yes (same thing happens using zypper). See my last post where I went into more detail on that kind of thing:

    The same thing happens if I install a new package using zypper from command line (memory usage goes up by approximately 1.2GB and never releases)
    And, no I haven't tried to reconfigure anything regarding snapper.

    I'm really not very familiar with OpenSUSE at all (I've always used Debian based distros in the past). But, the idea of using the btrfs file system with snapper was appealing to me, and I decided to give it a try for a while.

    It doesn't matter how small the package I install is (for example, I do something like zypper install htop (and htop is very small), approximately 1.2GB of memory vanishes (shown as used with a variety of utilities including htop, ksysguard, kinfocenter, free and more). But, if nothing is installed (for example, I try to install a package that is already up to date, no additional memory is used).

    My guess is that it's related to snapper in some way (as I see new snapshots created when something is actually updated or installed using either YaST or zypper from command line). So, for some reason, around 1.2GB of memory is being taken each time software is installed or updated and a new snapshot is created.

    I can't figure out where it's going looking at processes in ksysguard, top, htop, etc. But, it's definitely being eaten up. The only way I've found to get it back again is by restarting the system. At that point, around 750MB of memory is being used once all services are started and the desktop is fully loaded. Of course, as soon as I load Firefox with a few tabs open, I'm at over a GB. But, the problem starts when I do any kind of software updates (using YaST, Oneline Updates), or using zypper. Each time you use a utility like that approximately 1.2GB of memory vanishes.

    Screen captures showing what I mean after multiple updates trying to figure out what's going on:

    https://dl.dropboxusercontent.com/u/4536228/memory1

    https://dl.dropboxusercontent.com/u/4536228/memory2

    https://dl.dropboxusercontent.com/u/4536228/monitor15

    Basically, each time you go into YaST and use the Online Update feature and click OK, another 1.2GB of memory is used. Or, each time you install anything using zypper, another 1.2GB is used, and I can't figure out where it's going.

    So, it doesn't take very long before all of my memory is used up (even with 12GB in this machine), and I have to restart OpenSUSE to get it back again.

  4. #4

    Default Re: snapper memory leak? (1.2GB per snapshop after using zypper)

    Corrected links to screen captures (uploaded wrong files, didn't included .png extension so that browsers would know how to load them).

    https://dl.dropboxusercontent.com/u/4536228/memory1.png

    https://dl.dropboxusercontent.com/u/4536228/memory2.png

    https://dl.dropboxusercontent.com/u/.../monitor15.png

    Anyway, I can't figure out where the memory is going (approximately 1.25GB of memory is being used every time I go into YaST>Online Updates and click OK; and the same thing happens if I install anything from command line using zypper, with 1.2GB of additional memory being used). The only thing I can see that might be causing it is that snapper is creating a new snapshot under those conditions. But, I may be "off base" and something else is happening.

    In any event, I need to figure out how to stop my memory from being eaten up (requiring a restart of OpenSUSE to get it back again).

  5. #5

    Default Re: snapper memory leak? (1.2GB per snapshop after using zypper)

    Another P.S.

    I'm using a Samsung 830 SSD for the Operating Systems and Programs, currently setup with 64 Bit Windows 8.1, MX-14 (a Mepis community developed distro using a Debian Stable base) and 64 bit OpenSUSE 13.1 (the Education Li-f-e flavor of it, using the KDE desktop). OpenSUSE is using a single partition (btrfs file system) for both root and home.

    I've had OpenSUSE installed for several months, and had not noticed this behavior with OpenSUSE before (approx. 1.2GB of memory "vanishing" each time you use YaST>Online Updates and click Accept). So, I suspect one of the recent updates broke it.

    I'm not very familiar with zypper (as I've been using mostly Debian based distros for years). But, I found the same symptoms with it if I installed anything using it from a terminal (approx. 1.2GB of memory vanishes each time you use it).

    Interestingly, you do not need to update anything for the 1.2GB of memory to vanish using YaST>Online Update if you click "Accept". Using it that way, snapper is creating a new snapshot anyway (even though nothing appeared to change, except for perhaps the available packages that were downloaded). But, with zypper from a command line, something needs to change before the 1.2GB of memory vanishes (as that's the only time it actually creates a snapshot from what I can tell looking at snapper).

    That's why I think it's probably related to how snapper is interacting with any kind of updates (stealing around 1.2GB of memory each time you do anything like that when it creates a new snapshot). Note that I do not see that problem if I manually create a snapshot without updating anything via Online Updates or zypper.

    It's strange for sure. But, the problem is that it's eating up all of my memory (1.2GB at a time, each time you use online updates or install anything) until you restart the system

    Note that I perform full disk image backups around once/week. I use ddrescue for that purpose, which is similar to dd in that it makes a "block by block" (a.k.a., sector by sector) copy of a device and can write it to an image file for you. Since my boot drive with the Operating Systems and Programs is relatively small, I don't mind the extra disk space on another drive used for storing those disk images using that kind of technique (since the image file it creates is the same size as the source drive, unused space and all).

    Since this appears to be a relatively new issue (I only noticed it yesterday), I suspect that I could restore one of the older backups and the problem would be solved (at least until I checked for updates again and installed them). But, it would be nice to figure out the problem cause so that I didn't need to go to that extreme (restore from an older disk image backup), especially since updates may "break" the install again and I'd be right back to where I am now.

    Again, I'm *not* very familiar with OpenSUSE. So, I'm not sure where to look for answers. If you want any info about the system. It's just an off-the-shelf Dell XPS 8500 with 12GB of memory, Core i7 3770, a 128GB Samsung 830 SSD (used for the Operating System installs, setup as an MBR drive with BIOS in Legacy mode), 2TB Seagate Barracuda, and an Nvidia GT 640 in it using newer Nvidia drivers), I'll be glad to post that info (along with logs, etc.) if it would help get to the bottom of what's causing my memory to be eaten up after any software updates until I restart the system.

    But, If nobody has any ideas, I'll probably just restore from a previous full disk image backup and keep my fingers crossed that updates don't break it again.

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,846
    Blog Entries
    15

    Default Re: snapper memory leak? (1.2GB per snapshop after using zypper)

    On Mon 12 May 2014 04:06:02 PM CDT, JimCockfield wrote:


    Corrected links to screen captures (browsers don't like it if they don't
    have the .png extension included, so I renamed the files with the .png
    extension appended to them).

    https://dl.dropboxusercontent.com/u/4536228/memory1.png

    https://dl.dropboxusercontent.com/u/4536228/memory2.png

    https://dl.dropboxusercontent.com/u/.../monitor15.png


    Hi
    I see a few hundred bytes increase, it install the application (I
    forced the install/reinstall of a large fonts rpm), runs pre and post
    snapshots then returns the memory after a few minutes. This is with
    GNOME DE though. I don't see 1.2GB or ram consumed either. This is on a
    notebook with a dual core cpu and 8GB of ram.

    Sounds like it might be time to create a bug?
    http://en.opensuse.org/openSUSE:Submitting_bug_reports

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-7-desktop
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  7. #7
    Join Date
    Jun 2008
    Location
    UK
    Posts
    5,500

    Default Re: snapper memory leak? (1.2GB per snapshop after using zypper)

    Quote Originally Posted by malcolmlewis View Post
    Hi
    I see a few hundred bytes increase, it install the application (I
    forced the install/reinstall of a large fonts rpm), runs pre and post
    snapshots then returns the memory after a few minutes. This is with
    GNOME DE though. I don't see 1.2GB or ram consumed either. This is on a
    notebook with a dual core cpu and 8GB of ram.
    I'm sure I would have noticed it on a notebook with C2D processor and 3GB ram, but I haven't using Tumbleweed, based on 12.3 and now 13.1, with Snapper/btrfs.
    Leap 42.3 (ext4, KDE Plasma 5.8.7) ~ stable
    Manjaro (ext4, Xfce) ~ rolling updates
    Tumbleweed (ext4, KDE Plasma5) ~ managed updates via "Tumbleweed Snapshots" service.

  8. #8

    Default Re: snapper memory leak? (1.2GB per snapshop after using zypper)

    I guess I could file a bug report. But, I don't know how reproducible it would be without a lot more analysis into the exact services, etc. that I have running.

    I looked around for an Education Li-f-e specific forum and didn't see one (since that "flavor" of OpenSUSE tends to have a lot more apps and services installed by default compared to the standard OpenSUSE releases), since someone running the same thing as I'm running would probably be more likely to encounter the issues I'm seeing with my install.

    Of course, they'd probably need a similar disk setup (single btrfs parition for root and home with snapper running, too). That's speculation, but on the surface, the evidence seems to point to a snapper related issues with software updates.

    I was hoping someone else had seen this issue before. But, again, it does appear to be a new issue (in my case anyway), so I suspect that the recent updates that I installed over the weekend broke my system in that manner. I guess I could just restore my drive from a previous full disk image backup (I've got one from May 3, 2014 that I could restore from, as the backup I have from yesterday would probably have the same issue as I'm seeing now).

    Then, (if restoring from a week old backup fixes it), update it, check for the problem, and try to figure out what changed using the snapper logs.

    The memory (1.2GB each time you do any software updates) is definitely *not* returning after a few minutes. I spent hours trying to figure out a pattern last night, and each time I used something like YaST>Online Update and clicked accept, another 1.2GB of memory was used (and I saw the same thing if I installed any app using zypper from a terminal, no matter how small the app), and that memory was *not* returned without a restart. I even let it stay in that condition over night (lots of memory eaten up with virtually nothing running), and saw no difference this morning.

    Fun.

Posting Permissions

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