Closed Bug 793052 Opened 7 years ago Closed 7 years ago

error: api-utils: TEST FAILED: test-content-worker.test:setTimeout are unregistered on content unload (failure)

Categories

(Add-on SDK Graveyard :: General, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: KWierso, Assigned: ochameau)

Details

Attachments

(1 file)

error: api-utils: TEST FAILED: test-content-worker.test:setTimeout are unregistered on content unload (failure)
error: api-utils: fail: New document has not been modified ("19" != "final")
info: api-utils: Traceback (most recent call last):
  File "resource://15ef7bf6-a513-43e4-b9e5-4690f024545f-at-jetpack/api-utils/lib/timer.js", line 32, in notify
    callback.apply(null, args);
  File "resource://15ef7bf6-a513-43e4-b9e5-4690f024545f-at-jetpack/api-utils/tests/test-content-worker.js", line 451, in null
    "New document has not been modified");
  File "resource://15ef7bf6-a513-43e4-b9e5-4690f024545f-at-jetpack/api-utils/lib/unit-test.js", line 168, in assertEqual
    this.fail(message);
  File "resource://15ef7bf6-a513-43e4-b9e5-4690f024545f-at-jetpack/api-utils/lib/unit-test.js", line 75, in fail
    this.console.trace();
error: api-utils: fail: Nor previous one ("19" != "final")
info: api-utils: Traceback (most recent call last):
  File "resource://15ef7bf6-a513-43e4-b9e5-4690f024545f-at-jetpack/api-utils/lib/timer.js", line 32, in notify
    callback.apply(null, args);
  File "resource://15ef7bf6-a513-43e4-b9e5-4690f024545f-at-jetpack/api-utils/tests/test-content-worker.js", line 453, in null
    "Nor previous one");
  File "resource://15ef7bf6-a513-43e4-b9e5-4690f024545f-at-jetpack/api-utils/lib/unit-test.js", line 168, in assertEqual
    this.fail(message);
  File "resource://15ef7bf6-a513-43e4-b9e5-4690f024545f-at-jetpack/api-utils/lib/unit-test.js", line 75, in fail
    this.console.trace();

This seems to be specific to Linux, showing up recently on Inbound.
https://tbpl.mozilla.org/php/getParsedLog.php?id=15394945&tree=Mozilla-Inbound&full=1

Okay, there goes the "specific to Linux" bit...

error: api-utils: TEST FAILED: test-content-worker.test:setTimeout are unregistered on content unload (failure)
error: api-utils: fail: New document has not been modified ("23" != "final")
info: api-utils: Traceback (most recent call last):
  File "resource://6a75080a-852a-49c2-af23-235ccff72e5e-at-jetpack/api-utils/lib/timer.js", line 32, in notify
    callback.apply(null, args);
  File "resource://6a75080a-852a-49c2-af23-235ccff72e5e-at-jetpack/api-utils/tests/test-content-worker.js", line 451, in null
    "New document has not been modified");
  File "resource://6a75080a-852a-49c2-af23-235ccff72e5e-at-jetpack/api-utils/lib/unit-test.js", line 168, in assertEqual
    this.fail(message);
  File "resource://6a75080a-852a-49c2-af23-235ccff72e5e-at-jetpack/api-utils/lib/unit-test.js", line 75, in fail
    this.console.trace();

Slightly different traceback, though...
(In reply to Wes Kocher (:KWierso) from comment #1)
> It first showed up when bug 792302 landed in
> https://hg.mozilla.org/integration/mozilla-inbound/rev/78ff52eb09d9

Hmm, really?  That would surprise me very much!
(In reply to Ehsan Akhgari [:ehsan] from comment #3)
> Hmm, really?  That would surprise me very much!

Yeah, it didn't look like something that would mess things up.

And it seems to be intermittent, as many of the pushes after it are all green. Maybe I just didn't catch it prior to bug 792302?
Attached file Pull request 587
Sorry Ehsan about this noise, it isn't due to bug 792302.
I most likely introduced a race condition through bug 766088.

Matteo, can you take a quick look at this in order to make our tree greener?
The issue was that setInterval/setTimeout with very low delay would fire between the pagehide event received by `pipe` object and the anonymous freezing function register with `chromeSetTimeout` (which is just a setTimeout method that can't be hacked by the content, nor the content script).
Assignee: nobody → poirot.alex
Attachment #664047 - Flags: review?(zer0)
Comment on attachment 664047 [details]
Pull request 587

looks good to me, if all test passes.
Attachment #664047 - Flags: review?(zer0) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/8689dbf072b6da44e3af8b46ff99b5313a9ce64a
Bug 793052: Fix a race in pagehide timers freezing.

https://github.com/mozilla/addon-sdk/commit/43553c8f5224e91a944763bbd29b9628b64a353b
Merge pull request #587 from ochameau/bug/793052

Bug 793052: Fix a race in pagehide timers freezing. r=@ZER0
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Wes, can you push this for 1.11?
Target Milestone: --- → 1.11
Commit pushed to stabilization at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/5381b78ceaa39a701b4dc04a7fc970b04763d93f
Bug 793052: Fix a race in pagehide timers freezing.
(cherry picked from commit 8689dbf072b6da44e3af8b46ff99b5313a9ce64a)
Landed an update to inbound to pick up this fix:
https://hg.mozilla.org/integration/mozilla-inbound/rev/702fd21579a5
No longer blocks: 792302
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://hg.mozilla.org/mozilla-central/rev/702fd21579a5
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.