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

iOS app has a runtime crash when upgrading from Bazel 6.4 to Bazel 7.1.2 #2514

Open
tinder-kaijing opened this issue Aug 23, 2024 · 1 comment
Assignees
Labels
type: bug Something isn't working

Comments

@tinder-kaijing
Copy link

Description of the bug:

After upgrading Bazel from 6.4 to 7.1.2, iOS app has a runtime crash. Here are more details:

  • It crashed on one commercial xxxSDK. It is a commercial SDK, so we did not have their source code. we only have their SDK library. we did not build it from the source code, just use rules_apple's apple_dynamic_framework_import to import it

  • I dump the action graph of xxxSDK of Bazel 6.4 vs Bazel 7.1.2, no much different. Bazel 6.4 only have one more extra ExecutionInfo: {requires-darwin: '', supports-xcode-requirements-set: ''} ,

  • No rules_apple change, no build from source code. so something is wrong with linking

  • However, in our Bazel 7.1.2 PR, there is no linking flag change. Is it possible something has changed in Bazel 7.1.2 itself?

  • Other company had the similar crash issue during linking, but on a different scenario

  • to use Emerge tool, to see about 200K size reduction when comparing Bazel 6.4 by Bazel 7.1.2 build.

  • Went through the changelog of Bazel 7.0, Does see some changes of ObjC, and xxxSDK is ObjC library. but not sure which could have caused the crash.

Which category does this issue belong to?

Objective-C Rules

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Since this is a commercial SDK library, and only happened on one functionality in our app, not sure how to provide an example to reproduce it.

Which operating system are you running Bazel on?

macOS 14.5

What is the output of bazel info release?

release 7.1.2

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

return our internal git repo, and commit sha.

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

we have some discussion about this issue on two slack channel:

https://ios-dev-at-scale.slack.com/archives/CBVEC7KRQ/p1724283963037899

and

https://bazelbuild.slack.com/archives/CD3QY5C2X/p1724284117717189

Any other information, logs, or outputs that you want to share?

No response

@keith
Copy link
Member

keith commented Aug 23, 2024

I think unfortunately this probably isn't enough to go on. If you diff the exec log or aquery output from before and after you can probably see what changed more specifically. Very likely it's related to linking and either there's a bug in rules_apple or a bug in the one you include that library

@keith keith transferred this issue from bazelbuild/bazel Aug 23, 2024
@iancha1992 iancha1992 removed their assignment Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants