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

Thread Safety Issue accessing to HTTPDataLoader (#2) #48

Closed
aetherealtech opened this issue May 23, 2022 · 2 comments
Closed

Thread Safety Issue accessing to HTTPDataLoader (#2) #48

aetherealtech opened this issue May 23, 2022 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@aetherealtech
Copy link

Bug Report

Q A
BC Break yes
Version 1.4.0

Summary

We have seen intermittent crashes in HTTPDataLoader.fetch, while writing a response to the dataLoadersMap dictionary. A cursory inspection of the code in HTTPDataLoader makes it look like this dictionary is not protected by atomic access, but it is being accessed (both read from and written to) from multiple threads. The access is inside an operation added to the session's delegate queue, but this queue is concurrent. We believe this may be why we are seeing intermittent crashes in this area.

Screen Shot 2022-05-23 at 4 33 51 PM

@malcommac malcommac self-assigned this May 24, 2022
@malcommac malcommac added the bug Something isn't working label May 24, 2022
@malcommac malcommac added this to the 1.5.2 milestone May 24, 2022
@malcommac
Copy link
Collaborator

We made some improvements with #45 but this improves the safety of the loader's dictionary in a multi-threading environment. Thank you very much.

@malcommac malcommac changed the title Possible Thread Safety Issue Thread Safety Issue accessing to HTTPDataLoader (#2) May 24, 2022
malcommac added a commit that referenced this issue May 24, 2022
fix #48: fixes data access issue with multithread
@aetherealtech
Copy link
Author

Thanks for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants