-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
greta has crash situation: address 0x50, cause 'memory not mapped' #565
Comments
Thanks for posting an issue! Regarding the issue #526 , the error ended up being that the version of R installed was for intel macs, but the user needed to use the arm64 (M1 chip version) installation. Can you post the output of the session info from the reprex? I believe this should have been attached as you had the option reprex::reprex(x = 1, session_info = TRUE) And then paste that output in? Just so I can see the details of your R session and R installation. Hopefully we can resolve this! In the interim, perhaps see if the solution in rstudio/tensorflow#537 may help resolve this for you? |
Thank you for your advice. I have just run the recommended code you mention above, and it seems didn't have error. 1
#> [1] 1 Created on 2022-10-13 with reprex v2.0.2 Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.0.2 (2020-06-22)
#> os CentOS Linux 7 (Core)
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Asia/Shanghai
#> date 2022-10-13
#> pandoc 2.7.3 @ /usr/lib/rstudio-server/bin/pandoc/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> cli 3.4.1 2022-09-23 [1] CRAN (R 4.0.2)
#> digest 0.6.29 2021-12-01 [2] CRAN (R 4.0.2)
#> evaluate 0.17 2022-10-07 [2] CRAN (R 4.0.2)
#> fansi 1.0.3 2022-03-24 [2] CRAN (R 4.0.2)
#> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.0.2)
#> fs 1.5.2 2021-12-08 [2] CRAN (R 4.0.2)
#> glue 1.6.2 2022-02-24 [2] CRAN (R 4.0.2)
#> highr 0.9 2021-04-16 [2] CRAN (R 4.0.2)
#> htmltools 0.5.3 2022-07-18 [2] CRAN (R 4.0.2)
#> knitr 1.40 2022-08-24 [2] CRAN (R 4.0.2)
#> lifecycle 1.0.3 2022-10-07 [2] CRAN (R 4.0.2)
#> magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.0.2)
#> pillar 1.8.1 2022-08-19 [2] CRAN (R 4.0.2)
#> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.2)
#> purrr 0.3.5 2022-10-06 [2] CRAN (R 4.0.2)
#> R.cache 0.16.0 2022-07-21 [2] CRAN (R 4.0.2)
#> R.methodsS3 1.8.2 2022-06-13 [2] CRAN (R 4.0.2)
#> R.oo 1.25.0 2022-06-12 [2] CRAN (R 4.0.2)
#> R.utils 2.12.0 2022-06-28 [2] CRAN (R 4.0.2)
#> reprex 2.0.2 2022-08-17 [2] CRAN (R 4.0.2)
#> rlang 1.0.6 2022-09-24 [2] CRAN (R 4.0.2)
#> rmarkdown 2.17 2022-10-07 [2] CRAN (R 4.0.2)
#> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.0.2)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.0.2)
#> stringi 1.7.8 2022-07-11 [2] CRAN (R 4.0.2)
#> stringr 1.4.1 2022-08-20 [2] CRAN (R 4.0.2)
#> styler 1.7.0 2022-03-13 [2] CRAN (R 4.0.2)
#> tibble 3.1.8 2022-07-22 [2] CRAN (R 4.0.2)
#> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.0.2)
#> vctrs 0.4.2 2022-09-29 [2] CRAN (R 4.0.2)
#> withr 2.5.0 2022-03-03 [2] CRAN (R 4.0.2)
#> xfun 0.33 2022-09-12 [2] CRAN (R 4.0.2)
#> yaml 2.3.5 2022-02-21 [2] CRAN (R 4.0.2)
#>
#> [1] /home/chenyz/R/x86_64-pc-linux-gnu-library/4.0
#> [2] /opt/software/R-4.0.2/lib64/R/library
#>
#> ────────────────────────────────────────────────────────────────────────────── I have already seen the solution of #526. I also run the code as follow: ''' Here is the results: library(tensorflow)
as_tensor(1)
#> Loaded Tensorflow version 2.9.2
#> tf.Tensor(1.0, shape=(), dtype=float32) Created on 2022-10-13 with reprex v2.0.2 Standard output and standard error2022-10-13 13:43:35.314847: I tensorflow/core/util/util.cc:169] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2022-10-13 13:43:35.916666: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/software/R-4.0.2/lib64/R/lib:/usr/local/lib64:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-1.el7.x86_64/jre/lib/amd64/server:/opt/software/R-4.0.2/lib64/R/lib::/lib:/usr/local/lib64:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-1.el7.x86_64/jre/lib/amd64/server
2022-10-13 13:43:35.916708: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2022-10-13 13:44:10.906048: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/software/R-4.0.2/lib64/R/lib:/usr/local/lib64:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-1.el7.x86_64/jre/lib/amd64/server:/opt/software/R-4.0.2/lib64/R/lib::/lib:/usr/local/lib64:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-1.el7.x86_64/jre/lib/amd64/server
2022-10-13 13:44:10.906100: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2022-10-13 13:44:10.906130: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (server): /proc/driver/nvidia/version does not exist
2022-10-13 13:44:10.925345: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F AVX512_VNNI FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.0.2 (2020-06-22)
#> os CentOS Linux 7 (Core)
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Asia/Shanghai
#> date 2022-10-13
#> pandoc 2.7.3 @ /usr/lib/rstudio-server/bin/pandoc/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> base64enc 0.1-3 2015-07-28 [2] CRAN (R 4.0.2)
#> cli 3.4.1 2022-09-23 [1] CRAN (R 4.0.2)
#> digest 0.6.29 2021-12-01 [2] CRAN (R 4.0.2)
#> evaluate 0.17 2022-10-07 [2] CRAN (R 4.0.2)
#> fansi 1.0.3 2022-03-24 [2] CRAN (R 4.0.2)
#> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.0.2)
#> fs 1.5.2 2021-12-08 [2] CRAN (R 4.0.2)
#> glue 1.6.2 2022-02-24 [2] CRAN (R 4.0.2)
#> here 1.0.1 2020-12-13 [2] CRAN (R 4.0.2)
#> highr 0.9 2021-04-16 [2] CRAN (R 4.0.2)
#> htmltools 0.5.3 2022-07-18 [2] CRAN (R 4.0.2)
#> jsonlite 1.8.2 2022-10-02 [2] CRAN (R 4.0.2)
#> knitr 1.40 2022-08-24 [2] CRAN (R 4.0.2)
#> lattice 0.20-45 2021-09-22 [2] CRAN (R 4.0.2)
#> lifecycle 1.0.3 2022-10-07 [2] CRAN (R 4.0.2)
#> magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.0.2)
#> Matrix 1.5-1 2022-09-13 [2] CRAN (R 4.0.2)
#> pillar 1.8.1 2022-08-19 [2] CRAN (R 4.0.2)
#> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.2)
#> png 0.1-7 2013-12-03 [2] CRAN (R 4.0.2)
#> purrr 0.3.5 2022-10-06 [2] CRAN (R 4.0.2)
#> R.cache 0.16.0 2022-07-21 [2] CRAN (R 4.0.2)
#> R.methodsS3 1.8.2 2022-06-13 [2] CRAN (R 4.0.2)
#> R.oo 1.25.0 2022-06-12 [2] CRAN (R 4.0.2)
#> R.utils 2.12.0 2022-06-28 [2] CRAN (R 4.0.2)
#> rappdirs 0.3.3 2021-01-31 [2] CRAN (R 4.0.2)
#> Rcpp 1.0.9 2022-07-08 [1] CRAN (R 4.0.2)
#> reprex 2.0.2 2022-08-17 [2] CRAN (R 4.0.2)
#> reticulate 1.26 2022-08-31 [2] CRAN (R 4.0.2)
#> rlang 1.0.6 2022-09-24 [2] CRAN (R 4.0.2)
#> rmarkdown 2.17 2022-10-07 [2] CRAN (R 4.0.2)
#> rprojroot 2.0.3 2022-04-02 [2] CRAN (R 4.0.2)
#> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.0.2)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.0.2)
#> stringi 1.7.8 2022-07-11 [2] CRAN (R 4.0.2)
#> stringr 1.4.1 2022-08-20 [2] CRAN (R 4.0.2)
#> styler 1.7.0 2022-03-13 [2] CRAN (R 4.0.2)
#> tensorflow * 2.9.0 2022-05-21 [1] CRAN (R 4.0.2)
#> tfruns 1.5.1 2022-09-05 [1] CRAN (R 4.0.2)
#> tibble 3.1.8 2022-07-22 [2] CRAN (R 4.0.2)
#> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.0.2)
#> vctrs 0.4.2 2022-09-29 [2] CRAN (R 4.0.2)
#> whisker 0.4 2019-08-28 [2] CRAN (R 4.0.2)
#> withr 2.5.0 2022-03-03 [2] CRAN (R 4.0.2)
#> xfun 0.33 2022-09-12 [2] CRAN (R 4.0.2)
#> yaml 2.3.5 2022-02-21 [2] CRAN (R 4.0.2)
#>
#> [1] /home/chenyz/R/x86_64-pc-linux-gnu-library/4.0
#> [2] /opt/software/R-4.0.2/lib64/R/library
#>
#> ─ Python configuration ───────────────────────────────────────────────────────
#> python: /home/chenyz/.local/share/r-miniconda/envs/r-reticulate/bin/python
#> libpython: /home/chenyz/.local/share/r-miniconda/envs/r-reticulate/lib/libpython3.8.so
#> pythonhome: /home/chenyz/.local/share/r-miniconda/envs/r-reticulate:/home/chenyz/.local/share/r-miniconda/envs/r-reticulate
#> version: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18) [GCC 10.3.0]
#> numpy: /home/chenyz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.8/site-packages/numpy
#> numpy_version: 1.23.3
#>
#> ────────────────────────────────────────────────────────────────────────────── I think that is not the problem of tensorflow. |
Hi @BillyChen123 - thanks for this. It looks like you are on Linux - which is good, I thought that the error might be tied up to using an M1 mac, which is seems it isn't! The other reprex with Can you try: reprex::reprex(library(greta),
std_out_err = TRUE,
si = TRUE
) And paste the information in? The next thing I would recommend is for you to use the |
Thank you! I follow your advice, and there is still not error. library(greta)
#>
#> Attaching package: 'greta'
#> The following objects are masked from 'package:stats':
#>
#> binomial, cov2cor, poisson
#> The following objects are masked from 'package:base':
#>
#> %*%, apply, backsolve, beta, chol2inv, colMeans, colSums, diag,
#> eigen, forwardsolve, gamma, identity, rowMeans, rowSums, sweep,
#> tapply Created on 2022-10-13 with reprex v2.0.2 Standard output and standard error-- nothing to show -- Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.0.2 (2020-06-22)
#> os CentOS Linux 7 (Core)
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Asia/Shanghai
#> date 2022-10-13
#> pandoc 2.7.3 @ /usr/lib/rstudio-server/bin/pandoc/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> base64enc 0.1-3 2015-07-28 [2] CRAN (R 4.0.2)
#> callr 3.7.2 2022-08-22 [2] CRAN (R 4.0.2)
#> cli 3.4.1 2022-09-23 [1] CRAN (R 4.0.2)
#> coda 0.19-4 2020-09-30 [2] CRAN (R 4.0.2)
#> codetools 0.2-18 2020-11-04 [2] CRAN (R 4.0.2)
#> crayon 1.5.2 2022-09-29 [2] CRAN (R 4.0.2)
#> digest 0.6.29 2021-12-01 [2] CRAN (R 4.0.2)
#> ellipsis 0.3.2 2021-04-29 [2] CRAN (R 4.0.2)
#> evaluate 0.17 2022-10-07 [2] CRAN (R 4.0.2)
#> fansi 1.0.3 2022-03-24 [2] CRAN (R 4.0.2)
#> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.0.2)
#> fs 1.5.2 2021-12-08 [2] CRAN (R 4.0.2)
#> future 1.28.0 2022-09-02 [2] CRAN (R 4.0.2)
#> globals 0.16.1 2022-08-28 [2] CRAN (R 4.0.2)
#> glue 1.6.2 2022-02-24 [2] CRAN (R 4.0.2)
#> greta * 0.4.3 2022-09-08 [1] CRAN (R 4.0.2)
#> highr 0.9 2021-04-16 [2] CRAN (R 4.0.2)
#> hms 1.1.2 2022-08-19 [2] CRAN (R 4.0.2)
#> htmltools 0.5.3 2022-07-18 [2] CRAN (R 4.0.2)
#> jsonlite 1.8.2 2022-10-02 [2] CRAN (R 4.0.2)
#> knitr 1.40 2022-08-24 [2] CRAN (R 4.0.2)
#> lattice 0.20-45 2021-09-22 [2] CRAN (R 4.0.2)
#> lifecycle 1.0.3 2022-10-07 [2] CRAN (R 4.0.2)
#> listenv 0.8.0 2019-12-05 [2] CRAN (R 4.0.2)
#> magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.0.2)
#> Matrix 1.5-1 2022-09-13 [2] CRAN (R 4.0.2)
#> parallelly 1.32.1 2022-07-21 [2] CRAN (R 4.0.2)
#> pillar 1.8.1 2022-08-19 [2] CRAN (R 4.0.2)
#> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.2)
#> png 0.1-7 2013-12-03 [2] CRAN (R 4.0.2)
#> prettyunits 1.1.1 2020-01-24 [2] CRAN (R 4.0.2)
#> processx 3.7.0 2022-07-07 [2] CRAN (R 4.0.2)
#> progress 1.2.2 2019-05-16 [2] CRAN (R 4.0.2)
#> ps 1.7.1 2022-06-18 [2] CRAN (R 4.0.2)
#> purrr 0.3.5 2022-10-06 [2] CRAN (R 4.0.2)
#> R.cache 0.16.0 2022-07-21 [2] CRAN (R 4.0.2)
#> R.methodsS3 1.8.2 2022-06-13 [2] CRAN (R 4.0.2)
#> R.oo 1.25.0 2022-06-12 [2] CRAN (R 4.0.2)
#> R.utils 2.12.0 2022-06-28 [2] CRAN (R 4.0.2)
#> R6 2.5.1 2021-08-19 [2] CRAN (R 4.0.2)
#> rappdirs 0.3.3 2021-01-31 [2] CRAN (R 4.0.2)
#> Rcpp 1.0.9 2022-07-08 [1] CRAN (R 4.0.2)
#> reprex 2.0.2 2022-08-17 [2] CRAN (R 4.0.2)
#> reticulate 1.26 2022-08-31 [2] CRAN (R 4.0.2)
#> rlang 1.0.6 2022-09-24 [2] CRAN (R 4.0.2)
#> rmarkdown 2.17 2022-10-07 [2] CRAN (R 4.0.2)
#> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.0.2)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.0.2)
#> stringi 1.7.8 2022-07-11 [2] CRAN (R 4.0.2)
#> stringr 1.4.1 2022-08-20 [2] CRAN (R 4.0.2)
#> styler 1.7.0 2022-03-13 [2] CRAN (R 4.0.2)
#> tensorflow 2.9.0 2022-05-21 [1] CRAN (R 4.0.2)
#> tfruns 1.5.1 2022-09-05 [1] CRAN (R 4.0.2)
#> tibble 3.1.8 2022-07-22 [2] CRAN (R 4.0.2)
#> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.0.2)
#> vctrs 0.4.2 2022-09-29 [2] CRAN (R 4.0.2)
#> whisker 0.4 2019-08-28 [2] CRAN (R 4.0.2)
#> withr 2.5.0 2022-03-03 [2] CRAN (R 4.0.2)
#> xfun 0.33 2022-09-12 [2] CRAN (R 4.0.2)
#> yaml 2.3.5 2022-02-21 [2] CRAN (R 4.0.2)
#>
#> [1] /home/chenyz/R/x86_64-pc-linux-gnu-library/4.0
#> [2] /opt/software/R-4.0.2/lib64/R/library
#>
#> ────────────────────────────────────────────────────────────────────────────── Then I use the ''' greta::reinstall_greta_deps() ''' function to fresh installation of the python dependencies. There is a decision that I have to make: Are you sure you want to delete miniconda from /home/chenyz/.local/share/r-miniconda? Could you tell me which one should I choose? |
Hello, sorry to disturb you. I have already use the '''greta::reinstall_greta_deps()''' function. But it still can't work. |
Hi @BillyChen123 ! RE,
You should select the option that aligns with "yes" - this option and name of the option will change each time, which is by design - sometimes it is "yes, no, maybe", and other times something else entirely. But you want to remove it. |
The next thing you can do is, just as you have made that lovely reprex above with no error, if you can do the same but for the code that errors, so I can get more information, hopefully we can work this out! |
@njtierney Thanks! greta::greta_sitrep()
#> ℹ checking if python available
#> Warning in py_initialize(config$python, config$libpython, config$pythonhome, :
#> Python 2 reached EOL on January 1, 2020. Python 2 compatability be removed in an
#> upcoming reticulate release.
#> ✖ python available, however 3.7 is needed and 2.7 was detected
#>
#> ℹ checking if TensorFlow available
#> ✖ TensorFlow not available
#>
#> ℹ checking if TensorFlow Probability available
#> ✖ TensorFlow Probability not available
#>
#> ℹ checking if greta conda environment available
#> ✖ greta conda environment not available
#>
#> ℹ Initialising python and checking dependencies, this may take a moment.
#> ✖ Initialising python and checking dependencies, this may take a moment. ... fa…
#>
#> Warning: We have detected that you do not have the expected python packages setup.
#> You can set these up by running this R code in the console:
#> `install_greta_deps()`
#> Then, restart R and run:
#> `library(greta)`
#> (Note: Your R session should not have initialised Tensorflow yet.)
#> For more information, see `?install_greta_deps` Created on 2022-10-17 with reprex v2.0.2 Standard output and standard error-- nothing to show -- Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.0.2 (2020-06-22)
#> os CentOS Linux 7 (Core)
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Asia/Shanghai
#> date 2022-10-17
#> pandoc 2.7.3 @ /usr/lib/rstudio-server/bin/pandoc/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> base64enc 0.1-3 2015-07-28 [2] CRAN (R 4.0.2)
#> callr 3.7.2 2022-08-22 [2] CRAN (R 4.0.2)
#> cli 3.4.1 2022-09-23 [1] CRAN (R 4.0.2)
#> coda 0.19-4 2020-09-30 [2] CRAN (R 4.0.2)
#> codetools 0.2-18 2020-11-04 [2] CRAN (R 4.0.2)
#> crayon 1.5.2 2022-09-29 [2] CRAN (R 4.0.2)
#> digest 0.6.29 2021-12-01 [2] CRAN (R 4.0.2)
#> ellipsis 0.3.2 2021-04-29 [2] CRAN (R 4.0.2)
#> evaluate 0.17 2022-10-07 [2] CRAN (R 4.0.2)
#> fansi 1.0.3 2022-03-24 [2] CRAN (R 4.0.2)
#> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.0.2)
#> fs 1.5.2 2021-12-08 [2] CRAN (R 4.0.2)
#> future 1.28.0 2022-09-02 [2] CRAN (R 4.0.2)
#> globals 0.16.1 2022-08-28 [2] CRAN (R 4.0.2)
#> glue 1.6.2 2022-02-24 [2] CRAN (R 4.0.2)
#> greta 0.4.3 2022-09-08 [1] CRAN (R 4.0.2)
#> here 1.0.1 2020-12-13 [2] CRAN (R 4.0.2)
#> highr 0.9 2021-04-16 [2] CRAN (R 4.0.2)
#> hms 1.1.2 2022-08-19 [2] CRAN (R 4.0.2)
#> htmltools 0.5.3 2022-07-18 [2] CRAN (R 4.0.2)
#> jsonlite 1.8.2 2022-10-02 [2] CRAN (R 4.0.2)
#> knitr 1.40 2022-08-24 [2] CRAN (R 4.0.2)
#> lattice 0.20-45 2021-09-22 [2] CRAN (R 4.0.2)
#> lifecycle 1.0.3 2022-10-07 [2] CRAN (R 4.0.2)
#> listenv 0.8.0 2019-12-05 [2] CRAN (R 4.0.2)
#> magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.0.2)
#> Matrix 1.5-1 2022-09-13 [2] CRAN (R 4.0.2)
#> parallelly 1.32.1 2022-07-21 [2] CRAN (R 4.0.2)
#> pillar 1.8.1 2022-08-19 [2] CRAN (R 4.0.2)
#> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.2)
#> png 0.1-7 2013-12-03 [2] CRAN (R 4.0.2)
#> prettyunits 1.1.1 2020-01-24 [2] CRAN (R 4.0.2)
#> processx 3.7.0 2022-07-07 [2] CRAN (R 4.0.2)
#> progress 1.2.2 2019-05-16 [2] CRAN (R 4.0.2)
#> ps 1.7.1 2022-06-18 [2] CRAN (R 4.0.2)
#> purrr 0.3.5 2022-10-06 [2] CRAN (R 4.0.2)
#> R.cache 0.16.0 2022-07-21 [2] CRAN (R 4.0.2)
#> R.methodsS3 1.8.2 2022-06-13 [2] CRAN (R 4.0.2)
#> R.oo 1.25.0 2022-06-12 [2] CRAN (R 4.0.2)
#> R.utils 2.12.0 2022-06-28 [2] CRAN (R 4.0.2)
#> R6 2.5.1 2021-08-19 [2] CRAN (R 4.0.2)
#> rappdirs 0.3.3 2021-01-31 [2] CRAN (R 4.0.2)
#> Rcpp 1.0.9 2022-07-08 [1] CRAN (R 4.0.2)
#> reprex 2.0.2 2022-08-17 [2] CRAN (R 4.0.2)
#> reticulate 1.26 2022-08-31 [2] CRAN (R 4.0.2)
#> rlang 1.0.6 2022-09-24 [2] CRAN (R 4.0.2)
#> rmarkdown 2.17 2022-10-07 [2] CRAN (R 4.0.2)
#> rprojroot 2.0.3 2022-04-02 [2] CRAN (R 4.0.2)
#> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.0.2)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.0.2)
#> stringi 1.7.8 2022-07-11 [2] CRAN (R 4.0.2)
#> stringr 1.4.1 2022-08-20 [2] CRAN (R 4.0.2)
#> styler 1.7.0 2022-03-13 [2] CRAN (R 4.0.2)
#> tensorflow 2.9.0 2022-05-21 [1] CRAN (R 4.0.2)
#> tfruns 1.5.1 2022-09-05 [1] CRAN (R 4.0.2)
#> tibble 3.1.8 2022-07-22 [2] CRAN (R 4.0.2)
#> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.0.2)
#> vctrs 0.4.2 2022-09-29 [2] CRAN (R 4.0.2)
#> whisker 0.4 2019-08-28 [2] CRAN (R 4.0.2)
#> withr 2.5.0 2022-03-03 [2] CRAN (R 4.0.2)
#> xfun 0.33 2022-09-12 [2] CRAN (R 4.0.2)
#> yaml 2.3.5 2022-02-21 [2] CRAN (R 4.0.2)
#>
#> [1] /home/chenyz/R/x86_64-pc-linux-gnu-library/4.0
#> [2] /opt/software/R-4.0.2/lib64/R/library
#>
#> ─ Python configuration ───────────────────────────────────────────────────────
#> python: /usr/bin/python
#> libpython: /usr/lib64/python2.7/config/libpython2.7.so
#> pythonhome: //usr://usr
#> version: 2.7.5 (default, Oct 14 2020, 14:45:30) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
#> numpy: /usr/lib64/python2.7/site-packages/numpy
#> numpy_version: 1.7.1
#> tensorflow: [NOT FOUND]
#>
#> ────────────────────────────────────────────────────────────────────────────── So, should I run 'install_greta_deps()' again? |
Thanks! I would suggest running Let me know how you go? |
Hi!@njtierney Selection: 2
|
Hi @BillyChen123 - looks like you might need more time to install, it also looks like an error message got chopped off in your issue post above? I'd recommend increasing the timeout for installation, using the code provided below. install_greta_deps(timeout = 15) Alternatively if that doesn't work, you could try following the alternative installation instructions that are provided in the message in your post above?
|
Hi! @njtierney reticulate::conda_install(envname = 'greta-env', packages = c('numpy==1.16.4', 'tensorflow-probability==0.7.0', 'tensorflow==1.14.0'))
Package Planenvironment location: /home/chenyz/.local/share/r-miniconda/envs/greta-env added / updated specs: The following packages will be downloaded:
The following NEW packages will be INSTALLED: absl-py conda-forge/noarch::absl-py-1.3.0-pyhd8ed1ab_0 None Downloading and Extracting Packages Error: one or more Python packages failed to install [error code 1] |
So just to confirm, you ran the following code reticulate::install_miniconda() Then you ran: reticulate::conda_create(envname = 'greta-env', python_version = '3.7') Then you ran reticulate::conda_install(envname = 'greta-env', packages = c('numpy==1.16.4', 'tensorflow-probability==0.7.0', 'tensorflow==1.14.0')) Is that correct? Just want to double check - thanks for your patience with this, installation is a tricky business, hopefully we can solve this soon! |
Hi! @njtierney
Error in download.file(url, destfile = installer, mode = "wb") : |
Hi @BillyChen123 - thanks for that! It looks like there might be an issue with installing miniconda. Can you try the following? greta::remove_miniconda() select the appropriate option, then: reticulate::install_miniconda() Then, just to see if this helps, try: reticulate::conda_update() Then do: greta::install_greta_deps() And if the Then try the following: reticulate::conda_create(envname = 'greta-env', python_version = '3.7') Then: reticulate::conda_install(envname = 'greta-env', packages = c('numpy==1.16.4', 'tensorflow-probability==0.7.0', 'tensorflow==1.14.0')) Thanks again for posting, hopefully this proves helpful. If this doesn't work, perhaps there is an issue with installing conda on your linux machine? We shall see! |
Hi! @njtierney Standard output and error *** caught segfault ***
address 0x50, cause 'memory not mapped'
Traceback:
1: py_module_import(module, convert = convert)
2: import(module)
3: doTryCatch(return(expr), name, parentenv, handler)
4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
5: tryCatchList(expr, classes, parentenv, handlers)
6: tryCatch({ import(module) TRUE}, error = clear_error_handler(FALSE))
7: reticulate::py_module_available("tensorflow")
8: have_tf()
9: check_if_software_available(software_available = have_tf(), version = version_tf(), ideal_version = "1.14.0", software_name = "TensorFlow")
10: greta::greta_sitrep()
11: eval(expr, envir, enclos)
12: eval(expr, envir, enclos)
13: eval_with_user_handlers(expr, envir, enclos, user_handlers)
14: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers))
15: withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)
16: doTryCatch(return(expr), name, parentenv, handler)
17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
18: tryCatchList(expr, classes, parentenv, handlers)
19: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
20: try(f, silent = TRUE)
21: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))
22: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)))
23: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, output_handler = output_handler, include_timing = include_timing)
24: evaluate::evaluate(...)
25: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))
26: in_dir(input_dir(), expr)
27: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)))
28: eng_r(options)
29: block_exec(params)
30: call_block(x)
31: process_group.block(group)
32: process_group(group)
33: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { setwd(wd) cat(res, sep = "\n", file = output %n% "") message("Quitting from lines ", paste(current_lines(i), collapse = "-"), " (", knit_concord$get("infile"), ") ") })
34: process_file(text, output)
35: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
36: rmarkdown::render(input, quiet = TRUE, envir = globalenv(), encoding = "UTF-8")
37: (function (input) { rmarkdown::render(input, quiet = TRUE, envir = globalenv(), encoding = "UTF-8")})(input = base::quote("bad-grub_reprex.R"))
38: (function (what, args, quote = FALSE, envir = parent.frame()) { if (!is.list(args)) stop("second argument must be a list") if (quote) args <- lapply(args, enquote) .Internal(do.call(what, args, envir))})(base::quote(function (input) { rmarkdown::render(input, quiet = TRUE, envir = globalenv(), encoding = "UTF-8")}), base::quote(list(input = "bad-grub_reprex.R")), envir = base::quote(<environment>), quote = base::quote(TRUE))
39: do.call(do.call, c(readRDS("/tmp/RtmpAZafdJ/callr-fun-118277ef7856"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE)
40: saveRDS(do.call(do.call, c(readRDS("/tmp/RtmpAZafdJ/callr-fun-118277ef7856"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = "/tmp/RtmpAZafdJ/callr-res-11824520d30d", compress = FALSE)
41: withCallingHandlers({ NULL saveRDS(do.call(do.call, c(readRDS("/tmp/RtmpAZafdJ/callr-fun-118277ef7856"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = "/tmp/RtmpAZafdJ/callr-res-11824520d30d", compress = FALSE) flush(stdout()) flush(stderr()) NULL invisible()}, error = function(e) { { callr_data <- as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { assign(".Traceback", .traceback(4), envir = callr_data) dump.frames("__callr_dump__") assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class(e2) <- c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- which(e2$trace$scope == "global")[1] if (!is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } saveRDS(list("error", e2, e), file = paste0("/tmp/RtmpAZafdJ/callr-res-11824520d30d", ".error")) }}, interrupt = function(e) { { callr_data <- as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { assign(".Traceback", .traceback(4), envir = callr_data) dump.frames("__callr_dump__") assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class(e2) <- c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- which(e2$trace$scope == "global")[1] if (!is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } saveRDS(list("error", e2, e), file = paste0("/tmp/RtmpAZafdJ/callr-res-11824520d30d", ".error")) }}, callr_message = function(e) { try(signalCondition(e))})
42: doTryCatch(return(expr), name, parentenv, handler)
43: tryCatchOne(expr, names, parentenv, handlers[[1L]])
44: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
45: doTryCatch(return(expr), name, parentenv, handler)
46: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]])
47: tryCatchList(expr, classes, parentenv, handlers)
48: tryCatch(withCallingHandlers({ NULL saveRDS(do.call(do.call, c(readRDS("/tmp/RtmpAZafdJ/callr-fun-118277ef7856"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = "/tmp/RtmpAZafdJ/callr-res-11824520d30d", compress = FALSE) flush(stdout()) flush(stderr()) NULL invisible()}, error = function(e) { { callr_data <- as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { assign(".Traceback", .traceback(4), envir = callr_data) dump.frames("__callr_dump__") assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class(e2) <- c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- which(e2$trace$scope == "global")[1] if (!is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } saveRDS(list("error", e2, e), file = paste0("/tmp/RtmpAZafdJ/callr-res-11824520d30d", ".error")) }}, interrupt = function(e) { { callr_data <- as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { assign(".Traceback", .traceback(4), envir = callr_data) dump.frames("__callr_dump__") assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class(e2) <- c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- which(e2$trace$scope == "global")[1] if (!is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } saveRDS(list("error", e2, e), file = paste0("/tmp/RtmpAZafdJ/callr-res-11824520d30d", ".error")) }}, callr_message = function(e) { try(signalCondition(e))}), error = function(e) { NULL try(stop(e))}, interrupt = function(e) { NULL e})
An irrecoverable exception occurred. R is aborting now ... |
Hi @BillyChen123 ! Thanks for the reprex on this - It looks like the standard output and session info got lopped off in the message above, can you update them or post another example? You can see how it will look on github by clicking the "preview" tab if you want to check that they are there. We're looking for the part that looks like this: Looking further at the error you are getting, I came across this thread on stack overflow: https://stackoverflow.com/questions/49190251/caught-segfault-memory-not-mapped-error-in-r I'm wondering if maybe you've updated R recently, and if so, have you had this issue with other libraries, like the tidyverse, or stringi? |
Hi! @njtierney |
Hmmm! So it sounds like the reprex code isn't capturing the session info - normally there should be those little arrows that allow you to see the extra information, but if the reprex you ran didn't provide them, perhaps there is a some issue with the bug interferring with the reprex package. We could try running the individual parts of reprex::reprex({
have_python()
reticulate::py_version()
have_tf()
version_tf()
have_tfp()
version_tfp()
have_greta_conda_env()
},
si = TRUE,
std_out_err = TRUE) And if that errors, you could try each line of code in it's own reprex to see if one of them in particular triggers the error. That would be my approach! |
Hi! @njtierney have_python()
#> Error in have_python(): could not find function "have_python"
reticulate::py_version()
#> NULL
have_tf()
#> Error in have_tf(): could not find function "have_tf"
version_tf()
#> Error in version_tf(): could not find function "version_tf"
have_tfp()
#> Error in have_tfp(): could not find function "have_tfp"
version_tfp()
#> Error in version_tfp(): could not find function "version_tfp"
have_greta_conda_env()
#> Error in have_greta_conda_env(): could not find function "have_greta_conda_env" Created on 2022-10-19 with reprex v2.0.2 Standard output and standard error-- nothing to show -- Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.0.2 (2020-06-22)
#> os CentOS Linux 7 (Core)
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Asia/Shanghai
#> date 2022-10-19
#> pandoc 2.7.3 @ /usr/lib/rstudio-server/bin/pandoc/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> cli 3.4.1 2022-09-23 [1] CRAN (R 4.0.2)
#> digest 0.6.29 2021-12-01 [2] CRAN (R 4.0.2)
#> evaluate 0.17 2022-10-07 [2] CRAN (R 4.0.2)
#> fansi 1.0.3 2022-03-24 [2] CRAN (R 4.0.2)
#> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.0.2)
#> fs 1.5.2 2021-12-08 [2] CRAN (R 4.0.2)
#> glue 1.6.2 2022-02-24 [2] CRAN (R 4.0.2)
#> highr 0.9 2021-04-16 [2] CRAN (R 4.0.2)
#> htmltools 0.5.3 2022-07-18 [2] CRAN (R 4.0.2)
#> jsonlite 1.8.2 2022-10-02 [2] CRAN (R 4.0.2)
#> knitr 1.40 2022-08-24 [2] CRAN (R 4.0.2)
#> lattice 0.20-45 2021-09-22 [2] CRAN (R 4.0.2)
#> lifecycle 1.0.3 2022-10-07 [2] CRAN (R 4.0.2)
#> magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.0.2)
#> Matrix 1.5-1 2022-09-13 [2] CRAN (R 4.0.2)
#> pillar 1.8.1 2022-08-19 [2] CRAN (R 4.0.2)
#> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.2)
#> png 0.1-7 2013-12-03 [2] CRAN (R 4.0.2)
#> purrr 0.3.5 2022-10-06 [2] CRAN (R 4.0.2)
#> R.cache 0.16.0 2022-07-21 [2] CRAN (R 4.0.2)
#> R.methodsS3 1.8.2 2022-06-13 [2] CRAN (R 4.0.2)
#> R.oo 1.25.0 2022-06-12 [2] CRAN (R 4.0.2)
#> R.utils 2.12.0 2022-06-28 [2] CRAN (R 4.0.2)
#> Rcpp 1.0.9 2022-07-08 [1] CRAN (R 4.0.2)
#> reprex 2.0.2 2022-08-17 [2] CRAN (R 4.0.2)
#> reticulate 1.26 2022-08-31 [2] CRAN (R 4.0.2)
#> rlang 1.0.6 2022-09-24 [2] CRAN (R 4.0.2)
#> rmarkdown 2.17 2022-10-07 [2] CRAN (R 4.0.2)
#> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.0.2)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.0.2)
#> stringi 1.7.8 2022-07-11 [2] CRAN (R 4.0.2)
#> stringr 1.4.1 2022-08-20 [2] CRAN (R 4.0.2)
#> styler 1.7.0 2022-03-13 [2] CRAN (R 4.0.2)
#> tibble 3.1.8 2022-07-22 [2] CRAN (R 4.0.2)
#> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.0.2)
#> vctrs 0.4.2 2022-09-29 [2] CRAN (R 4.0.2)
#> withr 2.5.0 2022-03-03 [2] CRAN (R 4.0.2)
#> xfun 0.33 2022-09-12 [2] CRAN (R 4.0.2)
#> yaml 2.3.5 2022-02-21 [2] CRAN (R 4.0.2)
#>
#> [1] /home/chenyz/R/x86_64-pc-linux-gnu-library/4.0
#> [2] /opt/software/R-4.0.2/lib64/R/library
#>
#> ────────────────────────────────────────────────────────────────────────────── |
Ack, my apologies! Try: reprex::reprex({
greta:::have_python()
reticulate::py_version()
greta:::have_tf()
greta:::version_tf()
greta:::have_tfp()
greta:::version_tfp()
greta:::have_greta_conda_env()
},
si = TRUE,
std_out_err = TRUE) These functions aren't exported, so using |
And failing this, I would suggest that perhaps you might benefit from upgrading your version of R - which I know can be a pain to reinstall packages again, but that version of R is about 2 years old and it could well be the cause of the issue in some way. |
reticulate::py_version()
#> NULL Created on 2022-10-19 with reprex v2.0.2 Standard output and standard error-- nothing to show -- Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.0.2 (2020-06-22)
#> os CentOS Linux 7 (Core)
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Asia/Shanghai
#> date 2022-10-19
#> pandoc 2.7.3 @ /usr/lib/rstudio-server/bin/pandoc/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> cli 3.4.1 2022-09-23 [1] CRAN (R 4.0.2)
#> digest 0.6.29 2021-12-01 [2] CRAN (R 4.0.2)
#> evaluate 0.17 2022-10-07 [2] CRAN (R 4.0.2)
#> fansi 1.0.3 2022-03-24 [2] CRAN (R 4.0.2)
#> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.0.2)
#> fs 1.5.2 2021-12-08 [2] CRAN (R 4.0.2)
#> glue 1.6.2 2022-02-24 [2] CRAN (R 4.0.2)
#> highr 0.9 2021-04-16 [2] CRAN (R 4.0.2)
#> htmltools 0.5.3 2022-07-18 [2] CRAN (R 4.0.2)
#> jsonlite 1.8.2 2022-10-02 [2] CRAN (R 4.0.2)
#> knitr 1.40 2022-08-24 [2] CRAN (R 4.0.2)
#> lattice 0.20-45 2021-09-22 [2] CRAN (R 4.0.2)
#> lifecycle 1.0.3 2022-10-07 [2] CRAN (R 4.0.2)
#> magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.0.2)
#> Matrix 1.5-1 2022-09-13 [2] CRAN (R 4.0.2)
#> pillar 1.8.1 2022-08-19 [2] CRAN (R 4.0.2)
#> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.2)
#> png 0.1-7 2013-12-03 [2] CRAN (R 4.0.2)
#> purrr 0.3.5 2022-10-06 [2] CRAN (R 4.0.2)
#> R.cache 0.16.0 2022-07-21 [2] CRAN (R 4.0.2)
#> R.methodsS3 1.8.2 2022-06-13 [2] CRAN (R 4.0.2)
#> R.oo 1.25.0 2022-06-12 [2] CRAN (R 4.0.2)
#> R.utils 2.12.0 2022-06-28 [2] CRAN (R 4.0.2)
#> Rcpp 1.0.9 2022-07-08 [1] CRAN (R 4.0.2)
#> reprex 2.0.2 2022-08-17 [2] CRAN (R 4.0.2)
#> reticulate 1.26 2022-08-31 [2] CRAN (R 4.0.2)
#> rlang 1.0.6 2022-09-24 [2] CRAN (R 4.0.2)
#> rmarkdown 2.17 2022-10-07 [2] CRAN (R 4.0.2)
#> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.0.2)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.0.2)
#> stringi 1.7.8 2022-07-11 [2] CRAN (R 4.0.2)
#> stringr 1.4.1 2022-08-20 [2] CRAN (R 4.0.2)
#> styler 1.7.0 2022-03-13 [2] CRAN (R 4.0.2)
#> tibble 3.1.8 2022-07-22 [2] CRAN (R 4.0.2)
#> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.0.2)
#> vctrs 0.4.2 2022-09-29 [2] CRAN (R 4.0.2)
#> withr 2.5.0 2022-03-03 [2] CRAN (R 4.0.2)
#> xfun 0.33 2022-09-12 [2] CRAN (R 4.0.2)
#> yaml 2.3.5 2022-02-21 [2] CRAN (R 4.0.2)
#>
#> [1] /home/chenyz/R/x86_64-pc-linux-gnu-library/4.0
#> [2] /opt/software/R-4.0.2/lib64/R/library
#>
#> ────────────────────────────────────────────────────────────────────────────── |
This reprex appears to crash R. Standard output and error *** caught segfault ***
address 0x50, cause 'memory not mapped'
Traceback:
1: py_module_import(module, convert = convert)
2: import(module)
3: doTryCatch(return(expr), name, parentenv, handler)
4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
5: tryCatchList(expr, classes, parentenv, handlers)
6: tryCatch({ import(module) TRUE}, error = clear_error_handler(FALSE))
7: reticulate::py_module_available("tensorflow")
8: greta:::have_tf()
9: eval(expr, envir, enclos)
10: eval(expr, envir, enclos)
11: eval_with_user_handlers(expr, envir, enclos, user_handlers)
12: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers))
13: withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)
14: doTryCatch(return(expr), name, parentenv, handler)
15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
16: tryCatchList(expr, classes, parentenv, handlers)
17: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
18: try(f, silent = TRUE)
19: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))
20: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)))
21: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, output_handler = output_handler, include_timing = include_timing)
22: evaluate::evaluate(...)
23: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))
24: in_dir(input_dir(), expr)
25: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)))
26: eng_r(options)
27: block_exec(params)
28: call_block(x)
29: process_group.block(group)
30: process_group(group)
31: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { setwd(wd) cat(res, sep = "\n", file = output %n% "") message("Quitting from lines ", paste(current_lines(i), collapse = "-"), " (", knit_concord$get("infile"), ") ") })
32: process_file(text, output)
33: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
34: rmarkdown::render(input, quiet = TRUE, envir = globalenv(), encoding = "UTF-8")
35: (function (input) { rmarkdown::render(input, quiet = TRUE, envir = globalenv(), encoding = "UTF-8")})(input = base::quote("sane-eyas_reprex.R"))
36: (function (what, args, quote = FALSE, envir = parent.frame()) { if (!is.list(args)) stop("second argument must be a list") if (quote) args <- lapply(args, enquote) .Internal(do.call(what, args, envir))})(base::quote(function (input) { rmarkdown::render(input, quiet = TRUE, envir = globalenv(), encoding = "UTF-8")}), base::quote(list(input = "sane-eyas_reprex.R")), envir = base::quote(<environment>), quote = base::quote(TRUE))
37: do.call(do.call, c(readRDS("/tmp/RtmpKk0QhA/callr-fun-497929e2d840"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE)
38: saveRDS(do.call(do.call, c(readRDS("/tmp/RtmpKk0QhA/callr-fun-497929e2d840"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = "/tmp/RtmpKk0QhA/callr-res-49797239d88c", compress = FALSE)
39: withCallingHandlers({ NULL saveRDS(do.call(do.call, c(readRDS("/tmp/RtmpKk0QhA/callr-fun-497929e2d840"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = "/tmp/RtmpKk0QhA/callr-res-49797239d88c", compress = FALSE) flush(stdout()) flush(stderr()) NULL invisible()}, error = function(e) { { callr_data <- as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { assign(".Traceback", .traceback(4), envir = callr_data) dump.frames("__callr_dump__") assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class(e2) <- c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- which(e2$trace$scope == "global")[1] if (!is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } saveRDS(list("error", e2, e), file = paste0("/tmp/RtmpKk0QhA/callr-res-49797239d88c", ".error")) }}, interrupt = function(e) { { callr_data <- as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { assign(".Traceback", .traceback(4), envir = callr_data) dump.frames("__callr_dump__") assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class(e2) <- c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- which(e2$trace$scope == "global")[1] if (!is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } saveRDS(list("error", e2, e), file = paste0("/tmp/RtmpKk0QhA/callr-res-49797239d88c", ".error")) }}, callr_message = function(e) { try(signalCondition(e))})
40: doTryCatch(return(expr), name, parentenv, handler)
41: tryCatchOne(expr, names, parentenv, handlers[[1L]])
42: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
43: doTryCatch(return(expr), name, parentenv, handler)
44: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]])
45: tryCatchList(expr, classes, parentenv, handlers)
46: tryCatch(withCallingHandlers({ NULL saveRDS(do.call(do.call, c(readRDS("/tmp/RtmpKk0QhA/callr-fun-497929e2d840"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = "/tmp/RtmpKk0QhA/callr-res-49797239d88c", compress = FALSE) flush(stdout()) flush(stderr()) NULL invisible()}, error = function(e) { { callr_data <- as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { assign(".Traceback", .traceback(4), envir = callr_data) dump.frames("__callr_dump__") assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class(e2) <- c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- which(e2$trace$scope == "global")[1] if (!is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } saveRDS(list("error", e2, e), file = paste0("/tmp/RtmpKk0QhA/callr-res-49797239d88c", ".error")) }}, interrupt = function(e) { { callr_data <- as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { assign(".Traceback", .traceback(4), envir = callr_data) dump.frames("__callr_dump__") assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class(e2) <- c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- which(e2$trace$scope == "global")[1] if (!is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } saveRDS(list("error", e2, e), file = paste0("/tmp/RtmpKk0QhA/callr-res-49797239d88c", ".error")) }}, callr_message = function(e) { try(signalCondition(e))}), error = function(e) { NULL try(stop(e))}, interrupt = function(e) { NULL e})
An irrecoverable exception occurred. R is aborting now ... This is the problem.
|
Hi there @BillyChen123 OK, so then to confirm things: reprex::reprex(
reticulate::py_module_available("tensorflow"),
si = TRUE,
std_out_err = TRUE
) Does that produce the same error? In which case, you might be best off logging an issue with the team at tensorflow (here: https://github.com/rstudio/tensorflow) as it looks like the main issue is with installing tensorflow, and beyond the help that I've suggested here, I'm not sure how to help resolve this, unfortunately. If you post an issue on the tensorflow issue page and link this issue by pasting this link, e.g., saying something like
Hopefully they can help from there? I'll keep a watch on the issue you open up! |
For what is it worth, I would try using the latest version of R to see if this problem persists, as using an older version of R makes the problem harder to reproduce for other users |
Hi! @njtierney |
Thanks! I'll be keeping an eye on things over there. I'll close this issue for the time being. |
@njtierney Is greta compatible with TF v2 today? Looking at rstudio/tensorflow#548, TF v1 is not something we include in our CI tests anymore or generally support, though if greta is still on TF v1 then that changes things. If you are on TF v1, is there maybe a blocker I can help with on the tensorflow package side? |
address 0x50, cause 'memory not mapped'
I followed the standard process of installing greta on the server. But when I started to use it, my R session was accidently crashed. The situation was similar with the problem #526 but has the different error. I am pretty sure that my tensorflow was installed perfectly. But when I run the basic function in greta like normal(0,1). The R session was crashed. I took reprex(greta::greta_sitrep(), std_out_err = TRUE, si = TRUE) to examine the cause of error. the result was as follow:
This reprex appears to crash R.
See standard output and standard error for more details.
Standard output and error
The text was updated successfully, but these errors were encountered: