UFS CAM status: Uncorrectable parity/CRC error

greencloud

Member

Reaction score: 3
Messages: 28

Hi everyone! Few days ago I bought a new Samsung 860 EVO 250GB SSD and reinstalled FreeBSD 11.2-Release in it. But prior to installing FreeBSD, I first checked this brand new SSD on my Windows machine. I used the Samsung Magician and 2 other applications to test it and it passed with flying colors. I then secure deleted everything on the drive including the GPT partition in preparation for the FreeBSD installation. During the installation I saw this error:
Code:
(ada0:ahcich0:0:0:0): WRITE_FPDMA_QUEUED. ACB: 61 40 28 77 91 40 18 00 00 00 00 00
(ada0:ahcich0:0:0:0): CAM status: Uncorrectable parity/CRC error
(ada0:ahcich0:0:0:0): Retrying command
The installation did finished though. When I was reinstalling some apps, the same error appeared again, a little longer this time:
Code:
ahcich0: Timeout on slot 23 port 0
ahcich0: is 00000000 cs ffffffff ss ffffffff rs ffffffff tfd d0 serr 00000000 cmd 0000f717
(ada0:ahcich0:0:0:0): WRITE_FPDMA_QUEUED. ACB: 61 01 d0 cc 07 40 02 00 00 00 00 00
(ada0:ahcich0:0:0:0): CAM status: Command timeout
(ada0:ahcich0:0:0:0): Retrying command
(ada0:ahcich0:0:0:0): WRITE_FPDMA_QUEUED. ACB: 61 40 e8 07 b0 40 0b 00 00 00 00 00
(ada0:ahcich0:0:0:0): CAM status: ATA Status Error
(ada0:ahcich0:0:0:0): ATA status: 41 (DRDY ERR), error: 84 (ICRC ABRT )
(ada0:ahcich0:0:0:0): RES: 41 84 98 41 d4 00 0b 00 00 08 00
(ada0:ahcich0:0:0:0): Retrying command
(ada0:ahcich0:0:0:0): WRITE_FPDMA_QUEUED. ACB: 61 40 28 77 91 40 18 00 00 00 00 00
(ada0:ahcich0:0:0:0): CAM status: Uncorrectable parity/CRC error
(ada0:ahcich0:0:0:0): Retrying command
ahcich0: Timeout on slot 13 port 0
ahcich0: is 00000000 cs 0001e000 ss 0001e000 rs 0001e000 tfd d0 serr 00000000 cmd 0000ed17
(ada0:ahcich0:0:0:0): WRITE_FPDMA_QUEUED. ACB: 61 01 a4 92 07 40 02 00 00 00 00 00
(ada0:ahcich0:0:0:0): CAM status: Command timeout
(ada0:ahcich0:0:0:0): Retrying command
I tried running a short test using smartctl: smartctl -tshort /dev/ada0 to see if some error would come up. It outputs:
Code:
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.2-RELEASE amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     Samsung SSD 860 EVO 250GB
Serial Number:    S3Y9NB0K112021F
LU WWN Device Id: 5 002538 e40082049
Firmware Version: RVT01B6Q
User Capacity:    250,059,350,016 bytes [250 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Sep 24 19:15:53 2018 +08
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:         (    0) seconds.
Offline data collection
capabilities:              (0x53) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    No 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:      (  85) 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: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   099   099   000    Old_age   Always       -       19
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       8
177 Wear_Leveling_Count     0x0013   100   100   000    Pre-fail  Always       -       0
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0032   057   049   000    Old_age   Always       -       43
195 Hardware_ECC_Recovered  0x001a   200   200   000    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x003e   099   099   000    Old_age   Always       -       33
235 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       0
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       162631446

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  Short offline       Completed without error       00%        19         -

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.
I haven't ran the long test yet. So far everything is working fine. But, my question is should I be worried? Do I need to send this SSD back to the store? Any insights will be greatly appreciated. Thank you!
 

VladiBG

Aspiring Daemon

Reaction score: 243
Messages: 602

199 UDMA_CRC_Error_Count 0x003e 099 099 000 Old_age Always - 33

Most often the issue is caused by a faulty, linked, or poorly seated SATA cable/connection. You can try with shorter SATA cable or better quality one.
 
OP
OP
greencloud

greencloud

Member

Reaction score: 3
Messages: 28

199 UDMA_CRC_Error_Count 0x003e 099 099 000 Old_age Always - 33
One of my colleague told me that in case like this, if there is really a problem, I should watch out for Reallocated_Sector_Ct which doesn't show any error at the moment. Unfortunately, I don't have any extra "realiable" SATA cable around that I can use for troubleshooting. But I do think that could also be the problem because I just bought this SSD and the SATA cable I'm using is quite old.
 

leebrown66

Well-Known Member

Reaction score: 134
Messages: 400

I'm just reinforcing your point it's the interface and not the media. Sorry if that's not clear.
 

VladiBG

Aspiring Daemon

Reaction score: 243
Messages: 602

It may be caused by the SATA controller also. There was a bug in Intel 6-series chipset that cause similar increase in bit error rates on a SATA link over time.
 
OP
OP
greencloud

greencloud

Member

Reaction score: 3
Messages: 28

I just had the result of the smartctl -tlong test:
Code:
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.2-RELEASE-p3 amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     Samsung SSD 860 EVO 250GB
Serial Number:    S3Y9NB0K112021F
LU WWN Device Id: 5 002538 e40082049
Firmware Version: RVT01B6Q
User Capacity:    250,059,350,016 bytes [250 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Tue Sep 25 16:40:35 2018 +08
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:         (    0) seconds.
Offline data collection
capabilities:              (0x53) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    No 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:      (  85) 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: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   099   099   000    Old_age   Always       -       31
12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       13
177 Wear_Leveling_Count     0x0013   099   099   000    Pre-fail  Always       -       1
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0032   061   044   000    Old_age   Always       -       39
195 Hardware_ECC_Recovered  0x001a   200   200   000    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x003e   099   099   000    Old_age   Always       -       58
235 Unknown_Attribute       0x0012   099   099   000    Old_age   Always       -       1
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       391526100

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%        30         -
# 2  Short offline       Completed without error       00%        19         -

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.
I really thinking now it could be a bad SATA cable. I'm also seeing some inconsistencies in BIOS, will go and flash it later as well and see if that helps. Anyways, is there a way to reset S.M.A.R.T results in FreeBSD? Thanks for all your inputs guys, I really appreciate it.
 

VladiBG

Aspiring Daemon

Reaction score: 243
Messages: 602

You can't reset S.M.A.R.T values using standard tools. You need vendor specific software to access the firmware of the hard-drive to reprogram it.
 
OP
OP
greencloud

greencloud

Member

Reaction score: 3
Messages: 28

I ended up having the Samsung SSD replaced from the store with the exact same unit. However it was the exact same problem regardless of which SATA ports or cables I use, so I took out the second Samsung SSD and put in a third one, but this time it's a Kingston UV400 250GB and it works perfectly. I don't know what's with the Samsung 860 EVO 250GB maybe I was just unlucky I got 2 Samsung SSD lemons. Now I'm starting to question whether this particular Samsung 860 EVO SSD is really compatible with FreeBSD. I don't know.
 

Crivens

Moderator
Staff member
Moderator

Reaction score: 908
Messages: 1,888

... or maybe the Kingston does not tell you...
 

bullfrog

New Member


Messages: 6

I have this same EVO 860 250GB. I have the exact same issue. Except it only happens when the boot partition is the first disk partition. If I boot FreeBSD12 from the second MBR partition, I get no errors. Booting from the first partition results in no end to the crc/parity errors.

I first noticed this in OpenBSD on the first partition. The errors render that OS useless. I'm currently in process of shuffling things around to test Haiku on the first partition to see if it is affected. No other partition seems affected.

It could be possible that a small offset at the beginning of the first partition could resolve this as a hack/workaround for using this drive.
 

olli@

Well-Known Member
Developer

Reaction score: 315
Messages: 375

You could try to downgrade the device link from SATA-3 to SATA-2 with the following line in /boot/loader.conf:
Code:
hint.ata.0.sata_rev=2
Where 0 is the channel number of the device. You can see the channel numbers in the boot messages (/var/run/dmesg.boot) or in the output of camcontrol devlist -v. Usually ada0 is on channel 0, but it's better to check that it really is.
The command camcontrol negotiate ada0 will display the current SATA revision (among other things) of the ada0 device.
 

bullfrog

New Member


Messages: 6

You could try to downgrade the device link from SATA-3 to SATA-2 with the following line in /boot/loader.conf:
Code:
hint.ata.0.sata_rev=2
Where 0 is the channel number of the device. You can see the channel numbers in the boot messages (/var/run/dmesg.boot) or in the output of camcontrol devlist -v. Usually ada0 is on channel 0, but it's better to check that it really is.
The command camcontrol negotiate ada0 will display the current SATA revision (among other things) of the ada0 device.
I've seen this suggestion in other threads. I don't think that will work for this drive.
In my case, at least, I'm on an older sata2 laptop. It seems this model of drive is the culprit. I did some testing of this issue with both OpenBSD and Haiku as well as FreeBSD 12. OpenBSD gives a similar ahcich related error, Haiku gives generic MTRR error messages. In FreeBSD, and Haiku, there is no error at all when booted from a partition other than the first one on the disk. I have yet to test this in OpenBSD. I was able to stop the error completely in Haiku booted to the first partition by creating the partition on an offset with freespace between the MBR and first partition. I will be testing this more with all three operating systems to get an idea of where the offset threshold is. Also to test how closely related this problem is among all three systems.
 

bullfrog

New Member


Messages: 6

It seems the only work around for using Samsung EVO 360 250GB in BSD is booting from the second MBR partition. All attempts at booting from or even mounting the first MBR partition results in this CRC error. I even tried using an offset with freespace before the partition, giving up after a 5gb offset. If you're looking to use the entire disk for FreeBSD, I'd look into other options.
 

Crivens

Moderator
Staff member
Moderator

Reaction score: 908
Messages: 1,888

Since the position of the MBR is fixed, that should not be a problem. Or yes? Also, what does happen when you dd the device from the start? Do errors occur, and maybe to what offset?
 

bullfrog

New Member


Messages: 6

Since the position of the MBR is fixed, that should not be a problem. Or yes? Also, what does happen when you dd the device from the start? Do errors occur, and maybe to what offset?
During my testing, I dd'd an install from first partition to second partition. The errors went away completely when I booted this second partition. Oddly, reinstalling fresh on the second partition resurrected the errors again.

Added note, my second partition starts at 25gb.
 
Last edited:
Top