Beachballing causing Macbook Pro to freeze, with possibly failing SSD

hangssd

I have a Macbook Pro Retina 15" Late 2013 model (out of Apple Care protection) running Sierra v10.12.6 and it has never frozed up for me until 2 days back, when I was just browsing some pictures via finder when the beachball appeared and it froze. I had to hold the power key to force shutdown it. Upon reboot, the folder with a question mark showed up.

enter image description here

I learnt that it shows up when the mac OS can't find a bootable disk so it doesn't know where to boot from. I tried running into internet recovery mode but when I chose disk utility to scan SSD for errors, there was no drive to select. Makes sense if the SSD has failed all of a sudden and it wasn't being detected at all.

I tried rebooting again, it booted up just fine. Ran Disk Utility – First aid option, it told me all is OK. So, I thought of taking up a time machine backup in case I had to change SSD, I can just restore backup. Now, after trying a couple of times, in mid of the backup it would get stuck in a position where Time machine backup has stopped as if I cancelled it. The Time machine application continues to run. In finder, all the folders are gone. The computer is not much responsive at the moment. Again, pointing towards the fact that SSD stopped working in between, and hence backup failed + finder is not showing any folders in its sidebar anymore.

Then yesterday, I tried booting it back, running hardware diagnostics at boot and it reported nothing was wrong with the hardware.

enter image description here

I tried running SMART status tools too, and here is the report – https://gist.github.com/ashfame/0bbf0b7fb06040443a45320a6c112358

Now the mac's self diagnostics hardware test + SMART status is showing the SSD to be functioning correctly, passing all tests.

So may be its a software problem? Since then I have successfully taken up a timemachine backup. It hasn't crashed without not able to detect the SSD since yesterday but the beachball appeared today and it froze. Upon restart, all is working fine again. I tried checking the system.log for the reason of freeze up, but can't find anything significant. I searched for most of the log entries individually on Google.

Here is the portion of system.log for today, since I wake it up from sleep, till I had to force restart it – https://gist.github.com/ashfame/39fbe27a6ddee0ed6627bf51edf6eea3

Lastly, here is the attached report out of Etrecheck – https://gist.github.com/ashfame/a0466d6937669cedaebbb027663a48f9

And as I am writing this, I just saw this kernel panic in Etrecheck report, which says Root disk errors: "Could not recover SATA HDD after 5 attempts. Terminating." See below:

Anonymous UUID:       B0BCE3F5-A0A7-0F90-F9A1-68EE64312C7E

Sat Jul 29 10:40:56 2017

*** Panic Report ***
panic(cpu 6 caller 0xffffff80057fe39d): Kernel trap at 0xffffff7f87e6b447, type 14=page fault, registers:
CR0: 0x000000008001003b, CR2: 0xffffff80ed60b118, CR3: 0x0000000008f25000, CR4: 0x00000000001627e0
RAX: 0xffffff8023c27000, RBX: 0xffffff8026b7a000, RCX: 0xffffff80ed60b100, RDX: 0x0000000000000001
RSP: 0xffffff91133a3e00, RBP: 0xffffff91133a3e20, RSI: 0xffffff8024de82a0, RDI: 0xffffff91133a3e00
R8:  0x000000000000ffff, R9:  0x0000000000000001, R10: 0x0000003fffffff01, R11: 0xffffff8026dcd300
R12: 0x0000000100000561, R13: 0xffffff8005c93e40, R14: 0xffffff91133a3e00, R15: 0xffffff8024de8200
RFL: 0x0000000000010286, RIP: 0xffffff7f87e6b447, CS:  0x0000000000000008, SS:  0x0000000000000010
Fault CR2: 0xffffff80ed60b118, Error code: 0x0000000000000002, Fault CPU: 0x6, PL: 0, VF: 10

