mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2478] [MERGED] Fixed a deadlock in the FdManager::ChangeEntityToTempPath method call #2563
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#2563
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/2478
Author: @ggtakec
Created: 6/23/2024
Status: ✅ Merged
Merged: 6/30/2024
Merged by: @gaul
Base:
master← Head:fix_deadlock📝 Commits (1)
1c3acb5Fixed a deadlock in the FdManager::ChangeEntityToTempPath method call📊 Changes
3 files changed (+57 additions, -12 deletions)
View changed files
📝
src/fdcache.cpp(+51 -10)📝
src/fdcache.h(+4 -1)📝
src/fdcache_entity.h(+2 -1)📄 Description
Relevant Issue (if applicable)
#2438 #2463
Details
Fixed a bug that caused a deadlock during simultaneous processing such as file uploads from multiple threads when there was not enough cache space.
The FdManager class manages object paths and FdEntity in a map, but when there is not enough cache space, there is a process that changes the object path of that entry.
For this process, the FdManager object is operated from the FdEntity method.
At this time, a deadlock occurred.
As a currently solution, we delayed the operation rather than directly operating the map object when calling the process to change the object path.
@gaul
I think this is the best solution at the moment.
We are also considering adding test cases, but it may be difficult.
(Due to the issue of whether we can reliably create a timing that causes the bug to occur.)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
auto#2627