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

System.exit in ManifestMergerAction killing persistent worker #11285

Closed
justhecuke-zz opened this issue May 5, 2020 · 4 comments
Closed

System.exit in ManifestMergerAction killing persistent worker #11285

justhecuke-zz opened this issue May 5, 2020 · 4 comments
Labels
P2 We'll consider working on this in future. (Assignee optional) stale Issues or PRs that are stale (no activity for 30 days) team-Android Issues for Android team type: bug

Comments

@justhecuke-zz
Copy link
Contributor

ATTENTION! Please read and follow:

  • if this is a question about how to build / test / query / deploy using Bazel, or a discussion starter, send it to bazel-discuss@googlegroups.com
  • if this is a bug or feature request, fill the form below as best as you can.

Description of the problem / feature request:

In the ResourceProcessorBusyBox, it calls into ManifestMergerAction which has a System.exit that causes an improper exit of the worker without an indication of what went wrong.

Feature requests: what underlying problem are you trying to solve with this feature?

N/A

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

Throw a AndroidManifestProcessor.ManifestProcessingException in ManifestMergerAction's main try block to hit the System.exit call.

Do a build (after recompiling Bazel and hooking things up since this is a non-trivial insertion), and note that you get a build error com.google.protobuf.InvalidProtocolBufferException: Protocol message end-group tag did not match expected tag. and no notice about exception that was thrown or any relevant error logs/prints that are related to the actual manifest merger error.

What operating system are you running Bazel on?

Mac OS and Ubuntu.

What's the output of bazel info release?

release 3.1.0

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

N/A

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

git@github.com:lyft/instant-android.git
2c28d9de9e7dc6f6000314fa1c3ee0a2a537e66a
612664443af62bdb991bc76b87ec388af7e99242

Have you found anything relevant by searching the web?

No. This seems to be something that others either do not hit or do not report. It also looks similar to other worker-related issues and so can be difficult to differentiate from them.

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

No. The problem is that this lacks the outputs that are relevant to the error and instead gives a generic worker problem rather than the specific exception that we are concerned with.

@jin jin added team-Android Issues for Android team untriaged labels May 5, 2020
@meisterT
Copy link
Member

cc @larsrc-google

@larsrc-google
Copy link
Contributor

Indeed. I see that also in a couple of other main() methods called from ResourceProcessorBusyBox. They should not call System.exit(), but ResourceProcessorBusyBox also ought not to call main(), but a separate method that doesn't think it's called from the command line.

ResourceProcessorBusyBox could instead set up a SecurityManager to prevent System.exit from actually exiting.

@ahumesky ahumesky added P2 We'll consider working on this in future. (Assignee optional) type: bug and removed untriaged labels Dec 3, 2020
@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 2+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Apr 13, 2023
@meisterT
Copy link
Member

This was fixed in #14427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) stale Issues or PRs that are stale (no activity for 30 days) team-Android Issues for Android team type: bug
Projects
None yet
Development

No branches or pull requests

5 participants