rsession-arm64 maxes out core AFTER execution for 5+ min on M1 CPUs in macOS versions -- console is unresponsive

This problem has been reported before, for example in 2021 here:

I have two Macs, one with M1max and M1pro CPU. The problem exists on both and on macOS Monterey and Ventura. The linked report above is for Big Sur. I searched the GitHub issues and could not find a bug report but it feels like one. I'm using RStudio Version 2023.09.1+494 and R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid".

If I execute something in RStudio console, the first command is properly executed and I see results. But 2 seconds later the macOS ActivityMonitor shows a process named rsession-arm64 which maxes out 1 core for 5+ minutes. If you start another command in the console, it will not be executed until the previous process stops maxing out the core. During this time the console appears unresponsive.

If I open an interactive R session in my terminal application there is no problem at all. Similar to the report linked above. And the process which executes the command/script is named R.

Is this a local config problem or should I file a bug report?

I have a humble M1. Our differences:

  1. I'm under Sonoma but didn't have problems from macOS under any previous version.
  2. I'm under RStudio Version 2023.03.0+386 (2023.03.0+386, because I've grown cautious of updating without sufficient reason.

I can't even quit RStudio when this one process maxes out one core. After a machine reboot, I started RStudio, source'd one script that only loads some objects (300 MB in total) and loads one library (igraph). The console would not compute 1+2 for me and I cannot quit RStudio without killing it.
What is going on?

Does the same script affect R from a terminal session or using the GUI similarly?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.