Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10421

Emulator occasionally hangs indefinitely on startup

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Ubuntu 10.04, linux 2.6.32, Jenkins 1.421.
      Android SDK r10
    • Similar Issues:

      Description

      When starting up the emulator, adb shell getprop dev.bootcomplete will sometimes hang indefinitely. This will cause the entire job to hang. Below is a log w/ timestamps where I have a 15 minute build timeout kick in.
      Since adb is prone to hanging, every adb command (or at least these first ones) should have a watchdog thread killing them if they take too long.
      I'm guessing an adb disconnect/connect combo after the hanging command might be needed too.

      08:17:35 Building on master
      08:17:35 [android] Using Android SDK: /usr/local/android
      08:17:35 $ /usr/local/android/tools/emulator -snapshot-list -no-window -avd hudson_en-US_160_WVGA_android-4
      08:17:35 [android] Starting Android emulator from snapshot
      08:17:35 $ /usr/local/android/tools/emulator -no-boot-anim -ports 47225,56719 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_WVGA_android-4 -snapshot jenkins -no-snapshot-save -no-window
      08:17:35 emulator: warning: opening audio output failed
      08:17:35
      08:17:40 $ /usr/local/android/platform-tools/adb connect emu:47225,56719
      08:17:40 $ /usr/local/android/platform-tools/adb -s emulator-47225 logcat -v time
      08:17:40 [android] Waiting for emulator to finish booting...
      08:17:40 $ /usr/local/android/platform-tools/adb -s emulator-47225 shell getprop dev.bootcomplete
      08:32:35 Build timed out (after 15 minutes). Marking the build as aborted.
      08:32:35 [android] Interrupted while waiting for emulator to finish booting.
      08:32:35 [android] Timed-out after waiting 120 seconds for emulator
      08:32:35 [android] Stopping Android emulator
      08:32:35 [android] Archiving emulator log
      08:32:35 Notifying upstream projects of job completion
      08:32:35 Finished: NOT_BUILT

        Attachments

          Activity

          jorgenpt Jørgen Tjernø created issue -
          jorgenpt Jørgen Tjernø made changes -
          Field Original Value New Value
          Description When starting up the emulator, {{adb shell getprop dev.bootcomplete}} will sometimes hang indefinitely. This will cause the entire job to hang.
          The below log lacks timestamps, so it's not visible, but the execution took over 30 minutes before I aborted the job, at which point it told me it had timed out after 120 seconds. Since adb is prone to hanging, every adb command (or at least these first ones) should have a watchdog thread killing them if they take too long.
          I'm guessing an adb disconnect/connect combo after the hanging command might be needed too.

          {quote}[android] Using Android SDK: /usr/local/android
          $ /usr/local/android/tools/emulator -snapshot-list -no-window -avd hudson_en-US_160_WVGA_android-4
          [android] Starting Android emulator from snapshot
          $ /usr/local/android/tools/emulator -no-boot-anim -ports 49280,42013 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_WVGA_android-4 -snapshot jenkins -no-snapshot-save -no-window
          emulator: warning: opening audio output failed

          $ /usr/local/android/platform-tools/adb connect emu:49280,42013
          $ /usr/local/android/platform-tools/adb -s emulator-49280 logcat -v time
          [android] Waiting for emulator to finish booting...
          $ /usr/local/android/platform-tools/adb -s emulator-49280 shell getprop dev.bootcomplete
          [android] Interrupted while waiting for emulator to finish booting.
          [android] Timed-out after waiting 120 seconds for emulator
          [android] Stopping Android emulator
          [android] Archiving emulator log
          Notifying upstream projects of job completion
          Finished: NOT_BUILT{quote}
          When starting up the emulator, {{adb shell getprop dev.bootcomplete}} will sometimes hang indefinitely. This will cause the entire job to hang. Below is a log w/ timestamps where I have a 15 minute build timeout kick in.
          Since adb is prone to hanging, every adb command (or at least these first ones) should have a watchdog thread killing them if they take too long.
          I'm guessing an adb disconnect/connect combo after the hanging command might be needed too.

          {quote}08:17:35 Building on master
          08:17:35 [android] Using Android SDK: /usr/local/android
          08:17:35 $ /usr/local/android/tools/emulator -snapshot-list -no-window -avd hudson_en-US_160_WVGA_android-4
          08:17:35 [android] Starting Android emulator from snapshot
          08:17:35 $ /usr/local/android/tools/emulator -no-boot-anim -ports 47225,56719 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_WVGA_android-4 -snapshot jenkins -no-snapshot-save -no-window
          08:17:35 emulator: warning: opening audio output failed
          08:17:35
          08:17:40 $ /usr/local/android/platform-tools/adb connect emu:47225,56719
          08:17:40 $ /usr/local/android/platform-tools/adb -s emulator-47225 logcat -v time
          08:17:40 [android] Waiting for emulator to finish booting...
          08:17:40 $ /usr/local/android/platform-tools/adb -s emulator-47225 shell getprop dev.bootcomplete
          08:32:35 Build timed out (after 15 minutes). Marking the build as aborted.
          08:32:35 [android] Interrupted while waiting for emulator to finish booting.
          08:32:35 [android] Timed-out after waiting 120 seconds for emulator
          08:32:35 [android] Stopping Android emulator
          08:32:35 [android] Archiving emulator log
          08:32:35 Notifying upstream projects of job completion
          08:32:35 Finished: NOT_BUILT{quote}
          jorgenpt Jørgen Tjernø made changes -
          scm_issue_link SCM/JIRA link daemon made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          orrc Christopher Orr made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 140613 ] JNJira + In-Review [ 205235 ]

            People

            • Assignee:
              orrc Christopher Orr
              Reporter:
              jorgenpt Jørgen Tjernø
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: