Skip to content

Unable to compile on linux, "Mutex creation failed" #63

Closed

Description

@deluciaatgfz

I can't compile later on my linux (Arch Linux), which breaks some dependencies for me. I get this error (both from github and CRAN):

``
** testing if installed package can be loaded
sh: riga 1: 5012 Annullato (core dump creato) '/usr/lib64/R/bin/R' --no-save --slave 2>&1 < '/tmp/Rtmp8kWDUc/file136713a0f686'
terminate called after throwing an instance of 'std::runtime_error'
what(): Mutex creation failed
ERROR: loading failed

  • removing ‘/usr/lib/R/library/later’
    ``
    This is my sessioninfo:

`R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux

Matrix products: default
BLAS: /usr/lib/libblas.so.3.8.0
LAPACK: /usr/lib/liblapack.so.3.8.0

locale:
[1] LC_CTYPE=it_IT.UTF-8 LC_NUMERIC=C
[3] LC_TIME=it_IT.UTF-8 LC_COLLATE=it_IT.UTF-8
[5] LC_MONETARY=it_IT.UTF-8 LC_MESSAGES=it_IT.UTF-8
[7] LC_PAPER=it_IT.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=it_IT.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.5.1 R6_2.2.2 htmltools_0.3.6 tools_3.5.1
[5] Rcpp_0.12.18 remotes_1.1.1 digest_0.6.15 fortunes_1.5-4
`

