Skip to content

Windows 10 access violation with debugger #5268

@Trott

Description

@Trott

The environment:

Windows 10 (specifically run via the Node.js project Jenkins server)

The code:

Put this in a file in test/parallel:

'use strict';

const common = require('../common');
const assert = require('assert');
const spawn = require('child_process').spawn;

const args = [`--debug`, `--debug-port=${common.PORT}`, `--interactive`];
const proc = spawn(process.execPath, args, { stdio: 'pipe' });
proc.stdin.write(`
    util.inspect(Promise.resolve(42));
    util.inspect(Promise.resolve(1337));
    .exit
`);
proc.on('exit', common.mustCall((exitCode, signalCode) => {
  assert.strictEqual(exitCode, 0);
  assert.strictEqual(signalCode, null);
}));
let stdout = '';
proc.stdout.setEncoding('utf8');
proc.stdout.on('data', (data) => stdout += data);
process.on('exit', () => {
  assert(stdout.includes('Promise { 42 }'));
  assert(stdout.includes('Promise { 1337 }'));
});

The issue:

The code usually runs OK but every once in a while, there's an access violation:

# 
# assert.js:89
#   throw new assert.AssertionError({
#   ^
# AssertionError: 3221225477 === 0
#     at ChildProcess.proc.on.common.mustCall (c:\workspace\node-stress-single-test\nodes\win10\test\parallel\test-debug-no-context.js:15:10)
#     at ChildProcess.<anonymous> (c:\workspace\node-stress-single-test\nodes\win10\test\common.js:382:15)
#     at emitTwo (events.js:101:13)
#     at ChildProcess.emit (events.js:186:7)
#     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Here's a stress test showing the issue: https://ci.nodejs.org/job/node-stress-single-test/494/nodes=win10/console

Ref: #4343

Metadata

Metadata

Assignees

No one assigned

    Labels

    windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions