cargo-profiler icon indicating copy to clipboard operation
cargo-profiler copied to clipboard

Regex error

Open matthiasbeyer opened this issue 8 years ago • 12 comments

cargo profiler crashes for me:

Profiling imag-counter with cachegrind...
error: regex error -- please file a bug.
third party subcommand `cargo-profiler` exited unsuccessfully

How to investigate?

matthiasbeyer avatar May 14 '16 13:05 matthiasbeyer

hey there,

Cool, you'll be the guinea pig here in this type of bug fix :) There's probably something in your cachegrind output that's screwing up the regex. We'll just have to improve the regex.

We're gonna have to dig into the original cachegrind output to figure out what's going on. Could you send me the cachegrind-out-file from valgrind itself? I can investigate.

$ valgrind --tool=cachegrind --cachegrind-out-file=cachegrind.txt

kernelmachine avatar May 14 '16 14:05 kernelmachine

As an aside, I wonder how to improve the error message so that it's easier to investigate this type of stuff. Something to think about.

kernelmachine avatar May 14 '16 14:05 kernelmachine

Here is the paste: http://pastebin.com/NaZs4BCg

It's 8k lines so I pasted it on pastebin.

matthiasbeyer avatar May 14 '16 14:05 matthiasbeyer

sounds good, thanks.

kernelmachine avatar May 14 '16 14:05 kernelmachine

hm, this is pretty weird. a sample of your cachegrind output:

:do_lookup_x   24 38,621   742   235 18,455    41     8  ???
:_dl_relocate_object,101 3,003 2,861  8,630 1,852 1,827  ???
:__GI_memset    5  4,590     1     0 17,285   552   506  ???
:je_arena_tcache_fill_small 25     0  3,704   132   128  ???
:__memcpy_sse2_unaligned   107    89 15,036 1,097   704  ???
:strcmp  146   54 10,884   299   106      0     0     0  ???
:_IO_vfscanf   53 14,422    10     6  6,838     7     0  ???
:_dl_lookup_symbol_x,009   192   118  4,945    34     9  ???
:check_match    6 15,106   428   168  7,013    23     3  ???
:raw_vec::RawVec$LT$T$GT$.Drop::drop::h14124021383039242148ome/m/archive/development/rust/imag/imag-counter/src/liballoc/raw_vec.rs
:____strtoul_l_internal2    12     8  1,128     2     0  ???
:raw_vec::RawVec$LT$T$GT$::unsafe_no_drop_flag_needs_drop::h1846786809691398471pment/rust/imag/imag-counter/src/liballoc/raw_vec.rs

I'm not entirely sure what's going on here. It seems like metrics are being overwritten by function names...and function names are at the beginning of the line, instead of their usual place at the end. More complicated issue than I originally had thought.

I'll probably do more research to try to figure out why this might be happening, but it's very strange. Hopefully this isn't a consistent issue.

kernelmachine avatar May 16 '16 03:05 kernelmachine

Here's one from me, in case that helps: http://pastebin.com/xUTH1E2Y
(using valgrind installed via brew install valgrind on OS X 10.11.4)

regexident avatar May 19 '16 12:05 regexident

Same issue: `

cargo profiler callgrind -n 10

Compiling problem2 in debug mode...

Profiling problem2 with callgrind... error: Regex error -- please file a bug. In bug report, please include the original output file from profiler, e.g. from valgrind --tool=cachegrind --cachegrind-out-file=cachegrind.txt`

callgrind.txt

russellb23 avatar Jun 18 '19 10:06 russellb23

Installed valgrind from arch linux repos 3.15.0.1 and having the same issues. https://pastebin.com/X562yamL

JAicewizard avatar Oct 16 '19 10:10 JAicewizard

@svenstaro you're the new maintainer, I don't know if you get notifications for threads you didn't subscribe to.

JAicewizard avatar Oct 16 '19 10:10 JAicewizard

Oh crap, you're right. I didn't . I'll take a look, sorry!

svenstaro avatar Oct 16 '19 17:10 svenstaro

Another regex error: pastebin

PsychoInferno avatar Feb 24 '20 03:02 PsychoInferno

I'm having the same issue. Has this been solved?

fabracht avatar Jun 20 '22 02:06 fabracht