Bug 173493 - WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging is crashing
Summary: WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging is crashing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-06-16 13:27 PDT by youenn fablet
Modified: 2019-06-10 04:11 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.60 KB, patch)
2017-06-16 13:40 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2017-06-16 13:27:49 PDT
Thread 0 Crashed:
0   WebCore                       	0x0000000189246b5c WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging() + 4 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/WebCore/WebCore-7604.1.25.4.2/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:994)
1   WebCore                       	0x000000018868da58 WebCore::ThreadTimers::sharedTimerFiredInternal() + 172 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/WebCore/WebCore-7604.1.25.4.2/platform/ThreadTimers.cpp:118)
2   WebCore                       	0x000000018868d998 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/WebCore/WebCore-7604.1.25.4.2/platform/cf/MainThreadSharedTimerCF.cpp:74)
3   CoreFoundation                	0x0000000183588b88 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/CF/CF-1433.30/RunLoop.subproj/CFRunLoop.c:1827)
4   CoreFoundation                	0x00000001835888ac __CFRunLoopDoTimer + 864 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/CF/CF-1433.30/RunLoop.subproj/CFRunLoop.c:2366)
5   CoreFoundation                	0x0000000183588150 __CFRunLoopDoTimers + 248 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/CF/CF-1433.30/RunLoop.subproj/CFRunLoop.c:2505)
6   CoreFoundation                	0x0000000183585c74 __CFRunLoopRun + 1712 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/CF/CF-1433.30/RunLoop.subproj/CFRunLoop.c:3002)
7   CoreFoundation                	0x00000001834a4280 CFRunLoopRunSpecific + 436 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/CF/CF-1433.30/RunLoop.subproj/CFRunLoop.c:3148)
8   Foundation                    	0x0000000184075620 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/Foundation/Foundation-1433.32/Soil.subproj/NSRunLoop.m:367)
9   Foundation                    	0x00000001840c8734 -[NSRunLoop(NSRunLoop) run] + 88 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/Foundation/Foundation-1433.32/Soil.subproj/NSRunLoop.m:389)
10  libxpc.dylib                  	0x0000000182514324 _xpc_objc_main + 516 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/libxpc/libxpc-1173/src/main.m:198)
11  libxpc.dylib                  	0x0000000182516330 xpc_main + 180 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/libxpc/libxpc-1173/src/init.c:1461)
12  com.apple.WebKit.WebContent   	0x0000000103c9759c main + 380 (/BuildRoot/Library/Caches/com.apple.xbs/Sources/WebKit2/WebKit2-7604.1.25.4.2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:148)
13  libdyld.dylib                 	0x0000000182295e40 start + 4
Comment 1 youenn fablet 2017-06-16 13:40:45 PDT
Created attachment 313123 [details]
Patch
Comment 2 youenn fablet 2017-06-16 13:41:03 PDT
rdar://problem/32819360
Comment 3 WebKit Commit Bot 2017-06-16 16:49:03 PDT
Comment on attachment 313123 [details]
Patch

Clearing flags on attachment: 313123

Committed r218428: <http://trac.webkit.org/changeset/218428>
Comment 4 WebKit Commit Bot 2017-06-16 16:49:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Adrian 2019-06-10 04:11:34 PDT
This still happens for me in iOS 12.3.1.
Scenario: frequently creating and closing new RTCPeerConnection's

Incident Identifier: CF3ED574-9EF4-4E47-A5BD-608C6B5B66AF
CrashReporter Key:   02c1826a78c3d8f24a5a112d7e5256cadbb752cc
Hardware Model:      iPhone7,2
Process:             com.apple.WebKit.WebContent [761]
Path:                /System/Library/Frameworks/WebKit.framework/XPCServices/com.apple.WebKit.WebContent.xpc/com.apple.WebKit.WebContent
Identifier:          com.apple.WebKit.WebContent
Version:             8607.2.6.0.1 (8607)
Code Type:           ARM-64 (Native)
Role:                Unspecified
Parent Process:      launchd [1]
Coalition:           com.apple.mobilesafari [548]


Date/Time:           2019-06-10 12:52:40.0635 +0200
Launch Time:         2019-06-10 12:51:11.9058 +0200
OS Version:          iPhone OS 12.3.1 (16F203)
Baseband Version:    7.70.01
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Region Info: 0 is not in any region.  Bytes before following region: 4305338368
      REGION TYPE                      START - END             [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                 00000001009e4000-00000001009e8000 [   16K] r-x/r-x SM=COW  ...it.WebContent

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [761]
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   WebCore                       	0x000000020575d4e0 WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging+ 726240 () + 8
1   WebCore                       	0x00000002068b320c WebCore::ThreadTimers::sharedTimerFiredInternal+ 18903564 () + 216
2   WebCore                       	0x00000002068d3258 WebCore::timerFired+ 19034712 (__CFRunLoopTimer*, void*) + 28
3   CoreFoundation                	0x00000001fcdeb650 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
4   CoreFoundation                	0x00000001fcdeb380 __CFRunLoopDoTimer + 864
5   CoreFoundation                	0x00000001fcdeabb4 __CFRunLoopDoTimers + 248
6   CoreFoundation                	0x00000001fcde5b04 __CFRunLoopRun + 1844
7   CoreFoundation                	0x00000001fcde50b0 CFRunLoopRunSpecific + 436
8   Foundation                    	0x00000001fd7b2fac -[NSRunLoop+ 32684 (NSRunLoop) runMode:beforeDate:] + 300
9   Foundation                    	0x00000001fd7ee46c -[NSRunLoop+ 275564 (NSRunLoop) run] + 88
10  libxpc.dylib                  	0x00000001fcab8a44 _xpc_objc_main + 516
11  libxpc.dylib                  	0x00000001fcabb3a4 xpc_main + 176
12  com.apple.WebKit.WebContent   	0x00000001009e760c 0x1009e4000 + 13836
13  com.apple.WebKit.WebContent   	0x00000001009e77b8 0x1009e4000 + 14264
14  libdyld.dylib                 	0x00000001fc8aa8e0 start + 4