Closed Bug 1649331 Opened 2 years ago Closed 2 years ago

toolkit.shutdown.fastShutdownStage should be 0 in ASan builds

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- wontfix
firefox78 --- wontfix
firefox79 --- wontfix
firefox80 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

ASan builds do leak checking via LSan. This requires that they don't exit early. It looks like toolkit.shutdown.fastShutdownStage is set to 1 in those builds. As it is, if we start using fast shutdown in ASan builds, then we lose LSan leak checking.

NS_FREE_PERMANENT_DATA is set in both debug builds and ASan builds, so you could check for that instead of DEBUG. That's supposed to be set in any kind of build where we care about freeing everything at shutdown.

Assignee: nobody → continuation

We do leak checking in AddressSanitizer builds. This runs as processes exit,
so we can't exit early. NS_FREE_PERMANENT_DATA should be set in any kind of
build that cares about leak checking.

Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ade40e37fbff
toolkit.shutdown.fastShutdownStage should be 0 in ASan builds. r=dthayer

Andrew, I believe your changes in ade40e37fbff are causing some noisy failure lines like:
TEST-UNEXPECTED-FAIL | leakcheck | default missing output line for total leaks!

These can also be seen on green jobs so they are not causing any failures besides the failure line spam.

Here is a push range were I noticed the failures appearing on green and failed jobs:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&fromchange=c587c71cb1c8d0f2be35ad72a0e74e0984eb555a&searchStr=linux%2C18.04%2Cx64%2Cdebug%2Cmochitests%2Ctest-linux1804-64%2Fdebug-mochitest-plain-e10s-12%2Cm%2812%29

Could you please take a look to check if it is indeed caused by these changes?

Flags: needinfo?(continuation)

That's very peculiar. That error should turn the build orange. I'm not sure if there's a bug on file for that or not. I'm also not sure how much patch could cause that, but I'll take a look.

Ok, so mochitest 12 is orange, as it should be (maybe there's some other failure in there), but the other mochitest-plain are not, despite all of them having the failure. This was actually filed last year as bug 1591678. I'll poke that bug.

The peculiar thing is that this is in a debug build, and in theory debug builds should be completely identical. NS_FREE_PERMANENT_DATA must not be getting defined for DEBUG builds in this file. Maybe it is defined in a header somewhere and so it doesn't get included in whatever does the substitution for StaticPrefList.yaml. I should have checked that.

Flags: needinfo?(continuation)

I've asked a sheriff to back my patch out.

See Also: → 1591678
Flags: needinfo?(continuation)

I've confirmed locally that NS_FREE_PERMANENT_DATA is not defined in StaticPrefList.yaml. It looks like it is defined in nscore.h, so that makes sense. Maybe I'll just manually check for DEBUG and ASAN and not worry about whatever build system support would be needed for getting PERMANENT DATA working in the .yaml file.

Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4ea227a3e94f
toolkit.shutdown.fastShutdownStage should be 0 in ASan builds. r=dthayer
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.