Conversation

Lucy [hiatus era] 𒌋𒁯

is there a way to kill a process more aggressively than pkill -9?
like, just delete the entry in the scheduler and free the memory it should basically just "wipe these bytes" and not give a shit about the process. how come killing is in NOT gracefully ending a process is such a hussle? "oh no that could cause trouble" the program is STUCK i could wait until the heat death of the universe, or kill it now and deal with the aftermath. what is this, android? let me take responsibility smh.
5
0
3

@lucy if sigkill doesn’t immediately end the process there’s either a kernel bug or it’s stuck waiting for i/o for some reason…

1
0
0
@mia can i tell it to NOT wait for io fi that's stuck?
1
0
0

@lucy unfortunately this is linux

2
0
1

@lucy the kernel is stuck in a syscall waiting for dirty pages to flush; there are no means to interrupt that

1
0
0
@lucy unplug the computer
1
0
0
@arcana yeah duh what do you think im doing? i hate when that happens tho
0
0
2
@mia @torvalds please give me weapons of mass destruction pleadingcute
2
0
3

@lucy you can adjust your vm config to reduce the amount of dirty pages it allows before it forces a flush to disk

have you tried attaching a debugger or strace to a process that’s stuck like this to see what’s going on?

1
0
0
@mia no not yet I could do that next time
0
0
0

GNUkko Sauvage (eris-ng) neorenard

Edited 1 year ago
SIGKILL is the aggressivest way of doing it, it might be appearing in process lists just because the kernel is busy cleaning up the memory or something dumb like that, the process itself should no longer be executing.

Asshole sounding advice: [spoiler]Try adding -l to your pkill, there's a very small chance you actually didn't send the signal to the right process.[/spoiler]
1
0
1
@eris it's impressive how cleaning up memory takes any noticable time at all tho. that's like "please wait for windows to shutdown" kind of bullshit
3
0
1

@lucy @eris memory fragmentation is a bitch

yet another reason why any posix/unix libc is garbage. you get exactly one allocator, take it or leave it

1
0
1
It's better to let the kernel do it than have to restart the computer because some process crashed before releasing a lock on a file making it inaccessible now.
2
0
0

@eris @lucy loonix doesn’t have enforced locks on files, that’s a windows thing

2
0
3
@eris but what if the kernel isn't doing anything? like im talking about cases where it's waiting indefinitely
1
0
1
@mold @eris i mentioned windows but yes
0
0
2
@lucy When is a SIGKILL not aggressive enough?
1
0
0
@scathach when qutebrowser gets stuck running js
1
0
0
@lucy
>how come killing is in NOT gracefully ending a process is such a hussle? "oh no that could cause trouble"
It's not that it would cause trouble, is that it will cause trouble.
Remove a from a sentence and software will read or write back something in that place even tho it's not necessarily what it should read or where it should write.
Otherwise yes you could do that if people added it.
0
0
0
@lucy @eris It's more about proper allocation and reducing fragmentation than cleaning.
0
0
1
Yes yes I know, it was a general example. Here's an example of the hypothetical Linux that doesn't bother to clean up after processes: Web server binds to :80, crashes, kernel doesn't clean it up, now you can't bind to that port again AKA you can't just restart the webserver. Go have fun with commandline tools to forcefully close an open socket or restart your computer.

CC: @lucy@netzsphaere.xyz
1
0
3
Most probably it's swapping some memory (your guess whether that memory is actually needed), perhaps it's waiting for some hardware to respond

Wait hold on a second, is it a zombie process? It might just mean that the parent process hasn't bothered to wait for its child's death yet and everything is actually cleaned up already.
0
0
0

@scathach @lucy this never happened to me, i wonder what’s really going on there

0
0
3

@eris @lucy sorry I wasn’t thinking too well at 1:13 blobcatsleepless

1
0
2
Don't worry dear ❤️
0
0
0