Backtrace (CPU 6), Frame : Return Address
0xffffff91133a3a90 : 0xffffff80056e953c 
0xffffff91133a3b10 : 0xffffff80057fe39d 
0xffffff91133a3cf0 : 0xffffff800569a593 
0xffffff91133a3d10 : 0xffffff7f87e6b447 
0xffffff91133a3e20 : 0xffffff7f87e8210a 
0xffffff91133a3e40 : 0xffffff7f87e81ea8 
0xffffff91133a3e60 : 0xffffff7f87e81f34 
0xffffff91133a3e90 : 0xffffff8005c93f03 
0xffffff91133a3ed0 : 0xffffff8005cbaafe 
0xffffff91133a3f10 : 0xffffff8005c932f8 
0xffffff91133a3f90 : 0xffffff8005c92927 
0xffffff91133a3fb0 : 0xffffff80056978f7 
      Kernel Extensions in backtrace:
         com.apple.iokit.IOAcceleratorFamily2(311.14)[13F71024-7246-3AD1-A551-5C186BC70889]@0xffffff7f87e51000->0xffffff7f87ee0fff
            dependency: com.apple.iokit.IOPCIFamily(2.9)[3E00E7D2-E569-341D-9BE0-34D5DE491825]@0xffffff7f85f32000
            dependency: com.apple.iokit.IOGraphicsFamily(515.3)[A423518D-758D-3021-A111-A59F44D760A8]@0xffffff7f86c2b000

BSD process name corresponding to current thread: kernel_task

Mac OS version:
16G29

Kernel version:
Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
Kernel UUID: D3314D98-5D40-3CD8-98A4-F1DD46C20E03
Kernel slide:     0x0000000005400000
Kernel text base: 0xffffff8005600000
__HIB  text base: 0xffffff8005500000
System model name: MacBookPro11,2 (Mac-3CBD00234E554E41)
Root disk errors: "Could not recover SATA HDD after 5 attempts. Terminating."

System uptime in nanoseconds: 28525467315732
last loaded kext at 26564005657615: com.apple.driver.usb.cdc    5.0.0 (addr 0xffffff7f8875d000, size 28672)
last unloaded kext at 26875731360905: com.apple.driver.AppleMikeyHIDDriver  131 (addr 0xffffff7f88764000, size 8192)
loaded kexts:
org.virtualbox.kext.VBoxNetAdp  5.1.18
org.virtualbox.kext.VBoxNetFlt  5.1.18
org.virtualbox.kext.VBoxUSB 5.1.18
ch.tripmode.TripModeNKE 2.0.0
org.virtualbox.kext.VBoxDrv 5.1.18
com.apple.driver.AudioAUUC  1.70
com.apple.filesystems.autofs    3.0
com.apple.driver.AppleUpstreamUserClient    3.6.4
com.apple.driver.AppleGraphicsDevicePolicy  3.14.49
com.apple.driver.AppleHDA   279.48
com.apple.driver.ApplePlatformEnabler   2.7.0d0
com.apple.driver.AGPM   110.23.17
com.apple.driver.X86PlatformShim    1.0.0
com.apple.driver.pmtelemetry    1
com.apple.iokit.IOUserEthernet  1.0.1
com.apple.iokit.IOBluetoothSerialManager    5.0.5f1
com.apple.Dont_Steal_Mac_OS_X   7.0.0
com.apple.driver.AppleIntelHD5000Graphics   10.2.5
com.apple.driver.AppleOSXWatchdog   1
com.apple.driver.AppleHV    1
com.apple.driver.AppleThunderboltIP 3.0.8
com.apple.driver.AppleLPC   3.1
com.apple.driver.AppleIntelFramebufferAzul  10.2.5
com.apple.driver.AppleCameraInterface   5.60.0
com.apple.driver.AppleSMCLMU    208
com.apple.driver.AppleIntelSlowAdaptiveClocking 4.0.0
com.apple.driver.AppleBacklight 170.9.20
com.apple.driver.AppleMCCSControl   1.3.4
com.apple.driver.AppleUSBCardReader 404.50.6
com.apple.driver.AppleUSBTCButtons  252
com.apple.driver.AppleUSBTCKeyboard 252
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0
com.apple.BootCache 40
com.apple.filesystems.hfs.kext  366.70.1
com.apple.iokit.IOAHCIBlockStorage  295.20.1
com.apple.driver.AppleAHCIPort  326.60.1
com.apple.driver.AirPort.Brcm4360   1150.12.1a1
com.apple.driver.AppleACPIButtons   5.0
com.apple.driver.AppleSmartBatteryManager   161.0.0
com.apple.driver.AppleRTC   2.0
com.apple.driver.AppleHPET  1.8
com.apple.driver.AppleSMBIOS    2.1
com.apple.driver.AppleACPIEC    5.0
com.apple.driver.AppleAPIC  1.7
com.apple.nke.applicationfirewall   172
com.apple.security.quarantine   3
com.apple.security.TMSafetyNet  8
com.apple.iokit.IOUSBUserClient 900.4.1
com.apple.kext.triggers 1.0
com.apple.driver.DspFuncLib 279.48
com.apple.kext.OSvKernDSPLib    525
com.apple.iokit.IOSerialFamily  11
com.apple.iokit.IOSurface   159.9
com.apple.driver.AppleSSE   1.0
com.apple.driver.AppleHDAController 279.48
com.apple.iokit.IOHDAFamily 279.48
com.apple.iokit.IOAudioFamily   205.15
com.apple.vecLib.kext   1.2.0
com.apple.AppleGraphicsDeviceControl    3.14.49
com.apple.iokit.IOAcceleratorFamily2    311.14
com.apple.driver.AppleGraphicsControl   3.14.49
com.apple.driver.X86PlatformPlugin  1.0.0
com.apple.driver.IOPlatformPluginFamily 6.0.0d8
com.apple.iokit.IOSlowAdaptiveClockingFamily    1.0.0
com.apple.driver.AppleBacklightExpert   1.1.0
com.apple.iokit.IONDRVSupport   516.1
com.apple.driver.AppleSMC   3.1.9
com.apple.driver.AppleSMBusController   1.0.18d1
com.apple.iokit.IOGraphicsFamily    515.3
com.apple.iokit.IOSCSIBlockCommandsDevice   394.50.1
com.apple.iokit.IOUSBMassStorageDriver  131.60.1
com.apple.iokit.IOSCSIArchitectureModelFamily   394.50.1
com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport 5.0.5f1
com.apple.iokit.IOBluetoothHostControllerUSBTransport   5.0.5f1
com.apple.iokit.IOBluetoothHostControllerTransport  5.0.5f1
com.apple.iokit.IOBluetoothFamily   5.0.5f1
com.apple.driver.AppleUSBMultitouch 258
com.apple.driver.usb.IOUSBHostHIDDevice 1.1
com.apple.driver.usb.networking 5.0.0
com.apple.driver.usb.AppleUSBHostCompositeDevice    1.1
com.apple.driver.usb.AppleUSBHub    1.1
com.apple.driver.CoreStorage    540.30.1
com.apple.filesystems.hfs.encodings.kext    1
com.apple.iokit.IOAHCIFamily    288
com.apple.driver.AppleThunderboltDPInAdapter    5.0.2
com.apple.driver.AppleThunderboltDPAdapterFamily    5.0.2
com.apple.driver.AppleThunderboltPCIDownAdapter 2.1.3
com.apple.driver.AppleThunderboltNHI    4.5.4
com.apple.iokit.IOThunderboltFamily 6.5.7
com.apple.iokit.IO80211Family   1200.12.2
com.apple.driver.mDNSOffloadUserClient  1.0.1b8
com.apple.iokit.IONetworkingFamily  3.2
com.apple.driver.corecapture    1.0.4
com.apple.driver.usb.AppleUSBXHCIPCI    1.1
com.apple.driver.usb.AppleUSBXHCI   1.1
com.apple.driver.usb.AppleUSBHostPacketFilter   1.0
com.apple.iokit.IOUSBFamily 900.4.1
com.apple.driver.AppleUSBHostMergeProperties    1.1
com.apple.driver.AppleEFINVRAM  2.1
com.apple.iokit.IOHIDFamily 2.0.0
com.apple.driver.AppleEFIRuntime    2.1
com.apple.iokit.IOSMBusFamily   1.1
com.apple.security.sandbox  300.0
com.apple.kext.AppleMatch   1.0.0d1
com.apple.driver.AppleKeyStore  2
com.apple.driver.AppleMobileFileIntegrity   1.0.5
com.apple.driver.AppleCredentialManager 1.0
com.apple.driver.KernelRelayHost    1
com.apple.iokit.IOUSBHostFamily 1.1
com.apple.driver.AppleBusPowerController    1.0
com.apple.driver.DiskImages 444.50.16
com.apple.iokit.IOStorageFamily 2.1
com.apple.iokit.IOReportFamily  31
com.apple.driver.AppleFDEKeyStore   28.30
com.apple.driver.AppleACPIPlatform  5.0
com.apple.iokit.IOPCIFamily 2.9
com.apple.iokit.IOACPIFamily    1.4
com.apple.kec.Libm  1
com.apple.kec.pthread   1
com.apple.kec.corecrypto    1.0

