heapwolf/cdir

Pipe bug

Closed this issue · 7 comments

Reproduce by executing:

// RUN: echo '{"hallo": true}' | node tools/interactive.js 

console.dir = require('cdir');

process.stdin.once('data', function (chunk) {
    console.dir(JSON.parse(chunk.toString()));
});
process.stdin.resume();

result is:

Assertion failed: (!!(events & UV__IO_READ) ^ !!(events & UV__IO_WRITE)), function uv__stream_io, file ../deps/uv/src/unix/stream.c, line 729.
Abort trap: 6

/cc @indutny, what's the status of the select() tty stuff in node right now?

See nodejs/node-v0.x-archive#3072 for a little background.

Hm... seems to be working on the latest master for me.

$node -v
v0.8.15
$echo '{"hallo": true}' | node test.js 

▸ Object
Assertion failed: (!!(events & UV__IO_READ) ^ !!(events & UV__IO_WRITE)), function uv__stream_io, file ../deps/uv/src/unix/stream.c, line 729.
Abort trap: 6
$node -v
v0.9.4-pre
$echo '{"hallo": true}' | node test.js 

▸ Object
# totally frozen 99% CPU
$node -v
v0.9.6-pre
$echo '{"hallo": true}' | node test.js 

▸ Object
# totally frozen 99% CPU

@AndreasMadsen already fixed, waiting for @bnoordhuis to pull my patch in.

@indutny you are faster than your shadow, thanks.

@indutny you rock! 👍