1

The following issue seems to touch R, conda installation issues and possibly memory mapping.

Here is a minimal example that already results in the problem:

Running mamba create -n R_test r-base -c r seems to work just fine. But when trying to run R from within this env I get the following error (important part):

The executed R command + error message

When looking up this error message online, it often popped up in relation to distinct packages with library mismatches (e.g. caught segfault - 'memory not mapped' error in R) which seem to be examinable from within R ... unless it happens directly at startup like it does for me.

Running R in another, already existing, R 4.1.2 env worked. Also scpecifying that version for a new env resulted in the same problem. So it seems, rather than the version, the issue is with whatever happens when I icreate a new envirmonment.

I tried removing potentially problematic unused packages with conda clean --all and the follwing packages seem to require reboot to remove file handle, e.g.removing conda-env-2.6.0-1 WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(143): Could not remove or rename /opt/anaconda/anaconda3/pkgs/conda-env-2.6.0-1/info/recipe/meta.yaml. Please remove this file manually (you may need to reboot to free file handles):

blas-1.0-mkl                                  15 KB
conda-env-2.6.0-1                              6 KB
_libgcc_mutex-0.1-main                         7 KB
path.py-12.5.0-0                               8 KB
get_terminal_size-1.0.0-haa9412d_0             7 KB
importlib_metadata-3.10.0-hd3eb1b0_0          37 KB
prompt_toolkit-3.0.17-hd3eb1b0_0              39 KB
numpy-1.20.1-py38h93e21f0_0                   70 KB
matplotlib-3.3.4-py38h06a4308_0               92 KB
anaconda-2021.05-py38_0                       81 KB
dask-2021.4.0-pyhd3eb1b0_0                    12 KB
_openmp_mutex-4.5-1_gnu                       93 KB
openssl-1.1.1k-h7f98852_0                    6.0 MB
conda-4.10.1-py38h06a4308_1                 11.7 MB
python_abi-3.9-2_cp39                         11 KB
_libgcc_mutex-0.1-conda_forge                  6 KB
python_abi-3.8-2_cp38                         11 KB
libgfortran-ng-7.5.0-ha8ba4b0_17              92 KB
numpy-1.21.5-py38he7a7128_2                   26 KB

The minimal example works for someone else on our computing cluster, so I'd exclude some "global" reasons as the culprit. Btw: I cannot reboot the cluster myself, so I am hoing there might be something I can do on my own to resolve the issue.

Does anyone have an idea what could be the problem here or (since I am not an IT expert) how to further investigate what's going on? Thanks a lot for your suggestions!

---------------------------------EDIT--------------------------------------

Some edits and additions based on comments by @merv :

New environment creation command: mamba create -c conda-forge r-base -n R_test_cf

Here's all packages installed for the new conda env:

_libgcc_mutex                       0.1  conda_forge          conda-forge/linux-64     Cached
  _openmp_mutex                       4.5  2_gnu                conda-forge/linux-64     Cached
  _r-mutex                          1.0.1  anacondar_1          conda-forge/noarch       Cached
  binutils_impl_linux-64             2.40  hf600244_0           conda-forge/linux-64     Cached
  blas                                1.1  openblas             conda-forge/linux-64     Cached
  bwidget                          1.9.14  ha770c72_1           conda-forge/linux-64     Cached
  bzip2                             1.0.8  h7f98852_4           conda-forge/linux-64     Cached
  c-ares                           1.19.0  h5eee18b_0           pkgs/main/linux-64       Cached
  ca-certificates              2023.01.10  h06a4308_0           pkgs/main/linux-64       Cached
  cairo                            1.16.0  h35add3b_1015        conda-forge/linux-64     Cached
  curl                             7.88.1  hdc1c0ab_1           conda-forge/linux-64     Cached
  expat                             2.5.0  hcb278e6_1           conda-forge/linux-64     Cached
  font-ttf-dejavu-sans-mono          2.37  hab24e00_0           conda-forge/noarch       Cached
  font-ttf-inconsolata              3.000  h77eed37_0           conda-forge/noarch       Cached
  font-ttf-source-code-pro          2.038  h77eed37_0           conda-forge/noarch       Cached
  font-ttf-ubuntu                    0.83  hab24e00_0           conda-forge/noarch       Cached
  fontconfig                       2.14.2  h14ed4e7_0           conda-forge/linux-64     Cached
  fonts-conda-ecosystem                 1  0                    conda-forge/noarch       Cached
  fonts-conda-forge                     1  0                    conda-forge/noarch       Cached
  freetype                         2.12.1  hca18f0e_1           conda-forge/linux-64     Cached
  fribidi                          1.0.10  h516909a_0           conda-forge/linux-64     Cached
  gcc_impl_linux-64                12.2.0  hcc96c02_19          conda-forge/linux-64     Cached
  gettext                          0.21.1  h27087fc_0           conda-forge/linux-64     Cached
  gfortran_impl_linux-64           12.2.0  h55be85b_19          conda-forge/linux-64     Cached
  graphite2                        1.3.14  h295c915_1           pkgs/main/linux-64       Cached
  gsl                               2.7.1  h917eeb2_1           pkgs/main/linux-64       Cached
  gxx_impl_linux-64                12.2.0  hcc96c02_19          conda-forge/linux-64     Cached
  harfbuzz                          6.0.0  h3ff4399_1           conda-forge/linux-64     Cached
  icu                                72.1  hcb278e6_0           conda-forge/linux-64     Cached
  kernel-headers_linux-64          2.6.32  he073ed8_15          conda-forge/noarch       Cached
  keyutils                          1.6.1  h166bdaf_0           conda-forge/linux-64     Cached
  krb5                             1.20.1  h81ceb04_0           conda-forge/linux-64     Cached
  ld_impl_linux-64                   2.40  h41732ed_0           conda-forge/linux-64     Cached
  lerc                              4.0.0  h27087fc_0           conda-forge/linux-64     Cached
  libblas                           3.9.0  16_linux64_openblas  conda-forge/linux-64     Cached
  libcurl                          7.88.1  hdc1c0ab_1           conda-forge/linux-64     Cached
  libdeflate                         1.18  h0b41bf4_0           conda-forge/linux-64     Cached
  libedit                    3.1.20221030  h5eee18b_0           pkgs/main/linux-64       Cached
  libev                              4.33  h516909a_1           conda-forge/linux-64     Cached
  libexpat                          2.5.0  hcb278e6_1           conda-forge/linux-64     Cached
  libffi                            3.4.2  h7f98852_5           conda-forge/linux-64     Cached
  libgcc-devel_linux-64            12.2.0  h3b97bd3_19          conda-forge/linux-64     Cached
  libgcc-ng                        12.2.0  h65d4601_19          conda-forge/linux-64     Cached
  libgfortran-ng                   12.2.0  h69a702a_19          conda-forge/linux-64     Cached
  libgfortran5                     12.2.0  h337968e_19          conda-forge/linux-64     Cached
  libglib                          2.74.1  h606061b_1           conda-forge/linux-64     Cached
  libgomp                          12.2.0  h65d4601_19          conda-forge/linux-64     Cached
  libiconv                           1.17  h166bdaf_0           conda-forge/linux-64     Cached
  libjpeg-turbo                   2.1.5.1  h0b41bf4_0           conda-forge/linux-64     Cached
  liblapack                         3.9.0  16_linux64_openblas  conda-forge/linux-64     Cached
  libnghttp2                       1.52.0  h61bc06f_0           conda-forge/linux-64     Cached
  libopenblas                      0.3.21  pthreads_h78a6416_3  conda-forge/linux-64     Cached
  libpng                           1.6.39  h753d276_0           conda-forge/linux-64     Cached
  libsanitizer                     12.2.0  h46fd767_19          conda-forge/linux-64     Cached
  libssh2                          1.10.0  hf14f497_3           conda-forge/linux-64     Cached
  libstdcxx-devel_linux-64         12.2.0  h3b97bd3_19          conda-forge/linux-64     Cached
  libstdcxx-ng                     12.2.0  h46fd767_19          conda-forge/linux-64     Cached
  libtiff                           4.5.0  ha587672_6           conda-forge/linux-64     Cached
  libuuid                          2.38.1  h0b41bf4_0           conda-forge/linux-64     Cached
  libwebp-base                      1.3.0  h0b41bf4_0           conda-forge/linux-64     Cached
  libxcb                             1.13  h7f98852_1004        conda-forge/linux-64     Cached
  libxml2                          2.10.3  hfdac1af_6           conda-forge/linux-64     Cached
  libzlib                          1.2.13  h166bdaf_4           conda-forge/linux-64     Cached
  lz4-c                             1.9.4  hcb278e6_0           conda-forge/linux-64     Cached
  make                                4.3  hd18ef5c_1           conda-forge/linux-64     Cached
  ncurses                             6.4  h6a678d5_0           pkgs/main/linux-64       Cached
  openblas                         0.3.21  pthreads_h320a7e8_3  conda-forge/linux-64     Cached
  openssl                           3.1.0  h0b41bf4_0           conda-forge/linux-64     Cached
  pango                           1.50.14  hd33c08f_0           conda-forge/linux-64     Cached
  pcre2                             10.40  hc3806b6_0           conda-forge/linux-64     Cached
  pixman                           0.40.0  h36c2ea0_0           conda-forge/linux-64     Cached
  pthread-stubs                       0.4  h36c2ea0_1001        conda-forge/linux-64     Cached
  r-base                            4.2.3  h4a03800_2           conda-forge/linux-64     Cached
  readline                            8.2  h8228510_1           conda-forge/linux-64     Cached
  sed                                 4.8  he412f7d_0           conda-forge/linux-64     Cached
  sysroot_linux-64                   2.12  he073ed8_15          conda-forge/noarch       Cached
  tk                               8.6.12  h27826a3_0           conda-forge/linux-64     Cached
  tktable                            2.10  hb7b940f_3           conda-forge/linux-64     Cached
  xorg-kbproto                      1.0.7  h14c3975_1002        conda-forge/linux-64     Cached
  xorg-libice                      1.0.10  h516909a_0           conda-forge/linux-64     Cached
  xorg-libsm                        1.2.3  hd9c2040_1000        conda-forge/linux-64     Cached
  xorg-libx11                       1.8.4  h0b41bf4_0           conda-forge/linux-64     Cached
  xorg-libxau                       1.0.9  h14c3975_0           conda-forge/linux-64     Cached
  xorg-libxdmcp                     1.1.3  h516909a_0           conda-forge/linux-64     Cached
  xorg-libxext                      1.3.4  h0b41bf4_2           conda-forge/linux-64     Cached
  xorg-libxrender                  0.9.10  h7f98852_1003        conda-forge/linux-64     Cached
  xorg-libxt                        1.2.1  h7f98852_2           conda-forge/linux-64     Cached
  xorg-renderproto                 0.11.1  h14c3975_1002        conda-forge/linux-64     Cached
  xorg-xextproto                    7.3.0  h0b41bf4_1003        conda-forge/linux-64     Cached
  xorg-xproto                      7.0.31  h14c3975_1007        conda-forge/linux-64     Cached
  xz                               5.2.10  h5eee18b_1           pkgs/main/linux-64       Cached
  zlib                             1.2.13  h166bdaf_4           conda-forge/linux-64     Cached
  zstd                              1.5.4  hc292b87_0           pkgs/main/linux-64       Cached

  Summary:

  Install: 93 packages

  Total download: 0  B

