-
Notifications
You must be signed in to change notification settings - Fork 260
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
include build info in out directory #54
Comments
Thanks for the report, @brendangregg. I agree, it might make sense to add such a file. I wonder how that error can happen. It doesn't seem to be failing in the code of the agent itself but in |
More generally, what level of parity is required between the machine that compiled perf-map-agent and the machine running it? For example, is it risky to compile perf-map-agent on linux kernel 3.4 and then run it on linux kernel 4.4? (with equivalent- or near-equivalent OpenJDK versions)? Or, conversely, holding the linux kernel constant but mutating the OpenJDK versions? I ask b/c I've see one crash that may or may not have been perf-map-agent related (this was a few months ago), and as a result we've been a bit tentative about using it on prod. It's OpenJDK across the board, but there's some variation in kernel and JDK 1.8.* versions. |
Hi @jjhart, perf-map-agent is not related to the Linux kernel at all. It generates files which can then be read by user-level perf tools. It's a JVM agent that is compiled against header files included with the JDK. If I remember correctly it does not even link against JDK libraries. Instead, all references are dynamically resolved. It might (accidentally?) rely on some particularities of a given JDK and it is also missing some error checks so that it might run into issues (though, we haven't seen only few reports about those). |
To be clear about that: as far as I know, if you are on the right CPU architecture, the binary should work everywhere. If that's not the case, I would consider it a bug. |
@jrudolph - thanks for the clarification. I did indeed compile with the same JDK as used in prod, so whatever caused my crash is unrelated to the issue @brendangregg is reporting. |
I've found that perf-map-agent compiled for OracleJDK can crash OpenJDK (usually on the second invocation). I'm changing my tooling so that we have builds for each. This ticket is to suggest that build info is included in the out directory, so that other tooling can double check what it was built against. Eg, just a:
From the build process would be handy.
For reference, here's stack trace from one of the crashes:
The text was updated successfully, but these errors were encountered: