builtin ssd has bad sectors
This is my new MacBook Pro 2017, with 1T built in SSD. It works just well, except some files became unusable occasionally. Now, the file system is formatted as APFS. But before upgrade to macOS 10.13 it's HFS+. Same thing happened on both of these FS. Though I can recovery the broken file from backup, there is a big change to loose my data. So, I have to backup my system frequently, and I need to solve it urgently.
This is how I tell the file is broken.
Method (1): When I copy the broken file to external hard disk by copy-and-paste or something like that. Error message popups as "The Finder can’t complete the operation because some data in xxx can’t be read or written. (Error code -36)".
Method (2): Test the file with "cp" command as the following:
cp xxx yyy
The output would be like:
cp: xxx: Device error
Left the file yyy created but of a smaller length, means "cp" command stopped at that point.
I'm sure there is no permission or file system issues in this situation.
So, did this means that the SSD is broken and I need to replace it?
MacBook Pro (13-inch, 2017, 4 TBT3), macOS High Sierra (10.13.2)