jack server out of memory error

629 views
Skip to first unread message

BNP

unread,
Apr 28, 2018, 11:12:40 AM4/28/18
to Android Building
getting error
[ 76% 73718/96434] Building with Jack:...k_intermediates/with-local/classes.dex
FAILED: /home/barin/Desktop/lineage/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex 
/bin/bash /home/barin/Desktop/lineage/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex.rsp
Out of memory error (version 1.3-rc7 'Douarn' (445000 d7be3910514558d6715ce455ce0861ae2f56925a by android-...@google.com)).
GC overhead limit exceeded.
Try increasing heap size with java option '-Xmx<size>'.
Warning: This may have produced partial or corrupted output.
[ 76% 73723/96434] //art/runtime:libar...clang++ gc/allocator/rosalloc.cc [arm]
ninja: build stopped: subcommand failed.
08:25:37 ninja failed with: exit status 1

tried several times after changing
VM_arguments in .prebuilt/tools/sdk/jack-server-setup.mk file as well as in ~/home/.jack-server/config.prperties
made 4GB, 2GB. 
max service reducesd to 1.
still error not removed.

I have attached jack-report for your ready reference.

My machine has only 8GB ram. Is it because of that ??
Can it be solved ??

Anyone please help.
config.properties
report.14355.txt
jack-server-0-0.log

Yogi nit

unread,
May 15, 2018, 11:23:55 AM5/15/18
to Android Building
Well I have been compiling roms on 4gb system with 8gb swap.
I also had problem with jack.
So before compiling do this
As you said you have decreased service to 1, so it's fine.
then
# Stop the jack server if running
jack-admin stop-server
# If you are starting jack manually then

JACK_SERVER_VM_ARGUMENTS="-Xmx2g -Dfile.encoding=UTF-8 -XX:+TieredCompilation" /path/to/jack-admin start-server


#If you use the jack server in the android tree then

export ANDROID_JACK_VM_ARGS="-Xmx2g -Dfile.encoding=UTF-8 -XX:+TieredCompilation

If this doesn't work change the -Xmx2g to -Xmx4g, increase it if it doesn't work

Glenn Kasten

unread,
May 15, 2018, 11:26:25 AM5/15/18
to Android Building
See https://source.android.com/setup/build/requirements#hardware-requirements
The RAM/swap listed there is the bare minimum.  I recommend even more.

Ravishankar S

unread,
May 27, 2021, 2:26:35 PM5/27/21
to Android Building
Please use the solution provided here:


It worked for me. I used m -j1 to be on the safer side.
Reply all
Reply to author
Forward
0 new messages