-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[linear algebra] Patch Openblas v0.3.10 to fix EXCEPTION_ACCESS_VIOLATION #42397
[linear algebra] Patch Openblas v0.3.10 to fix EXCEPTION_ACCESS_VIOLATION #42397
Conversation
This looks good. @KristofferC Can we merge? |
We should probably merge JuliaPackaging/Yggdrasil#3655 first, right? cc: @staticfloat |
It doesn't matter. This is just fixing the Julia source build. Once the Yggdrasil PR is merged, we can bump deps/Versions.make and I am sure 2 other places that I always forget at which point the fix will start appearing in the binaries. |
Once JuliaRegistries/General#45875 lands we should update versions and refresh checksums |
After updating the version number manually, I updated the checksum with Is there anything else I need to do? |
OpenBLAS.v0.3.10+8.x86_64-w64-mingw32-libgfortran4.tar.gz/md5/d616bef77c9d1b0f199ebcb8a5ccf908 | ||
OpenBLAS.v0.3.10+8.x86_64-w64-mingw32-libgfortran4.tar.gz/sha512/b12a9310be4a934b86b073ed03cea18e30f01039399162409b1dff1e097d75430cbaa1d7d5cf0972d32907137c54d455e266aeb854ad86f7bbb309b01c0d9dd1 | ||
OpenBLAS.v0.3.10+8.x86_64-w64-mingw32-libgfortran5.tar.gz/md5/733f0803a1c835a94beeec70ef713512 | ||
OpenBLAS.v0.3.10+8.x86_64-w64-mingw32-libgfortran5.tar.gz/sha512/97fcbfd8af8ad281203529e2d31bf5a4892831ebf2805d09b373ce3bd5fb108f33436ea42b08287d283b7b45e4be0f5433409a9bc5d8252941f30cd03851a839 | ||
openblas-63b03efc2af332c88b86d4fd8079d00f4b439adf.tar.gz/md5/3d692acc6927454f620a4c493bdb159d | ||
openblas-63b03efc2af332c88b86d4fd8079d00f4b439adf.tar.gz/sha512/cf89f6db1b6366833d29a1dc718ea0b8f61d162f70695c33fc94afbaba232605630a7a7cc3d3b9bed7493ec85402b65180ca99c3101de7141d6f2919318f55c1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above two lines of checksums are not updated, is this the expected behavior of the contrib/refresh_checksums.mk
script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes those are the sources
Downloaded and tested buildbot/package_win64 , confirmed that the problem has been fixed julia> versioninfo()
Julia Version 1.6.3-pre.85
Commit 10de22d171 (2021-10-01 03:32 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
julia> arrSzie = 10000;
julia> arrSzie = 10001; # Has error
julia> arrType = ComplexF64;
julia> using LinearAlgebra.BLAS: dotc, dotu
julia> x = ones(arrType, arrSzie);
julia> y = ones(arrType, arrSzie);
julia> dotc(x, y) # crash: EXCEPTION_ACCESS_VIOLATION
10001.0 + 0.0im
julia> dotu(x, y) # crash
10001.0 + 0.0im
julia> dotc(x, y) == dotu(x, y) == 10001.0 + 0.0im
true |
Tests of Failed test log
|
Thanks! |
(Missed that this was against 1.6) |
…TION (#42397) * [OpenBLAS] cherry pick one patch to fix `zdot` crash xref issue: #40963 cherry pick: OpenMathLib/OpenBLAS@b205323 * [test/LinearAlgebra] test Issue #40963 * [OpenBLAS] Update version * [OpenBLAS] Update checksums
…TION (#42397) * [OpenBLAS] cherry pick one patch to fix `zdot` crash xref issue: #40963 cherry pick: OpenMathLib/OpenBLAS@b205323 * [test/LinearAlgebra] test Issue #40963 * [OpenBLAS] Update version * [OpenBLAS] Update checksums
Issue Description
OpenBLAS, or more precisely CBLAS, will crash when you multiply two large matrices together.
After testing, this issue was found to occur in OpenBLAS v0.3.10, and was fixed in v0.3.12 and later.
Conditions for problem reproduction
Test code
LinearAlgebra.BLAS
Note: You can replace
Julia-1.6.x/bin/libopenblas64_.dll
to test other dlls.ccall
You can get the compiled product with the patch applied from the AzurePipeline in JuliaPackaging/Yggdrasil#3655.
e.g.: OpenBLAS.v0.3.10.x86_64-w64-mingw32-libgfortran5
Patch code
With some
git bisect
(#40963 (comment)), I found that commit b205323 seems to fix this issue.But, I'm not sure if this fully fixes the issue, more testing may be needed.
fix #40963.
Note: Buildbot uses the compiled product of BinaryBuilder.jl, so the bug is not fixed in the CI output artifacts.You can download the compiled product of BinaryBuilder.jl with patch applied in JuliaPackaging/Yggdrasil#3655, replace the
libopenblas64_.dll
that comes with julia, and test it.We may need to merge JuliaPackaging/Yggdrasil#3655 to get the repairedOpenBLAS_jll.jl
first, and then update the OpenBLAS version in julia's dependency.