Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Issue 1473793002: win: Don't try to inherit console handles in StartHandler() (Closed)

Created:
5 years ago by scottmg
Modified:
5 years ago
Reviewers:
Mark Mentovai
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@master
Target Ref:
refs/heads/master
Project:
crashpad
Visibility:
Public.

Description

win: Don't try to inherit console handles in StartHandler() FILE_TYPE_CHAR handles can't be inherited via PROC_THREAD_ATTRIBUTE_HANDLE_LIST, or CreateProcess() fails with GetLastError() == 1450 on Windows 7. I confirmed that an fprintf(stderr, ...) in HandlerMain() does make it to the console when running tests even after this. See bug for more discussion. R=mark@chromium.org BUG=crashpad:77 Committed: https://chromium.googlesource.com/crashpad/crashpad/+/9b92d2fb7101bae2af9bb5447227df296b37b56a

Patch Set 1 #

Patch Set 2 : comment #

Patch Set 3 : simplify #

Patch Set 4 : add bug link in code #

Total comments: 6

Patch Set 5 : fixes #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -5 lines) Patch
M client/crashpad_client_win.cc View 1 2 3 4 3 chunks +21 lines, -5 lines 2 comments Download

Messages

Total messages: 11 (1 generated)
scottmg
I'm not sure if this will fix the 0x57 error on the Chrome waterfall, but ...
5 years ago (2015-11-25 00:03:52 UTC) #2
Mark Mentovai
LGTM. Let’s try it at least. https://codereview.chromium.org/1473793002/diff/60001/client/crashpad_client_win.cc File client/crashpad_client_win.cc (right): https://codereview.chromium.org/1473793002/diff/60001/client/crashpad_client_win.cc#newcode134 client/crashpad_client_win.cc:134: // File handles ...
5 years ago (2015-11-25 00:33:16 UTC) #3
scottmg
Thanks. I confirmed it does help the Vista VM too, so I'm hopeful. https://codereview.chromium.org/1473793002/diff/60001/client/crashpad_client_win.cc File ...
5 years ago (2015-11-25 00:36:14 UTC) #4
scottmg
Committed patchset #5 (id:80001) manually as 9b92d2fb7101bae2af9bb5447227df296b37b56a (presubmit successful).
5 years ago (2015-11-25 00:36:34 UTC) #5
Mark Mentovai
https://codereview.chromium.org/1473793002/diff/80001/client/crashpad_client_win.cc File client/crashpad_client_win.cc (right): https://codereview.chromium.org/1473793002/diff/80001/client/crashpad_client_win.cc#newcode234 client/crashpad_client_win.cc:234: startup_info.StartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE); We probably shouldn’t even be setting ...
5 years ago (2015-11-25 04:58:05 UTC) #6
scottmg
https://codereview.chromium.org/1473793002/diff/80001/client/crashpad_client_win.cc File client/crashpad_client_win.cc (right): https://codereview.chromium.org/1473793002/diff/80001/client/crashpad_client_win.cc#newcode234 client/crashpad_client_win.cc:234: startup_info.StartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE); On 2015/11/25 04:58:05, Mark Mentovai wrote: ...
5 years ago (2015-11-25 18:13:58 UTC) #7
Mark Mentovai
If it’s not inheritable, the best we can do in those fields is INVALID_HANDLE_VALUE. The ...
5 years ago (2015-11-25 18:17:45 UTC) #8
scottmg
On 2015/11/25 18:17:45, Mark Mentovai wrote: > If it’s not inheritable, the best we can ...
5 years ago (2015-11-25 18:28:31 UTC) #9
Mark Mentovai
Ugh, I just had this test failure locally (32-bit Debug): [ RUN ] CrashpadClient.StartWithInvalidHandles c:\chrome\crashpad\crashpad\test\scoped_temp_dir_win.cc(95): ...
5 years ago (2015-11-25 21:35:18 UTC) #10
scottmg
5 years ago (2015-11-25 21:40:11 UTC) #11
Message was sent while issue was closed.
On 2015/11/25 21:35:18, Mark Mentovai wrote:
> Ugh, I just had this test failure locally (32-bit Debug):
> 
> [ RUN      ] CrashpadClient.StartWithInvalidHandles
> c:\chrome\crashpad\crashpad\test\scoped_temp_dir_win.cc(95): error: Value of:
> DeleteFile(entry_path.value().c_str())
>   Actual: false
> Expected: true
> c:\chrome\crashpad\crashpad\test\scoped_temp_dir_win.cc(100): error: Value of:
> RemoveDirectory(path.value().c_str())
>   Actual: false
> Expected: true
> c:\chrome\crashpad\crashpad\test\win\win_multiprocess.h(64): error: Value of:
> exit_code
>   Actual: 255
> Expected: parent_process.exit_code_
> Which is: 0
> [  FAILED  ] CrashpadClient.StartWithInvalidHandles (32 ms)
> 
> The failure may be flake having nothing to do with invalid handles, but I
can’t
> help but feel like it’s this bug giving me the finger.

Yeah, I've had that too, but I'm not sure what to do about it. I meant to file a
bug.

It's because shutdown deleting the temp dir is racing with crashpad_handler's
shutdown (which has the database dir open).

We know crashpad_handler will shut down after UseHandler(), but we don't know
when it's finished doing so.

Powered by Google App Engine
This is Rietveld 408576698