brave-browser: Segmentation fault when launching a second window via terminal

Description

Segmentation fault when launching a second window via terminal.

Steps to Reproduce

  1. Launch brave from terminal
  2. Open a new terminal window and launch a second window
  3. Console logs segmentation fault and exits but the second browser window is still opened

Actual result:

Release (Manjaro): No crash dump ID generated for release on Ubuntu

User namespaces are not detected as enabled on your system, brave will run with the sandbox disabled
Opening in existing browser session.
[106257:106257:0417/082009.710955:ERROR:sandbox_linux.cc(364)] InitializeSandbox() called with multiple threads in process gpu-process.
Segmentation fault (core dumped)

Beta: Crash Dump

brave-browser-beta 
--2019-04-17 08:46:19--  https://laptop-updates.brave.com/1/bc-crashes
Resolving laptop-updates.brave.com (laptop-updates.brave.com)... 151.101.21.7
Connecting to laptop-updates.brave.com (laptop-updates.brave.com)|151.101.21.7|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16 [text/html]
Saving to: ‘/dev/fd/4’

     0K  
 Crash dump id:  5ad446cca388b589 
                                                  100% 2.18M=0s

2019-04-17 08:46:19 (2.18 MB/s) - ‘/dev/fd/4’ saved [16/16]

Segmentation fault (core dumped)

Dev: Crash dump

brave-browser-dev
--2019-04-17 08:47:01--  https://laptop-updates.brave.com/1/bc-crashes
Resolving laptop-updates.brave.com (laptop-updates.brave.com)... 151.101.21.7
Connecting to laptop-updates.brave.com (laptop-updates.brave.com)|151.101.21.7|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16 [text/html]
Saving to: ‘/dev/fd/4’

     0K          
 Crash dump id:  16e3a3a988197e80 
                                          100% 2.06M=0s

2019-04-17 08:47:01 (2.06 MB/s) - ‘/dev/fd/4’ saved [16/16]

Segmentation fault (core dumped)

Expected result:

No segmentation fault to be shown when launching a second window via terminal

Reproduces how often:

Easy

Brave version (brave://version info)

Brave 0.62.51 Chromium: 73.0.3683.103 (Official Build) (64-bit)
Revision e82a658d8159cabbd4938c1660f9bb00b4a82a23-refs/branch-heads/3683@{#902}
OS Linux

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds? Yes

Website problems only:

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Is the issue reproducible on the latest version of Chrome? N/A

Additional Information

Issue originally reported on community. https://community.brave.com/t/second-launch-gives-segmentation-fault/53664/5

cc: @fmarier @bbondy

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 18
  • Comments: 22 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Workaround to make xdg-open work as expected is to make sure the executable that brave.desktop is calling always returns 0 exit code, for example make it execute a wrapper script like this one:

#!/bin/sh

/usr/bin/brave "$@" || true

I have a similar problem, opening external links opens 3 new tabs with the same url. Opening links directly from the terminal results in segmentation fault, but it only opens 1 new tab.

I’m happy the work around is released, but fear that as it no longer bites people, the motivation to fix the root cause will atrophy 😕

Clicking on links in the desktop brings that annoying popup on Xubuntu too. Here is a strace, if it may help: https://gist.githubusercontent.com/teresaejunior/e5c0f6b51f2d93e2ffe4fda1953d5b4d/raw/2d5d665b7f72b2e6421627ff6e8609d2b37144a4/strace

It crashes the whole browser with exit code 139.

In that case, you’re seeing a different issue on that machine. This is most likely #7581 (inherited from the last Chromium merge).

The work-around has been merged to the Beta (0.70.x) and Dev (0.71.x) branches too.

I’m going to take a look at this, it’s a pretty bad papercut.