New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 806250 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit 28 days ago
Closed: Dec 8
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

After WebAssembly compilation DevTools flood the commandline with error messages

Project Member Reported by ahaas@chromium.org, Jan 26 2018

Issue description

Chromium	66.0.3333.0 (Developer Build) (64-bit)
Revision	ba12dcb89c18e461ec3963543c349260e620969c-refs/heads/master@{#531990}
OS	Linux
JavaScript	V8 6.6.74

What steps will reproduce the problem?
(1) Extract the files from the repro I attached, and start a webserver with "php -S 127.0.0.1:8005 -t .".
(2) Open Chrome, open Dev Tools, and go to the URL http://127.0.0.1:8005/streaming.php?wasm=epic&mode=stream
(3) Wait for about 20 seconds (longer on weaker machines) until compilation finishes.

What is the expected result?

Compilation should already finish after 10 seconds, as it does when Dev Tools are not open.

What happens instead?

Compilation takes 20 seconds. In addition, the command line where I started Chrome from gets flooded with thousands of error messages of the kind

[45511:45511:0126/150036.944014:ERROR:CONSOLE(957)] "Error: CharacterIdMap ran out of capacity! Error: CharacterIdMap ran out of capacity!
    at Common.CharacterIdMap.toChar (chrome-devtools://devtools/bundled/inspector.js:893:7)
    at path.split.map.token (chrome-devtools://devtools/bundled/inspector.js:7888:62)
    at Array.map (<anonymous>)
    at Persistence.PathEncoder.encode (chrome-devtools://devtools/bundled/inspector.js:7888:37)
    at Persistence.Automapping.FilePathIndex.similarFiles (chrome-devtools://devtools/bundled/inspector.js:7767:57)
    at Persistence.Automapping._createBinding (chrome-devtools://devtools/bundled/inspector.js:7753:61)
    at Persistence.Automapping._bindNetwork (chrome-devtools://devtools/bundled/inspector.js:7731:38)
    at Persistence.Automapping._onUISourceCodeAdded (chrome-devtools://devtools/bundled/inspector.js:7724:205)
    at _eventListeners._workspace.addEventListener.event (chrome-devtools://devtools/bundled/inspector.js:7705:842)
    at Workspace.Workspace.dispatchEventToListeners (chrome-devtools://devtools/bundled/inspector.js:483:23)", source: chrome-devtools://devtools/bundled/inspector.js (957)

While the command line is printing these error messages, Chrome is completely frozen.

The WebAssembly module in the repro contains 189746 functions. I think Dev Tools tries to create a CharacterID for each function. If I don't call Debug::OnAfterCompile after the WebAssembly compilation, no error messages are printed, and the browser does not freeze anymore.
 

Comment 1 by ahaas@chromium.org, Jan 26 2018

I forgot to add the repro. 
repro.tar.gz
18.2 MB Download

Comment 2 by ahaas@chromium.org, Jan 26 2018

Cc: ahaas@chromium.org

Comment 3 by l...@chromium.org, Jan 30 2018

Owner: lushnikov@chromium.org
Status: Assigned (was: Untriaged)
Thanks for the report and the nice repro.  I'm able to repro the 20+ seconds (from 10+ sec without DT) slowdown and the errors in the terminal, and I haven't added any folders to Workspace.

lushnikov@, do you think we could skip creating the network binding if we haven't added a folder to workspace?

Comment 4 by ahaas@chromium.org, Feb 28 2018

Cc: herhut@chromium.org kimanh@google.com

Comment 5 by ahaas@chromium.org, Feb 28 2018

lushnikov, do you have an update on this issue?

Comment 6 by ahaas@chromium.org, Mar 8 2018

Cc: pfeldman@chromium.org
The problem is the exception thrown in https://cs.chromium.org/chromium/src/third_party/WebKit/Source/devtools/front_end/common/CharacterIdMap.js?q=third_party/WebKit/Source/devtools/front_end/common/CharacterIdMap.js&sq=package:chromium&l=25

I guess we just run out of characters, because we have more than 2^16 functions in this test case.
Cc: jgravelle@chromium.org
I'm encountering this issue in working on the WASM port of Unreal Engine. It's making it really difficult debug things because every time it happens, it happens so much that it hangs the the entire tab/devtools (because too many console messages - which is also a separate problem that may be more important).

Any chance we could get this prioritized? For now I will hack my own chrome build to avoid this.
Labels: Partner-Games-Epic
It would be great if we could get this fixed in the next week or so, because one of our partners from Epic is coming in-house to work with us on the UE port, and it would be good not to have to use a hacked Chrome for that. Also there are  still other wasm debugging-related crashes, so being able to use official builds means we get crashserver support.
FYI, it turns out that with *some* builds (if they're small enough) the spew stops after ~15 seconds (on a pretty fast workstation). So I'm at least able to make progress without a custom build.
Project Member

Comment 11 by bugdroid1@chromium.org, Oct 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/594429a333dafd8873b4d83c2aea1273dd090bc6

commit 594429a333dafd8873b4d83c2aea1273dd090bc6
Author: Andrey Lushnikov <lushnikov@chromium.org>
Date: Sat Oct 27 02:30:17 2018

DevTools: ignore wasm files in automapping

WASM currently creates script-per-function, resulting in a huge number
of UISourceCodes reported to the devtools front-end.

These sources are useless for automapping subsystem, so we should
skip them right away.

R=dgozman

Bug:  806250 
Change-Id: I1c8f81729ce64bb528a60f854a59715a78edbc95
Reviewed-on: https://chromium-review.googlesource.com/c/1300313
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603294}
[modify] https://crrev.com/594429a333dafd8873b4d83c2aea1273dd090bc6/third_party/blink/renderer/devtools/front_end/persistence/Automapping.js

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)

Sign in to add a comment