Skip to content
This repository

net_uv.js throws assertion error #1697

kingkaeru opened this Issue September 13, 2011 · 10 comments

7 participants

Randy Ben Noordhuis Bert Belder ry Peter 'Pita' Martischka John McLear Ruslan Keba

Node Version

Windows node.exe v0.5.6


Occasional AssertionError when using Socket.IO. This makes the windows version of node.js unusable.

←[31m[2011-08-30 14:26:28.742] [ERROR] console - ←[39mAssertionError: {"oncomple
te":"function afterWrite(status, handle, req, buffer) {\n  var self = handle.soc
ket;\n\n  // callback may come after c == {"oncomplete":"function afterWrite(sta
tus, handle, req, buffer) {\n  var self = handle.socket;\n\n  // callback may co
me after c
    at Object.afterWrite [as oncomplete] (net_uv.js:414:10)

Ben Noordhuis

Yes, known bug but hard to reproduce reliably. The write requests come back in a different order than what they're sent off in.

Bert Belder

On windows, this is probably caused by write requests short-circuiting while a previous write has completed but is still in the IOCPs queue.


reverted @piscisaureus test case in cde81a6 - it was causing other tests to fail

Peter 'Pita' Martischka


John McLear

This is pretty important to me too

ry ry referenced this issue from a commit September 26, 2011
ry Re-land Bert's test for #1697
Was reverted out in cde81a6
runner runner-mei referenced this issue from a commit September 27, 2011
ry Re-land Bert's test for #1697
Was reverted out in cde81a6

@piscisaureus any update on this? we're passing this in unix-land

Ben Noordhuis

test/simple/test-regress-GH-1697.js sometimes fails (and leaves behind a child process) with make test.

Error: connect ECONNREFUSED
    at errnoException (net_uv.js:566:11)
    at Object.afterConnect [as oncomplete] (net_uv.js:557:18)
Command: out/Release/node /home/bnoordhuis/src/nodejs/node/test/simple/test-regress-GH-1697.js

Probably a timing issue.

Ruslan Keba

The bug appears in v.0.5.8 too. It reproduced easy when send long responses (1Mb, chunked or with Content-Length):

function long_response(request, response) {
    var l = 1000;
    var s = '';
    for(var j=0; j<100; j++){
        s += '0123456789';
    response.writeHead(200, {"Content-Type": "text/plain"});
    for(var i=0; i<l; i++){
Bert Belder

Fixed in ed65b7b.

Bert Belder piscisaureus closed this October 13, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.