Closed Bug 1649331 Opened 4 years ago Closed 4 years ago

toolkit.shutdown.fastShutdownStage should be 0 in ASan builds


(Core :: XPCOM, defect)




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


(Reporter: mccr8, Assigned: mccr8)




(Keywords: regression)


(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
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:

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
toolkit.shutdown.fastShutdownStage should be 0 in ASan builds. r=dthayer
Closed: 4 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.