Open Bug 903136 Opened 7 years ago Updated 1 year ago

ANR in broadcasting HealthReportUploadStartReceiver intent

Categories

(Firefox for Android :: General, defect)

ARM
Android
defect
Not set

Tracking

()

People

(Reporter: liuche, Unassigned)

References

Details

Attachments

(1 file)

Attached file ANR traces
Saw this error in my logcat after a Fennec ANR. See attachment for ANR traces. This is on a developer build of Fennec, around 8/8.

--

08-08 10:43:11.660: E/ActivityManager(418): ANR in org.mozilla.fennec_liuche
08-08 10:43:11.660: E/ActivityManager(418): Reason: Broadcast of Intent { act=upload flg=0x14 cmp=org.mozilla.fennec_liuche/org.mozilla.gecko.background.healthreport.upload.HealthReportUploadStartReceiver (has extras) }
08-08 10:43:11.660: E/ActivityManager(418): Load: 0.15 / 0.16 / 0.68
08-08 10:43:11.660: E/ActivityManager(418): CPU usage from 55074ms to 0ms ago:
08-08 10:43:11.660: E/ActivityManager(418):   0% 418/system_server: 0% user + 0% kernel / faults: 54 minor 5 major
08-08 10:43:11.660: E/ActivityManager(418):   0% 96/dhd_dpc: 0% user + 0% kernel
08-08 10:43:11.660: E/ActivityManager(418):   0% 128/surfaceflinger: 0% user + 0% kernel
08-08 10:43:11.660: E/ActivityManager(418):   0% 11329/kworker/0:1: 0% user + 0% kernel
08-08 10:43:11.660: E/ActivityManager(418):   0% 22/kinteractiveup: 0% user + 0% kernel
08-08 10:43:11.660: E/ActivityManager(418):   0% 87/mmcqd/0: 0% user + 0% kernel
08-08 10:43:11.660: E/ActivityManager(418):   0% 5892/com.google.process.gapps: 0% user + 0% kernel
08-08 10:43:11.660: E/ActivityManager(418):   0% 29170/wpa_supplicant: 0% user + 0% kernel
08-08 10:43:11.660: E/ActivityManager(418):  +0% 15769/<pre-initialized>: 0% user + 0% kernel
08-08 10:43:11.660: E/ActivityManager(418): 0.1% TOTAL: 0% user + 0% kernel + 0% iowait
08-08 10:43:11.660: E/ActivityManager(418): CPU usage from 1532ms to 2063ms later:
08-08 10:43:11.660: E/ActivityManager(418):   7.5% 418/system_server: 5.6% user + 1.8% kernel
08-08 10:43:11.660: E/ActivityManager(418):     7.5% 434/ActivityManager: 5.6% user + 1.8% kernel
08-08 10:43:11.660: E/ActivityManager(418): 2% TOTAL: 0% user + 2% kernel
I should note that this doesn't make sense :P

We'd get an ANR in this situation if HealthReportUploadStartReceiver.onReceive took more than 10s.

This is the entirety of that method:

  @Override
  public void onReceive(Context context, Intent intent) {
    if (HealthReportConstants.UPLOAD_FEATURE_DISABLED) {
      Logger.debug(LOG_TAG, "Health report upload feature is compile-time disabled; not starting background upload service.");
      return;
    }

    Logger.debug(LOG_TAG, "Health report upload feature is compile-time enabled; starting background upload service.");
    Intent service = new Intent(context, HealthReportUploadService.class);
    service.setAction(intent.getAction());
    service.putExtras(intent); // profileName, profilePath, uploadEnabled are in the extras.
    context.startService(service);
  }

Fishy.
There's no "main" thread in the ANR traces. I suspect the thread got terminated somehow, and as a result the intent timed out because there's no main thread to process the intent.
I saw this one time when an eideticker profiling run failed, but it sounds like that might be a symptom of the problems we were seeing (filed as bug 903011), rather than a cause.
See Also: → 903011
You need to log in before you can comment on or make changes to this bug.