Skip to content

wasm: fix "thread_in_wasm flag was not set" crash in debug builds.#16132

Closed
PiotrSikora wants to merge 6 commits intoenvoyproxy:mainfrom
PiotrSikora:v8_v9.0-trapfix
Closed

wasm: fix "thread_in_wasm flag was not set" crash in debug builds.#16132
PiotrSikora wants to merge 6 commits intoenvoyproxy:mainfrom
PiotrSikora:v8_v9.0-trapfix

Conversation

@PiotrSikora
Copy link
Copy Markdown
Contributor

@PiotrSikora PiotrSikora commented Apr 22, 2021

Fixes istio/istio#30645.

Signed-off-by: Piotr Sikora piotrsikora@google.com

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Apr 22, 2021
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).

🐱

Caused by: #16132 was opened by PiotrSikora.

see: more, trace.

@PiotrSikora
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #16132 (comment) was created by @PiotrSikora.

see: more, trace.

@PiotrSikora PiotrSikora requested a review from howardjohn April 23, 2021 08:44
@lizan lizan requested a review from mathetake April 23, 2021 08:49
Copy link
Copy Markdown
Contributor

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

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

Its definitely possible I built it wrong as I had some difficulty, but I tested this and it seemed to have the same issue.

@PiotrSikora
Copy link
Copy Markdown
Contributor Author

Its definitely possible I built it wrong as I had some difficulty, but I tested this and it seemed to have the same issue.

Thanks for testing! It's definitely possible that this PR doesn't fix the issue (I didn't replicate it locally yet), it's a cherry-pick of a fix that looked relevant, but perhaps there are even more issues around that code. I'll try to dig into it next week.

@PiotrSikora
Copy link
Copy Markdown
Contributor Author

OK, this indeed doesn't work. The failure can be easily replicated using:

bazel test -c dbg //test/extensions/common/wasm:wasm_test

It passes on the CI, because it only uses dbg in tests with sanitizers, and trap handlers are disabled with sanitizers.

I think it might be a false-positive, but I filled the issue with V8 team:
https://bugs.chromium.org/p/v8/issues/detail?id=11713

@PiotrSikora
Copy link
Copy Markdown
Contributor Author

PiotrSikora commented May 4, 2021

@howardjohn if it's not too much trouble, could verify the updated version? It fixes the issue for me.

@howardjohn
Copy link
Copy Markdown
Contributor

@PiotrSikora I was able to test this and confirmed it addressed the issue

…rapfix

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora PiotrSikora marked this pull request as ready for review May 13, 2021 02:03
@PiotrSikora PiotrSikora requested review from lizan and moderation May 13, 2021 02:03
@PiotrSikora
Copy link
Copy Markdown
Contributor Author

@moderation I know that you're not a big fan of carrying patches, but debug builds are completely broken right now. Those patches will be removed once we update to V8 v9.2, but it won't happen until the end of next week when v9.2 is branched.

@moderation
Copy link
Copy Markdown
Contributor

Just like I'm not a fan of carrying patches, you are not a fan of putting a TODO(PiotrSikora) in the patch, with a date / target for resolution, so we know who we can go to when the patch blocks a dependency upgrade 😄

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora
Copy link
Copy Markdown
Contributor Author

PiotrSikora commented May 14, 2021

Just like I'm not a fan of carrying patches, you are not a fan of putting a TODO(PiotrSikora) in the patch, with a date / target for resolution, so we know who we can go to when the patch blocks a dependency upgrade 😄

I've added TODO without a date or resolution, since there is nothing to do until the next version is branched and we update to it. I'm not a fan of adding TODO in this case, since patches are already clearly commented with the source of the cherry-picks, and adding it to the existing PRs triggers another multi-hour CI cycle, which in turn delays approval process and merge by another few days, while providing virtually zero value (historically speaking, I'm going be doing the update anyway).

@PiotrSikora
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #16132 (comment) was created by @PiotrSikora.

see: more, trace.

@PiotrSikora
Copy link
Copy Markdown
Contributor Author

@moderation PTAL.

@moderation
Copy link
Copy Markdown
Contributor

/lgtm deps

@repokitteh-read-only repokitteh-read-only bot removed the deps Approval required for changes to Envoy's external dependencies label May 15, 2021
# 2. Increase VSZ limit to 64 TiB (allows us to start up to 6,553 VMs).
# 3. Fix building and linking with MSAN.
# TODO(PiotrSikora): remove when not needed anymore (most likely in v9.2 branch):
# 4. Fix "thread_in_wasm flag was not set" crash in debug builds (https://chromium-review.googlesource.com/c/v8/v8/+/2817598, https://chromium-review.googlesource.com/c/v8/v8/+/2867468).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes listed are part of the diff below. LGTM!

Copy link
Copy Markdown
Contributor

@antoniovicente antoniovicente left a comment

Choose a reason for hiding this comment

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

Anything to add @lizan ?

These changes LGTM.

@envoyproxy/senior-maintainers: would one of you want to take a look or should we merge this fix?

@antoniovicente antoniovicente self-assigned this May 20, 2021
@lizan
Copy link
Copy Markdown
Member

lizan commented May 21, 2021

I merged v8 9.2, do we still need this?

@PiotrSikora
Copy link
Copy Markdown
Contributor Author

I merged v8 9.2, do we still need this?

Nope. Thanks!

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.

WASM test failure with debug image

6 participants