Closed Bug 1176217 Opened 9 years ago Closed 9 years ago

TEST-UNEXPECTED-FAIL | toolkit/components/search/tests/xpcshell/test_sync_distribution.js | run_test - [run_test : 25] "bug645970" == "override"

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1176216

People

(Reporter: mkmelin, Unassigned)

References

Details

(Keywords: intermittent-failure)

05:12:02  WARNING -  TEST-UNEXPECTED-FAIL | toolkit/components/search/tests/xpcshell/test_async_distribution.js | search_initialized - [search_initialized : 29] "bug645970" == "override"
05:12:02     INFO -  /builds/slave/test/build/tests/xpcshell/tests/toolkit/components/search/tests/xpcshell/test_async_distribution.js:search_initialized:29
05:12:02     INFO -  resource://gre/components/nsSearchService.js:onSuccess:4308
05:12:02     INFO -  resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:Handler.prototype.process:920
05:12:02     INFO -  resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:this.PromiseWalker.walkerLoop:799
05:12:02     INFO -  resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:this.PromiseWalker.scheduleWalkerLoop/<:738
05:12:02     INFO -  null:null:0
05:12:02     INFO -  exiting test
05:12:02     INFO -  "CONSOLE_MESSAGE: (info) _init: Initing MozSearch plugin from chrome://testsearchplugin/locale/searchplugins/bug645970.xml"
05:12:02     INFO -  "CONSOLE_MESSAGE: (info) _addEngineToStore: Adding engine: "bug645970""
05:12:02     INFO -  "CONSOLE_MESSAGE: (info) _buildCache: Writing to cache file."
05:12:02     INFO -  "CONSOLE_MESSAGE: (info) _asyncInit: Completed _asyncInit"
05:12:02     INFO -  "CONSOLE_MESSAGE: (info) getEngines: getting all engines"
05:12:02     INFO -  "CONSOLE_MESSAGE: (info) _buildSortedEngineList: building list"
05:12:02     INFO -  "CONSOLE_MESSAGE: (info) getIsUS() fell back to a timezone check with the result=true"
05:12:02     INFO -  "CONSOLE_MESSAGE: (error) [JavaScript Error: "uncaught exception: 2147500036" {file: "resource://gre/components/nsSearchService.js" line: 4308}]"
05:12:02     INFO -  "CONSOLE_MESSAGE: (error) [JavaScript Error: "[Exception... "Abort'Abort' when calling method: [nsIBrowserSearchInitObserver::onInitComplete]"  nsresult: "0x80004004 (NS_ERROR_ABORT)"  location: "JS frame :: resource://gre/components/nsSearchService.js :: onSuccess :: line 4308"  data: no]" {file: "resource://gre/components/nsSearchService.js" line: 4310}]"
05:12:02     INFO -  <<<<<<<
05:12:02     INFO -  TEST-START | toolkit/components/search/tests/xpcshell/test_sync_distribution.js
05:12:03  WARNING -  TEST-UNEXPECTED-FAIL | toolkit/components/search/tests/xpcshell/test_sync_distribution.js | xpcshell return code: 0

http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2015/06/2015-06-18-03-02-03-comm-central/comm-central_ubuntu32_vm_test-xpcshell-bm01-tests1-linux32-build2.txt.gz

Maybe related: bug 1176216.
From bug 1109354.
Blocks: 1109354
Hi,

On a local test using full debug build of C-C TB,
I get a log like the following.
I think we may want to do fix these.


1. ReferenceError.

PROCESS | 10277 | JavaScript strict warning: file:///NREF-COMM-CENTRAL/objdir-tb3/dist/bin/components/nsSearchService.js, line 3497: ReferenceError: reference to undefined property cache.directories

My take on this. I have no idea where |cache| gets initialized during the test before the call to
  "_syncLoadEngines: function SRCH_SVC__syncLoadEngines() " where the error seems to be noticed.

In "_buildCache: function SRCH_SVC__buildCache() {", we explicitly set
|cache.directories = {}|.

Maybe in "init: function SRCH_SVC_init(observer) {"
when JSON file could not be loaded or empty, we set
|cache.directories = {}|?

