Linux Magic SysRq + R S E I V B key chord will immediately shut down while still properly flushing disk cache and such. A bit annoying to enter, but a handy tool to have in your toolbox.
REISUB for a somewhat safe EMERGENCY reboot and O instead of B at the end for shutdown.