Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 846464 - dev-build/bazel-5.0.0: The system is out of resources: OutOfMemoryError: Java heap space
Summary: dev-build/bazel-5.0.0: The system is out of resources: OutOfMemoryError: Java...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 922374
  Show dependency tree
 
Reported: 2022-05-19 14:50 UTC by John L. Poole
Modified: 2024-02-24 12:52 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Emerge info (emerge_info,5.23 KB, text/plain)
2022-05-19 14:50 UTC, John L. Poole
Details
Emerge pqv (emerge_pqv,338 bytes, text/plain)
2022-05-19 14:51 UTC, John L. Poole
Details
Build log (build.log,56.90 KB, text/plain)
2022-05-19 14:51 UTC, John L. Poole
Details
Build Log Bazel (build.log,15.09 KB, text/plain)
2022-05-19 14:53 UTC, John L. Poole
Details
Emerge pqv Bazel (emerge_pqv.txt,62 bytes, text/plain)
2022-05-19 14:54 UTC, John L. Poole
Details
Emerge info Bazel (emerge_info.txt,5.38 KB, text/plain)
2022-05-19 14:54 UTC, John L. Poole
Details
Environment Bazel (environment.zip,26.23 KB, application/x-zip-compressed)
2022-05-19 14:54 UTC, John L. Poole
Details
Eclass debug Bazel (eclass-debug.log,2.36 KB, text/plain)
2022-05-19 14:55 UTC, John L. Poole
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John L. Poole 2022-05-19 14:50:30 UTC
I'm on the Google Coral Dev Board which has a 500GB NVMe attached via the USB-C connector. https://coral.ai/products/dev-board/#tech-specs

The Dev Board has 1 GB of RAM, I've provided 48 GBs of swap in the Mendel environment, and 49GBs of swap in the Gentoo chroot (probably not referenced).

Top running in the Mendel enviornment shows:

top - 07:48:01 up 2 days, 11:38,  3 users,  load average: 0.08, 0.06, 0.01
Tasks: 146 total,   1 running, 145 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.1 us,  0.4 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.1 hi,  0.2 si,  0.0 st
MiB Mem :    986.0 total,    385.8 free,    239.3 used,    360.9 buff/cache
MiB Swap:  99328.0 total,  99207.5 free,    120.5 used.    660.1 avail Mem


The Dev board runs Mendel which is a watered-down version of Debian v.10 ("Buster") (and Google could not use the trademark "Debian," so they use "Mendel").  Google's demo software that detects objects in videos utilizes an out-of-date version of gstreamer and sometimes does not work.  I finally decided I would try to build gstreamer's current high watermark in a chroot environment on the Dev Board (which I have succeeded in doing) as a first step test towards re-imaging the Coral Dev Board with Gentoo replacing Mendel (which development of Mendel has been halted per Coral Team member).

I have created a Gentoo chroot environment and see below for results of my emerge attempt.


After the first failure, I tried altering my Gentoo chroot environment with:

      export _JAVA_OPTIONS="-Xmx2g"
      export I_WANT_GLOBAL_JAVA_OPTIONS=1

I was hoping that the heap needs would be met with swap, but I guess not?

What can I do to overcome the memory limitation I'm hitting?     


Reproducible: Always

Steps to Reproduce:
1. emerge dev-util/bazel

Actual Results:  
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: Java heap space
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.initCEN(ZipFileSystem.java:1079)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:135)
        at jdk.zipfs/jdk.nio.zipfs.JarFileSystem.<init>(JarFileSystem.java:62)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:134)
        at jdk.compiler/com.sun.tools.javac.file.JavacFileManager$ArchiveContainer.<init>(JavacFileManager.java:514)
        at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getContainer(JavacFileManager.java:316)
        at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.list(JavacFileManager.java:712)
        at jdk.compiler/com.sun.tools.javac.code.ClassFinder.list(ClassFinder.java:737)
        at jdk.compiler/com.sun.tools.javac.code.ClassFinder.scanUserPaths(ClassFinder.java:681)
        at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:551)
        at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:299)
        at jdk.compiler/com.sun.tools.javac.code.ClassFinder$$Lambda$44/0x00000001000cd840.complete(Unknown Source)
        at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:642)
        at jdk.compiler/com.sun.tools.javac.code.Symbol$PackageSymbol.members(Symbol.java:1131)
        at jdk.compiler/com.sun.tools.javac.code.Symtab.listPackageModules(Symtab.java:837)
        at jdk.compiler/com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:345)
        at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:529)
        at jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:286)
        at jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:301)
        at jdk.compiler/com.sun.tools.javac.comp.Enter.complete(Enter.java:576)
        at jdk.compiler/com.sun.tools.javac.comp.Enter.main(Enter.java:560)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1066)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:937)
        at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
        at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
        at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
        at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
 * ERROR: dev-util/bazel-5.0.0::gentoo failed (compile phase):
 *   Failed compiling bazel
 *
 * Call stack:
 *     ebuild.sh, line 127:  Called src_compile
 *   environment, line 2969:  Called die
 * The specific snippet of code:
 *       VERBOSE=yes ./compile.sh || die "Failed compiling bazel";
 *
 * If you need support, post the output of `emerge --info '=dev-util/bazel-5.0.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-util/bazel-5.0.0::gentoo'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=openjdk-bin-11  CLASSPATH="" JAVA_HOME="/opt/openjdk-bin-11.0.14_p9"
JAVACFLAGS="-source 11 -target 11" COMPILER=""
and of course, the output of emerge --info =bazel-5.0.0
 * The complete build log is located at '/var/tmp/portage/dev-util/bazel-5.0.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-util/bazel-5.0.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-util/bazel-5.0.0/work'
 * S: '/var/tmp/portage/dev-util/bazel-5.0.0/work'

Expected Results:  
successful installation.

Requested files forthcoming:

build.log
eclass-debug.log
emerge_info.txt
emerge_pqv.txt
environment.zip
Comment 1 John L. Poole 2022-05-19 14:50:54 UTC
Created attachment 779540 [details]
Emerge info
Comment 2 John L. Poole 2022-05-19 14:51:15 UTC
Created attachment 779543 [details]
Emerge pqv
Comment 3 John L. Poole 2022-05-19 14:51:31 UTC
Created attachment 779546 [details]
Build log
Comment 4 John L. Poole 2022-05-19 14:53:37 UTC
Created attachment 779549 [details]
Build Log Bazel
Comment 5 John L. Poole 2022-05-19 14:54:05 UTC
Created attachment 779552 [details]
Emerge pqv Bazel
Comment 6 John L. Poole 2022-05-19 14:54:30 UTC
Created attachment 779555 [details]
Emerge info Bazel
Comment 7 John L. Poole 2022-05-19 14:54:55 UTC
Created attachment 779558 [details]
Environment Bazel
Comment 8 John L. Poole 2022-05-19 14:55:33 UTC
Created attachment 779561 [details]
Eclass debug Bazel
Comment 9 Larry the Git Cow gentoo-dev 2024-02-24 12:52:40 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=937bb2fe50b5f938cca85d4a3b2ba55dbf71e617

commit 937bb2fe50b5f938cca85d4a3b2ba55dbf71e617
Author:     Jakov Smolić <jsmolic@gentoo.org>
AuthorDate: 2024-02-24 12:50:14 +0000
Commit:     Jakov Smolić <jsmolic@gentoo.org>
CommitDate: 2024-02-24 12:50:14 +0000

    dev-build/bazel: treeclean
    
    Bug: https://bugs.gentoo.org/878501
    Closes: https://bugs.gentoo.org/906914
    Closes: https://bugs.gentoo.org/917689
    Closes: https://bugs.gentoo.org/918703
    Closes: https://bugs.gentoo.org/634046
    Closes: https://bugs.gentoo.org/652776
    Closes: https://bugs.gentoo.org/687538
    Closes: https://bugs.gentoo.org/747370
    Closes: https://bugs.gentoo.org/766243
    Closes: https://bugs.gentoo.org/790116
    Closes: https://bugs.gentoo.org/820179
    Closes: https://bugs.gentoo.org/820182
    Closes: https://bugs.gentoo.org/832935
    Closes: https://bugs.gentoo.org/837023
    Closes: https://bugs.gentoo.org/846464
    Closes: https://bugs.gentoo.org/858314
    Closes: https://bugs.gentoo.org/867292
    Closes: https://bugs.gentoo.org/872455
    Closes: https://bugs.gentoo.org/884477
    Closes: https://bugs.gentoo.org/895300
    Closes: https://bugs.gentoo.org/909434
    Closes: https://bugs.gentoo.org/917257
    Closes: https://bugs.gentoo.org/919798
    Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>

 dev-build/bazel/Manifest                           |   7 --
 dev-build/bazel/bazel-3.7.2-r1.ebuild              | 117 ---------------------
 dev-build/bazel/bazel-4.2.2.ebuild                 | 100 ------------------
 dev-build/bazel/bazel-5.0.0.ebuild                 |  96 -----------------
 dev-build/bazel/bazel-5.1.1.ebuild                 |  96 -----------------
 dev-build/bazel/bazel-5.3.0.ebuild                 | 102 ------------------
 dev-build/bazel/bazel-6.2.0.ebuild                 | 102 ------------------
 dev-build/bazel/bazel-6.4.0.ebuild                 | 102 ------------------
 .../bazel-3.2.0-include-limits-for-gcc-11.patch    |  25 -----
 .../bazel-3.7.2-musl-temp-failure-retry.patch      |  34 ------
 .../files/bazel-4.2.2-absl_numeric_limits.patch    |  41 --------
 dev-build/bazel/metadata.xml                       |  20 ----
 profiles/package.mask                              |  15 ---
 profiles/updates/1Q-2024                           |   1 -
 14 files changed, 858 deletions(-)