[PR #763] [MERGED] cleanup curl handles before curl share #1630

Closed
opened 2026-03-04 02:01:23 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/763
Author: @orozery
Created: 5/21/2018
Status: Merged
Merged: 5/23/2018
Merged by: @ggtakec

Base: masterHead: cleanup_share_after_handles


📝 Commits (1)

  • af63a42 cleanup curl handles before curl share

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 src/curl.cpp (+2 -2)

📄 Description

Details

I noticed the following warning message repeatedly on my logs:

s3fs.cpp:s3fs_destroy(3438): Could not release curl library

I debugged it, and found that the reason is a failure in CURLSHE_OK != curl_share_cleanup(S3fsCurl::hCurlShare) inside S3fsCurl::DestroyShareCurl.

The libcurl documentation of curl shares says that you need to:

When you're done using the share, make sure that no easy handle is still using it, and call curl_share_cleanup(3) on the handle.

Currently, s3fs clean up curl handles AFTER the share is destroyed.
This PR fixes this problem, by switching the cleanup of curl handles to be BEFORE the cleanup of the curl share.
I verified that after this fix, the error mentioned above disappears.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/763 **Author:** [@orozery](https://github.com/orozery) **Created:** 5/21/2018 **Status:** ✅ Merged **Merged:** 5/23/2018 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `cleanup_share_after_handles` --- ### 📝 Commits (1) - [`af63a42`](https://github.com/s3fs-fuse/s3fs-fuse/commit/af63a427737d5fc540bcd63829b4174c2b1c4b55) cleanup curl handles before curl share ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/curl.cpp` (+2 -2) </details> ### 📄 Description ### Details I noticed the following warning message repeatedly on my logs: `s3fs.cpp:s3fs_destroy(3438): Could not release curl library` I debugged it, and found that the reason is a failure in `CURLSHE_OK != curl_share_cleanup(S3fsCurl::hCurlShare)` inside `S3fsCurl::DestroyShareCurl`. The libcurl [documentation](https://linux.die.net/man/3/libcurl-share) of curl shares says that you need to: ``` When you're done using the share, make sure that no easy handle is still using it, and call curl_share_cleanup(3) on the handle. ``` Currently, s3fs clean up curl handles AFTER the share is destroyed. This PR fixes this problem, by switching the cleanup of curl handles to be BEFORE the cleanup of the curl share. I verified that after this fix, the error mentioned above disappears. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:01:23 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#1630
No description provided.