Activity

  1. jpds commented on Aug 7, 2018

    @jpds

    Similar to #45.

  2. deluciaatgfz commented on Aug 7, 2018

    @deluciaatgfz
    Author

    Have you got any clue on what it's going on?
    On debian it compiles fine.

  3. wch commented on Aug 7, 2018

    @wch
    Member

    This sounds like the same issue reported in rstudio/shiny#2150. It sounds like there may be an issue with the version of glibc that Arch uses.

    Related: https://bugs.archlinux.org/task/59550

  4. jannes-m commented on Aug 8, 2018

    @jannes-m

    I have downgraded glibc to version 2.27-3, however, the problem still persists. Any ideas @pat-s (later is a dependency of xaringan)?

  5. pat-s commented on Aug 8, 2018

    @pat-s

    Seems like we have to wait for a glibc fix for now if downgrading also does not help here.

    This bug affects a lot in Arch right now including email clients, slack and more..

  6. ByteHamster commented on Aug 8, 2018

    @ByteHamster

    Downgrading to 2.27-3 helped on my device

  7. pat-s commented on Aug 8, 2018

    @pat-s

    @ByteHamster Any tips how you rolled back safely?

    sudo pacman -U /var/cache/pacman/pkg/lib32-glibc-2.28-1-x86_64.pkg.tar.xz /var/cache/pacman/pkg/glibc-2.27-3-x86_64.pkg.tar.xz did not seem to do the job.

    sudo pacman -Q --info glibc
    Name            : glibc
    Version         : 2.28-1
    
  8. ByteHamster commented on Aug 8, 2018

    @ByteHamster

    I did sudo pacman -U /var/cache/pacman/pkg/glibc-2.27-3-x86_64.pkg.tar.xz /var/cache/pacman/pkg/lib32-glibc-2.27-3-x86_64.pkg.tar.xz

    pacman -Q --info glibc
    Name            : glibc
    Version         : 2.27-3
    

    Not sure if that was safe, but the PC still boots, I can install the R package and electron no longer crashes :)

  9. pat-s commented on Aug 8, 2018

    @pat-s

    Thanks. Seems the order of the packages makes a difference. Works now!

  10. jannes-m commented on Aug 8, 2018

    @jannes-m

    Ok, the downgrade now also worked for me, thanks everybody!

  11. znmeb commented on Aug 8, 2018

    @znmeb

    Yeah - I'm on Arch Linux and this is a mess ... a lot of R package installs break, not just later. And Skype. And Slack. And Electron apps. :-(

    Even a freshly built R-patched from source does this.

    It turns out you need to downgrade more than just glibc and lib32-glibc. This comment has the five packages you need to downgrade.

    https://bugs.archlinux.org/task/59550#comment171826

  12. wch commented on Aug 10, 2018

    @wch
    Member

    We just merged a fix into master. For everyone who has experienced a problem, can you test and report back with how it works, and the platform you're on?

    devtools::install_github("r-lib/later")
  13. znmeb commented on Aug 10, 2018

    @znmeb

    Works for me on Arch Linux - thanks!

  14. EngineerCoding commented on Aug 13, 2018

    @EngineerCoding

    Tested, works for me on arch linux (exact distro is Antergos) too. Thanks for the fix!

  15. 23 remaining items

  16. hermidalc commented on Nov 16, 2018

    @hermidalc

    @wch @znmeb thanks very much for the great support and troubleshooting

  17. mingwandroid commented on Nov 16, 2018

    @mingwandroid
    Contributor

    @hermidalc, I identified the real problem here in #63 (comment)

    I'd like to say it was a pleasure but that'd be a lie.

    Edit: I mean no offense to the maintainers of later here.

  18. wch commented on Nov 16, 2018

    @wch
    Member

    Please, let's keep it civil. There's no need for sniping. I'll comment more on the other issue.

  19. znmeb commented on Nov 16, 2018

    @znmeb

    @hermidalc As a side note, I'm curious why you are installing R from Anaconda and not installing the data science stack packages (like later) from the Anaconda binaries. The few times I've loaded the whole Anaconda platform, I've just installed their versions of R, RStudio and the packages from their repository. I'd only install a package from CRAN or GitHub if it wasn't in their stack already.

  20. hermidalc commented on Nov 16, 2018

    @hermidalc

    @hermidalc As a side note, I'm curious why you are installing R from Anaconda and not installing the data science stack packages (like later) from the Anaconda binaries. The few times I've loaded the whole Anaconda platform, I've just installed their versions of R, RStudio and the packages from their repository. I'd only install a package from CRAN or GitHub if it wasn't in their stack already.

    It was just shown as an example of a library that cannot be compiled and installed from within R. There are many others that do not exist as a package in any channel on conda and therefore must be installed from within R resulting in the same mutex creation failed and coredump.

    EDIT: the Anaconda R that is installed via conda r-base=3.5.1 r-essentials are pre-built Anaconda binary packages for my architecture, no compilation happens when you install them. It's the same as installing it via a larger conda data science stack. There is an r-later package in conda-forge channel (only 0.7.3), though I was just showing later as an example of something that doesn't build with the above error.

  21. mingwandroid commented on Nov 17, 2018

    @mingwandroid
    Contributor

    @hermidalc, it does build, it just fails to load. Also some of your technical problems around attempting to help out with this issue seem to stem from using rstudio (or some other complex software stack) which depends on later (I guess, but something in your stack certainly does) and trying to build later from within that env. That's not a good idea. Build r packages from a minimal environment. Use just a shell and the R executable when doing low level stuff like this. Minimalism should always be the rule when building software. And avoiding packages that are broken is obviously essential.

    Ok that won't fix this later vs glibc 2.28 incompatibility (the maintainers of later will fix that and I'll continue to try to help if I have time) but I'd still try to follow this recommendation.

  22. hermidalc commented on Nov 17, 2018

    @hermidalc

    @hermidalc, it does build, it just fails to load. Also some of your technical problems around attempting to help out with this issue seem to stem from using rstudio (or some other complex software stack) which depends on later (I guess, but something in your stack certainly does) and trying to build later from within that env.

    @mingwandroid I'm not using rstudio. I think you are confusing me with @twilbers who opened the other issue where we were discussing this problem ContinuumIO/anaconda-issues#10264. In that issue I mentioned that I was having this problem with Anaconda R itself so that it is likely not an rstudio issue. Also as I mentioned in that issue, one reason I also posted there is because that was only person on the web mentioning this problem since August or so, so felt I should add to it saying its likely not rstudio.

    If you read my comment above #63 (comment) you will see the exact instructions to reproduce the issue, no rstudio, no complex stack, and installing later is just the last step to show an example of a library install that fails. I can give you multiple other libraries that fail and can be used in that last step. From my understanding we've now determined that this issue is with R and glibc not later.

  23. hermidalc commented on Nov 17, 2018

    @hermidalc

    Build r packages from a minimal environment. Use just a shell and the R executable when doing low level stuff like this. Minimalism should always be the rule when building software. And avoiding packages that are broken is obviously essential.

    Ok that won't fix this later vs glibc 2.28 incompatibility (the maintainers of later will fix that and I'll continue to try to help if I have time) but I'd still try to follow this recommendation.

    I just went back to Anaconda R 3.4.3 for now as it has zero problems and my development environment is working again. Once the R team fixes 3.5.1 I'll give it another try.

  24. mingwandroid commented on Nov 17, 2018

    @mingwandroid
    Contributor

    Once the R team fixes 3.5.1 I'll give it another try.

    Do you mean once the later team fixes this bug here? If not, what is the issue with 3.5.1?

  25. hermidalc commented on Nov 17, 2018

    @hermidalc

    Once the R team fixes 3.5.1 I'll give it another try.

    Do you mean once the later team fixes this bug here? If not, what is the issue with 3.5.1?

    I have Fedora 29 (Silverblue) - I installed R and RStudio Desktop and the tidyverse a few weeks ago without incident. I can test this now. The versions of the packages may be slightly different from Fedora 29 Workstation but with Silverblue it's trivial to bring up a pure Fedora 29 container to test with.
    @hermidalc How are you installing Anaconda?

    In your Fedora 29 do the following:

    1. Download and install Anaconda3 5.2.0 and follow instructions (don't install VSCode at end):
    
    wget https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
    bash Anaconda3-5.2.0-Linux-x86_64.sh

    Make sure that your have it in your path and are not using any system R, python etc. Then install R 3.5.1 and R essentials:

    conda install r-base=3.5.1 r-essentials

    Now from within R try to install later:

    options(repos=structure(c(CRAN="https://cloud.r-project.org/")))
    install.packages("later")

    This fails with the error. For many other packages you get the same failure when trying to install.

    Sorry need to edit this and add more info, and sorry for this going around in circles a bit.

    I realized that when Anaconda R is installed conda r-base=3.5.1 r-essentials that it also installs r-later 0.7.3 as a dependency which is the latest version available on Anaconda. Sorry I didn't notice this before. Even if you do not install r-essentials package then the problem will still come up if you try from within R to install.packages(...) something that will then install later through the dependency chain, resulting in the same mutex error.

    So to me the problem once again falls back to Anaconda team and why I posted there, once r-later package is updated to 0.7.5 I think this issue will be resolved?

  26. mingwandroid commented on Nov 17, 2018

    @mingwandroid
    Contributor

    This is not a bug with R, nor is it the recommended way to use Anaconda Distribution R packages.

    conda install r-later

    .. is the way to do that.

    But until this bug gets fixed you need to use glibc < 2.18

  27. mingwandroid commented on Nov 18, 2018

    @mingwandroid
    Contributor

    This is not and never was an Anaconda issue, except as a knock on from this upstream issue.

    0.7.5 does not fix this. We know exactly how to fix it; by renaming these (now, since glibc 2.18) conflicting functions.

  28. hermidalc commented on Nov 18, 2018

    @hermidalc

    This is not and never was an Anaconda issue, except as a knock on from this upstream issue.

    0.7.5 does not fix this. We know exactly how to fix it; by renaming these (now, since glibc 2.18) conflicting functions.

    Ok, thank you for the clarification, I am fine with R 3.4.3 until things are ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions