Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signal (4): Illegal instruction #74

Closed
singularitti opened this issue Apr 23, 2020 · 27 comments
Closed

signal (4): Illegal instruction #74

singularitti opened this issue Apr 23, 2020 · 27 comments
Labels
bug Something isn't working

Comments

@singularitti
Copy link

I cannot even run the first example:

import SimpleContainerGenerator

mkpath("my_image_name")
cd("my_image_name")

pkgs = [
    "Foo",
    "Bar",
    "Baz",
]

SimpleContainerGenerator.create_dockerfile(pkgs, pwd(); julia_version = v"1.4.0")
run(`docker build -t my_docker_username/my_image_name .`)

The error is from the last step:

julia> run(`docker build -t my_docker_username/my_image_name .`)
Sending build context to Docker daemon   21.5kB
Step 1/80 : FROM ubuntu:latest
 ---> 4e5021d210f6
Step 2/80 : ENV DEBIAN_FRONTEND noninteractive
 ---> Using cache
 ---> 1aac5812b3e7
Step 3/80 : RUN apt-get update
 ---> Using cache
 ---> c4ad12b06313
Step 4/80 : RUN apt-get -yq dist-upgrade
 ---> Using cache
 ---> d979af7133ee
Step 5/80 : RUN apt-get update
 ---> Using cache
 ---> cfd9ba4870cc
Step 6/80 : RUN apt-get -yq dist-upgrade
 ---> Using cache
 ---> 5f91f0af23cb
Step 7/80 : RUN apt-get install -yq --no-install-recommends apt-utils build-essential bzip2 ca-certificates cmake coreutils curl emacs  emacs nano vim fonts-liberation gettext gfortran git git-all git-flow git-lfs gnupg gpg gpg-agent gzip hdf5-tools libcurl4-openssl-dev libgconf-2-4 libgtk2.0-0 libnss3 libpgf-dev libpgf6 libpgf6-dbg libpng-dev libssl-dev libxss1 libxtst6 locales lsb-release m4 nano openssh-client openssl pdf2svg poppler-utils qt5-default screen sudo texlive-binaries texlive-latex-base texlive-latex-extra texlive-luatex texlive-pictures tmux  tree unzip vim wget xdg-utils zip zlib1g-dev
 ---> Using cache
 ---> 4a7da1d106a3
Step 8/80 : RUN apt-get update
 ---> Using cache
 ---> 6cee8577de7d
Step 9/80 : RUN apt-get -yq dist-upgrade
 ---> Using cache
 ---> ec03c25aaa7d
Step 10/80 : RUN apt-get update
 ---> Using cache
 ---> 60f0adfad2ed
Step 11/80 : RUN apt-get -yq dist-upgrade
 ---> Using cache
 ---> 1ec4cd1906c8
Step 12/80 : RUN apt-get clean
 ---> Using cache
 ---> fc610418b5dd
Step 13/80 : RUN rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 2a1e8777f4e5
Step 14/80 : RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
 ---> Using cache
 ---> 8e4aa7ad1389
Step 15/80 : ENV SHELL=/bin/bash LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 PROMPT_COMMAND="echo -n [$()]"
 ---> Using cache
 ---> 0d75bc233ed7
Step 16/80 : RUN mkdir -p /tmp/simplecontainergenerator_containers-julia-gpg-key
 ---> Using cache
 ---> 92f832905d0c
Step 17/80 : RUN cd /tmp/simplecontainergenerator_containers-julia-gpg-key && curl https://julialang.org/juliareleases.asc --output juliareleases.asc
 ---> Using cache
 ---> 27799f36b212
Step 18/80 : RUN cd /tmp/simplecontainergenerator_containers-julia-gpg-key && gpg --import juliareleases.asc
 ---> Using cache
 ---> 119fa94969c8
Step 19/80 : RUN rm -rf /tmp/simplecontainergenerator_containers-julia-gpg-key
 ---> Using cache
 ---> c39f2422d0eb
Step 20/80 : RUN mkdir -p /tmp/simplecontainergenerator_containers-download-julia
 ---> Using cache
 ---> 24ef808efa1c
Step 21/80 : RUN cd /tmp/simplecontainergenerator_containers-download-julia && wget -O julia.tar.gz https://julialang-s3.julialang.org/bin/linux/x64/1.4/julia-1.4.0-linux-x86_64.tar.gz
 ---> Using cache
 ---> ba2654e41b3b
Step 22/80 : RUN cd /tmp/simplecontainergenerator_containers-download-julia && wget -O julia.tar.gz.asc https://julialang-s3.julialang.org/bin/linux/x64/1.4/julia-1.4.0-linux-x86_64.tar.gz.asc
 ---> Using cache
 ---> 9c630cc4877b
Step 23/80 : RUN cd /tmp/simplecontainergenerator_containers-download-julia && gpg --verify julia.tar.gz.asc
 ---> Using cache
 ---> d3ca46a83d6b
Step 24/80 : RUN rm -rf /opt
 ---> Using cache
 ---> 3e0a8c8faee4
Step 25/80 : RUN mkdir -p /opt
 ---> Using cache
 ---> 1e85eb8617db
Step 26/80 : RUN cd /tmp/simplecontainergenerator_containers-download-julia && tar xzf julia.tar.gz -C /opt --strip-components=1
 ---> Using cache
 ---> c07849403030
Step 27/80 : RUN rm -rf /tmp/simplecontainergenerator_containers-download-julia
 ---> Using cache
 ---> bb3384818bd8
Step 28/80 : RUN rm -rf /tmp/simplecontainergenerator-containers-build-depot
 ---> Using cache
 ---> ed27b054143a
Step 29/80 : RUN mkdir -p /tmp/simplecontainergenerator-containers-build-depot
 ---> Using cache
 ---> 48b6797bfb0d
Step 30/80 : RUN cd /tmp && JULIA_DEPOT_PATH=/tmp/simplecontainergenerator-containers-build-depot /opt/bin/julia -e 'import InteractiveUtils; InteractiveUtils.versioninfo(; verbose=true)'
 ---> Running in bc9118910010
Invalid instruction at 0x7fae62ff4ba8: 0x62, 0xf1, 0x7d, 0x48, 0xef, 0xc0, 0xc3, 0x90, 0x89, 0xc2, 0x83, 0xe2, 0xe0, 0x0f, 0x8e

signal (4): Illegal instruction
in expression starting at none:0
dot_compute at /opt/bin/../lib/julia/libopenblas64_.so (unknown line)
Allocations: 2502 (Pool: 2494; Big: 8); GC: 0
Illegal instruction
The command '/bin/sh -c cd /tmp && JULIA_DEPOT_PATH=/tmp/simplecontainergenerator-containers-build-depot /opt/bin/julia -e 'import InteractiveUtils; InteractiveUtils.versioninfo(; verbose=true)'' returned a non-zero code: 132
ERROR: failed process: Process(`docker build -t my_docker_username/my_image_name .`, ProcessExited(132)) [132]

Stacktrace:
 [1] pipeline_error at ./process.jl:525 [inlined]
 [2] run(::Cmd; wait::Bool) at ./process.jl:440
 [3] run(::Cmd) at ./process.jl:438
 [4] top-level scope at REPL[6]:1

I suspected because docker does not have full-disk access on macOS. But this error still occurs after I gave it.

julia> versioninfo()
Julia Version 1.5.0-DEV.660
Commit f7e5f3ea09 (2020-04-22 01:52 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Xeon(R) W-2140B CPU @ 3.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = code

on macOS 10.15.4.

@DilumAluthge DilumAluthge added the bug Something isn't working label Apr 23, 2020
@DilumAluthge
Copy link
Member

Run the following commands in a terminal:

docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker rmi $(docker images -q) --force

Then try again and see if you can still reproduce the issue.

@singularitti
Copy link
Author

I tried and the same error persists.

@DilumAluthge
Copy link
Member

Hmmm.

How much memory (RAM) is Docker Desktop allowed to use?

@singularitti
Copy link
Author

image

Here is the resource I gave it.

@DilumAluthge
Copy link
Member

I am having trouble reproducing this.

Can you reproduce this on two different machines?

@DilumAluthge
Copy link
Member

Can you reproduce this on two different machines?

Or is this bug only present on a single machine?

@DilumAluthge
Copy link
Member

Also, can you try with julia_version = v"1.4.1" and see if the bug is still present?

@singularitti
Copy link
Author

It might be my package's problem. I can create images with either Example.jl or InteractiveUtils.

@DilumAluthge
Copy link
Member

It might be my package's problem. I can create images with either Example.jl or InteractiveUtils.

Let's try something more complicated. Try creating an image with GLM.jl. Are you able to create an image with GLM.jl?

Also, what is the package you are trying to use? Can you share a link to the package's repository?

@singularitti
Copy link
Author

singularitti commented May 12, 2020

It's EquationsOfState.jl. You can try the latest release.

@singularitti
Copy link
Author

Let's try something more complicated. Try creating an image with GLM.jl. Are you able to create an image with GLM.jl?

I can't. I tried twice, same error.

Step 24/80 : RUN rm -rf /opt
 ---> Running in 8d6ad8b447c3
Removing intermediate container 8d6ad8b447c3
 ---> 20297e0bd163
Step 25/80 : RUN mkdir -p /opt
 ---> Running in 58fe259e8b28
Removing intermediate container 58fe259e8b28
 ---> 57e0c2c3ccfc
Step 26/80 : RUN cd /tmp/simplecontainergenerator_containers-download-julia && tar xzf julia.tar.gz -C /opt --strip-components=1
 ---> Running in 2fc24764a62b
Removing intermediate container 2fc24764a62b
 ---> a11211ffc966
Step 27/80 : RUN rm -rf /tmp/simplecontainergenerator_containers-download-julia
 ---> Running in 5cb780d48aa4
Removing intermediate container 5cb780d48aa4
 ---> 02ebddfc63b4
Step 28/80 : RUN rm -rf /tmp/simplecontainergenerator-containers-build-depot
 ---> Running in 732e17ff6bbd
Removing intermediate container 732e17ff6bbd
 ---> 0d6a908e8590
Step 29/80 : RUN mkdir -p /tmp/simplecontainergenerator-containers-build-depot
 ---> Running in ef4a07d5ad6b
Removing intermediate container ef4a07d5ad6b
 ---> 75be99c6c039
Step 30/80 : RUN cd /tmp && JULIA_DEPOT_PATH=/tmp/simplecontainergenerator-containers-build-depot /opt/bin/julia -e 'import InteractiveUtils; InteractiveUtils.versioninfo(; verbose=true)'
 ---> Running in 9f877bf4763d
Invalid instruction at 0x7f21f7aa4ba8: 0x62, 0xf1, 0x7d, 0x48, 0xef, 0xc0, 0xc3, 0x90, 0x89, 0xc2, 0x83, 0xe2, 0xe0, 0x0f, 0x8e

signal (4): Illegal instruction
in expression starting at none:0
dot_compute at /opt/bin/../lib/julia/libopenblas64_.so (unknown line)
Allocations: 2504 (Pool: 2496; Big: 8); GC: 0
Illegal instruction
The command '/bin/sh -c cd /tmp && JULIA_DEPOT_PATH=/tmp/simplecontainergenerator-containers-build-depot /opt/bin/julia -e 'import InteractiveUtils; InteractiveUtils.versioninfo(; verbose=true)'' returned a non-zero code: 132
ERROR: failed process: Process(`docker build -t my_docker_username/my_image_name .`, ProcessExited(132)) [132]

Stacktrace:
 [1] run(::Cmd; wait::Bool) at /Applications/Julia-1.4.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 [2] run(::Cmd) at ./process.jl:438
 [3] top-level scope at REPL[6]:1

@DilumAluthge
Copy link
Member

DilumAluthge commented May 12, 2020

Try this example:

import SimpleContainerGenerator

mkpath("my_image_name")
cd("my_image_name")

pkgs = [
    "GLM",
]

SimpleContainerGenerator.create_dockerfile(pkgs, pwd(); julia_version = v"1.4.0", no_test = String["GLM"])
run(`docker build -t my_docker_username/my_image_name .`)

@singularitti
Copy link
Author

Same error here.

@DilumAluthge
Copy link
Member

I am not able to reproduce this.

Are you able to reproduce this error on two or more different machines?

Or does the error only occur on one machine?

@singularitti
Copy link
Author

It occurs on two of my macs, 1 MacBook, 1 iMac. But they have similar settings, so I am not sure whether that counts 2.

@DilumAluthge
Copy link
Member

DilumAluthge commented Jun 13, 2020

Can you post details of the CPUs in each of those machines?

@singularitti
Copy link
Author

singularitti commented Jun 13, 2020

@DilumAluthge
Copy link
Member

Can you try this example and post the output:

import SimpleContainerGenerator

mkpath("my_image_name")
cd("my_image_name")

pkgs = [
    "GLM",
]

SimpleContainerGenerator.create_dockerfile(pkgs, pwd(); julia_version = "nightly", no_test = String["GLM"])
run(`docker build -t my_docker_username/my_image_name .`)

@singularitti
Copy link
Author

It works:

Successfully tagged my_docker_username/my_image_name:latest
Process(`docker build -t my_docker_username/my_image_name .`, ProcessExited(0))

@DilumAluthge
Copy link
Member

Now try this:

import SimpleContainerGenerator

mkpath("my_image_name")
cd("my_image_name")

pkgs = [
    "GLM",
]

SimpleContainerGenerator.create_dockerfile(pkgs, pwd(); julia_version = "nightly")
run(`docker build -t my_docker_username/my_image_name .`)

@singularitti
Copy link
Author

errors:

Step 63/80 : RUN cd /tmp && SIMPLECONTAINERGENERATOR_CONTAINER_NO_TEMP_DEPOT="true" /usr/bin/no_sysimage_julia /opt/simplecontainergenerator_containers/packagecompiler_run.jl
 ---> Running in d3d8c791a32c
The length of pkgnames_symbols is 80
The length of pkgnames_nonstdlib_symbols is 51
The length of pkgnames_stdlib_symbols is 29
pkgnames_symbols: (n = 80)
1. Arpack
2. Arpack_jll
3. Base64
4. CRC32c
5. CSV
6. CategoricalArrays
7. CodecZlib
8. Compat
9. CompilerSupportLibraries_jll
10. DataAPI
11. DataFrames
12. DataStructures
13. DataValueInterfaces
14. Dates
15. DelimitedFiles
16. Distributed
17. Distributions
18. ExprTools
19. EzXML
20. FileIO
21. FilePathsBase
22. FileWatching
23. FillArrays
24. Future
25. GLM
26. InteractiveUtils
27. InvertedIndices
28. IteratorInterfaceExtensions
29. JSON
30. LibGit2
31. Libdl
32. Libiconv_jll
33. LinearAlgebra
34. Logging
35. Markdown
36. Missings
37. Mmap
38. Mocking
39. OpenBLAS_jll
40. OpenSpecFun_jll
41. OrderedCollections
42. PDMats
43. Parsers
44. Pkg
45. PooledArrays
46. Printf
47. Profile
48. QuadGK
49. RData
50. RDatasets
51. REPL
52. Random
53. RecipesBase
54. Reexport
55. Requires
56. Rmath
57. Rmath_jll
58. SHA
59. Serialization
60. SharedArrays
61. ShiftedArrays
62. Sockets
63. SortingAlgorithms
64. SparseArrays
65. SpecialFunctions
66. Statistics
67. StatsBase
68. StatsFuns
69. StatsModels
70. SuiteSparse
71. TableTraits
72. Tables
73. Test
74. TimeZones
75. TranscodingStreams
76. UUIDs
77. Unicode
78. WeakRefStrings
79. XML2_jll
80. Zlib_jll
pkgnames_nonstdlib_symbols: (n = 51)
1. Arpack
2. Arpack_jll
3. CSV
4. CategoricalArrays
5. CodecZlib
6. Compat
7. CompilerSupportLibraries_jll
8. DataAPI
9. DataFrames
10. DataStructures
11. DataValueInterfaces
12. Distributions
13. ExprTools
14. EzXML
15. FileIO
16. FilePathsBase
17. FillArrays
18. GLM
19. InvertedIndices
20. IteratorInterfaceExtensions
21. JSON
22. Libiconv_jll
23. Missings
24. Mocking
25. OpenBLAS_jll
26. OpenSpecFun_jll
27. OrderedCollections
28. PDMats
29. Parsers
30. PooledArrays
31. QuadGK
32. RData
33. RDatasets
34. RecipesBase
35. Reexport
36. Requires
37. Rmath
38. Rmath_jll
39. ShiftedArrays
40. SortingAlgorithms
41. SpecialFunctions
42. StatsBase
43. StatsFuns
44. StatsModels
45. TableTraits
46. Tables
47. TimeZones
48. TranscodingStreams
49. WeakRefStrings
50. XML2_jll
51. Zlib_jll
pkgnames_stdlib_symbols: (n = 29)
1. Base64
2. CRC32c
3. Dates
4. DelimitedFiles
5. Distributed
6. FileWatching
7. Future
8. InteractiveUtils
9. LibGit2
10. Libdl
11. LinearAlgebra
12. Logging
13. Markdown
14. Mmap
15. Pkg
16. Printf
17. Profile
18. REPL
19. Random
20. SHA
21. Serialization
22. SharedArrays
23. Sockets
24. SparseArrays
25. Statistics
26. SuiteSparse
27. Test
28. UUIDs
29. Unicode
[ Info: PackageCompiler: creating system image object file, this might take a while...
FATAL ERROR: Symbol "ccalllib_libRmath-julia.so40135"not found
signal (6): Aborted
in expression starting at none:0
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
addModule at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:640
jl_add_to_ee at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:893 [inlined]
jl_add_to_ee at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:901
_jl_compile_codeinst at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:102
jl_generate_fptr at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:302
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/gf.c:1994
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/gf.c:1945 [inlined]
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2255 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
walk_to_defs at ./compiler/ssair/passes.jl:228
getfield_elim_pass! at ./compiler/ssair/passes.jl:670
run_passes at ./compiler/ssair/driver.jl:143
optimize at ./compiler/optimize.jl:176
typeinf at ./compiler/typeinfer.jl:33
typeinf_ext at ./compiler/typeinfer.jl:589
typeinf_ext_toplevel at ./compiler/typeinfer.jl:622
typeinf_ext_toplevel at ./compiler/typeinfer.jl:618
unknown function (ip: 0x7ff909203875)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2245 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1701 [inlined]
jl_type_infer at /buildworker/worker/package_linux64/build/src/gf.c:300
jl_ci_cache_lookup at /buildworker/worker/package_linux64/build/src/aotcompile.cpp:270 [inlined]
jl_create_native at /buildworker/worker/package_linux64/build/src/aotcompile.cpp:325
jl_precompile at /buildworker/worker/package_linux64/build/src/precompile.c:408
jl_write_compiler_output at /buildworker/worker/package_linux64/build/src/precompile.c:33
jl_atexit_hook at /buildworker/worker/package_linux64/build/src/init.c:218
main at /buildworker/worker/package_linux64/build/ui/repl.c:228
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /opt/bin/julia (unknown line)
Allocations: 242519561 (Pool: 242433980; Big: 85581); GC: 243
ERROR: LoadError: failed process: Process(`/opt/bin/julia --color=yes --startup-file=no '--cpu-target=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1);native' --sysimage=/opt/lib/julia/sys.so --project=/opt/simplecontainergenerator_containers/julia_project --output-o=/tmp/jl_ZhRgLI.o -e 'Base.reinit_stdio()
@eval Sys BINDIR = ccall(:jl_get_julia_bindir, Any, ())::String
Base.init_load_path()
Base.init_depot_path()
using Arpack
using Arpack_jll
using Base64
using CRC32c
using CSV
using CategoricalArrays
using CodecZlib
using Compat
using CompilerSupportLibraries_jll
using DataAPI
using DataFrames
using DataStructures
using DataValueInterfaces
using Dates
using DelimitedFiles
using Distributed
using Distributions
using ExprTools
using EzXML
using FileIO
using FilePathsBase
using FileWatching
using FillArrays
using Future
using GLM
using InteractiveUtils
using InvertedIndices
using IteratorInterfaceExtensions
using JSON
using LibGit2
using Libdl
using Libiconv_jll
using LinearAlgebra
using Logging
using Markdown
using Missings
using Mmap
using Mocking
using OpenBLAS_jll
using OpenSpecFun_jll
using OrderedCollections
using PDMats
using Parsers
using Pkg
using PooledArrays
using Printf
using Profile
using QuadGK
using RData
using RDatasets
using REPL
using Random
using RecipesBase
using Reexport
using Requires
using Rmath
using Rmath_jll
using SHA
using Serialization
using SharedArrays
using ShiftedArrays
using Sockets
using SortingAlgorithms
using SparseArrays
using SpecialFunctions
using Statistics
using StatsBase
using StatsFuns
using StatsModels
using SuiteSparse
using TableTraits
using Tables
using Test
using TimeZones
using TranscodingStreams
using UUIDs
using Unicode
using WeakRefStrings
using XML2_jll
using Zlib_jll
# This @eval prevents symbols from being put into Main
@eval Module() begin
    PrecompileStagingArea = Module()
    for (_pkgid, _mod) in Base.loaded_modules
        if !(_pkgid.name in ("Main", "Core", "Base"))
            eval(PrecompileStagingArea, :(const $(Symbol(_mod)) = $_mod))
        end
    end
    precompile_statements = String[]
        append!(precompile_statements, readlines("/tmp/jl_zuztVI"))

    for statement in sort(precompile_statements)
        # println(statement)
        try
            Base.include_string(PrecompileStagingArea, statement)
        catch
            # See julia issue #28808
            @debug "failed to execute $statement"
        end
    end
end # module
empty!(LOAD_PATH)
empty!(DEPOT_PATH)
'`, ProcessSignaled(6)) [0]

Stacktrace:
 [1] pipeline_error at ./process.jl:525 [inlined]
 [2] run(::Cmd; wait::Bool) at ./process.jl:440
 [3] run at ./process.jl:438 [inlined]
 [4] create_sysimg_object_file(::String, ::Array{String,1}; project::String, base_sysimage::String, precompile_execution_file::Array{String,1}, precompile_statements_file::Array{String,1}, cpu_target::String, script::Nothing, isapp::Bool) at /opt/simplecontainergenerator_containers/packagecompiler_depot/packages/PackageCompiler/xtztx/src/PackageCompiler.jl:292
 [5] create_sysimage(::Array{Symbol,1}; sysimage_path::String, project::String, precompile_execution_file::String, precompile_statements_file::Array{String,1}, incremental::Bool, filter_stdlibs::Bool, replace_default::Bool, cpu_target::String, script::Nothing, base_sysimage::Nothing, isapp::Bool) at /opt/simplecontainergenerator_containers/packagecompiler_depot/packages/PackageCompiler/xtztx/src/PackageCompiler.jl:423
 [6] top-level scope at /opt/simplecontainergenerator_containers/packagecompiler_run.jl:47
in expression starting at /opt/simplecontainergenerator_containers/packagecompiler_run.jl:46
The command '/bin/sh -c cd /tmp && SIMPLECONTAINERGENERATOR_CONTAINER_NO_TEMP_DEPOT="true" /usr/bin/no_sysimage_julia /opt/simplecontainergenerator_containers/packagecompiler_run.jl' returned a non-zero code: 1
ERROR: failed process: Process(`docker build -t my_docker_username/my_image_name .`, ProcessExited(1)) [1]

Stacktrace:
[1] pipeline_error
  @ Base /Applications/Julia-1.5.app/Contents/Resources/julia/bin/../share/julia/base/process.jl:525 [inlined]

[2] #run#592(wait::Bool, ::typeof(run), cmds::Cmd)
  @ Base /Applications/Julia-1.5.app/Contents/Resources/julia/bin/../share/julia/base/process.jl:440

[3] run(cmds::Cmd)
  @ Base /Applications/Julia-1.5.app/Contents/Resources/julia/bin/../share/julia/base/process.jl:438

[4] top-level scope
  @ REPL[6]:1

@DilumAluthge
Copy link
Member

Ah that's a different error, one specific to GLM.jl.

What package were you trying to compile? EquationsOfState.jl, right?

Can you try this example and post the output:

import SimpleContainerGenerator

mkpath("my_image_name")
cd("my_image_name")

pkgs = [
    "EquationsOfState",
]

SimpleContainerGenerator.create_dockerfile(pkgs, pwd(); julia_version = "nightly", no_test = String["EquationsOfState"])
run(`docker build -t my_docker_username/my_image_name .`)

@singularitti
Copy link
Author

It seems to work:

Successfully built 7b13281b70b8
Successfully tagged my_docker_username/my_image_name:latest
Process(`docker build -t my_docker_username/my_image_name .`, ProcessExited(0))

@DilumAluthge
Copy link
Member

Awesome. So I figured out what this bug is. Basically, for this bug to happen, you need three parts to happen together:

  1. An old enough version of OpenBLAS
  2. A specific kind of containerization (e.g. Docker) and/or virtualization
  3. A specific kind of CPU, including but not limited to a CPU with the Skylake or Coffee Lake microarchitecture.

If all three of those parts happen together, then we get this bug.

You are using Docker for Mac, which includes a virtualization layer, so that meets part 2. Your Xeon is Skylake and your i9 is Coffee Lake, so that meets part 3.

Julia 1.4 has an old version of OpenBLAS that has this bug, so using Julia 1.4 fulfills part 1. So on Julia 1.4, all three necessary pieces are met, so we see this bug.

Fortunately, Julia 1.5/Julia 1.6/Julia nightly/Julia master have a newer version of OpenBLAS that fixes this bug. So when you use Julia nightly, part 1 is not met, so the bug does not occur.

For now, your solution will be to set:

julia_version = "nightly"

Once Julia 1.5 has been released, you can instead set:

julia_version = v"1.5.0"

Does that make sense? If so, let me know, and I will close this issue, since it seems that you are now able to successfully build a Docker image with the EquationsOfState.jl package.

@singularitti
Copy link
Author

Awesome. So I figured out what this bug is. Basically, for this bug to happen, you need three parts to happen together:

  1. An old enough version of OpenBLAS
  2. A specific kind of containerization (e.g. Docker) and/or virtualization
  3. A specific kind of CPU, including but not limited to a CPU with the Skylake or Coffee Lake microarchitecture.

If all three of those parts happen together, then we get this bug.

You are using Docker for Mac, which includes a virtualization layer, so that meets part 2. Your Xeon is Skylake and your i9 is Coffee Lake, so that meets part 3.

Julia 1.4 has an old version of OpenBLAS that has this bug, so using Julia 1.4 fulfills part 1. So on Julia 1.4, all three necessary pieces are met, so we see this bug.

Fortunately, Julia 1.5/Julia 1.6/Julia nightly/Julia master have a newer version of OpenBLAS that fixes this bug. So when you use Julia nightly, part 1 is not met, so the bug does not occur.

For now, your solution will be to set:

julia_version = "nightly"

Once Julia 1.5 has been released, you can instead set:

julia_version = v"1.5.0"

Does that make sense? If so, let me know, and I will close this issue, since it seems that you are now able to successfully build a Docker image with the EquationsOfState.jl package.

Great! Thank you!

@DilumAluthge
Copy link
Member

Thank you for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants