Closed Bug 1447589 Opened 6 years ago Closed 6 years ago

Linux debug builds broken 2018-03-20: ../testing/xpcshell/selftest.py::XPCShellTestsTests::testAddTaskSkip TEST-UNEXPECTED-FAIL and many more

Categories

(Thunderbird :: Build Config, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1447189

People

(Reporter: jorgk-bmo, Unassigned)

Details

"%s: 0x%p FATAL ERROR\n", logname, lr, 0 );
../testing/xpcshell/selftest.py::XPCShellTestsTests::testAddTaskSkip TEST-UNEXPECTED-FAIL
../testing/xpcshell/selftest.py::XPCShellTestsTests::testAddTaskSkipAll TEST-UNEXPECTED-FAIL
../testing/xpcshell/selftest.py::XPCShellTestsTests::testAddTaskStackTrace TEST-UNEXPECTED-FAIL
../testing/xpcshell/selftest.py::XPCShellTestsTests::testAddTaskTestMultiple TEST-UNEXPECTED-FAIL

First seen: Tue, Mar 20, 2018, 00:56:37
https://treeherder.mozilla.org/#/jobs?repo=comm-central&revision=2dc101e7eddc3ebfc0e470f4d4a53b40cefff464

M-C last good: 0b997836c7cf258a2b821eaa1c1ee66b92
M-C first bad: bfb7edfd0436db388bb9e103b8ad817fc5
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=0b997836c7cf258a2b821eaa1c1ee66b92&tochange=bfb7edfd0436db388bb9e103b8ad817fc5

Log
https://taskcluster-artifacts.net/fBLGOPlmTcu97MdUZxMxcw/0/public/logs/live_backing.log
says

Assertion failure: aDefaultLocale.IsEmpty() || Locale(aDefaultLocale).IsValid() (If specified, default locale must be a valid BCP47 language tag.), at /builds/worker/workspace/build/src/intl/locale/LocaleService.cpp:516

That error appeard 47 times in the log.

Searching the list of changesets for "locale" I see bug 1345957 and bug 1446976.

Zibi, are you aware of any changes here?
Flags: needinfo?(philipp)
Flags: needinfo?(mozilla)
Flags: needinfo?(gandalf)
My guess is bug 1345957.

What the assertion says is that some code is trying to pass a default locale which is not a valid BCP47 language tag.

The real stack is:

```
[task 2018-03-20T00:30:48.821Z] 00:30:48     INFO - E   PID 12094 | Assertion failure: aDefaultLocale.IsEmpty() || Locale(aDefaultLocale).IsValid() (If specified, default locale must be a valid BCP47 language tag.), at /builds/worker/workspace/build/src/intl/locale/LocaleService.cpp:516
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #01: mozilla::intl::LocaleService::NegotiateLanguages [intl/locale/LocaleService.cpp:515]
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #02: mozilla::intl::LocaleService::NegotiateAppLocales [xpcom/ds/nsTArray.h:2322]
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #03: mozilla::intl::LocaleService::NegotiateAppLocales [intl/locale/LocaleService.cpp:148]
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #04: mozilla::intl::LocaleService::GetAppLocaleAsLangTag [intl/locale/LocaleService.cpp:750]
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #05: nsChromeRegistryChrome::ChromePackageFromPackageEntry [chrome/nsChromeRegistryChrome.cpp:408]
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #06: nsChromeRegistryChrome::ManifestContent [chrome/nsChromeRegistryChrome.cpp:691]
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #07: ParseManifest [xpcom/components/ManifestParser.cpp:734]
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #08: DoRegisterManifest [xpcom/string/nsTSubstring.h:77]
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #09: nsComponentManagerImpl::ManifestManifest [xpcom/components/nsComponentManager.cpp:565]
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #10: ParseManifest [xpcom/components/ManifestParser.cpp:743]
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #11: DoRegisterManifest [xpcom/string/nsTSubstring.h:77]
[task 2018-03-20T00:30:48.822Z] 00:30:48     INFO - E   PID 12094 | #12: nsComponentManagerImpl::RereadChromeManifests [xpcom/components/nsComponentManager.cpp:716]
[task 2018-03-20T00:30:48.823Z] 00:30:48     INFO - E   PID 12094 | #13: nsComponentManagerImpl::Init [xpcom/components/nsComponentManager.cpp:345]
[task 2018-03-20T00:30:48.823Z] 00:30:48     INFO - E   PID 12094 | #14: NS_InitXPCOM2 [xpcom/build/XPCOMInit.cpp:677]
[task 2018-03-20T00:30:48.823Z] 00:30:48     INFO - E   PID 12094 | #15: XRE_XPCShellMain [js/xpconnect/src/XPCShellImpl.cpp:1222]
[task 2018-03-20T00:30:48.823Z] 00:30:48     INFO - E   PID 12094 | #16: main [js/xpconnect/shell/xpcshell.cpp:73]
[task 2018-03-20T00:30:48.823Z] 00:30:48     INFO - E   PID 12094 | #17: libc.so.6 + 0x16e16
```

which is a little misleading because it looks like it is coming from chrome registry, but in reality it seems that chrome registry is just asking LocaleService for AppLocaleAsLangTag.
Since it is either the first piece of code to ask, or some invalidation happened the LocaleService is renegotiating using https://searchfox.org/mozilla-central/source/intl/locale/LocaleService.cpp#152 and somehow getting an invalid locale.

This is weird because we should have thrown here as well - https://searchfox.org/mozilla-central/source/intl/locale/LocaleService.cpp#701 if it was invalid.

Can you printf the aDefaultLocale right before this line:
```
  MOZ_ASSERT(aDefaultLocale.IsEmpty() || Locale(aDefaultLocale).IsValid(),
    "If specified, default locale must be a valid BCP47 language tag.");
```

and also verify that in line 152 its the same locale string?

I'm ok backing out the patch if it'll become a major issue, but would like to understand how an invalid locale becomes a default in this case because it may mean that there's a hidden bug that this assertion discovered.
Flags: needinfo?(gandalf)
OK, I'll have to do a try run with the debug you requested. This only fails on Linux, and in the debug build it asserts.
Flags: needinfo?(philipp)
Flags: needinfo?(mozilla)
Flags: needinfo?(jorgk)
This should do it. We have a funny way to push to C-C's try with M-C patches included. I've added the Xpcshell for my own purposes, but that was foolish since the build will already fail. Never mind. I'll check this in an hour or so.

https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=a523437c3b44064a2b7073e805f2009174cfe079
Flags: needinfo?(jorgk)
If you look at the try, the TaskCluster build failed as before, but buildbot surprisingly passed. Not that the debug patch was only applied in the buildbot run, to attach M-C patches to TaskCluster tries, another technique is needed.

Log:
https://archive.mozilla.org/pub/thunderbird/try-builds/mozilla@jorgk.com-a523437c3b44064a2b7073e805f2009174cfe079/try-comm-central-linux64-debug/try-comm-central-linux64-debug-bm78-try1-build0.txt.gz
testAddTaskSkip apparently passed, and my debug can't be found in the log.

So I have no idea what's going on.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
See Also: 1447189
You need to log in before you can comment on or make changes to this bug.