You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to run any Julia code in self-hosted Piston failed when Julia is trying to figure out the home directory (original issue: JuiceMitApfelnDrin/CodinCod#35). For whatever reason the issue does not seem to occur on emkc.org (possibly due to different libc version?).
I figured out that the issue can be worked around by setting HOME=/tmp for Julia. I'm not sure if that is a proper fix though – I feel like the sandboxing is blocking some system call that Julia's homedir() function (or more precisely uv_os_homedir from libuv) needs.
# start piston
docker compose up -d
# install julia 1.8.5
curl --json '{"language":"julia","version":"1.8.5"}' http://localhost:2000/api/v2/packages
# try to execute println(123)
curl --json '{"language":"julia","version":"1.8.5","files":[{"content":"println(123)"}]}' http://localhost:2000/api/v2/execute
Execution result:
{
"run": {
"signal": "SIGKILL",
"stdout": "",
"stderr": "fatal: error thrown and no exception handler available.\nInitError(mod=:Base, error=Base.IOError(msg=\"homedir(): no such file or directory (ENOENT)\", code=-2))\nuv_error at ./libuv.jl:97 [inlined]\nhomedir at ./path.jl:75\nappend_default_depot_path! at ./initdefs.jl:90\ninit_depot_path at ./initdefs.jl:112\n__init__ at ./Base.jl:488\njfptr___init___32760.clone_1 at /piston/packages/julia/1.8.5/lib/julia/sys.so (unknown line)\n_jl_invoke at /piston/packages/julia/1.8.5/build/src/gf.c:2377 [inlined]\nijl_apply_generic at /piston/packages/julia/1.8.5/build/src/gf.c:2559\njl_apply at /piston/packages/julia/1.8.5/build/src/julia.h:1843 [inlined]\njl_module_run_initializer at /piston/packages/julia/1.8.5/build/src/toplevel.c:75\n_finish_julia_init at /piston/packages/julia/1.8.5/build/src/init.c:765\njulia_init at /piston/packages/julia/1.8.5/build/src/init.c:698\njl_repl_entrypoint at /piston/packages/julia/1.8.5/build/src/jlapi.c:713\nmain at julia (unknown line)\nSandbox keeper received fatal signal 6\n",
"code": null,
"output": "fatal: error thrown and no exception handler available.\nInitError(mod=:Base, error=Base.IOError(msg=\"homedir(): no such file or directory (ENOENT)\", code=-2))\nuv_error at ./libuv.jl:97 [inlined]\nhomedir at ./path.jl:75\nappend_default_depot_path! at ./initdefs.jl:90\ninit_depot_path at ./initdefs.jl:112\n__init__ at ./Base.jl:488\njfptr___init___32760.clone_1 at /piston/packages/julia/1.8.5/lib/julia/sys.so (unknown line)\n_jl_invoke at /piston/packages/julia/1.8.5/build/src/gf.c:2377 [inlined]\nijl_apply_generic at /piston/packages/julia/1.8.5/build/src/gf.c:2559\njl_apply at /piston/packages/julia/1.8.5/build/src/julia.h:1843 [inlined]\njl_module_run_initializer at /piston/packages/julia/1.8.5/build/src/toplevel.c:75\n_finish_julia_init at /piston/packages/julia/1.8.5/build/src/init.c:765\njulia_init at /piston/packages/julia/1.8.5/build/src/init.c:698\njl_repl_entrypoint at /piston/packages/julia/1.8.5/build/src/jlapi.c:713\nmain at julia (unknown line)\nSandbox keeper received fatal signal 6\n",
"memory": 116596000,
"message": "stderr length exceeded",
"status": "EL",
"cpu_time": 153,
"wall_time": 167
},
"language": "julia",
"version": "1.8.5"
}
Version info:
* OpenSUSE Tumbleweed
* Linux 6.12.9-1-default #1 SMP PREEMPT_DYNAMIC Fri Jan 10 08:30:10 UTC 2025 (0ae2136) x86_64
* GLIBC 2.40
* Docker version 27.4.1-ce, build c710b88579fc
The text was updated successfully, but these errors were encountered:
Trying to run any Julia code in self-hosted Piston failed when Julia is trying to figure out the home directory (original issue: JuiceMitApfelnDrin/CodinCod#35). For whatever reason the issue does not seem to occur on emkc.org (possibly due to different libc version?).
I figured out that the issue can be worked around by setting
HOME=/tmp
for Julia. I'm not sure if that is a proper fix though – I feel like the sandboxing is blocking some system call that Julia'shomedir()
function (or more preciselyuv_os_homedir
from libuv) needs.docker-compose.yml:
Commands to reproduce:
Execution result:
Version info:
The text was updated successfully, but these errors were encountered: