Importing libphutil repository on fresh Phabricator triggers an error


#1

Observed Behavior:
Errors triggered while importing libphutil repository.

Expected Behavior:
No errors to be triggered?

Phabricator Version:
phabricator 9e0a954324e5d20ad949d0370d4975667c0113d9 (Tue, Feb 12)
arcanist 97ddb9d5a1be282d6002a875a759266bb97b653f (Dec 28 2018)
phutil 70ec97f839b3b9e8200aaf0e8db4c8d0d843584e (Tue, Feb 12)

Reproduction Steps:
Follow the steps in https://github.com/sitsofe/phabricator-clone-hang :

  1. docker run --name mysql-phabricator -e MYSQL_ROOT_PASSWORD=githang -d mysql:5 mysqld --ft-min-word-len=3 --innodb-buffer-pool-size=256M --local-infile=0 --max_allowed_packet=32M --max-connections=1000 --sql-mode="STRICT_ALL_TABLES"
  2. docker build -t sitsofe/phabricator-clone-hang:latest https://github.com/sitsofe/phabricator-clone-hang.git
  3. docker run --privileged --init -it -e SERVER_FQDN=$(hostname -f) -p 80:80 --link mysql-phabricator --name phabricator-clone-hang sitsofe/phabricator-clone-hang /bin/bash
  4. Follow prompts until import starts happening.
  5. In another terminal run docker exec -it phabricator-clone-hang /bin/bash and then use ./bin/phd log to examine the logs after the import gets underway.

Additional information:
Problem happens every time. Snippet from the logs:

Daemon 3 STDE [Tue, 12 Feb 2019 22:52:01 +0000] [2019-02-12 22:52:01] EXCEPTION: (PhutilProxyException) Task "10" encountered a permanent failure and was cancelled. {>} (PhabricatorWorkerPermanentFailureException) Unable to load object "PHID-USER-45nsfhd5qsvvenai4vzb" to rebuild indexes. at [<phabricator>/src/applications/search/worker/PhabricatorSearchWorker.php:85]
Daemon 3 STDE [Tue, 12 Feb 2019 22:52:01 +0000] arcanist(head=stable, ref.stable=97ddb9d5a1be), phabricator(head=stable, ref.stable=9e0a954324e5), phutil(head=stable, ref.stable=70ec97f839b3)
Daemon 3 STDE [Tue, 12 Feb 2019 22:52:02 +0000]   #0 <#3> PhabricatorSearchWorker::loadObjectForIndexing(string) called at [<phabricator>/src/applications/search/worker/PhabricatorSearchWorker.php:26]
Daemon 3 STDE [Tue, 12 Feb 2019 22:52:02 +0000]   #1 <#3> PhabricatorSearchWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:123]
Daemon 3 STDE [Tue, 12 Feb 2019 22:52:02 +0000]   #2 <#3> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171]
Daemon 3 STDE [Tue, 12 Feb 2019 22:52:02 +0000]   #3 <#3> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
Daemon 3 STDE [Tue, 12 Feb 2019 22:52:02 +0000]   #4 phlog(PhutilProxyException) called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:34]
Daemon 3 STDE [Tue, 12 Feb 2019 22:52:02 +0000]   #5 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:219]
Daemon 3 STDE [Tue, 12 Feb 2019 22:52:02 +0000]   #6 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:131]

@amckinley is this report OK?


#2

(PS: Hijacking this thread to say thank you to @epriestley as I have no way of marking
the link to his diff over on Conduit call is generating phd log error message as the solution to that other thread because that thread is locked).


#3

Note: The import is being done by the following lines:

# Create repository in Phabricator
echo '{"transactions": [{"type":"vcs", "value": "git"},
          {"type":"name", "value":"libphutil"},
          {"type":"publish", "value":false },
          {"type":"autoclose", "value":false },
          {"type":"callsign", "value":"LIBPHUTIL"}]
      }' | /opt/arcanist/bin/arc call-conduit 'diffusion.repository.edit'
# Grab PHID for repo
REPO_PHID="$(echo '{ "names": [ "rLIBPHUTIL" ] }' | \
    arc call-conduit phid.lookup | jq -r '.response | .rLIBPHUTIL.phid')"
# Set all the existing repo URIs to read-only
URI_PHIDS="$(echo '{ "constraints": { "phids": [ "'"${REPO_PHID}"'" ] },
    "attachments": { "uris": true } }' | \
    arc call-conduit diffusion.repository.search | \
    jq -r '.response.data[0].attachments.uris.uris[].phid')"
for phid in ${URI_PHIDS}; do
    echo '{ "transactions": [ { "type": "io", "value": "read" } ],
        "objectIdentifier": "'"${phid}"'" }' | \
    arc call-conduit diffusion.uri.edit
done
# Add upstream URI (to import from)
echo '{ "transactions": [
    { "type": "repository", "value": "'"${REPO_PHID}"'" },
    { "type": "uri", "value": "https://secure.phabricator.com/source/libphutil.git" },
    { "type": "io", "value": "observe" }
  ]
}' | arc call-conduit diffusion.uri.edit
# Activate the repo (and start the import process)
echo '{
  "transactions": [ { "type": "status", "value": "active" } ],
  "objectIdentifier": "'"${REPO_PHID}"'"
}' | arc call-conduit diffusion.repository.edit

There’s no reason the import of https://secure.phabricator.com/source/libphutil.git couldn’t be done by hand - I just happened to have scripted it when trying to diagnose another issue.


#4

https://secure.phabricator.com/D20178 sweeps this error under the rug.


closed #5