Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion : [CBLRemoteRequest createTaskInURLSession:] #1971

Closed
msanilkumar2020 opened this issue Dec 4, 2017 · 4 comments
Closed

Assertion : [CBLRemoteRequest createTaskInURLSession:] #1971

msanilkumar2020 opened this issue Dec 4, 2017 · 4 comments
Assignees
Milestone

Comments

@msanilkumar2020
Copy link

msanilkumar2020 commented Dec 4, 2017

Hi,
Application asserted in [CBLRemoteRequest createTaskInURLSession:],

Please find the below sanitizer crash stack

2017-12-04 14:41:36.377793+0530 APP NAME[10576:982325] Received event is 7
Patch:[00_25K]\

\f0\b \cf2 (lldb) thread info -s
\pard\tx543\pardeftab543\pardirnatural\partightenfactor0

\f3\b0 \cf2 thread #28: tid = 0xefd68, 0x1c941acc libsystem_kernel.dylib`__pthread_kill + 8, name = 'CouchbaseLite', stop reason = signal SIGABRT

\pard\tx543\pardeftab543\pardirnatural\partightenfactor0

\f0\b \cf2 (lldb) }

  • Version: 1.4.1
  • Client OS: iOS 11
@msanilkumar2020
Copy link
Author

Do you have any update on this issue?

@pasin
Copy link
Contributor

pasin commented Dec 11, 2017

This is a regression after fixing #1572. The _session is reset to nil in the database thread which could be delayed a bit after the _session is closed while the _session is still being used.

@djpongh djpongh added this to the 1.4.2 milestone Dec 15, 2017
pasin added a commit that referenced this issue Dec 22, 2017
* As the fix for #1572, the _session is set to nil on the API thread which could be delayed. As a result, there could be a new request being created on the NSURLSession that is already closed or invalidated.

* Added an invalidated property for immediately marking the NSURLSession as invalidated so that the property can be used to check if the NSURLSession is still valid or not instead of depending on if the _session is nil or not.

#1971
pasin added a commit that referenced this issue Dec 22, 2017
* As the fix for #1572, the _session is set to nil on the API thread which could be delayed. As a result, there could be a new request being created on the NSURLSession that is already closed or invalidated.

* Added an invalidated property for immediately marking the NSURLSession as invalidated so that the property can be used to check if the NSURLSession is still valid or not instead of depending on if the _session is nil or not.

#1971
pasin added a commit that referenced this issue Dec 22, 2017
* As the fix for #1572, the _session is set to nil on the API thread which could be delayed. As a result, there could be a new request being created on the NSURLSession that is already closed or invalidated.

* Added an invalidated property for immediately marking the NSURLSession as invalidated so that the property can be used to check if the NSURLSession is still valid or not instead of depending on if the _session is nil or not.

#1971
@pasin
Copy link
Contributor

pasin commented Dec 22, 2017

@msanilkumar2020 I have push the fix for review. You might grab the fix and try.

@msanilkumar2020
Copy link
Author

Ok sure, thanks.

@djpongh djpongh modified the milestones: 1.4.2, 1.4.4 Jul 10, 2018
pasin added a commit that referenced this issue Aug 13, 2018
* As the fix for #1572, the _session is set to nil on the API thread which could be delayed. As a result, there could be a new request being created on the NSURLSession that is already closed or invalidated.

* Added a closed flag to prevent multiple -close calls and to prevent -startRequest: being called after close.

#1971
@pasin pasin closed this as completed Aug 13, 2018
@pasin pasin added ffc bug and removed review labels Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants