You are not logged in.

#1 2022-08-12 12:27:56

d.ALT
Member
Registered: 2019-05-10
Posts: 959

[SOLVED] NTFS3 and NTFS-3G segfault

I'm having segfaults with my external USB HDD.
I can mount the partition, but after some time (1 minute or so) it becomes unavailable and I get segfaults looking at dmesg output.

mount.ntfs[1195]: segfault at 10 ip 00007fba9c175251 sp 00007fff5aefb530 error 4 in libntfs-3g.so.89.0.0[7fba9c157000+39000]
$ sudo mount -t ntfs -o users,rw,uid=1000,gid=1000,umask=000,fmask=000,dmask=000,relatime,async,suid,dev,exec /dev/sdd1 /mnt/STEAMLIBRARYUSB
mount.ntfs-3g[1291]: segfault at 10 ip 00007f81ae978251 sp 00007fff9a713110 error 4 in libntfs-3g.so.89.0.0[7f81ae95a000+39000]
$ sudo mount -t ntfs-3g -o users,allow_other,rw,uid=1000,gid=1000,umask=000,fmask=000,dmask=000,relatime,async,big_writes,locale=it_IT.utf8,suid,dev,exec /dev/sdd1 /mnt/STEAMLIBRARYUSB

It's happening both on linux-lts and linux-zen.

HDD is installed into an USB 3.0 adapter/enclosure:

Bus 004 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge

On Windows it's working fine.
I performed S. M. A. R. T. long and short tests: everything's good.
Also I run a deep chkdsk: filesystem is OK, no errors.

Last edited by d.ALT (2022-08-12 18:22:09)


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#2 2022-08-12 14:04:19

frostschutz
Member
Registered: 2013-11-15
Posts: 1,647

Re: [SOLVED] NTFS3 and NTFS-3G segfault

mount.ntfs and mount.ntfs-3g is both ... ntfs-3g

try 'mount -t ntfs3 ...'

Offline

#3 2022-08-12 14:38:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,805

Re: [SOLVED] NTFS3 and NTFS-3G segfault

I performed S. M. A. R. T. long and short tests: everything's good.

Nevertheless, post the complete "smartctl -a" output for the device, because

EINTR 4 Interrupted system cal

Also check the surrounding dmesg output for eg. IO errors.

HDD is installed into an USB 3.0 adapter/enclosure:

Try to disable https://wiki.archlinux.org/title/Power_ … utosuspend ("usbcore.autosuspend=-1", nb. that power management tools will impact that at runtime, so configure those, if any, likewise) and ceterum censeo: 3rd link below.

Offline

#4 2022-08-12 17:53:45

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: [SOLVED] NTFS3 and NTFS-3G segfault

I forgot to mention I've been using this hard drive since May and it never gave me any problems!



frostschutz wrote:

mount.ntfs and mount.ntfs-3g is both ... ntfs-3g

try 'mount -t ntfs3 ...'

$ sudo mount -t ntfs3 /dev/sdd1 /mnt/STEAMLIBRARYUSB/
mount: /mnt/STEAMLIBRARYUSB: wrong fs type, bad option, bad superblock on /dev/sdd1, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
[  +0,016903] ntfs3: Max link count 4000
[  +0,000004] ntfs3: Enabled Linux POSIX ACLs support
[  +0,000001] ntfs3: Read-only LZX/Xpress compression included
[  +2,358475] ntfs3: sdd1: volume is dirty and "force" flag is not set!
$ sudo ntfsfix -d /dev/sdd1
Mounting volume... OK
Processing of $MFT and $MFTMirr completed successfully.
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdd1 was processed successfully.




seth wrote:
I performed S. M. A. R. T. long and short tests: everything's good.

Nevertheless, post the complete "smartctl -a" output for the device, because

EINTR 4 Interrupted system cal

Also check the surrounding dmesg output for eg. IO errors.

No I/O errors in dmesg.

