[GH-ISSUE #2454] dead lock in NoCacheLoadAndPost #1211

Closed
opened 2026-03-04 01:52:14 +03:00 by kerem · 1 comment
Owner

Originally created by @VVoidV on GitHub (May 8, 2024).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2454

Additional Information

Version of s3fs being used (s3fs --version)

1.94


### Details about issue
<!-- Please describe the content of the issue in detail. -->
Thread 8 (Thread 0x7f41a1e4e700 (LWP 23788)):
#0  0x00007f41a664854d in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007f41a6643e9b in _L_lock_883 () from /lib64/libpthread.so.0
#2  0x00007f41a6643d68 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x000055bf4d169b39 in AutoLock::AutoLock(pthread_mutex_t*, AutoLock::Type) ()
#4  0x000055bf4d14fe14 in FdEntity::Clear() ()
#5  0x000055bf4d1502de in FdEntity::~FdEntity() ()
#6  0x000055bf4d149588 in FdManager::ChangeEntityToTempPath(FdEntity*, char const*) ()
#7  0x000055bf4d150c95 in FdEntity::NoCacheLoadAndPost(PseudoFdInfo*, long, long) ()
#8  0x000055bf4d1518a8 in FdEntity::WriteMixMultipart(PseudoFdInfo*, char const*, long, unsigned long) ()
#9  0x000055bf4d15202d in FdEntity::Write(int, char const*, long, unsigned long) ()
#10 0x000055bf4d0e6f82 in s3fs_write(char const*, char const*, unsigned long, long, fuse_file_info*) ()
#11 0x00007f41a7cbea7c in fuse_fs_write_buf () from /lib64/libfuse.so.2
#12 0x00007f41a7cbebf8 in fuse_lib_write_buf () from /lib64/libfuse.so.2
#13 0x00007f41a7cc7cf8 in fuse_ll_process_buf () from /lib64/libfuse.so.2
#14 0x00007f41a7cc4401 in fuse_do_work () from /lib64/libfuse.so.2
#15 0x00007f41a6641ea5 in start_thread () from /lib64/libpthread.so.0
#16 0x00007f41a636a96d in clone () from /lib64/libc.so.6

lock is already taken in FdEntity::Write
image
image

Originally created by @VVoidV on GitHub (May 8, 2024). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2454 <!-- -------------------------------------------------------------------------- The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all. Keep in mind that the commands we provide to retrieve information are oriented to GNU/Linux Distributions, so you could need to use others if you use s3fs on macOS or BSD. --------------------------------------------------------------------------- --> ### Additional Information #### Version of s3fs being used (`s3fs --version`) <!-- example: V1.91 (commit:b19262a) --> 1.94 ``` ### Details about issue <!-- Please describe the content of the issue in detail. --> Thread 8 (Thread 0x7f41a1e4e700 (LWP 23788)): #0 0x00007f41a664854d in __lll_lock_wait () from /lib64/libpthread.so.0 #1 0x00007f41a6643e9b in _L_lock_883 () from /lib64/libpthread.so.0 #2 0x00007f41a6643d68 in pthread_mutex_lock () from /lib64/libpthread.so.0 #3 0x000055bf4d169b39 in AutoLock::AutoLock(pthread_mutex_t*, AutoLock::Type) () #4 0x000055bf4d14fe14 in FdEntity::Clear() () #5 0x000055bf4d1502de in FdEntity::~FdEntity() () #6 0x000055bf4d149588 in FdManager::ChangeEntityToTempPath(FdEntity*, char const*) () #7 0x000055bf4d150c95 in FdEntity::NoCacheLoadAndPost(PseudoFdInfo*, long, long) () #8 0x000055bf4d1518a8 in FdEntity::WriteMixMultipart(PseudoFdInfo*, char const*, long, unsigned long) () #9 0x000055bf4d15202d in FdEntity::Write(int, char const*, long, unsigned long) () #10 0x000055bf4d0e6f82 in s3fs_write(char const*, char const*, unsigned long, long, fuse_file_info*) () #11 0x00007f41a7cbea7c in fuse_fs_write_buf () from /lib64/libfuse.so.2 #12 0x00007f41a7cbebf8 in fuse_lib_write_buf () from /lib64/libfuse.so.2 #13 0x00007f41a7cc7cf8 in fuse_ll_process_buf () from /lib64/libfuse.so.2 #14 0x00007f41a7cc4401 in fuse_do_work () from /lib64/libfuse.so.2 #15 0x00007f41a6641ea5 in start_thread () from /lib64/libpthread.so.0 #16 0x00007f41a636a96d in clone () from /lib64/libc.so.6 ``` lock is already taken in ` FdEntity::Write` ![image](https://github.com/s3fs-fuse/s3fs-fuse/assets/17823956/e6706788-dd0b-4818-86b1-3e0252f3fe20) ![image](https://github.com/s3fs-fuse/s3fs-fuse/assets/17823956/2f30bac1-4462-4336-b7a9-709aaae49acf)
kerem closed this issue 2026-03-04 01:52:14 +03:00
Author
Owner

@VVoidV commented on GitHub (May 8, 2024):

commit e3b50ad3e1 use smart pointer to manage FdEntity, the reset function will call ~FdEntity(). I think we can not delete FdEntity here. The locks is hold and we are using this FdEntity
image

<!-- gh-comment-id:2099797322 --> @VVoidV commented on GitHub (May 8, 2024): commit e3b50ad3e148cff006a58b870d769b793e79ea4e use smart pointer to manage FdEntity, the reset function will call ~FdEntity(). I think we can not delete FdEntity here. The locks is hold and we are using **this** FdEntity ![image](https://github.com/s3fs-fuse/s3fs-fuse/assets/17823956/e4b6c2aa-6178-4942-900b-5aebe6e1e5ac)
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#1211
No description provided.