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

Test for libgit2 fails in Julia v1.2---but code works fine? #33095

Closed
ghost opened this issue Aug 27, 2019 · 7 comments
Closed

Test for libgit2 fails in Julia v1.2---but code works fine? #33095

ghost opened this issue Aug 27, 2019 · 7 comments

Comments

@ghost
Copy link

ghost commented Aug 27, 2019

Hi,

I don't know if this is a bug/issue but it's related to the ticket #33038 .

Until yesterday, in Arch linux, julia didn't use the system libgit2 library (I guess it used Julia's fork?) resulting in the problem updating packages reported in #33038 . Now, recompiling julia to make use of libgit2 installed in the system fixed that problem... however when I ran the test for libgit2 it failed (specifically, the test for use_http_path):

(v1.2) pkg> test LibGit2
  Updating registry at `/usr/applications/academia/julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Testing LibGit2
 Resolving package versions...
    Status `/tmp/jl_XDKMIu/Manifest.toml`
  [2a0f44e3] Base64  [`@stdlib/Base64`]
  [8ba89e20] Distributed  [`@stdlib/Distributed`]
  [b77e0a4c] InteractiveUtils  [`@stdlib/InteractiveUtils`]
  [76f85450] LibGit2  [`@stdlib/LibGit2`]
  [56ddb016] Logging  [`@stdlib/Logging`]
  [d6f4376e] Markdown  [`@stdlib/Markdown`]
  [9a3f8284] Random  [`@stdlib/Random`]
  [9e88b42a] Serialization  [`@stdlib/Serialization`]
  [6462fe0b] Sockets  [`@stdlib/Sockets`]
  [8dfed614] Test  [`@stdlib/Test`]
Test Summary:         | Pass  Total
Check library version |    1      1
Test Summary:          | Pass  Total
Check library features |    2      2
Test Summary: | Pass  Total
OID           |   10     10
Test Summary:  | Pass  Total
StrArrayStruct |    1      1
Test Summary: | Pass  Total
Signature     |    5      5
Test Summary:  | Pass  Total
Default config |    4      4
Test Summary:               | Pass  Total
Default config with symlink |    2      2
Test Summary:   | Pass  Total
Git URL parsing |   42     42
Test Summary:      | Pass  Total
Git URL formatting |   11     11
Test Summary:       | Pass  Total
Passphrase Required |    6      6
Test Summary: | Pass  Total
GitCredential |   54     54
Test Summary: | Pass  Total
Configuration |   15     15
Test Summary:           | Pass  Total
Configuration Iteration |    6      6
Test Summary:           | Pass  Total
Initializing repository |   30     30
Test Summary:      | Pass  Total
Cloning repository |   19     19
Test Summary:           | Pass  Total
Update cache repository |  176    176
Test Summary:      | Pass  Total
Fastforward merges |    8      8
Test Summary: | Pass  Total
Cherrypick    |    1      1
Test Summary: | Pass  Total
Merges        |    9      9
Test Summary: | Pass  Total
push          |    2      2
Test Summary:    | Pass  Total
Show closed repo |    1      1
Test Summary:               | Pass  Total
Fetch from cache repository |   32     32
Test Summary:           | Pass  Total
Examine test repository |   11     11
Test Summary:               | Pass  Total
Modify and reset repository |   20     20
Test Summary: | Pass  Total
Modify remote |   27     27
Test Summary: | Pass  Total
rebase        |   11     11
Test Summary: | Pass  Total
merge         |    1      1
Test Summary:            | Pass  Total
Transact test repository |    5      5
Test Summary:     | Pass  Total
checkout/headname |    2      2
Test Summary:     | Pass  Total
checkout/proptest |    2      2
Test Summary: | Pass  Total
Credentials   |    8      8
Test Summary:     | Pass  Total
CachedCredentials |   23     23
Test Summary:           | Pass  Total
Git credential username |    9      9
use_http_path: Test Failed at /usr/share/julia/stdlib/v1.2/LibGit2/test/libgit2.jl:1930
  Expression: !(LibGit2.use_http_path(cfg, github_cred))
Stacktrace:
 [1] (::getfield(Main.LibGit2Tests, Symbol("##96#214")))(::LibGit2.GitConfig) at /usr/share/julia/stdlib/v1.2/LibGit2/test/libgit2.jl:1930
 [2] with(::getfield(Main.LibGit2Tests, Symbol("##96#214")), ::LibGit2.GitConfig) at /build/julia/src/julia-1.2.0/usr/share/julia/stdlib/v1.2/LibGit2/src/types.jl:1125
 [3] macro expansion at /usr/share/julia/stdlib/v1.2/LibGit2/test/libgit2.jl:1909 [inlined]
 [4] macro expansion at /build/julia/src/julia-1.2.0/usr/share/julia/stdlib/v1.2/Test/src/Test.jl:1113 [inlined]
 [5] macro expansion at /usr/share/julia/stdlib/v1.2/LibGit2/test/libgit2.jl:1906 [inlined]
 [6] macro expansion at /build/julia/src/julia-1.2.0/usr/share/julia/stdlib/v1.2/Test/src/Test.jl:1113 [inlined]
 [7] (::getfield(Main.LibGit2Tests, Symbol("##23#138")))(::String) at /usr/share/julia/stdlib/v1.2/LibGit2/test/libgit2.jl:1905
Test Summary:           | Pass  Fail  Total
Git helpers useHttpPath |    6     1      7
  use_http_path         |    6     1      7
ERROR: LoadError: LoadError: Some tests did not pass: 6 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /usr/share/julia/stdlib/v1.2/LibGit2/test/libgit2.jl:596
in expression starting at /usr/share/julia/stdlib/v1.2/LibGit2/test/runtests.jl:3
ERROR: Package LibGit2 errored during testing

Julia still works as intended as far as I can tell. When I ran the same test using the official binaries it passed, but useHttpPath is reported as broken:

(v1.2) pkg> test LibGit2
  Updating registry at `/usr/applications/academia/julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Testing LibGit2
 Resolving package versions...
    Status `/tmp/jl_ddOPw1/Manifest.toml`
  [2a0f44e3] Base64  [`@stdlib/Base64`]
  [8ba89e20] Distributed  [`@stdlib/Distributed`]
  [b77e0a4c] InteractiveUtils  [`@stdlib/InteractiveUtils`]
  [76f85450] LibGit2  [`@stdlib/LibGit2`]
  [56ddb016] Logging  [`@stdlib/Logging`]
  [d6f4376e] Markdown  [`@stdlib/Markdown`]
  [9a3f8284] Random  [`@stdlib/Random`]
  [9e88b42a] Serialization  [`@stdlib/Serialization`]
  [6462fe0b] Sockets  [`@stdlib/Sockets`]
  [8dfed614] Test  [`@stdlib/Test`]
Test Summary:         | Pass  Total
Check library version |    1      1
Test Summary:          | Pass  Total
Check library features |    2      2
Test Summary: | Pass  Total
OID           |   10     10
Test Summary:  | Pass  Total
StrArrayStruct |    1      1
Test Summary: | Pass  Total
Signature     |    5      5
Test Summary:  | Pass  Total
Default config |    4      4
Test Summary:               | Pass  Total
Default config with symlink |    2      2
Test Summary:   | Pass  Total
Git URL parsing |   42     42
Test Summary:      | Pass  Total
Git URL formatting |   11     11
Test Summary:       | Pass  Total
Passphrase Required |    6      6
Test Summary: | Pass  Total
GitCredential |   54     54
Test Summary: | Pass  Total
Configuration |   15     15
Test Summary:           | Pass  Total
Configuration Iteration |    6      6
Test Summary:           | Pass  Total
Initializing repository |   30     30
Test Summary:      | Pass  Total
Cloning repository |   19     19
Test Summary:           | Pass  Total
Update cache repository |  176    176
Test Summary:      | Pass  Total
Fastforward merges |    8      8
Test Summary: | Pass  Total
Cherrypick    |    1      1
Test Summary: | Pass  Total
Merges        |    9      9
Test Summary: | Pass  Total
push          |    2      2
Test Summary:    | Pass  Total
Show closed repo |    1      1
Test Summary:               | Pass  Total
Fetch from cache repository |   32     32
Test Summary:           | Pass  Total
Examine test repository |   11     11
Test Summary:               | Pass  Total
Modify and reset repository |   20     20
Test Summary: | Pass  Total
Modify remote |   27     27
Test Summary: | Pass  Total
rebase        |   11     11
Test Summary: | Pass  Total
merge         |    1      1
Test Summary:            | Pass  Total
Transact test repository |    5      5
Test Summary:     | Pass  Total
checkout/headname |    2      2
Test Summary:     | Pass  Total
checkout/proptest |    2      2
Test Summary: | Pass  Total
Credentials   |    8      8
Test Summary:     | Pass  Total
CachedCredentials |   23     23
Test Summary:           | Pass  Total
Git credential username |    9      9
Test Summary:           | Pass  Total
Git helpers useHttpPath |    7      7
The following 'Resetting the helper list...' warning is expected:
┌ Warning: Resetting the helper list is currently unsupported:
│ ignoring all git credential helpers
└ @ LibGit2 /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/LibGit2/src/gitcredential.jl:234
Test Summary:       | Pass  Broken  Total
GitCredentialHelper |   24       1     25
Test Summary:         | Pass  Total
SSH credential prompt |   43     43
Test Summary:           | Pass  Total
HTTPS credential prompt |   10     10
Test Summary:      | Pass  Total
SSH agent username |    4      4
Test Summary: | Pass  Total
SSH default   |    6      6
Test Summary:    | Pass  Total
SSH expand tilde |    6      6
Test Summary:            | Pass  Total
SSH explicit credentials |    8      8
Test Summary:              | Pass  Total
HTTPS explicit credentials |    8      8
Test Summary:      | Pass  Total
Cached credentials |   22     22
Test Summary:             | Pass  Total
HTTPS git helper username |    3      3
Test Summary:             | Pass  Total
HTTPS git helper password |    3      3
Test Summary:                     | Pass  Total
Incompatible explicit credentials |    8      8
Test Summary:              | Pass  Total
SSH & HTTPS authentication |    2      2
Test Summary:           | Pass  Total
CredentialPayload reset |    4      4
Test Summary:         | Pass  Total
Hostname verification |    5      5
Test Summary:      | Pass  Total
Cloning repository |   10     10
   Testing LibGit2 tests passed 

With the official binaries I can update the registry and Arch now fixed the problem by making Julia use the libgit2 installed in the system (up until 1.1 it was using Julia's just fine). But there's obviously an inconsistency here and I wondered if the problems with #33038 may somehow be related...

@KristofferC
Copy link
Member

So the official binaries pass tests but the non-official doesn't? I don't really see the inconsistency.

@StefanKarpinski
Copy link
Member

This does seem like a distro problem, not a Julia problem. (And FWIW is why we do not recommend using the official Julia binaries, not distro versions, which are invariably broken.)

@ghost
Copy link
Author

ghost commented Aug 30, 2019

@KristofferC the inconsistency is that compiling from source (@StefanKarpinski which is what all Arch does, see [1] ) passes the libgit2 test... but the code to update the packages won't work. Now, it might be missing patches, which I don't know, but compiling from source as it is---which involves USE_SYSTEM_LIBGIT2 = 0---doesn't generate working binaries.

[1] https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/julia

@nalimilan
Copy link
Member

You're probably using libgit2 0.28, which Julia 1.2 doesn't support. Arch needs to cherry-pick #32806 if it wants to use that libgit2 version.

@ViralBShah
Copy link
Member

Close?

@goggle
Copy link
Contributor

goggle commented Mar 15, 2022

Running the LibGit2 tests with julia installed from the Arch repository stills gives errors (at least for me), whereas running the tests from the julia binaries runs without errors:

     Testing LibGit2
      Status `/tmp/jl_kPveAS/Project.toml`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [76f85450] LibGit2 `@stdlib/LibGit2`
  [ca575930] NetworkOptions `@stdlib/NetworkOptions`
  [de0858da] Printf `@stdlib/Printf`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [8dfed614] Test `@stdlib/Test`
      Status `/tmp/jl_kPveAS/Manifest.toml`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [76f85450] LibGit2 `@stdlib/LibGit2`
  [56ddb016] Logging `@stdlib/Logging`
  [d6f4376e] Markdown `@stdlib/Markdown`
  [ca575930] NetworkOptions `@stdlib/NetworkOptions`
  [de0858da] Printf `@stdlib/Printf`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [8dfed614] Test `@stdlib/Test`
  [4ec0a83e] Unicode `@stdlib/Unicode`
     Testing Running tests...
Test Summary:         | Pass  Total
Check library version |    1      1
Test Summary:          | Pass  Total
Check library features |    2      2
Test Summary: | Pass  Total
OID           |   10     10
Test Summary:  | Pass  Total
StrArrayStruct |    1      1
Test Summary: | Pass  Total
Signature     |    5      5
Test Summary:  | Pass  Total
Default config |    4      4
Test Summary:               | Pass  Total
Default config with symlink |    2      2
Test Summary:   | Pass  Total
Git URL parsing |   42     42
Test Summary:      | Pass  Total
Git URL formatting |   11     11
Test Summary:       | Pass  Total
Passphrase Required |    6      6
Test Summary: | Pass  Total
GitCredential |   56     56
Test Summary: | Pass  Total
Configuration |   15     15
Test Summary:           | Pass  Total
Configuration Iteration |    6      6
Test Summary:           | Pass  Total
Initializing repository |   30     30
Test Summary:      | Pass  Total
Cloning repository |   19     19
Test Summary:           | Pass  Total
Update cache repository |  176    176
Test Summary:      | Pass  Total
Fastforward merges |    8      8
Test Summary: | Pass  Total
Cherrypick    |    1      1
Test Summary: | Pass  Total
Merges        |    9      9
Test Summary: | Pass  Total
push          |    2      2
Test Summary:    | Pass  Total
Show closed repo |    1      1
Test Summary:               | Pass  Total
Fetch from cache repository |   32     32
Test Summary:           | Pass  Total
Examine test repository |   11     11
Test Summary:               | Pass  Total
Modify and reset repository |   20     20
Test Summary: | Pass  Total
Modify remote |   27     27
Test Summary: | Pass  Total
rebase        |   11     11
Test Summary: | Pass  Total
merge         |    1      1
Test Summary:            | Pass  Total
Transact test repository |    5      5
Test Summary: | Pass  Total
checkout_head |    2      2
Test Summary:     | Pass  Total
checkout/headname |    2      2
Test Summary:     | Pass  Total
checkout/proptest |    2      2
Test Summary: | Pass  Total
Credentials   |    8      8
Test Summary:     | Pass  Total
CachedCredentials |   23     23
Test Summary:           | Pass  Total
Git credential username |    9      9
Test Summary:           | Pass  Total
Git helpers useHttpPath |    7      7
Test Summary:       | Pass  Total
GitCredentialHelper |   30     30
Test Summary:         | Pass  Total
SSH credential prompt |   43     43
Test Summary:           | Pass  Total
SSH known host checking |   29     29
Test Summary:           | Pass  Total
HTTPS credential prompt |   10     10
Test Summary:      | Pass  Total
SSH agent username |    4      4
Test Summary: | Pass  Total
SSH default   |    6      6
Test Summary:    | Pass  Total
SSH expand tilde |    6      6
Test Summary:            | Pass  Total
SSH explicit credentials |    8      8
Test Summary:              | Pass  Total
HTTPS explicit credentials |    8      8
Test Summary:      | Pass  Total
Cached credentials |   22     22
Test Summary:             | Pass  Total
HTTPS git helper username |    3      3
Test Summary:             | Pass  Total
HTTPS git helper password |    3      3
Test Summary:                     | Pass  Total
Incompatible explicit credentials |    8      8
Test Summary:              | Pass  Total
SSH & HTTPS authentication |    2      2
Test Summary:           | Pass  Total
CredentialPayload reset |    4      4
┌ Warning: Skipping hostname verification tests. Unable to determine a hostname which maps to the loopback address
└ @ Main.LibGit2Tests /usr/share/julia/stdlib/v1.7/LibGit2/test/libgit2.jl:3134
Test Summary:         |
Hostname verification | No tests
Test Summary:      | Pass  Total
Cloning repository |   10     10
Test Summary:       | Pass  Total
empty CA roots file |    3      3
Test Summary:                   | Pass  Total
non-empty but bad CA roots file |    1      1
HTTPS clone with bad CA roots fails: Test Failed at /usr/share/julia/stdlib/v1.7/LibGit2/test/bad_ca_roots.jl:47
  Expression: err isa LibGit2.GitError
   Evaluated: LibGit2.GitRepo("/tmp/jl_OgZxMG/Example.HTTPS") isa LibGit2.Error.GitError
Stacktrace:
 [1] macro expansion
   @ /usr/share/julia/stdlib/v1.7/Test/src/Test.jl:445 [inlined]
 [2] macro expansion
   @ /usr/share/julia/stdlib/v1.7/LibGit2/test/bad_ca_roots.jl:47 [inlined]
 [3] macro expansion
   @ /usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1283 [inlined]
 [4] (::Main.Test_LibGit2_https.var"#1#2")(dir::String)
   @ Main.Test_LibGit2_https /usr/share/julia/stdlib/v1.7/LibGit2/test/bad_ca_roots.jl:40
HTTPS clone with bad CA roots fails: Error During Test at /usr/share/julia/stdlib/v1.7/LibGit2/test/bad_ca_roots.jl:48
  Test threw exception
  Expression: err.msg == "user rejected certificate for github.com"
  type GitRepo has no field msg
  Stacktrace:
   [1] getproperty(obj::LibGit2.GitRepo, name::Symbol)
     @ LibGit2 /usr/share/julia/stdlib/v1.7/LibGit2/src/types.jl:981
   [2] macro expansion
     @ /usr/share/julia/stdlib/v1.7/Test/src/Test.jl:445 [inlined]
   [3] macro expansion
     @ /usr/share/julia/stdlib/v1.7/LibGit2/test/bad_ca_roots.jl:48 [inlined]
   [4] macro expansion
     @ /usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1283 [inlined]
   [5] (::Main.Test_LibGit2_https.var"#1#2")(dir::String)
     @ Main.Test_LibGit2_https /usr/share/julia/stdlib/v1.7/LibGit2/test/bad_ca_roots.jl:40
Test Summary:                       | Fail  Error  Total
HTTPS clone with bad CA roots fails |    1      1      2
ERROR: LoadError: bad CA roots tests failed, cmd : `/usr/bin/julia -Cnative -J/usr/lib/julia/sys.so --depwarn=yes --check-bounds=yes -g1 --color=yes --startup-file=no --depwarn=no --startup-file=no /usr/share/julia/stdlib/v1.7/LibGit2/test/bad_ca_roots.jl`
Stacktrace:
 [1] top-level scope
   @ /usr/share/julia/stdlib/v1.7/LibGit2/test/online.jl:98
 [2] include(fname::String)
   @ Base.MainInclude ./client.jl:451
 [3] top-level scope
   @ /usr/share/julia/stdlib/v1.7/LibGit2/test/runtests.jl:4
 [4] include(fname::String)
   @ Base.MainInclude ./client.jl:451
 [5] top-level scope
   @ none:6
in expression starting at /usr/share/julia/stdlib/v1.7/LibGit2/test/online.jl:3
in expression starting at /usr/share/julia/stdlib/v1.7/LibGit2/test/runtests.jl:4
ERROR: Package LibGit2 errored during testing

@ViralBShah
Copy link
Member

We have known that Arch binaries have various issues, but since the official ones are good we can close this.

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

5 participants