Last Comment Bug 710494 - [SeaMonkey] xpcshell: "Couldn't report telemetry" warning. ("test_corrupt_database.js | 3 == 2". And 6 other gloda tests.)
: [SeaMonkey] xpcshell: "Couldn't report telemetry" warning. ("test_corrupt_dat...
Status: VERIFIED FIXED
[fixed by bug 710562] [perma-orange]
:
Product: MailNews Core
Classification: Components
Component: Database (show other bugs)
: Trunk
: All All
: -- major (vote)
: Thunderbird 12.0
Assigned To: Serge Gautherie (:sgautherie)
:
Mentors:
http://mxr.mozilla.org/comm-central/s...
Depends on: 710562
Blocks: SmTestFail 681873
  Show dependency treegraph
 
Reported: 2011-12-13 17:59 PST by Serge Gautherie (:sgautherie)
Modified: 2012-02-22 19:34 PST (History)
3 users (show)
bugzillamozillaorg_serge_20140323: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
wontfix
verified


Attachments

Description Serge Gautherie (:sgautherie) 2011-12-13 17:59:37 PST
Test code is:
{
135   // we expect 2 warnings
136   do_check_eq(countingAppender.getCountForLevel(Log4Moz.Level.Warn), 2);
}

Iiuc, SeaMonkey additional warning is:
{
2011-12-13 07:53:11	gloda.datastore	WARN	Couldn't report telemetry [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource:///modules/gloda/datastore.js :: gloda_ds_init :: line 988"  data: no]
}

***

Application code is:

http://mxr.mozilla.org/comm-central/source/mailnews/db/gloda/modules/datastore.js#983
{
984     // Report about the size of the database through telemetry (if there's a
985     // database, naturally).
986     if (dbFile.exists()) {
987       try {
988         let h = Services.telemetry.getHistogramById("THUNDERBIRD_GLODA_SIZE_MB");
989         h.add(dbFile.fileSize/1048576);
990       } catch (e) {
991         this._log.warn("Couldn't report telemetry", e);
992       }
993     }
}

http://mxr.mozilla.org/comm-central/source/mozilla/toolkit/components/telemetry/TelemetryHistograms.h#265
{
256 /**
257  * Thunderbird-specific telemetry.
258  */
259 #ifdef MOZ_THUNDERBIRD
260 HISTOGRAM(THUNDERBIRD_GLODA_SIZE_MB, 1, 1000, 40, LINEAR, "Gloda: size of global-messages-db.sqlite (MB)")
261 HISTOGRAM(THUNDERBIRD_CONVERSATIONS_TIME_TO_2ND_GLODA_QUERY_MS, 1, 10000, 30, EXPONENTIAL, "Conversations: time between the moment we click and the second gloda query returns (ms)")
262 HISTOGRAM(THUNDERBIRD_INDEXING_RATE_MSG_PER_S, 1, 100, 20, LINEAR, "Gloda: indexing rate (message/s)")
263 #endif
}

***

Unless SeaMonkey would be "ready" to have telemetry ported/enabled,
it looks like all telemetry code in MailNews Core should be |#ifdef MOZ_THUNDERBIRD|, especially as "variables" are named 'THUNDERBIRD_*'.

Or, if other applications rely on the try+catch, the test should accept this additional warning when not running Thunderbird.
Comment 1 Philip Chee 2011-12-13 19:08:08 PST
or change |this._log.warn()| to \this._log.debug()|
Comment 2 Mark Banner (:standard8) 2011-12-14 01:14:27 PST
The main issue here is the fact that we've got a MOZ_THUNDERBIRD ifdef in core - we shouldn't have those. I've just filed bug 710562 to handle that.
Comment 3 Serge Gautherie (:sgautherie) 2011-12-14 07:47:16 PST
6 other gloda tests are affected too:

test_index_bad_messages.js:
{
TEST-UNEXPECTED-FAIL | e:\builds\slave\test\build\xpcshell\tests\mailnews\db\gloda\test\unit\test_index_bad_messages.js | test failed (with xpcshell return code: 0), see following log:
...
TEST-UNEXPECTED-FAIL | resource:///modules/gloda/log4moz.js | 2011-12-14 00:06:25	gloda.indexer	WARN	Couldn't report telemetry [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource:///modules/gloda/indexer.js :: gloda_index_workBatch :: line 1190"  data: no] 17
}

test_index_compaction.js
test_index_messages_imap_offline.js
test_index_messages_imap_online.js
test_index_messages_imap_online_to_offline.js
test_index_messages_local.js
Comment 4 Serge Gautherie (:sgautherie) 2012-01-06 21:31:30 PST
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1325882627.1325885541.8536.gz
OS X 10.6 comm-central-trunk debug test xpcshell on 2012/01/06 12:43:47
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1325898427.1325903466.12883.gz
WINNT 5.2 comm-central-trunk debug test xpcshell on 2012/01/06 17:07:07

V.Fixed, by bug 710562.
Comment 5 Serge Gautherie (:sgautherie) 2012-02-22 19:34:35 PST
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Beta/1329961361.1329964007.21039.gz
OS X 10.6 comm-beta debug test xpcshell on 2012/02/22 17:42:41

seamonkey2.8: verified.

Note You need to log in before you can comment on or make changes to this bug.