ps::ps_handle() error: Unknown errorfs_error0NA after upgrade ubuntu20.04/R 4.1

Hi,
I can successfully install r-lib/ps, but execute ps::ps_handle(), would get Error in ps::ps_handle() : Unknown errorfs_error0NA
So when I install processx, or callr, I would also encounter this error (see below) and cannot finish installaton.
The only message got from stackoverflow is https://stackoverflow.com/questions/54694822/problem-during-installation-of-tidyverse-in-r
said "no process can acess any files in /proc".
I'm not sure about its meaning. My /proc seems normally, that has various process file under it

ls -al /
dr-xr-xr-x  458 root  root       0 12月  1 14:30 proc

Please give me some comments if you know how to deal with it or something may related to this error. Thanks.

sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3

locale:
 [1] LC_CTYPE=zh_TW.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=zh_TW.UTF-8        LC_COLLATE=zh_TW.UTF-8    
 [5] LC_MONETARY=zh_TW.UTF-8    LC_MESSAGES=zh_TW.UTF-8   
 [7] LC_PAPER=zh_TW.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=zh_TW.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.1.1

install.packages("processx")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/processx_3.5.2.tar.gz'
Content type 'application/x-gzip' length 141424 bytes (138 KB)
==================================================
downloaded 138 KB

* installing *source* package ‘processx’ ...
** package ‘processx’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
make: /home/odbadmin/.R/Makevars: Permission denied
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -Wl,-Bsymbolic-functions -Wl,-z,relro -Wall tools/px.c -o tools/px
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -Wl,-Bsymbolic-functions -Wl,-z,relro supervisor/supervisor.c \
      supervisor/utils.c -o supervisor/supervisor
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c base64.c -o base64.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c client.c -o client.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c errors.c -o errors.o
gcc -std=gnu99 -shared -L"/usr/lib/R/lib" -Wl,-Bsymbolic-functions -Wl,-z,relro -o client.so base64.o client.o errors.o  \
	 -L"/usr/lib/R/lib" -lR
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c init.c -o init.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c poll.c -o poll.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c processx-connection.c -o processx-connection.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c processx-vector.c -o processx-vector.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c create-time.c -o create-time.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c unix/childlist.c -o unix/childlist.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c unix/connection.c -o unix/connection.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c unix/processx.c -o unix/processx.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c unix/sigchld.c -o unix/sigchld.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c unix/utils.c -o unix/utils.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c unix/named_pipe.c -o unix/named_pipe.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-QwogzP/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c cleancall.c -o cleancall.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o processx.so init.o poll.o errors.o processx-connection.o processx-vector.o create-time.o base64.o unix/childlist.o unix/connection.o unix/processx.o unix/sigchld.o unix/utils.o unix/named_pipe.o cleancall.o -L/usr/lib/R/lib -lR
installing via 'install.libs.R' to /usr/local/lib/R/site-library/00LOCK-processx/00new/processx
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘processx’:
 .onLoad failed in loadNamespace() for 'processx', details:
  call: ps::ps_handle()
  error: Unknown errorfs_error0NA
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/processx’

The downloaded source packages are in
	‘/tmp/Rtmpewywak/downloaded_packages’
Warning message:
In install.packages("processx") :
  installation of package ‘processx’ had non-zero exit status

I got confused about dir('/proc') results. In Ubuntu20.04/R4.1, got character(0), but in Ubuntu20.04/R3.6.3, to correct file list. Both the two VM use the same user name with equal groups permission in Ubuntu, and use sudo apt install r-base to install R. Why got such difference of permission when use dir('/proc') (and this may be the cause of ps::ps_handle() got Error ).

I have tried to use sudo R in Ubuntu20.04/R4.1, but still get character(0) when dir('/proc') and the same permission denied when using system('dir').
Is there any configuration I miss or set-up I can try about this weird permission difference when using R? Thanks.

> dir('/proc')
character(0)
############ if I use R when cd /proc, system('dir') got permission denied but in R3.6.3 this is allowed
> system("dir")
dir: cannot open directory '.': Permission denied

#####################
> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3

locale:
 [1] LC_CTYPE=zh_TW.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=zh_TW.UTF-8        LC_COLLATE=zh_TW.UTF-8    
 [5] LC_MONETARY=zh_TW.UTF-8    LC_MESSAGES=zh_TW.UTF-8   
 [7] LC_PAPER=zh_TW.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=zh_TW.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.1.2

####################### but actually there are proc files under /proc
$ ls /proc
1     1277   171    203   251    34     4037   534    648    82560  89           kpagecgroup
10    1279   172    204   252    340    41     539    649    82561  893          kpagecount
.......

In R 3.6.3, dir('/proc') got correct list. (these two VM use the same user name with equal groups permission in Ubuntu)

> dir('/proc')
> dir('/proc')
  [1] "1"                 "10"                "100"              
  [4] "1015"              "1018"              "102"              
  [7] "1021"              "1023"              "1024"             
 [10] "103"               "104"               "1047"             
 [13] "105"               "1056"              "106"              
 [16] "1063"              "1068"              "1070"  ...

######### and also system('dir') can be run
> system('dir')
1     119   1772487  212      271      2911954	2912461  3214465  3445538  3531     41	 61	 94	.......

#####################
> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3

locale:
 [1] LC_CTYPE=zh_TW.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=zh_TW.UTF-8        LC_COLLATE=zh_TW.UTF-8    
 [5] LC_MONETARY=zh_TW.UTF-8    LC_MESSAGES=zh_TW.UTF-8   
 [7] LC_PAPER=zh_TW.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=zh_TW.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.3

I still don't know why I cannot use dir('/proc') or system('ls /') in R GUI (as aboving). But it seems all ok when using these in Rstudio-server. So now I can finish r-lib/ps, processx, callr installation through Rstudio-server.

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.