bonnie++ comes to mind:
So, depending on your box's hardware configuration:
bonnie++ -d /path/to/mounted/ssd -r your-system-ram-size-in-MB
# For a 32GB system with the SSD formatted and mounted at /mnt/mounted-ssd-001
bonnie++ -d /mnt/mounted-ssd-001 -r 32000
It should give your device a good stress test. You can customize it as well.
Note, with an SSD, when a bad block happens, it may get remap'd automatically by the drive hardware, depending on the drive you are working with. Also, a torture test eats away at your SSD's write lifespan. So, use at your own discretion.
Adding a note about SSD failures, since it's been pointed out that Bonnie++ stress tests, but doesn't track errors. The way SSD(s) "remap bad blocks" is different from the way hard drives do remapping. How it goes about it depends entirely on which brand/make/model of SSD you have:
- Cheap SSD(s) just fail, because they have no spare capacity to remap, or because they have no means of segregating the failed flash blocks. They will just hang or go offline and won't come back online.
- Midrange SSD(s) with no spare capacity may generate Smartd alerts or perhaps even generate OS level block device errors when a failed block is detected. However, when the fail happens, the SSD's registered size will change. This can result in an error and the device being taken offline by the OS or it can result in the device itself hanging and needing to be pulled out and re-inserted for it to be recognized again. On re-registering, the device's available block size will be diminished.
- High end SSD(s) with spare capacity will remap the bad blocks behind the scenes and may generate OS level alerts/warnings. When the spare capacity runs out, the device will probably fail along the lines of the Midrange SSD(s).
When the SSD resizes itself due to bad blocks being isolated, you might need to do the following to revive the drive, if the drive's firmware doesn't automatically do the proper updates automatically:
Unless the stress test and error logging tool is specifically designed with SSD(s), in mind, you are just using up the lifespan of the device.
Based on info from answers above, suggest either replacing the cable with a better one or replacing the drive(RMA/Warrantee replacement), as that kind of OS filesystem level error is not normal.
Also, if your drive supports it, you can increase the amount of space reserved for handling errors: