Off-and-on trying out an account over at @tal@oleo.cafe due to scraping bots bogging down lemmy.today to the point of near-unusability.

  • 33 Posts
  • 1.77K Comments
Joined 3 years ago
cake
Cake day: 4 October 2023

help-circle
  • tal@lemmy.todaytoSelfhosted@lemmy.worldWhy homelab?
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    19 hours ago

    The big concern with filesystems becoming corrupt is that all of the data can be lost on a filesystem. Most of the time, this doesn’t show up, but if you lose power at just the wrong time, it can happen. With FAT, HFS, ext2, and similar filesystems that were vulnerable to corruption on power loss, that was a real risk.

    So having some kind of power source to make an unclean shutdown unlikely avoids the risk of a really, really bad scenario.

    The general shift away from reliance on those filesystems has mitigated the really-bad-case that drove a lot of UPS use.

    Databases are probably the most-critical case where applications update a file on disk constantly, and where corruption would be bad. As long as they live on a filesystem that itself can’t become corrupt on power loss, they’re normally structured with a carefully-ordered series of writes and use of write barriers so that they cannot become corrupt.

    An individual file can be partially written out. Like, say I’m saving a file in Photoshop, and I have only written half of that file. What winds up on the disk is the first half of of a Photoshop file. That’s an invalid Photoshop file. For some applications, that can matter. Like, say (a) I chose to overwrite an old file and (b) the application doesn’t atomically store the new file (like, write it out, fsync(), and then rename the new file over the old) and © there’s no backup or other system in place.

    Or, even aside from partially writing out a file, I can entirely lose work that isn’t saved at all, if I’m not using a software package that makes use of some sort of autosave system. If I haven’t saved all day, then, well, all of that unsaved work is going to go away if there’s a power loss.

    That’s a much smaller potential data loss, but, sure…power loss can cause data loss, even if it doesn’t produce that “everything is lost” filesystem corruption.

    I’m not asserting that there’s no utility to a UPS; quite the contrary, as my comment was explaining to OP why there is use some people have for having NUT even if he personally doesn’t care much about it for his use case. I’m just pointing out that some of the major reasons for having a UPS+host-side-software combination that existed in, say, the 1990s aren’t really much of a thing in 2026. That was that you really did not want machines using filesystems normally used then to perform an unclean shutdown. Even with a UPS and host-side software like NUT, you can have data loss, as NUT cannot force all software to save unsaved data; there’s no standardized mechanism for forcing applications to save. If the PC is attended, you might get a warning and have a chance to manually save, but that’ll be the best that’ll happen, and if the PC is unattended, well, that save isn’t going to happen. But what NUT and similar software can do is to, when the UPS battery level gets low, trigger a clean shutdown. That ensures that the OS has time to perform a clean shutdown, and on filesystems that have a risk of filesystem corruption if the power is cut—FAT, HFS, ext2, and similar—a UPS with host-side software would avoid that case from arising.

    If someone wants to have a UPS in 2026 on filesystems that don’t have those limitations, that’s fine. They may want to have, say, a five minute window to save their work if they are at the PC when power loss occurs. It may help avoid problems that arise from software that cannot cleanly handle power loss—I that Steam can, if power loss occurs while it is updating itself, wind up in a broken state from which it cannot automatically recover when restarted, as I’ve done that myself.

    But generally, if you lose power on a system in 2026, you aren’t facing a “I might lose the contents of my hard drive” scenario.


  • tal@lemmy.todaytoSelfhosted@lemmy.worldWhy homelab?
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    20 hours ago

    ext4 is merely journaled, which means that there are rare instances where it can be corrupted, but recovery is fast.

    None of these things mean that the filesystem becomes corrupted; the filesystem will be in a filesystem consistent state when remounted. You can have a write that is partially performed on a file, but that does not cause the filesystem to become corrupt when it does not complete being written. The journal can contain that write, but it can not yet be committed, and won’t yet be visible to a user. But that doesn’t make the filesystem corrupt; the commit itself is atomic.



  • tal@lemmy.todaytoSelfhosted@lemmy.worldWhy homelab?
    link
    fedilink
    English
    arrow-up
    2
    ·
    23 hours ago

    Modern filesystems can corrupt as well with unclean shutdown. They are just less likely to do so.

    It shouldn’t be possible for them to become corrupt on an unclean shutdown, at all. Not at the filesystem level. It isn’t just a question of probability.

    It’s possible that there is some bug in the implementation of a filesystem that causes it to violate its guarantees.

    There could be, oh…hardware bugs, say, where hardware violates guarantees.

    Files can be partially-written. Software might not handle that, though properly-written software designed like a DBMS will be set up so that a partially-written file will not become corrupt at the file level.

    Some filesystems permit disabling features that guard against filesystem corruption.

    But absent something like that, it should not be possible for one of the filesystems to become corrupt on an unclean shutdown, at all.


  • Myself, I’d be more-inclined rather than less to take fixes from an LLM for spelling and grammar precisely because I’m reasonably confident that it’s easy to, at a glance, evaluate whether-or-not those fixes have, say, subtle security or correctness implications. Like, what I’m concerned about is more “has someone with an understanding of the code and the constraints on it considered how those constraints apply to it; an LLM won’t have a lot of relevant real-world knowledge on what needs to be done in this particular project”.

    Even prior to LLM use, there have been projects that have automatic spellcheck or similar things run as part of the linting process on gettext strings. That’s an automated check from a much simpler system.

    But setting that aside, it sounds like the fundamental issue is that recruiters are taking into consideration open-source contributions, and it’s easy to generate trivial open-source contributions like a spelling fix to get job-seeking credit.

    I’ve personally submitted patches for spelling or grammar fixes over the years, just because when I’m using a piece of software, it stands out, and it’s an trivial fix to do; I don’t need to come up to speed on the coding conventions of the project or whatever. It does seem undesirable for projects not to take those.

    considers

    Maybe the answer is that there should be different lists of contributors. Like, one for non-code, one for major contributions, or something like that.

    Or…maybe the problem will be resolved via technological mechanisms, if someone produces a system to analyze someone’s patches automatically for recruiters or other hiring people, so that there’s a less-crude mechanism than “did someone write a patch that got committed to a project at some point”.


  • tal@lemmy.todaytoSelfhosted@lemmy.worldWhy homelab?
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 day ago

    Well, they might want that save-data-and-clean-shutdown functionality. I mean, I don’t personally care all that much for my use case, but it’s a legit want. Like, say you have a USB flash drive plugged into your machine. Those normally ship formatted with exFAT, a Microsoft filesystem derived from the elderly FAT16 filesystem, and most people use them like that, as pretty much every OS out there can read FAT. FAT can become corrupt in the event of power loss. Or say you’ve been working on something in some application that doesn’t do auto-save and have a day of work accrued in the thing and then you get a power loss. Having a few minutes notice to clean up and shut down is legit important, same way that a laptop will issue low power warnings on a battery. This makes sure that you get that notification.

    I think that in general, the clean shutdown functionality isn’t as important these days as it was in the 1990s, as most machines are using journalled filesystems that don’t become corrupt on power loss these days. NTFS (Windows land), HFS+ (MacOS X), or ext4 or btrfs (Linux) for most of their storage. But, I mean, there are going to be people who want it. I don’t think that someone has to be wanting complexity for the sake of complexity for them to have a use case where that applies.

    EDIT: Looks like HFS+ actually got replaced with a newer FS a few years back as the default on MacOS.


  • tal@lemmy.todaytoSelfhosted@lemmy.worldWhy homelab?
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    1 day ago

    I was reading a homelab discussion about NUTs (Network UPS Tools) that left me scratching my head and wondering "…why? Is complexity for complexities sake part of homelabs? Isn’t this a huge overkill for one machine? Just…use a UPS? "

    So, you don’t need to run any software at all on a host on a UPS. You don’t need NUT or anything similar. You can just plug a PC into a UPS.

    However, traditionally, the purpose of a UPS isn’t “just power a machine through an extended outage”. It’s to provide enough time to cleanly shut down a machine. Save work, and—once upon a time, filesystems that weren’t cleanly unmounted could become corrupt—unmount filesystems.
    It can also provide time for something like a backup generator, if you have something like that up. The UPS may only have enough juice to run the PC for a few minutes. If you look at traditional UPS units, they have very limited amounts of time that they can keep a PC running. They aren’t aimed at the “whole house multi-day keep things running” capability that some lithium ion battery setups are these days.

    So traditionally, one would have software on a machine that takes some action, like shutting it down cleanly, when the battery gets low.

    If what you have a UPS for is to keep a PC running through momentary power interruptions, and you don’t care about, say, remotely monitoring power status, then, sure. NUT isn’t necessary. Same thing if you just want to provide a short amount of buffer time to let a generator that comes on automatically in an outage fire up.

    But if you want remote monitoring of power status or you want hosts to shut down cleanly, then it may be useful. For some people, that’s the reason that they have a UPS at all.


  • Enforcing isolation means that we try to reduce how much an application using the GPU can affect another, effectively disabling parallel execution from different contexts. This greatly limits the scope of what jobs are potentially affected when there is a crash or hang, so makes it less likely that a “guilty” context can crash others.

    There is a kernel parameter amdgpu.enforce_isolation which will additionally isolate different contexts that are running on different queues. This is currently disabled by default for performance reasons, you can enable it for better stability.

    Oh, cool. I had not seen that.





  • I have seen recommended the GL·INet Flint 2 GL-MT6000 https://openwrt.org/toh/gl.inet/gl-mt6000

    I’ve used a Flint 2 GL-MT6000. Works fine for me. If you want a high-spec new OpenWRT machine, it’s near the top end, from my skim. It may be overkill if you don’t intend to do anything elaborate.

    and is also failing a lot lately (it loses internet connection at least once a week and needs restarting).

    So, you’re still going to need to have a cable modem or DSL modem or whatever, if you have cable or DSL service, and it (or some other hardware, if you can get that working) going to be necessary for that bit. There are three pieces to this equation: a modem or whatever translates your satellite/long-range-wireless/cable/DSL/etc link to your ISP to Ethernet. A wireless access point, to provide WiFi. A router, to NAT connections, do things like setting up what traffic goes where, what’s blocked, etc. The Flint 2 will act as a wireless access point and as a router. But it doesn’t have a modem built in.

    You can turn off a lot of functionality on your ISP-provided router, but you’re going to keep it in the loop (with the Flint 2 plugged into it) unless you have the ability to use an alternative modem. It may be possible to replace it with a different modem, depending upon your particular situation; I believe that some ISPs may embed authentication information in the modem specifically to keep people from using alternatives.

    Thus, if the ISP-provided router keeps failing in that configuration, this isn’t going to fix your problem. You can reduce the functionality that the thing uses, like, maybe throw it into bridge mode (which just passes traffic through, doesn’t NAT anything) and let the Flint 2 act as a router. That’ll reduce what the ISP-provided router does, and if that’s triggering some bug on the thing, that might resolve your problem.

    If the existing router is honestly failing in some way—like, once it has problems, it never comes back without a reboot, isn’t just connectivity problems—you might request a replacement.

    If none of the above fixes your problem (i.e. the ISP-provided router, stays in the loop and keeps failing and only a reboot fixes things) a mitigation, albeit not a fix, would be to set something up on your network to ping the outside world and then power-cycle the router automatically if it fails for a certain amount of time.





  • There’s an infamous incident in the Battle of Leyte Gulf, near the end of World War II.

    https://en.wikipedia.org/wiki/The_world_wonders

    The world wonders" is a phrase which rose to notoriety following[a] its use during World War II when it appeared as part of a decoded message sent by Fleet Admiral Chester Nimitz, Commander in Chief, U.S. Pacific Fleet, to Admiral William Halsey Jr. at the height of the Battle of Leyte Gulf on October 25, 1944.[2] The words, intended to be without meaning, were added as security padding in an encrypted message to hinder Japanese attempts at cryptanalysis, but were mistakenly included in the decoded text given to Halsey. Halsey interpreted the phrase as a harsh and sarcastic rebuke, and as a consequence dropped his futile pursuit of a decoy Japanese carrier task force, and, belatedly, reversed some of his ships in a fruitless effort to aid United States forces in the Battle off Samar.[3]

    details

    When Nimitz, at CINCPAC headquarters in Hawaii, saw Kinkaid’s plea for help he sent a message to Halsey, simply asking for the current location of Task Force 34, which due to a previous misunderstanding, was unclear:[7]

    Where is, repeat, where is Task Force Thirty Four?

    With the addition of metadata including routing and classification information, as well as the padding at the head and tail, the entire plaintext message to be encoded and transmitted to Halsey was:

    TURKEY TROTS TO WATER GG FROM CINCPAC ACTION COM THIRD FLEET INFO COMINCH CTF SEVENTY-SEVEN X WHERE IS RPT WHERE IS TASK FORCE THIRTY FOUR RR THE WORLD WONDERS[9]

    U.S. Navy procedure called for the padding to be added to the start and end of the message, which were vulnerable to cryptanalysis due to the use of common phrases and words (such as “Yours sincerely”) in those sections.[10] The words chosen for padding should have been obviously irrelevant to the actual message, but Nimitz’s enciphering clerk used a phrase that “[just] popped into my head”.[11] Historians note similarity to Lord Tennyson’s poem “The Charge of the Light Brigade” about the eponymous battle, which was also fought on October 25[12] (of 1854), as the poem twice contains the phrase “All the world wonder’d”.

    While decrypting and transcribing the message, Halsey’s radio officer properly removed the leading phrase, but the trailing phrase looked appropriate and he seems to have thought it was intended and so left it in before passing it on to Halsey,[2] who read it as:

    Where is, repeat, where is Task Force Thirty Four? The world wonders.

    The structure tagging (the 'RR’s) should have made clear that the phrase was in fact padding. In all the ships and stations that received the message, only the decoder on Halsey’s flagship, USS New Jersey, failed to delete both padding phrases.[13]

    The message (and its trailing padding) became infamous, and created some ill feeling, since it appeared to be a harsh criticism by Nimitz of Halsey’s decision to pursue the decoy carriers and leave the landings uncovered. “I was stunned as if I had been struck in the face”, Halsey later recalled. “The paper rattled in my hands, I snatched off my cap, threw it on the deck, and shouted something I am ashamed to remember”, letting out an anguished sob.[14] Rear Admiral Robert Carney, Halsey’s chief of staff (who had argued strongly in favor of pursuing the carriers), witnessed Halsey’s emotional outburst and reportedly grabbed him by the shoulders and shook him, shouting, “Stop it! What the hell’s the matter with you? Pull yourself together!” In Halsey’s recollection, he called it an “infernally plausible” message, saying “I was so mad I couldn’t talk. It was utterly impossible for me to believe that Chester Nimitz had sent me such an insult. He hadn’t, of course, but I didn’t know the truth for several weeks.”[15] Recognizing his failure, Halsey ordered his fleet south, however the chase north had exhausted the fuel of his light escorts and more time was wasted refueling while Taffy 3 (Task Unit 77.4.3, commanded by Rear Admiral Clifton Sprague) was fighting for its life. Halsey returned to Samar with his two fastest battleships, three light cruisers and eight destroyers, but he arrived too late to have any impact on the battle.[16]




  • Honestly, the real problem is that ragebait works. Like, if that’s what people decide to engage with on social media, then that’s what’s going to show up, whether it’s skimmed highly-scoring Reddit content or not.

    You could try to produce “no-ragebait” communities.

    You could try to introduce a recommendation algorithm that uses heuristics to try to identify ragebait and let users who don’t want it filter it out or simply recommend based on their voting.