[GH-ISSUE #2514] Freebsd 14.1 Abort trap (core dumped) #1228

Closed
opened 2026-03-04 01:52:24 +03:00 by kerem · 10 comments
Owner

Originally created by @konovalovk on GitHub (Aug 19, 2024).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2514

Version of s3fs being used (s3fs --version)

1.92_1

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse or dpkg -s fuse)

2.9.9_2

Kernel information (uname -r)

14.1-RELEASE-p3

GNU/Linux Distribution, if applicable (cat /etc/os-release)

NAME=FreeBSD
VERSION="14.1-RELEASE-p3"
VERSION_ID="14.1"
ID=freebsd
ANSI_COLOR="0;31"
PRETTY_NAME="FreeBSD 14.1-RELEASE-p3"
CPE_NAME="cpe:/o:freebsd:freebsd:14.1"
HOME_URL="https://FreeBSD.org/"
BUG_REPORT_URL="https://bugs.FreeBSD.org/"

How to run s3fs, if applicable

as 14.0 where it works without Abort trap (core dumped)

Details about issue

Running clean s3fs command or full mount command ends with "Abort trap (core dumped)" error on freebsd 14.1. Tested on clear installation.

Originally created by @konovalovk on GitHub (Aug 19, 2024). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2514 #### Version of s3fs being used (`s3fs --version`) 1.92_1 #### Version of fuse being used (`pkg-config --modversion fuse`, `rpm -qi fuse` or `dpkg -s fuse`) 2.9.9_2 #### Kernel information (`uname -r`) 14.1-RELEASE-p3 #### GNU/Linux Distribution, if applicable (`cat /etc/os-release`) NAME=FreeBSD VERSION="14.1-RELEASE-p3" VERSION_ID="14.1" ID=freebsd ANSI_COLOR="0;31" PRETTY_NAME="FreeBSD 14.1-RELEASE-p3" CPE_NAME="cpe:/o:freebsd:freebsd:14.1" HOME_URL="https://FreeBSD.org/" BUG_REPORT_URL="https://bugs.FreeBSD.org/" #### How to run s3fs, if applicable as 14.0 where it works without Abort trap (core dumped) ### Details about issue Running clean s3fs command or full mount command ends with "Abort trap (core dumped)" error on freebsd 14.1. Tested on clear installation.
kerem 2026-03-04 01:52:24 +03:00
  • closed this issue
  • added the
    need info
    label
Author
Owner

@gaul commented on GitHub (Aug 19, 2024):

Can you try with the latest 1.94 or master? Also how did you get version 1.92? The official package appears to be 1.89 which is another problem: https://svnweb.freebsd.org/ports/head/sysutils/fusefs-s3fs/. I would like to improve FreeBSD support but I don't use it myself and don't really understand what is broken, e.g., #2181. PRs welcome!

<!-- gh-comment-id:2295891514 --> @gaul commented on GitHub (Aug 19, 2024): Can you try with the latest 1.94 or master? Also how did you get version 1.92? The official package appears to be 1.89 which is another problem: https://svnweb.freebsd.org/ports/head/sysutils/fusefs-s3fs/. I would like to improve FreeBSD support but I don't use it myself and don't really understand what is broken, e.g., #2181. PRs welcome!
Author
Owner

@konovalovk commented on GitHub (Aug 19, 2024):

Both port build and pkg installation give outdated 1.92_1 version
https://www.freshports.org/sysutils/fusefs-s3fs

The commands to reproduce

pkg install fusefs-s3fs
kldload fusefs
cd ~
mkdir test
s3fs xxx test -o passwd_file=xxx -o url=xxx -o use_path_request_style
<!-- gh-comment-id:2296269180 --> @konovalovk commented on GitHub (Aug 19, 2024): Both port build and pkg installation give outdated 1.92_1 version https://www.freshports.org/sysutils/fusefs-s3fs The commands to reproduce ``` pkg install fusefs-s3fs kldload fusefs cd ~ mkdir test s3fs xxx test -o passwd_file=xxx -o url=xxx -o use_path_request_style ```
Author
Owner

@gaul commented on GitHub (Aug 20, 2024):

I don't understand your comment since s3fs does not call strftime with %s:

src/s3fs_logger.cpp:        strftime(tmp, sizeof(tmp), "%Y-%m-%dT%H:%M:%S", gmtime_r(&now.tv_sec, &res));
src/string_util.cpp:    strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S GMT", gmtime_r(&t, &res));
src/string_util.cpp:    strftime(buf, sizeof(buf), "%Y%m%d", gmtime_r(&tm, &res));
src/string_util.cpp:    strftime(buf, sizeof(buf), "%Y%m%dT%H%M%SZ", gmtime_r(&tm, &res));

We cannot support anything other than the latest release version 1.94 or master. Please ask FreeBSD to update to the latest or compile yourself from source.

<!-- gh-comment-id:2298743015 --> @gaul commented on GitHub (Aug 20, 2024): I don't understand your comment since s3fs does not call `strftime` with `%s`: ``` src/s3fs_logger.cpp: strftime(tmp, sizeof(tmp), "%Y-%m-%dT%H:%M:%S", gmtime_r(&now.tv_sec, &res)); src/string_util.cpp: strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S GMT", gmtime_r(&t, &res)); src/string_util.cpp: strftime(buf, sizeof(buf), "%Y%m%d", gmtime_r(&tm, &res)); src/string_util.cpp: strftime(buf, sizeof(buf), "%Y%m%dT%H%M%SZ", gmtime_r(&tm, &res)); ``` We cannot support anything other than the latest release version 1.94 or master. Please ask FreeBSD to update to the latest or compile yourself from source.
Author
Owner

@brett-rickman commented on GitHub (Aug 22, 2024):

I downloaded and tried to compile version 1.94 on FreeBSD 14.1-RELEASE. I had to make the following changes to src/s3fs.cpp and src/s3fs_util.cpp to get it to compile and run:

-- src/s3fs.cpp 2024-08-22 09:01:16.671914000 +0000
+++ ../s3fs-fuse-fixed/src/s3fs.cpp 2024-08-21 23:04:41.724662000 +0000
@@ -30,6 +30,7 @@
#include <dirent.h>
#include <sys/types.h>
#include <getopt.h>
+#include <sys/wait.h>

--- src/s3fs_util.cpp 2024-08-22 09:01:16.672572000 +0000
+++ ../s3fs-fuse-fixed/src/s3fs_util.cpp 2024-08-21 23:40:11.903323000 +0000
@@ -70,7 +70,7 @@
if(0 > res){
if (errno != 0){
S3FS_PRN_WARN("could not get max pw length.");

  •        abort();
    
  •        // abort();
       }
       res = 1024; // default initial length
    
    }
    @@ -80,7 +80,7 @@
    if(0 > res) {
    if (errno != 0) {
    S3FS_PRN_ERR("could not get max name length.");
  •        abort();
    
  •        // abort();
       }
       res = 1024; // default initial length
    
    }

It appears the abort() is caused by the a failure and errno being returned by the calls in init_sysconf_vars() for _SC_GETPW_R_SIZE_MAX and _SC_GETGR_R_SIZE_MAX. If either of these returns -1 with an errno, the function aborts.

As a test, I was able to get version 1.94 to run by simply commenting out the calls to abort().

<!-- gh-comment-id:2304780366 --> @brett-rickman commented on GitHub (Aug 22, 2024): I downloaded and tried to compile version 1.94 on FreeBSD 14.1-RELEASE. I had to make the following changes to src/s3fs.cpp and src/s3fs_util.cpp to get it to compile and run: -- src/s3fs.cpp 2024-08-22 09:01:16.671914000 +0000 +++ ../s3fs-fuse-fixed/src/s3fs.cpp 2024-08-21 23:04:41.724662000 +0000 @@ -30,6 +30,7 @@ #include <dirent.h> #include <sys/types.h> #include <getopt.h> +#include <sys/wait.h> --- src/s3fs_util.cpp 2024-08-22 09:01:16.672572000 +0000 +++ ../s3fs-fuse-fixed/src/s3fs_util.cpp 2024-08-21 23:40:11.903323000 +0000 @@ -70,7 +70,7 @@ if(0 > res){ if (errno != 0){ S3FS_PRN_WARN("could not get max pw length."); - abort(); + // abort(); } res = 1024; // default initial length } @@ -80,7 +80,7 @@ if(0 > res) { if (errno != 0) { S3FS_PRN_ERR("could not get max name length."); - abort(); + // abort(); } res = 1024; // default initial length } It appears the abort() is caused by the a failure and errno being returned by the calls in init_sysconf_vars() for _SC_GETPW_R_SIZE_MAX and _SC_GETGR_R_SIZE_MAX. If either of these returns -1 with an errno, the function aborts. As a test, I was able to get version 1.94 to run by simply commenting out the calls to abort().
Author
Owner

@gaul commented on GitHub (Aug 23, 2024):

The man page suggests that the call to sysconf is not handling errno properly:

If name corresponds to a maximum or minimum limit, and that limit is indeterminate, -1 is returned and errno is not changed. (To distinguish an indeterminate limit from an error, set errno to zero before the call, and then check whether errno is nonzero when -1 is returned.)

<!-- gh-comment-id:2306523873 --> @gaul commented on GitHub (Aug 23, 2024): The man page suggests that the call to `sysconf` is not handling `errno` properly: > If name corresponds to a maximum or minimum limit, and that limit is indeterminate, -1 is returned and errno is not changed. (To distinguish an indeterminate limit from an error, set errno to zero before the call, and then check whether errno is nonzero when -1 is returned.)
Author
Owner

@ivomarino commented on GitHub (Nov 29, 2024):

will a new package be available soon? Still had the same issue just today on 14.1, thanks for info

<!-- gh-comment-id:2508558846 --> @ivomarino commented on GitHub (Nov 29, 2024): will a new package be available soon? Still had the same issue just today on 14.1, thanks for info
Author
Owner

@konovalovk commented on GitHub (Nov 29, 2024):

Now it is the turn of the maintainers of https://www.freshports.org/sysutils/fusefs-s3fs

<!-- gh-comment-id:2508585163 --> @konovalovk commented on GitHub (Nov 29, 2024): Now it is the turn of the maintainers of https://www.freshports.org/sysutils/fusefs-s3fs
Author
Owner

@gaul commented on GitHub (Nov 29, 2024):

Can someone open a FreeBSD bug report or send a mail to the package maintainer? The 1.92 package is useless for users. Please share a link to the report or mail here so we can track it.

<!-- gh-comment-id:2508649212 --> @gaul commented on GitHub (Nov 29, 2024): Can someone open a FreeBSD bug report or send a mail to the package maintainer? The 1.92 package is useless for users. Please share a link to the report or mail here so we can track it.
Author
Owner

@ivomarino commented on GitHub (Nov 30, 2024):

Can someone open a FreeBSD bug report or send a mail to the package maintainer? The 1.92 package is useless for users. Please share a link to the report or mail here so we can track it.

done, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281071#c1

<!-- gh-comment-id:2508883420 --> @ivomarino commented on GitHub (Nov 30, 2024): > Can someone open a FreeBSD bug report or send a mail to the package maintainer? The 1.92 package is useless for users. Please share a link to the report or mail here so we can track it. done, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281071#c1
Author
Owner

@devnull-hub-lab commented on GitHub (Mar 8, 2025):

Committed. Thanks ivomarino for report. Kudos!

https://cgit.freebsd.org/ports/commit/?id=36ce604a8ee4d921ca8aff0bbb83e3a209fa3905

<!-- gh-comment-id:2708489437 --> @devnull-hub-lab commented on GitHub (Mar 8, 2025): Committed. Thanks ivomarino for report. Kudos! https://cgit.freebsd.org/ports/commit/?id=36ce604a8ee4d921ca8aff0bbb83e3a209fa3905
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#1228
No description provided.