System Profile:
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x134), Broadcom BCM43xx 1.0 (7.21.171.130.1a1)
Bluetooth: Version 5.0.5f1, 3 services, 17 devices, 1 incoming serial ports
Thunderbolt Bus: MacBook Pro, Apple Inc., 17.1
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343531533641465238412D50422020
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343531533641465238412D50422020
USB Device: USB 3.0 Bus
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Serial ATA Device: APPLE SSD SM0256F, 251 GB
Model: MacBookPro11,2, BootROM MBP112.0138.B40, 4 processors, Intel Core i7, 2 GHz, 8 GB, SMC 2.18f15
Network Service: Wi-Fi, AirPort, en0
Graphics: Intel Iris Pro, Intel Iris Pro, Built-In

Please help me figure out whether is it a software issue or a hardware issue. If its hardware, I wouldn't like to go through the trouble of setting and configuring everything up again. Could it be just a hardware connection? A loose wire or something? Should I try reinstalling Mac OS? If so, is it advised to start fresh rather than restoring from a time machine backup? I can live without restoring the time machine backup, can access any files manually that I need. My most important things are already backed up. Just wish for a super solid reliable setup that keeps on running like it has been so far. Thanks for taking the time to read through all of it.

Edit: SSD benchmark from Ubuntu live USB tells me read speed is awfully slow ssd benchmark

Blackmagic speed test shows it to be alright though ssd speed test

DriveDx health metrics: drivedx health metrics

Disk Drill report: disk drill report

Best Answer

Firstly, backup all yourimportant documents that you don't already have a second copy of (if you can). Secondly as IconDaemon suggested, reinstall the OS using internet recovery. Usually I'd suggest just using the local recovery partition but using the external, known good copy of macOS will be beneficial in this case, even though the restore is significantly slower. (Set it up to go over night, it's never very fast, at least not in my area) If the install fails it's likely you have a hardware issue. If the install goes well but the issue persists I'd attempt to wipe your computer complete and then reinstall again. This ensures your user data such as your 3rd party apps aren't causing and issue. Dont do this if you don't have a good backup obviously because you will be losing your data.

Thirdly, and you are starting to run out of options here, I'd try booting to the Internet recovery and installing macOS on a different storage device. This can be a spare hard drive or a large USB stick. This will isolate not only your user data but also the SSD. If this solves the issue you've likely got a faulty SSD. If not it's possible that there is something wrong with you core components or buses - which will likely mean you have a faulty logic board.

Its most likely that your system is corrupt however is also fairly possible your SSD has failed. The steps above should help you determine the cause of the issue but there is no easy way out of diagnosing the issue, you will have to do restores.