Open Bug 1572201 Opened 6 years ago Updated 3 years ago

Assertion failures seem to not generate an assertion failure message on Android

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

People

(Reporter: ehsan.akhgari, Unassigned)

References

Details

For example this failure appears like a crash on Android but the same one on Linux appears like an assertion failure

logcat has an assertion in it, but no stack:

08-07 20:29:08.573 11108 11123 F MOZ_Assert: Assertion failure: aWindow || aChannel, at /builds/worker/workspace/build/src/toolkit/components/antitracking/StorageAccess.cpp:288

I think the "problem" here is that we don't mix the test log with the output of logcat. The .extra file does have a MozCrashReason=MOZ_ASSERT(aWindow || aChannel) annotation at least, so maybe we can pull that out when we process the .dmp.

I'm inclined to move this to testing as this is more of a test harness issue, but I suppose it could be a mfbt issue. It looks like we don't actually support dumping the stack in MOZ_ReportAssertionFailure on android.

ehsan, what behavior do you actually want here? Is having the assertion in logcat good enough?

Flags: needinfo?(ehsan)

Oh, interesting!

I think dumping this to logcat is probably a good idea, but I would really expect to see this message next to where the stack appears (which is stderr, right?) to be able to identify an assertion failure when looking at a log quickly.

Flags: needinfo?(ehsan)

(In reply to :Ehsan Akhgari from comment #2)

Oh, interesting!

I think dumping this to logcat is probably a good idea, but I would really expect to see this message next to where the stack appears (which is stderr, right?) to be able to identify an assertion failure when looking at a log quickly.

The stack in the test log that treeherder is parsing comes from mozcrash and is generated with minidump_stackwalk after the process crashes due to the assertion, it has no idea that there was an assertion at all. I think we have two issues here:

  1. It would be nice if treeherder could tell us this was a failed assertion rather than a crash. I think we'd need to modify mozcrash so that it parses annotations for that to happen.
  2. It would be nice if we dumped the stack in logcat on android as well. This would be an xpcom change to make a version of WalkTheStack that uses a writer function rather than a file stream. We'd need to update mfbt to use this function as well.
Depends on: 1572238
Depends on: 1572244

Thanks, that all makes sense!

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.