Page MenuHomePhabricator

Can't reach Maniphest or People front pages on stable upgrade because of Avatar creation?
Closed, ResolvedPublic

Description

I can also reproduce this by running bin/people profileimage --all:

phabricator@codereview:~/g/phabricator$ bin/people profileimage --all
Default profile image "v1" already set for "kberry".
Default profile image "v1" already set for "dkatten".
Default profile image "v1" already set for "bougyman".
Default profile image "v1" already set for "dhopkins".
[2017-03-23 10:58:48] ERROR 8: Undefined offset: 0 at [/home/phabricator/g/phabricator/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:147]
arcanist(head=stable, ref.master=172c930630a9, ref.stable=822bc53ca306), phabricator(head=stable, ref.master=3bccb0dcf2bc, ref.stable=56dd1b297c3e, custom=1), phutil(head=stable, ref.master=dbf792a053fc, ref.stable=24ede7a5dbfd), sprint(head=7a7368cd216297a257a5d1409c751e70d19d230a, ref.master=7a7368cd2162)
  #0 PhabricatorFilesComposeAvatarBuiltinFile::getUniqueProfileImage(string) called at [<phabricator>/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:160]
  #1 PhabricatorFilesComposeAvatarBuiltinFile::getUserProfileImageFile(string) called at [<phabricator>/src/applications/people/management/PhabricatorPeopleProfileImageWorkflow.php:67]
  #2 PhabricatorPeopleProfileImageWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:441]
  #3 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:333]
  #4 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/people/manage_people.php:20]
[2017-03-23 10:58:48] ERROR 8: Undefined offset: -173 at [/home/phabricator/g/phabricator/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:149]
arcanist(head=stable, ref.master=172c930630a9, ref.stable=822bc53ca306), phabricator(head=stable, ref.master=3bccb0dcf2bc, ref.stable=56dd1b297c3e, custom=1), phutil(head=stable, ref.master=dbf792a053fc, ref.stable=24ede7a5dbfd), sprint(head=7a7368cd216297a257a5d1409c751e70d19d230a, ref.master=7a7368cd2162)
  #0 PhabricatorFilesComposeAvatarBuiltinFile::getUniqueProfileImage(string) called at [<phabricator>/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:160]
  #1 PhabricatorFilesComposeAvatarBuiltinFile::getUserProfileImageFile(string) called at [<phabricator>/src/applications/people/management/PhabricatorPeopleProfileImageWorkflow.php:67]
  #2 PhabricatorPeopleProfileImageWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:441]
  #3 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:333]
  #4 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/people/manage_people.php:20]
[2017-03-23 10:58:48] ERROR 8: Undefined index: alphanumeric//_default.png at [/home/phabricator/g/phabricator/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:64]
arcanist(head=stable, ref.master=172c930630a9, ref.stable=822bc53ca306), phabricator(head=stable, ref.master=3bccb0dcf2bc, ref.stable=56dd1b297c3e, custom=1), phutil(head=stable, ref.master=dbf792a053fc, ref.stable=24ede7a5dbfd), sprint(head=7a7368cd216297a257a5d1409c751e70d19d230a, ref.master=7a7368cd2162)
  #0 PhabricatorFilesComposeAvatarBuiltinFile::composeImage(NULL, string, array) called at [<phabricator>/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:57]
  #1 PhabricatorFilesComposeAvatarBuiltinFile::loadBuiltinFileData() called at [<phabricator>/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:167]
  #2 PhabricatorFilesComposeAvatarBuiltinFile::getUserProfileImageFile(string) called at [<phabricator>/src/applications/people/management/PhabricatorPeopleProfileImageWorkflow.php:67]
  #3 PhabricatorPeopleProfileImageWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:441]
  #4 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:333]
  #5 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/people/manage_people.php:20]
[2017-03-23 10:58:48] EXCEPTION: (FilesystemException) Requested path '/home/phabricator/g/phabricator' is not a file. at [<phutil>/src/filesystem/Filesystem.php:1073]
arcanist(head=stable, ref.master=172c930630a9, ref.stable=822bc53ca306), phabricator(head=stable, ref.master=3bccb0dcf2bc, ref.stable=56dd1b297c3e, custom=1), phutil(head=stable, ref.master=dbf792a053fc, ref.stable=24ede7a5dbfd), sprint(head=7a7368cd216297a257a5d1409c751e70d19d230a, ref.master=7a7368cd2162)
  #0 Filesystem::assertIsFile(string) called at [<phutil>/src/filesystem/Filesystem.php:38]
  #1 Filesystem::readFile(NULL) called at [<phabricator>/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:64]
  #2 PhabricatorFilesComposeAvatarBuiltinFile::composeImage(NULL, string, array) called at [<phabricator>/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:57]
  #3 PhabricatorFilesComposeAvatarBuiltinFile::loadBuiltinFileData() called at [<phabricator>/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:167]
  #4 PhabricatorFilesComposeAvatarBuiltinFile::getUserProfileImageFile(string) called at [<phabricator>/src/applications/people/management/PhabricatorPeopleProfileImageWorkflow.php:67]
  #5 PhabricatorPeopleProfileImageWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:441]
  #6 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:333]
  #7 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/people/manage_people.php:20]

