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

fix: Initialize logging for crashpad #26250

Merged
merged 3 commits into from Oct 29, 2020
Merged

Conversation

deepak1556
Copy link
Member

@deepak1556 deepak1556 commented Oct 29, 2020

Description of Change

On windows the default logging mode is LOG_TO_FILE and crashpad has been operating under this mode. The default log file will be created under the executable directory but when the executable is installed under restrictive directories like C:\Program Files the app won't have permission to write log files here and thereby creating debug.log file under the working directory

Crbug - https://bugs.chromium.org/p/chromium/issues/detail?id=711159
Refs microsoft/vscode#105191

Checklist

Release Notes

Notes: fix debug.log files being created under working directory on windows

@deepak1556 deepak1556 requested a review from a team as a code owner October 29, 2020 07:07
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 29, 2020
@deepak1556 deepak1556 added backport-check-skip Skip trop's backport validity checking target/10-x-y labels Oct 29, 2020
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Oct 29, 2020
@deepak1556
Copy link
Member Author

deepak1556 commented Oct 29, 2020

osx-x64 has failing crash reporter tests due to DCHECK crash in handler,

[1029/101831.854852:FATAL:command_line.cc(237)] Check failed: current_process_commandline_. 
0   chrome_crashpad_handler             0x00000001016783a9 base::debug::CollectStackTrace(void**, unsigned long) + 9
1   chrome_crashpad_handler             0x000000010159e2c3 base::debug::StackTrace::StackTrace() + 19
2   chrome_crashpad_handler             0x00000001015b7155 logging::LogMessage::~LogMessage() + 261
3   chrome_crashpad_handler             0x00000001015b7dee logging::LogMessage::~LogMessage() + 14
4   chrome_crashpad_handler             0x000000010158efd1 base::CommandLine::ForCurrentProcess() + 65
5   chrome_crashpad_handler             0x00000001015b60c9 logging::BaseInitLoggingImpl_built_with_NDEBUG(logging::LoggingSettings const&) + 25
6   chrome_crashpad_handler             0x000000010157a6ed crashpad::HandlerMain(int, char**, std::__1::vector<std::__1::unique_ptr<crashpad::UserStreamDataSource, std::__1::default_delete<crashpad::UserStreamDataSource> >, std::__1::allocator<std::__1::unique_ptr<crashpad::UserStreamDataSource, std::__1::default_delete<crashpad::UserStreamDataSource> > > > const*) + 93
7   chrome_crashpad_handler             0x000000010116da2a CrashpadHandlerMain + 90
8   libdyld.dylib                       0x00007fff68357cc9 start + 1

@nornagon
Copy link
Member

Is this a straight backport or is the patch modified?

@deepak1556
Copy link
Member Author

deepak1556 commented Oct 29, 2020

Crashpad patch from https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2425108
Base logging patch from https://chromium-review.googlesource.com/c/chromium/src/+/2490880

Patches have not been modified, just cherry-picked from different commits.

Comment on lines +81 to +82
- '76a9bb7475f6217eaf108789246379d3972b4e6a',
+ '5fc64bfbf1c000161445c586de45e40464ff2314',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patches to DEPS don't work as the dep is synced before our patches are applied.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be ignored, mini_chromium is not used when crashpad is built inside chromium

@deepak1556 deepak1556 merged commit f44880f into 11-x-y Oct 29, 2020
@release-clerk
Copy link

release-clerk bot commented Oct 29, 2020

Release Notes Persisted

fix debug.log files being created under working directory on windows

@deepak1556 deepak1556 deleted the robo/fix_crashpad_logging branch October 29, 2020 23:23
@trop
Copy link
Contributor

trop bot commented Oct 29, 2020

I have automatically backported this PR to "10-x-y", please check out #26266

@trop
Copy link
Contributor

trop bot commented Oct 29, 2020

I have automatically backported this PR to "9-x-y", please check out #26267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11-x-y backport-check-skip Skip trop's backport validity checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants