Page MenuHomePhabricator

The "Recent Activity" feed flooded with duplicates because of invalid UTF-8 characters
Closed, InvalidPublic

Description

My colleague changed the encoding of several comments in our sources to UTF-8 characters and that triggered the following exception, that was preventing the phyutil_json_encode from finishing and that led to multiplication of commit messages in the 'Recent Activity' feed.

[10-Apr-2017 06:25:05 Europe/Prague] [2017-04-10 06:25:05] EXCEPTION: (PhutilProxyException) Error while executing Task ID 492308. {>} (Exception) Failed to JSON encode value (#5: Malformed UTF-8 characters, possibly incorrectly
===================================================================
--- XXXXXXXX    (revision YYYYYY)
+++ ZZZZZZZZ     (revision WW. at [<phutil>/src/utils/utils.php:1194]
[10-Apr-2017 06:25:05 Europe/Prague] arcanist(), phabricator(), phutil()
[10-Apr-2017 06:25:05 Europe/Prague]   #0 <#2> phutil_json_encode(array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1700]
[10-Apr-2017 06:25:05 Europe/Prague]   #1 <#2> LiskDAO::applyLiskDataSerialization(array, boolean) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1358]
[10-Apr-2017 06:25:05 Europe/Prague]   #2 <#2> LiskDAO::willWriteData(array) called at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:350]
[10-Apr-2017 06:25:05 Europe/Prague]   #3 <#2> PhabricatorLiskDAO::willWriteData(array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1232]
[10-Apr-2017 06:25:05 Europe/Prague]   #4 <#2> LiskDAO::insertRecordIntoDatabase(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1106]
[10-Apr-2017 06:25:05 Europe/Prague]   #5 <#2> LiskDAO::insert() called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1075]
[10-Apr-2017 06:25:05 Europe/Prague]   #6 <#2> LiskDAO::save() called at [<phabricator>/src/applications/metamta/storage/PhabricatorMetaMTAMail.php:355]
[10-Apr-2017 06:25:05 Europe/Prague]   #7 <#2> PhabricatorMetaMTAMail::save() called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1178]
[10-Apr-2017 06:25:05 Europe/Prague]   #8 <#2> PhabricatorApplicationTransactionEditor::publishTransactions(PhabricatorRepositoryCommit, array) called at [<phabricator>/src/applications/transactions/worker/PhabricatorApplication
[10-Apr-2017 06:25:05 Europe/Prague]   #9 <#2> PhabricatorApplicationTransactionPublishWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:123]
[10-Apr-2017 06:25:05 Europe/Prague]   #10 <#2> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171]
[10-Apr-2017 06:25:05 Europe/Prague]   #11 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
[10-Apr-2017 06:25:05 Europe/Prague]   #12 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:181]
[10-Apr-2017 06:25:05 Europe/Prague]   #13 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:127]

Event Timeline

The attached patch seems to fix the issue ... hopefully with no drawbacks. We gonna test that for few weeks.