RStudio crashing after out of disk space error

Recently I filled up my disk and ran out of space. Then I couldn't save anymore obviously. Since then I have cleared space on my drive. There is loads of free space on my drive now. And the system has been rebooted.

Ever since that event, my RStudio just crashes when opening a file (R or Rmd). I get this weird pop-up and I have to force kill it. This error also pretty much freezes the functionality of other open applications like browsers.

RStudio opens up fine. I can run code in the console and that works. I can create a new file and run code from there. But, if I try to save that file, then it gives this error. So far it's only when I save or open R/Rmd files. R through the terminal works perfectly fine too.

I have tried to remove the .rstudio-desktop directory from my home. That didn't help. Then I uninstalled and reinstalled RStudio. That didn't help either. Is there anything else that can be done?

    R version 3.5.2 (2018-12-20)
    Platform: x86_64-pc-linux-gnu (64-bit)
    Running under: Ubuntu 18.04.2 LTS

    RStudio Version 1.1.463 – © 2009-2018 RStudio, Inc.
    Mozilla/5.0 (X11; Linux x86_64) 
    AppleWebKit/538.1 (KHTML, like Gecko)
    RStudio Safari/538.1 Qt/5.4.0

Topic on AskUbuntu.

Can you provide us with a GDB stack trace? You should be able to generate one with the following steps.

First, close any running instances of RStudio, and then launch a new lone RStudio instance.

Then, in a terminal, start GDB and have it attach to RStudio. You should be able to do this with:

sudo gdb -p `pidof rstudio`

If you do not have the pidof utility installed, you can run Sys.getpid() in your R session to get the session's process ID.

After this, GDB should (hopefully) successfully attach to the process. Next, we'll instruct GDB to log to a file:

set logging file rstudio.log
set logging on

Finally, we'll tell GDB to let RStudio continue running:

continue

Now, return to your RStudio session and try to trigger the crash. With luck, if RStudio crashes, GDB should catch the fault. Return to GDB, and enter:

backtrace

You should now be able to quit GDB with

quit

and then make the file at 'rstudio.log' available to us for further inspection.

Hi,
gdb worked and Rstudio crashed as expected. The backtrace command only returned No stack. Not sure that is the expected behaviour. Anyway, here is the output from rstudio.log file:

Continuing.
[New Thread 0x7ff3bc78f700 (LWP 19956)]
[Thread 0x7ff3bc78f700 (LWP 19956) exited]
[Thread 0x7ff3e27fc700 (LWP 19753) exited]
[Thread 0x7ff3e37fe700 (LWP 19751) exited]
[Thread 0x7ff3e3fff700 (LWP 19750) exited]
[Thread 0x7ff3f0a03700 (LWP 19749) exited]
[Thread 0x7ff3f1204700 (LWP 19748) exited]
[Thread 0x7ff3f1a05700 (LWP 19747) exited]
[Thread 0x7ff3f2206700 (LWP 19746) exited]
[Thread 0x7ff43a199700 (LWP 19743) exited]
[Thread 0x7ff43a99a700 (LWP 19742) exited]
[Thread 0x7ff440eae700 (LWP 19738) exited]
[Thread 0x7ff4416af700 (LWP 19736) exited]
[Thread 0x7ff4430f4700 (LWP 19708) exited]
[Thread 0x7ff45498a500 (LWP 19705) exited]

Program terminated with signal SIGKILL, Killed.
The program no longer exists.
The program is not being run.
No stack.

Thanks.

That's surprising to me. Often, that implies that the system itself is forcing RStudio to be terminated; e.g. the kernel killed the RStudio process because it was consuming too much memory. See e.g.

Can you also check the system log, to see if there's any other information logged after RStudio is killed? Check e.g.

dmesg | tail -n 100

immediately after RStudio is terminated.

You could also try running an strace:

sudo strace -fttT -p `pidof rstudio` -o /tmp/rstudio-trace.log

and see if there's anything illuminating written when RStudio is killed.

Hi,
dmesg didn't reveal anything interesting. They were all related to CPU temperatures and stuff. And no new records were added as a consequence of the rstudio crash.

strace returned a lot of stuff. Too much to paste here. I am not able to upload the text file here for some reason. Anyway, here is some of it from the tail.

5614  21:36:02.263906 openat(AT_FDCWD, "/home/roy/.config/QtProject.conf.lock", O_RDONLY|O_CLOEXEC) = 29 <0.000040>
5614  21:36:02.264057 fcntl(29, F_SETFD, FD_CLOEXEC) = 0 <0.000023>
5614  21:36:02.264261 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000145>
5614  21:36:02.264660 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000079>
5614  21:36:02.264877 read(29, "", 16384) = 0 <0.000026>
5614  21:36:02.264980 read(29, "", 1)   = 0 <0.000020>
5614  21:36:02.265071 read(29, "", 16384) = 0 <0.000020>
5614  21:36:02.265153 read(29, "", 1)   = 0 <0.000019>
5614  21:36:02.265236 read(29, "", 16384) = 0 <0.000020>
5614  21:36:02.265320 read(29, "", 1)   = 0 <0.000019>
5614  21:36:02.265408 close(29)         = 0 <0.000025>
5614  21:36:02.265502 nanosleep({tv_sec=0, tv_nsec=200000000}, 0x7fffc7a07fb0) = 0 <0.200199>
5614  21:36:02.465946 uname({sysname="Linux", nodename="elmo", ...}) = 0 <0.000117>
5614  21:36:02.466360 getpid()          = 5614 <0.000124>
5614  21:36:02.466727 openat(AT_FDCWD, "/home/roy/.config/QtProject.conf.lock", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0644) = -1 EEXIST (File exists) <0.000108>
5614  21:36:02.467022 openat(AT_FDCWD, "/home/roy/.config/QtProject.conf.lock", O_RDONLY|O_CLOEXEC) = 29 <0.000097>
5614  21:36:02.467263 fcntl(29, F_SETFD, FD_CLOEXEC) = 0 <0.000072>
5614  21:36:02.467406 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000022>
5614  21:36:02.467516 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000037>
5614  21:36:02.467644 read(29, "", 16384) = 0 <0.000028>
5614  21:36:02.467762 read(29, "", 1)   = 0 <0.000025>
5614  21:36:02.467870 read(29, "", 16384) = 0 <0.000024>
5614  21:36:02.467964 read(29, "", 1)   = 0 <0.000023>
5614  21:36:02.468056 read(29, "", 16384) = 0 <0.000021>
5614  21:36:02.468150 read(29, "", 1)   = 0 <0.000022>
5614  21:36:02.468245 close(29)         = 0 <0.000025>
5614  21:36:02.468341 nanosleep({tv_sec=0, tv_nsec=400000000}, 0x7fffc7a07fb0) = 0 <0.400282>
5614  21:36:02.868778 uname({sysname="Linux", nodename="elmo", ...}) = 0 <0.000028>
5614  21:36:02.868953 getpid()          = 5614 <0.000026>
5614  21:36:02.869070 openat(AT_FDCWD, "/home/roy/.config/QtProject.conf.lock", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0644) = -1 EEXIST (File exists) <0.000049>
5614  21:36:02.869243 openat(AT_FDCWD, "/home/roy/.config/QtProject.conf.lock", O_RDONLY|O_CLOEXEC) = 29 <0.000039>
5614  21:36:02.869368 fcntl(29, F_SETFD, FD_CLOEXEC) = 0 <0.000022>
5614  21:36:02.869457 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000023>
5614  21:36:02.869590 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000021>
5614  21:36:02.869697 read(29, "", 16384) = 0 <0.000024>
5614  21:36:02.869791 read(29, "", 1)   = 0 <0.000020>
5614  21:36:02.869880 read(29, "", 16384) = 0 <0.000021>
5614  21:36:02.869966 read(29, "", 1)   = 0 <0.000023>
5614  21:36:02.870054 read(29, "", 16384) = 0 <0.000020>
5614  21:36:02.870138 read(29, "", 1)   = 0 <0.000020>
5614  21:36:02.870228 close(29)         = 0 <0.000025>
5614  21:36:02.870322 nanosleep({tv_sec=0, tv_nsec=800000000}, 0x7fffc7a07fb0) = 0 <0.800172>
5614  21:36:03.670650 uname({sysname="Linux", nodename="elmo", ...}) = 0 <0.000025>
5614  21:36:03.670822 getpid()          = 5614 <0.000023>
5614  21:36:03.670926 openat(AT_FDCWD, "/home/roy/.config/QtProject.conf.lock", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0644) = -1 EEXIST (File exists) <0.000073>
5614  21:36:03.671133 openat(AT_FDCWD, "/home/roy/.config/QtProject.conf.lock", O_RDONLY|O_CLOEXEC) = 29 <0.000033>
5614  21:36:03.671250 fcntl(29, F_SETFD, FD_CLOEXEC) = 0 <0.000021>
5614  21:36:03.671331 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000021>
5614  21:36:03.671444 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000020>
5614  21:36:03.671539 read(29, "", 16384) = 0 <0.000024>
5614  21:36:03.671631 read(29, "", 1)   = 0 <0.000019>
5614  21:36:03.671724 read(29, "", 16384) = 0 <0.000020>
5614  21:36:03.671808 read(29, "", 1)   = 0 <0.000019>
5614  21:36:03.671894 read(29, "", 16384) = 0 <0.000020>
5614  21:36:03.671977 read(29, "", 1)   = 0 <0.000020>
5614  21:36:03.672067 close(29)         = 0 <0.000024>
5614  21:36:03.672160 nanosleep({tv_sec=1, tv_nsec=600000000}, 0x7fffc7a07fb0) = 0 <1.600192>
5614  21:36:05.272431 uname({sysname="Linux", nodename="elmo", ...}) = 0 <0.000010>
5614  21:36:05.272490 getpid()          = 5614 <0.000006>
5614  21:36:05.272524 openat(AT_FDCWD, "/home/roy/.config/QtProject.conf.lock", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0644) = -1 EEXIST (File exists) <0.000015>
5614  21:36:05.272579 openat(AT_FDCWD, "/home/roy/.config/QtProject.conf.lock", O_RDONLY|O_CLOEXEC) = 29 <0.000010>
5614  21:36:05.272611 fcntl(29, F_SETFD, FD_CLOEXEC) = 0 <0.000006>
5614  21:36:05.272635 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000006>
5614  21:36:05.272666 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000005>
5614  21:36:05.272693 read(29, "", 16384) = 0 <0.000007>
5614  21:36:05.272721 read(29, "", 1)   = 0 <0.000006>
5614  21:36:05.272745 read(29, "", 16384) = 0 <0.000007>
5614  21:36:05.272770 read(29, "", 1)   = 0 <0.000005>
5614  21:36:05.272794 read(29, "", 16384) = 0 <0.000005>
5614  21:36:05.272818 read(29, "", 1)   = 0 <0.000006>
5614  21:36:05.272843 close(29)         = 0 <0.000007>
5614  21:36:05.272870 nanosleep({tv_sec=3, tv_nsec=200000000},  <unfinished ...>
5616  21:36:07.186819 <... poll resumed> ) = 1 ([{fd=3, revents=POLLIN}]) <5.009038>
5616  21:36:07.186969 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\n\3\337\3\5\0`\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32 <0.000014>
5616  21:36:07.187146 write(5, "\1\0\0\0\0\0\0\0", 8) = 8 <0.000094>
5616  21:36:07.187270 poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}]) <0.004341>
5616  21:36:07.191686 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\34\0\337\3\5\0`\5L\1\0\0a\1y\21\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 96 <0.000009>
5616  21:36:07.191830 write(5, "\1\0\0\0\0\0\0\0", 8) = 8 <0.000006>
5616  21:36:07.191900 poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}]) <0.011027>
5616  21:36:07.202972 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\10\3\337\3l\1y\21\240\1\0\0\5\0`\5\0\0\0\0{\2\255\1{\2g\1\20\0\0\2", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32 <0.000109>
5616  21:36:07.203283 write(5, "\1\0\0\0\0\0\0\0", 8) = 8 <0.000082>
5616  21:36:07.203442 poll([{fd=3, events=POLLIN}], 1, -1 <unfinished ...>
5614  21:36:08.473101 <... nanosleep resumed> 0x7fffc7a07fb0) = 0 <3.200204>
5614  21:36:08.473314 uname({sysname="Linux", nodename="elmo", ...}) = 0 <0.000038>
5614  21:36:08.473567 getpid()          = 5614 <0.000115>
5614  21:36:08.473935 openat(AT_FDCWD, "/home/roy/.config/QtProject.conf.lock", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0644) = -1 EEXIST (File exists) <0.000136>
5614  21:36:08.474354 openat(AT_FDCWD, "/home/roy/.config/QtProject.conf.lock", O_RDONLY|O_CLOEXEC) = 29 <0.000044>
5614  21:36:08.474531 fcntl(29, F_SETFD, FD_CLOEXEC) = 0 <0.000024>
5614  21:36:08.474633 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000025>
5614  21:36:08.474766 fstat(29, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000024>
5614  21:36:08.474872 read(29, "", 16384) = 0 <0.000027>
5614  21:36:08.474972 read(29, "", 1)   = 0 <0.000026>
5614  21:36:08.475104 read(29, "", 16384) = 0 <0.000023>
5614  21:36:08.475197 read(29, "", 1)   = 0 <0.000023>
5614  21:36:08.475292 read(29, "", 16384) = 0 <0.000023>
5614  21:36:08.475384 read(29, "", 1)   = 0 <0.000023>
5614  21:36:08.475482 close(29)         = 0 <0.000027>
5614  21:36:08.475581 nanosleep({tv_sec=6, tv_nsec=400000000},  <unfinished ...>
5616  21:36:08.924646 <... poll resumed> ) = 1 ([{fd=3, revents=POLLIN}]) <1.721174>
5616  21:36:08.924832 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="U\2\337\3&\10y\21\3\20\0\0\20\0\0\0\0\0\0\20\20\20\20\20\0\1\0 \1\4\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32 <0.000107>
5616  21:36:08.925214 write(5, "\1\0\0\0\0\0\0\0", 8) = 8 <0.000036>
5616  21:36:08.925379 poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}]) <0.178832>
5616  21:36:09.104326 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="U\2\337\3\331\10y\21\3\20\0\0\20\0\0\0\0\0\0\20\20\20\20\20\0\0\0 \1\5\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32 <0.000078>
5616  21:36:09.104564 write(5, "\1\0\0\0\0\0\0\0", 8) = 8 <0.000107>
5616  21:36:09.104813 poll([{fd=3, events=POLLIN}], 1, -1 <unfinished ...>
5665  21:36:09.105272 <... futex resumed> ) = ? ERESTARTSYS (To be restarted if SA_RESTART is set) <12.502944>
5726  21:36:09.105302 <... futex resumed>) = ?
5664  21:36:09.105312 <... futex resumed>) = ?
5726  21:36:09.105328 +++ killed by SIGKILL +++
5665  21:36:09.105341 +++ killed by SIGKILL +++
5663  21:36:09.105347 <... futex resumed>) = ?
5662  21:36:09.105354 <... futex resumed>) = ?
5661  21:36:09.105362 <... futex resumed>) = ?
5660  21:36:09.105370 <... futex resumed>) = ?
5659  21:36:09.105377 <... futex resumed>) = ?
5658  21:36:09.105385 <... futex resumed>) = ?
5664  21:36:09.105396 +++ killed by SIGKILL +++
5659  21:36:09.105409 +++ killed by SIGKILL +++
5663  21:36:09.105421 +++ killed by SIGKILL +++
5662  21:36:09.105429 +++ killed by SIGKILL +++
5661  21:36:09.105437 +++ killed by SIGKILL +++
5660  21:36:09.105444 +++ killed by SIGKILL +++
5658  21:36:09.105452 +++ killed by SIGKILL +++

Perhaps something to do with the ~/.config/ directory and some settings there? Curious enough, I found this link, where the user ran into segmentation faults after running out of disk space. And later he modified a file .config/gtk-2.0/gtkfilechooser.ini to fix the issue. I tried the same, but it didn't help. Should/Can I delete/reset Qt and/or gtk related stuff from my .config directory? Perhaps, there is some messed up setting there?

Another curious aspect is that if this is a system-wide or OS specific issue, why is it that I only have this problem with RStudio? All my other applications seem to work fine.

Thanks.

"/home/roy/.config/QtProject.conf.lock"

What if you try removing this lock file?

Hi,
Deleted 'QtProject.conf.lock' and RStudio seems to work fine now. No crashes or errors so far. I will update here if there are any related issues.
Thanks for your help.
Regards,
Roy

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.