Start brave without --enable-crashpad

On Arch Linux up to date today
Version 1.29.81 Chromium: 93.0.4577.82 (Official Build) (64-bit)

Brave is started with --enable-crashpad ignoring settings and resulting in frequent unnecessary writes to disk.

The bash script that starts the brave binary does not put this setting so it must be hardcoded to the binary.

Is there a user flag we can set to override this?

Currently switching to firefox.

Thanks

I suspect the issue here is inherited from Chromium. For now, Chromium insists that --enable-crashpad be automatically enabled on Linux. Here are a few code-samples from the time of this writing:

› chrome/app/chrome_main.cc

#if defined(OS_LINUX)
  // TODO(https://crbug.com/1176772): Remove when Chrome Linux is fully migrated
  // to Crashpad.
  base::CommandLine::ForCurrentProcess()->AppendSwitch(
      ::switches::kEnableCrashpad);
#endif

This is probably the main block of code in this case. If the user’s OS is Linux, then the Chromium bits automatically add the --enable-crashpad switch. This is then key in a few other decisions made by the code from that point forward:

› components/crash/core/app/crashpad_linux.cc

bool IsCrashpadEnabled() {
  return base::CommandLine::ForCurrentProcess()->HasSwitch(
      ::switches::kEnableCrashpad);
}

› chrome/browser/chrome_content_browser_client.cc

#if defined(OS_MAC)
…
#elif defined(OS_POSIX)
  #if defined(OS_ANDROID)
    bool enable_crash_reporter = true;
  #else
    bool enable_crash_reporter = false;
    if (crash_reporter::IsCrashpadEnabled()) {
      command_line->AppendSwitch(switches::kEnableCrashpad);
      enable_crash_reporter = true;

      int fd;
      pid_t pid;
      if (crash_reporter::GetHandlerSocket(&fd, &pid)) {
        command_line->AppendSwitchASCII(
            crash_reporter::switches::kCrashpadHandlerPid,
            base::NumberToString(pid));
      }
    } else {
      enable_crash_reporter = breakpad::IsCrashReporterEnabled();
    }
  #endif
…
#endif

› chrome/common/service_process_util.cc

#if defined(OS_LINUX) || defined(OS_CHROMEOS)
  if (crash_reporter::IsCrashpadEnabled()) {
    command_line->AppendSwitch(switches::kEnableCrashpad);

    pid_t pid;
    if (crash_reporter::GetHandlerSocket(nullptr, &pid)) {
      command_line->AppendSwitchASCII(
          crash_reporter::switches::kCrashpadHandlerPid,
          base::NumberToString(pid));
    }
  }
#endif

I’ll check with the core-team to see if this behavior is preserved (and intentionally so) in Brave. Thank you for bringing this to our attention!

2 Likes

Any update?
–enable-crashpad still running despite settings

The main issue for me is the memory consumption (and disk write). If its less, no problems of running in background.

no updates?

this thing is sucking 100% of my ram, over and over, and over
i have to shut everything down and restart, because it completely stops all processes

on that note, how come nobody in the history of computers has ever figured out not to allow a single program to consume all the power?
it seems like a simple, single line of code, ‘if x=70% and is growing, then throttle back to 50%’ so a person can still do things instead of shutting down

One resolution of this issue is to create a tmpfs to absorb the writes.

Do we know where these writes are going? If so then I will create a tmpfs to capture this activity and spare my SSD the completely unnecessary erosion.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.