-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Bazel Memory Tracker shows incorrect memory consumption #24782
Comments
|
Thank you, @fmeum
It seems that this PR fully resolves the issue. |
The jar can be supplied separately as it needs to be passed to the `-javaagent` JVM arg anyway. Also update the recommended version for compatibility with Java 21. Fixes bazelbuild#24782 Closes bazelbuild#24783. PiperOrigin-RevId: 714057306 Change-Id: Ic8d47562f15344ed16d0af5d3242937d2ee53b22 (cherry picked from commit b59fbee)
The jar can be supplied separately as it needs to be passed to the `-javaagent` JVM arg anyway. Also update the recommended version for compatibility with Java 21. Fixes bazelbuild#24782 Closes bazelbuild#24783. PiperOrigin-RevId: 714057306 Change-Id: Ic8d47562f15344ed16d0af5d3242937d2ee53b22 (cherry picked from commit b59fbee)
The jar can be supplied separately as it needs to be passed to the `-javaagent` JVM arg anyway. Also update the recommended version for compatibility with Java 21. Fixes bazelbuild#24782 Closes bazelbuild#24783. PiperOrigin-RevId: 714057306 Change-Id: Ic8d47562f15344ed16d0af5d3242937d2ee53b22 (cherry picked from commit b59fbee)
…#24912) The jar can be supplied separately as it needs to be passed to the `-javaagent` JVM arg anyway. Also update the recommended version for compatibility with Java 21. Fixes #24782 Closes #24783. PiperOrigin-RevId: 714057306 Change-Id: Ic8d47562f15344ed16d0af5d3242937d2ee53b22 (cherry picked from commit b59fbee) Fixes #24788
The jar can be supplied separately as it needs to be passed to the `-javaagent` JVM arg anyway. Also update the recommended version for compatibility with Java 21. Fixes bazelbuild#24782 Closes bazelbuild#24783. PiperOrigin-RevId: 714057306 Change-Id: Ic8d47562f15344ed16d0af5d3242937d2ee53b22
The jar can be supplied separately as it needs to be passed to the `-javaagent` JVM arg anyway. Also update the recommended version for compatibility with Java 21. Fixes bazelbuild#24782 Closes bazelbuild#24783. PiperOrigin-RevId: 714057306 Change-Id: Ic8d47562f15344ed16d0af5d3242937d2ee53b22 (cherry picked from commit b59fbee)
…#24913) The jar can be supplied separately as it needs to be passed to the `-javaagent` JVM arg anyway. Also update the recommended version for compatibility with Java 21. Fixes #24782 Closes #24783. PiperOrigin-RevId: 714057306 Change-Id: Ic8d47562f15344ed16d0af5d3242937d2ee53b22 (cherry picked from commit b59fbee) Fixes #24789
A fix for this issue has been included in Bazel 7.5.0 RC2. Please test out the release candidate and report any issues as soon as possible. |
Description of the bug:
According to documentation Bazel allows to instrument memory allocations. It seems that now this feature provides an incorrect information.
All values of memory consumption for rules are either 0 or values which are roughly multiples of 256kB. For example, the text dump for prof.gz shows:
The total memory consumption is also far from expected values.
It looks like the values of memory consumption are taken from shifted position in memory. It might be caused by changes in internal Java structures.
I believe, the problem is in outdated version of
java-allocation-instrumenter-3.3.0.jar
used for instrumenting. According to Release notes the support for Java 17 was added in 3.3.2, and support for Java 21 was added in 3.3.4.However, my attempts to use a newer version of instrumenter were unsuccessful. Bazel crashes with any version higher than 3.3.0. The error message is unclear:
Which category does this issue belong to?
Performance
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Perform steps according to documentation:
bazel build
bazel dump --rules
orbazel dump --skylark_memory=$HOME/prof.gz
Which operating system are you running Bazel on?
Windows, Linux, Mac
What is the output of
bazel info release
?release 7.4.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: