Page MenuHomePhabricator

Repository update command fails on empty Git repositories
Closed, ResolvedPublic

Description

I'm seeing errors in the phd daemon logs after creating a Git repository. I've looked at all my repositories and it looks like it happens only on empty repositories. It goes away after I push something to it.

The Diffusion status panel also shows Update Error

Environment details

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

daemons.log
 [2016-07-04 19:14:48] EXCEPTION: (PhutilProxyException) Error while updating the "rWTSCR" repository. {>} (CommandException) Command failed with error #255!
COMMAND
'/opt/phacility/phabricator/bin/repository' update  -- 'rWTSCR'

STDOUT
(empty)

STDERR
[2016-07-04 19:14:48] EXCEPTION: (CommandException) Command failed with error #128!
COMMAND
git log --format='%H%x01%P%x01%ct' --all --

STDOUT
(empty)

STDERR
fatal: bad default revision 'HEAD'
 at [<phutil>/src/future/exec/ExecFuture.php:361]
arcanist(head=master, ref.master=4d4d16f25985), phabricator(head=master, ref.master=d7b4c50941fa), phutil(head=master, ref.master=dde2f74f2793)
  #0 ExecFuture::resolvex() called at [<phutil>/src/filesystem/linesofalarge/LinesOfALargeExecFuture.php:108]
  #1 LinesOfALargeExecFuture::readMore() called at [<phutil>/src/filesystem/linesofalarge/LinesOfALarge.php:199]
  #2 LinesOfALarge::next() called at [<phutil>/src/filesystem/linesofalarge/LinesOfALarge.php:111]
  #3 LinesOfALarge::rewind() called at [<phabricator>/src/applications/repository/daemon/PhabricatorGitGraphStream.php:33]
  #4 PhabricatorGitGraphStream::__construct(PhabricatorRepository) called at [<phabricator>/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.ph... (1,166 more bytes) ... at [<phutil>/src/future/exec/ExecFuture.php:361]
[04-Jul-2016 19:14:48 UTC] arcanist(head=master, ref.master=4d4d16f25985), phabricator(head=master, ref.master=d7b4c50941fa), phutil(head=master, ref.master=dde2f74f2793)
[04-Jul-2016 19:14:48 UTC]   #0 <#3> ExecFuture::resolvex() called at [<phabricator>/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php:393]
[04-Jul-2016 19:14:48 UTC]   #1 phlog(PhutilProxyException) called at [<phabricator>/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php:400]
[04-Jul-2016 19:14:48 UTC]   #2 PhabricatorRepositoryPullLocalDaemon::resolveUpdateFuture(PhabricatorRepository, ExecFuture, integer) called at [<phabricator>/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php:203]
[04-Jul-2016 19:14:48 UTC]   #3 PhabricatorRepositoryPullLocalDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:184]
[04-Jul-2016 19:14:48 UTC]   #4 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:127]

Reproduction steps

  1. Create a new Git repository and activate it
  2. Wait a few seconds for the daemon to run
  3. See the status going and errors appear in log files

Event Timeline

Thanks for the report! I believe this should now be resolved in HEAD of master.

Let us know if you're still seeing issues after updating, or run into anything else.

Sorry to trouble you @epriestley , I have the same question(T11273) . After your committing rP5ffdb732735c, I tried to update my phabricator under the direction of doc(https://secure.phabricator.com/book/phabricator/article/upgrading/). While I executed git pull,the terminal shows

屏幕快照 2016-07-07 15.45.45.png (262×1 px, 61 KB)
. So should I commit local changes or checkout them?

Why do you have local changes in your phabricator folder?

@chad I don't know, I installed phabricator under the direction of doc and then resolved some setup Issues.

I can't think of any reason it would ask that unless something changed locally. If you have no local changes to phabricator/, just reset to HEAD.

git reset --hard origin/master