Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Brave crashing when tabs are discarded (crash megathread) #14955

Closed
LaurenWags opened this issue Aug 5, 2018 · 17 comments
Closed

Brave crashing when tabs are discarded (crash megathread) #14955

LaurenWags opened this issue Aug 5, 2018 · 17 comments
Assignees
Labels
0.23.x issue first seen in 0.23.x cr68 crash priority/P1 Blocks development or testing. Product cannot run. Must be fixed immediately, shipped next release. QA/checked-Linux QA/checked-macOS QA/checked-Win64 QA/test-plan-specified release-notes/include

Comments

@LaurenWags
Copy link
Member

LaurenWags commented Aug 5, 2018

Description

Multiple reports from community, etc of Brave 0.23.77 crashing. Unfortunately no STR, users report it happens randomly, sometimes when opening a tab or clicking on a link.

Test plan / Steps to Reproduce

  1. BRAVE_ENABLE_DEBUG_MENU=1 [path to your brave binary]
  2. turn off tab previews in preferences
  3. Debug Menu -> Allow manual tab discarding
  4. Right-click a loaded inactive tab and choose Discard

Actual result:
Brave Crashes

Expected result:
Brave should not crash

Reproduces how often:
frequently for users affected

Brave Version

0.23.77 generally on Windows 7 and 10 so far

Reproducible on current live release:
yes

Additional Information

cc @bsclifton @aekeus

@LaurenWags LaurenWags added crash 0.23.x issue first seen in 0.23.x cr68 labels Aug 5, 2018
@areguig
Copy link

areguig commented Aug 6, 2018

Having the issue with multiple windows 7 and 10 devices when updated/installed 0.23.77.
It happens when a new tab is created.
in debug.log i have a new line :

[0806/132051.486:ERROR:http_transport_win.cc(273)] WinHttpSendRequest: A security error occurred (0x2f8f)

everytime the app crashes

@LaurenWags
Copy link
Member Author

@areguig could you go to chrome://crashes and grab the 'Uploaded Crash Report Ids' that correspond to the times you see the Brave crash? These should be near the top of the list.

@Redback812
Copy link

Crash on OSX 10.13.6

Uploaded Crash Report ID 38f7d89f63911f24
(Local Crash ID: 1d89de67-5dde-4ec1-a99e-7728d61b2116)

@areguig
Copy link

areguig commented Aug 6, 2018

@LaurenWags tried to send the report but it is stuck on (upload requested by user, not yet uploaded)

Local Crash ID 9fc54bfe-2fb1-4b80-b30d-fc753456e383
Crash report captured on Monday, August 6, 2018 at 1:25:52 PM (upload requested by user, not yet uploaded)

@bsclifton
Copy link
Member

bsclifton commented Aug 6, 2018

@jumde reports this link still crashes - https://maustin.net/hax/brave/
(don't visit unless you're prepared to crash!)

<!DOCTYPE html>
<html>
    <head>
      <script>
        window.pop = ()=>{
          open('about:blank').open('data:text/html,<script>document.write(process.cwd())</sc'+'ript>') 
        };
      </script>
    </head>
    <body>
        <a href="#" onclick="window.pop()"><h1>Click</h1></a>
    </body>
</html>

@JC-Coelho
Copy link

JC-Coelho commented Aug 7, 2018

Yes I get a lot of crashes to the desktop this side. Mainly while opening a new tab. Windows 10 32-bit same version.

@chrlyons
Copy link

chrlyons commented Aug 7, 2018

I keep running into this on OSX, I typically have about 5-8 tabs for Jira and 1 for Gmail:

Process: Brave [19816]
Path: /Applications/Brave.app/Contents/MacOS/Brave
Identifier: com.electron.brave
Version: 0.23.77 (8.0.6)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Brave [19816]
User ID: 501

Date/Time: 2018-08-07 10:44:25.755 -0500
OS Version: Mac OS X 10.13.6 (17G65)
Report Version: 12
Anonymous UUID: A34F5D5D-2BC9-309E-A16A-AA246951021E

Sleep/Wake UUID: 6BAC79D5-FD2D-4503-BB13-F5F6D599CC4C

