Hello loading team,we (V8 future web / WebAssembly team) see a weird DCHECK error in the wild (on DCHECK-enabled canary builds) that we can't explain.In our overridden `BytesConsumer::Client::OnStateChange()` method we get a `BytesConsumer::Result::kError` result when trying to read from the underlying `BytesConsumer`.We then explicitly check the result of `BytesConsumer::GetPublicState()` (in an attempt to avoid the DCHECK), and get `kErrored`. The next thing we do is calling `BytesConsumer::GetError()`, but that fails with a DCHECK because the internal state is not `kErrored`.The relevant code is here: https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/blink/renderer/bindings/core/v8/v8_wasm_response_extensions.cc;l=254;drc=3e67c0491457f1a05fb7816346fc6d9676bb7a16The `consumer_` is a `PlaceHolderBytesConsumer` holding a `DataPipeBytesConsumer`. If I read the code correctly, the only way to get back a public state of `kErrored` is if the `DataPipeBytesConsumer` has an internal state of `kErrored`. But then it should be possible to call `GetError()` on it.Any ideas what could go wrong here?See https://crbug.com/1449546 for links to the respective crashes.Thanks in advance for any pointers!-Clemens--Clemens Backes
Software Engineer
Google Germany GmbH
Erika-Mann-Straße 33
80636 München
Geschäftsführer: Paul Manicle, Liana SebastianRegistergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.
This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.
Clemens Backes
Software Engineer
Google Germany GmbH
Erika-Mann-Straße 33
80636 München
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.
This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.
--
You received this message because you are subscribed to the Google Groups "loading-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loading-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/loading-dev/CAGO%3DqhAyVaxZf1Mv0gAyPqT%2BUyNJt1d53OyJM2e7YDGMUiKDOA%40mail.gmail.com.
My initial feeling is that some other BytesConsumer is involved (e.g. ResponseBodyLoader::DelegatingBytesConsumer) while the class name didn't appear on the stack trace due to compiler optimizations.
On Fri, Jun 23, 2023 at 12:31 AM Hiroshige Hayashizaki <hiro...@chromium.org> wrote:My initial feeling is that some other BytesConsumer is involved (e.g. ResponseBodyLoader::DelegatingBytesConsumer) while the class name didn't appear on the stack trace due to compiler optimizations.Interesting theory, that could indeed be the case. It looks like the ResponseBodyLoader::DelegatingBytesConsumer should be fixed anyway to return an error if in errored state according to GetPublicState().