Skip to content

deps: upgrade libuv to 1.7.3 - #2310

Closed
saghul wants to merge 1 commit into
nodejs:masterfrom
saghul:uv-1.7.0
Closed

saghul wants to merge 1 commit into
nodejs:masterfrom
saghul:uv-1.7.0

Conversation

@saghul

@saghul saghul commented Aug 5, 2015

Copy link
Copy Markdown
Member

Latest and greatest, fresh out of the oven!

R=@bnoordhuis

(Ben, I keep R-ing you, let me know if I should reference someone else as well :-))

@saghul

saghul commented Aug 5, 2015

Copy link
Copy Markdown
Member Author

@mscdex mscdex added the libuv Issues and PRs related to the libuv dependency or the uv binding. label Aug 5, 2015
@rvagg

rvagg commented Aug 5, 2015

Copy link
Copy Markdown
Member

I'd like to see some discussion here about whether to land-on-v3.x this. It's not a small upgrade but it's also supposed to be non-breaking—but large change sets come with a lot of breakage risk that we could be blind to and impact on stability.

@bnoordhuis

Copy link
Copy Markdown
Member

CI: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/226/

Lots of red. I wonder if it's related to the ECONNRESET rework.

@saghul

saghul commented Aug 5, 2015

Copy link
Copy Markdown
Member Author

@bnoordhuis Not sure, I picked a couple of the reds randomly and test-tls-hello-parser-failure.js fails. Related?

@Fishrock123

Copy link
Copy Markdown
Contributor

Unblocks #2167

@saghul

saghul commented Aug 6, 2015

Copy link
Copy Markdown
Member Author

Doh, the upgrade does indeed break that test:

=== release test-tls-hello-parser-failure ===                                  
Path: parallel/test-tls-hello-parser-failure
assert.js:89
  throw new assert.AssertionError({
  ^
AssertionError: Client never errored
    at Socket.<anonymous> (/home/saghul/src/io.js/test/parallel/test-tls-hello-parser-failure.js:45:12)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at TCP._onclose (net.js:468:12)
Command: out/Release/iojs /home/saghul/src/io.js/test/parallel/test-tls-hello-parser-failure.js

I'll try to see what's going on.

@saghul

saghul commented Aug 6, 2015

Copy link
Copy Markdown
Member Author

Well, f*ck. It's indeed the ECONNRESET stuff. The error here https://github.com/nodejs/io.js/blob/master/test/parallel/test-tls-hello-parser-failure.js#L35 is ECONNRESET without the uv upgrade.

I guess what happens here is that the connection is closed because that's not a valid TLS handshake, discarding all that data and resulting in ECONNRESET, but we swallow it so it looks like the connection was properly closed. Hum.

@ronkorving

Copy link
Copy Markdown
Contributor

So we wait for 1.7.1?

@bnoordhuis

Copy link
Copy Markdown
Member

I had a look at the test and I think it's bogus. It's testing something that's more an accident of the implementation than actual specified behavior. I suggest this change:

diff --git a/test/parallel/test-tls-hello-parser-failure.js b/test/parallel/test-tls-hello-parser-failure.js
index 3378583..7e3250d 100644
--- a/test/parallel/test-tls-hello-parser-failure.js
+++ b/test/parallel/test-tls-hello-parser-failure.js
@@ -26,22 +26,11 @@ var server = tls.createServer(options, function(c) {
     client.write(bonkers);
   });

-  var once = false;
-
   var writeAgain = setTimeout(function() {
     client.write(bonkers);
   });

-  client.on('error', function(err) {
-    if (!once) {
-      clearTimeout(writeAgain);
-      once = true;
-      client.destroy();
-      server.close();
-    }
-  });
-
-  client.on('close', function(hadError) {
-    assert.strictEqual(hadError, true, 'Client never errored');
-  });
+  client.on('close', common.mustCall(function() {
+    server.close();
+  }));
 });

@saghul

saghul commented Aug 7, 2015

Copy link
Copy Markdown
Member Author

@bnoordhuis hum, but shouldn't that test actually fail with ECONNRESET (ast it did)? My understanding is as follows, please do correct me if I'm wrong:

  • client writes a bunch of bogus data
  • server sees that that's not proper TLS data
  • server closes the connection, without reading all the data, thus causing a RST packet to be sent
  • client gets EPOLLRDHUP
  • we (libuv) squelch the ECONNRESET error because EPOLLRDHUP was set
  • client gets EOF as if everything was OK

So, to the client it looks like the server closed the connection after reading all the data, but this didn't happen.

My hunch is that we have to revert the ECONNRESET squelching patch, WDYT?

@bnoordhuis

Copy link
Copy Markdown
Member

server closes the connection, without reading all the data, thus causing a RST packet to be sent

That's right but it strongly depends on the data size. If the data fits in a single TCP packet, the connection is shut down with a FIN, not a RST. If you change the test to send 500 byte messages it won't ECONNRESET, so you can argue that the new behavior is more consistent than the old behavior.

I agree that it's best to be conservative however, so let's revert for now.

@saghul

saghul commented Aug 7, 2015

Copy link
Copy Markdown
Member Author

@bnoordhuis Interesting, TIL! PR for the revert here: libuv/libuv#475 Once / if that lands I'll make a 1.7.1 release and update this PR.

saghul added a commit to saghul/libuv that referenced this pull request Aug 7, 2015
This reverts commit 05a003a.

This commit triggerd "test-tls-hello-parser-failure" failure in io.js.
See the reference below for a more thorough explanation.

Refs: nodejs/node#2310 (comment)
saghul added a commit to saghul/libuv that referenced this pull request Aug 7, 2015
This reverts commit 05a003a.

This commit triggerd "test-tls-hello-parser-failure" failure in io.js.
See the reference below for a more thorough explanation.

Refs: nodejs/node#2310
PR-URL: libuv#475
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@saghul

saghul commented Aug 7, 2015

Copy link
Copy Markdown
Member Author

The revert landed. Floated the patch, if all goes well I'll release 1.7.1. CI: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/230/

@saghul

saghul commented Aug 7, 2015

Copy link
Copy Markdown
Member Author

test-tls-server-verify fails on Windows, but it takes like a minute. Timeout?

@bnoordhuis

Copy link
Copy Markdown
Member

It's possible, it's been flaky before, but it is suspicious that it fails on both buildbots. Maybe run it one more time?

BTW, https://jenkins-iojs.nodesource.com/job/node-test-pull-request is the new preferred target, it rebases onto the target branch before building.

@saghul

saghul commented Aug 7, 2015

Copy link
Copy Markdown
Member Author

OK, running it (Windows only) here: https://jenkins-iojs.nodesource.com/job/iojs+pr+win/230/

BTW, https://jenkins-iojs.nodesource.com/job/node-test-pull-request is the new preferred target, it rebases onto the target branch before building.

Ph, didn't know, thanks!

@saghul

saghul commented Aug 7, 2015

Copy link
Copy Markdown
Member Author

No luck:

not ok 745 - test-tls-server-verify.js
#0 Running 'Do not request certs. Everyone is unauthorized.'
#1 Running 'Allow both authed and unauthed connections with CA1'
#0 - unauthed connection: null
#0 - unauthed connection: null
#0 0   * unauthed
#0 2   * unauthed
#0 - unauthed connection: null
#0 - unauthed connection: null
#0 1   * unauthed
#1 - unauthed connection: UNABLE_TO_GET_ISSUER_CERT
#1 - unauthed connection: DEPTH_ZERO_SELF_SIGNED_CERT
#1 - unauthed connection: UNABLE_TO_VERIFY_LEAF_SIGNATURE
#1 - authed connection: agent1
#0 3   * unauthed
#1 3   * unauthed
#1 1   * unauthed
#1 2   * unauthed
#1 0   * authed
#2 Running 'Do not request certs at connection. Do that later'
#3 Running 'Allow only authed connections with CA1'
#3 - authed connection: agent1
#3 0   * authed
#4 Running 'Allow only authed connections with CA1 and CA2'
#4 - authed connection: agent1
#4 0   * authed
#4 - authed connection: agent3
#4 2   * authed
#5 Running 'Allow only certs signed by CA2 but not in the CRL'
#2 - connected, renegotiating
#2 - authed connection: agent1
#2 0   * authed
#5 - authed connection: agent3
#5 2   * authed
#2 - unauthed connection: null
#2 1   * unauthed
#2 - unauthed connection: null
#2 2   * unauthed
#2 - unauthed connection: null
#2 3   * unauthed
#0 0   connecting with agent1
#0 1   connecting with agent2
#0 2   connecting with agent3
#0 3   connecting with nocert
#1 0   connecting with agent1
#1 1   connecting with agent2
#1 2   connecting with agent3
#1 3   connecting with nocert
#2 0   connecting with agent1
#3 0   connecting with agent1
#3 1   connecting with agent2
#3 2   connecting with agent3
#3 3   connecting with nocert
#4 0   connecting with agent1
#4 1   connecting with agent2
#4 2   connecting with agent3
#4 3   connecting with nocert
#5 0   connecting with agent1
#5 1   connecting with agent2
#5 2   connecting with agent3
#5 3   connecting with agent4
#5 4   connecting with nocert
#2 1   connecting with agent2
#2 2   connecting with agent3
#2 3   connecting with nocert
  ---
  duration_ms: 60.106

@saghul

saghul commented Aug 10, 2015

Copy link
Copy Markdown
Member Author

I took a look at this but I have no clue what could be causing the failure :-S Any help would be appreciated.

@ronkorving

Copy link
Copy Markdown
Contributor

cc @indutny or @bnoordhuis?

@saghul

saghul commented Aug 18, 2015

Copy link
Copy Markdown
Member Author

I manually bisected it and found the culprit: 2dddd56, by yours trully. Oh well. I'll dig and see what I missed...

@ronkorving

Copy link
Copy Markdown
Contributor

libuv/libuv@2dddd56 ? Not a big change, hopefully easy to fix :)

@saghul saghul changed the title deps: upgrade libuv to 1.7.1 deps: upgrade libuv to 1.7.2 Aug 24, 2015
@Fishrock123

Copy link
Copy Markdown
Contributor

The freebsd and sunos failures are unrelated I think.

This is new...?: https://jenkins-iojs.nodesource.com/job/node-test-commit-arm/291/nodes=armv7-wheezy/tapTestReport/test.tap-797/

@saghul

saghul commented Aug 27, 2015

Copy link
Copy Markdown
Member Author

Updated to 1.7.3, hopefully we're good now. CI: https://jenkins-iojs.nodesource.com/job/node-test-pull-request/195/ Sorry for the noise, everyone.

@saghul saghul changed the title deps: upgrade libuv to 1.7.2 deps: upgrade libuv to 1.7.3 Aug 27, 2015
@Fishrock123

Copy link
Copy Markdown
Contributor

@saghul so far failures seem unrelated.

@ronkorving

Copy link
Copy Markdown
Contributor

Would be nice if we could get this and #2167 in before v4.

@cjihrig

cjihrig commented Sep 1, 2015

Copy link
Copy Markdown
Contributor

Rubber stamp LGTM. Is anything still holding this up? Are the CI failures all unrelated? Do we need another CI run?

@rvagg

rvagg commented Sep 2, 2015

Copy link
Copy Markdown
Member

someone can try land with Jenkins node-accept-pull-request, flaky test ignores should figure it out

@thefourtheye

Copy link
Copy Markdown
Contributor

The last CI run had few Windows failures and the changes corresponding to them were reverted immediately. Starting an accept-pull-request job now.

@thefourtheye

Copy link
Copy Markdown
Contributor

thefourtheye pushed a commit that referenced this pull request Sep 2, 2015
PR-URL: #2310
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
@thefourtheye

Copy link
Copy Markdown
Contributor

Landed in a161594

@saghul

saghul commented Sep 2, 2015

Copy link
Copy Markdown
Member Author

@thefourtheye Thanks! 😻

@ronkorving

Copy link
Copy Markdown
Contributor

\o/

@thefourtheye

Copy link
Copy Markdown
Contributor

@rvagg Can this go in 3.3.0?

rvagg pushed a commit that referenced this pull request Sep 2, 2015
PR-URL: #2310
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
rvagg added a commit to rvagg/io.js that referenced this pull request Sep 2, 2015
Notable changes:

* build: Add a --link-module option to configure that can be used to
  bundle additional JavaScript modules into a built binary
  (Bradley Meck) nodejs#2497
* docs: Merge outstanding doc updates from joyent/node
  (James M Snell) nodejs#2378
* http_parser: Significant performance improvement by having
  http.Server consume all initial data from its net.Socket and parsing
  directly without having to enter JavaScript. Any 'data' listeners on
  the net.Socket will result in the data being "unconsumed" into
  JavaScript, thereby undoing any performance gains.
  (Fedor Indutny) nodejs#2355
* libuv: Upgrade to 1.7.3 (from 1.6.1), see
  https://github.com/libuv/libuv/blob/v1.x/ChangeLog for details
  (Saúl Ibarra Corretgé) nodejs#2310
* V8: Upgrade to 4.4.63.30 (from 4.4.63.26) (Michaël Zasso) nodejs#2482
@rvagg

rvagg commented Sep 2, 2015

Copy link
Copy Markdown
Member

@thefourtheye it's in, testing and building at the same time now

@thefourtheye

Copy link
Copy Markdown
Contributor

@rvagg Awesome :-) Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libuv Issues and PRs related to the libuv dependency or the uv binding.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants