-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/x509/internal/macos: link errors on ios/arm64 due to missing symbols _SecItemExport and _SecTrustEvaluateWithError #49616
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
Comments
@rolandshoemaker, @FiloSottile: I suspect that this is closely related to CL 362294 / CL 353403. |
(This is a release-blocker for Go 1.18 via #11811.) |
(See previously #42459, which also reported a link error for |
Change https://golang.org/cl/363985 mentions this issue: |
The old known issue has been resolved: the builders have been restarted and are back. That uncovered what appears to be a recent regression, reported as golang/go#49616. Also add a new builder owner based on conversation at https://groups.google.com/g/golang-dev/c/oiuIE7qrWp0. Updates golang/go#48772. Updates golang/go#49048. Updates golang/go#49616. Change-Id: I7a6a89b7fb088373a70bd3496ad2091ec7a3d79f Reviewed-on: https://go-review.googlesource.com/c/build/+/363985 Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org>
Change https://golang.org/cl/364554 mentions this issue: |
This is a two part issue: (1) we used an API which is only available on macOS, so it's obviously unavailable on iOS. CL364554 switches to an API available on both. I've sent a CL for (1), but I'm not sure how best to go about fixing (2). I can send a CL which bumps the min version, but the SDK on the builders needs to be bumped, but that appears to be supplied OOB (and the only instructions appear to be for a new instance, and I can't see any documentation for what to do if we need to make changes? Possibly wipe the instance and re-initialize?) |
I am not sure how to bump the SDK on the builders, @eliasnaur do you recall where this is kept? |
That seems to be #48076? |
The SDK lives at |
The builders are initialized using https://github.com/golang/build/blob/master/env/corellium/ios/install.sh |
Would it make sense to add a build constraint (maybe |
That is a viable approach if we want to continue to support older iOS versions. Another option is that we could implement a special pre-iOS version which uses the older APIs for certificate verification which have been deprecated, but that is a significant amount of work, since a lot of the old APIs don't interoperate well with the new ones. |
Looking at #48076, it feels like raising the minimum version to iOS 12 is the right choice for Go 1.18, regardless of the complete policy. This fortunately solves our problem here, too. |
Use SecCertificateCopyData instead of SecItemExport, which is only available on macOS. Updates #49616 Change-Id: Ieda33894930d23c6dab6112ee18120f8a440083b Reviewed-on: https://go-review.googlesource.com/c/go/+/364554 Trust: Roland Shoemaker <roland@golang.org> Run-TryBot: Roland Shoemaker <roland@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Filippo Valsorda <filippo@golang.org>
If iOS 12 is decided (as in #48076) to be the minimum targeting version for 1.18, I can help with updating the SDKs inside the builders. |
Change https://golang.org/cl/366914 mentions this issue: |
For #47694. Updates #49616. Updates #48076. Change-Id: I570564c3a54d3cd9cfc9b8267df9fbee3363b650 Reviewed-on: https://go-review.googlesource.com/c/go/+/366914 Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
I've updated the SDK in one of the three iOS builders. The other two seem to have trouble connecting to them (still waiting for Corellium's response). But according to the log, there might be another issue. |
@changkun what SDK did you update to? (and were there any other steps you took?) From the most recent builder logs I see a panic due to bad syscall, which I didn't see when I was testing against the 14.5 SDK on the builder. |
@rolandshoemaker Yes, the iPhone SDK is updated to 12.4, and the go bootstrap is updated 1.17.3 I don't know if the bad syscall panic is caused by the SDK version. But should I further bump the SDK version to 14.5 so that we could learn more experience on the error? or could it be another issue? |
I don't really have enough experience with iOS to know, I'd suggest bumping it to 14.5 just to check if that's it, but it could also be the bootstrap version change, or something else entirely 🤷. |
(out of interest, what was the reason for bumping the bootstrap version? did it break without?) |
I tried with gomote that disabling sendfile makes all.bash pass on the iOS builder. It is interesting that it signals with SIGSYS, instead of returning ENOSYS, which one would expect if the syscall is not supported, and our code handles. Googling found ndfred/iperf-ios#17 . Maybe sendfile is just broken on (some version of) iOS? Maybe it was not broken on the old version of iOS which the builder used to run? Or it wasn't available so it just returned ENOSYS? |
Change https://golang.org/cl/368054 mentions this issue: |
Update: This build log is based on iPhoneSDK14.5, and as we see the build log is still failing, hence we can remove the reason from SDK versions. I have replaced the SDK with 14.5. The bump of the bootstrap version was because the previous bootstrap was built on a commit between 1.16beta1 and 1.16 release, according to the log, the bootstrap was problematic and did not enable cgo in the build. The actually selected version of go bootstrap has no particular reason and simply represents the latest release.
|
Apparently, on the iOS builder sendfile causes a SIGSYS signal (instead of returning ENOSYS). Disabling it for now so we can make progress on iOS. We can revisit if sendfile is actually broken on iOS and whether it is beneficial. Updates #49616. Change-Id: I3883fad0ce35e3f0aa352301eb499a1afa0225a1 Reviewed-on: https://go-review.googlesource.com/c/go/+/368054 Trust: Cherry Mui <cherryyz@google.com> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Changkun Ou <mail@changkun.de> Reviewed-by: Roland Shoemaker <roland@golang.org>
With the builder updates that @changkun performed, and as of CL 368054 landing, the iOS builder is passing. If I understand correctly, there's nothing more to do for this issue, right? If so, I'll send a CL that removes the builder's known issue. |
Change https://golang.org/cl/369255 mentions this issue: |
SGTM. Thanks. |
And I think we can close this issue. |
The work needed to resolve go.dev/issue/49616 looks to be complete, and the builder is passing reliably. Updates golang/go#49616. Change-Id: I90253c7751f97f081496abe90b1e827992afaf6e Reviewed-on: https://go-review.googlesource.com/c/build/+/369255 Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Closed. Thanks very much for everyone's help resolving this. |
The update to 1.18 broke hugo and golangci-lint. I wasn't really using hugo, so I'm just commenting it out for now. To fix golangci-lint, add an overlay which builds it with 1.17. See: * NixOS/nixpkgs#168984 * golang/go#49616
greplogs --dashboard -md -l -e '(?m)Undefined symbols for architecture arm64:\n\s*"_SecItemExport"'
2021-11-16T15:16:54-f041c7e/ios-arm64-corellium
2021-11-16T15:16:41-46e98d4/ios-arm64-corellium
2021-11-16T14:33:48-50dac3b/ios-arm64-corellium
2021-11-16T14:33:39-67c1556/ios-arm64-corellium
2021-11-16T14:02:36-bddb79f/ios-arm64-corellium
2021-11-16T13:48:46-9efb649/ios-arm64-corellium
2021-11-16T08:58:05-6e481c0/ios-arm64-corellium
2021-11-16T07:47:15-6b3f4d3/ios-arm64-corellium
2021-11-16T07:47:08-313cae3/ios-arm64-corellium
2021-11-16T06:36:08-a52e4b9/ios-arm64-corellium
2021-11-16T06:31:54-febbef5/ios-arm64-corellium
2021-11-16T05:58:03-fdd6793/ios-arm64-corellium
2021-11-16T05:36:07-8656895/ios-arm64-corellium
2021-11-15T23:55:09-9e13a88/ios-arm64-corellium
2021-11-15T23:01:05-d156101/ios-arm64-corellium
2021-11-15T21:22:19-95e85e3/ios-arm64-corellium
2021-11-15T21:22:18-c8d7c5f/ios-arm64-corellium
2021-11-15T21:22:17-e08aae2/ios-arm64-corellium
2021-11-15T21:22:15-fda9261/ios-arm64-corellium
2021-11-15T21:22:14-42fa03a/ios-arm64-corellium
2021-11-15T21:22:13-0a54a68/ios-arm64-corellium
2021-11-15T21:22:12-cfcd717/ios-arm64-corellium
2021-11-15T21:22:11-0a39e4a/ios-arm64-corellium
2021-11-15T21:22:09-184ca3c/ios-arm64-corellium
2021-11-15T21:21:51-560dc97/ios-arm64-corellium
2021-11-15T19:24:28-9265558/ios-arm64-corellium
2021-11-15T18:43:13-b6342a0/ios-arm64-corellium
2021-11-15T18:43:07-0e65410/ios-arm64-corellium
2021-11-15T18:02:28-1dc9af5/ios-arm64-corellium
2021-11-15T17:10:25-f986191/ios-arm64-corellium
2021-11-15T15:42:24-ce4a275/ios-arm64-corellium
2021-11-14T17:38:42-5337e53/ios-arm64-corellium
2021-11-14T16:54:11-dfa62c7/ios-arm64-corellium
2021-11-13T03:33:55-c239790/ios-arm64-corellium
2021-11-13T02:30:25-c546052/ios-arm64-corellium
2021-11-13T01:39:23-c78a267/ios-arm64-corellium
2021-11-13T01:39:09-e658c42/ios-arm64-corellium
2021-11-13T01:37:51-2fd720b/ios-arm64-corellium
2021-11-13T00:50:04-c893a85/ios-arm64-corellium
2021-11-13T00:49:51-530e320/ios-arm64-corellium
2021-11-13T00:37:53-958f405/ios-arm64-corellium
2021-11-13T00:36:41-c97d681/ios-arm64-corellium
2021-11-13T00:34:41-bfbe5ac/ios-arm64-corellium
2021-11-13T00:26:24-787708a/ios-arm64-corellium
2021-11-13T00:26:23-bc0b98e/ios-arm64-corellium
2021-11-13T00:26:21-56e55a3/ios-arm64-corellium
2021-11-13T00:26:20-c09d854/ios-arm64-corellium
2021-11-13T00:23:16-39bc666/ios-arm64-corellium
2021-11-12T23:35:31-b69b2f6/ios-arm64-corellium
2021-11-12T23:34:09-fdee1b2/ios-arm64-corellium
2021-11-12T23:26:33-3a4b950/ios-arm64-corellium
2021-11-12T23:07:14-429d1e0/ios-arm64-corellium
2021-11-12T23:07:01-c8d6ee1/ios-arm64-corellium
2021-11-12T22:50:32-1cd6003/ios-arm64-corellium
2021-11-12T22:20:51-f9dcda3/ios-arm64-corellium
2021-11-12T22:20:50-9150c16/ios-arm64-corellium
2021-11-12T21:06:35-3634594/ios-arm64-corellium
2021-11-12T20:20:57-76fbd61/ios-arm64-corellium
2021-11-12T20:02:21-9519651/ios-arm64-corellium
2021-11-12T19:45:58-ecd2e14/ios-arm64-corellium
2021-11-12T18:57:22-b1b6d92/ios-arm64-corellium
2021-11-12T18:48:59-5d24203/ios-arm64-corellium
2021-11-12T18:14:22-8b66b3d/ios-arm64-corellium
The text was updated successfully, but these errors were encountered: