Because my drive will freeze occasionally, I would have to pull the cable out. (see the question below for more detail):
I've heard that doing so will hurt (or break, in the worst scenario) the drive, so I wonder whether there is a way to force eject a device which would avoid the physical damage. I need to force eject it because the drive (like other ordinary drives) will try to read one block over and over until it reads successfully or reached timeout. When it's stuck trying to read a damaged block, the kernel will block the process/thread until there is a result. The application waiting for I/O will act as if it's stopped, so even using force quit / sigkill won't quit the application. Because the timeout is usually long for home-use HHD, the core GUI component of the system (Finder + Dock) will freeze for a long time, thus preventing normal usage.
Note that force eject a device is not the equivalent as force unmount a partition. Force eject the HDD will make the read/write header land in the parking zone, and the drive will stop spinning.
Edit: I replaced my drive with a new one (same model, actually) and used ddrescue to copy all the data. I did find 3 bad areas that are ~ 1 mb each. ddrescue did freeze when it encounters these bad areas (I'm using raw disk access, i.e. /dev/rdiskX), so it's not a system problem. However, I would still like to know how to force eject a mass storage device when it is stuck.
Below is the etrecheck report:
EtreCheck version: 5.0.5 (5A016)
Report generated: 2019-07-10 18:33:17
Download EtreCheck from https://etrecheck.com
Runtime: 4:41
Performance: Good
Problem: Other problem
Description:
HDD freeze
Major Issues:
Anything that appears on this list needs immediate attention.
Time Machine backup out-of-date - The last Time Machine backup is over 10 days old.
System Integrity Protection disabled - System Integrity Protection is disabled. This computer is at risk of malware infection.
Kernel panics - This system has experienced kernel panics that could be related to 3rd party software.
Heavy CPU usage - Some processes are using an unusually high amount of CPU.
Minor Issues:
These issues do not need immediate attention but they may indicate future problems.
Heavy RAM usage - This machine is using a large amount of RAM.
Apps crashing - There have been numerous app crashes.
Unsigned files - There are unsigned software files installed. They appear to be legitimate but should be reviewed.
Abnormal shutdown - Your machine shut down abnormally.
Hardware Information:
MacBook Pro (13-inch, 2017, Four Thunderbolt 3 ports)
MacBook Pro Model: MacBookPro14,2
1 3.1 GHz Intel Core i5 (i5-7267U) CPU: 2-core
16 RAM - Not upgradeable
BANK 0/DIMM0 - 8 GB LPDDR3 2133 ok
BANK 1/DIMM0 - 8 GB LPDDR3 2133 ok
Battery: Health = Normal - Cycle count = 335
Video Information:
Intel Iris Plus Graphics 650 - VRAM: 1536 MB
Color LCD 2880 x 1800
Drives:
disk0 - APPLE SSD AP0512J 500.28 GB (Solid State - TRIM: Yes)
Internal PCI-Express 8.0 GT/s x4 NVM Express
disk0s1 - EFI [EFI] 315 MB
disk0s2 [APFS Container] 499.96 GB
disk1 [APFS Virtual drive] 499.96 GB (Shared by 4 volumes)
disk1s1 - M***************a (APFS) (Shared - 457.50 GB used)
disk1s2 - Preboot (APFS) [APFS Preboot] (Shared - 46 MB used)
disk1s3 - Recovery (APFS) [Recovery] (Shared - 1.04 GB used)
disk1s4 - VM (APFS) [APFS VM] (Shared - 17.47 GB used)
disk2 - Seagate BUP BK 5.00 TB
External USB 5 Gbit/s USB
disk2s1 - EFI (MS-DOS FAT32) [EFI] 210 MB
disk2s2 - S******************) (Journaled HFS+) 5.00 TB (2.08 TB used)
Mounted Volumes:
disk1s1 - M***************a 499.96 GB (22.69 GB free)
APFS
Mount point: /
disk1s4 - VM [APFS VM] (Shared - 17.47 GB used)
APFS
Mount point: /private/var/vm
disk2s2 - S******************) 5.00 TB (2.92 TB free)
Journaled HFS+
Mount point: /Volumes/S******************)
disk4s2 - M***********0 41 MB (16 MB free)
Mac OS Extended
Disk Image
Mount point: /Volumes/M***********0
Network:
Interface en8: Belkin USB-C LAN
Proxies: HTTP, HTTPS, SOCKS
Interface en10: iPhone
Proxies: HTTP, HTTPS, SOCKS
Interface en0: Wi-Fi
Proxies: HTTP, HTTPS, SOCKS
Interface en7: Bluetooth PAN
Proxies: HTTP, HTTPS, SOCKS
System Software:
macOS High Sierra 10.13.6 (17G65)
Time since boot: About 6 days
Configuration Files:
File /etc/sudoers size: Found 1584 B but expected 1563 B
File /etc/sysctl.conf exists but not expected
/etc/hosts - Count: 12
Security:
System Status
Gatekeeper Enabled
System Integrity Protection enabled (Custom Configuration)
Unsigned Files:
Launchd: ~/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.http.plist
Executable: ~/Library/Application Support/ShadowsocksX-NG/privoxy --no-daemon privoxy.config
Details: Exact match found in the whitelist - probably OK
Launchd: ~/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.local.plist
Executable: ~/Library/Application Support/ShadowsocksX-NG/ss-local -c ss-local-config.json -v
Details: Exact match found in the whitelist - probably OK
Launchd: /private/var/***/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.local.plist
Executable: ~/Library/Application Support/ShadowsocksX-NG/ss-local -c ss-local-config.json -v
Details: Exact match found in the whitelist - probably OK
Launchd: /private/var/***/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.http.plist
Executable: ~/Library/Application Support/ShadowsocksX-NG/privoxy --no-daemon privoxy.config
Details: Exact match found in the whitelist - probably OK
Launchd: /Library/LaunchAgents/com.oracle.java.Java-Updater.plist
Executable: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/Java Updater.app/Contents/MacOS/Java Updater -bgcheck
Details: Exact match found in the whitelist - probably OK
Launchd: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/com.oracle.java.Java-Updater.plist
Executable: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/Java Updater.app/Contents/MacOS/Java Updater -bgcheck
Details: Exact match found in the whitelist - probably OK
Launchd: /Library/LaunchAgents/com.micromat.TechToolProAgent.plist
Executable: /Library/PreferencePanes/TechTool Protection.prefPane/Contents/PlugIns/TechToolProAgent.app/Contents/MacOS/TechToolProAgent
Details: Exact match found in the whitelist - probably OK
Launchd: /Library/LaunchDaemons/com.oracle.java.Helper-Tool.plist
Executable: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/Helper-Tool
Details: Exact match found in the whitelist - probably OK
Launchd: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/com.oracle.java.Helper-Tool.plist
Executable: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/Helper-Tool
Details: Exact match found in the whitelist - probably OK
Launchd: /Library/LaunchDaemons/com.micromat.TechToolProDaemon.plist
Executable: /Library/PreferencePanes/TechTool Protection.prefPane/Contents/PlugIns/TechToolProDaemon.app/Contents/MacOS/TechToolProDaemon
Details: Exact match found in the whitelist - probably OK
Kernel Extensions:
/Library/Extensions
intelhaxm.kext (7.3.0 - SDK 10.9)
LuLu.kext (1.1.2 - SDK 10.14)
ufsd_NTFS.kext (15.4.19 - SDK 10.10)
/***/Library/Extensions
ssuddrv.kext (1.4.32 - SDK 10.6)
SamsungPortableSSDDriver.kext (1.5.02 - SDK 10.7)
/***/Library/Extensions/ssuddrv.kext/Contents/PlugIns
ssudmdmcontrol.kext (1.4.32 - SDK 10.6)
ssudmdmdata.kext (1.4.32 - SDK 10.6)
ssudmtp.kext (1.4.32 - SDK 10.5)
ssudserial.kext (1.4.32 - SDK 10.6)
System Launch Agents:
[Not Loaded] 9 Apple tasks
[Loaded] 164 Apple tasks
[Running] 75 Apple tasks
[Killed] 43 Apple tasks
[Other] 3 Apple tasks
System Launch Daemons:
[Not Loaded] 36 Apple tasks
[Loaded] 155 Apple tasks
[Running] 105 Apple tasks
[Killed] 39 Apple tasks
[Other] One Apple task
Launch Agents:
[Loaded] com.oracle.java.Java-Updater.plist (? 732efa87 - installed 2019-06-25)
[Other] com.adobe.AdobeCreativeCloud.plist (Adobe Systems, Inc. - installed 2019-06-18)
[Not Loaded] com.adobe.GC.AGM.plist (Adobe Systems, Inc. - installed 2019-06-20)
[Other] com.google.keystone.agent.plist (Google, Inc. - installed 2019-06-04)
[Not Loaded] com.adobe.AAM.Updater-1.0.plist (Adobe Systems, Inc. - installed 2019-06-25)
[Running] com.micromat.TechToolProAgent.plist (? c83170ec - installed 2019-06-24)
[Not Loaded] com.adobe.GC.Invoker-1.0.plist (Adobe Systems, Inc. - installed 2019-06-20)
Launch Daemons:
[Loaded] com.sweetpproductions.WiFiSpoofHelperTool.plist (SweetP Productions, Inc. - installed 2019-06-04)
[Loaded] com.adobe.ARMDC.Communicator.plist (Adobe Systems, Inc. - installed 2019-06-18)
[Loaded] com.google.keystone.daemon.plist (Google, Inc. - installed 2019-06-04)
[Running] com.cleverfiles.cfbackd.plist (Justin Johnson - installed 2019-06-08)
[Loaded] com.apple.bluetooth.PacketLoggerHelper.plist (Apple - installed 2019-05-13)
[Running] com.micromat.TechToolProDaemon.plist (? c4e58e15 - installed 2019-06-24)
[Loaded] com.oracle.java.Helper-Tool.plist (? e3fefdd2 - installed 2019-06-25)
[Loaded] com.macpaw.CleanMyMac3.Agent.plist (MacPaw Inc. - installed 2018-05-26)
[Loaded] com.adobe.ARMDC.SMJobBlessHelper.plist (Adobe Systems, Inc. - installed 2019-06-18)
User Launch Agents:
[Running] com.qiuyuzhou.shadowsocksX-NG.local.plist (? 0 - installed 2019-07-10)
[Not Loaded] com.adobe.GC.Invoker-1.0.plist (Adobe Systems, Inc. - installed 2019-06-20)
[Loaded] com.macpaw.CleanMyMac3.Scheduler.plist (MacPaw Inc. - installed 2018-10-19)
[Running] com.qiuyuzhou.shadowsocksX-NG.http.plist (? 0 - installed 2019-07-10)
User Login Items:
ShadowsocksX-NG-R8.app (? - installed 2018-10-08)
(/Applications/ShadowsocksX-NG-R8.app)
CleanMyMac 3 Menu.app (? - installed 2017-12-19)
(/Applications/CleanMyMac 3.app/Contents/MacOS/CleanMyMac 3 Menu.app)
Flux.app (Michael Herf - installed 2018-01-09)
(/Applications/Flux.app)
SmartDaemon.app (Justin Johnson - installed 2019-06-08)
(/Library/Application Support/CleverFiles/SmartDaemon.app)
EOS Utility.app (Canon Inc. - installed 2019-01-09)
(/Applications/Canon Utilities/EOS Utility/EOS Utility.app)
Image Transfer Utility 2.app (Canon Inc. - installed 2019-07-08)
(/Applications/Canon Utilities/ImageTransferUtility2/Image Transfer Utility 2.app)
ShadowsocksX-NG-R8 (? - installed 2018-10-08)
(/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/AppTranslocation/44DA3994-FE3D-4B89-918A-72240AD18C44/d/ShadowsocksX-NG-R8.app/Contents/MacOS/ShadowsocksX-NG)
Flux (Michael Herf - installed 2018-01-09)
(/Applications/Flux.app/Contents/MacOS/Flux)
SmartDaemon (Justin Johnson - installed 2019-06-08)
(/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/AppTranslocation/67E37FDB-1E1F-4F5F-8F3F-711ABA225E44/d/SmartDaemon.app/Contents/MacOS/SmartDaemon)
CleanMyMac 3 Menu (MacPaw Inc. - installed 2017-12-19)
(/Applications/CleanMyMac 3.app/Contents/MacOS/CleanMyMac 3 Menu.app/Contents/MacOS/CleanMyMac 3 Menu)
Internet Plug-ins:
AdobeAAMDetect: 3.0.0.0 (installed 2019-06-18)
FlashPlayer-10.6: 32.0.0.192 (installed 2019-05-15)
QuickTime Plugin: 7.7.3 (installed 2018-07-04)
AdobePDFViewerNPAPI: 17.012.20098 (installed 2019-06-25)
AdobePDFViewer: 19.012.20034 (installed 2019-06-25)
Flash Player: 32.0.0.192 (installed 2019-05-15)
Scorch: (installed 2018-10-25)
PepperFlashPlayer: 32.0.0.192 (installed 2019-05-18)
JavaAppletPlugin: Java 8 Update 211 build 12 (installed 2019-06-25)
Safari Extensions:
Free Download Manager.safariextz - FreeDownloadManager.org - http://freedownloadmanager.org (installed 2018-09-28)
3rd Party Preference Panes:
Flash Player (installed 2019-04-30)
FUSE (installed 2018-12-18)
Java (installed 2019-06-25)
NTFS (installed 2018-10-02)
Perian (installed 2013-12-11)
TechTool Protection (installed 2019-06-24)
Toolkit (installed 2019-03-15)
Time Machine:
Skip System Files: No
Mobile backups:
Auto backup: Yes
Volumes being backed up:
M***************a: Disk size: 499.96 GB - Disk used: 477.27 GB
Destinations:
J**********p [Local] (Last used)
Total size: 5.00 TB
Total number of backups: 14
Oldest backup: 2019-02-10 12:14:49
Last backup: 2019-02-19 20:52:43
Performance:
System Load: 5.91 (1 min ago) 4.52 (5 min ago) 3.94 (15 min ago)
Nominal I/O speed: 4.98 MB/s
File system: 38.13 seconds
Write speed: 1159 MB/s
Read speed: 2986 MB/s
Top Processes by CPU:
Process (count) Source CPU Location
Google Chrome Helper (172) Google, Inc. 89.89 %
Google Chrome Google, Inc. 43.62 %
kernel_task Apple 23.65 %
fdm SoftDeluxe, Inc 22.64 %
WindowServer Apple 15.62 %
Top Processes by Memory:
Process (count) Source RAM usage Location
Google Chrome Helper (172) Google, Inc. 6.29 GB
kernel_task Apple 2.26 GB
Google Chrome Google, Inc. 815 MB
fdm SoftDeluxe, Inc 573 MB
Finder Apple 406 MB
Top Processes by Network Use:
Process Source Input Output Location
os-book.com ? 198 MB 14 KB wget -r --xattr -c -N -kK -p --follow-ftp http:
fdm SoftDeluxe, Inc 74 MB 7 MB
ss-local ? 9 MB 805 KB ~/Library/Application Support/ShadowsocksX-NG
mDNSResponder Apple 1011 KB 846 KB
EmbeddedOSInstallService Apple 149 KB 210 KB
Virtual Memory Information:
Available RAM 1.61 GB
Free RAM 69 MB
Used RAM 14.39 GB
Cached files 1.54 GB
Swap Used 14.72 GB
Software Installs (past 30 days):
Name Version Install Date
Adobe Acrobat DC (19.012.20034) 19.012.20034 2019-06-25
Java 8 Update 211 1.0 2019-06-25
Air Explorer 1.6.1 2019-07-08
Diagnostics Information (past 7 days):
2019-07-10 17:33:02 Xcode.app Crash
/Applications/Xcode.app
dyld: launch, loading dependent libraries, ignoring DYLD_* env vars
2019-07-10 11:47:41 AppDelete.app Crash
/Applications/AppDelete.app
Crashing on exception: *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array
2019-07-10 11:29:07 ifuse Crash
/usr/local/Cellar/ifuse/1.1.3/bin/ifuse
dyld: launch, loading dependent libraries
2019-07-09 13:43:52 quicklookd.app CPU
/***/Library/Frameworks/QuickLook.framework/Versions/A/Resources/quicklookd.app
2019-07-08 13:12:05 com.apple.WebKit.Plugin.64 Crash
/***/Library/StagedFrameworks/Safari/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.Plugin.64.xpc/Contents/MacOS/com.apple.WebKit.Plugin.64
2019-07-08 10:41:24 UniversalInstaller.app Crash
/var/folders/*/UniversalInstaller.app
2019-07-08 10:36:24 coreaudiod Crash
/usr/sbin/coreaudiod
2019-07-06 11:46:07 KeyRecoveryAssistant.app Crash
/Volumes/*/K**********************p
dyld: launch, loading dependent libraries
2019-07-04 13:19:34 UpdaterStartupUtility Crash
/Applications/Utilities/Adobe Application Manager/*/UpdaterStartupUtility
abort() called
*** error for object 0x7fb546711f98: incorrect checksum for freed object - object was probably modified after being freed.
2019-07-04 13:13:09 Last Shutdown Cause: 3 - Hard shutdown
2019-07-04 13:00:52 mdworker CPU
/***/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Support/mdworker
2019-07-03 20:54:26 Kernel Panic
3rd party kernel extensions:
com.objective-see.lulu 1.1.2
com.devguru.driver.SamsungMTP 1.4.32
com.samsung.portablessd.driver 1.5.02
com.devguru.driver.SamsungACMData 1.4.32
End of report