Use the generic MOZ_SHUTDOWN_CHECKS instead of XPCOM_CC_RUN_DURING_SHUTDOWN

RESOLVED WONTFIX

Status

()

RESOLVED WONTFIX
6 years ago
6 years ago

People

(Reporter: espindola, Assigned: espindola)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 712913 [details] [diff] [review]
patch

I added support for the environment variable MOZ_SHUTDOWN_CHECKS. Currently it is used to report open sql connections. It will also be used to decide if late writes should crash, be reported or ignored.

I was wondering if it would make sense to also use it for deciding if we should run the last cc or not.
Attachment #712913 - Flags: review?(bugs)

Comment 1

6 years ago
Comment on attachment 712913 [details] [diff] [review]
patch

We must run CC always in debug builds.
Looks like ShutdownChecks is initialized to non-SCM_NOTHING value in
DEBUG mode so that should be ok.
But doesn't this end up forcing CCs always in nightly opt builds?
the value seems to be SCM_RECORD there by default.
We don't want nightlies behave so differently.

(ShutdownChecks seems to be some sort of global variable, so it should be
 named to be such.)
Attachment #712913 - Flags: review?(bugs) → review-
> We must run CC always in debug builds.
> Looks like ShutdownChecks is initialized to non-SCM_NOTHING value in
> DEBUG mode so that should be ok.

Check.

> But doesn't this end up forcing CCs always in nightly opt builds?
> the value seems to be SCM_RECORD there by default.
> We don't want nightlies behave so differently.

OK, so yes, this is not the correct switch to use. For nightlies we want them to do a "long" shutdown and report any late writes via telemetry. Aurora, Beta and release will just call exit(0) early.

> (ShutdownChecks seems to be some sort of global variable, so it should be
>  named to be such.)

Should have a 'g' prefix?

Comment 3

6 years ago
(In reply to Rafael Ávila de Espíndola (:espindola) from comment #2)
> OK, so yes, this is not the correct switch to use. For nightlies we want
> them to do a "long" shutdown and report any late writes via telemetry.
> Aurora, Beta and release will just call exit(0) early.
Oh. Somewhat surprising to run so different stuff in nightlies than in aurora/beta/release.


> Should have a 'g' prefix?
yes
Closing per comment 1.
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.