Differential revision not being closed by commit


#1

I just updated Phabricator from 2018 Week 4 to 2018 Week 6. A few hours later, a colleague reported to me that a Differential revision which had been landed was not closed. What I find particularly odd is that the commit has been attached to the Differential revision.

D92450

I’m not exactly sure if these errors are related, but I am seeing a fair number of these errors in the daemon logs:

[12-Feb-2018 20:26:37 Etc/UTC] [2018-02-12 20:26:37] ERROR 2: Illegal offset type at [/usr/local/src/phabricator/src/applications/phid/handle/pool/PhabricatorHandleList.php:165]
[12-Feb-2018 20:26:37 Etc/UTC] arcanist(head=stable, ref.master=3d06bd4c568c, ref.stable=22b0893473ae), phabricator(head=stable, ref.master=2140741e2528, ref.stable=c56bdc92a2cf), phlab(head=
master, ref.master=e226662330c5), phutil(head=stable, ref.master=59642f236822, ref.stable=fd9060c5a1ef)
[12-Feb-2018 20:26:37 Etc/UTC]   #0 PhabricatorHandleList::offsetGet(array) called at [<phabricator>/src/applications/metamta/stamp/PhabricatorPHIDMailStamp.php:23]
[12-Feb-2018 20:26:37 Etc/UTC]   #1 PhabricatorPHIDMailStamp::renderStamps(array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:417
2]
[12-Feb-2018 20:26:37 Etc/UTC]   #2 PhabricatorApplicationTransactionEditor::generateMailStamps(DifferentialRevision, array) called at [<phabricator>/src/applications/transactions/editor/Phab
ricatorApplicationTransactionEditor.php:2669]
[12-Feb-2018 20:26:37 Etc/UTC]   #3 PhabricatorApplicationTransactionEditor::buildMailForTarget(DifferentialRevision, array, PhabricatorMailTarget) called at [<phabricator>/src/applications/t
ransactions/editor/PhabricatorApplicationTransactionEditor.php:2606]
[12-Feb-2018 20:26:37 Etc/UTC]   #4 PhabricatorApplicationTransactionEditor::buildMail(DifferentialRevision, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorAp
plicationTransactionEditor.php:1283]
[12-Feb-2018 20:26:37 Etc/UTC]   #5 PhabricatorApplicationTransactionEditor::publishTransactions(DifferentialRevision, array) called at [<phabricator>/src/applications/transactions/worker/Pha
bricatorApplicationTransactionPublishWorker.php:21]
[12-Feb-2018 20:26:37 Etc/UTC]   #6 PhabricatorApplicationTransactionPublishWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:123]
[12-Feb-2018 20:26:37 Etc/UTC]   #7 PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171]
[12-Feb-2018 20:26:37 Etc/UTC]   #8 PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
[12-Feb-2018 20:26:37 Etc/UTC]   #9 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:219]
[12-Feb-2018 20:26:37 Etc/UTC]   #10 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:131]
[12-Feb-2018 20:26:37 Etc/UTC] [2018-02-12 20:26:37] EXCEPTION: (Error) Call to a member function getMailStampName() on null at [<phabricator>/src/applications/metamta/stamp/PhabricatorPHIDMailStamp.php:25]
[12-Feb-2018 20:26:37 Etc/UTC] arcanist(head=stable, ref.master=3d06bd4c568c, ref.stable=22b0893473ae), phabricator(head=stable, ref.master=2140741e2528, ref.stable=c56bdc92a2cf), phlab(head=master, ref.master=e226662330c5), phutil(head=stable, ref.master=59642f236822, ref.stable=fd9060c5a1ef)
[12-Feb-2018 20:26:37 Etc/UTC]   #0 PhabricatorPHIDMailStamp::renderStamps(array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:4172]
[12-Feb-2018 20:26:37 Etc/UTC]   #1 PhabricatorApplicationTransactionEditor::generateMailStamps(DifferentialRevision, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2669]
[12-Feb-2018 20:26:37 Etc/UTC]   #2 PhabricatorApplicationTransactionEditor::buildMailForTarget(DifferentialRevision, array, PhabricatorMailTarget) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2606]
[12-Feb-2018 20:26:37 Etc/UTC]   #3 PhabricatorApplicationTransactionEditor::buildMail(DifferentialRevision, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1283]
[12-Feb-2018 20:26:37 Etc/UTC]   #4 PhabricatorApplicationTransactionEditor::publishTransactions(DifferentialRevision, array) called at [<phabricator>/src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php:21]
[12-Feb-2018 20:26:37 Etc/UTC]   #5 PhabricatorApplicationTransactionPublishWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:123]
[12-Feb-2018 20:26:37 Etc/UTC]   #6 PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171]
[12-Feb-2018 20:26:37 Etc/UTC]   #7 PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
[12-Feb-2018 20:26:37 Etc/UTC]   #8 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:219]
[12-Feb-2018 20:26:37 Etc/UTC]   #9 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:131]

#2

It looks like PhabricatorPHIDMailStamp::renderStamps is being called with array('PHID-PROJ-fpucoegg437ttgxyfciu', array(), 'PHID-PROJ-l6kieujsg3uerbgdhbiw').


#3

Probably https://secure.phabricator.com/D19082.

Here’s how I figured that one out:

  • I used /daemon/ to find the failing task.
  • I used bin/worker execute --id <id> to run it in the foreground, which printed similar errors.
  • I found the task in the phabricator_worker.worker_activetask table and used the dataID column to find the corresponding data in the phabricator_worker.worker_taskdata column.
  • I copied the JSON out of the row and formatted it.
  • I found the mail stamp with an array in it, which was {"type":"phid","key":"reviewer","value":["PHID-PROJ-3wzgsl6v3thluexsthjy",[]]}. From there, knowing the key for the stamp, I was able to figure out where the bad data came from.