Skip to content

Conversation

paschalis-mpeis
Copy link
Member

No description provided.

I stumbled upon a case where perpareToParse return an error message on
'buildid', but then on a subsequent call for 'mmap events' it crashed
with:
> Assertion `!HasError && "Cannot get value when an error exists!"' failed.

This was due to an Error while reading the error message (ErrorMB).
@paschalis-mpeis
Copy link
Member Author

This corcerns and edge case, causing an assertion in 'prepareToParse'.
I was on Ubuntu without perf installed; instead there's a wrapper that prints installation instructions.

perf2bolt assumes perf is present. With one profile type it handled it okay, exiting gradefully with the message.
With another it crashed on the second prepareToParse (for mmaps).

I'd expect that if fetching the build-id failed, the subsequent call would also fail.
Note that when the binary lacks build-id, we have no issues, just a warning:

BOLT-WARNING: build-id will not be checked because we could not read one from input binary

Either way, at prepareToParse we get an error while trying to read the error message.
If we handle that, then the assertion will be gone.

I've sent a second draft patch as an alternative to the first (066ebee).

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

Successfully merging this pull request may close these issues.

1 participant