Bug 203902 - Make sure we never end up with NetworkDataTaskCocoa TaskIdentifier conflicts
Summary: Make sure we never end up with NetworkDataTaskCocoa TaskIdentifier conflicts
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: 201822
  Show dependency treegraph
 
Reported: 2019-11-06 08:32 PST by Chris Dumez
Modified: 2019-11-06 18:21 PST (History)
8 users (show)

See Also:


Attachments
Patch (9.50 KB, patch)
2019-11-06 08:37 PST, 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 2019-11-06 08:32:47 PST
Make sure we never end up with NetworkDataTaskCocoa TaskIdentifier conflicts.
Comment 1 Chris Dumez 2019-11-06 08:37:50 PST
Created attachment 382930 [details]
Patch
Comment 2 WebKit Commit Bot 2019-11-06 12:14:18 PST
Comment on attachment 382930 [details]
Patch

Clearing flags on attachment: 382930

Committed r252141: <https://trac.webkit.org/changeset/252141>
Comment 3 WebKit Commit Bot 2019-11-06 12:14:20 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2019-11-06 12:15:18 PST
<rdar://problem/56953662>
Comment 5 Alex Christensen 2019-11-06 18:04:07 PST
Comment on attachment 382930 [details]
Patch

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

> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1247
> +    RELEASE_ASSERT(!map.contains(taskIdentifier));

This will be hit in practice.  I think we should just roll this out and fix it the right way in https://bugs.webkit.org/show_bug.cgi?id=203934
Comment 6 Chris Dumez 2019-11-06 18:06:34 PST
(In reply to Alex Christensen from comment #5)
> Comment on attachment 382930 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=382930&action=review
> 
> > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1247
> > +    RELEASE_ASSERT(!map.contains(taskIdentifier));
> 
> This will be hit in practice.  I think we should just roll this out and fix
> it the right way in https://bugs.webkit.org/show_bug.cgi?id=203934

I did not add any new assertion, so I am not sure I understand why.

Please do NOT revert.
Comment 7 Chris Dumez 2019-11-06 18:21:51 PST
Comment on attachment 382930 [details]
Patch

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

>>> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1247
>>> +    RELEASE_ASSERT(!map.contains(taskIdentifier));
>> 
>> This will be hit in practice.  I think we should just roll this out and fix it the right way in https://bugs.webkit.org/show_bug.cgi?id=203934
> 
> I did not add any new assertion, so I am not sure I understand why.
> 
> Please do NOT revert.

I don't think we generally revert patches without proof that something is wrong. You claim that this assertion will be hit in practice but have not explained at all why it would be. Also, note that I merely turned this debug assertion into a release one. If it really gets hit, I'd argue a crash is better than a security bug.

My patch is simply refactoring the code to have it in a single place and strengthening the assertions. Therefore, I am not sure what you mean by fixing the right way. https://bugs.webkit.org/show_bug.cgi?id=203934 re-enables isolated sessions, it does not simply fix things.