New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 803493 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Defect


Previous locations:
monorail:3414


Sign in to add a comment

//build/android/generate_gradle.py should use autoninja

Reported by hvostik....@gmail.com, Jan 18 2018

Issue description

I`m  already checked out chromium sources, build APK using ninja.
Now I`m trying to generate project for Android Studio using build/generate_gradle.py script. It took 16GB (100%) of my RAM and continuing using SWAP which also tool 100% of 16GB. Seems like a bug in the script, memory is full and progress of generating (like [100/16000]) does not move. So this script as I think doesnt free memory after generating every file for Android Studio project.

 
I meant build/android/gradle/generate_gradle.py script path
Project: chromium
Moved issue monorail:3414 to now be issue chromium:803493.
Cc: wnwen@chromium.org agrieve@chromium.org
Components: Build
Labels: -Priority-Medium OS-Android Pri-2
CC'ing OWNERS for thoughts here.

Comment 4 by agrieve@google.com, Jan 18 2018

The majority of what the script does is build things via ninja. You might try running with --verbose and seeing which targets are being built. Maybe building them first not via the script would go better?
Already did it with "verbose" flag. It shows just progress like [125/16000]  ACTION/STAMP/CXX whatever. Also built target APK before running this script. 

Comment 6 by agrieve@google.com, Jan 18 2018

Another thing to try: pass --target //chrome/android:chrome_public_apk

That will have it generated fewer targets (assuming you mainly care about the main apk)

Comment 7 by wnwen@chromium.org, Jan 18 2018

Unfortunately it's a known issue, see  issue 799954 
I've found a solution.
The problem is the ninja j parameter, the thread count has been set to 1000.
Just set the parameter to 50 in the script and it will work. 

https://groups.google.com/a/chromium.org/d/msg/chromium-dev/NW8MdjXy5yI/1YncKHUlBQAJ
Status: Untriaged (was: New)
Issue moved from a project with a different set of status labels. "New" is not a supported status in /p/chromium, so these ended up in a black-hole.
Labels: DevX
Status: Available (was: Untriaged)
Summary: //build/android/generate_gradle.py should use autoninja (was: Script from /build/generate_gradle.py took 100% of RAM and SWAP)
I believe the proper fix here is to make it use autoninja.
Labels: QuickFix

Sign in to add a comment