@palegreenghosts
It sounds like you're having EXACTLY the same experience that I am. What Mac are you on?
I HOPE you're wrong about it being a hardware issue! Since it ONLY happens in Safari, I think it's crappy coding.
I just had Safari destroy the system to the point where there was no recovery and slow operation. I heard stuff happening in the background (Internet functions running - USB ports active) - but NO WAY to do ANYTHING because of Safari just hanging. I restarted after about 4 minutes of waiting.
It seems that the problem often happens when CLOSING a YouTube window. I think it is, as mentioned, related to HTML5 video.
It's very aggravating that Apple has let this slide for MONTHS. Safari might as well be considered deprecated for now.
FWIW - Here's the what Console showed while I sat watching my 1 year old machine just be able to do NOTHING.
12/15/15 9:50:00.099 AM Safari[326]: tcp_connection_tls_session_error_callback_imp 9777 __tcp_connection_tls_session_callback_write_block_invoke.434 error 22
12/15/15 9:50:02.452 AM Safari[326]: ERROR: History: Failed to insert item into the history_items table: database disk image is malformed (11)
12/15/15 9:50:02.452 AM Safari[326]: ERROR: History: Failed to insert item into the history_items table: database disk image is malformed (11)
12/15/15 9:50:10.433 AM watchdogd[299]: [watchdog_daemon] @(_wd_daemon_service_thread) - service (com.apple.WindowServer) reported as unresponsive
12/15/15 9:50:15.988 AM com.apple.CDScheduler[313]: Thermal pressure state: 2 Memory pressure state: 0
12/15/15 9:50:15.988 AM com.apple.CDScheduler[45]: Thermal pressure state: 2 Memory pressure state: 0
12/15/15 9:50:26.255 AM spindump[589]: Saved userspace_watchdog_timeout.spin report for WindowServer version ??? (???) to /Library/Logs/DiagnosticReports/WindowServer_2015-12-15-095026_*******.userspac e_watchdog_timeout.spin
12/15/15 9:50:26.351 AM watchdogd[299]: [watchdog_daemon] @(__wd_service_report_unresponsive_block_invoke) - spindump gathered for (com.apple.WindowServer) at (/Library/Logs/DiagnosticReports/WindowServer_2015-12-15-095026_*******-2.users pace_watchdog_timeout.spin)
12/15/15 9:50:35.565 AM watchdogd[299]: [watchdog_daemon] @(_wd_daemon_service_thread) - service (com.apple.WindowServer) reported as unresponsive
12/15/15 9:50:42.044 AM spindump[589]: Saved userspace_watchdog_timeout.spin report for WindowServer version ??? (???) to /Library/Logs/DiagnosticReports/WindowServer_2015-12-15-095042_*******.userspac e_watchdog_timeout.spin
12/15/15 9:50:42.047 AM watchdogd[299]: [watchdog_daemon] @(__wd_service_report_unresponsive_block_invoke) - spindump gathered for (com.apple.WindowServer) at (/Library/Logs/DiagnosticReports/WindowServer_2015-12-15-095042_*******o-2.user space_watchdog_timeout.spin)
12/15/15 9:50:42.050 AM mds[63]: (Volume.Normal:166) vsd:0x7fc88b18e000 DisabledStore recycle:19 context:{
DisabledRecycleCount = 19;
}
12/15/15 9:50:42.073 AM mds[63]: (Volume.Error:577) vsd:0x7fc888821800 Open failed. failureCount:19 {
DisabledRecycleCount = 19;
}
12/15/15 9:51:00.705 AM watchdogd[299]: [watchdog_daemon] @(_wd_daemon_service_thread) - service (com.apple.WindowServer) reported as unresponsive
12/15/15 9:51:07.399 AM spindump[589]: Saved userspace_watchdog_timeout.spin report for WindowServer version ??? (???) to /Library/Logs/DiagnosticReports/WindowServer_2015-12-15-095107_*******.userspac e_watchdog_timeout.spin
12/15/15 9:51:07.402 AM watchdogd[299]: [watchdog_daemon] @(__wd_service_report_unresponsive_block_invoke) - spindump gathered for (com.apple.WindowServer) at (/Library/Logs/DiagnosticReports/WindowServer_2015-12-15-095107_*******-2.users pace_watchdog_timeout.spin)
12/15/15 9:51:25.843 AM watchdogd[299]: [watchdog_daemon] @(_wd_daemon_service_thread) - service (com.apple.WindowServer) reported as unresponsive
12/15/15 9:51:46.135 AM com.apple.CDScheduler[313]: Thermal pressure state: 1 Memory pressure state: 0
12/15/15 9:51:46.135 AM com.apple.CDScheduler[45]: Thermal pressure state: 1 Memory pressure state: 0
12/15/15 9:51:50.988 AM watchdogd[299]: [watchdog_daemon] @(_wd_daemon_service_thread) - service (com.apple.WindowServer) reported as unresponsive
12/15/15 9:52:16.126 AM watchdogd[299]: [watchdog_daemon] @(_wd_daemon_service_thread) - service (com.apple.WindowServer) reported as unresponsive
12/15/15 9:52:41.271 AM watchdogd[299]: [watchdog_daemon] @(_wd_daemon_service_thread) - service (com.apple.WindowServer) reported as unresponsive
12/15/15 9:53:06.417 AM watchdogd[299]: [watchdog_daemon] @(_wd_daemon_service_thread) - service (com.apple.WindowServer) reported as unresponsive
12/15/15 9:53:31.553 AM watchdogd[299]: [watchdog_daemon] @(_wd_daemon_service_thread) - service (com.apple.WindowServer) reported as unresponsive