-
-
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
Shipped binaries are missing some codesigning on Windows & MacOS - Causing slow first launch #54366
Comments
Someone that can repro this could probably get it in a profiler and see if it is waiting on some syscall or something. |
Also, is it really entering package mode that is slow or is it |
I think this is too vague to be on the milestone. Also, on the video it seem to take 25 seconds to even start julia so I would not say package mode is the problematic thing here. |
On MacOS I'm noticing a lot more delay in first Pkg switch and first completion hint in pkg on nightlies via juliaup vs. julia built locally. First pkg switch was like 4s via juliaup, ~0.3s via local build So I guess MacOS also does some system check on dylibs on first execution too. @davidanthoff I think it might make sense for juliaup to handle this kind of first execution system check. So launch julia and load all stdlibs after installation? @KristofferC pointed to this which could be the MacOS issue https://news.ycombinator.com/item?id=23273247 |
Are we stapling that notarization stuff to the files in the tarball that Juliaup is using for MacOS? My gut sense right now is that we first should just make sure that the archives that Juliaup is using have all the code signing/notarization that can be done, then check whether we still have performance problems, and if so, we can still think about more stuff that Juliaup could do. |
Side note, I noticed that on MacOS if you have a slow but active internet connection then precompilation, including building stdlibs, is really slow because MacOS is trying and failing to do the stuff mentioned here https://news.ycombinator.com/item?id=23273247 |
I've adjusted the title to cover the issue that I think we should fix before 1.11 is released. First impressions matter and on the latest 1.11 rc1 via juliaup on MacOS the Pkg switch is really slow and it sounds like it can be a lot worse on Windows |
On MacOS it seems the issue is that we don't notarize the If I install via the With the then @davidanthoff could it be something similar for Windows? |
Maybe? There seem to be a lot of possibilities ;) I just checked, and 1.11-rc1 as installed via Juliaup has I should also say Just for this issue, it probably makes sense to directly launch the Julia binary from the |
Regarding MacOS I'm trying JuliaCI/julia-buildkite#369 but I don't have high hopes because it doesn't seem possible based on online discussion to staple a notarization to a .tar.gz Would it be reasonable for juliaup to use the |
I don't know much about MacOS, but isn't there some way to attach the notarize thing to the actual binary file? Why would we notarize the tar ball? That is only ever seen by |
The docs are a little unclear on this, but I had thought somehow MacOS was retaining knowledge about the uncompressed files after untar-ing. Regarding the executables specifically, from what I gather it's not possible to "staple" the notarization ticket to the executable. So gatekeeper will do an internet check for the ticket on first load (what's happening). The only way to avoid the slow online check is to staple it to the @staticfloat does that sound right to you? Some references |
This seems like the easiest approach, right? |
Yes, after reading around, I agree. All we really need to do is spawn a julia process that loads everything right after we unpacked, right? |
It doesn't save the user time but it does hide it in the juliaup process, and makes first julia impression better so it would be an improvement, yeah. |
Another benefit is that by definition there should be a working internet connection when a new version is added. |
I just checked, and the rc2 Windows binaries that we get via Juliaup still don't have any of the dlls code signed. Neither the ones in the |
I've been trying to do something in JuliaCI/julia-buildkite#374 but I'm getting errors from
but it raises errors like:
I tried changing it to |
Hm, I guess the other question is how much effort to put into signtool if we are going to switch over to the trusted signing option soon... |
Is there an easy way for us to test whether the signed Windows binaries make a difference? Cutting a new rc would be one way, but that is a pretty involved process, right? |
We codesign nightlies, so you should just be able to grab the Windows nightly from the Buildkite page for the latest commit on master. |
Regarding macOS, I am concluding that we need to ship the |
Nightly seems a bit broken, I'm getting errors when I'm just trying to enter the REPL mode, so I can't really test whether this helped or not... |
Elaborate please.... |
|
With the juliaup notarization fix on 1.11 and the signing of the windows libraries I will remove this from the milestone. |
Sounds good. Minor detail that we would also need a proper release of juliaup. It's currently just a prerelease |
Well, we have no idea whether these fixes actually help with the problem or not, certainly not on Windows, the signing was pure speculation. I think if the idea of putting this on the milestone was that we want to fix the problem, then we should first validate whether the signing actually solved the problem or not. I would try to validate this, but |
Try deleting your default env manifest? |
There is none for 1.12 on my system. |
I just tried this with 1.11-rc3, and there was no delay whatsoever on Windows! I think we can rule out any caching for my experiment: before I ran I guess we'll never really know what fixed things, but we now have both the Juliaup binaries and all the Julia binaries (including dlls and in particular the sys.dll) signed on Windows, so maybe that really did make all the difference. @IanButterworth can you confirm that with rc3 things are also smooth on Mac? In which case we could close this issue, I'd say. |
Yep, after the notarization check Pkg loaded fast first time. Hopefully people will be updated to the latest juliaup before trying out 1.11.0 |
Juliaup auto-updates aggressively. I think the vast majority of folks should get any new version within 24 hours after I push it out, and this version of it was published 1-2 weeks ago, so I think that will easily work out. |
There is a delay of more than 14 seconds when I press
]
to enter package mode on a new install. Here is a video that shows the timing: https://www.youtube.com/watch?v=a7PU7C1rMvw.One strange thing is that on subsequent attempts (even after a boot of the computer) the delay is almost entirely gone. Not entirely straightforward on how to reproduce this, but uninstall 1.11 via
juliaup rm 1.11
and then booting the computer mostly gets my system back into a state where the delay is present. The system where this is happening is a new desktop computer with essentially top specs for everything.We (@KristofferC, @IanButterworth and I) on Slack where one hypothesis is that this is somehow related to Windows Defender scanning files on a first load, caching the results of that somehow... If that is true, maybe #54365 might help. While I'm not sure, Windows Defender might take less time to check files that have proper digital signatures on them.
The text was updated successfully, but these errors were encountered: