Wednesday, August 12, 2015

Android emulator SNAFU: Eating 100% CPU when idle

Fresh from the "who could have expected Google to try that edge case?" list: the case of Android emulators eating 100% of the CPU when Idle on Linux.  It's very complex to reproduce:

  1. Start any Android emulator on any Ubuntu Linux machine
  2. Watch it eat 100% of a CPU core when doing nothing after bootup has completed
The issue is noted on a bug report where someone from Google looked at it 4 years ago to say "huh I can't make it happen".

The solution? Hope you don't need audio: run export QEMU_AUDIO_DRV=none ; then run your emulator.

SNAFU: Regularly used in Afghanistan, particularly if you speak to anyone who was working with the military. Situation Normal All F***ed Up.  Also highly applicable to many Android development situations it seems.

No comments:

Post a Comment