820
No Mercy (files.catbox.moe)
submitted 1 week ago by [email protected] to c/[email protected]
top 50 comments
sorted by: hot top controversial new old
[-] [email protected] 298 points 1 week ago

Fake news.

Both Windows and Linux have their respective SIGTERM and SIGKILL equivalents. And both usually try SIGTERM before resorting to SIGKILL. That's what systemd's dreaded "a stop job is running" is. It waits a minute or so for the SIGTERM to be honoured before SIGKILLing the offending process.

[-] [email protected] 41 points 1 week ago

Also fake because zombie processes.

I once spent several angry hours researching zombie processes in a quest to kill them by any means necessary. Ended up rebooting, which was a sort of baby-with-the bath-water solution.

Zombie processes still infuriate me. While I'm not a Rust developer, nor do I particularly care about the language, I'm eagerly watching Redox OS, as it looks like the micro kernel OS with the best chance to make to it useful desktop status. A good micro kernel would address so so many of the worst aspects of Linux.

[-] [email protected] 79 points 1 week ago* (last edited 1 week ago)

Zombie processes are already dead. They aren't executing, the kernel is just keeping a reference to them so their parent process can check their return code (waitpid).

All processes becomes zombies briefly after they exit, just usually their parents wait on them correctly. If their parents exit without waiting on the child, then the child gets reparented to init, which will wait on it. If the parent stays alive, but doesn't wait on the child, then it will remain zombied until the parent exits and triggers the reparenting.

Its not really Linux's fault if processes don't clean up their children correctly, and I'm 99% sure you can zombie a child on redox given its a POSIX OS.

Edit: https://gist.github.com/cameroncros/8ae3def101efc08be2cd69846d9dcc81 - Rust program to generate orphans.

load more comments (2 replies)
[-] [email protected] 24 points 1 week ago

Zombie processes are hilarious. They are the unkillable package delivery person of the Linux system. They have some data that must be delivered before they can die. Before they are allowed to die.

Sometimes just listening to them is all they want. (Strace or redirect their output anywhere.)

Sometimes, the whole village has to burn. (Reboot)

[-] [email protected] 15 points 1 week ago* (last edited 1 week ago)

Performance is the major flaw with microkernels that have prevented the half-dozen or more serious attempts at this to succeed.

Incurring context switching for low-level operations is just too slow.

An alternative might be a safe/provable language for kernel and drivers where the compiler can guarantee properties of kernel modules instead of requiring hardware guarantees, and it ends up in one address space/protection boundary. But then the compiler (and its output) becomes a trusted component.

load more comments (6 replies)
load more comments (31 replies)
[-] [email protected] 35 points 1 week ago

Clicking end task in windows task manager has definitely let the hanging task live in its non-responsive state for multiple hours before.

[-] [email protected] 15 points 1 week ago

Been a while since I've been on Windows but I distinctly remember some button to kill a task without waiting. Maybe they removed it to make Windows soooo much more user friendly.

[-] [email protected] 19 points 1 week ago

Off the top of my head: right click the task and hit end process. That has literally never failed me. Back in windows XP it might sometimes not actually kill the process but then there was always the "kill process tree" button to fall back on.

load more comments (2 replies)
load more comments (1 replies)
load more comments (1 replies)
[-] [email protected] 11 points 1 week ago

That’s what systemd’s dreaded “a stop job is running” is

The worst part of that is that you can't quickly login to check what it is (so maybe you can prevent it in the future?), or kill it anyway because it's likely to be something stupid and unimportant. And if it actually was important, well... it's gonna be shot in the head in a minute anyway, and there's nothing you can do to prevent it, so what's the point of delaying?

[-] [email protected] 21 points 1 week ago

so what's the point of delaying?

In the best case the offending process actually does shut down cleanly before the time is up. Like, some databases like redis keep written data in memory for fast access before actually writing the data to disc. If you were to kill such a process before all the data is written you'd lose it.

So, admins of servers like these might even opt to increase the timeout, depending on their configuration and disc speed.

[-] [email protected] 12 points 1 week ago* (last edited 1 week ago)

I know what it theoretically is for, I still think it's a bad implementation.

  1. It often doesn't tell you clearly what it is waiting for.
  2. It doesn't allow you to checkout what's going on with the process that isn't responding, because logins are already disabled
  3. It doesn't allow you to cancel the wait and terminate the process anyway. 9/10 when I get it, it has been because of something stupid like a stale NFS mount or a bug in a unit file.
  4. If it is actually something important, like your Redis example, it doesn't allow you to cancel the shutdown, or to give it more time. Who's to say that your Redis instance will be able to persist its state to disk within 90 seconds, or any arbitrary time?

Finally, I think that well written applications should be resilient to being terminated unexpectedly. If, like in your Redis example, you put data in memory without it being backed by persistent storage, you should expect to lose it. After all, power outages and crashes do happen as well.

load more comments (4 replies)
[-] [email protected] 173 points 1 week ago

SIGTERM is the graceful way tho? It nicely asks programs to please close and cleanup. Unlike SIGKILL, which bombs the shop and creates orphans.

[-] [email protected] 37 points 1 week ago

And we give steam a fewilliseconds to comply, so IDK what they're complaing about...

[-] [email protected] 53 points 1 week ago

Please end your process. You have ten milliseconds to comply.

[-] [email protected] 14 points 1 week ago* (last edited 1 week ago)

Please do not resist.

load more comments (2 replies)
[-] [email protected] 17 points 1 week ago

Yup. And you can kill processes in Windows to in the task manager. Or probably with a Powershell command too, but nobody's gonna learn Powershell LOL.

There's nearly always equivalent functions in both Linux and Windows, just in Windows you gotta click around in more bullshit forms and shit to find stuff. Or learn Powershell, but again, LOL. They are both OSes after all, they do similar things. Just one might do them better than the other.

load more comments (23 replies)
[-] [email protected] 72 points 1 week ago

Almost every time I restart my Windows PC from an update, it sits on the "closing apps screen" or "restarting" screen then gives up completely and I have to force it to shut down/restart

And, just about every other time I restart with an update, it closes apps and then just fully shuts down after the update!

It's super graceful! 😭

[-] [email protected] 26 points 1 week ago* (last edited 1 week ago)

EVERY TIME!!

"A program is preventing Windows from shutting down"

The program : A generic non-descript white box icon with no title.

Clicking shutdown/restart anyway becomes standard procedure at this point.

load more comments (2 replies)
load more comments (11 replies)
[-] [email protected] 63 points 1 week ago

Windows' might be complex, but it is NOT graceful. If you have notepad open with unsaved text, then shutdown will never shut down - but nothing on the screen will make this obvious to a non-technical person.

[-] [email protected] 31 points 1 week ago

Unless there are security updates to install, then everything will be mercilessly killed

load more comments (1 replies)
load more comments (2 replies)
[-] [email protected] 52 points 1 week ago* (last edited 1 week ago)

SIGTERM is a graceful request to the application to terminate itself and despite their names kill and killall default to SIGTERM (also useful to send other signals to processes, like START, STOP and NOHUP).

kill -9 though...

[-] [email protected] 28 points 1 week ago

"You should terminate yourself, NOW!"

load more comments (2 replies)
[-] [email protected] 34 points 1 week ago

Linux actually also has a graceful shutdown process. It tells apps its shutting down by sending SIGTERM, and its up to each process to flush data asap, do whatever they gotta do, and then shut down.

If they don't listen then linux will indeed pull out the ~~baseball bat~~ ~~chainsaw~~ katana and make processes die whether they want to or not.

load more comments (3 replies)
[-] [email protected] 28 points 1 week ago* (last edited 1 week ago)

The number of times I have had the Windows shutdown process tell me “please close <some windows process that I never opened> before shutting down” is fucking annoying. Wipe your own ass, Windows.

[-] [email protected] 14 points 1 week ago

Bonus points if that exact dialogue is the cause. Had that happen more than once. No idea how

load more comments (1 replies)
[-] [email protected] 20 points 1 week ago

The image fails to load for me.

[-] [email protected] 23 points 1 week ago

pkill -9 firefox

load more comments (1 replies)
[-] [email protected] 19 points 1 week ago

EarlyOOM is your friend. Tweak it to save the most important stuff and kill irrelevant stuff first when low on memory.

load more comments (5 replies)
[-] [email protected] 19 points 1 week ago

Every computer should have a hard cutoff power switch, when thrown it cuts all physical electricity.

Off means off.

The current trend of soft power buttons, parasitic loads to service impi, or management engines wol, etc is just bad practice and removes agency from the user.

Who hasn't wanted to turn off a laptop to put it in a bag only for the shutdown to trigger an update that takes 10m whole your running late, so the laptop overheats. Or worse, the laptop turns on while in the bag!

The fact windows has a poor ability to apply updates live or In a a/b fashion is no excuse for soft poweroff buttons. Sure it's nice to flush file system write through caches, but Ive been burned by fake power off far more then incomplete file writes.

load more comments (9 replies)
[-] [email protected] 17 points 1 week ago

Meanwhile Windows regularly gets hung up for several minutes on the "shutting down..." screen for no fucking reason. Only happens when I'm in a hurry too.

load more comments (3 replies)
[-] [email protected] 17 points 1 week ago

Firefox is becoming the villain.

[-] [email protected] 14 points 1 week ago

Meanwhile I click that "shut down anyway" button immediately. Fuck you Outlook.

[-] [email protected] 14 points 1 week ago

In windows open command prompt type

shutdown /f /s /t 0

[-] [email protected] 16 points 1 week ago* (last edited 1 week ago)

Translation:
"Shutdown. Fucking shutdown, trash!"

[-] [email protected] 11 points 1 week ago

Better yet, put this in a batch file set to run at start up. On your friends PC of course

[-] [email protected] 13 points 1 week ago

echo b > /proc/sysrq-trigger

load more comments (2 replies)
load more comments
view more: next ›
this post was submitted on 07 Jul 2024
820 points (92.8% liked)

linuxmemes

19849 readers
913 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS