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

MbedTLS_jll seems broken on win64 #38409

Closed
vtjnash opened this issue Nov 12, 2020 · 6 comments
Closed

MbedTLS_jll seems broken on win64 #38409

vtjnash opened this issue Nov 12, 2020 · 6 comments

Comments

@vtjnash
Copy link
Member

vtjnash commented Nov 12, 2020

observed at https://travis-ci.com/github/JuliaCI/Coverage.jl/jobs/434224582 (maybe a [compat] bounds issue?)

@visr
Copy link
Contributor

visr commented Nov 23, 2020

Indeed it's broken, so many packages don't work on julia master right now.

Using the latest (v2.24.0+1) version of MbedTLS_jll gives the same as the CI log above:

julia> using MbedTLS_jll
ERROR: InitError: could not load library "C:\Users\visser_mn\.julia\artifacts\766d976def66e8367dd690d05cfe422f883d43ba\bin\libmbedtls.dll"

I had a look with DependencyWalker, here is a brief snippet of the output that may show the issue:

using DependencyWalker
Library(MbedTLS_jll.libmbedtls_path)
◼ C:\Users\visser_mn\.julia\artifacts\766d976def66e8367dd690d05cfe422f883d43ba\bin\libmbedtls.dll
 ◼ C:\bin\julia-1.6\bin\libmbedcrypto.dll
 ◼ C:\bin\julia-1.6\bin\libmbedx509.dll

Both the artifact and the julia bin dir have libmbedtls, libmbedcrypto, and libmbedx509. But now they are getting mixed. If I copy the 3 versions in the julia bin dir over the artifact versions, LibMbedTLS_jll loads without issue, and MbedTLS tests pass.

Maybe @staticfloat knowns if this will be resolved by #35193 (or already #38347?). Or can these two builds be made to work together?

@staticfloat
Copy link
Member

#38347 will cause Pkg to not download new versions of MbedTLS_jll and instead use the copy that ships with Julia. That's the best solution to this.

@musm
Copy link
Contributor

musm commented Nov 23, 2020

#38347 will cause Pkg to not download new versions of MbedTLS_jll and instead use the copy that ships with Julia. That's the best solution to this.

How does that work if MbedTLS_jll gets upgraded? Will users have to wait for a new release version of Julia to get the updated version of MbedTLS_jll?

@staticfloat
Copy link
Member

Yes; because libmbedtls.so ships with Julia, it has always been the case that if you try to dlopen("libmbedtls.so") you'll get the one that Julia shipped with, even if MbedTLS_jll installed a different artifact. (This is only partially true; because on some systems libmbedtls.so is loaded lazily, your results would actually vary depending on whether you loaded Pkg or MbedTLS_jll first. Yikes!)

v1.6 will cut down on the confusion by just not downloading an artifact for MbedTLS_jll.

@timholy
Copy link
Member

timholy commented Nov 24, 2020

Yes, this is causing widespread test failures. @vtjnash, it looks like #38347 is just waiting on a review and could perhaps be merged soon?

@stillyslalom
Copy link
Contributor

I think this is fixed on latest nightly:

julia> versioninfo()
Julia Version 1.6.0-DEV.1650
Commit 7d5c0c5633* (2020-12-03 22:42 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: AMD Ryzen 9 4900HS with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.0 (ORCJIT, znver2)
Environment:
  JULIA_NUM_THREADS = 8

julia> using MbedTLS_jll
[ Info: Precompiling MbedTLS_jll [c8ffd9c3-330d-5841-b78e-0817d7145fa1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants