[Bug 45749] Visual Studio 2017 Installer fails due to node.js/libuv listen (named pipe) error

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Sep 2 04:50:51 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=45749

--- Comment #5 from jimbo1qaz <jimbo1qaz at gmail.com> ---
I wiped my Javascript logging hooks completely.

When running the process in a debugger, node.js createServerHandle() seems to
fail in node.js handle.bind() -> C++ something -> libuv
uv_pipe_bind->uv_set_pipe_handle (I didn't debug uv_set_pipe_handle).

This winedbg command breaks on uv_set_pipe_handle:

b *0x10709ba0
c

uv_set_pipe_handle() returns nonzero, so does uv_pipe_bind and handle.bind().
If `handle.bind()` fails,
https://github.com/nodejs/node/blob/v8.9.1/lib/net.js#L1292
`createServerHandle()` returns an error code and slh constructs an error at
https://github.com/nodejs/node/blob/v8.9.1/lib/net.js#L1334 . Or one would
think...

----------

But my stack trace indicates `createServerHandle()` succeeded and an exception
was thrown later on net.js:1351 =
https://gist.github.com/jimbo1qaz/1c972422fd5c31706920b9be5c2a0f42#file-networkstacktrace-txt-L4

This is regardless of "heavily modded installer", "deleted and redownloaded
installer plus 1 logger hook", and "the latter plus launch HubController.js
subprocess via unix wine", or "winedbg with breakpoint when the function
fails".

-----------

Debugging Node's internal javascript: passing --inspect-brk to
vs_installershell.exe then debugging via Chromium! Except breakpoints don't
work, even when I symlink /C: to drive_c... Then it started working... (Sadly
about:inspect "automatic connection" and NIM don't work on VS Installer)

I guess I don't need to run Chrome under Wine
(https://gist.github.com/jimbo1qaz/1c972422fd5c31706920b9be5c2a0f42#chrome-under-wine
)

--------

I managed to combine winedbg and Chrome debugging.

cd WINEPREFIX/drive_c/Program Files/Microsoft Visual
Studio/Installer/resources/app ; ELECTRON_RUN_AS_NODE=true winedbg "C:\Program
Files\Microsoft Visual Studio\Installer\vs_installershell.exe" --inspect-brk
./node_modules/microsoft-servicehub/host/HubController.js
5d74f51d8cc5d690c261c26d3e9e3408e060bd352875558b9320be9c213e0610

Since I can't see Node's debug "key" url in stdout, I must look at
http://localhost:9229/json/list to connect to node instead.

Interesting issue within uv_pipe_bind():
- uv_set_pipe_handle returns -1 or 0xFFFFFFFF.
- Yet Wine's GetLastError(); returns 0, so all callers and Node thinks nothing
went wrong creating the named pipe.

  if (uv_set_pipe_handle(loop,
                         handle,
                         handle->pipe.serv.accept_reqs[0].pipeHandle,
                         -1,
                         0)) {
    err = GetLastError();

I am convinced that uv_set_pipe_handle() calling Wine is directly responsible
for this bug.

(am I a bit obsessed with debugging this issue?)

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list