2. There seems to be a timing issue.

Please note the message lines:
--- quote ---
"CONSOLE_MESSAGE: (error) [JavaScript Error: "DEPRECATION WARNING: Search service falling back to synchronous initialization. This is generally the consequence of an add-on using a deprecated search service API.
You may find more details about this deprecation at: https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning
file:///NREF-COMM-CENTRAL/objdir-tb3/dist/bin/components/nsSearchService.js 3257 SRCH_SVC__ensureInitialized
file:///NREF-COMM-CENTRAL/objdir-tb3/dist/bin/components/nsSearchService.js 4329 SRCH_SVC_getEngines
/NREF-COMM-CENTRAL/objdir-tb3/_tests/xpcshell/toolkit/components/search/tests/xpcshell/test_sync_distribution.js 16 run_test
/NREF-COMM-CENTRAL/comm-central/mozilla/testing/xpcshell/head.js 582 _execute_test
-e 1 null
null 0 null
" {file: "resource://gre/modules/Deprecated.jsm" line: 79}]"
"CONSOLE_MESSAGE: (info) Search service falling back to synchronous initialization. This is generally the consequence of an add-on using a deprecated search service API."
--- end quote


--- excerpt from the xpcshell-tests log
    ...
(xpcshell/head.js) | test MAIN run_test pending (1)
TEST-PASS | toolkit/components/search/tests/xpcshell/test_sync_distribution.js | run_test - [run_test : 8] true == true
TEST-PASS | toolkit/components/search/tests/xpcshell/test_sync_distribution.js | run_test - [run_test : 13] true == true
PROCESS | 10277 | *** Search: Search service falling back to synchronous initialization. This is generally the consequence of an add-on using a deprecated search service API.
PROCESS | 10277 | *** Search: metadata syncInit start
PROCESS | 10277 | *** Search: metadata syncInit: using an empty store
PROCESS | 10277 | *** Search: metadata syncInit end
PROCESS | 10277 | *** Search: _syncInit start
PROCESS | 10277 | *** Search: _syncLoadEngines: start
PROCESS | 10277 | *** Search: _findJAREngines: looking for engines in JARs
PROCESS | 10277 | JavaScript strict warning: file:///NREF-COMM-CENTRAL/objdir-tb3/dist/bin/components/nsSearchService.js, line 3497: ReferenceError: reference to undefined property cache.directories
PROCESS | 10277 | *** Search: _loadEngines: Absent or outdated cache. Loading engines from disk.
PROCESS | 10277 | *** Search: _loadFromChromeURLs: loading engine from chrome url: chrome://testsearchplugin/locale/searchplugins/bug645970.xml
PROCESS | 10277 | *** Search: _initFromURISync: Loading engine from: "chrome://testsearchplugin/locale/searchplugins/bug645970.xml".
PROCESS | 10277 | *** Search: _init: Initing MozSearch plugin from chrome://testsearchplugin/locale/searchplugins/bug645970.xml
PROCESS | 10277 | *** Search: _addEngineToStore: Adding engine: "bug645970"
PROCESS | 10277 | *** Search: _buildCache: Writing to cache file.
PROCESS | 10277 | *** Search: _syncInit end
PROCESS | 10277 | *** Search: getEngines: getting all engines
PROCESS | 10277 | *** Search: _buildSortedEngineList: building list
PROCESS | 10277 | *** Search: getIsUS() fell back to a timezone check with the result=false
PROCESS | 10277 | [10277] WARNING: GetDefaultCharsetForLocale: need to add multi locale support: file /NREF-COMM-CENTRAL/comm-central/mozilla/intl/locale/unix/nsUNIXCharset.cpp, line 101
TEST-PASS | toolkit/components/search/tests/xpcshell/test_sync_distribution.js | run_test - [run_test : 17] 1 == 1
TEST-PASS | toolkit/components/search/tests/xpcshell/test_sync_distribution.js | run_test - [run_test : 19] true == true
TEST-PASS | toolkit/components/search/tests/xpcshell/test_sync_distribution.js | run_test - [run_test : 22] {"QueryInterface":"function QueryInterface() {\\n	 [native code]\\n}","getSubmission":"function getSubmission() {\\n    [native c != null
TEST-UNEXPECTED-FAIL | toolkit/components/search/tests/xpcshell/test_sync_distribution.js | run_test - [run_test : 25] "bug645970" == "override"
/NREF-COMM-CENTRAL/objdir-tb3/_tests/xpcshell/toolkit/components/search/tests/xpcshell/test_sync_distribution.js:run_test:25
/NREF-COMM-CENTRAL/comm-central/mozilla/testing/xpcshell/head.js:_execute_test:582
-e:null:1
null:null:0
exiting test
"CONSOLE_MESSAGE: (error) [JavaScript Error: "DEPRECATION WARNING: Search service falling back to synchronous initialization. This is generally the consequence of an add-on using a deprecated search service API.
You may find more details about this deprecation at: https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning
file:///NREF-COMM-CENTRAL/objdir-tb3/dist/bin/components/nsSearchService.js 3257 SRCH_SVC__ensureInitialized
file:///NREF-COMM-CENTRAL/objdir-tb3/dist/bin/components/nsSearchService.js 4329 SRCH_SVC_getEngines
/NREF-COMM-CENTRAL/objdir-tb3/_tests/xpcshell/toolkit/components/search/tests/xpcshell/test_sync_distribution.js 16 run_test
/NREF-COMM-CENTRAL/comm-central/mozilla/testing/xpcshell/head.js 582 _execute_test
-e 1 null
null 0 null
" {file: "resource://gre/modules/Deprecated.jsm" line: 79}]"
"CONSOLE_MESSAGE: (info) Search service falling back to synchronous initialization. This is generally the consequence of an add-on using a deprecated search service API."
"CONSOLE_MESSAGE: (info) metadata syncInit start"
"CONSOLE_MESSAGE: (info) metadata syncInit: using an empty store"
"CONSOLE_MESSAGE: (info) metadata syncInit end"
"CONSOLE_MESSAGE: (info) _syncInit start"
"CONSOLE_MESSAGE: (info) _syncLoadEngines: start"
"CONSOLE_MESSAGE: (info) _findJAREngines: looking for engines in JARs"
"CONSOLE_MESSAGE: (warn) [JavaScript Warning: "ReferenceError: reference to undefined property cache.directories" {file: "file:///NREF-COMM-CENTRAL/objdir-tb3/dist/bin/components/nsSearchService.js" line: 3497}]"
"CONSOLE_MESSAGE: (info) _loadEngines: Absent or outdated cache. Loading engines from disk."
"CONSOLE_MESSAGE: (info) _loadFromChromeURLs: loading engine from chrome url: chrome://testsearchplugin/locale/searchplugins/bug645970.xml"
"CONSOLE_MESSAGE: (info) _initFromURISync: Loading engine from: "chrome://testsearchplugin/locale/searchplugins/bug645970.xml"."
"CONSOLE_MESSAGE: (info) _init: Initing MozSearch plugin from chrome://testsearchplugin/locale/searchplugins/bug645970.xml"
"CONSOLE_MESSAGE: (info) _addEngineToStore: Adding engine: "bug645970""
"CONSOLE_MESSAGE: (info) _buildCache: Writing to cache file."
"CONSOLE_MESSAGE: (info) _syncInit end"
"CONSOLE_MESSAGE: (info) getEngines: getting all engines"
"CONSOLE_MESSAGE: (info) _buildSortedEngineList: building list"
"CONSOLE_MESSAGE: (info) getIsUS() fell back to a timezone check with the result=false"
PROCESS | 10277 | [10277] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /NREF-COMM-CENTRAL/comm-central/mozilla/xpcom/base/nsTraceRefcnt.cpp, line 147
PROCESS | 10277 | [10277] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /NREF-COMM-CENTRAL/comm-central/mozilla/xpcom/base/nsTraceRefcnt.cpp, line 147
PROCESS | 10277 | nsStringStats
PROCESS | 10277 |  => mAllocCount:	     7156
  ...
---------

Hope this helps a bit.
The fix in bug 1176216 should also fix this.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.