Bug 189838 - Regression(Mojave): Resuming a WK2 download crashes
Summary: Regression(Mojave): Resuming a WK2 download crashes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-21 09:18 PDT by Chris Dumez
Modified: 2018-09-24 14:25 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.40 KB, patch)
2018-09-21 09:22 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (3.41 KB, patch)
2018-09-21 11:01 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-09-21 09:18:36 PDT
Resuming a WK2 download crashes on Mojave:
Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot create download task without request or resume data'
terminating with uncaught exception of type NSException
abort() called

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff34c8f43d __exceptionPreprocess + 256
1   libobjc.A.dylib                     0x00007fff60d22720 objc_exception_throw + 48
2   CFNetwork                           0x00007fff33b84a20 __85-[__NSURLSessionLocal downloadTaskForRequest:downloadFilePath:resumeData:completion:]_block_invoke + 0
3   WebKit                              0x000000010b887b07 _ZN6WebKit19NetworkSessionCocoa26downloadTaskWithResumeDataEP6NSData + 55
4   WebKit                              0x000000010b7b516b _ZN6WebKit8Download6resumeERKN3IPC13DataReferenceERKN3WTF6StringEONS_16SandboxExtension6HandleE + 651
5   WebKit                              0x000000010b89e5e7 _ZN6WebKit15DownloadManager14resumeDownloadEN3PAL9SessionIDENS_10DownloadIDERKN3IPC13DataReferenceERKN3WTF6StringEONS_16SandboxExtension6HandleE + 679
6   WebKit                              0x000000010b812202 _ZN6WebKit14NetworkProcess14resumeDownloadEN3PAL9SessionIDENS_10DownloadIDERKN3IPC13DataReferenceERKN3WTF6StringEONS_16SandboxExtension6HandleE + 114
7   WebKit                              0x000000010b6927b4 _ZN3IPC22callMemberFunctionImplIN6WebKit14NetworkProcessEMS2_FvN3PAL9SessionIDENS1_10DownloadIDERKNS_13DataReferenceERKN3WTF6StringEONS1_16SandboxExtension6HandleEENSt3__15tupleIJS4_S5_S6_SA_SE_EEEJLm0ELm1ELm2ELm3ELm4EEEEvPT_T0_OT1_NSI_16integer_sequenceImJXspT2_EEEE + 388
8   WebKit                              0x000000010b692290 _ZN3IPC18callMemberFunctionIN6WebKit14NetworkProcessEMS2_FvN3PAL9SessionIDENS1_10DownloadIDERKNS_13DataReferenceERKN3WTF6StringEONS1_16SandboxExtension6HandleEENSt3__15tupleIJS4_S5_S6_SA_SE_EEENSI_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEEEEvOT1_PT_T0_ + 96
9   WebKit                              0x000000010b68923a _ZN3IPC13handleMessageIN8Messages14NetworkProcess14ResumeDownloadEN6WebKit14NetworkProcessEMS5_FvN3PAL9SessionIDENS4_10DownloadIDERKNS_13DataReferenceERKN3WTF6StringEONS4_16SandboxExtension6HandleEEEEvRNS_7DecoderEPT0_T1_ + 474
10  WebKit                              0x000000010b686f1a _ZN6WebKit14NetworkProcess31didReceiveNetworkProcessMessageERN3IPC10ConnectionERNS1_7DecoderE + 1306
11  WebKit                              0x000000010b80c072 _ZN6WebKit14NetworkProcess17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 258
12  WebKit                              0x000000010b5e358a _ZN3IPC10Connection15dispatchMessageERNS_7DecoderE + 154
13  WebKit                              0x000000010b5d61c1 _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_7DecoderENS1_14default_deleteIS3_EEEE + 721
14  WebKit                              0x000000010b5e4107 _ZN3IPC10Connection26dispatchOneIncomingMessageEv + 1607
15  WebKit                              0x000000010b600b08 _ZZN3IPC10Connection22enqueueIncomingMessageENSt3__110unique_ptrINS_7DecoderENS1_14default_deleteIS3_EEEEEN4$_14clEv + 104
16  WebKit                              0x000000010b600a19 _ZN3WTF8FunctionIFvvEE15CallableWrapperIZN3IPC10Connection22enqueueIncomingMessageENSt3__110unique_ptrINS4_7DecoderENS6_14default_deleteIS8_EEEEE4$_14E4callEv + 25
17  JavaScriptCore                      0x0000000121ed90cd _ZNK3WTF8FunctionIFvvEEclEv + 173
18  JavaScriptCore                      0x0000000121f310ad _ZN3WTF7RunLoop11performWorkEv + 445
19  JavaScriptCore                      0x0000000121f31954 _ZN3WTF7RunLoop11performWorkEPv + 36
20  CoreFoundation                      0x00007fff34bf2405 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
21  CoreFoundation                      0x00007fff34bf23ab __CFRunLoopDoSource0 + 108
22  CoreFoundation                      0x00007fff34bd5e51 __CFRunLoopDoSources0 + 195
23  CoreFoundation                      0x00007fff34bd53fa __CFRunLoopRun + 1219
24  CoreFoundation                      0x00007fff34bd4ce4 CFRunLoopRunSpecific + 463
25  Foundation                          0x00007fff36f355da -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 280
26  Foundation                          0x00007fff36f354af -[NSRunLoop(NSRunLoop) run] + 76
27  libxpc.dylib                        0x00007fff62026ee6 _xpc_objc_main + 555
28  libxpc.dylib                        0x00007fff620269e5 _xpc_copy_xpcservice_dictionary + 0
29  com.apple.WebKit.Networking.Development 0x000000010b57f045 _ZN6WebKit14XPCServiceMainEiPPKc + 1333
30  com.apple.WebKit.Networking.Development 0x000000010b57f332 main + 34
31  libdyld.dylib                       0x00007fff61df0085 start + 1
Comment 1 Chris Dumez 2018-09-21 09:18:53 PDT
<rdar://problem/44618538>
Comment 2 Chris Dumez 2018-09-21 09:22:12 PDT
Created attachment 350371 [details]
Patch
Comment 3 Alex Christensen 2018-09-21 10:33:50 PDT
Comment on attachment 350371 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=350371&action=review

Do we have any tests for this?

> Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:52
> +    static NSSet *plistClasses = nil;

NSSet<something>?
Comment 4 Chris Dumez 2018-09-21 10:43:51 PDT
Comment on attachment 350371 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=350371&action=review

>> Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:52
>> +    static NSSet *plistClasses = nil;
> 
> NSSet<something>?

Global destructors are not allowed AFAIK.
Comment 5 Chris Dumez 2018-09-21 11:01:07 PDT
Created attachment 350387 [details]
Patch
Comment 6 Alex Christensen 2018-09-21 11:30:50 PDT
Comment on attachment 350387 [details]
Patch

:(
Comment 7 WebKit Commit Bot 2018-09-21 12:20:04 PDT
Comment on attachment 350387 [details]
Patch

Clearing flags on attachment: 350387

Committed r236343: <https://trac.webkit.org/changeset/236343>
Comment 8 WebKit Commit Bot 2018-09-21 12:20:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Geoffrey Garen 2018-09-24 14:22:27 PDT
Can Haz regression test?
Comment 10 Chris Dumez 2018-09-24 14:23:27 PDT
(In reply to Geoffrey Garen from comment #9)
> Can Haz regression test?

Our API tests do not run an HTTP server.
Comment 11 Alex Christensen 2018-09-24 14:25:41 PDT
I would love to fix this and many other such lacking tests with something like https://bugs.webkit.org/show_bug.cgi?id=148719