Samsung SSD 850Pro firmware update queued TRIM problems
Hello list,
I recently updated the firmware on my Samsung 850 Pro from EXM01B6Q to EXM02B6Q.
Now "fstrim -v /" causes SATA command timeouts related to TRIM with NCQ. This used to work before the firmware update and seems to be a regression with the newer firmware.
I patched libata to allow me to specify a force option to enable the NO_NCQ_TRIM horkage. With such an option set on the command line, fstrim and normal operation work just fine.
Attached is a syslog excerpt showing the timeouts. Also my small patch for libata force parameters.
I suggest to blacklist NCQ TRIM for this Samsung SSD and firmware:
Device Model: Samsung SSD 850 PRO 1TB Firmware Version: EXM02B6Q
Other SSD sizes are probably also affected.
Also, I would suggest to add a patch similar to the one attached to allow a user to quickly disable NCQ TRIM and also enable it for a blacklisted one (may be useful for testing, new firmware versions etc.).
Best regards,
Stefan
Signature · 1 line
Stefan Keller <[email protected]>
Feb 22 18:54:43 arch-imedes kernel: ata1.00: exception Emask 0x0 SAct 0x7800003f SErr 0x0 action 0x6 frozen
Feb 22 18:55:14 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:55:14 arch-imedes kernel: ata1.00: cmd 61/98:00:68:fd:66/00:00:2a:00:00/40 tag 0 ncq 77824 out
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:55:14 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:55:14 arch-imedes kernel: ata1.00: cmd 61/00:08:28:c1:67/02:00:2a:00:00/40 tag 1 ncq 262144 out
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:55:14 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:55:14 arch-imedes kernel: ata1.00: cmd 61/08:10:f8:4b:52/00:00:2a:00:00/40 tag 2 ncq 4096 out
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:55:14 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:55:14 arch-imedes kernel: ata1.00: cmd 61/18:18:98:65:52/00:00:2a:00:00/40 tag 3 ncq 12288 out
res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:55:14 arch-imedes kernel: ata1.00: failed command: SEND FPDMA QUEUED
Feb 22 18:55:14 arch-imedes kernel: ata1.00: cmd 64/01:20:00:00:00/00:00:00:00:00/a0 tag 4 ncq 512 out
res 40/00:01:00:00:00/00:00:00:00:00/40 Emask 0x4 (timeout)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:55:14 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:55:14 arch-imedes kernel: ata1.00: cmd 61/00:28:28:c3:67/02:00:2a:00:00/40 tag 5 ncq 262144 out
res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:55:14 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:55:14 arch-imedes kernel: ata1.00: cmd 61/00:d8:d0:ae:67/04:00:2a:00:00/40 tag 27 ncq 524288 out
res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:55:14 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:55:14 arch-imedes kernel: ata1.00: cmd 61/00:e0:d0:b2:67/02:00:2a:00:00/40 tag 28 ncq 262144 out
res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:55:14 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:55:14 arch-imedes kernel: ata1.00: cmd 61/18:e8:e0:4b:52/00:00:2a:00:00/40 tag 29 ncq 12288 out
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:55:14 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:55:14 arch-imedes kernel: ata1.00: cmd 61/00:f0:10:3b:67/02:00:2a:00:00/40 tag 30 ncq 262144 out
res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:55:14 arch-imedes kernel: ata1: hard resetting link
Feb 22 18:55:14 arch-imedes kernel: ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
Feb 22 18:55:14 arch-imedes kernel: ata1.00: supports DRM functions and may not be fully accessible
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
Feb 22 18:55:14 arch-imedes kernel: ata1.00: supports DRM functions and may not be fully accessible
Feb 22 18:55:14 arch-imedes kernel: ata1.00: configured for UDMA/133
Feb 22 18:55:14 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:55:14 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:55:14 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:55:14 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:55:14 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:55:14 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:55:14 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:55:14 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:55:14 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:55:14 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:55:14 arch-imedes kernel: ata1: EH complete
Feb 22 18:55:14 arch-imedes kernel: ata1.00: exception Emask 0x0 SAct 0x400 SErr 0x0 action 0x6 frozen
Feb 22 18:55:14 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:55:14 arch-imedes kernel: ata1.00: cmd 61/00:50:28:c3:67/02:00:2a:00:00/40 tag 10 ncq 262144 out
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:55:14 arch-imedes kernel: ata1: hard resetting link
Feb 22 18:55:14 arch-imedes kernel: ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
Feb 22 18:55:14 arch-imedes kernel: ata1.00: supports DRM functions and may not be fully accessible
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
Feb 22 18:55:14 arch-imedes kernel: ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
Feb 22 18:55:14 arch-imedes kernel: ata1.00: supports DRM functions and may not be fully accessible
Feb 22 18:55:14 arch-imedes kernel: ata1.00: configured for UDMA/133
Feb 22 18:55:14 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:55:14 arch-imedes kernel: ata1: EH complete
Feb 22 18:56:15 arch-imedes kernel: ata1.00: exception Emask 0x0 SAct 0x14 SErr 0x0 action 0x6 frozen
Feb 22 18:56:15 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:56:15 arch-imedes kernel: ata1.00: cmd 61/f8:10:f0:2c:68/00:00:2a:00:00/40 tag 2 ncq 126976 out
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:56:15 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:56:15 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:56:15 arch-imedes kernel: ata1.00: cmd 61/b8:20:d0:4d:68/01:00:2a:00:00/40 tag 4 ncq 225280 out
res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:56:15 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:56:15 arch-imedes kernel: ata1: hard resetting link
Feb 22 18:56:15 arch-imedes kernel: ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Feb 22 18:56:15 arch-imedes kernel: ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
Feb 22 18:56:15 arch-imedes kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
Feb 22 18:56:15 arch-imedes kernel: ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
Feb 22 18:56:15 arch-imedes kernel: ata1.00: supports DRM functions and may not be fully accessible
Feb 22 18:56:15 arch-imedes kernel: ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
Feb 22 18:56:15 arch-imedes kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
Feb 22 18:56:15 arch-imedes kernel: ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
Feb 22 18:56:15 arch-imedes kernel: ata1.00: supports DRM functions and may not be fully accessible
Feb 22 18:56:15 arch-imedes kernel: ata1.00: configured for UDMA/133
Feb 22 18:56:15 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:56:15 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:56:15 arch-imedes kernel: ata1: EH complete
Feb 22 18:56:46 arch-imedes kernel: ata1.00: NCQ disabled due to excessive errors
Feb 22 18:56:46 arch-imedes kernel: ata1.00: exception Emask 0x0 SAct 0x10 SErr 0x0 action 0x6 frozen
Feb 22 18:56:46 arch-imedes kernel: ata1.00: failed command: WRITE FPDMA QUEUED
Feb 22 18:56:46 arch-imedes kernel: ata1.00: cmd 61/08:20:80:e0:07/00:00:00:00:00/40 tag 4 ncq 4096 out
res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 18:56:46 arch-imedes kernel: ata1.00: status: { DRDY }
Feb 22 18:56:46 arch-imedes kernel: ata1: hard resetting link
Feb 22 18:56:46 arch-imedes kernel: ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Feb 22 18:56:46 arch-imedes kernel: ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
Feb 22 18:56:46 arch-imedes kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
Feb 22 18:56:46 arch-imedes kernel: ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
Feb 22 18:56:46 arch-imedes kernel: ata1.00: supports DRM functions and may not be fully accessible
Feb 22 18:56:46 arch-imedes kernel: ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
Feb 22 18:56:46 arch-imedes kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
Feb 22 18:56:46 arch-imedes kernel: ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
Feb 22 18:56:46 arch-imedes kernel: ata1.00: supports DRM functions and may not be fully accessible
Feb 22 18:56:46 arch-imedes kernel: ata1.00: configured for UDMA/133
Feb 22 18:56:46 arch-imedes kernel: ata1.00: device reported invalid CHS sector 0
Feb 22 18:56:46 arch-imedes kernel: ata1: EH completedrivers/ata/libata-core.c +2 -0
@@ -6508,6 +6508,8 @@ static int __init ata_parse_force_one(char **cur, { "rstonce", .lflags = ATA_LFLAG_RST_ONCE }, { "atapi_dmadir", .horkage_on = ATA_HORKAGE_ATAPI_DMADIR }, { "disable", .horkage_on = ATA_HORKAGE_DISABLE }, + { "noqtrim", .horkage_on = ATA_HORKAGE_NO_NCQ_TRIM }, + { "qtrim", .horkage_off = ATA_HORKAGE_NO_NCQ_TRIM }, };char *start = *cur, *p = *cur;char *id, *val, *endp;
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Stefan" == Stefan Keller <[email protected]> writes:
Stefan> Hello list, I recently updated the firmware on my Samsung 850 Stefan> Pro from EXM01B6Q to EXM02B6Q. Now "fstrim -v /" causes SATA Stefan> command timeouts related to TRIM with NCQ.
Do these timeouts happen if you disable ALPM?
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Hello Martin,
Quoted 7 lines · Martin K. Petersen
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Stefan" == Stefan Keller <[email protected]> writes:
Stefan> Hello list, I recently updated the firmware on my Samsung 850 Stefan> Pro from EXM01B6Q to EXM02B6Q. Now "fstrim -v /" causes SATA Stefan> command timeouts related to TRIM with NCQ.
Do these timeouts happen if you disable ALPM?
Yes.
cat /sys/class/scsi_host/host*/link_power_management_policy max_performancemax_performancemax_performancemax_performancemax_performancemax_performance
Still timeouts (actually I think when I initially got them I was connected to power, which in my setup means ALPM disabled). Also the timeouts only happen with TRIM, not with any other heavy I/O.
Best regards,
Stefan
Signature · 1 line
Stefan Keller <[email protected]>
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Stefan" == Stefan Keller <[email protected]> writes:
Stefan> Hello list, I recently updated the firmware on my Samsung 850 Stefan> Pro from EXM01B6Q to EXM02B6Q. Now "fstrim -v /" causes SATA Stefan> command timeouts related to TRIM with NCQ.
Quoted 2 lines
Quoted 2 lines
Do these timeouts happen if you disable ALPM?
Stefan> Yes.
Bummer. The only good data point we have wrt. queued TRIM problems is that things only appear to fail when ALPM is enabled. Things are working fine for me on all the systems in the lab, however, and I have never been able to reproduce any of the issues reported.
I don't have any 850 drives but will try to get one. For now we should blacklist queued trim on those.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Quoted 11 lines · Martin K. Petersen <martin.petersen <at> oracle.com> writes:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Stefan" == Stefan Keller <linux-list <at> zahlenfresser.de> writes:
Stefan> Hello list, I recently updated the firmware on my Samsung 850 Stefan> Pro from EXM01B6Q to EXM02B6Q. Now "fstrim -v /" causes SATA Stefan> command timeouts related to TRIM with NCQ.
Quoted 2 lines
Quoted 2 lines
Do these timeouts happen if you disable ALPM?
Stefan> Yes.
Quoted 8 lines
Bummer. The only good data point we have wrt. queued TRIM problems is that things only appear to fail when ALPM is enabled. Things are working fine for me on all the systems in the lab, however, and I have never been able to reproduce any of the issues reported.
I don't have any 850 drives but will try to get one. For now we should blacklist queued trim on those.
Another data point: I have the same problem, but on a 256 pro. Same firmware (EXM02B6Q from factory), with ALPM disabled.
Regards,
Simon
hello Stefan ,,,My name is Dimitrios,. I have problem with the new firmware of Samsung 850 pro. As hundreds other users my ssd is dead after the firmware update. I tried everything under Linux as gparted, secure erase with dd tool and hdparm. seems that remains locked nad get errors all the time...have you any idea to unlockit??? it would help many of us with dead ssd's.
thanks in advance!
friendly Dimitrios from Athens Greece