0

I build Android-4.0.4 for odroid-x on a lenovo x220 core i7 8GB of RAM running Linux Mint 12 (Ubuntu-11.10). I start 5 jobs to build, and after a while OOM triggers and kills dozen of processes until it kills the java processes started by my build, and feels happy with it. By happy, I mean Linux does not trigger OOM afterward. I have uploaded my dmesg after the process slaughter finished. First OOM kills my chrome tabs, but they are innocent since OOM still triggers after they've all been killed.

But even after they have all been killed, OOM still triggers and looks for someone else to sacrifice. It gets to the java processes started by my make command. It killed them one by one: CODE:

$ grep -i "kill process" dmesg.txt 
[181532.565512] Out of memory: Kill process 9161 (chromium-browse) score 305 or sacrifice child
[...]
[181560.198935] Out of memory: Kill process 7128 (chromium-browse) score 300 or sacrifice child
[181560.398301] Out of memory: Kill process 6823 (java) score 118 or sacrifice child
[181560.412076] Out of memory: Kill process 6855 (java) score 119 or sacrifice child
[181560.425394] Out of memory: Kill process 6859 (java) score 119 or sacrifice child

I described my issue on odroidx forum, but I fear it to be an environment issue. That's why I push a question in here. I have been building android from source with this computer for 6 months and never experienced such memory issues. In case it is useful, I use sun-java6:

$ dpkg --get-selections | grep java
java-common               
libhsqldb-java               
libjaxp1.3-java               
libreoffice-java-common            
libservlet2.5-java            
libxerces2-java               
plasma-scriptengine-javascript         
sun-java6-bin               
sun-java6-jdk               
sun-java6-jre               
sun-java6-plugin

$ uname -a
Linux xxx-ThinkPad-X220 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Has anyone experienced the same building android from source? What could be leaking in the java build?

m-ric
  • 221
  • 3
  • 8
  • 1
    If you're unhappy with the behavior of the OOM-Killer, disable it... – voretaq7 Nov 14 '12 at 21:35
  • Ahahah... I like your sense of humour. – m-ric Nov 14 '12 at 22:28
  • that was not a joke. The OOM killer is Bad Design, and violates the POSIX standard. Disable it, and the program that's requesting too much memory will die (when it can't get the RAM it wants) rather than this gang war drive-by collateral damage you're currently seeing. Then you can troubleshoot properly. – voretaq7 Nov 14 '12 at 22:32

1 Answers1

3

It's not abnormal. I had this discussion before with someone building custom Android distros. You will need a lot more memory than 8 GB. IIRC they used a 32 GB ram machine.

Lucas Kauffman
  • 16,818
  • 9
  • 57
  • 92
  • Well, _"I have been building android from source with this computer for 6 months and never experienced such memory issues"_. Also odroidx guys told me that: _"Well, I never experienced that on [odroidx-android] BSP 3.1. I'm downloading the BSP 3.4 to test and let you know"_ – m-ric Nov 14 '12 at 22:26
  • I've also been told: _My PC has 8GB as well and I havent saw the usage pass 4GB while building it_ – m-ric Nov 14 '12 at 22:38
  • 2
    @m-ric If it worked for you before and doesn't work now, *What Changed?* (obviously the answer isn't nothing, so work back through the changes and undo them until it works again :-) – voretaq7 Nov 14 '12 at 22:41
  • You're right to ask: the working android build comes from Google (official AOSP for pandaboard). The _presumably_ faulty android build comes from Hardkernel. Two separate source trees... I have to merge odroid-x stuff into my aosp repo anyway. Thanks :-) – m-ric Nov 14 '12 at 22:47