cherry pick recent dtrace fixes to v0.10 #5200

Closed
wants to merge 16 commits into
from

Projects

None yet

10 participants

@tjfontaine

This enables dtrace on osx as well as setting the fd field properly in the probes

isaacs and others added some commits Mar 28, 2013
@isaacs isaacs blog: Update linux binary tarball shasums
I just accidentally the binary release.
f1fa756
@isaacs isaacs blog: v0.11.0 release 1d17ced
@isaacs isaacs crypto: Pass options to ctor calls 7af075e
@TooTallNate TooTallNate repl: isSyntaxError() catches "strict mode" errors
Closes #5178.
085f9d6
@TooTallNate TooTallNate repl: use more readable RegExp syntax for spaces
This is just a cosmetic change really, nothing major.
55ea7cc
@mitar @indutny mitar querystring: Removing unnecessary binding
Binding of `http_parser` in querystring isn't used anywhere and should
be removed.
e5b90a1
@mhart @isaacs mhart Ensure BAD domain example actually uses domain 440dcae
@isaacs isaacs tls: Destroy socket when encrypted side closes
The v0.8 Stream.pipe() method automatically destroyed the destination
stream whenever the src stream closed.  However, this caused a lot of
problems, and was removed by popular demand.  (Many userland modules
still have a no-op destroy() method just because of this.) It was also
very hazardous because this would be done even if { end: false } was
passed in the pipe options.

In v0.10, we decided that the 'close' event and destroy() method are
application-specific, and pipe() doesn't automatically call destroy().
However, TLS actually depended (silently) on this behavior.  So, in this
case, we should just go ahead and destroy the thing when close happens.

Closes #5145
164d5b3
@arhart @isaacs arhart test: test intended code-paths
The tests did not agree with the test comments. Tests first and second
were both testing the !state.reading case. Now second tests the
state.reading && state.length case.

Fixes nodejs/node-v0.x-archive#5183
db8ce89
@isaacs @indutny isaacs http client: Ensure socket cleanup on response end
If an http response has an 'end' handler that throws, then the socket
will never be released back into the pool.

Granted, we do NOT guarantee that throwing will never have adverse
effects on Node internal state.  Such a guarantee cannot be reasonably
made in a shared-global mutable-state side-effecty language like
JavaScript.  However, in this case, it's a rather trivial patch to
increase our resilience a little bit, so it seems like a win.

There is no semantic change in this case, except that some event
listeners are removed, and the `'free'` event is emitted on nextTick, so
that you can schedule another request which will re-use the same socket.
From the user's point of view, there should be no detectable difference.

Closes #5107
234fb12
@mscdex @bnoordhuis mscdex src: remove unused variables 38106da
@davepacheco @tjfontaine davepacheco build: allow building with dtrace on osx aab53bb
@davepacheco @tjfontaine davepacheco dtrace: pass more arguments to probes
OSX and other DTrace implementations don't support dereferencing
structs in probes. To accomodate that pass members from the struct as
arguments so that DTrace is useful on those systems.
f796792
@tjfontaine tjfontaine dtrace: actually use the _handle.fd value
When using the DTrace/systemtap subsystems it would be helpful to
actually have an fd associated with the requests and responses.
7a43e8f
@bnoordhuis @tjfontaine bnoordhuis dtrace: check if _handle property is set
Check that _handle is an object before trying to read its `fd`
property, avoids bogus values.
a5f82b0
@tjfontaine tjfontaine etw: update prototypes to match dtrace provider
The DTrace probes were updated to accomodate platforms that can't
handle structs, update the prototypes for ETW but it's not necessary
to do anything with the new arguments as it's redundant information.
b8bb9f1
@Nodejs-Jenkins

Thank you for contributing this pull request! Here are a few pointers to make sure your submission will be considered for inclusion.

Commit tjfontaine/node@440dcae has the following error(s):

  • Commit message must indicate the subsystem this commit changes

The following commiters were not found in the CLA:

  • Dave Pacheco

Please see CONTRIBUTING.md for more information

@tjfontaine

stupidly set this to the wrong target branch, closing

@tjfontaine tjfontaine closed this Apr 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment