Repro steps:
- have old legacy project (probably with lots of badly-encoded files)
- In Phabricator UI, go to the daemon console.
Expected behaviour
No failing tasks.
Actual behaviour:
300216 PhabricatorApplicationTransactionPublishWorker 19667:1460621233:f65e27c19886:294 29 s 1000 789
2016-04-14_08:02:14.23751 [14-Apr-2016 09:02:14 Europe/London] [2016-04-14 09:02:14] EXCEPTION: (PhutilProxyException) Error while executing Task ID 300216. {>} (Exception) Failed to JSON encode value (#5: Malformed UTF-8 characters, possibly incorrectly encoded): Dictionary value at key "attachments > 0 > data" is not valid UTF8, and cannot be JSON encoded: diff --git x/xxxxx/xxx/xxxxxxxxxx.xxx x/xxxxx/xxx/xxxxxxxxxx.xxx 2016-04-14_08:02:14.23756 index 4293306..c1b7d19 100644 2016-04-14_08:02:14.23757 --- xxxxxxxxxxxxxxxxxxxxxxxxxx 2016-04-14_08:02:14.23758 +++ xxxxxxxxxxxxxxxxxxxxxxxxxx 2016-04-14_08:02:14.23759 @@ -12,7 +12,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2016-04-14_08:02:14.23761 xxxxxxxxxxxxxxxxxxxxxxxx 2016-04-14_08:02:14.23761 xxxxxxxx. at [<phutil>/src/utils/utils.php:1164] 2016-04-14_08:02:14.23810 [14-Apr-2016 09:02:14 Europe/London] arcanist(head=f89f3de65805f7f65c8082ed387e8e2572596f7a, ref.master=8701e6c1f31a), phabricator(head=fea2389066edf3ad0a7547ae12d8e988428a4f5c, ref.master=fa6151778fe8), phutil(head=d414e4436e1c8779634458c23ab8880cf613312f, ref.master=3024f0a4908b) 2016-04-14_08:02:14.23812 [14-Apr-2016 09:02:14 Europe/London] #0 <#2> phutil_json_encode(array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1654] 2016-04-14_08:02:14.23816 [14-Apr-2016 09:02:14 Europe/London] #1 <#2> LiskDAO::applyLiskDataSerialization(array, boolean) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1357] 2016-04-14_08:02:14.23817 [14-Apr-2016 09:02:14 Europe/London] #2 <#2> LiskDAO::willWriteData(array) called at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:240] 2016-04-14_08:02:14.23818 [14-Apr-2016 09:02:14 Europe/London] #3 <#2> PhabricatorLiskDAO::willWriteData(array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1232] 2016-04-14_08:02:14.23820 [14-Apr-2016 09:02:14 Europe/London] #4 <#2> LiskDAO::insertRecordIntoDatabase(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1106] 2016-04-14_08:02:14.23823 [14-Apr-2016 09:02:14 Europe/London] #5 <#2> LiskDAO::insert() called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1075] 2016-04-14_08:02:14.23824 [14-Apr-2016 09:02:14 Europe/London] #6 <#2> LiskDAO::save() called at [<phabricator>/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:382] 2016-04-14_08:02:14.23825 [14-Apr-2016 09:02:14 Europe/London] #7 <#2> PhabricatorMetaMTAMail::save() called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1116] 2016-04-14_08:02:14.23826 [14-Apr-2016 09:02:14 Europe/London] #8 <#2> PhabricatorApplicationTransactionEditor::publishTransactions(PhabricatorRepositoryCommit, array) called at [<phabricator>/src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php:21] 2016-04-14_08:02:14.23828 [14-Apr-2016 09:02:14 Europe/London] #9 <#2> PhabricatorApplicationTransactionPublishWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:122] 2016-04-14_08:02:14.23830 [14-Apr-2016 09:02:14 Europe/London] #10 <#2> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171] 2016-04-14_08:02:14.23832 [14-Apr-2016 09:02:14 Europe/London] #11 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22] 2016-04-14_08:02:14.23833 [14-Apr-2016 09:02:14 Europe/London] #12 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:183] 2016-04-14_08:02:14.23834 [14-Apr-2016 09:02:14 Europe/London] #13 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:125] 2016-04-14_08:02:14.24119 [14-Apr-2016 09:02:14 Europe/London] PHP Fatal error: Uncaught exception 'Exception' with message 'Process exited with an open transaction! The transaction will be implicitly rolled back. Calls to openTransaction() must always be paired with a call to saveTransaction() or killTransaction().' in /srv/phabricator/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php:78 2016-04-14_08:02:14.24121 Stack trace: 2016-04-14_08:02:14.24123 #0 [internal function]: AphrontDatabaseTransactionState->__destruct() 2016-04-14_08:02:14.24124 #1 {main} 2016-04-14_08:02:14.24125 thrown in /srv/phabricator/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php on line 78
Version info
CentOS 7.2.1511
Git 1.8.3.1
PHP 5.6.17
phabricator fea2389066edf3ad0a7547ae12d8e988428a4f5c (Sat, Apr 2)
arcanist f89f3de65805f7f65c8082ed387e8e2572596f7a (Sat, Mar 19)
phutil d414e4436e1c8779634458c23ab8880cf613312f (Sat, Apr 2)