Skip to content

Conversation

@bnoordhuis
Copy link
Member

Fixes the following assertion on slow systems, like our ARM buildbot:

$ out/Debug/node test/simple/test-timers-unref.js node: ../src/async-wrap-inl.h:101: v8::Handle<v8::Value> node::AsyncWrap::MakeCallback(uint32_t, int, v8::Handle<v8::Value>*): Assertion `cb_v->IsFunction()' failed. Aborted 

The reason it only manifests on slow systems is that the test starts
a 1 ms interval timer, then defers timer.unref.bind({}) to the next
tick. On fast systems, the test completes in under a millisecond,
before the callback is called.

This commit makes timer.unref() check that the receiver actually has
a timeout callback property.

Fixes#13.

R=@rvagg

@rvagg
Copy link
Member

@bnoordhuis can we craft a test that would simulate the same behaviour on all systems so we can catch regressions more reliably in the future?

@bnoordhuisbnoordhuisforce-pushed the fix-arm-buildbot-failure branch from 8069684 to 48989f1CompareDecember 17, 2014 13:54
@bnoordhuis
Copy link
MemberAuthor

@rvagg Added a test.

@rvagg
Copy link
Member

lgtm

Fixes the following assertion on slow systems, like our ARM buildbot: $ out/Debug/node test/simple/test-timers-unref.js node: ../src/async-wrap-inl.h:101: v8::Handle<v8::Value> node::AsyncWrap::MakeCallback(uint32_t, int, v8::Handle<v8::Value>*): Assertion `cb_v->IsFunction()' failed. Aborted The reason it only manifests on slow systems is that the test starts a 1 ms interval timer, then defers timer.unref.bind({}) to the next tick. On fast systems, the test completes in under a millisecond, before the callback is called. This commit makes timer.unref() check that the receiver actually has a timeout callback property. Fixesnodejs#13. PR-URL: nodejs#165 Reviewed-By: Rod Vagg <[email protected]>
@bnoordhuisbnoordhuisforce-pushed the fix-arm-buildbot-failure branch from 48989f1 to ebf9f29CompareDecember 18, 2014 17:55
@bnoordhuisbnoordhuis merged commit ebf9f29 into nodejs:v0.12Dec 18, 2014
@bnoordhuisbnoordhuis deleted the fix-arm-buildbot-failure branch December 18, 2014 17:55
enricogior pushed a commit to thaliproject/jxcore that referenced this pull request Mar 3, 2017
Fixes the following assertion on slow systems, like our ARM buildbot: $ out/Debug/node test/simple/test-timers-unref.js node: ../src/async-wrap-inl.h:101: v8::Handle<v8::Value> node::AsyncWrap::MakeCallback(uint32_t, int, v8::Handle<v8::Value>*): Assertion `cb_v->IsFunction()' failed. Aborted The reason it only manifests on slow systems is that the test starts a 1 ms interval timer, then defers timer.unref.bind({}) to the next tick. On fast systems, the test completes in under a millisecond, before the callback is called. This commit makes timer.unref() check that the receiver actually has a timeout callback property. Fixes#13. PR-URL: nodejs/node#165 Reviewed-By: Rod Vagg <[email protected]>
enricogior pushed a commit to thaliproject/jxcore that referenced this pull request Mar 4, 2017
Fixes the following assertion on slow systems, like our ARM buildbot: $ out/Debug/node test/simple/test-timers-unref.js node: ../src/async-wrap-inl.h:101: v8::Handle<v8::Value> node::AsyncWrap::MakeCallback(uint32_t, int, v8::Handle<v8::Value>*): Assertion `cb_v->IsFunction()' failed. Aborted The reason it only manifests on slow systems is that the test starts a 1 ms interval timer, then defers timer.unref.bind({}) to the next tick. On fast systems, the test completes in under a millisecond, before the callback is called. This commit makes timer.unref() check that the receiver actually has a timeout callback property. Fixes#13. PR-URL: nodejs/node#165 Reviewed-By: Rod Vagg <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@bnoordhuis@rvagg