Joomla's Kunena forum breaks after attempting upgrading to version 5.0.6 (using Joomla auto-updater). Upgrade fails, in the front-end the forum displays "Offline" message. Trying to get into Kunena back-end admin panel triggers an attempt to resume the upgrade which immediately fails again...
Trying to install Kunena manually (uploading pkg_kunena_v5.0.5 package via Joomla's installer) seems to succeed at first, but forum is still broken. Trying to remove the forum and then re-install uploading the same package also seems to succeed, but this breaks Kunena completely. Any attempt to get into Kunena front-end or back-end throws HTTP 500 error page...
The issue was resolved by upgrading hosting server PHP to version 7.0 (from version 5.4). If you can't upgrade to PHP 7.0, you can downgrade Kunena to v4.0.12 instead.