Here's the output of mamba env export:

name: R_test_cf
channels:
  - conda-forge
  - defaults
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=2_gnu
  - _r-mutex=1.0.1=anacondar_1
  - binutils_impl_linux-64=2.40=hf600244_0
  - blas=1.1=openblas
  - bwidget=1.9.14=ha770c72_1
  - bzip2=1.0.8=h7f98852_4
  - c-ares=1.19.0=h5eee18b_0
  - ca-certificates=2023.01.10=h06a4308_0
  - cairo=1.16.0=h35add3b_1015
  - curl=7.88.1=hdc1c0ab_1
  - expat=2.5.0=hcb278e6_1
  - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
  - font-ttf-inconsolata=3.000=h77eed37_0
  - font-ttf-source-code-pro=2.038=h77eed37_0
  - font-ttf-ubuntu=0.83=hab24e00_0
  - fontconfig=2.14.2=h14ed4e7_0
  - fonts-conda-ecosystem=1=0
  - fonts-conda-forge=1=0
  - freetype=2.12.1=hca18f0e_1
  - fribidi=1.0.10=h516909a_0
  - gcc_impl_linux-64=12.2.0=hcc96c02_19
  - gettext=0.21.1=h27087fc_0
  - gfortran_impl_linux-64=12.2.0=h55be85b_19
  - graphite2=1.3.14=h295c915_1
  - gsl=2.7.1=h917eeb2_1
  - gxx_impl_linux-64=12.2.0=hcc96c02_19
  - harfbuzz=6.0.0=h3ff4399_1
  - icu=72.1=hcb278e6_0
  - kernel-headers_linux-64=2.6.32=he073ed8_15
  - keyutils=1.6.1=h166bdaf_0
  - krb5=1.20.1=h81ceb04_0
  - ld_impl_linux-64=2.40=h41732ed_0
  - lerc=4.0.0=h27087fc_0
  - libblas=3.9.0=16_linux64_openblas
  - libcurl=7.88.1=hdc1c0ab_1
  - libdeflate=1.18=h0b41bf4_0
  - libedit=3.1.20221030=h5eee18b_0
  - libev=4.33=h516909a_1
  - libexpat=2.5.0=hcb278e6_1
  - libffi=3.4.2=h7f98852_5
  - libgcc-devel_linux-64=12.2.0=h3b97bd3_19
  - libgcc-ng=12.2.0=h65d4601_19
  - libgfortran-ng=12.2.0=h69a702a_19
  - libgfortran5=12.2.0=h337968e_19
  - libglib=2.74.1=h606061b_1
  - libgomp=12.2.0=h65d4601_19
  - libiconv=1.17=h166bdaf_0
  - libjpeg-turbo=2.1.5.1=h0b41bf4_0
  - liblapack=3.9.0=16_linux64_openblas
  - libnghttp2=1.52.0=h61bc06f_0
  - libopenblas=0.3.21=pthreads_h78a6416_3
  - libpng=1.6.39=h753d276_0
  - libsanitizer=12.2.0=h46fd767_19
  - libssh2=1.10.0=hf14f497_3
  - libstdcxx-devel_linux-64=12.2.0=h3b97bd3_19
  - libstdcxx-ng=12.2.0=h46fd767_19
  - libtiff=4.5.0=ha587672_6
  - libuuid=2.38.1=h0b41bf4_0
  - libwebp-base=1.3.0=h0b41bf4_0
  - libxcb=1.13=h7f98852_1004
  - libxml2=2.10.3=hfdac1af_6
  - libzlib=1.2.13=h166bdaf_4
  - lz4-c=1.9.4=hcb278e6_0
  - make=4.3=hd18ef5c_1
  - ncurses=6.4=h6a678d5_0
  - openblas=0.3.21=pthreads_h320a7e8_3
  - openssl=3.1.0=h0b41bf4_0
  - pango=1.50.14=hd33c08f_0
  - pcre2=10.40=hc3806b6_0
  - pixman=0.40.0=h36c2ea0_0
  - pthread-stubs=0.4=h36c2ea0_1001
  - r-base=4.2.3=h4a03800_2
  - readline=8.2=h8228510_1
  - sed=4.8=he412f7d_0
  - sysroot_linux-64=2.12=he073ed8_15
  - tk=8.6.12=h27826a3_0
  - tktable=2.10=hb7b940f_3
  - xorg-kbproto=1.0.7=h14c3975_1002
  - xorg-libice=1.0.10=h516909a_0
  - xorg-libsm=1.2.3=hd9c2040_1000
  - xorg-libx11=1.8.4=h0b41bf4_0
  - xorg-libxau=1.0.9=h14c3975_0
  - xorg-libxdmcp=1.1.3=h516909a_0
  - xorg-libxext=1.3.4=h0b41bf4_2
  - xorg-libxrender=0.9.10=h7f98852_1003
  - xorg-libxt=1.2.1=h7f98852_2
  - xorg-renderproto=0.11.1=h14c3975_1002
  - xorg-xextproto=7.3.0=h0b41bf4_1003
  - xorg-xproto=7.0.31=h14c3975_1007
  - xz=5.2.10=h5eee18b_1
  - zlib=1.2.13=h166bdaf_4
  - zstd=1.5.4=hc292b87_0

The conda info details:

     active environment : R_test_cf
    active env location : /home/rstrasser/.conda/envs/R_test_cf
            shell level : 1
       user config file : /home/rstrasser/.condarc
 populated config files : /home/rstrasser/.condarc
          conda version : 4.12.0
    conda-build version : 3.21.4
         python version : 3.8.8.final.0
       virtual packages : __linux=3.10.0=0
                          __glibc=2.17=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /opt/anaconda/anaconda3  (read only)
      conda av data dir : /opt/anaconda/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /opt/anaconda/anaconda3/pkgs
                          /home/rstrasser/.conda/pkgs
       envs directories : /home/rstrasser/.conda/envs
                          /opt/anaconda/anaconda3/envs
               platform : linux-64
             user-agent : conda/4.12.0 requests/2.25.1 CPython/3.8.8 Linux/3.10.0-1160.53.1.el7.x86_64 centos/7.9.2009 glibc/2.17
                UID:GID : 1003:1004
             netrc file : None
           offline mode : False

LD_LIBRARY_PATH does not have a value

ldd ~/.conda/envs/R_test_cf/bin/R returns not a dynamic executable

-------------------EDIT 2-----------------------------------------

Another user on the cluster seems to be able to simply run R from my environment... --> Maybe the issue is not how things are installed, but how the env is activated or that I accidentally installed something globally that is being accessed now.

  • 1
    This is hard to follow. Perhaps, you can reformulate with an exact command that does not work, provide a YAML (`mamba env export`) of the result, and give details on `conda info`. You may want to check what `LD_LIBRARY_PATH` is defined as when the environment is active. It could also be useful to show the result of `ldd` on the R library (to show how it is resolving dynamic libraries). – merv Apr 01 '23 at 19:59
  • Specifically on the command that used `-c r`: no one should use anything from that channel - it was run but Anaconda, but they stopped maintaining it years ago. Conda R users should use Conda Forge only (or plus Bioconda, if you need Bioconductor packages). – merv Apr 01 '23 at 19:59
  • 1
    Thanks for the input @merv ! I edited the question accordingly and I hope it is more clear/informative now. – Rob Strasser Apr 03 '23 at 08:25
  • Not sure why I missed the follow-up - sorry about that! There are still several libraries in output coming from **defaults** channels, whereas everything should instead come from Conda Forge. We recently updated a bunch of packages to rebuild for various releases of library dependencies (kinda related). Could you check to see if this is still an issue for you? If so, I’ll look over it again and see what I come up with. I suspect there might be a package that doesn’t have its dependencies declared correctly - we’d need to patch that in the channel metadata. (bug maybe) – merv May 27 '23 at 07:55

2 Answers2

2

We faced the same problem at our university cluster. We added the line

LANG=en_US.UTF-8

at the end of the .bashrc file and it solved the problem.

Mr.R
  • 36
  • 2
  • It makes me almost mad that the solution is so straightforward, hahaha. Thanks a lot, it worked and you saved me from going down a deeper rabbit hole :-) – Rob Strasser Aug 11 '23 at 10:54
0

I faced a similar problem to you.
And I found that some Warning messages are printed before the core dump.
Warning messages
So I feel maybe the locale setting is the source of this strange phenomenon. I executed the following command and reinstalled R through conda.

sudo apt-get install language-pack-en

And it works for me.
Result

LMH
  • 1