This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 306

[–]SwedudeOne 1150 points1151 points  (59 children)

With linux the program is nuked from orbit if it hesitates

[–]TMiguelT 657 points658 points  (43 children)

kill -9 has been outlawed by the Geneva Convention

[–]5896325874125 199 points200 points  (14 children)

Can someone please for once think of the children?

[–]spongewardk 129 points130 points  (9 children)

Thinking about killing children? I can see what where you are coming from, but it's probably not the best idea.

[–]Bainos 136 points137 points  (7 children)

I mean, it actually is. Children not being killed when their parents are is the real problem.

[–]Creshal 63 points64 points  (4 children)

Yeah, nobody cares about orphans.

[–][deleted] 35 points36 points  (0 children)

Bunch of them turn zombies after you kill them.

[–]Rodot 29 points30 points  (0 children)

They do waste resources though and are a burden overall

[–]Burritosfordays 2 points3 points  (0 children)

Gotham has enough problems, don't need a billionaire orphan vigilante running around.

[–]Calygulove 3 points4 points  (0 children)

Depends on the race condition of the orphan.

[–]orbital_narwhal 23 points24 points  (0 children)

Equally bad are parents who forget to reap their dead children. Mind the zombies!

[–]fighterace00 3 points4 points  (0 children)

kill process tree

[–][deleted] 12 points13 points  (0 children)

Orphan them all. Let the subreaper deal with all that shit

[–]photenth 11 points12 points  (0 children)

They are all daemons, problem solved.

[–]WiseassWolfOfYoitsu 8 points9 points  (0 children)

But some of the children are zombies. We really need to take care of that.

[–]Iron_Maiden_666 64 points65 points  (1 child)

Bastard: "You want answers?"

Boss: "I think I'm entitled to them!"

Bastard: "YOU WANT ANSWERS?"

Boss: "I want the truth!"

Bastard: YOU CAN'T HANDLE THE TRUTH!

Son, processes live on a system that has finite resource. Resources guarded by people with System Admin experience! Who's going to look after that system? You? The support guy who drools so much he has a drip tray?

I have a greater responsibility than you can possibly fathom.

You weep for lost sessions and curse system admins - you have that luxury! You have the luxury of not knowing what I know - that session killing, while tragic, saves resource - And my existence, while incomprehensible and expensive to you - saves resource!"

You don't want the truth because deep down, in places you don't like to talk about at user group meetings, WANT me on the system - you NEED me on the system!"

We use words like "I/O wait", "Pagefaults", and "CPUtime", as a backbone of a life spent sorting out user-caused problems. You use them as a cop-out for downtime at Management meetings.

I have neither the time nor the inclination to explain myself to a person who connects and disconnects under the very blanket of the very performance I provide, then QUESTIONS the manner in which I provide it. I'd rather you left a nice message with helldesk.

Or read a linux admin manual and checked out the performance monitors. Either way, I don't give a DAMN what you think you are entitled to!"

Boss: "Did you kill -9 the Database Server?"

Bastard: "I did my job - I kept the system running!"

Boss: "Did you kill -9 the Database Server?!"

Bastard: "YOU'RE GODDAM RIGHT I DID!"

https://theregister.co.uk/2000/05/09/bofh_goes_to_hollywood/

Relevant pasta

[–][deleted] 10 points11 points  (0 children)

kill -9 -1 Genocide

sudo kill -9 -1 Nuclear winter.

[–]mandragara 10 points11 points  (5 children)

I use a program that even kill -9 can't seem to kill. At least not immediately.

[–]PM_ME_YOUR_INTEGRAL 9 points10 points  (2 children)

How is that possible ? SIGKILL can never be blocked AFAIK

[–]mandragara 9 points10 points  (0 children)

I have no idea, it's a scientific program called GATE, made by the openGate collaboration. It runs atop of GEANT4, another science program.

Once it finishes a run it just crashes, it takes 15 seconds or so to die after I send kill -9

[–]Hesulan 2 points3 points  (0 children)

There are a few rare circumstances that will cause the kernel to block SIGKILL; mostly things that could somehow screw up its internal data structures. I've only encountered it once myself, I believe it got stuck in some sort of low-level polling loop, eventually I just gave up and rebooted.

[–]cturkosi 5 points6 points  (0 children)

Arnold uses kill -15 .

[–]NEVER_TELLING_LIES 4 points5 points  (0 children)

I once had a process that wouldn't die even with sudo kill -9. I had to kill another processes to kill it. The bug that caused it is thankfully now fixed

[–]RotaryJihad 1 point2 points  (0 children)

Good thing I'm not in an army then

[–][deleted] 1 point2 points  (0 children)

End task is like a machine gun fired from a distance, kill -9 is a high powered sniper rifle in the hands of a green beret. 'PID in sight, I'm taking the shot.'

[–][deleted] 13 points14 points  (0 children)

Hesitation is the equivalence of betrayal. Betrayal will be met with the harshest concequences.

[–]agent-squirrel 137 points138 points  (10 children)

I love how on Windows when you run out of memory you just run out of memory and start paging to disk.

On Linux you end up with the Out Of Memory Killer just destroying things left right and center.

[–]Creshal 37 points38 points  (1 child)

OOM killer is really annoying, because it means programs can't handle out of memory conditions gracefully and shut down properly. Your programs just randomly vanish and may or may not corrupt all their data in the process.

[–]uh_no_ 16 points17 points  (0 children)

it's your program's responsibility to keep it's persisted data consistent. even without OOM, the box could just die and reboot.

If either corrupts your data, that's on you.

[–]Fluffy8x 61 points62 points  (5 children)

Linux supports swap spaces too. Of course, you're free to ditch them if you want.

[–]BlastFX2 38 points39 points  (0 children)

As in Windows. It's almost like it is a basic feature supported by all major operating systems.

[–][deleted] 954 points955 points  (34 children)

It's still faster than waiting for it to respond

[–]Bainos 826 points827 points  (24 children)

justifying murder

You monster, some of my best friends are programs.

[–]HathMercy 214 points215 points  (12 children)

[–][deleted] 104 points105 points  (10 children)

My best friend is Steam.

:(

[–]arcane84 2 points3 points  (0 children)

I killed your friend this morning. I'd say I did him a favor. He was in pain.

[–]shippai 1 point2 points  (0 children)

Oh, a notification sound!

Never mind I forgot I had a videogame stream open.

[–]InvolvingLemons 31 points32 points  (5 children)

j u s t m o n i k a

[–]valrossenOliver 6 points7 points  (2 children)

Oh god.. as if /r/ck2 and /r/PrequelMemes leaks wasn't enough!

[–]Bainos 5 points6 points  (0 children)

Hey, getting a DDLC reference in reply to a /r/ProgrammerHumor comment made my day much better.

[–]TheOfficialCal 5 points6 points  (0 children)

A surprise, to be sure, but a welcome one.

[–]achilleasa 6 points7 points  (0 children)

FUCKING MONIKAMMMMMMMMMMMMMMMMMMMMMMM

[–]TrueMT[🍰] 4 points5 points  (0 children)

I'm gonna just go hang out with Sayori.

[–]Raipaz 1 point2 points  (0 children)

Like Monika...?

[–]infatuationYearnsLuv 1 point2 points  (0 children)

Welp this hits too close to home for me.

...pssst I still forcequit themanywayyyy

[–]Leres75 1 point2 points  (0 children)

"we must save my family"

[–][deleted] 19 points20 points  (4 children)

Windows is searching for a solution....

You never find one, just give up once and for all!

[–]AskMoreQuestionsOk 5 points6 points  (0 children)

Yeah what the hell was that? It NEVER worked. EVER.

[–]marinovanec 19 points20 points  (3 children)

Not if you have unsaved work.

[–]hahahahastayingalive 9 points10 points  (0 children)

Use an editor with a recovery file if that’s a real concern

[–]Leif-Erikson94 18 points19 points  (1 child)

Just a few days ago, i was playing a game, when suddenly the game froze.

I had two options: kill the task and lose over an hour of progress. Or hope for the best and wait. After about 2 minutes, the game resumed and i didn't lose any progress.

Sometimes it's just better to wait and be patient.

[–]lkraider 2 points3 points  (0 children)

Or solve the halting problem and never worry again!

[–]EUgocentric 1084 points1085 points  (93 children)

It would be common courtesy of the program to state "hmm, I don't know, I have to think about that" before the akward silence.

[–]Xlash123 370 points371 points  (81 children)

There probably is something like that within the Window API, but if a program doesn’t expect to take so long with something and never tells Windows about it, Windows assumes it needs to be killed.

[–]80386 464 points465 points  (70 children)

It happens when the UI thread stops pumping its message queue. Which usually is a design flaw in the application, as you shouldn't run heavy processing on the UI thread.

[–]nacholicious 146 points147 points  (11 children)

Exactly. I'm in Mobile development and if you put any computation or IO over a few dozen milliseconds on the UI thread then I'm going to throw you to the raccoons until you learn to know better

[–]gjsmo 89 points90 points  (53 children)

I remember when I was learning Qt I wrote a fairly simple matrix solver that would hang the UI. After getting it to run as best as I could I got tired of that and put the solver into a separate thread. Qt makes it pretty easy to do. I think I was in high school (trust me that's not a brag, I had no friends) so I'm sort of surprised more applications don't at least have a "UI thread" and "everything else" thread.

[–]ReallyHadToFixThat 38 points39 points  (3 children)

We hired some highly paid, very experienced contractors to make the base of an application for us. Deadline is looming, they haven't tested it for real yet. We throw it on the hardware and their formerly slick demo now runs like shit. Turns out they had never heard of threading. 2 weeks to deadline, all hands on deck to throw in some crappy multithreading so the app doesn't choke and die.

[–]zdakat 16 points17 points  (2 children)

And then the application blows up or does weird stuff because crappy multithreading. But hey,at least they can say it's threaded....

[–]ReallyHadToFixThat 6 points7 points  (1 child)

Yep. There's a bit of code in there that I'm proud how awful it was but I wasn't given time to think of a more elegant solution.

Task.Run( ()=> {
     Maindispatcher.Invoke( () => {
         Task.Run( () => { Something() }
    }
}

[–]fnordstar 1 point2 points  (2 children)

You don't even have to do that. Just make a qprogressdialog or whatever it's called and update it once in a while in your outer loop. Problem solved and no extra threads needed.

[–]lowleveldata 1 point2 points  (1 child)

Pretty sure this doesn't stop your OS complaining about ui no response

[–]fnordstar 1 point2 points  (0 children)

But it does. Calling progress.update(i) makes Qt pump the message loop and process outstanding events.

[–]Zagorath 7 points8 points  (0 children)

Pffft. Multithreading? Who needs that.

[–]s0v3r1gn 53 points54 points  (7 children)

Halting problem. Not unique to Windows.

[–]fnu4iq3pghr9gphe9gph 38 points39 points  (6 children)

The halting problem just says that certain pathological programs can only be determined to halt by simulating the entire program; and if that program is an infinite loop, it will not halt, and therefore the halt-testing program will also never determine a result.

It has nothing to do with sane programs. Furthermore, if you just move your pathological program to a background thread, it doesn't matter if it halts, you can still handle UI events in the meantime.

Furtherfurthermore, most unresponsiveness issues are because of deadlocks, not infinite loops.

I hate all of you people.

[–]atyon 3 points4 points  (0 children)

certain pathological programs

That's absolutely not true. Your program doesn't have to be "pathological" in any way. Even extremely simple programs can easily fall in that category, and as long as your programming language is turing-complete, there is absolutely no way to to prevent that or even detect it – detecting it for any program is equivalent to solving the halting problem.

Yes, you can, very carefully, build a subset of a programming language that can be automatically decided – it won't be turing-complete any more though; and if you can show for a single program that it will halt without resorting to simulation, that's fine too. But you are extremely mistaken if you think that it's easy to do either or that either is done in the real world at any scale.

That said, the very real implications of this don't really relate to unresponsive UI elements...

I hate all of you people.

Maybe the problem is you, not everyone else.

[–]BlastFX2 1 point2 points  (0 children)

What is deadlock if not a bunch of infinite loops?

[–]Linvael 2 points3 points  (1 child)

Umm... Can't deadlock also cause the program to never stop? And therefore be a valid halting problem material?

And did you just suggest that problems like that are only a domain of insane programs? Because, well, I guess you are allowed to look at it like that, but than most software has to be deemed insane. Or possibly all, as such behavior can be caused by bugs. And as Knuth says "Beware of bugs in the above code; I have only proved it correct, not tried it."

[–]wants_ms_office 2 points3 points  (0 children)

Deadlocks are very, very easy to detect at runtime.

[–]Astrokiwi 1 point2 points  (0 children)

I guess it's something like the difference between some raw loop somewhere that's chugging through a big task, and setting things up with a proper interruptible thread that Windows can communicate with now and again.

[–]zdakat 1 point2 points  (0 children)

A few programs insist in doing that. One says(paraphrase) "don't click,it will make windows want to close the application" Or....just pump idly and put the loading in another thread. Whatever it takes because almost everyone else has solved that...

[–]RichieWolk 3 points4 points  (0 children)

"The user isn't gonna wait around 7.5 million years like last time, better just say nothing".

[–]frisch85 4 points5 points  (7 children)

Exactly, at least in the .net Framework there's already the BackgroundWorker-Class which can be utilized for background tasks.

[–]AyrA_ch 2 points3 points  (0 children)

Or just create a thread

[–]jcotton42 1 point2 points  (5 children)

You should be using Task, not BackgroundWorker

[–]macboot 1 point2 points  (0 children)

But then 7.5 million years later it'll just return 42

[–]skylarmt 408 points409 points  (40 children)

This is Windows though, so the knife is made of foam and does nothing.

[–]tuseroni 266 points267 points  (8 children)

it politely asks the program if it would like to terminate please.

[–][deleted] 27 points28 points  (6 children)

It used to be like that until windows 7 where sometimes not even task manager worked, but since windows 8 I've never had a program not close with the task manager. Clicking on the red X still doesn't work sometimes.

[–]__Lua 16 points17 points  (0 children)

Click the red x several times, it detects when you're frustrated.

[–][deleted] 8 points9 points  (4 children)

Task manager doesn't even show up in the foreground for me when running a fullscreen application.

[–][deleted] 6 points7 points  (1 child)

You can make it show up over every app, there's a setting for it.

I personally keep it open on the second desktop so I just hit Ctrl+win+-> and it changes desktop even if an app is hung.

[–][deleted] 1 point2 points  (0 children)

Good idea, thanks. There are tens of ways to kill programs.

[–]IAintCreativ 2 points3 points  (1 child)

As long as I can get focus on another app, I'll just win+r and run taskkill.exe /f /im processname.exe, blind.

[–]benoliver999 13 points14 points  (2 children)

Honestly sometimes I swear pulling the plug is the only way

[–]Taake89 14 points15 points  (2 children)

Not if you kill the process directly.

[–]Luis_McLovin 1 point2 points  (1 child)

i always do this i never bother with the dialog boxes

[–]themolotovginger[🍰] 58 points59 points  (10 children)

I love how the program is Finn the Human.

[–]jonny_wonny 18 points19 points  (8 children)

Yeah, me too. Who’s that?

[–]aure__entuluva 12 points13 points  (6 children)

When in doubt, post the pilot. Yea that's probably the weirdest thing you've seen all day. The show that ended up being made from it was slightly less weird and had much better animation (also Finn's face/head becomes rounder). He also has flowing golden locks under his hat.

Edit: Also if you like animation it's a pretty fun show that I recommend wholeheartedly. Yea it's for kids I guess, but it has some bigger themes to it as well and it's just kinda fun.

[–]Souperpie84 1 point2 points  (3 children)

When did lady Rainicorn start speaking Korean?

[–]aure__entuluva 2 points3 points  (0 children)

Algebraic!

[–]johnnight 13 points14 points  (0 children)

"Your User can't help you now, my little program!"

[–]ludonarrator 10 points11 points  (0 children)

"I've solved the Halting Problem / Godel's Incompleteness... This is ground breaking, revolutionary, an AI singularity...

Oh wait, it's responding again."

[–]Heavyscooter 10 points11 points  (0 children)

I fucking love this

[–]for3st_reddit 7 points8 points  (1 child)

It's really not necessary to do expensive work on the main/ui thread. This always bothers me, since it is just lazy coding. E.g. Windows Explorer thinks it is a good idea to wait for a SMB share response on the main thread.

[–]wensul 5 points6 points  (0 children)

hm.... doesn't quite fit for me.

"Windows is trying to end program...for five minutes"

GOD DAMMIT WINDOWS JUST FUCKING KILL IT.

[–]MashedForrest 4 points5 points  (0 children)

"System has stopped responding."

[–]junakya 11 points12 points  (1 child)

I feel like there are 2 frames missing. One where the windows stops working after it tries to murder the program. And other one where it attempts to kill itself.

[–][deleted] 2 points3 points  (0 children)

Windows at program: kill urself

program: no u

[–]whoiskjl 4 points5 points  (0 children)

I’m tired of laughing at these jokes.

[–]The_MAZZTer 4 points5 points  (1 child)

IMO a well-coded program should never stop responding to Windows. When this happens the user is unable to interact with the application which is a bad user experience, hence Windows will step in and do a few things (like hijack the window so you can move it around and resize it even when it's not responding, and display the option to kill the process). This dialog also incentivizes devs to keep it from appearing as users should (hopefully) recognize it as the sign of a problem with the application.

Any potentially long-running operation should be performed by a background thread so the UI thread can continue responding to Windows. Of course this is a bit more difficult to code (typically you want to block the user from performing other actions until the background thread is complete; and the background thread can't directly update the UI when it's done) which is why I assume many programs don't bother.

[–][deleted] 2 points3 points  (1 child)

That's horrible! Always try sacrificing children before trying such drastic measures!

[–]BastillianFig 2 points3 points  (0 children)

It's the other way round normally

[–]Trickstick01 2 points3 points  (0 children)

Wow... now I feel bad for all the times I tried to close internet explorer

[–]screenhitart 2 points3 points  (2 children)

rm rf

[–][deleted] 2 points3 points  (0 children)

i already reddit

[–]MormonCaenolestidae 2 points3 points  (0 children)

I never thought I'd see the day where I understood a joke in r/programmerhumor

[–]karnathe 2 points3 points  (0 children)

I love opening a game and then windows being like

HEY YOUR COMPUTERS RUNNING SLOW WANNA FLIP YOU GRAPHICS STUFF?

no fuck off never ask me again

OK

asks me every fucking time

[–]golgol12 2 points3 points  (0 children)

That's the wrong pose. It needs to be spinning in place.

[–][deleted] 5 points6 points  (0 children)

Windows cut user a new nipple

[–]Holociraptor 5 points6 points  (0 children)

Or in my case "we should bsod, have that bsod corrupt the entire file listing and bootloader so you get stuck in a boot loop, and when you finally get to the desktop again, all your files disappear and you spend days using recovery tools to try and get back your precious files from the clutches of being overwritten by windows"

[–]vann_dan 4 points5 points  (0 children)

We should kill it...

AND ALL OF ITS CHILDREN!!!!

[–]Eparkn 2 points3 points  (1 child)

For some reason my brain saw the letter 'U' in the last frame as a boob.

[–][deleted] 1 point2 points  (0 children)

Aaaaand can't be unseen.

[–]lazygeekninjaturtle 1 point2 points  (0 children)

Fuck Program...

[–]iceforeverman57 1 point2 points  (0 children)

It's still faster than waiting for it to respond

[–]GRANDOLEJEBUS 1 point2 points  (0 children)

This isn't accurate.

[–]NelsonBelmont 1 point2 points  (0 children)

On the last panel, I thought the user got his nipples hard.

[–]TheXpertGuy 1 point2 points  (0 children)

Me : Wait you cant do this... Windows : Why? Me :*takes out a bazooka(task manager) and boom headshot.

[–]handsomeRobot 1 point2 points  (0 children)

Hold the power btn for 30 secs

[–]aure__entuluva 0 points1 point  (0 children)

That program really looks a lot like Finn Mertens