News for hackers. Stuff that matters.
Re:Task_t considered harmful by a-no-n on Wednesday October 26, 2016 @07:04AM (#12795497)
Ever since installing 10.12.1, I've been having a bunch of processes randomly entering a quasi-paused SIGSTOP-ish state (neither closable, apps not "bouncing" (loading) and just not responding. Running Instruments, correlating logs and such doesn't identify any clear cause. I'm having to `sudo kill -CONT -1` in order to get things moving again. I'm wondering if it's related to XNU mitigations or just some spurious "system configuration entropy" on my box.
Re:Task_t considered harmful by cormacrelf on Wednesday October 26, 2016 @10:45AM (#12796828)
I did exactly this when my Mac ran out of memory yesterday. Safari hung with a 'your computer is running out of memory' warning (168 tabs open!) and I didn't want to lose them all by force quitting. But the Safari process itself wasn't "Not Responding" and we were back to 0% CPU.

So I quit everything else, SIGCONT'd Safari, and it started responding again, so I tried unsuccessfully to close some tabs. Of course, Safari somewhat isolates pages in separate processes, so I ran `ps aux | grep WebContent | grep -v grep | cut -d' ' -f11 | xargs kill -SIGCONT` as well.

It all sprang back to life, and all the tabs I'd shut in vain zipped away. Got that one saved for later. It's probably easier just to use -1 now I've learned what that is!

I do wonder what's suspending these processes indefinitely. I should have done more inspection to see what state they were in. I'm not familiar with how WebKit content threads communicate though, so that's for another day.

Re:Task_t considered harmful by a-no-n on Thursday October 27, 2016 @07:15PM (#12811307)
I have 16 GiB and 0 GiB was occurring.
Re:Task_t considered harmful by gbrown_ on Wednesday October 26, 2016 @07:35AM (#12795613)
Nice use of -1 there.
Re:Task_t considered harmful by a-no-n on Wednesday October 26, 2016 @08:41AM (#12795950)
Thx. For an encore:

    /* must be run as root */
    #include <signal.h>
    main(){for(;;){kill(-1,SIGCONT);sleep(10);}}

and a .plist. Temporary hackaround.
Re:Task_t considered harmful by garblegarble on Wednesday October 26, 2016 @08:46AM (#12795974)
What does -1 do, send that signal to all processes?
Re:Task_t considered harmful by Sidnicious on Wednesday October 26, 2016 @09:02AM (#12796080)
I was going to say that it signals launchd's process group — every process spawned by launchd, which always runs with PID 1. However, the `kill` manpage confirms your hunch:

  -1      If superuser, broadcast the signal to all processes; otherwise
          broadcast to all processes belonging to the user.
(This is on macOS/iOS, Linux might have slightly different semantics.)
Re:Task_t considered harmful by tokenizerrr on Wednesday October 26, 2016 @08:56AM (#12796033)
Yup. From man kill:

    -1

    All processes with pid larger than 1 will be signaled.
Re:Task_t considered harmful by EdwinHoksberg on Wednesday October 26, 2016 @08:56AM (#12796038)
Yes, but not for the current process and init
Re:Task_t considered harmful by merpnderp on Wednesday October 26, 2016 @08:54AM (#12796026)
To all with a PID > -1
Re:Task_t considered harmful by aorth on Thursday October 27, 2016 @04:49AM (#12803684)
It's funny you mentioned processes entering a quasi-paused SIGSTOP-ish state. I swear I've been having tons of problems with Java/Tomcat the past week or so I've been on 10.12.1 (betas), and I keep thinking I broke my config by updating my Java version, changing my Tomcat config, or some other "system configuration entropy"! Nice to know I'm not alone and that I'm probably not crazy.

Tomcat 7.0.72 from Homebrew, Oracle Java 8u112, PostgreSQL 9.3 and 9.5.