comm/mailnews/news/test/unit/test_nntpPost.js: JavaScript error: resource:///modules/NntpClient.jsm, line 198: InternalError: too much recursion
Categories
(MailNews Core :: Networking: NNTP, defect)
Tracking
(thunderbird_esr91 unaffected, thunderbird102 fixed)
| Tracking | Status | |
|---|---|---|
| thunderbird_esr91 | --- | unaffected |
| thunderbird102 | --- | fixed |
People
(Reporter: ishikawa, Assigned: rnons)
Details
Attachments
(2 files)
|
1.19 MB,
text/plain
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
wsmwk
:
approval-comm-beta+
|
Details | Review |
I am testing C-C TB with my local patch under Debian GNU/Linux on my local PC.
But I think this happens on all the architecture since this is JavaScript problem.
I have noticed "Too much recursion" error reported during the xpctest test suite run of FULL DEBUG version of C-C TB.
I am attaching the log from the single test. The log contains extra dump lines added locally.
(I passed |--verbose| and |--serialize| options to |mach xpcshell-test|
I see a problem:
- The test is reported to have succeeded despite this infinite recursion. So I have a doubt if the test really has succeeded.
- During the whole run of xpctest test suite, there WERE errors reported due to either timeout or something from this test.
The following is the excerpt from the log of tests under "comm/mailnews/news/test/unit"
excerpted by the following command:
egrep "(TEST_START:|Failed: |Passed: |comm/mailnews/news/test/unit/test_nntpPost.js)" log1442-xpcshell.txt
...
... [omission of test files and the errors due to recursion ]...
...
00:19.32 TEST_START: xpcshell.ini:comm/mailnews/news/test/unit/test_nntpUrl.js
00:19.57 TEST_START: xpcshell.ini:comm/mailnews/news/test/unit/test_server.js
00:20.14 TEST_START: xpcshell.ini:comm/mailnews/news/test/unit/test_uriParser.js
00:20.59 INFO INFO | Passed: 38
00:20.59 INFO INFO | Failed: 2
The verbose messages due to recursion make it difficult to figure out where the errors were, but I think they ARE related to the failures due to the recursion.
There are bunch of "Too much recursion" errors in bugzilla database.
Most of them seem to be related to JSON. stringify called during equality testing or printing.
e.g.
Bug 1667962
Bug 1635639
... the following is not fully investigated, but I suspect they could be due to the same root cause.
Bug 789779
cf. A bug report :
JSON.stringify can cause "too much recursion" involving ICAL.Time.fromData
https://github.com/mozilla-comm/ical.js/issues/410
"too much recursion" disappeared for a while last year. I had not seen it since late October last year until I noticed that it has appeared again in droves in March this year.
NntpClient.jsm line 198 certainly seems to try to print some data structure.
https://searchfox.org/comm-central/source/mailnews/news/src/NntpClient.jsm#198
/**
* Send a command to the socket.
* @param {string} str - The command string to send.
* @param {boolean} [suppressLogging=false] - Whether to suppress logging the str.
*/
_sendCommand(str, suppressLogging) {
if (this._socket.readyState !== "open") {
this._logger.warn( <=== line 198
`Failed to send "${str}" because socket state is ${this._socket.readyState}`
);
return;
}
| Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/c3ca7e31361e
Prevent infinite recursion when running test_nntpPost.js. r=mkmelin
| Assignee | ||
Comment 3•3 years ago
|
||
Comment on attachment 9279986 [details]
Bug 1771832 - Prevent infinite recursion when running test_nntpPost.js. r=mkmelin
[Approval Request Comment]
Regression caused by (bug #): bug 1707550
User impact if declined: no impact, affects test_nntpPost only
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): low
Comment 4•3 years ago
|
||
Comment on attachment 9279986 [details]
Bug 1771832 - Prevent infinite recursion when running test_nntpPost.js. r=mkmelin
[Triage Comment]
Approved for beta
Comment 5•3 years ago
|
||
| bugherder uplift | ||
Thunderbird 102.0b5:
https://hg.mozilla.org/releases/comm-beta/rev/8e89e580a19c
Description
•