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

vizviewer fails attempting to open with a large (3.8G) result.json. #308

Open
cjw296 opened this issue Jan 23, 2023 · 10 comments
Open

vizviewer fails attempting to open with a large (3.8G) result.json. #308

cjw296 opened this issue Jan 23, 2023 · 10 comments

Comments

@cjw296
Copy link

cjw296 commented Jan 23, 2023

I created a large result.json with python -m viztracer ..., that run ended up with this message:

Circular buffer is full, you lost some early data, but you still have the most recent data.
    If you need more buffer, use "viztracer --tracer_entries <entry_number>"
    Or, you can try the filter options to filter out some data you don't need
    use --quiet to shut me up

...but a 3.8G result.json was produced, so thought I'd try to visualize it.

vizviewer --server_only result.json looked good, but eventually gave an error from Perfetto after loading 31%: "Oops! Your WASM trace processor ran out of memory"

From the docs, I then tried:
vizviewer --server_only --use_external_processor result.json

This ran for much longer before serving up an http port, but failed much more quickly in the browser, this time with:

Viewed on: http://xxx:10000

TypeError: Failed to fetch
TypeError: Failed to fetch
    at http://xxx:10000/v25.0-cca3e0ce7/frontend_bundle.js:113462:9

...but nothing in the logs visible in the console other than:

$ vizviewer  --server_only --use_external_processor result.json
Loading and parsing trace data, this could take a while...


Running vizviewer
You can also view your trace on http://localhost:10000
Press Ctrl+C to quit
@gaogaotiantian
Copy link
Owner

gaogaotiantian commented Jan 23, 2023

3.8G is pretty huge, are you using the default entry number? It is expected that WASM can't handle data this large. However, in theory, the external processor should be able to handle it.

I tested locally and it worked with a 150M log. How large is your RAM? How much RAM the processor is using?

@gaogaotiantian
Copy link
Owner

I double checked the code, and the line that failed should not execute under --use_external_processor. Can you try on a smaller log and see if it works? Also could you confirm that the trace processor process is still running? You can grep trace_processor_shell with ps -aux | grep trace_processor_shell. If the external processor is used properly, the UI on webbrowser should pop up a dialog to ask you if you want to use the external processor.

My guess is your log is so large that the processor ran out of memory and crashed.

@Arthur-Null
Copy link

Arthur-Null commented Mar 8, 2023

same error here. I had a 4G result.json and ran vizviewer --server_only --use_external_processor result.json on a 1000G RAM server and tried on open the website on my local machine.
It gives error message

To assist with debugging please attach or link to the trace you were viewing.

Viewed on: http://localhost:10000

TypeError: Failed to fetch
TypeError: Failed to fetch
    at http://localhost:10000/v25.0-cca3e0ce7/frontend_bundle.js:113462:9

v25.0-cca3e0ce7 cca3e0ce7300e9ab1616888edfd92238fbc27378

The processor process on the server seems to be running normally.

@gaogaotiantian
Copy link
Owner

@Arthur-Null did you confirm that with a smaller trace file, your method(opening a remote website on local machine) works?

@Arthur-Null
Copy link

@Arthur-Null did you confirm that with a smaller trace file, your method(opening a remote website on local machine) works?

Yes, it works on a 10M trace file.

@gaogaotiantian
Copy link
Owner

Hmm. 4G trace file is indeed huge, but perfetto claimed to be able to handle it. I'm not entirely sure whether this is an issue with perfetto or viztracer. You can probably try to open the trace file with perfetto directly(of course it requires the externel processor as well). I can do the experiment when I have some time(and I need to generate a huge trace file). If standalone Perfetto can handle this file, then I'll invesitigate if viztracer did something wrong.

@mbecker8600
Copy link

FYI, this issue is still happening. has there been any resolution to this?

I have a 3.2G file I'm trying to open and see all the same issues mentioned before.

@gaogaotiantian
Copy link
Owner

FYI, this issue is still happening. has there been any resolution to this?

I have a 3.2G file I'm trying to open and see all the same issues mentioned before.

Did you use --use_external_processor? Did you try to open the trace file with Perfetto directly instead of vizviewer?

@mbecker8600
Copy link

Owner

Yeah I tried both and I got the same error that the @Arthur-Null had

@gaogaotiantian
Copy link
Owner

If you can't open the trace file with original Perfetto, then there's nothing viztracer can do. viztracer is using a modified version of Perfetto but the key decoding ability is pure Perfetto. 4G trace is indeed huge and normally I would recommend to use filters to filter out some information, or do a less period of time. However, if you want to make this work, you can submit an issue in Perfetto repo.

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

No branches or pull requests

4 participants