mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2211] [MERGED] Fixed data race at OPENSSL_sk_dup/free in libcurl #2392
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2392
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2211
Author: @ggtakec
Created: 7/11/2023
Status: ✅ Merged
Merged: 7/12/2023
Merged by: @gaul
Base:
master← Head:fix_curl_data_race📝 Commits (1)
e9c77e4Fixed data race at OPENSSL_sk_dup/free in libcurl📊 Changes
3 files changed (+30 additions, -16 deletions)
View changed files
📝
src/curl.cpp(+2 -1)📝
src/curl_handlerpool.cpp(+27 -15)📝
src/curl_handlerpool.h(+1 -0)📄 Description
Relevant Issue (if applicable)
#2209
Details
Fixed the following data races that were not fixed in #2209.
The above log reported that there is a data race between
OPENSSL_sk_freeandOPENSSL_sk_dupcalled fromS3fsCurl::HeadRequest.(this data race could occur in rare cases with the
test_concurrent_writesCI test.)This fix may not be accurate as the stack beyond
S3fsCurl::HeadRequestis not recorded.However, I suspect that the conflict between
OPENSSL_sk_freeandOPENSSL_sk_dupis caused by calls tocurl_easy_init,curl_easy_resetandcurl_easy_cleanup.(In current master code, only
curl_easy_resetis not exclusive control is not possible.)Then I implemented all these calls in the
CurlHandlerPoolclass, and changed the exclusive control within theCurlHandlerPoolclass.I've run many times of problematic CI tests and now no errors are detected.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.