$ sudo dmesg | grep -i sdd
[    5.803417] sd 10:0:0:0: [sdd] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    5.803420] sd 10:0:0:0: [sdd] 4096-byte physical blocks
[    5.803516] sd 10:0:0:0: [sdd] Write Protect is off
[    5.803518] sd 10:0:0:0: [sdd] Mode Sense: 43 00 00 00
[    5.803718] sd 10:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.804018] sd 10:0:0:0: [sdd] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[    5.821277]  sdd: sdd1
[    5.828113] sd 10:0:0:0: [sdd] Attached SCSI disk
[   19.111685] audit: type=1100 audit(1660325316.073:58): pid=798 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication grantors=pam_shells,pam_faillock,pam_permit,pam_faillock acct="ctento" exe="/usr/lib/sddm/sddm-helper" hostname=? addr=? terminal=? res=success'
[   19.112005] audit: type=1101 audit(1660325316.073:59): pid=798 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="ctento" exe="/usr/lib/sddm/sddm-helper" hostname=? addr=? terminal=? res=success'
[   19.112447] audit: type=1103 audit(1660325316.073:60): pid=798 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_shells,pam_faillock,pam_permit,pam_faillock acct="ctento" exe="/usr/lib/sddm/sddm-helper" hostname=? addr=? terminal=? res=success'
[   19.112666] audit: type=1300 audit(1660325316.074:61): arch=c000003e syscall=1 success=yes exit=4 a0=8 a1=7ffc782f7410 a2=4 a3=7ffc782f7124 items=0 ppid=743 pid=798 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm="sddm-helper" exe="/usr/lib/sddm/sddm-helper" key=(null)
[  365.201412] ntfs3: sdd1: volume is dirty and "force" flag is not set!
[  743.613640] ntfs3: sdd1: ino=5, "/" add mount option "acl" to use acl
[  743.613653] ntfs3: sdd1: ino=5, "/" add mount option "acl" to use acl
[  743.613660] ntfs3: sdd1: ino=5, "/" add mount option "acl" to use acl
[  743.614035] ntfs3: sdd1: ino=171, "$RECYCLE.BIN" add mount option "acl" to use acl
[  743.614045] ntfs3: sdd1: ino=171, "$RECYCLE.BIN" add mount option "acl" to use acl
[  743.614051] ntfs3: sdd1: ino=171, "$RECYCLE.BIN" add mount option "acl" to use acl
[  743.915493] ntfs3: sdd1: ino=75c8, "SOMEFODLDER_001" add mount option "acl" to use acl
[  743.915505] ntfs3: sdd1: ino=75c8, "SOMEFODLDER_001" add mount option "acl" to use acl
[  743.915512] ntfs3: sdd1: ino=75c8, "SOMEFODLDER_001" add mount option "acl" to use acl
[  743.915852] ntfs3: sdd1: ino=27, "SOMEFODLDER_002" add mount option "acl" to use acl
$ sudo smartctl -a /dev/sdd
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.18.16-zen1-1-zen] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Hitachi/HGST Travelstar Z7K500
Device Model:     HGST HTS725050A7E630
Serial Number:    TF655AY90BVXPL
LU WWN Device Id: 5 000cca 76cc56528
Firmware Version: GH2ZB550
User Capacity:    500.107.862.016 bytes [500 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database 7.3/5319
ATA Version is:   ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 2.6, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Aug 12 19:37:52 2022 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever 
                                        been run.
Total time to complete Offline 
data collection:                (   45) seconds.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine 
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        (  90) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   062    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   100   100   040    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0007   213   213   033    Pre-fail  Always       -       1
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       1109
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   100   100   040    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0012   094   094   000    Old_age   Always       -       2692
 10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       199
191 G-Sense_Error_Rate      0x000a   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       15
193 Load_Cycle_Count        0x0012   088   088   000    Old_age   Always       -       128303
194 Temperature_Celsius     0x0002   222   222   000    Old_age   Always       -       27 (Min/Max 3/56)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0
223 Load_Retry_Count        0x000a   100   100   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      2682         -
# 2  Vendor (0x50)       Completed without error       00%         2         -
# 3  Short offline       Completed without error       00%         2         -
# 4  Short offline       Completed without error       00%         0         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
seth wrote:

HDD is installed into an USB 3.0 adapter/enclosure:

Try to disable https://wiki.archlinux.org/title/Power_ … utosuspend ("usbcore.autosuspend=-1", nb. that power management tools will impact that at runtime, so configure those, if any, likewise) and ceterum censeo: 3rd link below.

I already tried it since I was running some tests, it is not related.


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#5 2022-08-12 18:21:47

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: [SOLVED] NTFS3 and NTFS-3G segfault

I think it's SOLVED thanks to:

$ sudo ntfsfix -d /dev/sdd1

(maybe Windows did some bad dirty things to poor partition... Which is very strange though! The hard disk is always permanently connected to the PC and those times when I boot into Windows then I turn it off - or restart - always correctly. Furthermore, FastBoot is disabled.)


Also, from now on I'll mount the partition without options:

$ cat /etc/fstab

# STEAMLIBRARYUSB
UUID=S0M3VALUE  /mnt/STEAMLIBRARYUSB    ntfs3   nofail,x-systemd.device-timeout=6s 0 0

<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#6 2022-08-12 18:29:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,805

Re: [SOLVED] NTFS3 and NTFS-3G segfault

[  +2,358475] ntfs3: sdd1: volume is dirty and "force" flag is not set!

Is a very strong indicator for a hibernating windows having left the drive behind open - nb. that "fast boot" describes a BIOS option (avoiding some self checks) whereas "fast start" is a windows "feature" to trick you into believing the OS could boot fast-ish, while in reality it's just hibernating. And you cannot boot an OS while another one is hibernating, so make extra sure that the windows feature is disable (also, since windows habitually and silently re-enables it with updates)

Offline

#7 2022-08-12 19:17:15

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: [SOLVED] NTFS3 and NTFS-3G segfault

Hey seth!
Yeah sorry I meant Fast Start

cmd > POWERCFG /H OFF

It has been reactivated by some Windows Updates indeed.


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

Board footer

Powered by FluxBB