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

openssl-cli.exe child process stdin problem on Windows #12

Closed
rvagg opened this issue Nov 29, 2014 · 2 comments
Closed

openssl-cli.exe child process stdin problem on Windows #12

rvagg opened this issue Nov 29, 2014 · 2 comments

Comments

@rvagg
Copy link
Member

rvagg commented Nov 29, 2014

Three tests are failing on Windows now, perhaps this is related to the openssl upgrade or perhaps something that's changed in libuv, I don't have good enough data to say yet. My guess is openssl because of the recent upgrade.

  • test-https-foafssl
  • test-tls-securepair-server
  • test-tls-server-verify

Each of these uses openssl-cli.exe s_client ... via a spawn() and then interacts with stdin to do some funky stuff with a local server and verifies stdout. It's as if stdin isn't being properly flushed to the client.

This is the basic pattern, extracted from test-https-foafssl:

  var args = ['s_client',
              '-quiet',
              '-connect', '127.0.0.1:' + common.PORT,
              '-cert', join(common.fixturesDir, 'foafssl.crt'),
              '-key', join(common.fixturesDir, 'foafssl.key')];

  var client = spawn(common.opensslCli, args)

  client.stdout.on('data', function(data) {
    // .. verify and clean up
  });

  client.stdin.write('GET /\n\n');

It just hangs and the tests end up timing out. When you do an 'inherit' for stderr on the spawn you can see that it initializes but doesn't react to the client.stdin.write() at all.

Then, if you do a full 'inherit' and skip the rest of the steps and take control of it:

  var args = ['s_client',
              '-quiet',
              '-connect', '127.0.0.1:' + common.PORT,
              '-cert', join(common.fixturesDir, 'foafssl.crt'),
              '-key', join(common.fixturesDir, 'foafssl.key')];

  var client = spawn(common.opensslCli, args, { stdio: 'inherit' })
  return

And manually type in GET /\n\n to the console it does what it's supposed to; connecting to the local server and printing out the response.

I've tried putting a timeout on the write, I've tried using full CRLF, nothing works and I don't know why taking the parent process stdin should be any different than simulating stdin data.

Anyone?

@indutny
Copy link
Member

indutny commented Nov 29, 2014

Ah, I forgot to roll in the floating patch. Will fix it in a bit.

@indutny
Copy link
Member

indutny commented Nov 29, 2014

Should be fixed by ab71223 and e05dff1

@indutny indutny closed this as completed Nov 29, 2014
targos referenced this issue in targos/node Apr 17, 2021
Original commit message:

    Merged: [turbofan] Fix bug in inlining

    Revision: 219b28bfe2ea76de63f034eb75b67e8ded339d94

    BUG=chromium:1127319
    NOTRY=true
    NOPRESUBMIT=true
    NOTREECHECKS=true
    R=tebbi@chromium.org

    Change-Id: I98e77bac81e2cf822a4a4987115e0cf01b1dbc52
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2416383
    Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
    Commit-Queue: Georg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/branch-heads/8.6@{#12}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: v8/v8@abb4d0a
targos referenced this issue in targos/node Apr 27, 2021
Original commit message:

    Merged: [turbofan] Fix bug in inlining

    Revision: 219b28bfe2ea76de63f034eb75b67e8ded339d94

    BUG=chromium:1127319
    NOTRY=true
    NOPRESUBMIT=true
    NOTREECHECKS=true
    R=tebbi@chromium.org

    Change-Id: I98e77bac81e2cf822a4a4987115e0cf01b1dbc52
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2416383
    Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
    Commit-Queue: Georg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/branch-heads/8.6@{#12}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: v8/v8@abb4d0a
targos added a commit that referenced this issue Apr 30, 2021
Original commit message:

    Merged: [turbofan] Fix bug in inlining

    Revision: 219b28bfe2ea76de63f034eb75b67e8ded339d94

    BUG=chromium:1127319
    NOTRY=true
    NOPRESUBMIT=true
    NOTREECHECKS=true
    R=tebbi@chromium.org

    Change-Id: I98e77bac81e2cf822a4a4987115e0cf01b1dbc52
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2416383
    Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
    Commit-Queue: Georg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/branch-heads/8.6@{#12}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: v8/v8@abb4d0a

PR-URL: #38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants