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

perf_to_profile crashes on a 3GB perf.data file #141

Open
kcalvinalvin opened this issue Jun 16, 2023 · 3 comments
Open

perf_to_profile crashes on a 3GB perf.data file #141

kcalvinalvin opened this issue Jun 16, 2023 · 3 comments

Comments

@kcalvinalvin
Copy link

kcalvinalvin commented Jun 16, 2023

perf record ./src/bitcoind -datadir=mainnet -server=0 -connect=127.0.0.1 -dbcache=16000

I ran the above command to capture a perf of a long running process (3-4 hours) and got the following error:

[libprotobuf FATAL external/com_google_protobuf/src/google/protobuf/stubs/stringpiece.cc:50] size too big: 18446744072542064660 details: string length exceeds max size
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  size too big: 18446744072542064660 details: string length exceeds max size
fish: Job 1, '../perf_data_converter/result/b…' terminated by signal SIGABRT (Abort)

The perf.data file generated by the perf was 3GB. It's too big to attach in the github issues but I can provide it on request.

EDIT: I just saw #123 and should mention that the binary I was using was built on b1c2b82a8ec75b016c36da31c845491c75b9adae

@aalexand
Copy link
Collaborator

Probably an integer overflow somewhere. I think to get the faster answer you would need to debug it yourself a bit - if you figure out the fix and it's trivial just send a PR and we'll review it.

@gmarin13
Copy link
Collaborator

It could be a 32-bit signed integer extended to 64-bit. Note that the protobuf string piece has a max size of 1<<63 - 1.

18446744072542064660 = 0xFFFFFFFFBA699014
Taking the last 32 bits, 0xBA699014 = 3127480340 (~ 3 GB).

@aalexand
Copy link
Collaborator

Ah, good find, @gmarin13!

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