WTF Bites


  • 🚽 Regular

    @blakeyrat said in WTF Bites:

    But what if it's a custom proprietary format?

    What if it's a custom proprietary format, but now you've updated the whole system instead of just the library?

    I don't get your point.



  • @boomzilla Well I'd assume the library would send a struct without pointers in it. That'd be really demented.


  • Banned

    @cvi the difference between a phone and a computer is that a phone never runs long running tasks that cannot be interrupted without significant loss of data/time. So what works for phone doesn't always work for computers. I've lost count of how many times I was reading some article on the web and was suddenly dropped to home screen because the browser started updating. If this happened to my games - or heavens forbid, my IDE - I'd be seriously pissed, but on mobile it's just mild annoyance.


  • Considered Harmful

    @blakeyrat said in WTF Bites:

    Well I might use the library to generate a PNG file, then unload it, then load it again when an hour later I need to display that PNG file.

    Now obviously that's stupid because PNG is a standard format.

    But what if it's a custom proprietary format? It seems like a perfectly reasonable thing to do to me at least.

    Either the updated library can still deal with the previous version's data it handed out (and writing to user-supplied buffers that users are allowed to pass back in counts as "handing out"), then there is no problem, or it can't, then it must be marked as incompatible (usually by bumping the major version) and will not simply overwrite the previous version but get installed alongside it, so there is no problem.


  • Banned

    @anotherusername said in WTF Bites:

    @Gąska said in WTF Bites:

    Another scenario when shit can blow up: when two independent programs use a single library to communicate with each other. If they don't use the exact same version of the file, things can blow up very easily even if all the changes are to this single DLL's internals. And without locking the DLL file when in use, you have no guarantee they're the exact same version.

    Both programs would be forced to close so that the DLL file could be updated.

    Which, as Blakey already mentioned, is functionally equivalent to rebooting.



  • @Gąska said in WTF Bites:

    Which, as Blakey already mentioned, is functionally equivalent to rebooting.

    :wtf:

    No, it's not



  • @Gąska I've never actually experienced that. Mainly because I have my phone set to only update when on AC power and connected to wifi, and that mostly happens at night or when I'm on my computer.


  • Banned

    @TimeBandit said in WTF Bites:

    @Gąska said in WTF Bites:

    Which, as Blakey already mentioned, is functionally equivalent to rebooting.

    :wtf:

    No, it's not

    Depends on how many programs that DON'T need restarting are also running. For system updates, it's usually 0.



  • @Gąska said in WTF Bites:

    For system updates, it's usually 0.

    In your world, every program uses every library ❓


  • Banned

    @TimeBandit in my world, every program uses the OS. So if OS (or something similarly big) needs update, then you have to shut everything down.



  • @Gąska said in WTF Bites:

    in my world, every program uses the OS. So if OS (or something similarly big) needs update, then you have to shut everything down.

    :rolleyes:

    No, you do not.

    You don't have any idea what an OS does, do you?


  • ♿ (Parody)

    @Gąska said in WTF Bites:

    @TimeBandit in my world, every program uses the OS. So if OS (or something similarly big) needs update, then you have to shut everything down.

    When I get kernel or libc (or a handful of others) updates I'm told that I need to restart. I usually hold off on those until the end or beginning of the day when it's more convenient to restart.


  • Banned

    @TimeBandit I know people use many different definitions of OS and switch between them on the fly whenever they feel like it. Which definition are you using right now?





  • Before delving into complex solutions involving background updates and mixing different versions, how about a simple one?

    The official reason for "you need to update right NOW!" is because of botnets, right?

    So, when the timeout expires, don't reboot the machine forcefully. Just disable all network connections until the next restart, and display a clearly visible message stating so. That way, you don't lose any unsaved work. Sure, losing network connectivity may cause some problems, but:

    1. it's a condition software should be able to handle anyways
    2. it's still a lot better than force-rebooting the machine.


  • I thought we were talking about oxygen sulfide. Oops.


  • Banned

    @TimeBandit so let's roll with it.

    An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.

    Imagine an update to how resources are managed, or how the provided common services work. How many programs can be safely left running during the update, and will still be working 100% correctly when it's done?



  • @mott555: some OS stink, too. So it's not that different.

    (yes, I know it's hydrogen sulfide. Chemistry is a :barrier:, etc.)


  • kills Dumbledore

    @TimeBandit said in WTF Bites:

    @Gąska said in WTF Bites:

    For system updates, it's usually 0.

    In your world, every program uses every library ❓

    In your world a system update only changes one library ❓



  • @Gąska said in WTF Bites:

    Imagine an update to how resources are managed, or how the provided common services work.

    Why would your program care how memory is allocated?
    You ask for a memory block, you get one. What happen in the back is irrelevant.

    If you ask to read a file, you get it. You don't care if it's sitting on spinning-rust on an NTFS partition or if it's mounted using ISCSI and formatted FAT32.

    How many programs can be safely left running during the update, and will still be working 100% correctly when it's done?

    All of them 🤷🏻♂

    I upgraded from Debian 8 to 9 while working on my computer. I have no clue how much time it took since it was doing it in the background. Before I left for home, I told it to reboot.

    Do you know how many program broke while the update was going?

    ZERO



  • @Jaloopa said in WTF Bites:

    In your world a system update only changes one library

    Depends.

    Even if I update a couple libraries, I don't need to stop my work, close everything and reboot the damned thing :rolleyes:



  • @Gąska said in WTF Bites:

    @TimeBandit said in WTF Bites:

    @Gąska said in WTF Bites:

    Which, as Blakey already mentioned, is functionally equivalent to rebooting.

    :wtf:

    No, it's not

    Depends on how many programs that DON'T need restarting are also running. For system updates, it's usually 0.

    It's easier for mobile devices since apps are virtually guaranteed to be forced to quit the moment you switch away from them.



  • @TimeBandit said in WTF Bites:

    Do you know how many program broke while the update was going?

    And after? :trollface:


  • kills Dumbledore

    @TimeBandit said in WTF Bites:

    Before I left for home, I told it to reboot.

    So, an OS update required a reboot?



  • :wtf: Chrome
    0_1535046747515_f84b3407-c539-48e1-8e31-129081ada954-image.png

    Are they using version A of some library or what



  • @Gąska said in WTF Bites:

    @TimeBandit so let's roll with it.

    An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.

    Imagine an update to how resources are managed, or how the provided common services work. How many programs can be safely left running during the update, and will still be working 100% correctly when it's done?

    Every time I've upgraded a phone's OS, it had to completely reboot. But it can still do a lot of updating (including system apps like WebView) without rebooting the whole device.

    That said, if it's designed well, even if a reboot is required it can write out separate copies of all the modified files without affecting the running system, and then when it restarts it simply deletes the old files and renames the new ones.

    Of course, anyone who's waited for Windows to apply 36,237 registry updates already knows why that wouldn't work for Windows. After all, I did say, "if it's designed well".



  • @Jaloopa said in WTF Bites:

    So, an OS update required a reboot?

    Major version upgrade, yes.

    When you change the kernel, you need to reboot.

    Not when you just upgrade some libraries 🙄


  • Banned

    @TimeBandit said in WTF Bites:

    @Gąska said in WTF Bites:

    Imagine an update to how resources are managed, or how the provided common services work.

    Why would your program care how memory is allocated?
    You ask for a memory block, you get one. What happen in the back is irrelevant.

    If you ask to read a file, you get it. You don't care if it's sitting on spinning-rust on an NTFS partition or if it's mounted using ISCSI and formatted FAT32.

    Because memory and files are the only kind of resource. Nothing else. No sockets, no security descriptors, no synchronization primitives. Nothing at all. It's all just memory and files. And nothing will ever change in how memory and files are accessed, neither in API nor ABI, and especially not in internal ABI between OS components.

    How many programs can be safely left running during the update, and will still be working 100% correctly when it's done?

    All of them 🤷🏻♂

    I upgraded from Debian 8 to 9 while working on my computer. I have no clue how much time it took since it was doing it in the background. Before I left for home, I told it to reboot.

    Shame. I'd love to see how it fares after a few days, when you closed and reopened several big programs but left others running. Are you absolutely sure the system files writes weren't delayed until reboot?



  • @Gąska said in WTF Bites:

    Are you absolutely sure the system files writes weren't delayed until reboot?

    It probably did exactly what I said, which is make a full clone of the system (the parts that needed to upgrade, anyway), upgrade that, and do a delete/rename when it rebooted.


  • Banned

    @anotherusername said in WTF Bites:

    @Gąska said in WTF Bites:

    @TimeBandit so let's roll with it.

    An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.

    Imagine an update to how resources are managed, or how the provided common services work. How many programs can be safely left running during the update, and will still be working 100% correctly when it's done?

    Every time I've upgraded a phone's OS, it had to completely reboot. But it can still do a lot of updating (including system apps like WebView) without rebooting the whole device.

    Because Android apps are self-contained packages with no external dependencies except for system API, and all communication between different programs and services are done through the abstract messaging protocol, completely avoiding the problems of dynamic linking - in particular, the problem of ABI incompatibility.



  • @TimeBandit said in WTF Bites:

    When you change the kernel, you need to reboot.

    As usual: don't touch anything oracle, it's ruined.
    Ubuntu has their own lookalike thing.



  • @Gąska said in WTF Bites:

    Android apps are self-contained packages with no external dependencies except for system API

    You mean like Android System WebView?

    I've had to update that a few times. It didn't require a reboot.

    I also installed 7Zipper, which is on the Play Store and doesn't require anything special like rooting the device. It can do stuff like scan your device for media and update the system media libraries so that they show up in your media apps, which I ended up having to do after I downloaded some MP3 files (I used Google Drive to transfer them because I didn't have a cable to connect it to my computer at the time). The Play Music app refused to automatically find them in the downloads folder (also, the "move media to SD card" option in Settings refused to acknowledge them or move them). After running the media scan in the 7Zipper app, they magically showed up in the Play Music app. And I was even able to move the .mp3s themselves into the actual music folder on the SD card, so that they weren't in downloads (and taking up room on the phone's internal memory). (Which was fun, because they still showed up in downloads until I told the Downloads app to delete them, which didn't actually delete them since they weren't there anymore.)



  • @Gąska said in WTF Bites:

    Shame. I'd love to see how it fares after a few days, when you closed and reopened several big programs but left others running.

    I do that all the time and nothing breaks.

    Are you absolutely sure the system files writes weren't delayed until reboot?

    :wtf: What kind of fucked up file-system would do that?


  • ♿ (Parody)

    @Jaloopa said in WTF Bites:

    @TimeBandit said in WTF Bites:

    Before I left for home, I told it to reboot.

    So, an OS update required a reboot?

    And the nice thing about was that (assuming it was like my experiences) the updates were all done by that time and it booted into the OS like any other boot sequence.



  • @boomzilla said in WTF Bites:

    And the nice thing about was that (assuming it was like my experiences) the updates were all done by that time and it booted into the OS like any other boot sequence.

    That's impossible ❗



  • TL;DR: During a massive fire, Verizon starts throttling the fire department's unlimited data connection to 0.5% of its normal speed, which makes their job significantly more difficult. When contacted, Verizon refuses to lift the throttling unless they switch to a plan costing twice as much.

    (American phone companies must be running a perpetual competition to see which one can have the worst customer service and PR ; I can't find any other explanation.)


  • Considered Harmful

    @Zerosquare Verizon also has the best coverage. 🤷


  • ♿ (Parody)

    @Zerosquare also discussed here (warning 🚎):

    https://what.thedailywtf.com/post/1401540


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    Noteable exception being some WU processes running amok and impacting performance system wide. But that just shouldn't be a thing.

    I've never quite understood why the process of determining if there are updates to be applied should be so expensive, especially on Windows. The equivalent operations on other OSs are enormously faster, so why does the machine require so much effort to figure things out on Win…? (Is it searching for files behind the scenes? That's another “stupidly expensive on Windows” thing…)

    The cost of actually applying them is something else, with most of the weird delays probably being stuff like making a shadow copy of a whole mass of files. Or something like that. It's a bad UX, but I can sort of see what it is trying to do.


  • Discourse touched me in a no-no place

    @LaoC said in WTF Bites:

    If either API or ABI changes, it requires at least recompilation if not source-level changes of all applications

    No.

    Or at least not necessarily. There are ways to evolve APIs and ABIs that do not require recompilation when the library implementation is updated. For example, adding a new function to an API should not require code to be recompiled to use the software (unless it changes to use that new function, of course, since that wasn't possible before). Similarly, if all non-opaque data structures in an ABI are the same and all functions exposed in it are bound to the same semantics before and after (other than in strictly extensive locations), there's no need to recompile if the ABI updates. I have delivered software that used these key factors to allow code to safely follow extremely long update cycles. It requires discipline to do, but it is quite good from the perspective of downstream consumers of the software.

    A lot of software isn't delivered like that, but then a lot of software developers are assholes.


  • Discourse touched me in a no-no place

    0_1535058751189_1020584a-7957-4e79-b7da-643c50a40a2e-image.png

    So I can collect tomorrow from a store NaN miles away which is never open? Excellent.


  • Discourse touched me in a no-no place

    @boomzilla said in WTF Bites:

    Hmm....would you get two versions of the library in the process or would it just reuse the already linked version in that case?

    It shouldn't matter because the library that does the communication should use a defined communication protocol, instead of just vomiting some random internal data structure over whatever communication channel is in use.


  • BINNED

    @dkf That sounds like it didn't require recompilation because you made sure the ABI didn't change.


  • ♿ (Parody)

    @dkf said in WTF Bites:

    @boomzilla said in WTF Bites:

    Hmm....would you get two versions of the library in the process or would it just reuse the already linked version in that case?

    It shouldn't matter because the library that does the communication should use a defined communication protocol, instead of just vomiting some random internal data structure over whatever communication channel is in use.

    But remember, this is all within a single process. We're not talking about multiple processes talking to each other. Maybe the library implements a message queue or something similar. But the main process and the other library are both looking at different queues that each's version of the library allocated.


  • Discourse touched me in a no-no place

    @topspin No, the trick is to make the ABI changes extensive (in a technical sense), so that previously existing functionality continues to exist in exactly the way that code was using it before. It's even possible to do this through API updates that are not extensive, but that depends on the exact details of how the API/ABI binding works. There are a number of extremely tricky bits in that messy intermediate space, but they're not insurmountable for at least a significant fraction of the types of updates that can happen.

    Of course, not everything can be hidden. For example, a change to memory allocation semantics is very difficult to conceal; attempts to do so almost invariably produce either awful memory leaks or catastrophic crashes… or a “delightful” mix of both.


  • Discourse touched me in a no-no place

    @boomzilla said in WTF Bites:

    But remember, this is all within a single process. We're not talking about multiple processes talking to each other. Maybe the library implements a message queue or something similar. But the main process and the other library are both looking at different queues that each's version of the library allocated.

    On platforms that use dlopen(), you typically can't open the same library twice even if the library on disk has changed. Unless you pass in the “always open this anew” flag (RTLD_LOCAL), but then you're not going to share resources successfully anyway.



  • 0_1535061272627_058cf7b7-ef98-493e-b92e-4612a91160ff-image.png

    Zero commands were executed in other shells between these commands.


  • ♿ (Parody)

    @dkf said in WTF Bites:

    @boomzilla said in WTF Bites:

    But remember, this is all within a single process. We're not talking about multiple processes talking to each other. Maybe the library implements a message queue or something similar. But the main process and the other library are both looking at different queues that each's version of the library allocated.

    On platforms that use dlopen(), you typically can't open the same library twice even if the library on disk has changed. Unless you pass in the “always open this anew” flag (RTLD_LOCAL), but then you're not going to share resources successfully anyway.

    OK, so that probably answers my previous question and this junk about closing and reopening is moot.



  • @boomzilla said in WTF Bites:

    I can certainly imagine people not understanding all the Bad Ideas involved in that.

    The more Bad Ideas involved, the more likely it is that some idiot will implement it.



  • I have found the smallest Go program that fails to compile. It has an empty main function and no other executable code.


Log in to reply