electron / electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS
https://electronjs.org
MIT License
113.83k stars 15.33k forks source link

EXC_CRASH (SIGABRT): Chrome_libJingle_WorkerThread thread #5082

Closed feross closed 8 years ago

feross commented 8 years ago

I get a EXC_CRASH (SIGABRT) crash. I have included the relevant parts of the stack trace below.

It looks like this crash is related to WebRTC (libjingle) in Electron. It's interesting that there is 2.1GB allocated to the stack. Could that be the source of the crash? That seems awfully high.

Any ideas?

Process:               WebTorrent Helper [17428]
Path:                  /Applications/WebTorrent.app/Contents/Frameworks/WebTorrent Helper.app/Contents/MacOS/WebTorrent Helper
Identifier:            io.webtorrent.webtorrent-helper
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        WebTorrent [17420]
Responsible:           WebTorrent [17420]
User ID:               501

Date/Time:             2016-04-07 04:32:56.517 -0700
OS Version:            Mac OS X 10.11.4 (15E65)
Report Version:        11
Anonymous UUID:        FA126C6B-FA6D-7F4F-CC5C-8C5CFA75A61C

Sleep/Wake UUID:       8DE067B3-67A0-4C9C-811A-1205104A1A44

Time Awake Since Boot: 66000 seconds
Time Since Wake:       2800 seconds

System Integrity Protection: enabled

Crashed Thread:        14  Chrome_libJingle_WorkerThread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called

...

Thread 14 Crashed:: Chrome_libJingle_WorkerThread
0   libsystem_kernel.dylib          0x00007fff92f6ff06 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff908d04ec pthread_kill + 90
2   libsystem_c.dylib               0x00007fff97c7a6e7 abort + 129
3   com.github.electron.framework   0x000000011067a2f5 0x10ec49000 + 27464437
4   com.github.electron.framework   0x000000011067a309 0x10ec49000 + 27464457
5   com.github.electron.framework   0x000000011067aad2 0x10ec49000 + 27466450
6   com.github.electron.framework   0x00000001117124a8 0x10ec49000 + 44864680
7   com.github.electron.framework   0x00000001116f5ba7 0x10ec49000 + 44747687
8   com.github.electron.framework   0x00000001116f1efd 0x10ec49000 + 44732157
9   com.github.electron.framework   0x00000001116f1c52 0x10ec49000 + 44731474
10  com.github.electron.framework   0x000000010fc78c73 0x10ec49000 + 16972915
11  com.github.electron.framework   0x000000010fc6eece 0x10ec49000 + 16932558
12  com.github.electron.framework   0x000000010ee075ca 0x10ec49000 + 1828298
13  com.github.electron.framework   0x000000010ee26149 0x10ec49000 + 1954121
14  com.github.electron.framework   0x000000010ee26688 0x10ec49000 + 1955464
15  com.github.electron.framework   0x000000010edfd111 0x10ec49000 + 1786129
16  com.github.electron.framework   0x000000010ee1df8a 0x10ec49000 + 1920906
17  com.github.electron.framework   0x000000010edfcb14 0x10ec49000 + 1784596
18  com.apple.CoreFoundation        0x00007fff885e3881 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19  com.apple.CoreFoundation        0x00007fff885c2fbc __CFRunLoopDoSources0 + 556
20  com.apple.CoreFoundation        0x00007fff885c24df __CFRunLoopRun + 927
21  com.apple.CoreFoundation        0x00007fff885c1ed8 CFRunLoopRunSpecific + 296
22  com.github.electron.framework   0x000000010edfd4df 0x10ec49000 + 1787103
23  com.github.electron.framework   0x000000010edfcf64 0x10ec49000 + 1785700
24  com.github.electron.framework   0x000000010ee36de3 0x10ec49000 + 2022883
25  com.github.electron.framework   0x000000010ee258ed 0x10ec49000 + 1951981
26  com.github.electron.framework   0x000000010ee56e88 0x10ec49000 + 2154120
27  com.github.electron.framework   0x000000010ee52f1c 0x10ec49000 + 2137884
28  libsystem_pthread.dylib         0x00007fff908cd99d _pthread_body + 131
29  libsystem_pthread.dylib         0x00007fff908cd91a _pthread_start + 168
30  libsystem_pthread.dylib         0x00007fff908cb351 thread_start + 13

...

VM Region Summary:
ReadOnly portion of Libraries: Total=311.0M resident=0K(0%) swapped_out_or_unallocated=311.0M(100%)
Writable regions: Total=2.2G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.2G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                  2048K        2 
CG shared images                   144K        5 
CoreAnimation                        8K        2 
Dispatch continuations            8192K        2 
IOKit                              408K        3 
Kernel Alloc Once                    8K        3 
MALLOC                            64.3M       24 
MALLOC guard page                   32K        7 
Memory Tag 255                   575.4M       67 
STACK GUARD                       64.0M     2049 
Stack                              2.1G     4097 
VM_ALLOCATE                       48.5M      128 
__DATA                            23.1M      215 
__IMAGE                            528K        2 
__LINKEDIT                       101.1M       12 
__TEXT                           209.9M      218 
__UNICODE                          552K        2 
mapped file                       54.7M       11 
shared memory                     4436K       12 
===========                     =======  ======= 
TOTAL                              3.2G     6842 

Full stack trace is here: https://gist.github.com/feross/9ced83fac050bd927b8afea3939a99fa

zcbenz commented 8 years ago

Crash stack trace:

base::MessagePumpCFRunLoopBase::RunWorkSource(void*) (in Electron Framework) (message_pump_mac.mm:309)
base::mac::CallWithEHFrame(void () block_pointer) (in Electron Framework) (call_with_eh_frame_asm.S:38)
base::MessagePumpCFRunLoopBase::RunWork() (in Electron Framework) (message_pump_mac.mm:330)
base::MessageLoop::DoWork() (in Electron Framework) (message_loop.cc:610)
base::MessageLoop::RunTask(base::PendingTask const&) (in Electron Framework) (message_loop.cc:487)
base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask const&) (in Electron Framework) (task_annotator.cc:51)
jingle_glue::JingleThreadWrapper::ProcessPendingSends() (in Electron Framework) (thread_wrapper.cc:215)
(anonymous namespace)::MediaController::Construct_w(cricket::MediaEngineInterface*) (in Electron Framework) (mediacontroller.cc:74)
webrtc::Call::Create(webrtc::Call::Config const&) (in Electron Framework) (call.cc:176)
webrtc::internal::Call::Call(webrtc::Call::Config const&) (in Electron Framework) (call.cc:200)
webrtc::CongestionController::CongestionController(webrtc::ProcessThread*, webrtc::CallStats*, webrtc::BitrateObserver*) (in Electron Framework) (congestion_controller.cc:175)
webrtc::ProcessThreadImpl::Start() (in Electron Framework) (process_thread_impl.cc:81)

It looks like an internal webrtc bug.

feross commented 8 years ago

Issue filed on the Chromium/WebRTC bug tracker here: https://bugs.chromium.org/p/webrtc/issues/detail?id=5766

feross commented 8 years ago

@zcbenz This issue may be related to another webrtc issue that causes the CPU to run at 100%, which I've seen happen in the wild with WebTorrent Desktop. This issue was fixed in Chrome 51.

Any chance we can skip upgrading to Chrome 50 and go straight to 51 to fix this critical issue?

zcbenz commented 8 years ago

We will upgrade to Chrome 51 when it enters stable channel, using a beta release may introduce other bugs while fixing only one problem.

feross commented 8 years ago

@zcbenz That's fair - I understand. Would it be possible to create a next branch or something similar where the next version of Chromium/node.js can be tested prior to an Electron release? That might help to make Electron more stable overall and prevent some the bugs that have affected the recent releases.

zcbenz commented 8 years ago

That sounds a good idea to me, the only problem is upgrading to new versions of Chrome takes lots of work, and we don't have time to maintain two branches at the same time.

zcbenz commented 8 years ago

Closing since Electron is now on Chrome 51.