timers: use consistent checks for canceled timers #9685

Merged
merged 1 commit into from Nov 22, 2016

Projects

None yet

6 participants

@Fishrock123
Member
Fishrock123 commented Nov 18, 2016 edited
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

timers

Description of change

Previously not all codepaths set timer._idleTimeout = -1 for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: #9606
Fixes: #9561

I think the problem originated from or became more apparent after c8c2544

CI: https://ci.nodejs.org/job/node-test-pull-request/4898/

cc @cjihrig, @misterdjules, @watson

(This patch was made live during https://www.twitch.tv/nodesource/v/101846332 if you'd like to see me working on this in retrospect. :P)

@Fishrock123 Fishrock123 added the timers label Nov 18, 2016
+
+const keepOpen = setTimeout(() => {
+ common.fail('Test timed out.');
+}, common.platformTimeout(500)); // Keep event loop open.
@Trott
Trott Nov 19, 2016 edited Member

I would much prefer this just keep the event loop open indefinitely and not throw:

const keepOpen = setInterval(() => {}, 9999);

(Would need to change clearTimeout() below to clearInterval().)

EDIT: Meh, forget indefinitely, better for just one tick, see below.

@nodejs/testing

@Fishrock123
Fishrock123 Nov 19, 2016 Member

@Trott I'm not clear on what benefit that would have, could you elaborate?

All the unref timers are guaranteed to fire before this, it could be just 2ms theoretically in that respect, but we do need to actually keep it open long enough for the 1ms timeouts to happen twice IIRC.

@Trott
Trott Nov 19, 2016 Member

All the unref timers are guaranteed to fire before this,

No, they are not. On a sufficiently heavily loaded machine, they will fail to fire before the common.fail(). If recent history is any guide, this test will be flaky on FreeBSD in CI.

Try this to see it fail (unless you have an absurdly well-provisioned machine):

tools/test.py -j 96 parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-intervalparallel/test-timers-unenroll-unref-interval parallel/test-timers-unenroll-unref-interval 
@Trott
Trott Nov 20, 2016 Member

I guess I'll also add/clarify that even If it seems like I'm being ridiculous and this will never ever cause problems itself, arbitrary-length timeouts in tests are a bit of an anti-pattern that have bitten us over and over. So even if it's just to set a good example for other people writing tests, it's good (IMO) to remove arbitrary-length timers.

@Trott
Trott Nov 20, 2016 Member

(And last: I don't object to this landing as-is.)

@Fishrock123
Fishrock123 Nov 21, 2016 Member

No, they are not.

They are queued in a binary heap within libuv. I am very certain that I am correct.

I guess I'll also add/clarify that even If it seems like I'm being ridiculous and this will never ever cause problems itself, arbitrary-length timeouts in tests are a bit of an anti-pattern that have bitten us over and over.

I am well aware. (... do you really think that I am/was not?)

arbitrary-length

That is why I suggested what I did in my last comment. It may be valuable for you to try to understand how timers work given you appear to feel so strongly about them...?

@Fishrock123
Fishrock123 Nov 21, 2016 Member

Try this to see it fail

I think you've probably been going at this problem wrong then. If this fails (which it does... but only at more than 3x the load on my machine) then there is a very bad ordering bug in the timers impl when under load.

@Trott
Trott Nov 21, 2016 Member

That is why I suggested what I did in my last comment.

Which suggestion was that?

@Trott
Trott Nov 21, 2016 edited Member

then there is a very bad ordering bug in the timers impl when under load.

I don't think that's the correct interpretation.

If load is sufficient, the initial setTimeout() callback will fire on the same tick as all the setIntervals() callbacks (although after they run). The setImmediate() callbacks set inside the intervals will happen on the next tick, after the setTimeout() callback has thrown an error.

@Trott
Trott Nov 21, 2016 Member

All the unref timers are guaranteed to fire before this,

No, they are not.

Clarification: Yes, the unref'ed intervals will fire before the timer. However, the test will still fail if the immediates wrapped inside the unref'ed intervals don't fire before the timer, and that's what's not guaranteed.

@Fishrock123
Fishrock123 Nov 21, 2016 Member

I don't think that's the correct interpretation.

Would it help if I set up a meeting with you to explain what actually happens with timers and why I am asserting that would be broken behavior?

Clarification: Yes, the unref'ed intervals will fire before the timer. However, the test will still fail if the immediates wrapped inside the unref'ed intervals don't fire before the timer, and that's what's not guaranteed.

Thanks, I'll fix this so that it more precisely relies on the event loop specifics.

@Trott
Trott Nov 21, 2016 edited Member

Thanks, I'll fix this so that it more precisely relies on the event loop specifics.

Here's what I'd propose, FWIW:

'use strict';

const common = require('../common');
const timers = require('timers');

setImmediate(common.mustCall(() => {})); // Keep event loop open for one tick.

{
  const interval = setInterval(common.mustCall(() => {
    clearTimeout(interval);
    setImmediate(common.mustCall(() => {}));
  }), 1).unref();
}

{
  const interval = setInterval(common.mustCall(() => {
    interval.close();
    setImmediate(common.mustCall(() => {}));
  }), 1).unref();
}

{
  const interval = setInterval(common.mustCall(() => {
    timers.unenroll(interval);
    setImmediate(common.mustCall(() => {}));
  }), 1).unref();
}

{
  const interval = setInterval(common.mustCall(() => {
    interval._idleTimeout = -1;
    setImmediate(common.mustCall(() => {}));
  }), 1).unref();
}

{
  const interval = setInterval(common.mustCall(() => {
    interval._onTimeout = null;
    setImmediate(common.mustCall(() => {}));
  }), 1).unref();
}
@watson
Member
watson commented Nov 19, 2016

Thanks @Fishrock123 😍 And I'm on Twich! (sort of) I made it to the big times 😜

@Fishrock123 Fishrock123 added a commit to Fishrock123/node that referenced this pull request Nov 21, 2016
@Fishrock123 Fishrock123 timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: nodejs#9606
Fixes: nodejs#9561
PR-URL: nodejs#9685
11bb6f2
@Fishrock123
Member

Updated. I ran it under much more extreme load without issue. (Almost 1k at 1k parallization.)

New CI: https://ci.nodejs.org/job/node-test-pull-request/4926/console

@Trott could you please read the comment in the test and let me know if it makes sense?

@Fishrock123 Fishrock123 added a commit to Fishrock123/node that referenced this pull request Nov 21, 2016
@Fishrock123 Fishrock123 timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: nodejs#9606
Fixes: nodejs#9561
PR-URL: nodejs#9685
a89a08f
@Fishrock123
Member

Updated with an extra comment link, CI again: https://ci.nodejs.org/job/node-test-pull-request/4927/

@Trott
Member
Trott commented Nov 21, 2016 edited

@Trott could you please read the comment in the test and let me know if it makes sense?

Comment and test LGTM (assuming no issues discovered in CI, of course).

+// than the previous timeouts, unrefed or not.
+//
+// Keep the event loop alive for one timeout and then
+// another. Any problems will ocurr when the second
@Trott
Trott Nov 21, 2016 Member

Nit: occur

@Fishrock123 Fishrock123 added a commit to Fishrock123/node that referenced this pull request Nov 22, 2016
@Fishrock123 Fishrock123 timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: nodejs#9606
Fixes: nodejs#9561
PR-URL: nodejs#9685
55efbfe
@Fishrock123 Fishrock123 added a commit to Fishrock123/node that referenced this pull request Nov 22, 2016
@Fishrock123 Fishrock123 timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: nodejs#9606
Fixes: nodejs#9561
PR-URL: nodejs#9685
Reviewed-By: Rich Trott <rtrott@gmail.com>
98fea5b
@Fishrock123 Fishrock123 timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: nodejs#9606
Fixes: nodejs#9561
PR-URL: nodejs#9685
Reviewed-By: Rich Trott <rtrott@gmail.com>
3f1e38c
@Fishrock123 Fishrock123 merged commit 3f1e38c into nodejs:master Nov 22, 2016
@Fishrock123 Fishrock123 added a commit that referenced this pull request Nov 22, 2016
@Fishrock123 Fishrock123 timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: #9606
Fixes: #9561
PR-URL: #9685
Reviewed-By: Rich Trott <rtrott@gmail.com>
02c2bf7
@sam-github sam-github added a commit to sam-github/node that referenced this pull request Nov 22, 2016
@Fishrock123 @sam-github Fishrock123 + sam-github timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: nodejs#9606
Fixes: nodejs#9561
PR-URL: nodejs#9685
Reviewed-By: Rich Trott <rtrott@gmail.com>
68bdb60
@MylesBorins
Member

@Fishrock123 should this be backported to v6?

@Fishrock123 Fishrock123 self-assigned this Dec 20, 2016
@Fishrock123
Member

@TheAlphaNerd This should be backported to both. The test aborts on both LTS versions.

@Fishrock123
Member

I'm working on a 4.x backport.

@Fishrock123 Fishrock123 added a commit to Fishrock123/node that referenced this pull request Dec 21, 2016
@Fishrock123 Fishrock123 timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: nodejs#9606
Fixes: nodejs#9561
PR-URL: nodejs#9685
Reviewed-By: Rich Trott <rtrott@gmail.com>

 Conflicts:
	lib/timers.js
9c9277b
@Fishrock123 Fishrock123 referenced this pull request Dec 21, 2016
Closed

Fix timers cancel in interval v4.x #10365

3 of 3 tasks complete
@Fishrock123
Member

@TheAlphaNerd lands on v4.x cleanly, v4.x backport at #10365

@joyeecheung
Contributor

#4303 looks similar to this one and is still open.

@MylesBorins MylesBorins added a commit that referenced this pull request Dec 21, 2016
@Fishrock123 @MylesBorins Fishrock123 + MylesBorins timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: #9606
Fixes: #9561
PR-URL: #9685
Reviewed-By: Rich Trott <rtrott@gmail.com>

 Conflicts:
	lib/timers.js
553d95d
@MylesBorins MylesBorins added a commit that referenced this pull request Dec 21, 2016
@Fishrock123 @MylesBorins Fishrock123 + MylesBorins timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: #9606
Fixes: #9561
PR-URL: #9685
Reviewed-By: Rich Trott <rtrott@gmail.com>
8bb66cd
@MylesBorins MylesBorins added a commit that referenced this pull request Dec 21, 2016
@Fishrock123 @MylesBorins Fishrock123 + MylesBorins timers: bail from intervals if _repeat is bad
PR-URL: #10365
Ref: #9685

Reviewed-By: Myles Borins <myles.borins@gmail.com>
759e8fd
@MylesBorins MylesBorins added a commit that referenced this pull request Dec 21, 2016
@Fishrock123 @MylesBorins Fishrock123 + MylesBorins timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: #9606
Fixes: #9561
PR-URL: #9685
Reviewed-By: Rich Trott <rtrott@gmail.com>
c349fb3
@MylesBorins MylesBorins added a commit that referenced this pull request Dec 21, 2016
@Fishrock123 @MylesBorins Fishrock123 + MylesBorins timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled
or closed timers, and not all codepaths checked it either.

Unenroll uses this to say that a timer is indeed closed and it is the
closest thing there is to an authoritative source for this.

Refs: #9606
Fixes: #9561
PR-URL: #9685
Reviewed-By: Rich Trott <rtrott@gmail.com>

 Conflicts:
	lib/timers.js
d98d089
@MylesBorins MylesBorins added a commit that referenced this pull request Dec 21, 2016
@Fishrock123 @MylesBorins Fishrock123 + MylesBorins timers: bail from intervals if _repeat is bad
PR-URL: #10365
Ref: #9685

Reviewed-By: Myles Borins <myles.borins@gmail.com>
0be437a
This was referenced Dec 21, 2016
@MylesBorins MylesBorins added a commit to MylesBorins/node that referenced this pull request Jan 3, 2017
@MylesBorins MylesBorins 2016-01-03, Version 6.9.3 'Boron' (LTS) Release
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.

Notable Changes:

* build:
  - shared library support is now working for AIX builds
    (Stewart Addison) nodejs#9675
* deps:
    - *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
             nodejs#9847
    - *V8*: Destructuring of arrow function arguments via computed
            property no longer throws (Michaël Zasso)
            nodejs#10386)
* inspector:
  - /json/version returns object, not an object wrapped in an array
    (Ben Noordhuis) nodejs#9762
* module:
  - using --debug-brk and --eval together now works as expected
    (Kelvin Jin) nodejs#8876
* process:
  - improve performance of nextTick up to 20% (Evan Lucas)
    nodejs#8932
* repl:
    - the division operator will no longer be accidentally parsed as
      regex (Teddy Katz) nodejs#10103
    - improved support for generator functions (Teddy Katz)
      nodejs#9852
* timers:
  - Re canceling a cancelled timers will no longer throw
    (Jeremiah Senkpiel) nodejs#9685

PR-URL: nodejs#10394
93a9109
@MylesBorins MylesBorins added a commit that referenced this pull request Jan 3, 2017
@MylesBorins MylesBorins 2016-01-03, Version 4.7.1 'Argon' (LTS)
This LTS release comes with 180 commits. This includes 117 which are
test related, 34 which are doc related, 15 which are build / tool
related, and 1 commit which is an update to dependencies.

Notable Changes:

* build:
  - shared library support is now working for AIX builds
    (Stewart Addison) #9675
* repl:
  - Passing options to the repl will no longer overwrite defaults
    (cjihrig) #7826
* timers:
  - Re canceling a cancelled timers will no longer throw
    (Jeremiah Senkpiel) #9685

PR-URL: #10395
b460d9f
@MylesBorins MylesBorins added a commit that referenced this pull request Jan 3, 2017
@MylesBorins MylesBorins 2017-01-03, Version 4.7.1 'Argon' (LTS)
This LTS release comes with 180 commits. This includes 117 which are
test related, 34 which are doc related, 15 which are build / tool
related, and 1 commit which is an update to dependencies.

Notable Changes:

* build:
  - shared library support is now working for AIX builds
    (Stewart Addison) #9675
* repl:
  - Passing options to the repl will no longer overwrite defaults
    (cjihrig) #7826
* timers:
  - Re canceling a cancelled timers will no longer throw
    (Jeremiah Senkpiel) #9685

PR-URL: #10395
1035318
@MylesBorins MylesBorins added a commit that referenced this pull request Jan 3, 2017
@MylesBorins MylesBorins 2017-01-03, Version 6.9.3 'Boron' (LTS) Release
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.

Notable Changes:

* build:
  - shared library support is now working for AIX builds
    (Stewart Addison) #9675
* deps:
    - *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
             #9847
    - *V8*: Destructuring of arrow function arguments via computed
            property no longer throws (Michaël Zasso)
            #10386)
* inspector:
  - /json/version returns object, not an object wrapped in an array
    (Ben Noordhuis) #9762
* module:
  - using --debug-brk and --eval together now works as expected
    (Kelvin Jin) #8876
* process:
  - improve performance of nextTick up to 20% (Evan Lucas)
    #8932
* repl:
    - the division operator will no longer be accidentally parsed as
      regex (Teddy Katz) #10103
    - improved support for generator functions (Teddy Katz)
      #9852
* timers:
  - Re canceling a cancelled timers will no longer throw
    (Jeremiah Senkpiel) #9685

PR-URL: #10394
42149d7
@MylesBorins MylesBorins added a commit that referenced this pull request Jan 3, 2017
@MylesBorins MylesBorins 2017-01-03, Version 6.9.3 'Boron' (LTS) Release
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.

Notable Changes:

* build:
  - shared library support is now working for AIX builds
    (Stewart Addison) #9675
* deps:
    - *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
             #9847
    - *V8*: Destructuring of arrow function arguments via computed
            property no longer throws (Michaël Zasso)
            #10386)
* inspector:
  - /json/version returns object, not an object wrapped in an array
    (Ben Noordhuis) #9762
* module:
  - using --debug-brk and --eval together now works as expected
    (Kelvin Jin) #8876
* process:
  - improve performance of nextTick up to 20% (Evan Lucas)
    #8932
* repl:
    - the division operator will no longer be accidentally parsed as
      regex (Teddy Katz) #10103
    - improved support for generator functions (Teddy Katz)
      #9852
* timers:
  - Re canceling a cancelled timers will no longer throw
    (Jeremiah Senkpiel) #9685

PR-URL: #10394
2bf1c24
@MylesBorins MylesBorins added a commit that referenced this pull request Jan 4, 2017
@MylesBorins MylesBorins 2017-01-03, Version 4.7.1 'Argon' (LTS)
This LTS release comes with 180 commits. This includes 117 which are
test related, 34 which are doc related, 15 which are build / tool
related, and 1 commit which is an update to dependencies.

Notable Changes:

* build:
  - shared library support is now working for AIX builds
    (Stewart Addison) #9675
* repl:
  - Passing options to the repl will no longer overwrite defaults
    (cjihrig) #7826
* timers:
  - Re canceling a cancelled timers will no longer throw
    (Jeremiah Senkpiel) #9685

PR-URL: #10395
b26a469
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment