thank you @khoipro for the swift response
Is there any official fix for this problem? We observe the same issue as soon as maintenance mode is activated during plugin update the site becomes unavailable with HTTP 500.
The problem appears to be in wp core. We have validated that our wp-includes directory matches the wp-includes dir from the latest wp version available from ww.wp.xz.cn. The issue is that wp_maintenance is called in wp_settings.php (line 74) prior to the inclusion of wp-includes/formatting.php which would normally be loaded with require in wp_settings.php line 109.