Commit Graph

7122 Commits (fafb67c65bb5d2bd98cb298ae7f5e17d367428ce)

Author SHA1 Message Date
isaacs fafb67c65b ChangeLog: Missed item about EINPROGRESS 2013-02-25 13:57:02 -08:00
isaacs f8ae4446ee blog: Post for v0.8.21 2013-02-25 13:56:46 -08:00
isaacs 33e8e694e8 Now working on 0.8.22 2013-02-25 13:52:13 -08:00
isaacs 7b92b301fa Merge branch 'v0.8.21-release' into v0.8 2013-02-25 13:51:15 -08:00
isaacs 530d8c05d4 2013.02.25, Version 0.8.21 (Stable)
* http: Do not free the wrong parser on socket close (isaacs)

* http: Handle hangup writes more gently (isaacs)

* zlib: fix assert on bad input (Ben Noordhuis)

* test: add TAP output to the test runner (Timothy J Fontaine)

* unix: Handle EINPROGRESS from domain sockets (Ben Noordhuis)
2013-02-25 13:07:25 -08:00
isaacs ff540e19a4 uv: Upgrade to 86ae8b3c 2013-02-25 13:07:25 -08:00
isaacs b0e7dbf2c0 http: Do not free the wrong parser on socket close
This appears to fix #4673.  That bug is very hard to reproduce, so it's
hard to tell for certain, but this approach is more correct anyway.

Hat-tip: @dougwilson
2013-02-25 09:06:46 -08:00
isaacs f9a0140ef1 http: Handle hangup writes more gently 2013-02-22 10:35:07 -08:00
Ben Noordhuis 22d3eff8f4 doc: add note about child process line buffering
Fixes #4808.
2013-02-22 01:19:40 +01:00
Ben Noordhuis ef94521909 zlib: fix assert on bad input
The following test case occasionally triggered an assert because
write_in_progress_ didn't get cleared on error:

  $ cat test.js
  require('zlib').gunzip('BAM', console.log);
  setTimeout(gc, 10);

  $ while true; do node --expose-gc test.js || break; done
  { [Error: incorrect header check] errno: -3, code: 'Z_DATA_ERROR' }
  Assertion failed: (!write_in_progress_ && "write in progress"),
  function Clear, file ../src/node_zlib.cc, line 71.
  Abort trap: 6

Steps to avoid that:

* Initialize all primitive member fields in the constructor.
* Clear the write_in_progress_ member field in ZCtx::Error().
* Ref the ZCtx object as soon as write_in_progress_ is set to true.
  Before this commit, it could get GC'ed in the time between setting
  the field and the call to ctx->Ref().

Fixes #4783.
2013-02-22 00:08:26 +01:00
Timothy J Fontaine 9d45b945f7 test: add TAP output to the test runner
This is a back-port of commit 14ed173 from the master branch.
2013-02-20 18:50:55 +01:00
isaacs 3267464586 blog: v0.9.10 2013-02-19 14:01:23 -08:00
isaacs 3f38069acf blog: Release v0.8.20 2013-02-15 11:24:20 -08:00
isaacs 01bff7e7a7 Now working on v0.8.21 2013-02-15 11:24:08 -08:00
isaacs 48521f1220 Merge branch 'v0.8.20-release' into v0.8 2013-02-15 11:23:55 -08:00
isaacs e10c75579b 2013.02.15, Version 0.8.20 (Stable)
* npm: Upgrade to v1.2.11

* http: Do not let Agent hand out destroyed sockets (isaacs)

* http: Raise hangup error on destroyed socket write (isaacs)

* http: protect against response splitting attacks (Bert Belder)
2013-02-15 10:50:11 -08:00
isaacs 73be4608d9 npm: Upgrade to v1.2.11 2013-02-15 10:49:30 -08:00
isaacs 987338fe31 http: Do not let Agent hand out destroyed sockets
Fix #4373
2013-02-14 16:03:40 -08:00
isaacs c9dcf5718c http: Raise hangup error on destroyed socket write
Prior to v0.10, Node ignored ECONNRESET errors in many situations.
There *are* valid cases in which ECONNRESET should be ignored as a
normal part of the TCP dance, but in many others, it's a very relevant
signal that must be heeded with care.

