Node.js, Cygwin and Socket.io walk into a bar… Node.js throws ENOBUFS and everyone dies

OK, I digged around a bit, and after your second edit I found this bug on the issue list.

I doesn’t state whether this was encountered under cygwin or not, but the error that it is hitting leads down to this piece of code:

  uint16_t * twobytebuf = new uint16_t[buflen];

  str->Write(twobytebuf, 0, buflen, String::HINT_MANY_WRITES_EXPECTED);

  for (size_t i = 0; i < buflen; i++) {
    unsigned char *b = reinterpret_cast<unsigned char*>(&twobytebuf[i]);
    assert(b[1] == 0); // this assertion fails
    buf[i] = b[0];
  }

From what I can read (with my rusted C) it will convert it will create a new uin16 array and write the contents of the V8 string in their, then it will ensure that casting did not write any values outside the range of 0 - 255, and that’s exactly what fails here.

I couldn’t find anything regarding whether this is a V8 issue or not.

Since the code was added in this commit, the only thing I can suggest here is to try pulling the tree from a commit before the code was added. Since all versions after that have the crashing code.

If that works, I would recommend you to file another bug report on the issue Node.js issue list, although I made do this later this day.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)