Time Awake Since Boot: 690000 seconds
Time Since Wake: 7000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

[removed crash report with missing symbols]

@ghost
Copy link

ghost commented Aug 7, 2018

I'm on mac osx I get same problem

@LaurenWags
Copy link
Member Author

@chrlyons @charlesgdalton do either of you have steps to reproduce the crash or specific sites that crash Brave?

@chrlyons
Copy link

chrlyons commented Aug 7, 2018 via email

@LaurenWags
Copy link
Member Author

Thanks @chrlyons - keep us posted!

@bsclifton bsclifton self-assigned this Aug 7, 2018
@bsclifton bsclifton added this to the 0.23.x Hotfix 2 milestone Aug 7, 2018
@Brave-Matt
Copy link

Posting on Twitter users behalf:
Uploaded Crash Report ID 2d3c74d1995e748c (Local Crash ID: a6d6c2f4-f532-421b-802e-f0b8371e4039)
Crash report captured on Tuesday, 7 August 2018 at 13:02:46
uploaded on Tuesday, 7 August 2018 at 13:02:49

@darkdh
Copy link
Member

darkdh commented Aug 8, 2018

Crash reason Check failed: !is_being_destroyed_. in WebContentsImpl::~WebContentsImpl() due to double delete
fix in brave/muon@25f50e6
muon 8.0.7
5b6886cad4b3db001fcb8fe6.decoded.zip

Operating system: Windows NT
                  10.0.17134 1
CPU: amd64
     family 22 model 48 stepping 1
     4 CPUs

GPU: UNKNOWN

Crash reason:  EXCEPTION_BREAKPOINT
Crash address: 0x7ff73cc012df
Process uptime: 38 seconds

Thread 0 (crashed)
 0  Brave.exe!content::WebContentsImpl::~WebContentsImpl() [web_contents_impl.cc : 559 + 0x0]
    rax = 0x00007ff7401c8be0   rdx = 0x0000000000000001
    rcx = 0x00000278309ad060   rbx = 0x00007ff7401f9cb0
    rsi = 0x00000278309ad060   rdi = 0x0000000000000001
    rbp = 0x000000d7d68fe7e0   rsp = 0x000000d7d68fe760
     r8 = 0x00000278298b6cc0    r9 = 0x0000000000008000
    r10 = 0x00000000000000d0   r11 = 0x000000d7d68fe320
    r12 = 0x000000d7d68fe8f8   r13 = 0x00000278309ad060
    r14 = 0x0000027830c1b710   r15 = 0x00000278309b4320
    rip = 0x00007ff73cc012df
    Found by: given as instruction pointer in context
 1  Brave.exe!RtlUnwindEx + 0x40ed20
    rbp = 0x000000d7d68fe7e0   rsp = 0x000000d7d68fe790
    rip = 0x00007ff740444aa0
    Found by: stack scanning
 2  Brave.exe!RtlUnwindEx + 0x192470
    rbp = 0x000000d7d68fe7e0   rsp = 0x000000d7d68fe7c8
    rip = 0x00007ff7401c81f0
    Found by: stack scanning
 3  Brave.exe!content::WebContentsImpl::~WebContentsImpl [web_contents_impl.cc : 556 + 0x11]
    rbp = 0x000000d7d68fe7e0   rsp = 0x000000d7d68fe7d0
    rip = 0x00007ff73cc142aa
    Found by: stack scanning
 4  Brave.exe!RtlUnwindEx + 0x40ed20
    rbp = 0x000000d7d68fe7e0   rsp = 0x000000d7d68fe7d8
    rip = 0x00007ff740444aa0
    Found by: stack scanning
 5  Brave.exe!RtlUnwindEx + 0x1c3f30
    rsp = 0x000000d7d68fe830   rip = 0x00007ff7401f9cb0
    Found by: stack scanning
 6  Brave.exe!content::WebContentsImpl::~WebContentsImpl [web_contents_impl.cc : 556 + 0x5]
    rsp = 0x000000d7d68fe870   rip = 0x00007ff73cc1429e
    Found by: stack scanning
 7  Brave.exe!resource_coordinator::GuestTabManager::DestroyOldContents(std::unique_ptr<content::WebContents,std::default_delete<content::WebContents> >) [guest_tab_manager.cc : 64 + 0xf]
    rsp = 0x000000d7d68fe880   rip = 0x00007ff73ce35513
    Found by: stack scanning
 8  Brave.exe!resource_coordinator::TabLifecycleUnitSource::TabLifecycleUnit::FinishDiscard(resource_coordinator::DiscardReason) [tab_lifecycle_unit.cc : 434 + 0x9]
    rsp = 0x000000d7d68fe8b0   rip = 0x00007ff73ce38567
    Found by: stack scanning
 9  ntdll.dll + 0x10428
    rsp = 0x000000d7d68fe8c0   rip = 0x00007ff9b4000428
    Found by: stack scanning
10  Brave.exe!resource_coordinator::TabLifecycleUnitSource::TabLifecycleUnit::Discard(resource_coordinator::DiscardReason) [tab_lifecycle_unit.cc : 360 + 0x8]
    rsp = 0x000000d7d68fe9c0   rip = 0x00007ff73ce38ab6
    Found by: stack scanning
11  Brave.exe!resource_coordinator::TabManager::DiscardTabImpl(resource_coordinator::DiscardReason) [tab_manager.cc : 642 + 0x1a]
    rsp = 0x000000d7d68fea00   rip = 0x00007ff73ce3b21f
    Found by: stack scanning
12  Brave.exe!resource_coordinator::TabManager::LogMemoryAndDiscardTab(resource_coordinator::DiscardReason) [tab_manager.cc : 308 + 0x22]
    rsp = 0x000000d7d68fea70   rip = 0x00007ff73ce3b2e4
    Found by: stack scanning
13  Brave.exe!RtlUnwindEx + 0x16bae0
    rsp = 0x000000d7d68fea80   rip = 0x00007ff7401a1860
    Found by: stack scanning
14  Brave.exe!resource_coordinator::TabManager::OnMemoryPressure(base::MemoryPressureListener::MemoryPressureLevel) [tab_manager.cc : 530 + 0x10]
    rsp = 0x000000d7d68fea90   rip = 0x00007ff73ce3ad8f
    Found by: stack scanning
...

@bsclifton bsclifton added the priority/P1 Blocks development or testing. Product cannot run. Must be fixed immediately, shipped next release. label Aug 9, 2018
@bsclifton
Copy link
Member

bsclifton commented Aug 9, 2018

I strongly believe we have identified and fixed the root cause for this issue 😄 I've gone through a decent number of crash dumps and all of them have the same root cause (called out by @darkdh with fix he also notes)

We'll start testing the fix immediately and should have a hotfix out soon (within 24 hours)

@LaurenWags
Copy link
Member Author

LaurenWags commented Aug 9, 2018

Verified with macOS 10.12.6 using

  • 0.23.79 51b4905
  • Muon 8.0.7
  • libchromiumcontent 68.0.3440.84
  • also verified STR produce the crash on 0.23.73 and 0.23.77

Verified with Ubuntu 18 x64 using

  • 0.23.79 51b4905
  • Muon 8.0.7
  • libchromiumcontent 68.0.3440.84

Verified on Windows x64 with
• 0.23.79 51b4905
• Muon 8.0.7
• libchromiumcontent 68.0.3440.84

@bsclifton bsclifton changed the title multiple reports of Brave crashing on 0.23.77 Brave crashing when tabs are discarded (crash megathread) Aug 9, 2018
@bsclifton
Copy link
Member

bsclifton commented Aug 10, 2018

And we're now live with this fix 😄 If you've been experiencing this issue, please check for updates- our newest version is 0.23.79

@JC-Coelho
Copy link

JC-Coelho commented Aug 11, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0.23.x issue first seen in 0.23.x cr68 crash priority/P1 Blocks development or testing. Product cannot run. Must be fixed immediately, shipped next release. QA/checked-Linux QA/checked-macOS QA/checked-Win64 QA/test-plan-specified release-notes/include
Projects
None yet
Development

No branches or pull requests