Skip to content

assertions: add new class of known issue assertions#10015

Merged
mattklein123 merged 13 commits intoenvoyproxy:masterfrom
goaway:ms/known-issues
Feb 20, 2020
Merged

assertions: add new class of known issue assertions#10015
mattklein123 merged 13 commits intoenvoyproxy:masterfrom
goaway:ms/known-issues

Conversation

@goaway
Copy link
Copy Markdown
Contributor

@goaway goaway commented Feb 12, 2020

Description: Adds a new class of assertions, KNOWN_ISSUE_ASSERT, that may be compiled out even when other assertions are compiled in. The intent is to allow assertions to generally be compiled into releases, but to exclude instances that are known to fail for as-yet unknown or unresolved reasons. When the issue has been triaged and resolved, a KNOWN_ISSUE_ASSERT should generally become a regular ASSERT or RELEASE_ASSERT again.
Risk Level: Moderate
Testing: Built and ran locally with various combinations of build flags.

Signed-off-by: Mike Schore mike.schore@gmail.com

@goaway
Copy link
Copy Markdown
Contributor Author

goaway commented Feb 12, 2020

Note this is a recreation of #9814

@goaway
Copy link
Copy Markdown
Contributor Author

goaway commented Feb 12, 2020

(In response to feedback from previous PR): I didn't create a RELEASE and regular version of this, since my line of thinking was that it represented a new class. e.g. 'normally' RELEASE_ASSERTS will always be present, and ASSERTS won't, this new class won't 'normally' be present even when regular ASSERTS are compiled in.

@mattklein123 mattklein123 self-assigned this Feb 12, 2020
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for iterating on this. A few high level comments.

/wait

bazel/BUILD Outdated
Comment on lines 214 to 216
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming we go with this change, I think this should be inverted. The default should still be for assertions to be enabled. If someone is hitting an issue and can't debug/fix they can disable the assertion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'm fine with inverting it. Will update.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per above I think we should invert the logic. Still, I realize now that you are trying to disable a normal ASSERT vs. a RELEASE_ASSERT. Why are you shipping code with normal ASSERTs enabled? Are you using an optimized built with regular asserts on? Why not just turn them off?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has a lot to do with the early stage Envoy Mobile is in, and the fact that it's under active development. We're calling into Envoy via new mechanisms and in new contexts. Sometimes expectations fail to hold. Often it's because we've erred, and sometimes it's because we've uncovered a new edge case. Either way, at this point, we'd like to maintain that visibility by keeping (most) assertions compiled in. For now.

@goaway
Copy link
Copy Markdown
Contributor Author

goaway commented Feb 12, 2020

Created this issue to reference in example usage: #10030

@mattklein123
Copy link
Copy Markdown
Member

Please check format.

/wait

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than comment issue, thanks!

/wait

Comment on lines 104 to 107
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text needs updating

@goaway
Copy link
Copy Markdown
Contributor Author

goaway commented Feb 19, 2020

resuming local testing and will update comment

Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com>
@mattklein123
Copy link
Copy Markdown
Member

Friendly request to please never force push. It makes reviews much more difficult. Only merge master and add commits. Thank you!

@mattklein123
Copy link
Copy Markdown
Member

Release CI issue looks legit. PTAL.

/wait

Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com>
@goaway goaway requested a review from mattklein123 February 20, 2020 01:55
@goaway
Copy link
Copy Markdown
Contributor Author

goaway commented Feb 20, 2020

I think the CI failure is maybe spurious now.

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mattklein123 mattklein123 merged commit 4b69343 into envoyproxy:master Feb 20, 2020
rebello95 added a commit to envoyproxy/envoy-mobile that referenced this pull request Feb 20, 2020
Bumping to include envoyproxy/envoy#10015.

Should resolve #572.

Signed-off-by: Michael Rebello <me@michaelrebello.com>
rebello95 added a commit to envoyproxy/envoy-mobile that referenced this pull request Feb 20, 2020
Bumping to include envoyproxy/envoy#10015.

Should resolve #572.

Signed-off-by: Michael Rebello <me@michaelrebello.com>
goaway added a commit to envoyproxy/envoy-mobile that referenced this pull request Feb 20, 2020
Description: With this change envoyproxy/envoy#10015 Envoy now supports conditionally disabling assertions that cover known issues via build options. This allows us to resolve the crash on shutdown on iOS while the upstream issue is investigated.
Risk Level: Low
Testing: Local, upstream

Signed-off-by: Mike Schore <mike.schore@gmail.com>
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Bumping to include #10015.

Should resolve envoyproxy/envoy-mobile#572.

Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Description: With this change #10015 Envoy now supports conditionally disabling assertions that cover known issues via build options. This allows us to resolve the crash on shutdown on iOS while the upstream issue is investigated.
Risk Level: Low
Testing: Local, upstream

Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Bumping to include #10015.

Should resolve envoyproxy/envoy-mobile#572.

Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Description: With this change #10015 Envoy now supports conditionally disabling assertions that cover known issues via build options. This allows us to resolve the crash on shutdown on iOS while the upstream issue is investigated.
Risk Level: Low
Testing: Local, upstream

Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants