Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

net_uv.js throws assertion error #1697

Closed
randyho-kk opened this issue Sep 13, 2011 · 10 comments
Closed

net_uv.js throws assertion error #1697

randyho-kk opened this issue Sep 13, 2011 · 10 comments
Assignees
Milestone

Comments

@randyho-kk
Copy link

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)

@bnoordhuis
Copy link
Member

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

@ghost ghost assigned bnoordhuis Sep 13, 2011
@piscisaureus
Copy link

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

@piscisaureus
Copy link

@ry
Copy link

ry commented Sep 17, 2011

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

@Pita
Copy link

Pita commented Sep 26, 2011

+1

@JohnMcLear
Copy link

This is pretty important to me too

ry added a commit that referenced this issue Sep 26, 2011
@ry
Copy link

ry commented Sep 30, 2011

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

@bnoordhuis
Copy link
Member

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.

@rukeba
Copy link

rukeba commented Oct 5, 2011

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();
}

@piscisaureus
Copy link

Fixed in ed65b7b.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants