Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed test: parallel/test-tls-inception.js #1012

Closed
jbergstroem opened this issue Mar 1, 2015 · 12 comments
Closed

failed test: parallel/test-tls-inception.js #1012

jbergstroem opened this issue Mar 1, 2015 · 12 comments
Labels
freebsd Issues and PRs related to the FreeBSD platform. test Issues and PRs related to the tests.

Comments

@jbergstroem
Copy link
Member

This test fails on FreeBSD 10.1-release:

=== release test-tls-inception ===                                 
Path: parallel/test-tls-inception
events.js:141
      throw er; // Unhandled 'error' event
            ^
Error: read ECONNRESET
    at exports._errnoException (util.js:734:11)
    at TLSWrap.onread (net.js:538:26)
Command: out/Release/iojs /usr/home/jbergstroem/io.js/test/parallel/test-tls-inception.js

git bisect tells me that b968623 is the offending commit (verified by running parent 4 times). Unfortunately, this seems to be race-y.

/cc @indutny

@brendanashworth brendanashworth added test Issues and PRs related to the tests. freebsd Issues and PRs related to the FreeBSD platform. labels Mar 1, 2015
@jbergstroem
Copy link
Member Author

This test fails on SmartOS as well (upcoming build slave in the jenkins test cluster) with the same behaviour.

@indutny
Copy link
Member

indutny commented Mar 2, 2015

Reproduced the problem, working on the isolating it.

@indutny
Copy link
Member

indutny commented Mar 2, 2015

Seems to coming from this syscall:

shutdown(0x10, 0x1, 0x0)         = -1 Err#54

@indutny
Copy link
Member

indutny commented Mar 2, 2015

Nope, it isn't. Guess we are not closing the socket at the right time... or closing it way too early on other side. Will figure it out later, doesn't seem to be a C++ issue from the first sight, just a behavior change... :(

@indutny
Copy link
Member

indutny commented Mar 2, 2015

Small log:

(0x8030fcc80) StreamWrap()
(0x8030fce40) StreamWrap()
(0x8030fd8c0) StreamWrap()
(0x8030fda80) StreamWrap()
(0x8030fdc40) StreamWrap()
(0x8030fde70) TLSWrap() on 0x8030fdc40 StreamBase
(0x8030fe030) TLSWrap() on 0x8030fde70 StreamBase
(0x8030fe180) StreamWrap()
(0x8030fe3b0) TLSWrap() on 0x8030fe180 StreamBase
(0x8030fe180) OnReadCommon 258
(0x8030fe3b0) OnReadImpl 258
(0x8030fdc40) OnReadCommon 1168
(0x8030fde70) OnReadImpl 1168
(0x8030fe180) OnReadCommon 299
(0x8030fe3b0) OnReadImpl 299
(0x8030fe6c0) StreamWrap()
(0x8030fe500) StreamWrap()
(0x8030fe8f0) TLSWrap() on 0x8030fe500 StreamBase
(0x8030fdc40) OnReadCommon 314
(0x8030fde70) OnReadImpl 314
(0x8030fe180) OnReadCommon 341
(0x8030fe3b0) OnReadImpl 341
(0x8030fe3b0) OnReadSelf 258
(0x8030fe500) OnReadCommon 258
(0x8030fe8f0) OnReadImpl 258
(0x8030fe6c0) OnReadCommon 1168
(0x8030fdc40) OnReadCommon 1253
(0x8030fde70) OnReadImpl 1253
(0x8030fe030) OnReadImpl 1024
(0x8030fe030) OnReadImpl 144
(0x8030fe180) OnReadCommon 373
(0x8030fe3b0) OnReadImpl 373
(0x8030fe3b0) OnReadSelf 299
(0x8030fe500) OnReadCommon 299
(0x8030fe8f0) OnReadImpl 299
(0x8030fe500) DoShutdown
(0x8030fe6c0) OnReadCommon 484
(0x8030fe6c0) OnReadCommon -4095
(0x8030fe680) Close()
(0x8030fe180) DoShutdown
(0x8030fdc40) OnReadCommon 565
(0x8030fde70) OnReadImpl 565
(0x8030fe030) OnReadImpl 484
(0x8030fe030) OnReadSelf 5
(0x8030fe030) OnReadSelf -4095
(0x8030fdc00) Close()
(0x8030fd880) Close()
(0x8030fda40) Close()
(0x8030fe500) OnReadCommon -4095
(0x8030fe8f0) OnReadImpl -4095
(0x8030fe8f0) OnReadSelf -4095
(0x8030fe4c0) Close()
(0x8030fe180) OnReadCommon -54
(0x8030fe3b0) OnReadImpl -54
(0x8030fe3b0) OnReadSelf -54
(0x8030fe140) Close()

@indutny
Copy link
Member

indutny commented Mar 3, 2015

indutny added a commit to indutny/io.js that referenced this issue Mar 3, 2015
Fix test failure on FreeBSD and SmartOS, which happens due to a bad
timing:

    events.js:141
          throw er; // Unhandled 'error' event
                ^
    Error: read ECONNRESET
        at exports._errnoException (util.js:734:11)
        at TLSWrap.onread (net.js:538:26)

The outer `net.conncet()` socket stays alive after the inner socket is
gone. This happens because `.pipe()`'s implementation does not `destroy`
the source side when the destination has emitted `close`.

Fix: nodejs#1012
@indutny
Copy link
Member

indutny commented Mar 3, 2015

Should be fixed by #1040

indutny added a commit that referenced this issue Mar 3, 2015
Fix test failure on FreeBSD and SmartOS, which happens due to a bad
timing:

    events.js:141
          throw er; // Unhandled 'error' event
                ^
    Error: read ECONNRESET
        at exports._errnoException (util.js:734:11)
        at TLSWrap.onread (net.js:538:26)

The outer `net.conncet()` socket stays alive after the inner socket is
gone. This happens because `.pipe()`'s implementation does not `destroy`
the source side when the destination has emitted `close`.

Fix: #1012
PR-URL: #1040
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
@jbergstroem
Copy link
Member Author

Confirmed fixed. Closing.

@nikolmarku1
Copy link

this is not fixed just seen in on V 1 - 4 - 13

@jbergstroem
Copy link
Member Author

@nikolmarku1 on the what now? What node/iojs version on what os are you running?

@jongyoonlee
Copy link

I'm also seeing a similar issue on v4.2.1 stack running on heroku.

Error: read ECONNRESET
    at exports._errnoException (util.js:874:11)
    at TLSWrap.onread (net.js:544:26)
    at TLSWrap.<anonymous> (/app/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31)

@rfink
Copy link

rfink commented Jan 6, 2016

Seeing on AWS 4.2.1 - inconsistently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
freebsd Issues and PRs related to the FreeBSD platform. test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

6 participants