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

Expand ssl certificate file search parameters #18997

Merged
merged 4 commits into from
Oct 19, 2016
Merged

Conversation

staticfloat
Copy link
Member

We just need to search for more variations on the same name in some cases.

@tkelman
Copy link
Contributor

tkelman commented Oct 18, 2016

I think the approach of overriding the environment variable may have broken shelling out to curl from the binaries... see e.g. http://pkg.julialang.org/logs/Requests_0.6.log

@staticfloat
Copy link
Member Author

I've added a slightly more intelligent environment variable overriding here, let's see if it works.

@davidanthoff
Copy link
Contributor

This crashes with a new error on WSL (Windows Subsystem for Windows, aka Bash on Ubuntu on Windows):

davidanthoff@DANTHOFF-HOME:~/source/julia$ ./julia
fatal: error thrown and no exception handler available.
Base.InitError(mod=:LibGit2, error=Base.MethodError(f=Base.LibGit2.#get(), args=(Base.EnvHash(), "SSL_CERT_DIR", "")))
rec_backtrace at /home/davidanthoff/source/julia/src/stackwalk.c:84
record_backtrace at /home/davidanthoff/source/julia/src/task.c:238
jl_throw at /home/davidanthoff/source/julia/src/task.c:560
jl_method_error_bare at /home/davidanthoff/source/julia/src/gf.c:1098
jl_method_error at /home/davidanthoff/source/julia/src/gf.c:1115
jl_apply_generic at /home/davidanthoff/source/julia/src/gf.c:1852
__init__ at ./libgit2/libgit2.jl:543
unknown function (ip: 0x7fe82054f748)
jl_call_method_internal at /home/davidanthoff/source/julia/src/julia_internal.h:239 [inlined]
jl_apply_generic at /home/davidanthoff/source/julia/src/gf.c:1861
jl_apply at /home/davidanthoff/source/julia/src/julia.h:1378 [inlined]
jl_module_run_initializer at /home/davidanthoff/source/julia/src/toplevel.c:83
_julia_init at /home/davidanthoff/source/julia/src/init.c:702
julia_init at /home/davidanthoff/source/julia/src/task.c:289
main at /home/davidanthoff/source/julia/ui/repl.c:247
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4013cf)
davidanthoff@DANTHOFF-HOME:~/source/julia$

@tkelman
Copy link
Contributor

tkelman commented Oct 18, 2016

that's some iffy name shadowing pun there... (LibGit2.get, that is)


@static if is_linux()
if old_ssl_cert_dir != Base.get(ENV, "SSL_CERT_DIR", "")
ENV["SSL_CERT_DIR"] = old_ssl_cert_dir
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it started as unset, then was changed to non-empty by set_ssl_cert_locations, we probably shouldn't set it to empty

@tkelman
Copy link
Contributor

tkelman commented Oct 18, 2016

Is .crt a different format than .pem? On Ubuntu 14.04 and 16.04 I see a /usr/lib/ssl/certs/ca-certificates.crt but none of the three options currently checked here.

@tkelman
Copy link
Contributor

tkelman commented Oct 19, 2016

unanswered question above and we may need to add more of these, but let's see if this helps the nightlies

@tkelman tkelman merged commit 90a3740 into master Oct 19, 2016
@tkelman tkelman deleted the sf/libgit_certfix branch October 19, 2016 02:14
@staticfloat
Copy link
Member Author

Sorry,

.crt and .pem are generally not different file formats, so we're good on that front. On my Ubuntu 14.04 machine, I saw a cert.pem which was a symlink to the ca-certificates.crt file that you describe. Let's see what machines this breaks on, then we can add more search locations.

@tkelman
Copy link
Contributor

tkelman commented Oct 19, 2016

Looking at the PkgEval run that's going right now (which does include this commit), this looks like it's still causing problems with shelling out to curl. nevermind it's something different, will wait for today's logs to get published

@staticfloat
Copy link
Member Author

I don't think the DataFrames failures we're seeing is a curl shelling problem, I think it's a LibGit2 problem. I'm not sure why, but this call is hanging indefinitely:

Base.LibGit2.clone("https://github.com/JuliaStats/DataFrames.jl.git", "/tmp/DataFrames_bare_cb", isbare = true, remote_cb = LibGit2.mirror_cb())

If we omit the remote_cb callback parameter, it works fine, but instrumenting the callback shows that the callback finishes just fine, so it must be some effect that the callback is having further down the line. @wildart @jakebolewski, do either of you have any ideas why this would be causing problems?

@tkelman
Copy link
Contributor

tkelman commented Oct 19, 2016

@staticfloat we have #18871 open, so let's move that part there - pardon my initial misdiagnosis, I'll check the logs if there's anything other than that still going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libgit2 The libgit2 library or the LibGit2 stdlib module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants