Enabling support for crash reports

376 views
Skip to first unread message

Asesh Shrestha

unread,
Feb 6, 2017, 8:52:45 AM2/6/17
to Chromium-dev
So I was going through this page: http://dev.chromium.org/developers/crash-reports. According to that page, I have to build crash_service but the built service is not an executable file as mentioned in that site. Instead it generates a static library file. After going through some sites, looks like maybe 'content_shell_crash_service' is responsible for doing so instead of crash_service. So I did launch content_shell_crash_service.exe and started our customized browser with --single-process and --noerrdialogs arguments. Now if I crash the browser by typing chrome://crash then none of the breakpoints in the methods of 'content_shell_crash_service.exe' are being  triggered. I have already modified the event name of 'running_event' when invoking CreateEvent in 'bool CrashService::Initialize'. I must be missing something. Can someone tell me what else should I do?

Thanks

PhistucK

unread,
Feb 6, 2017, 8:59:27 AM2/6/17
to Asesh Shrestha, Chromium-dev
If I am not mistaken, content_shell is a basic test binary for the content layer, it does not work with the chrome layer.


PhistucK

On Mon, Feb 6, 2017 at 3:52 PM, Asesh Shrestha <asesh.s...@cloudfactory.com> wrote:
So I was going through this page: http://dev.chromium.org/developers/crash-reports. According to that page, I have to build crash_service but the built service is not an executable file as mentioned in that site. Instead it generates a static library file. After going through some sites, looks like maybe 'content_shell_crash_service' is responsible for doing so instead of crash_service. So I did launch content_shell_crash_service.exe and started our customized browser with --single-process and --noerrdialogs arguments. Now if I crash the browser by typing chrome://crash then none of the breakpoints in the methods of 'content_shell_crash_service.exe' are being  triggered. I have already modified the event name of 'running_event' when invoking CreateEvent in 'bool CrashService::Initialize'. I must be missing something. Can someone tell me what else should I do?

Thanks

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.

Asesh Shrestha

unread,
Feb 6, 2017, 9:07:27 AM2/6/17
to Chromium-dev, asesh.s...@cloudfactory.com
Thanks for replying then how do I generate that service file? I did run ninja -C out\Debug_x64 crash_service but it's not an exe, instead it's a static library file. Looks like that document is outdated. Thanks


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Asesh Shrestha

unread,
Feb 8, 2017, 6:18:09 AM2/8/17
to Chromium-dev, asesh.s...@cloudfactory.com
I have tried almost everything and chrome://crashes will still display the same result: 

Crash reporting is disabled.

Crash reporting is not available in WorkStream.


I have already managed to get two instances of crash handlers (x86 and x64) running as service in the background. Can someone give me a pointer on how to do it? Thanks

Primiano Tucci

unread,
Feb 8, 2017, 9:34:45 AM2/8/17
to asesh.s...@cloudfactory.com, Chromium-dev
Crash reporting is not available in WorkStream.
This forum is about mainline chromium development, not forks or derivate products.
This seems to be about the WorkStream Browser not chromium.
If that's the case, this question is better asked to the cloudfactory support.
 Maybe that is simply intentionally disabled by the maintainers of WorkStream.

PhistucK

unread,
Feb 8, 2017, 9:51:41 AM2/8/17
to Primiano Tucci, Asesh Shrestha, Chromium-dev
:) But Asesh is the developer of the WorkStream browser, Asesh is trying to add support for crash reporting. Any advice?


PhistucK

On Wed, Feb 8, 2017 at 4:33 PM, Primiano Tucci <prim...@chromium.org> wrote:
Crash reporting is not available in WorkStream.
This forum is about mainline chromium development, not forks or derivate products.
This seems to be about the WorkStream Browser not chromium.
If that's the case, this question is better asked to the cloudfactory support.
 Maybe that is simply intentionally disabled by the maintainers of WorkStream.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.

Marshall Greenblatt

