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

release-1.8: Backports for Julia 1.8.1 #46376

Merged
merged 33 commits into from
Sep 1, 2022
Merged

Conversation

KristofferC
Copy link
Sponsor Member

@KristofferC KristofferC commented Aug 17, 2022

Backported PRs:

Need manual backport:

PRs with backport label:

@KristofferC KristofferC added the kind:release Release management and versioning. label Aug 17, 2022
@Moelf
Copy link
Sponsor Contributor

Moelf commented Aug 17, 2022

@KristofferC
Copy link
Sponsor Member Author

KristofferC commented Aug 17, 2022

Yes, the backport label was not added in that PR when I made this. Now that it is, it will get picked up.

oscardssmith and others added 2 commits August 22, 2022 10:12
* Consistently use `RUNPATH` in our libraries

When loading dependencies on Linux, we can either use `RPATH` or
`RUNPATH` as a list of relative paths to search for libraries.  The
difference, for our purposes, mainly lies within how this interacts with
`LD_LIBRARY_PATH`: `RPATH` is searched first, then `LD_LIBRARY_PATH`,
then `RUNPATH`.  So by using `RUNPATH` here, we are explicitly allowing
ourselves to be overridden by `LD_LIBRARY_PATH`.  This is fine, as long
as we are consistent across our entire library line, however in the
`v1.8.0` release, there was an inconsistency, reported in [0].

The inconsistency occured because of the following confluence of factors:

 - Ancient `ld` builds (such as the one used in our build environment)
   do not default to using `RUNPATH`, but instead use `RPATH`.
 - `patchelf`, when it rewrites the RPATH, will default to using
   `RUNPATH` instead.
 - We were only using `patchelf` on `libjulia-internal`, not on
   `libjulia-codegen`, which was newly added in `v1.8`.

These three factors together caused us to ship a binary with `RUNPATH`
in `libjulia-internal`, but `RPATH` in `libjulia-codegen`, which caused
loading to fail in [0] due to first `libjulia-internal` being loaded,
(which brought in the external `libstdc++`), then `libjulia-codegen`
failed to load (because it found an incompatible `libstdc++`), causing
the mysterious compiler error.

This PR fixes this twofold; first, when building the libraries in the
first place, we pass `--enable-new-dtags` to the linker to encourage it
to use `runpath` when possible.  This removes the possibility for a
missing `patchelf` invocation to break things in this way.  Second, we
apply `patchelf` properly to `libjulia-codegen` as well.

[0] #46409

* fix whitespace

Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com>
@timholy
Copy link
Sponsor Member

timholy commented Aug 24, 2022

I think #46010 can be removed from your TODO list, see #46010 (comment)

giordano and others added 5 commits August 26, 2022 09:09
* [Makefile] Fix codesign of libjulia when installing it on macOS

* Add shell sript for codesigning and use it in Makefile

(cherry picked from commit 8076517)
…#46375)

By looking up keys, we possibly grow the hash table, invalidating the iteration
we were doing in jl_collect_backedges. First perform a non-mutating check instead,
and assert that the hashtable doesn't change during iteration.

(cherry picked from commit 0ada892)
… tries a new Union decision (#46350)

* `intersect_all` should always `restore_env`. let `merge_env` track valid `env` change.

* Add test.

Co-authored-by: Jeff Bezanson <jeff.bezanson@gmail.com>
(cherry picked from commit 9aabb4c)
@oscardssmith
Copy link
Member

Can #46436 get added?

@KristofferC
Copy link
Sponsor Member Author

Is it not?

MasonProtter and others added 8 commits August 26, 2022 16:30
(cherry picked from commit e0056c8)
also remove a bunch of `@inline` from when I didn't trust the compiler to do reasonable things.

(cherry picked from commit 445586d)
(cherry picked from commit fd66c30)
Turns out when you declare an alloca alignment, it also rounds up
the allocated size. Replaces #46322 and #46260 and fixes the
same issue.

(cherry picked from commit e358a17)
@oscardssmith
Copy link
Member

oops, not sure how I missed it.

akirakyle and others added 2 commits August 29, 2022 09:25
Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com>
(cherry picked from commit 3b81696)
…s do not overlap. (#45578)

* Fix union!(s::BitSet, r::AbstractUnitRange{<:Integer}) when two ranges do not overlap.
Resizing of BitSet should be filled with 0 by default.

(cherry picked from commit 5e8e0a5)
@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runtests(ALL, vs = ":release-1.8", buildflags=["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"], vs_buildflags=["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"])

@DilumAluthge
Copy link
Member

Looks like the Nanosoldier syntax has changed: https://github.com/JuliaCI/Nanosoldier.jl#trigger-syntax-1

@yuehhua
Copy link

yuehhua commented Aug 29, 2022

@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runtests(ALL, vs = ":release-1.8", configuration = (buildflags=["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"],), vs_configuration=(buildflags=["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"],))

@nanosoldier
Copy link
Collaborator

Your package evaluation job has completed - possible new issues were detected. A full report can be found here.

@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runtests(["BiGGReactions", "BracedErrors", "Cambrian", "ClusteringGA", "CondaBinDeps", "CrystalInfoFramework", "FilesystemDatastructures", "GLMNet", "GaussBP", "HydrophoneCalibrations", "JWTs", "LatticeDiracOperators", "LogicToolkit", "LokiLogger", "MatrixLMnet", "MetapopulationDynamics", "MultiStochGrad", "NumericalAlgorithms", "OteraEngine", "PartialSvdStoch", "PkgSwaps", "QML", "RheaReactions", "StableTrees"], vs = ":release-1.8", configuration = (buildflags = ["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"],), vs_configuration = (buildflags = ["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"],))

`CachedMethodTable` was removed within #44240 as we couldn't confirm any
performance improvement then. However it turns out the optimization was
critical in some real world cases (e.g. #46492), so this commit revives
the mechanism with the following tweaks that should make it more effective:
- create method table cache per inference (rather than per local
  inference on a function call as on the previous implementation)
- only use cache mechanism for abstract types (since we already cache
  lookup result at the next level as for concrete types)

As a result, the following snippet reported at #46492 recovers the
compilation performance:
```julia
using ControlSystems
a_2 = [-5 -3; 2 -9]
C_212 = ss(a_2, [1; 2], [1 0; 0 1], [0; 0])
@time norm(C_212)
```

> on master
```
julia> @time norm(C_212)
364.489044 seconds (724.44 M allocations: 92.524 GiB, 6.01% gc time, 100.00% compilation time)
0.5345224838248489
```

> on this commit
```
julia> @time norm(C_212)
 26.539016 seconds (62.09 M allocations: 5.537 GiB, 5.55% gc time, 100.00% compilation time)
0.5345224838248489
```

(cherry picked from commit 8445744)
@nanosoldier
Copy link
Collaborator

Your package evaluation job has completed - possible new issues were detected. A full report can be found here.

ranocha and others added 12 commits August 30, 2022 17:15
(cherry picked from commit b64743b)
The docs on multithreading still warns that the default scheduler for @threads
uses static scheduling. However, since #44136, dynamic scheduling has been the
default. This commit removes the warning.

(cherry picked from commit 72222d6)
* Make `Fix1(f, Int)` inference-stable
* split `_xfadjoint` into `_xfadjoint_unwrap` and `_xfadjoint_wrap`
* Improve `(c::ComposedFunction)(x...)`'s inferability
* and fuse it in `Base._xfadjoint`.
* define a `Typeof` operator that will partly work around internal type-system bugs

Closes #45715

(cherry picked from commit d58289c)
@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runbenchmarks(ALL, vs=":release-1.8")

@nanosoldier
Copy link
Collaborator

Your job failed.

@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runbenchmarks(ALL, vs=":release-1.8")

@KristofferC
Copy link
Sponsor Member Author

@vtjnash, any idea what's up with the job failure?

* fix invalidations in REPL LineEdit.jl from Static.jl

(cherry picked from commit 99d8c7b)
This is a follow-up to #46481. I suggest the labels `latency` and `backport-1.8`.

(cherry picked from commit f1f5d59)
@nanosoldier
Copy link
Collaborator

Your job failed.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 31, 2022

@KristofferC KristofferC merged commit 46ba16a into release-1.8 Sep 1, 2022
@KristofferC KristofferC deleted the backports-release-1.8 branch September 1, 2022 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:release Release management and versioning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.