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

Access violation when destroying named pipe #42496

Closed
vweevers opened this issue Mar 27, 2022 · 2 comments
Closed

Access violation when destroying named pipe #42496

vweevers opened this issue Mar 27, 2022 · 2 comments
Labels
libuv Issues and PRs related to the libuv dependency or the uv binding. windows Issues and PRs related to the Windows platform.

Comments

@vweevers
Copy link
Contributor

Version

v17.8.0

Platform

Microsoft Windows NT 10.0.19042.0 x64

Subsystem

net

What steps will reproduce the bug?

Run node named-pipe.js having the following content:

const net = require('net')
const server = net.createServer()
const namedPipe = '\\\\.\\pipe\\node-test-' + Date.now()

server.listen(namedPipe, function () {
  const clients = new Array(50).fill(0).map(function () {
    return net.connect(namedPipe)
  })

  for (const client of clients) {
    // Causes access violation
    client.destroy()
  }

  console.log('ok')
  server.unref()
})

How often does it reproduce? Is there a required condition?

Always for me. You may need to increase the amount of named pipe clients (50 in the example) in order to reproduce.

What is the expected behavior?

$ node named-pipe.js & echo %errorlevel%
ok
0

What do you see instead?

$ node named-pipe.js & echo %errorlevel%
-1073741819

Additional information

Reproduced on 17.8.0, 17.4.0, 16.14.2, 14.14.0, 8.14.0.

Stack trace:

ntdll.dll!RtlCreateUnicodeString()
KernelBase.dll!WaitNamedPipeW()
node.exe!pipe_connect_thread_proc(void * parameter) Line 825
	at c:\ws\deps\uv\src\win\pipe.c(825)
ntdll.dll!RtlpTpWorkCallback()
ntdll.dll!TppWorkerThread()
kernel32.dll!00007fff91137034()
ntdll.dll!RtlUserThreadStart()

It seems that handle->name is NULL here.

@bnoordhuis bnoordhuis added windows Issues and PRs related to the Windows platform. libuv Issues and PRs related to the libuv dependency or the uv binding. labels Mar 27, 2022
@bnoordhuis
Copy link
Member

I've filed libuv/libuv#3578.

@santigimeno
Copy link
Member

Already fixed in libuv. It should be available in the next libuv release.

santigimeno added a commit to santigimeno/node that referenced this issue May 20, 2023
- linux: introduce io_uring support libuv/libuv#3952
- src: add new metrics APIs libuv/libuv#3749
- unix,win: give thread pool threads an 8 MB stack libuv/libuv#3787
- win,unix: change execution order of timers libuv/libuv#3927

- Fixes: nodejs#43931
- Fixes: nodejs#42496
santigimeno added a commit to santigimeno/node that referenced this issue May 24, 2023
- linux: introduce io_uring support libuv/libuv#3952
- src: add new metrics APIs libuv/libuv#3749
- unix,win: give thread pool threads an 8 MB stack libuv/libuv#3787
- win,unix: change execution order of timers libuv/libuv#3927

Fixes: nodejs#43931
Fixes: nodejs#42496
Fixes: nodejs#47715
Fixes: nodejs#47259
Fixes: nodejs#47241
nodejs-github-bot pushed a commit that referenced this issue May 24, 2023
This wasn't failing on arm boxes, increase the `runInNewContext()`
timeout a bit to make sure the code it's allowed to fail.

PR-URL: #48078
Fixes: #43931
Fixes: #42496
Fixes: #47715
Fixes: #47259
Fixes: #47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
nodejs-github-bot pushed a commit that referenced this issue May 24, 2023
A libuv `LICENSE-extra` file was added and a couple of files were
removed (stdint-msvc2008.h and pthread-fixes.c).

PR-URL: #48078
Fixes: #43931
Fixes: #42496
Fixes: #47715
Fixes: #47259
Fixes: #47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
targos pushed a commit that referenced this issue Jun 4, 2023
- linux: introduce io_uring support libuv/libuv#3952
- src: add new metrics APIs libuv/libuv#3749
- unix,win: give thread pool threads an 8 MB stack libuv/libuv#3787
- win,unix: change execution order of timers libuv/libuv#3927

Fixes: #43931
Fixes: #42496
Fixes: #47715
Fixes: #47259
Fixes: #47241
PR-URL: #48078
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
targos pushed a commit that referenced this issue Jun 4, 2023
This wasn't failing on arm boxes, increase the `runInNewContext()`
timeout a bit to make sure the code it's allowed to fail.

PR-URL: #48078
Fixes: #43931
Fixes: #42496
Fixes: #47715
Fixes: #47259
Fixes: #47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
targos pushed a commit that referenced this issue Jun 4, 2023
A libuv `LICENSE-extra` file was added and a couple of files were
removed (stdint-msvc2008.h and pthread-fixes.c).

PR-URL: #48078
Fixes: #43931
Fixes: #42496
Fixes: #47715
Fixes: #47259
Fixes: #47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
danielleadams pushed a commit that referenced this issue Jul 6, 2023
This wasn't failing on arm boxes, increase the `runInNewContext()`
timeout a bit to make sure the code it's allowed to fail.

PR-URL: #48078
Fixes: #43931
Fixes: #42496
Fixes: #47715
Fixes: #47259
Fixes: #47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
danielleadams pushed a commit that referenced this issue Jul 6, 2023
A libuv `LICENSE-extra` file was added and a couple of files were
removed (stdint-msvc2008.h and pthread-fixes.c).