unread,
Feb 8, 2017, 10:24:14 AM2/8/17
to PhistucK, Primiano Tucci, Asesh Shrestha, Chromium-dev
There are quite a lot of reasons why crash reporting might be disabled in your build. We had to make some changes in Chromium code to get it working in CEF, for example. Reviewing the comments and commits linked from https://bitbucket.org/chromiumembedded/cef/issues/1995 might help you to debug the problem in your application.

Asesh Shrestha

unread,
Feb 8, 2017, 10:51:39 AM2/8/17
to Chromium-dev, phis...@gmail.com, prim...@chromium.org, asesh.s...@cloudfactory.com
Thanks guys for replying. I will look at it tomorrow at work and will let you know the result :)


On Wednesday, February 8, 2017 at 9:09:14 PM UTC+5:45, Marshall Greenblatt wrote:
There are quite a lot of reasons why crash reporting might be disabled in your build. We had to make some changes in Chromium code to get it working in CEF, for example. Reviewing the comments and commits linked from https://bitbucket.org/chromiumembedded/cef/issues/1995 might help you to debug the problem in your application.
On Wed, Feb 8, 2017 at 9:49 AM, PhistucK <phis...@gmail.com> wrote:
:) But Asesh is the developer of the WorkStream browser, Asesh is trying to add support for crash reporting. Any advice?


PhistucK

On Wed, Feb 8, 2017 at 4:33 PM, Primiano Tucci <prim...@chromium.org> wrote:
Crash reporting is not available in WorkStream.
This forum is about mainline chromium development, not forks or derivate products.
This seems to be about the WorkStream Browser not chromium.
If that's the case, this question is better asked to the cloudfactory support.
 Maybe that is simply intentionally disabled by the maintainers of WorkStream.

Asesh Shrestha

unread,
Feb 8, 2017, 11:11:58 AM2/8/17
to Chromium-dev, phis...@gmail.com, prim...@chromium.org, asesh.s...@cloudfactory.com
One quick question to Marshall Greenblatt: Are you guys using in-process crash handler or external crash handler processes (GoogleCrashHandler.exe and GoogleCrashHandler64.exe)? If we set usagestats to 1 in registry (For Chrome: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Update\ClientState\{8A69D345-D564-463C-AFF1-A69D9E530F96}) then GoogleCrashHandler.exe and GoogleCrashHandler64.exe will continue to run and it's responsible for sending those data to Google. That's what I did too and got stuck.


On Wednesday, February 8, 2017 at 9:09:14 PM UTC+5:45, Marshall Greenblatt wrote:
There are quite a lot of reasons why crash reporting might be disabled in your build. We had to make some changes in Chromium code to get it working in CEF, for example. Reviewing the comments and commits linked from https://bitbucket.org/chromiumembedded/cef/issues/1995 might help you to debug the problem in your application.
On Wed, Feb 8, 2017 at 9:49 AM, PhistucK <phis...@gmail.com> wrote:
:) But Asesh is the developer of the WorkStream browser, Asesh is trying to add support for crash reporting. Any advice?


PhistucK

On Wed, Feb 8, 2017 at 4:33 PM, Primiano Tucci <prim...@chromium.org> wrote:
Crash reporting is not available in WorkStream.
This forum is about mainline chromium development, not forks or derivate products.
This seems to be about the WorkStream Browser not chromium.
If that's the case, this question is better asked to the cloudfactory support.
 Maybe that is simply intentionally disabled by the maintainers of WorkStream.

Marshall Greenblatt

unread,
Feb 8, 2017, 11:21:26 AM2/8/17
to Asesh Shrestha, Chromium-dev, PhistucK, Primiano Tucci
On Wed, Feb 8, 2017 at 11:11 AM, Asesh Shrestha <asesh.s...@cloudfactory.com> wrote:
One quick question to Marshall Greenblatt: Are you guys using in-process crash handler or external crash handler processes (GoogleCrashHandler.exe and GoogleCrashHandler64.exe)? If we set usagestats to 1 in registry (For Chrome: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Update\ClientState\{8A69D345-D564-463C-AFF1-A69D9E530F96}) then GoogleCrashHandler.exe and GoogleCrashHandler64.exe will continue to run and it's responsible for sending those data to Google. That's what I did too and got stuck.

We use a separate crash handler process that is started by the application and exits after the application exits. Take a look at components/crash/content/app/crashpad_win.cc and components/crash/content/app/crashpad_mac.mm which are responsible for launching this process on Windows and macOS respectively.
 
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.

Asesh Shrestha

unread,
Feb 11, 2017, 9:58:48 PM2/11/17
to Chromium-dev
After debugging I managed to find out that it will check for policies here: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\WorkStream: MetricsReportingEnabled (DWORD). If MetricsReportingEnabled is 1 then it will upload crash reports else it won't. I also noticed that even if you launch Chromium with --single-process, it will spawn two instances.  The other instance is responsible for checking policies, generating crash dumps and uploading it too. After debugging the crash handler instance, I had to make some changes:

@@ -575,7 +575,7 @@ bool GetDefaultUserDataDirectory(base::string16* result) {
*result = user_data_dir_path.get();
if ((*result)[result->length() - 1] != L'\\')
- result->append(L"\\");
+ result->append(L"\\CloudFactory\\");
result->append(install_sub_directory);
result->append(L"\\");
result->append(kUserDataDirname);
@@ -55,8 +55,8 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
base::FilePath database_path; // Only valid in the browser process.
bool result = false;
- const char kPipeNameVar[] = "CHROME_CRASHPAD_PIPE_NAME";
- const char kServerUrlVar[] = "CHROME_CRASHPAD_SERVER_URL";
+ const char kPipeNameVar[] = "WORKSTREAM_CRASHPAD_PIPE_NAME";
+ const char kServerUrlVar[] = "WORKSTREAM_CRASHPAD_SERVER_URL";
std::unique_ptr<base::Environment> env(base::Environment::Create());
if (initial_client) {
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
@@ -69,10 +69,22 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
GetPlatformCrashpadAnnotations(&process_annotations);
#if defined(GOOGLE_CHROME_BUILD)
+
std::string url = "https://clients2.google.com/cr/report";
-#else
- std::string url;
-#endif
+
+#else // WorkStream
+
+#ifdef _DEBUG // Debug version
+
+ std::string url = "http://192.168.99.100:9090/service/crash_report/"; // Our crash reporting URL
+
+#else // Release version
+
+ std::string url = ""; // Removed for security reasons :)
+
+#endif // _DEBUG
+
+#endif // GOOGLE_CHROMIUM_BUILD
// Allow the crash server to be overridden for testing. If the variable
// isn't present in the environment then the default URL will remain.

@@ -26,7 +26,16 @@ namespace {
const wchar_t kTestPipeName[] = L"\\\\.\\pipe\\WorkStreamCrashServices";
-const wchar_t kCrashReportURL[] = L"https://clients2.google.com/cr/report";
+#ifdef _DEBUG // Debug version
+
+const wchar_t kCrashReportURL[] = L"http://192.168.99.100:9090/service/crash_report/";
+
+#else // Release version
+
+const wchar_t kCrashReportURL[] = L""; // Removed for security reasons :)
+
+#endif // _DEBUG
+
const wchar_t kCheckPointFile[] = L"crash_checkpoint.txt";
typedef std::map<std::wstring, std::wstring> CrashMap;
@@ -276,7 +285,7 @@ bool CrashService::Initialize(const base::FilePath& operating_dir,
// Create or open an event to signal the browser process that the crash
// service is initialized.
HANDLE running_event =
- ::CreateEventW(NULL, TRUE, TRUE, L"g_chrome_crash_svc");
+ ::CreateEventW(NULL, TRUE, TRUE, L"g_cf_workstream_crash_svc"); // Changed the name of event so that it won't collide with Chrome
// If the browser already had the event open, the CreateEvent call did not
// signal it. We need to do it manually.
::SetEvent(running_event);

We are using our own customized Omaha server forked from Crystalnix Omaha server. That's it.

Thanks
Reply all
Reply to author
Forward
0 new messages