Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

net_uv.js throws assertion error #1697

Closed
randyho-kk opened this Issue · 10 comments

7 participants

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

Node Version

Windows node.exe v0.5.6

Problem

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.

Ben Noordhuis bnoordhuis was assigned
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.

ry
ry commented

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

Peter 'Pita' Martischka

+1

John McLear

This is pretty important to me too

ry ry referenced this issue from a commit
ry ry Re-land Bert's test for #1697
Was reverted out in cde81a6
040cf02
runner runner-mei referenced this issue from a commit
ry ry Re-land Bert's test for #1697
Was reverted out in cde81a6
6bdf9ad
ry
ry commented

@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++){
        response.write(s);
    }
    response.end();
}
Bert Belder

Fixed in ed65b7b.

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.