firefox-devtools / profiler

Firefox Profiler — Web app for Firefox performance analysis
https://profiler.firefox.com
Mozilla Public License 2.0
1.21k stars 393 forks source link

RangeError: invalid digits value: NaN. Could not find segment or section overlapping the file offset range 0x1000..0x2000 #5118

Closed minzak closed 2 months ago

minzak commented 2 months ago

Hm.. I loading data, in firs half second i saw all data and after that appear error screen and opened this window for write issues.

Uh oh, some unknown error happened in profiler.firefox.com.
RangeError: invalid digits value: NaN.
Please report this issue to the developers, including the full error as displayed in the Developer Tools’ Web Console.

In my linux console:

$ ./samply import perf.data 
cmd line: /usr/bin/perf record -e cycles --switch-events --sample-cpu --all-cpus --per-thread --timestamp --call-graph dwarf --aio -z -p 2628 --output=perf.data
event cpu-clock
Could not find segment or section overlapping the file offset range 0x1000..0x2000
Could not find segment or section overlapping the file offset range 0x26000..0x17b000
Local server listening at http://127.0.0.1:3000
Press Ctrl+C to stop.
$ ./samply --version
samply 0.12.0

image

console-export-2024-9-5_16-38-49.txt profile.tar.gz

perf.dat - is near 50MB is here - https://easyupload.io/2yf6s8 (valid 30 day)

mstange commented 2 months ago

Our documentation doesn't say that you can just load the perf.data - instead, it suggests you run perf script and load the text output from that - but it can be very large.

Alternatively, you can run samply import perf.data . You can install samply as described in its readme.

mstange commented 2 months ago

Oops, I am sorry, I meant to post this comment on #5117 instead.

mstange commented 2 months ago

I think the invalid digits value: NaN error should have been fixed by #5086, maybe that's not deployed yet?

The error means that the converted profile doesn't contain any samples.

perf.dat - is near 50MB is here - https://easyupload.io/2yf6s8 (valid 30 day)

I think the problem in this file is the -z flag. I think samply may not have support for compressed perf.data files. As a result, it outputs a profile with no samples.

Can you try again without -z?

To add support for -z in samply, I think RawUserRecord::parse needs to implement decompression for UserRecordType::PERF_COMPRESSED records.

minzak commented 2 months ago

Can you try again without -z?

Yes, now without -z - all is work !