Netflix / flamescope

FlameScope is a visualization tool for exploring different time ranges as Flame Graphs.
Apache License 2.0
3.02k stars 169 forks source link

ERROR: Bad range, 622353.26 -> 622351.26. #10

Closed grooverdan closed 6 years ago

grooverdan commented 6 years ago

Wondering if this could be less fatal. I'm assuming out of order or missed perf record elements.

Got no output in browser with this error log:

9.192.254.114 - - [04/Apr/2018 20:52:53] "GET /stack?filename=stacks.mysql-prep.2018-04-04%2020:49:33-05:00&start=18.26&end=16.26 HTTP/1.1" 301 -
ERROR: Bad range, 622353.26 -> 622351.26.

Decent file size:

31235407 Apr  4 20:49 stacks.mysql-prep.2018-04-04 20:49:33-05:00

Trying to look at data at 622353.26, 622351.26:

 grep  62235[13].26 stacks.mysql-prep.2018-04-04\ 20\:49\:33-05\:00
mysqld 26608 [176] 622351.261861:  114686965 cycles:ppp:
mysqld 26652 [116] 622351.262978:  114685776 cycles:ppp:
mysqld 26060 [092] 622351.265249:  114685758 cycles:ppp:
mysqld 26502 [176] 622353.262046:  114692803 cycles:ppp:
mysqld 25987 [116] 622353.263136:  114683275 cycles:ppp:
mysqld 26751 [092] 622353.265415:  114686145 cycles:ppp:
swapper     0 [088] 622353.265751:  260814858 cycles:ppp:
 sudo perf script --debug-mode -i perf-prep.data --header > "stacks.mysql-prep.`date --rfc-3339=seconds`"
Misordered timestamps: 0

This generated a header only:
# ========
# captured on: Wed Apr  4 20:48:53 2018
# hostname : bobby
# os release : 4.13.0-37-generic
# perf version : 4.15.0
# arch : ppc64le
# nrcpus online : 46
# nrcpus avail : 184
# cpudesc : POWER9, altivec supported
# cpuid : 78,4609
# total memory : 536032448 kB
# cmdline : /usr/local/bin/perf record -F 20 --proc-map-timeout=50000 -o perf-prep.data -a -g -- sleep 30
# event : name = cycles:ppp, , size = 112, { sample_period, sample_freq } = 20, sample_type = IP|TID|TIME|CALLCHAIN|CPU|PERIOD, disabled = 1, inherit = 1, mmap = 1, comm = 1, fre
q = 1, task = 1, precise_ip = 3, sample_id_all = 1, exclude_guest = 1, mmap2 = 1, comm_exec = 1
# CPU_TOPOLOGY info available, use -I to display
# pmu mappings: nest_mba1_imc = 9, nest_mba5_imc = 13, nest_phb1_imc = 22, nest_phb5_imc = 26, nest_nvlink0_imc = 18, breakpoint = 5, nest_powerbus0_imc = 27, nest_mba2_imc = 10,
 nest_nx_imc = 20, nest_mba6_imc = 14, nest_phb2_imc = 23, cpu = 4, nest_nvlink1_imc = 19, nest_mcs01_imc = 16, software = 1, thread_imc = 28, nest_mba3_imc = 11, nest_mba7_imc =
 15, nest_phb3_imc = 24, nest_capp0_imc = 6, nest_xlink1_imc = 29, nest_mcs23_imc = 17, nest_mba0_imc = 8, nest_mba4_imc = 12, nest_phb0_imc = 21, tracepoint = 2, nest_phb4_imc =
 25, nest_xlink2_imc = 30, core_imc = 7
# missing features: TRACING_DATA NUMA_TOPOLOGY BRANCH_STACK GROUP_DESC AUXTRACE STAT CACHE
# ========
#
brendangregg commented 6 years ago

I think "--debug-mode" is only supposed to do checks, hence no output. Yes, it should give better error messages though.

As for the original issue: 622353.26 -> 622351.26 is a backwards range. Maybe a UI bug? Did you click a range in reverse?

grooverdan commented 6 years ago

Yep, clicking future and then backwards in time. Sorry so obvious. Great tool btw. Despite the bug reports I'm have fun with it.

Be-ngt-oH commented 6 years ago

Hi,

I've submitted a PR(#14) that addresses this.

Kind regards

spiermar commented 6 years ago

I'll block backwards select in the UI for now, and review https://github.com/Netflix/flamescope/pull/14 separately.

grooverdan commented 6 years ago

thank you.