PR-URL: #48078
Fixes: #43931
Fixes: #42496
Fixes: #47715
Fixes: #47259
Fixes: #47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
MoLow pushed a commit to MoLow/node that referenced this issue Jul 6, 2023
This wasn't failing on arm boxes, increase the `runInNewContext()`
timeout a bit to make sure the code it's allowed to fail.

PR-URL: nodejs#48078
Fixes: nodejs#43931
Fixes: nodejs#42496
Fixes: nodejs#47715
Fixes: nodejs#47259
Fixes: nodejs#47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
MoLow pushed a commit to MoLow/node that referenced this issue Jul 6, 2023
A libuv `LICENSE-extra` file was added and a couple of files were
removed (stdint-msvc2008.h and pthread-fixes.c).

PR-URL: nodejs#48078
Fixes: nodejs#43931
Fixes: nodejs#42496
Fixes: nodejs#47715
Fixes: nodejs#47259
Fixes: nodejs#47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
- linux: introduce io_uring support libuv/libuv#3952
- src: add new metrics APIs libuv/libuv#3749
- unix,win: give thread pool threads an 8 MB stack libuv/libuv#3787
- win,unix: change execution order of timers libuv/libuv#3927

Fixes: nodejs#43931
Fixes: nodejs#42496
Fixes: nodejs#47715
Fixes: nodejs#47259
Fixes: nodejs#47241
PR-URL: nodejs#48078
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
This wasn't failing on arm boxes, increase the `runInNewContext()`
timeout a bit to make sure the code it's allowed to fail.

PR-URL: nodejs#48078
Fixes: nodejs#43931
Fixes: nodejs#42496
Fixes: nodejs#47715
Fixes: nodejs#47259
Fixes: nodejs#47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
A libuv `LICENSE-extra` file was added and a couple of files were
removed (stdint-msvc2008.h and pthread-fixes.c).

PR-URL: nodejs#48078
Fixes: nodejs#43931
Fixes: nodejs#42496
Fixes: nodejs#47715
Fixes: nodejs#47259
Fixes: nodejs#47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
- linux: introduce io_uring support libuv/libuv#3952
- src: add new metrics APIs libuv/libuv#3749
- unix,win: give thread pool threads an 8 MB stack libuv/libuv#3787
- win,unix: change execution order of timers libuv/libuv#3927

Fixes: nodejs#43931
Fixes: nodejs#42496
Fixes: nodejs#47715
Fixes: nodejs#47259
Fixes: nodejs#47241
PR-URL: nodejs#48078
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
This wasn't failing on arm boxes, increase the `runInNewContext()`
timeout a bit to make sure the code it's allowed to fail.

PR-URL: nodejs#48078
Fixes: nodejs#43931
Fixes: nodejs#42496
Fixes: nodejs#47715
Fixes: nodejs#47259
Fixes: nodejs#47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
A libuv `LICENSE-extra` file was added and a couple of files were
removed (stdint-msvc2008.h and pthread-fixes.c).

PR-URL: nodejs#48078
Fixes: nodejs#43931
Fixes: nodejs#42496
Fixes: nodejs#47715
Fixes: nodejs#47259
Fixes: nodejs#47241
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
arsnyder16 pushed a commit to arsnyder16/node that referenced this issue Sep 10, 2023
- linux: introduce io_uring support libuv/libuv#3952
- src: add new metrics APIs libuv/libuv#3749
- unix,win: give thread pool threads an 8 MB stack libuv/libuv#3787
- win,unix: change execution order of timers libuv/libuv#3927

Fixes: nodejs#43931
Fixes: nodejs#42496
Fixes: nodejs#47715
Fixes: nodejs#47259
Fixes: nodejs#47241
PR-URL: nodejs#48078
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
ruyadorno pushed a commit that referenced this issue Sep 11, 2023
- linux: introduce io_uring support libuv/libuv#3952
- src: add new metrics APIs libuv/libuv#3749
- unix,win: give thread pool threads an 8 MB stack libuv/libuv#3787
- win,unix: change execution order of timers libuv/libuv#3927

Fixes: #43931
Fixes: #42496
Fixes: #47715
Fixes: #47259
Fixes: #47241
PR-URL: #48078
Backport-PR-URL: #49591
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
ruyadorno pushed a commit that referenced this issue Sep 13, 2023
- linux: introduce io_uring support libuv/libuv#3952
- src: add new metrics APIs libuv/libuv#3749
- unix,win: give thread pool threads an 8 MB stack libuv/libuv#3787
- win,unix: change execution order of timers libuv/libuv#3927

Fixes: #43931
Fixes: #42496
Fixes: #47715
Fixes: #47259
Fixes: #47241
PR-URL: #48078
Backport-PR-URL: #49591
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
ruyadorno pushed a commit that referenced this issue Sep 17, 2023
- linux: introduce io_uring support libuv/libuv#3952
- src: add new metrics APIs libuv/libuv#3749
- unix,win: give thread pool threads an 8 MB stack libuv/libuv#3787
- win,unix: change execution order of timers libuv/libuv#3927

Fixes: #43931
Fixes: #42496
Fixes: #47715
Fixes: #47259
Fixes: #47241
PR-URL: #48078
Backport-PR-URL: #49591
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
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. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants