rocker-org / rocker-versioned2

Run current & prior versions of R using docker. rocker/r-ver, rocker/rstudio, rocker/shiny, rocker/tidyverse, and so on.
https://rocker-project.org
GNU General Public License v2.0
419 stars 180 forks source link

`/scripts/install_texlive.sh` fails with a Lua segfault #790

Closed breiter closed 7 months ago

breiter commented 7 months ago

Container image name

rocker/rstudio:4

Container image digest

rocker/rstudio@sha256:4ac228651f2c86ba20b025df9c5bb5f371017e65928c6c2e66974df70e0ab638

What operating system are you seeing the problem on?

Linux, macOS

System information

Bug description

/scripts/install_texlive.sh fails with a LUA segfault running tlmgr install.

210.0 fmtutil: running `luajithbtex -ini   -jobname=luajithbtex -progname=luajithbtex luatex.ini' ...
210.0 Can't create the Lua state.
210.0 Segmentation fault
210.0 fmtutil [ERROR]: running `luajithbtex -ini   -jobname=luajithbtex -progname=luajithbtex luatex.ini </dev/null' return status: 139
210.0 fmtutil [ERROR]: returning error due to option --strict
210.0 fmtutil [INFO]: log file copied to: /opt/texlive/texmf-var/web2c/luajithbtex/luajithbtex.log
210.0 fmtutil [INFO]: not selected formats: 15
210.0 fmtutil [INFO]: failed to build: 1 (luajithbtex/luajithbtex)
210.0 fmtutil [INFO]: total formats: 16
210.0 fmtutil [INFO]: exiting with status 1
210.0 
210.0   ERROR: luajithbtex.fmt/luajithbtex
210.0 running fmtutil-sys --byengine luajittex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/f2Y7jAnUtD/lZjcTiQH94 ...
210.4 tlmgr: fmtutil-sys --byengine luajittex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/f2Y7jAnUtD/lZjcTiQH94 failed (status 1), output:
210.4 fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
210.4 fmtutil:   /usr/local/texlive/texmf-dist/web2c/fmtutil.cnf
210.4 fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
210.4 fmtutil:   /opt/texlive/texmf-config/web2c/fmtutil.cnf
210.4 fmtutil [INFO]: writing formats under /opt/texlive/texmf-var/web2c
210.4 fmtutil [INFO]: --- remaking luajittex with luajittex
210.4 fmtutil: running `luajittex -ini   -jobname=luajittex -progname=luajittex luatex.ini' ...
210.4 Can't create the Lua state.
210.4 Segmentation fault
210.4 fmtutil [ERROR]: running `luajittex -ini   -jobname=luajittex -progname=luajittex luatex.ini </dev/null' return status: 139
210.4 fmtutil [ERROR]: returning error due to option --strict
210.4 fmtutil [INFO]: log file copied to: /opt/texlive/texmf-var/web2c/luajittex/luajittex.log
210.4 fmtutil [INFO]: not selected formats: 15
210.4 fmtutil [INFO]: failed to build: 1 (luajittex/luajittex)
210.4 fmtutil [INFO]: total formats: 16
210.4 fmtutil [INFO]: exiting with status 1
210.4 
210.4   ERROR: luajittex.fmt/luajittex
210.4 running fmtutil-sys --byengine tex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/f2Y7jAnUtD/lZjcTiQH94 ...
210.8   OK: tex.fmt/tex
210.8 running fmtutil-sys --byfmt mf --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/f2Y7jAnUtD/lZjcTiQH94 ...
211.2   OK: mf.fmt/mf-nowin
211.2 setting up ConTeXt caches: running mtxrun --generate ...done
211.3 done running mtxrun --generate.
211.3 running context --luatex --generate ...done
211.5 done running context --luatex --generate.
211.5 running mtxrun --script fonts --reload ...done
212.4 done running mtxrun --script fonts --reload.
212.4 running context --luajittex --generate .../usr/local/texlive/bin/linux/tlmgr: context --luajittex --generate failed (status 1): 
212.5 tlmgr: context --luajittex --generate failed (status 1), see /opt/texlive/texmf-var/web2c/tlmgr-commands.log
212.5 tlmgr: An error has occurred. See above messages. Exiting.
212.5 failed

How to reproduce this bug?

FROM rocker/rstudio:4

RUN /rocker_scripts/install_texlive.sh
docker buildx build --platform linux/amd64 .
eitsupi commented 7 months ago

Perhaps you are using arm64 macOS? Is there a reason you are using amd64 emulation?

I have heard that rocker/rstudio does not work with amd64 emulation on arm64. See #144.

breiter commented 7 months ago

No. It's not arm64. I had it build as linux/amd64. This is recreating an issue that happens in GitHub tasks which is running natively on amd64.

breiter commented 7 months ago

Actually maybe this is caused by rosetta2. I realize now that it failed in a different place on the logs in GitHub.