[PR #2123] [MERGED] Fixed segmentation fault caused by file write failure #2345

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2123
Author: @garenchan
Created: 3/6/2023
Status: Merged
Merged: 3/11/2023
Merged by: @ggtakec

Base: masterHead: master


📝 Commits (1)

  • b525cab Fixed segmentation fault caused by file write failure

📊 Changes

3 files changed (+5 additions, -5 deletions)

View changed files

📝 src/cache.cpp (+1 -1)
📝 src/metaheader.cpp (+3 -3)
📝 src/metaheader.h (+1 -1)

📄 Description

Relevant Issue (if applicable)

Details

I am currently using s3fs with minio. When I try to write a file with a name greater than 255 in s3fs, s3fs exit with segmentation fault. Because minio uses an xfs file system that limits filename length to 255.

#0  0x00007f3ee1fbff4f in __strlen_sse42 () from /lib64/libc.so.6
Python Exception <type 'exceptions.ValueError'> Cannot find type const headers_t::_Rep_type:
#1  0x00000000004218a7 in get_mode (meta=std::map with 5 elements, path=path@entry=0x0, checkdir=checkdir@entry=false,
    forcedir=forcedir@entry=false) at metaheader.cpp:144
#2  0x000000000043ec11 in StatCache::UpdateMetaStats (this=<optimized out>,
    key="/host_e8b47009f661-host_diskio_used_percent_az_id_6fcabee9_f323_4904_9799_073ad3e552a3_cloud_id_6398743040_cluster_id_6398730244_device_sda1_instance_7009f65e_e8b4_b14f_eb11_5087b07a8c47_region_id_84c"..., meta=std::map with 5 elements = {...})
    at cache.cpp:452
#3  0x000000000041713a in s3fs_utimens (_path=<optimized out>, ts=<optimized out>) at s3fs.cpp:2215
#4  0x00007f3ee36cac2f in fuse_fs_utimens () from /lib64/libfuse.so.2
#5  0x00007f3ee36ccc1d in fuse_lib_setattr () from /lib64/libfuse.so.2
#6  0x00007f3ee36d142e in do_setattr () from /lib64/libfuse.so.2
#7  0x00007f3ee36d1bcb in fuse_ll_process_buf () from /lib64/libfuse.so.2
#8  0x00007f3ee36ce461 in fuse_do_work () from /lib64/libfuse.so.2
#9  0x00007f3ee224eea5 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f3ee1f77b0d in clone () from /lib64/libc.so.6

🔄 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/2123 **Author:** [@garenchan](https://github.com/garenchan) **Created:** 3/6/2023 **Status:** ✅ Merged **Merged:** 3/11/2023 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`b525cab`](https://github.com/s3fs-fuse/s3fs-fuse/commit/b525cab5ec2bfcd1cde2888896e04ea718d0fb37) Fixed segmentation fault caused by file write failure ### 📊 Changes **3 files changed** (+5 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/cache.cpp` (+1 -1) 📝 `src/metaheader.cpp` (+3 -3) 📝 `src/metaheader.h` (+1 -1) </details> ### 📄 Description <!-- -------------------------------------------------------------------------- Please describe the purpose of the pull request(such as resolving the issue) and what the fix/update is. --------------------------------------------------------------------------- --> ### Relevant Issue (if applicable) <!-- If there are Issues related to this PullRequest, please list it. --> ### Details <!-- Please describe the details of PullRequest. --> I am currently using s3fs with minio. When I try to write a file with a name greater than 255 in s3fs, s3fs exit with segmentation fault. Because minio uses an xfs file system that limits filename length to 255. ``` #0 0x00007f3ee1fbff4f in __strlen_sse42 () from /lib64/libc.so.6 Python Exception <type 'exceptions.ValueError'> Cannot find type const headers_t::_Rep_type: #1 0x00000000004218a7 in get_mode (meta=std::map with 5 elements, path=path@entry=0x0, checkdir=checkdir@entry=false, forcedir=forcedir@entry=false) at metaheader.cpp:144 #2 0x000000000043ec11 in StatCache::UpdateMetaStats (this=<optimized out>, key="/host_e8b47009f661-host_diskio_used_percent_az_id_6fcabee9_f323_4904_9799_073ad3e552a3_cloud_id_6398743040_cluster_id_6398730244_device_sda1_instance_7009f65e_e8b4_b14f_eb11_5087b07a8c47_region_id_84c"..., meta=std::map with 5 elements = {...}) at cache.cpp:452 #3 0x000000000041713a in s3fs_utimens (_path=<optimized out>, ts=<optimized out>) at s3fs.cpp:2215 #4 0x00007f3ee36cac2f in fuse_fs_utimens () from /lib64/libfuse.so.2 #5 0x00007f3ee36ccc1d in fuse_lib_setattr () from /lib64/libfuse.so.2 #6 0x00007f3ee36d142e in do_setattr () from /lib64/libfuse.so.2 #7 0x00007f3ee36d1bcb in fuse_ll_process_buf () from /lib64/libfuse.so.2 #8 0x00007f3ee36ce461 in fuse_do_work () from /lib64/libfuse.so.2 #9 0x00007f3ee224eea5 in start_thread () from /lib64/libpthread.so.0 #10 0x00007f3ee1f77b0d in clone () from /lib64/libc.so.6 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:05:02 +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#2345
No description provided.