The phutil library 'phutil' has not been loaded!

I’ve utilized a bash script to update the suite (Phabricator, Arcanist, and Libphutil) for a long time, but a very recent update (within the last 24-48 hours) has blown up certain sections of my Phabricator install. Unfortunately, I have been unsuccessful at figuring out how to overcome the apparent disconnection of Arcanist described below.

In the browser following this failed update, my /config page shows:

Unhandled Exception ("PhutilBootloaderException")

The phutil library 'phutil' has not been loaded!

The /config/all page is a bit more verbose:

Failed to load symbol "PhabricatorConfigAllController" (of type "class or interface").

The class or interface "PhabricatorConfigAllController" is not defined in the library map of any loaded library.

If you are not a developer, this almost always means that a library is out of date. For example, you may have upgraded "phabricator/" without upgrading "arcanist/", or vice versa. It might also mean that you need to restart Apache or PHP-FPM. Make sure all libraries are up to date and all services have been restarted.

However, my upgrade script pulls arcanist just before pulling phabricator, while apache and php-fpm are both running at the moment.

The terminal output from manually running the script shows that it blows up immediately after issuing the .../storage upgrade command, yet that command has worked fine for a long time prior to this incident. The error terminates the script and it does not appear that anything has actually run on the database.
FATAL ERROR: Unable to load the "Arcanist" library. Put "arcanist/" next to "phabricator/" on disk.

Although the directories have always been at the same level in the site tree.

public
  arcanist
  libphutil   <- now basically empty
  phabricator

After manually restarting apache and php-fpm, and discovering that the daemon and aphlict services refuse to start, I also find that I am fully unable to run any ./bin/config commands. All attempts result in the same “FATAL ERROR” message above.

upgrade.sh

#!/bin/sh

set -e
set -x

# This is a script for updating Phabricator, similar to the one used to
# update <https://secure.phabricator.com/>. This script is not intended
# to work without modifications.

# NOTE: This script assumes you are running it as root, from a directory
# which contains arcanist/, libphutil/, and phabricator/.
ROOT=/var/www/dev/lab.lti.org/public

### STOP WEB SERVER AND DAEMONS ###############################################

# Stop daemons.
systemctl stop phab-phd

# If running the notification server, stop it.
systemctl stop phab-aphlict


# Stop the webserver (apache, nginx, lighttpd, etc). This command will differ
# depending on which system and webserver you are running: replace it with an
# appropriate command for your system.
# NOTE: If you're running php-fpm, you should stop it here too.
systemctl stop httpd
stopfpm73

### UPDATE WORKING COPIES ######################################################

cd $ROOT/libphutil
git pull

cd $ROOT/arcanist
git pull

cd $ROOT/phabricator
git pull

# Upgrade the database schema. You may want to add the "--force" flag to allow
# this script to run noninteractively.
$ROOT/phabricator/bin/storage upgrade --user root --password 'mypassword' --force


# Restart the webserver. As above, this depends on your system and webserver.
# NOTE: If you're running php-fpm, restart it here too.
systemctl start httpd
startfpm73

# Re-init npm (interactive) and reinstall ws
npm init -y
npm install ws

# Restart daemons.
systemctl start phab-phd

# If running the notification server, start it.
systemctl start phab-aphlict

I’ve been trying to work through this since it happened, but I’m completely out of ideas to try at this point.

You’re describing 3 different issues:
(1) config/all page complaining about a PhabricatorConfigAllController - this was broken about 2 months ago, but it shouldn’t effect the rest of your issues.

(2) /config/ failing to load “Libphutil” library, which was removed earlier this week.

(3) /bin/storage refuses to run with the error Unable to load the "Arcanist" library.

It’s possible that item (2) causes item (3).


Do you have any local modifications to any of the code? What are the current commit hashes in all dirs? Which version of PHP?

maybe in ./phabricator/scripts/init/lib.php

$ok = @include_once ‘arcanist/scripts/init/init-script.php’

should be

$ok = @include_once ‘arcanist/support/init/init-script.php’

i.e. there is init-script.php in “/support/” not in “/scripts/”

I changed this and fatal has gone and the storage update passed ok.

I don’t see any file in arcanist/support/ that is called init-script, and I don’t see any evidence that one ever existed; Where did you see one?

Sorry, I broke this stuff by (a) changing my mind on where to put init-script.php and (b) missing the Config callsite to version-check libphutil.

Both issues (which collectively caused all three original problems) should now be fixed in master.

1 Like

No code mods
phabricator: 4790a3d94be6 - today
arcanist: 8cd79d38aff2 - today
php: 7.3.14

Following Evan’s post (and code adjustment), my script is able to run without any apparent issues. So I am now on the latest as of a few minutes ago. The /config page is again rendering well, while /config/all is still broken (confirmed by Aviv above).

Both issues (which collectively caused all three original problems) should now be fixed in master .

Re-reading that, I’m wondering if it’s expected that the /config/all issue should be fixed, since it still appears broken here.

Just to double check, you’re manually browsing to /config/all/ by typing it into your URL bar or following a bookmark, right? My expectation is that there are no more links to /config/all/ anywhere in the UI.

1 Like

Actually, I clicked on a link in the UI to open it, but that was before my initial recent attempt at upgrading the app.

I’m assuming the link was removed in a later version than what I was working with at that time. If the route no longer exists, then it appears that there’s nothing for us to do here but close that tab and move along. :wink:

Thanks for the clarification, Evan!

Ah, cool. I also fixed the behavior at that path in https://secure.phabricator.com/D21000 so it should 404 normally once that lands, just wanted to make sure I didn’t overlook a link somewhere.

1 Like