Versions:

OS: Ubuntu 14.04.5 LTS
Kernel: 3.13.0-112-generic
phabricator@codereview:~/g/phabricator$ php -v
PHP 5.5.9-1ubuntu4.21 (cli) (built: Feb  9 2017 20:40:05)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
nginx version: nginx/1.4.6 (Ubuntu)
mysql  Ver 14.14 Distrib 5.5.54, for debian-linux-gnu (i686) using readline 6.3

phabricator 56dd1b297c3e5cdbb477acc7435d6aa5749f33f2 (Sun, Mar 19) (branched from 688c120f9f33eaab5ad54647ff4fdde405cf983a on origin) arcanist 822bc53ca306e06314560d8a76f68771d732e8e0 (Sat, Feb 25) (branched from 3b6b523c2b236e3724a1e115f126cb6fd05fa128 on origin) phutil 24ede7a5dbfd38079c87fc61de64012551965837 (Sat, Mar 18) (branched from 13a200ca7621ab2b48a0c395f52f8c4411bbc686 on origin) sprint 7a7368cd216297a257a5d1409c751e70d19d230a (Feb 9 2017)

This is a copy of an instance that was running code from 2015-12. I resolved all Setup issues after upgrade. NGINX is fronting php5-fpm to run the application.

Example backtrace from the stderr output of PHP (via nginx error.log) looks similar to the backtrace above:

2017/03/23 11:39:25 [error] 19152#0: *1750 FastCGI sent in stderr: "PHP message: [2017-03-23 11:39:25] ERROR 8: Undefined offset: 0 at [/home/phabricator/g/phabricator/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile
.php:147]
PHP message: arcanist(head=stable, ref.master=172c930630a9, ref.stable=822bc53ca306), phabricator(head=stable, ref.master=3bccb0dcf2bc, ref.stable=56dd1b297c3e, custom=1), phutil(head=stable, ref.master=dbf792a053fc, ref.stable=24ede7a5dbf
d), sprint(head=7a7368cd216297a257a5d1409c751e70d19d230a, ref.master=7a7368cd2162)
PHP message:   #0 PhabricatorFilesComposeAvatarBuiltinFile::getUniqueProfileImage(string) called at [<phabricator>/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:160]
PHP message:   #1 PhabricatorFilesComposeAvatarBuiltinFile::getUserProfileImageFile(string) called at [<phabricator>/src/applications/people/cache/PhabricatorUserProfileImageCacheType.php:54]
PHP message:   #2 PhabricatorUserProfileImageCacheType::newValueForUsers(string, array) called at [<phabricator>/src/applications/people/query/PhabricatorPeopleQuery.php:618]
PHP message:   #3 PhabricatorPeopleQuery::fillUserCaches(array) called at [<phabricator>/src/applications/people/query/PhabricatorPeopleQuery.php:448]
PHP message:   #4 PhabricatorPeopleQuery::rebuildAvailabilityCache(array) called at [<phabricator>/src/applications/people/query/PhabricatorPeopleQuery.php:208]
PHP message:   #5 PhabricatorPeopleQuery::didFilterPage(array) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:273]
PHP message:   #6 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/phid/type/PhabricatorPHIDType.php:91]
PHP message:   #7 PhabricatorPHIDType::loadObjects(PhabricatorObjectQuery, array) called at [<phabricator>/src/applications/phid/query/PhabricatorObjectQuery.php:153]
PHP message:   #8 PhabricatorObjectQuery::loadObjectsByPHID(array, array) called at [<phabricator>/src/applications/phid/query/PhabricatorOb
2017/03/23 11:39:25 [error] 19152#0: *1750 FastCGI sent in stderr: " at [<phabricator>/src/view/page/PhabricatorStandardPageView.php:199]
PHP message:   #27 PhabricatorStandardPageView::willRenderPage() called at [<phabricator>/src/view/page/AphrontPageView.php:46]
PHP message:   #28 AphrontPageView::render() called at [<phabricator>/src/view/page/PhabricatorStandardPageView.php:884]
PHP message:   #29 PhabricatorStandardPageView::produceAphrontResponse() called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:649]
PHP message:   #30 AphrontApplicationConfiguration::produceResponse(AphrontRequest, PhabricatorStandardPageView) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:278]
PHP message:   #31 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:181]
PHP message:   #32 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:17]
PHP message: [2017-03-23 11:39:25] ERROR 8: Undefined offset: -149 at [/home/phabricator/g/phabricator/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:149]
PHP message: arcanist(head=stable, ref.master=172c930630a9, ref.stable=822bc53ca306), phabricator(head=stable, ref.master=3bccb0dcf2bc, ref.stable=56dd1b297c3e, custom=1), phutil(head=stable, ref.master=dbf792a053fc, ref.stable=24ede7a5dbfd), sprint(head=7a7368cd216297a257a5d1409c751e70d19d230a, ref.master=7a7368cd2162)
PHP message:   #0 PhabricatorFilesComposeAvatarBuiltinFile::getUniqueProfileImage(string) called at [<phabricator>/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:160]
PHP message:   #1 PhabricatorFilesComposeAvatarBuiltinFile::getUserProfileImageFile(string) called at [<phabricator>/src/applications/people/cache/PhabricatorUserProfileImageCacheType.php:54]
PHP message:   #2 Phabricator
2017/03/23 11:39:25 [error] 19152#0: *1750 FastCGI sent in stderr: "called at [<phutil>/src/markup/render.php:157]
PHP message:   #17 phutil_escape_html(array) called at [<phutil>/src/markup/render.php:157]
PHP message:   #18 phutil_escape_html(array) called at [<phutil>/src/markup/render.php:119]
PHP message:   #19 phutil_tag(string, array, array) called at [<phabricator>/src/infrastructure/javelin/markup.php:53]
PHP message:   #20 javelin_tag(string, array, array) called at [<phabricator>/src/view/AphrontTagView.php:161]
PHP message:   #21 AphrontTagView::render() called at [<phabricator>/src/view/AphrontView.php:222]
PHP message:   #22 AphrontView::producePhutilSafeHTML() called at [<phutil>/src/markup/render.php:133]
PHP message:   #23 phutil_escape_html(PHUIObjectBoxView) called at [<phutil>/src/markup/render.php:157]
PHP message:   #24 phutil_escape_html(array) called at [<phutil>/src/markup/render.php:189]
PHP message:   #25 phutil_implode_html(string, array) called at [<phabricator>/src/view/page/PhabricatorBarePageView.php:58]
PHP message:   #26 PhabricatorBarePageView::willRenderPage() called at [<phabricator>/src/view/page/PhabricatorStandardPageView.php:199]
PHP message:   #27 PhabricatorStandardPageView::willRenderPage() called at [<phabricator>/src/view/page/AphrontPageView.php:46]
PHP message:   #28 AphrontPageView::render() called at [<phabricator>/src/view/page/PhabricatorStandardPageView.php:884]
PHP message:   #29 PhabricatorStandardPageView::produceAphrontResponse() called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:649]
PHP message:   #30 AphrontApplicationConfiguration::produceResponse(AphrontRequest, PhabricatorStandardPageView) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:278]
PHP message:   #31 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:181]
PHP me
2017/03/23 11:39:25 [error] 19152#0: *1750 FastCGI sent in stderr: "habricator>/src/applications/phid/query/PhabricatorObjectQuery.php:153]
PHP message:   #9 PhabricatorObjectQuery::loadObjectsByPHID(array, array) called at [<phabricator>/src/applications/phid/query/PhabricatorObjectQuery.php:73]
PHP message:   #10 PhabricatorObjectQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:236]
PHP message:   #11 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/phid/query/PhabricatorHandleQuery.php:46]
PHP message:   #12 PhabricatorHandleQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:236]
PHP message:   #13 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/maniphest/view/ManiphestTaskListView.php:154]
PHP message:   #14 ManiphestTaskListView::loadTaskHandles(PhabricatorUser, array) called at [<phabricator>/src/applications/maniphest/view/ManiphestTaskResultListView.php:51]
PHP message:   #15 ManiphestTaskResultListView::render() called at [<phabricator>/src/view/AphrontView.php:222]
PHP message:   #16 AphrontView::producePhutilSafeHTML() called at [<phutil>/src/markup/render.php:133]
PHP message:   #17 phutil_escape_html(ManiphestTaskResultListView) called at [<phutil>/src/markup/render.php:157]
PHP message:   #18 phutil_escape_html(array) called at [<phutil>/src/markup/render.php:157]
PHP message:   #19 phutil_escape_html(array) called at [<phutil>/src/markup/render.php:119]
PHP message:   #20 phutil_tag(string, array, array) called at [<phabricator>/src/infrastructure/javelin/markup.php:53]
PHP message:   #21 javelin_tag(string, array, array) called at [<phabricator>/src/view/AphrontTagView.php:161]
PHP message:   #22 AphrontTagView::render() called at [<phabricator>/src/view/AphrontView.php:222]
PHP message:   #23 AphrontView::producePhutilSafeHTML() called at [<phutil>/src/markup/render.php:133]
PHP message:   #24 phutil_escape_html(PHUIObj
2017/03/23 11:39:25 [error] 19152#0: *1750 FastCGI sent in stderr: "/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:64]
PHP message:   #2 <#2> PhabricatorFilesComposeAvatarBuiltinFile::composeImage(NULL, string, array) called at [<phabricator>/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:57]
PHP message:   #3 <#2> PhabricatorFilesComposeAvatarBuiltinFile::loadBuiltinFileData() called at [<phabricator>/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php:167]
PHP message:   #4 <#2> PhabricatorFilesComposeAvatarBuiltinFile::getUserProfileImageFile(string) called at [<phabricator>/src/applications/people/cache/PhabricatorUserProfileImageCacheType.php:54]
PHP message:   #5 <#2> PhabricatorUserProfileImageCacheType::newValueForUsers(string, array) called at [<phabricator>/src/applications/people/query/PhabricatorPeopleQuery.php:618]
PHP message:   #6 <#2> PhabricatorPeopleQuery::fillUserCaches(array) called at [<phabricator>/src/applications/people/query/PhabricatorPeopleQuery.php:448]
PHP message:   #7 <#2> PhabricatorPeopleQuery::rebuildAvailabilityCache(array) called at [<phabricator>/src/applications/people/query/PhabricatorPeopleQuery.php:208]
PHP message:   #8 <#2> PhabricatorPeopleQuery::didFilterPage(array) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:273]
PHP message:   #9 <#2> PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/phid/type/PhabricatorPHIDType.php:91]
PHP message:   #10 <#2> PhabricatorPHIDType::loadObjects(PhabricatorObjectQuery, array) called at [<phabricator>/src/applications/phid/query/PhabricatorObjectQuery.php:153]
PHP message:   #11 <#2> PhabricatorObjectQuery::loadObjectsByPHID(array, array) called at [<phabricator>/src/applications/phid/query/PhabricatorObjectQuery.php:73]
PHP message:   #12 <#2> PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/phid/query/PhabricatorHandleQuery.php:46]
PHP message:   #13 <#2> PhabricatorHa
2017/03/23 11:39:25 [error] 19152#0: *1750 FastCGI sent in stderr: "78]
PHP message:   #29 <#2> AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:181]
PHP message:   #30 <#2> AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:17]
PHP message:   #31 phlog(FilesystemException) called at [<phabricator>/src/aphront/response/AphrontUnhandledExceptionResponse.php:20]
PHP message:   #32 AphrontUnhandledExceptionResponse::setException(FilesystemException) called at [<phabricator>/webroot/index.php:21]" while reading response header from upstream, client: <masked>, server: codereview-test.geoforce.net, request: "GET /maniphest/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "codereview-test.geoforce.net"

Event Timeline

deathsyn created this task.Mar 23 2017, 4:41 PM
deathsyn mentioned this in Z1336: General Chat.
deathsyn updated the task description. (Show Details)Mar 23 2017, 5:46 PM

@deathsyn Can you show me the output of this command on your system to help confirm that there's a 32-bit issue at play here?

$ php -r 'echo PHP_INT_MAX."\n";'

The other bugs I'm more certain are actual bugs, but I'm not totally sure about that one.

(Alternatively, upgrade to rP9326b4d131ce and run the bin/people ... command again and see if that just fixes it.)

@deathsyn Can you show me the output of this command on your system to help confirm that there's a 32-bit issue at play here?

$ php -r 'echo PHP_INT_MAX."\n";'

The other bugs I'm more certain are actual bugs, but I'm not totally sure about that one.

phabricator@codereview:~/g/phabricator$ php -r 'echo PHP_INT_MAX."\n";'
2147483647

Thanks! That's consistent with 32-bit and I suspect the & 0x7FFFFFFF part of rP9326b4d131ce will fix it.

Checked out that commit and gave it a run. Profile images all generated without errors and I can now reach the front pages of Maniphest and People successfully.

Thank you!

epriestley closed this task as Resolved.Mar 23 2017, 6:12 PM
epriestley claimed this task.

Great! Thanks for the report, and for your help confirming the fix. Let us know if you run into anything else.