Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Sunday May 10 2020, @06:47PM   Printer-friendly
from the stormy-weather dept.

System adminsitrator Chris Siebenmann has found Modern versions of systemd can cause an unmount storm during shutdowns:

One of my discoveries about Ubuntu 20.04 is that my test machine can trigger the kernel's out of memory killing during shutdown. My test virtual machine has 4 GB of RAM and 1 GB of swap, but it also has 347 NFS[*] mounts, and after some investigation, what appears to be happening is that in the 20.04 version of systemd (systemd 245 plus whatever changes Ubuntu has made), systemd now seems to try to run umount for all of those filesystems all at once (which also starts a umount.nfs process for each one). On 20.04, this is apparently enough to OOM[**] my test machine.

[...] Unfortunately, so far I haven't found a way to control this in systemd. There appears to be no way to set limits on how many unmounts systemd will try to do at once (or in general how many units it will try to stop at once, even if that requires running programs). Nor can we readily modify the mount units, because all of our NFS mounts are done through shell scripts by directly calling mount; they don't exist in /etc/fstab or as actual .mount units.

[*] NFS: Network File System
[**] OOM Out of memory.

We've been here before and there is certainly more where that came from.

Previously:
(2020) Linux Home Directory Management is About to Undergo Major Change
(2019) System Down: A systemd-journald Exploit
(2017) Savaged by Systemd
(2017) Linux systemd Gives Root Privileges to Invalid Usernames
(2016) Systemd Crashing Bug
(2015) tmux Coders Asked to Add Special Code for systemd
(2016) SystemD Mounts EFI pseudo-fs RW, Facilitates Permanently Bricking Laptops, Closes Bug Invalid
(2015) A Technical Critique of Systemd
(2014) Devuan Developers Can Be Reached Via vua@debianfork.org
(2014) Systemd-resolved Subject to Cache Poisoning


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Interesting) by bzipitidoo on Sunday May 10 2020, @07:41PM (9 children)

    by bzipitidoo (4388) on Sunday May 10 2020, @07:41PM (#992506) Journal

    I'll say. I've been running Lubuntu 20.04 on an old machine with only (only, hah!) 3G RAM. I strongly advise staying with 18.04. 20.04 just isn't polished enough. One of the worst bugs, which they mention in the release notes, is that LibreOffice Export to PDF does not work. That's just plain unacceptable for office work. I've also run into a weird problem with printing. CUPS complains that the cert is expired, and refuses to print. Huh? My printer even has a cert? WTF are they talking about? Printing and Export to PDF both are fine in 18.04.

    Lubuntu is supposed to be lightweight, but it rips through that 3G RAM like a starving wolf gulping down a mini sausage. Best keep it to one app at a time. No running Firefox and LibreOffice at the same time.

    Starting Score:    1  point
    Moderation   +1  
       Interesting=1, Total=1
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 2) by NCommander on Sunday May 10 2020, @07:49PM

    by NCommander (2) Subscriber Badge <michael@casadevall.pro> on Sunday May 10 2020, @07:49PM (#992509) Homepage Journal

    Honestly, 18.04 wasn't a great release either. I'm running it on my laptop, and while most of the bugs have been SRUed out, I have run into oddities with the included systemd and journalctl. Most of the issues appeared to come from Debian and I found 7/8 both to be very unstable compared to what came before. I've been fairly dissolution with Linux distributions for the last several years, and my only solace is that Windows continues its steady march in becoming crapper with each Windows 10 update.

    --
    Still always moving
  • (Score: 2) by Snotnose on Monday May 11 2020, @02:12AM (6 children)

    by Snotnose (1623) on Monday May 11 2020, @02:12AM (#992616)

    I've been running Lubuntu 20.04 on an old machine with only (only, hah!) 3G RAM. I strongly advise staying with 18.04. 20.04 just isn't polished enough. One of the worst bugs, which they mention in the release notes, is that LibreOffice Export to PDF does not work.

    Is it Lubuntu, or systemd that is breaking LibreOffice. Cuz if systemd can break a LibreOffice Export to PDF, thats kind of A Big Deal (tm).

    Seriously, systemd is a boot thing. Once you're up and running systemd should be moot. LibreOffice is a user mode thing. Having a boot thing break a user mode thing just, well, glad I retired about the time systemd poked it's head up.

    FWIW, I got 100% anti-Pottering when he did something in user space that caused problems with the kernel (his audio thing with too many debug messages or something). When he said "not my problem, your problem", the name "Pottering" stuck in my head as avoid at all costs.

    --
    When the dust settled America realized it was saved by a porn star.
    • (Score: 3, Interesting) by bzipitidoo on Monday May 11 2020, @03:22AM (4 children)

      by bzipitidoo (4388) on Monday May 11 2020, @03:22AM (#992648) Journal

      No, it's Ubuntu 20.04. Nothing to do with systemd-- at least, I hope it can't possibly be related to systemd. The problem is that they didn't settle on fonts for LibreOffice's PDF generation. So, LibreOffice will produce a PDF and act like it was successful, but when you view the PDF, you'll see the pictures and diagrams if any, and no text.

      I find that LibreOffice's handling of PDFs is not too good. A plain old PDF viewer will display a PDF correctly, with the correct fonts. But LibreOffice might not. It won't use the fonts in the PDF, instead looking for those fonts in the system and if it can't find them, doing a font substitution. The fonts might be right there in the PDF, but LibreOffice won't use them. Too often, the substitution throws all the positioning off.

      Yes, I know, PDFs aren't meant to be edited. That's not the reality in the office. Businesses act like giving out a source document (usually a Word file) is giving away their secrets or their control, but that very same info in a PDF is okay. So a PDF might be the best you have to work with.

      As for Poettering, the impression I've formed is that he's sloppy. Pulseaudio is a terrible resource hog. Might take 200M of RAM, just so audio from different apps can be blended. If you don't have a lot of RAM, devoting 200M of it to such a trivial thing is a problem. I can't imagine why it needs so much memory, and guess it shouldn't but that it's full of bugs, specifically, memory leaks. Maybe he doesn't care about that, as long as it does the job. To be fair, it might not be pulseaudio, it could be something else leaking like mad, perhaps Firefox. However, top reported pulseaudio as the memory hog. I simply uninstall pulseaudio, and let apps fight for ALSA. If you are also only running one app at a time, then there's no contention.

      • (Score: 2) by janrinok on Monday May 11 2020, @07:28AM

        by janrinok (52) Subscriber Badge on Monday May 11 2020, @07:28AM (#992707) Journal

        I'm running Ubuntu 20.04 MATE and I'm not seeing this fault - I don't know if the fonts are any different between MATE and Lubuntu?

        One installation is a clean install from a 20.04 iso, and two others are updates from 19.10.

      • (Score: 0) by Anonymous Coward on Monday May 11 2020, @09:21AM (1 child)

        by Anonymous Coward on Monday May 11 2020, @09:21AM (#992723)

        ALSA's dmix is quite capable of allowing multiple applications to play audio at the same time, and is, or used to be, normally configured this way by default. Perhaps this has changed in Ubuntu now that they assume you'll be using PulseAudio exclusively, especially since the default PulseAudio configuration opens the ALSA output device directly, denying audio output to non-PulseAudio programs anyway. (This can be changed in PulseAudio's config.)

        If you're not interested in per-application volume controls in the systray, networked audio or (so I've heard) Bluetooth audio, using plain ALSA without PulseAudio still works absolutely fine. (Except for Firefox, which seems to have dropped ALSA support, so you have to use a wrapper like apulse[1], or use a build that has ALSA support re-added. I use Void Linux, which comes with a build of Firefox that works just fine with ALSA "out of the box".)

        [1] https://github.com/i-rinat/apulse [github.com]

        • (Score: 2) by bzipitidoo on Monday May 11 2020, @01:28PM

          by bzipitidoo (4388) on Monday May 11 2020, @01:28PM (#992799) Journal

          I daresay you are correct, and my somewhat hazy idea of what exactly PulseAudio does is a little off.

          More generally, what has happened to our systems that 0.0625G RAM was once considered generous, and now, 4G is minimally adequate? Okay, yes, moving from ASCII to UTF-8 dramatically increased the memory needed for fonts, and library routines for handling text strings. And we are running much bigger screens-- 1280x1024 is kinda small by today's standards, and no one settles for just 256 colors any more. Wayland should be trimmer than XWindows, but dumping the 1980s graphics cruft that is now handled by monster graphics hardware doesn't seem to have gained back much. Moving from 32bit to 64bit was another memory eater. There are slimmer alternatives to glibc, such as uclibc and musl libc. And systemd, wouldn't surprise me if that has the largest footprint of all the init systems. Firefox too has grown, with ever more standards to follow. Really must have the Opus audio codec (added in Firefox 19), and now there's AV1 video in the works. Perhaps JPEG will at last be upgraded, to JPEG-XL. Somehow, now we can no longer completely control whether our browsers automatically play video, but back in the day there was a browser option to disable automatic downloading of mere images, to save bandwidth and all.

      • (Score: 0) by Anonymous Coward on Monday May 11 2020, @09:48PM

        by Anonymous Coward on Monday May 11 2020, @09:48PM (#993095)

        PDFs are meant to be edited. They're based on PS which was also meant to be edited.

    • (Score: 0) by Anonymous Coward on Monday May 11 2020, @03:51AM

      by Anonymous Coward on Monday May 11 2020, @03:51AM (#992656)

      Once you're up and running systemd should be moot.

      Heretic! Stone him! Draw and quarter 'im! Crucify him! Burn his remains! Subject his followers and family to use Windows forever!

  • (Score: 0) by Anonymous Coward on Monday May 11 2020, @10:33PM

    by Anonymous Coward on Monday May 11 2020, @10:33PM (#993115)

    I don't use Ubuntu, but since it is based on Debian this might be available.

    Just install zram-tools, and reboot. The default config will use 20% of your ram as compressed swap before hitting your regular swap on disk (you still need swap on disk too). On low ram machines (512MB VPS for me), it is a large improvement. Increasing swappiness to 100 will also help, so there is some free ram for buffers when needed.

    tune settings in:
        /etc/sysfs.d/zswap.conf

    I even run it on machines with decent ram (but with %ram reduced) to reduce erase cycles to the ssd. And, on my netbook without aes-ni instruction, the compression / decompression is wayyyy faster than encryption/decryption to disk.