JuliaData / CSV.jl

Utility library for working with CSV and other delimited files in the Julia programming language
https://csv.juliadata.org/
Other
459 stars 141 forks source link

Cannot compile this package on Julia 1.9.1 in Ubuntu 22.04 container #1105

Open nathancarter opened 11 months ago

nathancarter commented 11 months ago

I'm using the official Docker container for Jupyter Data Science Notebooks provided here: https://hub.docker.com/r/jupyter/datascience-notebook/

It comes with Julia 1.9.1 preinstalled. I try to use the CSV.jl package and receive the following error:

(base) jovyan@210be72a0b94:/workspaces/how2data$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.1 (2023-06-07)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using CSV
 │ Package CSV not found, but a package named CSV is available from a registry. 
 │ Install package?
 │   (@v1.9) pkg> add CSV 
 └ (y/n/o) [y]: 
   Resolving package versions...
    Updating `/opt/julia/environments/v1.9/Project.toml`
  [336ed68f] + CSV v0.10.11
  No Changes to `/opt/julia/environments/v1.9/Manifest.toml`
[ Info: Precompiling CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]
Invalid instruction at 0x7f8418fde5d7: 0x62, 0xf1, 0xf7, 0x08, 0x7b, 0xc7, 0x48, 0x8b, 0x0d, 0xbc, 0x0a, 0x82, 0x01, 0x48, 0x8b

[76553] signal (4.2): Illegal instruction
in expression starting at /opt/julia/packages/CSV/OnldF/src/precompile.jl:3
Float64 at ./float.jl:165 [inlined]
__scale at /opt/julia/packages/Parsers/lS2P6/src/floats.jl:551 [inlined]
scale at /opt/julia/packages/Parsers/lS2P6/src/floats.jl:508 [inlined]
parsefrac at /opt/julia/packages/Parsers/lS2P6/src/floats.jl:420 [inlined]
parsedigits at /opt/julia/packages/Parsers/lS2P6/src/floats.jl:328 [inlined]
parsedigits at /opt/julia/packages/Parsers/lS2P6/src/floats.jl:234 [inlined]
typeparser at /opt/julia/packages/Parsers/lS2P6/src/floats.jl:212 [inlined]
#24 at /opt/julia/packages/Parsers/lS2P6/src/components.jl:382 [inlined]
checkforsentinel at /opt/julia/packages/Parsers/lS2P6/src/components.jl:244 [inlined]
stripwhitespace at /opt/julia/packages/Parsers/lS2P6/src/components.jl:89 [inlined]
findquoted at /opt/julia/packages/Parsers/lS2P6/src/components.jl:220 [inlined]
stripwhitespace at /opt/julia/packages/Parsers/lS2P6/src/components.jl:89 [inlined]
_finddelimiter at /opt/julia/packages/Parsers/lS2P6/src/components.jl:368 [inlined]
checkemptysentinel at /opt/julia/packages/Parsers/lS2P6/src/components.jl:40 [inlined]
#7 at /opt/julia/packages/Parsers/lS2P6/src/components.jl:13 [inlined]
_xparse at /opt/julia/packages/Parsers/lS2P6/src/Parsers.jl:370
xparse at /opt/julia/packages/Parsers/lS2P6/src/Parsers.jl:381 [inlined]
xparse at /opt/julia/packages/Parsers/lS2P6/src/Parsers.jl:375 [inlined]
xparse at /opt/julia/packages/Parsers/lS2P6/src/Parsers.jl:375 [inlined]
detect at /opt/julia/packages/CSV/OnldF/src/utils.jl:495 [inlined]
detectcell at /opt/julia/packages/CSV/OnldF/src/file.jl:715
parserow at /opt/julia/packages/CSV/OnldF/src/file.jl:597 [inlined]
parsefilechunk! at /opt/julia/packages/CSV/OnldF/src/file.jl:550
unknown function (ip: 0x7f841bb16724)
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2940
File at /opt/julia/packages/CSV/OnldF/src/file.jl:290
File at /opt/julia/packages/CSV/OnldF/src/file.jl:227 [inlined]
#File#32 at /opt/julia/packages/CSV/OnldF/src/file.jl:223 [inlined]
File at /opt/julia/packages/CSV/OnldF/src/file.jl:162
unknown function (ip: 0x7f8420953518)
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2940
macro expansion at /opt/julia/packages/CSV/OnldF/src/precompile.jl:10 [inlined]
macro expansion at /opt/julia/packages/PrecompileTools/0yi7r/src/workloads.jl:74 [inlined]
macro expansion at /opt/julia/packages/CSV/OnldF/src/precompile.jl:7 [inlined]
top-level scope at /opt/julia/packages/PrecompileTools/0yi7r/src/workloads.jl:136
jl_toplevel_eval_flex at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:903
jl_toplevel_eval_flex at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:856
ijl_toplevel_eval_in at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:971
eval at ./boot.jl:370 [inlined]
include_string at ./loading.jl:1899
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2940
_include at ./loading.jl:1959
include at ./Base.jl:457
jfptr_include_31033.clone_1 at /opt/julia-1.9.1/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2940
jl_apply at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/julia.h:1879 [inlined]
jl_f__call_latest at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/builtins.c:774
include at /opt/julia/packages/CSV/OnldF/src/CSV.jl:24
unknown function (ip: 0x7f8420900292)
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2940
jl_apply at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/julia.h:1879 [inlined]
do_call at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/interpreter.c:126
eval_value at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/interpreter.c:226
eval_stmt_value at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/interpreter.c:177 [inlined]
eval_body at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/interpreter.c:624
jl_interpret_toplevel_thunk at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/interpreter.c:762
jl_toplevel_eval_flex at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:912
jl_eval_module_expr at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:203 [inlined]
jl_toplevel_eval_flex at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:715
jl_toplevel_eval_flex at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:856
jl_toplevel_eval_flex at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:856
ijl_toplevel_eval_in at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:971
eval at ./boot.jl:370 [inlined]
include_string at ./loading.jl:1899
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2940
_include at ./loading.jl:1959
include at ./Base.jl:457 [inlined]
include_package_for_output at ./loading.jl:2045
jfptr_include_package_for_output_32423.clone_1 at /opt/julia-1.9.1/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2940
jl_apply at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/julia.h:1879 [inlined]
do_call at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/interpreter.c:126
eval_value at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/interpreter.c:226
eval_stmt_value at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/interpreter.c:177 [inlined]
eval_body at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/interpreter.c:624
jl_interpret_toplevel_thunk at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/interpreter.c:762
jl_toplevel_eval_flex at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:912
jl_toplevel_eval_flex at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:856
ijl_toplevel_eval_in at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/toplevel.c:971
eval at ./boot.jl:370 [inlined]
include_string at ./loading.jl:1899
include_string at ./loading.jl:1909 [inlined]
exec_options at ./client.jl:305
_start at ./client.jl:522
jfptr__start_29455.clone_1 at /opt/julia-1.9.1/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2940
jl_apply at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/julia.h:1879 [inlined]
true_main at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/jlapi.c:573
jl_repl_entrypoint at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/jlapi.c:717
main at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/cli/loader_exe.c:59
unknown function (ip: 0x7f8437dd5d8f)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x401098)
Allocations: 14000716 (Pool: 13982789; Big: 17927); GC: 19
ERROR: Failed to precompile CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b] to "/opt/julia/compiled/v1.9/CSV/jl_hUiWWx".
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
   @ Base ./loading.jl:2296
 [3] compilecache
   @ ./loading.jl:2163 [inlined]
 [4] _require(pkg::Base.PkgId, env::String)
   @ Base ./loading.jl:1805
 [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
   @ Base ./loading.jl:1660
 [6] macro expansion
   @ ./loading.jl:1648 [inlined]
 [7] macro expansion
   @ ./lock.jl:267 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1611

julia> 
nathancarter commented 11 months ago

Just tested on the 2023-05-30 version of the same Docker container, which uses Julia 1.8.5, and using CSV works perfectly fine there, installing with no trouble. Something between those versions of Julia seems to be the cause?

benz0li commented 10 months ago

I could not reproduce this with my GPU accelerated JupyterLab Julia docker image glcr.b-data.ch/jupyterlab/cuda/julia/base:1.9.2 (os: linux (Ubuntu 22.04), arch: arm64/v8).

benz0li commented 10 months ago

I can not reproduce with the linux/amd64 image:


Host

$ docker run -it --rm -p 8888:8888 jupyter/datascience-notebook:julia-1.9.1
Entered start.sh with args: jupyter lab
Executing the command: jupyter lab
[I 2023-08-09 04:37:58.963 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-08-09 04:37:58.973 ServerApp] Package jupyter_lsp took 0.0098s to import
[W 2023-08-09 04:37:58.973 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-09 04:37:58.975 ServerApp] Package jupyter_server_mathjax took 0.0010s to import
[I 2023-08-09 04:37:59.027 ServerApp] Package jupyter_server_proxy took 0.0522s to import
[I 2023-08-09 04:37:59.032 ServerApp] Package jupyter_server_terminals took 0.0039s to import
[I 2023-08-09 04:37:59.056 ServerApp] Package jupyterlab_git took 0.0240s to import
[I 2023-08-09 04:37:59.058 ServerApp] Package nbclassic took 0.0018s to import
[W 2023-08-09 04:37:59.060 ServerApp] A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-09 04:37:59.060 ServerApp] Package nbdime took 0.0000s to import
[I 2023-08-09 04:37:59.060 ServerApp] Package notebook took 0.0000s to import
[I 2023-08-09 04:37:59.062 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-08-09 04:37:59.062 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-09 04:37:59.063 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-08-09 04:37:59.067 ServerApp] jupyter_server_mathjax | extension was successfully linked.
[I 2023-08-09 04:37:59.067 ServerApp] jupyter_server_proxy | extension was successfully linked.
[I 2023-08-09 04:37:59.070 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-08-09 04:37:59.075 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-08-09 04:37:59.075 ServerApp] jupyterlab_git | extension was successfully linked.
[I 2023-08-09 04:37:59.079 ServerApp] nbclassic | extension was successfully linked.
[I 2023-08-09 04:37:59.079 ServerApp] nbdime | extension was successfully linked.
[I 2023-08-09 04:37:59.083 ServerApp] notebook | extension was successfully linked.
[I 2023-08-09 04:37:59.084 ServerApp] Writing Jupyter server cookie secret to /home/jovyan/.local/share/jupyter/runtime/jupyter_cookie_secret
[I 2023-08-09 04:37:59.303 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-08-09 04:37:59.321 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-08-09 04:37:59.323 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-08-09 04:37:59.323 ServerApp] jupyter_server_mathjax | extension was successfully loaded.
[I 2023-08-09 04:37:59.335 ServerApp] jupyter_server_proxy | extension was successfully loaded.
[I 2023-08-09 04:37:59.336 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-08-09 04:37:59.338 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.11/site-packages/jupyterlab
[I 2023-08-09 04:37:59.338 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 2023-08-09 04:37:59.338 LabApp] Extension Manager is 'pypi'.
[I 2023-08-09 04:37:59.341 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-08-09 04:37:59.345 ServerApp] jupyterlab_git | extension was successfully loaded.

  _   _          _      _
 | | | |_ __  __| |__ _| |_ ___
 | |_| | '_ \/ _` / _` |  _/ -_)
  \___/| .__/\__,_\__,_|\__\___|
       |_|

Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

[I 2023-08-09 04:37:59.348 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-08-09 04:37:59.395 ServerApp] nbdime | extension was successfully loaded.
[I 2023-08-09 04:37:59.398 ServerApp] notebook | extension was successfully loaded.
[I 2023-08-09 04:37:59.398 ServerApp] Serving notebooks from local directory: /home/jovyan
[I 2023-08-09 04:37:59.398 ServerApp] Jupyter Server 2.7.0 is running at:
[I 2023-08-09 04:37:59.398 ServerApp] http://f70dfa1a93ff:8888/lab?token=a315d7f00676948e949a7dbfbc901c7c22ec206110c722c0
[I 2023-08-09 04:37:59.398 ServerApp]     http://127.0.0.1:8888/lab?token=a315d7f00676948e949a7dbfbc901c7c22ec206110c722c0
[I 2023-08-09 04:37:59.398 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-08-09 04:37:59.401 ServerApp] 

    To access the server, open this file in a browser:
        file:///home/jovyan/.local/share/jupyter/runtime/jpserver-7-open.html
    Or copy and paste one of these URLs:
        http://f70dfa1a93ff:8888/lab?token=a315d7f00676948e949a7dbfbc901c7c22ec206110c722c0
        http://127.0.0.1:8888/lab?token=a315d7f00676948e949a7dbfbc901c7c22ec206110c722c0
[I 2023-08-09 04:38:00.459 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server

Container

(base) jovyan@f70dfa1a93ff:~$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.1 (2023-06-07)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |
julia> versioninfo()
Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 40 × Intel(R) Xeon(R) Silver 4210R CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, cascadelake)
  Threads: 1 on 40 virtual cores
Environment:
  JULIA_PKGDIR = /opt/julia
  JULIA_DEPOT_PATH = /opt/julia
(@v1.9) pkg> add CSV
    Updating registry at `/opt/julia/registries/General.toml`
   Resolving package versions...
   Installed SentinelArrays ── v1.4.0
   Installed PooledArrays ──── v1.4.2
   Installed WeakRefStrings ── v1.4.2
   Installed InlineStrings ─── v1.4.0
   Installed WorkerUtilities ─ v1.6.1
   Installed FilePathsBase ─── v0.9.20
   Installed CSV ───────────── v0.10.11
    Updating `/opt/julia/environments/v1.9/Project.toml`
  [336ed68f] + CSV v0.10.11
    Updating `/opt/julia/environments/v1.9/Manifest.toml`
  [336ed68f] + CSV v0.10.11
  [48062228] + FilePathsBase v0.9.20
  [842dd82b] + InlineStrings v1.4.0
  [2dfb63ee] + PooledArrays v1.4.2
  [91c51154] + SentinelArrays v1.4.0
  [ea10d353] + WeakRefStrings v1.4.2
  [76eceee3] + WorkerUtilities v1.6.1
  [9fa8497b] + Future
Precompiling project...
  7 dependencies successfully precompiled in 25 seconds. 59 already precompiled.