Exacerbating this problem, if the OutgoingMessage does not have a
req.connection._handle, it assumes that it is in the process of
connecting, and thus buffers writes up in an array.

The problem happens when you reuse a socket between two requests, and it
is destroyed abruptly in between them.  The writes will be buffered,
because the socket has no handle, but it's not ever going to GET a
handle, because it's not connecting, it's destroyed.

The proper fix is to treat ECONNRESET correctly.  However, this is a
behavior/semantics change, and cannot land in a stable branch.

Fix #4775
2013-02-14 16:03:40 -08:00
Ben Noordhuis 3e2be6f39f doc: clarify child_process.exec() stdio option
It only works for stdin, not stdout/stderr, for obvious reasons.
2013-02-14 19:42:14 +01:00
Ben Noordhuis aec6e93931 doc: add tools/ dir to CONTRIBUTING.md verboten list 2013-02-14 12:42:57 +01:00
Dan Kohn 2e1ebbf2c5 doc: add prompt to fix repl_test.js example
Running repl.start without the prompt set produces this error:

repl.js:95
    throw new Error('An options Object, or a prompt String are required');
          ^
Error: An options Object, or a prompt String are required
    at new REPLServer (repl.js:95:11)
    at Object.exports.start (repl.js:321:14)
    at Object.<anonymous> (/Users/dan/Dropbox/Documents/dev/nextgen/repl_test.js:5:6)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)
2013-02-13 16:40:27 +01:00
isaacs 82ad5fbe9a blog: Forgot slug on peer-dependencies article 2013-02-12 16:30:25 -08:00
isaacs 6dcadb9fc8 blog: Peer Dependencies article
Thanks, @domenic
2013-02-12 12:03:52 -08:00
Ben Noordhuis c4f418d035 test: disable simple/test-dgram-send-error
It's not a good citizen, it spams random IP addresses with UDP packets.

Fixes #4730.
2013-02-08 01:33:33 +01:00
isaacs 2810b1ab00 blog: v0.9.9 is unstable, not stable 2013-02-07 10:35:35 -08:00
isaacs e4d97b1dca blog: v0.9.9 2013-02-07 10:34:45 -08:00
Bert Belder 255bc945c2 http: protect against response splitting attacks
This patch is a back-port of 3c293ba.
Closes #4696
2013-02-07 14:39:47 +01:00
isaacs 13897279ae blog: v0.8.19 release 2013-02-06 09:48:20 -08:00
isaacs ccf2712ee5 Now working on 0.8.20 2013-02-06 09:46:47 -08:00
isaacs 8caf6572b6 Merge branch 'v0.8.19-release' into v0.8 2013-02-06 09:44:38 -08:00
isaacs 53978bdf42 2013.02.06, Version 0.8.19 (Stable)
* npm: Upgrade to v1.2.10

* zlib: pass object size hint to V8 (Ben Noordhuis)

* zlib: reduce memory consumption, release early (Ben Noordhuis)

* buffer: slow buffer copy compatibility fix (Trevor Norris)

* zlib: don't assert on malformed dictionary (Ben Noordhuis)

* zlib: don't assert on missing dictionary (Ben Noordhuis)

* windows: better ipv6 support (Bert Belder)

* windows: add error mappings related to unsupported protocols (Bert Belder)

* windows: map ERROR_DIRECTORY to UV_ENOENT (Bert Belder)
2013-02-06 08:46:14 -08:00
isaacs 5aef65a98a npm: Upgrade to v1.2.10 2013-02-06 08:39:31 -08:00
Ben Noordhuis a86ebbe288 blog: remove dangling symlink
Fixes #4716.
2013-02-05 22:34:51 +01:00
Ben Noordhuis 6b99fd2323 zlib: pass object size hint to V8
Inform V8 that the zlib context object is tied to a large off-heap buffer.

This makes the GC run more often (in theory) and improves the accuracy of
--trace_external_memory.
2013-02-05 22:26:03 +01:00
Ben Noordhuis 8d14668992 zlib: reduce memory consumption, release early
In zlibBuffer(), don't wait for the garbage collector to reclaim the zlib memory
but release it manually. Reduces memory consumption by a factor of 10 or more
with some workloads.

Test case:

  function f() {
    require('zlib').deflate('xxx', g);
  }
  function g() {
    setTimeout(f, 5);
  }
  f();

Observe RSS memory usage with and without this commit. After 10,000 iterations,
RSS stabilizes at ~35 MB with this commit. Without, RSS is over 300 MB and keeps
growing.

Cause: whenever the JS object heap hits the high-water mark, the V8 GC sweeps
it clean, then tries to grow it in order to avoid more sweeps in the near
future. Rule of thumb: the bigger the JS heap, the lazier the GC can be.

A side effect of a bigger heap is that objects now live longer. This is harmless
in general but it affects zlib context objects because those are tied to large
buffers that live outside the JS heap, on the order of 16K per context object.

Ergo, don't wait for the GC to reclaim the memory - it may take a long time.

Fixes #4172.
2013-02-05 22:25:54 +01:00
Ben Noordhuis 5fe05464cb doc: don't suggest to reuse net.Socket objects
Using Socket.prototype.connect() to reconnect an existing Socket object
is not reliable. Users should just create a new Socket object.

See #4698.
2013-02-05 12:50:48 +01:00
isaacs 9a488a667c blog: Correct shasums for v0.9.8 release 2013-02-02 11:14:42 -08:00
Bert Belder 1a87776be9 deps: upgrade libuv to 034ea31 2013-01-30 20:30:10 +01:00
Rick Yakubowski 5abde8161a doc: fix typo in cluster module documentation
Fix a small typo in the cluster.settings documentation.
2013-01-27 00:25:35 +01:00
Trevor Norris 65249ccd9b buffer: slow buffer copy compatibility fix
Fix issue where SlowBuffers couldn't be passed as target to Buffer
copy().

Also included checks to see if Argument parameters are defined before
assigning their values. This offered ~3x's performance gain.

Backport of 16bbecc from master branch. Closes #4633.
2013-01-25 10:42:38 -08:00
isaacs 72dd3b4e25 benchmark: Port http.sh from master 2013-01-24 17:23:22 -08:00
Jacob Gable 34131af606 doc: fix typo in crypto Hash.digest() note
Added the word 'has' to the sentence.
Closes #4652.
2013-01-24 12:42:53 -08:00
isaacs 7f6054ca81 blog: Post for v0.9.8 2013-01-24 10:32:35 -08:00
Ben Noordhuis 13d86a86d6 doc: document PYTHON env var in README 2013-01-22 13:53:49 +01:00
Ben Noordhuis d7bf7ed993 zlib: don't assert on malformed dictionary
Handle Z_DATA_ERROR errors from inflateSetDictionary() gracefully.
Fixes the following assertion:

  node: ../src/node_zlib.cc:167: static void node::ZCtx::Process
  (uv_work_t*): Assertion `ctx->err_ == 0 && "Failed to set
  dictionary"' failed.
  Aborted (core dumped)

Fixes #4632.
2013-01-22 13:34:43 +01:00
Ben Noordhuis 1c32eb4ae2 zlib: don't assert on missing dictionary
Handle Z_NEED_DICT errors graciously. Fixes the following assertion:

  node: ../src/node_zlib.cc:161: static void node::ZCtx::Process
  (uv_work_t*): Assertion`ctx->dictionary_ != __null && "Stream
  has no dictionary"' failed.
  Aborted (core dumped)

Fixes #4632.
2013-01-22 13:34:43 +01:00
isaacs 9c2c845463 blog: Post for v0.8.18 release 2013-01-18 12:54:22 -08:00
isaacs 4598a4c6dd Now working on 0.8.19 2013-01-18 12:51:34 -08:00
isaacs f05cf3bea7 Merge branch 'v0.8.18-release' into v0.8 2013-01-18 12:51:14 -08:00