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

Unable to open trace files when profiler is built in RelWithDebInfo #903

Open
slomp opened this issue Oct 3, 2024 · 11 comments
Open

Unable to open trace files when profiler is built in RelWithDebInfo #903

slomp opened this issue Oct 3, 2024 · 11 comments

Comments

@slomp
Copy link
Contributor

slomp commented Oct 3, 2024

In the current master, I saved a large trace to a file, and later when I tried to reopen it, I got the following:
image

I noticed this behavior on Windows/Intel.

@wolfpld
Copy link
Owner

wolfpld commented Oct 3, 2024

What's the hex dump of first 4 bytes?

@slomp
Copy link
Contributor Author

slomp commented Oct 4, 2024

74 72 FD 50

@wolfpld
Copy link
Owner

wolfpld commented Oct 4, 2024

That looks to be garbled uncompressed data stream (TracyWorker.cpp:584). Can you check if any of the initial data blocks (FileRead::GetNextDataBlock()) contains the expected header (FileHeader)?

@slomp
Copy link
Contributor Author

slomp commented Oct 4, 2024

Sure, I'll try to get a debug build later to check.

I forgot to mention that I used Zstd with compression level 3, and concurrency 4.
With the non-Zstd modes, the trace file opens as expected.

@slomp
Copy link
Contributor Author

slomp commented Oct 5, 2024

Update: it works when I build profiler in the Debug configuration.
It's probably some uninitialized variable somewhere. I'll try to find it.

@slomp
Copy link
Contributor Author

slomp commented Oct 5, 2024

ZSTD_decompressStream() returns code 0xff...ffec (-20) which reads: "Frame requires too much memory for decoding"

@slomp
Copy link
Contributor Author

slomp commented Oct 5, 2024

Bizarre... The error only occurs in RelWithDebInfo builds...
Debug and Release work just fine.
Maybe ZSTD has problems when it gets built with that configuration?

@slomp slomp changed the title Unable to open trace files Unable to open trace files when profiler is built in RelWithDebInfo Oct 5, 2024
@wolfpld
Copy link
Owner

wolfpld commented Oct 5, 2024

Hmm... There is a similar problem with emscripten, where some traces fail to load when set as initial, but load correctly when another trace is loaded first and then closed. One of the ways this can manifest itself is runaway memory consumption. This is probably related.

@slomp
Copy link
Contributor Author

slomp commented Oct 5, 2024

Yeah, I'll try to step through the ZSTD_decompressStream again later.

(I just tried opening a non-zstd trace file first, close it, and then open the zstd trace file, and it also fails.)

@slomp
Copy link
Contributor Author

slomp commented Oct 5, 2024

I also believe this is a Windows-only thing (could be MSVC related, even).
(I don't recall having trouble with Zstd trace files in RelWithDebInfo on Mac and Linux, but I'll double-check later.)

@jkriegshauser
Copy link
Contributor

jkriegshauser commented Oct 11, 2024

Just came here to report this as we're also running into it (on 11.1)

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

3 participants