Page MenuHomePhabricator

Crash in PhabricatorRepositoryCommitMessageParserWorker due to invalid characters in diff
Closed, DuplicatePublic

Description

Currently the commit parser is crashing when it comes across a diff with an invalid character. This prevents any future commits from being parsed correctly. Here's the stack trace:

[16-Oct-2013 23:21:30 UTC] [2013-10-16 23:21:30] EXCEPTION: (PhutilProxyException) Error while executing task ID 119863 from queue. {>} (AphrontQueryExc                                                       eption) #1366: Incorrect string value: '\xD7</but...' for column 'changes' at row 1 at [/srv/phabricator/libphutil/src/aphront/storage/connection/mysql/                                                       AphrontMySQLDatabaseConnectionBase.php:311]
[16-Oct-2013 23:21:30 UTC]   #0 AphrontMySQLDatabaseConnectionBase::throwQueryCodeException(1366, Incorrect string value: '\xD7</but...' for column 'cha                                                       nges' at row 1) called at [/srv/phabricator/libphutil/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:278]
[16-Oct-2013 23:21:30 UTC]   #1 AphrontMySQLDatabaseConnectionBase::throwQueryException(Object mysqli) called at [/srv/phabricator/libphutil/src/aphront                                                       /storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:184]
[16-Oct-2013 23:21:30 UTC]   #2 AphrontMySQLDatabaseConnectionBase::executeRawQuery(INSERT INTO `differential_hunk` (`changesetID`, `changes`, `oldOffse                                                       t`, `oldLen`, `newOffset`, `newLen`, `dateCreated`, `dateModified`) VALUES ('188829', ' ...) called at [/srv/phabricator/libphutil/src/xsprintf/queryfx.php:9]
[16-Oct-2013 23:21:30 UTC]   #3 queryfx(Object AphrontMySQLiDatabaseConnection, %Q INTO %T (%LC) VALUES (%Q), INSERT, differential_hunk, Array of size 8                                                        starting with: { 0 => changesetID }, '188829', ' ....                                                       .)
[16-Oct-2013 23:21:30 UTC]   #4 call_user_func_array(queryfx, Array of size 6 starting with: { 0 => Object AphrontMySQLiDatabaseConnection }) called at                                                        [/srv/phabricator/libphutil/src/aphront/storage/connection/AphrontDatabaseConnection.php:28]
[16-Oct-2013 23:21:30 UTC]   #5 AphrontDatabaseConnection::query(%Q INTO %T (%LC) VALUES (%Q), INSERT, differential_hunk, Array of size 8 starting with:                                                        { 0 => changesetID }, '188829', ' .....) called at [/                                                       srv/phabricator/phabricator/src/infrastructure/storage/lisk/LiskDAO.php:1251]
[16-Oct-2013 23:21:30 UTC]   #6 LiskDAO::insertRecordIntoDatabase(INSERT) called at [/srv/phabricator/phabricator/src/infrastructure/storage/lisk/LiskDAO.php:1118]
[16-Oct-2013 23:21:30 UTC]   #7 LiskDAO::insert() called at [/srv/phabricator/phabricator/src/infrastructure/storage/lisk/LiskDAO.php:1087]
[16-Oct-2013 23:21:30 UTC]   #8 LiskDAO::save() called at [/srv/phabricator/phabricator/src/applications/differential/storage/DifferentialChangeset.php:                                                       77]
[16-Oct-2013 23:21:30 UTC]   #9 DifferentialChangeset::save() called at [/srv/phabricator/phabricator/src/applications/differential/storage/Differential                                                       Diff.php:110]
[16-Oct-2013 23:21:30 UTC]   #10 DifferentialDiff::save() called at [/srv/phabricator/phabricator/src/applications/repository/worker/commitmessageparser                                                       /PhabricatorRepositoryCommitMessageParserWorker.php:284]
[16-Oct-2013 23:21:30 UTC]   #11 PhabricatorRepositoryCommitMessageParserWorker::attachToRevision(Object DifferentialRevision, PHID-USER-ahkclez2z322xrcr34rq) called at [/srv/phabricator/phabricator/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php                                                       :154]
[16-Oct-2013 23:21:30 UTC]   #12 PhabricatorRepositoryCommitMessageParserWorker::updateCommitData(..., ..., null) called at [/srv/phabricator/phabricator/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryGitCommitMessageParserWorker.php:53]
[16-Oct-2013 23:21:30 UTC]   #13 PhabricatorRepositoryGitCommitMessageParserWorker::parseCommit(Object PhabricatorRepository, Object PhabricatorRepositoryCommit) called at [/srv/phabricator/phabricator/src/applications/repository/worker/PhabricatorRepositoryCommitParserWorker.php:44]
[16-Oct-2013 23:21:30 UTC]   #14 PhabricatorRepositoryCommitParserWorker::doWork() called at [/srv/phabricator/phabricator/src/infrastructure/daemon/workers/PhabricatorWorker.php:84]
[16-Oct-2013 23:21:30 UTC]   #15 PhabricatorWorker::executeTask() called at [/srv/phabricator/phabricator/src/infrastructure/daemon/workers/storage/Phab                                                       ricatorWorkerActiveTask.php:122]
[16-Oct-2013 23:21:30 UTC]   #16 PhabricatorWorkerActiveTask::executeTask() called at [/srv/phabricator/phabricator/src/infrastructure/daemon/workers/Ph                                                       abricatorTaskmasterDaemon.php:20]
[16-Oct-2013 23:21:30 UTC]   #17 PhabricatorTaskmasterDaemon::run() called at [/srv/phabricator/libphutil/src/daemon/PhutilDaemon.php:81]
[16-Oct-2013 23:21:30 UTC]   #18 PhutilDaemon::execute() called at [/srv/phabricator/libphutil/scripts/daemon/exec/exec_daemon.php:112]
[16-Oct-2013 23:21:30 UTC] 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:71

Event Timeline

Unknown Object (User) created this task.Oct 16 2013, 11:27 PM
Unknown Object (User) assigned this task to epriestley.
Unknown Object (User) raised the priority of this task from to Needs Triage.
Unknown Object (User) updated the task description. (Show Details)
Unknown Object (User) added a project: Phabricator.
Unknown Object (User) added a subscriber: Unknown Object (User).

My expectation is that this shouldn't prevent future commits from being parsed correctly. Are you actually seeing that, or was that an assumption?