Ubuntu 16.04: “Out of memory” errors after upgrade to 4.4.0-59
bugs.launchpad.net
bugs.launchpad.net
Regardless, it's things like this why we never recommend people use Ubuntu - years of poorly packaged and tested software. If you want a Debian based system use Debian (and accept that there's now a lot of missing packages are barely any proper SELinux or clustering support) or use RHEL/CentOS for a more complete district and add in repos like epel and elrepo as required.
In spite of their best efforts, it is not the "grandma friendly" quality software it hoped to be.
I reported it as soon as I upgraded (to 14-something I think) and the bug was marked as severe. Every time a new release of Ubuntu comes out I check if it had been fixed, and of course it hasn't.
# apt-get update
# aptitude full-upgrade
# apt-get autoremove
Because as far as I can tell, apt-get sometimes fails to actually update things, whereas aptitude can't autoremove. I'm sure there's a better way.This is my major gripe with the dpkg ecosystem. There are (AFAICT) multiple different tools to build dpgks and multiple different tools for updating your system, and none of them are adequately documented nor support all use cases.
The Fedora ecosystem is better in this regard. Want to build an rpm? rpmbuild is the only answer. Want to update the system? Use dnf. (Sadly, there's now also PackageKit, and it's not quite isomorphic to dnf.)
Updating your system is all the same backend, and the Debian-alikes try to tell you to only use one tool for cmdline (apt, now, which just takes the same args as all the various apt-FOO commands did, all of which still work), and one for the GUI (Synaptic, or wrappers around it, unless Ubuntu Software Center has mutated a lot since I last looked).
IIRC they made a big deal about not installing aptitude (a popular alternate text UI for apt-based systems) by default on Ubuntu _because_ they wanted to standardize and fix any deficits, rather than working around them.
That would work great if would they would take bugs reports seriously. In practice, with Canonical I file a bug and ninety days later get an automated message that the bug was closed due to inactivity.
I noticed they changed that policy when I started getting comments on years-old bugs of closed-obsolete. If they're now 90d expiring bugs, I'd _guess_ there's a bit that can be set for your account of whether you're a customer paying for support, and that their support staff have a queue filter that prioritizes those, and the rest get expired if nobody comments.
You should be doing:
apt-get autoremove --purge
Otherwise you'll be leaving a lot of clutter around (obsolete configuration files).you want:
apt-get update && apt-get dist-upgrade && apt-get autoremove
This is not going to autoremove kernels unless you modify the default preferences in /etc/apt/. For added benefit you should probably add --purge to your autoremove command.
I also don't have swap on my laptop (16 GB RAM and SSD) and I rarely hit 10 GB of used space. With no swap I mean no swap partition. I'm getting those out of memory errors in Opera tabs since the new kernel. Luckily my primary browser (FF) is fine. I guess it's trying to swap Opera out even if there is no swap. I'll reboot with the older kernel and see what happens.
And talking about breakage: I can't count how many times some important Gnome3 plugin broke after a minor Gnome3 update from the distribution. Or how many times I wasn't able to install a plugin that installed fine just a month ago on the same Gnome3 version. Why? Because you have to download them from some obnoxious website that apparently has no archive and no way to properly match the right plugin version to a given Gnome3 version.
Cinnamon copied the same madness. But you have to install less addons to make it at least usable. KDE is somehow still stuck in the previous decade when it comes to desktop design.
If the Gnome3 project with their questionable design choices and holier-than-thou attitude is the future of desktop Linux, then I have to say that the situation is much worse than it was ten years ago.
BTW, Ubuntu doesn't come with Amazon addons installed anymore. And even when it did, you could entirely remove it and look at the source. I think Canonical realised that they cannot pull something like that anymore.
I use i3 instead of Gnome 3 and the Gnome 3 apps with CSD fit in beautifully. There used to be issues where there were gaps and such, but those are resolved by now.
> something that has been solved more elegantly by putting menus in the top panel
Arguable and probably comes down to personal preferences. For some apps (like the screenshot tool) it fits really well.
> their own custom [...] init system of Upstart when they could have contributed to System
upstart was developed several years, just under half a decade, before systemd even existed; it was used by Fedora for three years.
Eucalyptus vs OpenStack (ever heard of Eucalyptus?)
Bazaar vs Git (Git won)
LaunchPad vs Github (LaunchPad is alive and well, but Github won the popularity contest)
Wayland vs Mir (Wayland won)
upstart vs systemd (systemd won)
Let's see how these work out:
Juju vs Kubernetes/OpenShift (I'm aware that you can run Kubernetes on Juju, probably won't save them though)
Snap vs Flatpak (vs AppImage?)
It's sad, really. I like Ubuntu and Canonical and strongly believe in competition, but it'd really help if they didn't consistently back the wrong projects.
I can't help wonder if this will keep happening as their competition waits to see everything new Canonical chooses to back, then works to thwart it :)
Have you actually looked at Ubuntu, have you tried to use it? I'm not even going to go through your assertions one by one to debunk them, as most of them are wrong and unsupported by facts.
Cheers.
Much fewer issues with Red Hat.
# mystery one-liner from https://news.ycombinator.com/item?id=13513171
# dpkg -l 'linux-' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]\)./\1/;/[0-9]/!d' | xargs -p sudo apt-get -y purge
# my corrected/improved version:
noncurrent_kernel_pkgs() { dpkg -l 'linux-*[0-9]*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.\)-\([^0-9]\+\)/\1/")"'/d;s/^ii *\([^ ][^ ]*\)[^ ]*.*/\1/' ; }
# corrections/(possible-)improvements:
# - dpkg -l 'linux-' # returns nothing
# - dpkg -l 'linux-*[0-9]*' # moves 'pkgnm must contain a number' rule (last sed cmd in orig: '/[0-9]/!d') forward
# - pkgnm isolation/extraction was broken (did dpkg output change?)
output: kg@kg-VirtualBox:~$ noncurrent_kernel_pkgs
linux-headers-4.4.0-43
linux-headers-4.4.0-43-generic
linux-headers-4.4.0-45
linux-headers-4.4.0-45-generic
linux-headers-4.4.0-53
linux-headers-4.4.0-53-generic
linux-headers-4.4.0-57
linux-headers-4.4.0-57-generic
linux-image-4.4.0-43-generic
linux-image-4.4.0-45-generic
linux-image-4.4.0-53-generic
linux-image-4.4.0-57-generic
linux-image-extra-4.4.0-43-generic
linux-image-extra-4.4.0-45-generic
linux-image-extra-4.4.0-53-generic
linux-image-extra-4.4.0-57-generic
kg@kg-VirtualBox:~$ uname -r
4.4.0-59-generic
kg@kg-VirtualBox:~$Just looking at it though, it looks like it'll purge kernel packages that are the currently booted one. I don't have a system handy to check though so take that with a grain of salt.
However, I suggest that your grandma's long experience with computers probably means that she in would be especially displeased with the crummy state of the Linux desktop in 2017!
[0] https://www.usability.gov/how-to-and-tools/methods/personas....
I just use the term because I'm "family tech support" for multiple grandmas. I'll avoid that phrasing in the future.
Not perfect but not a problem for 90% of people I guess...
I installed Ubuntu onto a machine, chose the recommended default options, and it set up a /boot partition that was quite small, and its normal update cycle fills it up and fails to fix the problem automatically or prompt the user with information to fix the problem.
Grandma didn't customise her installation to put /boot in its own, small partition.
FWIW, you can run "apt-get --purge autoremove" to remove old kernels since at least 16.04 and maybe 14.04 (I don't recall). Not fully automatic, but at least it is one command. For fully automatic, you can install and configure unattended-upgrades and configure it to autoremove automatically.
It's not just a bunch of people setting cm.swappieness to 0 is it? That behaviour changed and now prevents going into swap /ever/ where it used to mean go into swap as a last resort. Changing it to 1 fixes the issue and will act like the old behaviour or only swapping as a last result.
That's a surprising behaviour change (from the perspective of "don't break userspace"), but looks more like a "fix of previously broken behaviour" as in 0 not being able to disable swap entirely; from that perspective, using 1 makes sense.
Swap is useful even if you have plenty of RAM. It's better to swap out a cold file-backed page and use that page for cache instead than to pin that cold page in memory for no reason.
If your servers are at 75% CPU and start swapping you are screwed. Time to start adding servers. In this day and age you are wasting a lot of money to be sitting around waiting for swap.
"Zswap is a lightweight compressed cache for swap pages. It takes pages that are in the process of being swapped out and attempts to compress them into a dynamically allocated RAM-based memory pool. [...] Zswap is a new feature as of v3.11 [...] zswap is a work in progress and should be considered experimental."
The return of RAM Doubler!
The naming is initially confusing if you're already familiar with ZFS, especially:
"Zswap makes use of zpool for the managing the compressed memory pool"
Linux intelligently swaps out ununsed pages even if there's enough physical RAM (that is more useful as page cache).
People should stop monitoring swap usage and start monitoring the amount of page in / page out IO.
Monitoring swap usage doesn't make sense on either FreeBSD or Linux.
Going into swap in Linux isn't a problem, it's a symtom of a misconfigured / provisioned server or an unhanled application memory leak, other than that the other only things that should cause it is incorrectly configured use of shared / reserved memory.
Disk based swap should pretty much always be disabled these days and ZRAM used to incresed efficiency.
Windows 10 has had memory compression [1] for quite a while now. On the PC I am on at the moment with 100+ Chrome tabs open, I have 1.3GB compressed out of a total of 16GB.
[1] http://www.thewindowsclub.com/memory-compression-in-windows-...
It makes less sense for server workloads, where you usually don't have huge chunks of inactive memory.
I always run with no swap in AWS, especially with the newer EBS-only families.
And cause a bunch more. Have you ever had to debug a race that is only triggered when a process hits swap. Not fun at all.
Ironically, if the node had crashed for OoM, the cluster would have survived just fine.
But you can disable swap entirely by not having a swap partition/file, so I don't think that's a huge issue.
I have stopped using it long time ago, after they introduced the following bug:
https://bugs.launchpad.net/ubuntu/+source/netcat-openbsd/+bu...
I recall a fascinating article / thread years ago about swappiness=0 not actually meaning what people thought it meant, and explaining why it was (generally) a bad idea. A low number, yes, but not 0.
Doing some research now, and found a blog written by someone bitten by this change back in 2014-04 -- referring to the commit that introduced this in 3.5-rc1. Not clear why the change was made, though, as a) it breaks lots of people's understanding / expectation, and b) if you want to never swap out then just forego the creation of a swap file / partition.
[1] https://www.percona.com/blog/2014/04/28/oom-relation-vm-swap...
It really went downhill with, the release of 8.0, the only improvement we really saw was a slightly newer kernel (but still old) and SystemD (although not consistantly implemented), The Debian community has also fallen through the floor, lots of smart-ass bickering and slack package maintainership and generally unhelpful, rude contributors / owners. By contrast RHEL/CentOS sped up their release cycles after re-in-housing Fedora as and taking a lot of it's rolling updates into stable a lot quicker and the community has been fantastic, Redhat have really stepped up and modernised their game a lot over the past two or there years.
For my work with Belenix (revamp not announced yet), I am working on examples where users no longer depend upon system-supplied package versions, and instead choose their own local instances.
https://www.percona.com/blog/2014/04/28/oom-relation-vm-swap...
My use case is custom build Django/Postgres app.
It prevents a lot of sitations where an app might behave badly, for example perhps you're running a PHP app and a 0-day PHP flaw is discovered, there's a good chance that SELinux restrictions could prevent that exploit from being useful to the attacker by not allowing the app to do unusual things.
We have a rule - if it's not running SELinux in enforicng then it's not going into production.
We use to run GRSec as well, however with modern kernels a lot of the GRSec code base has been merged in so it's often not required.
Back when we ran Debian everywhere I wrote a CI project that would build the latest mainline kernel, applying GRSec and adding some SELinux policies in as best I could (backported from CentOS/Fedora funnily enough) and build them into a Debian package for deployment across our hosts, see: https://github.com/sammcj/kernel-ci
Best parts already mentioned in this thread (pf, jails, etc.) I would add one thing to the list:
* https://freedesktop.org/software/systemd/man/file-hierarchy....
It does exist in the same umbrella project as systemd, (and I think that is an issue) but embedded is the wrong term.
Don't use it then. Anyway, since systemd-the-project doesn't have a separate name from systemd-the-init, I don't see any problem with Cieplak's statement.
(I run Open and Free, and started with Net, I have no dog in this race)
What laptop are you using and exactly what does/does not work for you?
E.g. Guix is a very cool Nix-like distro.
https://forum.alpinelinux.org/forum/general-discussion/alpin...
PREFACE
I've been using linux since the mid-90s. I know how to use the console, I compiled kernels, played with the old xfree86 config files and all that back in the day.
THE GOOD OF FreeBSD:
* Stable. It feels like a Unix out of the 80s. If you know what you're doing, it'll get the job done.
* man pages - Haven't used them much on Linux recently, felt that they were on the level of command --help, but on FreeBSD they felt like reading an authoritative blog post. Clear and concise.
* Cross-update versions - better than Debian. I personally never successfully had a seamless update between major releases, while FreeBSD did.
* No systemd (for now) - Unfortunately, systemd is taking over Linux because the largest block of user-space OSS programmers work for RedHat, which pushes for systemd. IIRC, the reason Debian went with systemd is because their maintainers simply have no resources to commit to remove it from gnome, etc.
However, as systemd grows in scope, FreeBSD will have to either play with it, re-implement it in a normal way (which will let other Linux systems find a way out), or stop being compatible with gtk, gnome, et al.
THE IRRELEVANT:
* BSD license - unless you're modifying and then distributing your modification, it doesn't matter.
* "Fragmantation" - True, "FreeBSD" is less fragmented than "Linux", but "BSD" is more fragmented than "Linux" and "Debian" (or RedHat or Ubuntu or Arch...) is the same not fragmented as FreeBSD. Look at the Distro as the OS rather than the kernel.
And it doesn't matter -
If you're distributing OSS, then release it as POSIX and configure; make; make install, and let the distro figure out packaging.
If you want to make life easier for the distro or releasing closed source software, Linux (on the server) has an order of magnitude more users than FreeBSD (https://en.wikipedia.org/wiki/Usage_share_of_operating_syste... ), and if your program works with Debian, Ubuntu and RedHat/CentOS, you'll probably cover the vast majority of users.
* Ports - Complicated to update, takes a long time (unless you have a fleet of servers), and can't be automated. And pkg is no better than apt.
* ZFS - ZFS is being ported to Linux, and btrfs may one day become stable. Either way, in a few years you'll be able to run the same ZFS on Linux as on FreeBSD.
THE GOOD IN LINUX
* Update - On Debian, you run apt upgrade && apt update. And it updates everything. And if you're on a stable release, updates are only bug-fixes, so (short of bugs/regressions), it can be automated.
FreeBSD, on the other hand, doesn't have enough maintainers to keep a stable ports tree, so every update can break your setup. So every update has to be taken care of manually.
* Security - Yes, I know that "experts" like the FreeBSD kernel better and everything, but the FreeBSD kernel has bugs of its own, so practically the key to secure both is keeping them up to date. And most of the time you're using ports, which isn't really run by FreeBSD and subject to their code review. So as Linux has an easier time updating (see above), it would be more secure.
* Directory structure - Why would you want a "blessed" vi? Why should a distro manager decide that /usr/bin/vi is (say) vim while neovim /usr/local/bin/nvi.
If anything, Linux is a lot more "Unixy" (I do know that FreeBSD is the "traditional" way, but I think that Linux is a lot more Unixy) - Why shouldn't I be able to write my own libc without having to maintain my own kernel? On Linux I can replace glibc with muslc. Why can't I do the same on FreeBSD?
If anything, this is what everyone's complaining about systemd: "It's not modular". Well, neither is the FreeBSD base. (Though in truth, FreeBSD seems much more careful about basic software hygiene than systemd).
* Default software - Maybe I'm unique, but I kind of like bash. I don't see why it shouldn't be my default shell except "Well, if it didn't exist in the 80s, it won't exist now" (It could also be a licensing issue, but as a user I don't really care about that).
Others will scream "ShellShock". Well, yes. Though ShellShock shouldn't be a security issue if you don't rely on userspace software to maintain security.
The OS should assume that software will break, and defend against it. So things like pledge or SELinux are much more effective (and sustainable) than treating userspace bugs as security holes.
Though in truth, I can't see why Apache should ever run bash honestly.
> And pkg is no better than apt.
Apt is pretty good, so being no better than it isn't that bad.
> * Directory structure - Why would you want a "blessed" vi? Why should a distro manager decide that /usr/bin/vi is (say) vim while neovim /usr/local/bin/nvi.
> * Default software - Maybe I'm unique, but I kind of like bash. I don't see why it shouldn't be my default shell except "Well, if it didn't exist in the 80s, it won't exist now" (It could also be a licensing issue, but as a user I don't really care about that).
It helps to think of FreeBSD base as a minimum workable install: the goal is not to install everything you need, it's to get enough software that you can a) build whatever you need from ports, b) rebuild the kernel and the world. That's why /usr/bin/vi is vi (not vim) and the vi you like is in /usr/local/bin/, it's pretty helpful to have a screen oriented editor, so they've given you a basic one. I personally am not sure why they ship tcsh in base, but it's probably because they always have; philosophically they should just let you install tcsh if you need it, just like bash. Running a simpler shell than bash for /bin/sh is just good sense, Debian uses dash for /bin/sh too.
Where's the beef? If you like/want it, then just make it your default shell. All it takes is "pkg install bash" and "chsh". I happen to find the default /bin/sh (Almquist shell) provides just about everything I care about in bash, while being much lighter weight and less full of security holes, but if I ever want bash all I have to do is type "bash" from my sh prompt.
You mean frozen package versions + backported security fixes as in stable Debian branch? I think Debian is pretty unique in trying to support the whole world.
Just to clarify, FreeBSD as a project only supports the base system. Ports tree doesn't have any notion of releases and is intended to be always kept up to date, akin to Gentoo portage or Arch linux packages.
>Just to clarify, FreeBSD as a project only supports the base system. Ports tree doesn't have any notion of releases and is intended to be always kept up to date, akin to Gentoo portage or Arch linux packages.
Yes. I understand the amount of work Debian admins put in (which is why I stick with Debian, even though nixos/guix seems much more interesting), but it's a strong advantage.
btrfs seems like an elaborate hoax. ZoL is fine, but support and integration still go Illumos > FreeBSD > ZoL. There are enough commercial products using FreeBSD ZFS that it is robust.
UNIX uses the shell for a lot of things, interactive users are just one infrequent process. Bash is harmful as a non-interactive shell. Change your interactive shell to bash or zsh, problem solved.
There's a difference between manually logging in once a day and typing apt-get update && apt-get upgrade, seeing warnings, responding to them and applying and re-configuring/recompiling ports.
One can take five minutes. One can take an hour.
>On a workstation there are really no significant issues.
Yes, and on linux you can run testing. But I want more stability on a server.
> ZoL is fine, but support and integration still go Illumos > FreeBSD > ZoL. There are enough commercial products using FreeBSD ZFS that it is robust.
For some reason, all of a sudden everyone thinks that ZoL is legally safe to use. I'm not a lawyer, but whatever. The point is that it's still new and not tested significantly, but it should be more stable soon.
>UNIX uses the shell for a lot of things, interactive users are just one infrequent process. Bash is harmful as a non-interactive shell. Change your interactive shell to bash or zsh, problem solved.
So write shell scripts against /bin/sh or dash.
>Bash is harmful as a non-interactive shell.
How is it harmful? I mean why are your putting your shell in an untrusted environment?
Moreover, I understand if you like sh, tcsh, zsh or bash. My point is that it seems to me more of a "we always used tcsh/sh, so that's how it will stay forever" rather than "let's see what's the best default shell now and use it".
And why can't both shells (or zsh, which is MIT licensed) be included in base?
That reason is because it's free software, even the FSF thinks it's fine to use ZFS on your system. The issue is whether it's fine for the ZFS module to be distributed with the Linux kernel.
And automatically updating ports is easy. Set up Poudriere somewhere to build every night, log in, check security notices, and install the already compiled packages.
* NetBSD Guide: https://netbsd.org/docs/guide/en/
* FreeBSD Handbook: https://freebsd.org/doc/handbook/book.html
* DragonFlyBSD Handbook: https://www.dragonflybsd.org/docs/handbook/
* TrueOS User Guide: https://www.trueos.org/handbook/trueos.html
* PC-BSD User Guide: http://web.pcbsd.org/doc-archive/10.1.2/html/pcbsd.html (viewable off-line directly in both PDF and HTML forms in /usr/local/share/pcbsd/doc/)
https://www.freebsd.org/doc/handbook/
The book, Design and Implementation of the FreeBSD Operating System is quite good if you like technical reading.
Stability is, unfortunately, not great. Games exit unexpectedly, Firefox tabs frequently crash.
uname -r prints this exact kernel version so I assume I'm affected.
They've based off a Ubuntu LTS, but I think they are starting to move away from that.
Mint, elementary and the other "user friendly" distros should focus on creating the desktop and leave the distribution part to projects that have the resources and the staff to maintain the infrastructure.