Page MenuHomePhabricator

PhabricatorApplicationTransactionPublishWorker fails on bad getURI call
Closed, ResolvedPublic

Description

Lately I'm seeing certain errors appear in the daemon logs, the log trace indicates that some PhabricatorApplicationTransactionPublishWorker tasks are failing while trying to call getURI on some object that doesn't implement it.

daemons.log
[07-Jul-2016 15:24:35 UTC] [2016-07-07 15:24:35] EXCEPTION: (PhutilProxyException) Error while executing Task ID 708317. {>} (Exception) Bad getter call: getURI at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1700]
[07-Jul-2016 15:24:35 UTC] arcanist(head=master, ref.master=4d4d16f25985), phabricator(head=master, ref.master=d7b4c50941fa), phutil(head=master, ref.master=dde2f74f2793)
[07-Jul-2016 15:24:35 UTC]   #0 <#2> LiskDAO::call(string, array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1678]
[07-Jul-2016 15:24:35 UTC]   #1 <#2> PhabricatorProfilePanelConfiguration::getURI() called at [<phabricator>/src/applications/search/phidtype/PhabricatorProfilePanelPHIDType.php:36]
[07-Jul-2016 15:24:35 UTC]   #2 <#2> PhabricatorProfilePanelPHIDType::loadHandles(PhabricatorHandleQuery, array, array) called at [<phabricator>/src/applications/phid/query/PhabricatorHandleQuery.php:81]
[07-Jul-2016 15:24:35 UTC]   #3 <#2> PhabricatorHandleQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:227]
[07-Jul-2016 15:24:35 UTC]   #4 <#2> PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/phid/handle/pool/PhabricatorHandlePool.php:73]
[07-Jul-2016 15:24:35 UTC]   #5 <#2> PhabricatorHandlePool::loadPHIDs(array) called at [<phabricator>/src/applications/phid/handle/pool/PhabricatorHandleList.php:44]
[07-Jul-2016 15:24:35 UTC]   #6 <#2> PhabricatorHandleList::loadHandles() called at [<phabricator>/src/applications/phid/handle/pool/PhabricatorHandleList.php:49]
[07-Jul-2016 15:24:35 UTC]   #7 <#2> PhabricatorHandleList::getHandle(string) called at [<phabricator>/src/applications/phid/handle/pool/PhabricatorHandleList.php:112]
[07-Jul-2016 15:24:35 UTC]   #8 <#2> PhabricatorHandleList::current()
[07-Jul-2016 15:24:35 UTC]   #9 <#2> iterator_to_array(PhabricatorHandleList) called at [<phabricator>/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php:151]
[07-Jul-2016 15:24:35 UTC]   #10 <#2> PhabricatorApplicationTransactionQuery::willFilterPage(array) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:236]
[07-Jul-2016 15:24:35 UTC]   #11 <#2> PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php:107]
[07-Jul-2016 15:24:35 UTC]   #12 <#2> PhabricatorApplicationTransactionPublishWorker::loadTransactions(PhabricatorProfilePanelConfiguration) called at [<phabricator>/src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php:19]
[07-Jul-2016 15:24:35 UTC]   #13 <#2> PhabricatorApplicationTransactionPublishWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:122]
[07-Jul-2016 15:24:35 UTC]   #14 <#2> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171]
[07-Jul-2016 15:24:35 UTC]   #15 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
[07-Jul-2016 15:24:35 UTC]   #16 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:184]
[07-Jul-2016 15:24:35 UTC]   #17 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:127]

Environment details

OS: Ubuntu Server 15.04
phabricator: d7b4c50941fada3b5550ed8a795be2c479f4973b (Sat, Jul 2)
arcanist: 4d4d16f25985f133501f20fdddd183e525f00341 (Tue, Jun 28)
phutil: dde2f74f2793f0216f0d76618ed335a9c802cfec (Fri, Jul 1)

Reproduction steps

  1. Create new Project
  2. Go to ManageEdit Menu
  3. Disable Workboard panel
  4. See panel transaction start failing in the daemons console.

Event Timeline

I've looked at the database, specifically the worker_activetask table. The bad transactions appear to be linked to profile panel objects (objectPHID like PHID-PANL-...).

Looking at the panel configuration table I found this:

mysql> select * from search_profilepanelconfiguration where phid in ('PHID-PANL-fm66s364apxnwgo7vjui', 'PHID-PANL-kxxpsniceu7cyqvm4mwn', 'PHID-PANL-mw7glbyqs2a4dnzfnue7', 'PHID-PANL-f4gscvj3p3vjf6spcroa');
+-----+--------------------------------+--------------------------------+---------------------+---------------------+------------+------------+-----------------+-------------+--------------+
| id  | phid                           | profilePHID                    | panelKey            | builtinKey          | panelOrder | visibility | panelProperties | dateCreated | dateModified |
+-----+--------------------------------+--------------------------------+---------------------+---------------------+------------+------------+-----------------+-------------+--------------+
| 161 | PHID-PANL-f4gscvj3p3vjf6spcroa | PHID-PROJ-oea7ot5wd7oomps3cprv | project.subprojects | project.subprojects |          4 | disabled   | []              |  1467883986 |   1467883986 |
| 158 | PHID-PANL-fm66s364apxnwgo7vjui | PHID-PROJ-53fhnxcyihlqflt32kv3 | project.workboard   | project.workboard   |          2 | disabled   | []              |  1467659117 |   1467907132 |
| 159 | PHID-PANL-kxxpsniceu7cyqvm4mwn | PHID-PROJ-53fhnxcyihlqflt32kv3 | project.subprojects | project.subprojects |          4 | disabled   | []              |  1467659122 |   1467659122 |
| 160 | PHID-PANL-mw7glbyqs2a4dnzfnue7 | PHID-PROJ-oea7ot5wd7oomps3cprv | project.workboard   | project.workboard   |          2 | disabled   | []              |  1467883982 |   1467883982 |
+-----+--------------------------------+--------------------------------+---------------------+---------------------+------------+------------+-----------------+-------------+--------------+

I'm guessing those transactions were generated after I disabled sub-projects and workboard access in the project menu.

To test this I created a new project and disabled the workboard, saw a new transaction worker task appear and start failing.