Roon process on OS X won't die

On OS X (Yosemite, Darwin xxx 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64) the Roon application frequently doesn’t exit when told to Quit. It takes several minutes for the process to close and won’t terminate even when given a “kill -9”.

When Roon is in this half dead state, any attempt to open Roon results in a dialog box stating “The application “Roon.app” is not open anymore.” That’s it.

Once a few minutes pass and Roon eventually terminates, it becomes possible to relaunch the app. This is with the latest build available at the time of writing.

I found that attempting to attach gdb to the Roon process kills it immediately.

Please let me know if I can do any tests or provide more data.

Thanks,
RFI

Turns out that when this happens on my MacBook while I’m listening on headphones, the music keeps playing. I assume the same thing happens with the internal speakers.

I’m listening to music right now even though the Roon UI is gone.

The reason I quite this time was that I couldn’t pause playback - the pause button simply refused to work, so I quit the app… and it disappeared but kept playing.

It took about 1 minute for Roon to really die and for the music to stop.

Hey @RoonForImprovement,

Thanks for the report and apologies for extremely late response here. It looks like we missed this thread when it was initially created.

Would you mind to tell us the steps you are doing to get into that ‘half-dead’ state ? We would like to reproduce this issue in house. And find the way how to fix.

Thanks in advance.

Sure, and my apologies for the slow response too!

It happened again tonight on my MacBook Pro 2011 running El Capitan. Latest build of Roon. I had recently rebooted and hadn’t yet started Roon since the reboot. Here’s what happened:

  • Launch Roon with cmd-space roon
  • Roon paused while looking for a Roon server… some weird network thing, I don’t know.
  • Bored of waiting for Roon to find a server I hit cmd-q to kill Roon
  • Cmd-space roon again
  • This is what appeared on screen:

  • Go to this forum and start writing this post
  • Some minutes later, cmd-space roon again
  • Roon loads, no worries
  • Cmd-q
  • Cmd-space Roon
  • Same error appears
  • Wait approx 30 seconds
  • Cmd-space roon
  • Same error appears
  • Wait another 30 seconds or so
  • Cmd-space roon
  • Same error again
  • Wait another 30 seconds (about 1 and a half minutes by this point)
  • Cmd-space
  • Same error again
  • 3 minutes later: same error
  • 5 Minutes later! Ok, this is crazy. Drop to terminal:

➜ ~ ps axuw|grep -i roon carl 17511 0.0 0.0 2453272 836 s001 S+ 10:44PM 0:00.00 grep -i roon carl 16430 0.0 0.0 0 0 ?? ?E 10:39PM 0:00.00 (Roon) carl 16464 0.0 0.5 2647020 84784 ?? S 10:39PM 0:02.40 /Applications/Roon.app/RAATServer --debug --gc=sgen --server RAATServer.exe ➜ ~

Try to kill it:

➜ ~ kill 16430 ➜ ~ ps axuw|grep -i roon carl 17846 0.0 0.0 2434840 796 s001 S+ 10:46PM 0:00.00 grep -i roon carl 16430 0.0 0.0 0 0 ?? ?E 10:39PM 0:00.00 (Roon) carl 16464 0.0 0.5 2647020 84784 ?? S 10:39PM 0:02.40 /Applications/Roon.app/RAATServer --debug --gc=sgen --server RAATServer.exe

Nope. Really kill it:

➜ ~ kill -9 16430 ➜ ~ ps axuw|grep -i roon carl 17914 0.0 0.0 2434840 796 s001 S+ 10:46PM 0:00.00 grep -i roon carl 16430 0.0 0.0 0 0 ?? ?E 10:39PM 0:00.00 (Roon) carl 16464 0.0 0.5 2647020 84784 ?? S 10:39PM 0:02.40 /Applications/Roon.app/RAATServer --debug --gc=sgen --server RAATServer.exe

Nope. Still there. How about a debugger?

➜ ~ sudo lldb -p 16430 (lldb) process attach --pid 16430 error: attach failed: unable to attach (lldb) ^D

Ok, what’s going on? Let’s try some code:

`#include <stdio.h
#include <string.h>
#include <sys/types.h>
#include <sys/ptrace.h>

extern int errno;

int main() {
errno = 0;
int result = ptrace(PT_ATTACHEXC, 16430, NULL, 0);
printf(“result: %d, errno: %d, error: %s\n”, result, errno, strerror(errno));
return 0;
}`

Compile and run:

➜ tmp gcc -o wat wat.c ➜ tmp ./wat result: -1, errno: 3, error: No such process

No such process, eh?

➜ tmp ps axuw|grep '(Roon)'|head -n1 carl 16430 0.0 0.0 0 0 ?? ?E 10:39PM 0:00.00 (Roon)

And as root?

➜ tmp sudo ./wat Password: result: -1, errno: 3, error: No such process

Well, shit. Roon is no more. It has ceased to be. It’s expired and gone to meet its maker. This is a late Roon. It’s a stiff. Bereft of life, Roon rests in peace. All attempts at resuscitation have failed and a reboot is required to fix it.

Ninja edit: I forgot to try with mach port entitlements signed into the binary. Tomorrow!

the man page for el capitan ps says:

           E       The process is trying to exit.

We are trying, but something is not letting us!

My OSX gets wedged once in a while… a reboot usually fixes it up. If that doesn’t fix it, do you have any extensions to the OS, Finder, Kernel, etc…?