RStudio IDE fails to start with "R is taking longer than usual" on RStudio Server Linux

We are running RStudio Server 2025.09.2 Build 418.

We sporadically experience very similar problems to what was described in "R is taking longer to start than usual" on RStudio Server Linux.

Symptom

Opening RStudio sometimes shows a spinner for 1-2 minutes, then either "R is taking longer to start than usual" (with Reload / Safe Mode / Terminate R) or a blank screen. Terminate R does not help. Safe Mode sometimes does.

Root cause

rsession's main thread blocks in __cxa_guard_acquire - the C++ ABI's thread-safe initialiser for a function-local static - inside Rf_ReplIteration / R_ReadConsole. No other thread holds the guard: all nine others are parked idle. It is an orphaned initialisation guard, and the static lives in the rsession executable itself, not in a loaded library.

Main-thread stack, from a core dump:

#0  syscall
#1  __cxa_guard_acquire
#2..#6  rsession (stripped, no symbols)
#7  Rf_ReplIteration
#8  R_ReplConsole
#9  run_Rmainloop

Consequences, not causes:

  • the browser's POST /rpc/client_init stays (pending) forever - rserver delivered it to rsession (unix socket queues drained) and rsession never answers, because its main thread is blocked
  • ERROR r error 5 (R symbol not found) [symbol: .rs.*] in the rsession log - tools:rstudio is never established, so RStudio's modules query symbols that do not exist
  • The previous R session terminated abnormally - logged after any unclean exit, including the user pressing Terminate R

This looks like a RStudio Server / R session initialization issue where the rsession main thread becomes stuck inside __cxa_guard_acquire, preventing R from completing startup.

The important clue is that the thread is blocked in the C++ static-initialization guard inside the rsession executable itself, rather than waiting on another thread or loaded library. The /rpc/client_init request then remains pending because rsession never gets far enough to respond.

I would recommend opening a Posit support issue with the core dump exact RStudio Server build, resession logs and the relevant stack traces. In particular the fact that Safe Mode sometimes works could help narrow down what initialization path is triggering the problem.

Also avoid treating the .rs.* symbol errors or abnormal-session messages as the root cause they appear to be consequences of rsession being stuck during initialization.

Thanks @emmawalter45 !
I opened RStudio Server: rsession deadlocks at startup in __cxa_guard_acquire, session never becomes usable · Issue #18718 · rstudio/rstudio · GitHub per your suggestion.

welcone dear no problem