Discussion:
[chromium-dev] `git gc` broken?
Nico Weber
2015-12-12 18:03:21 UTC
Permalink
Hi,

I noticed git printing

Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.

a lot, so I figured I'd run that manually. I'm getting:

$ git gc
fatal: bad object refs/remotes/origin/HEAD
error: failed to run repack

Does anyone else see this error? Is this something I can fix locally
(how?), or is some object on the server bad?

Thanks,
Nico
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Alexey Efimov
2015-12-13 12:22:18 UTC
Permalink
Hello,

Which version of git and OS?
Also will be nice to show `git show-ref refs/remotes/origin/HEAD` output
Post by Nico Weber
Hi,
I noticed git printing
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
$ git gc
fatal: bad object refs/remotes/origin/HEAD
error: failed to run repack
Does anyone else see this error? Is this something I can fix locally
(how?), or is some object on the server bad?
Thanks,
Nico
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Trent Apted
2015-12-14 05:38:06 UTC
Permalink
I once had something like the first bit (git gc happening a lot) -- in my
case git gc was crashing. Managed to fix it (overnight) by setting
pack.threads=1 in the config and doing a `git gc --aggressive`.

Haven't seen the `bad object` thing after a gc though. It seems similar to
the error you get after removing the `origin` remote and replacing it with
a new URL. Then (assuming you're on [local] master) you need to `git fetch
origin && git branch --set-upstream-to=origin/master`.

There's also `git fsck` which might fix "stuff".
Post by Alexey Efimov
Hello,
Which version of git and OS?
Also will be nice to show `git show-ref refs/remotes/origin/HEAD` output
Post by Nico Weber
Hi,
I noticed git printing
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
$ git gc
fatal: bad object refs/remotes/origin/HEAD
error: failed to run repack
Does anyone else see this error? Is this something I can fix locally
(how?), or is some object on the server bad?
Thanks,
Nico
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Primiano Tucci
2015-12-14 10:08:46 UTC
Permalink
did you happen to have a .git/object/refs/remotes/origin/HEAD (or any file
called HEAD under .git/objects)
If that is the case, you might have mistakenly moved some file around at
some point in the past.

Otherwise, what is the output of:
git rev-parse refs/remotes/origin/HEAD
and
git cat-file commit $sha1_from_previous_step ?

I'd expect that if the objects that refs/remotes/origin/HEAD points to was
really busted, your repo would be unusable.
Post by Nico Weber
or is some object on the server bad?
Nah this looks a local issue.
Post by Nico Weber
Hi,
I noticed git printing
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
$ git gc
fatal: bad object refs/remotes/origin/HEAD
error: failed to run repack
Does anyone else see this error? Is this something I can fix locally
(how?), or is some object on the server bad?
Thanks,
Nico
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Nico Weber
2015-12-14 14:27:38 UTC
Permalink
OS X 10.10.5
$ git --version
git version 2.3.8 (Apple Git-58)

`find .git/objects/ -name HEAD` finds nothing.

$ git rev-parse refs/remotes/origin/HEAD
warning: ignoring dangling symref refs/remotes/origin/HEAD.
refs/remotes/origin/HEAD
warning: ignoring dangling symref refs/remotes/origin/HEAD.
fatal: ambiguous argument 'refs/remotes/origin/HEAD': unknown revision or
path not in the working tree.
Post by Primiano Tucci
did you happen to have a .git/object/refs/remotes/origin/HEAD (or any file
called HEAD under .git/objects)
If that is the case, you might have mistakenly moved some file around at
some point in the past.
git rev-parse refs/remotes/origin/HEAD
and
git cat-file commit $sha1_from_previous_step ?
I'd expect that if the objects that refs/remotes/origin/HEAD points to was
really busted, your repo would be unusable.
Post by Nico Weber
or is some object on the server bad?
Nah this looks a local issue.
Post by Nico Weber
Hi,
I noticed git printing
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
$ git gc
fatal: bad object refs/remotes/origin/HEAD
error: failed to run repack
Does anyone else see this error? Is this something I can fix locally
(how?), or is some object on the server bad?
Thanks,
Nico
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Alexey Efimov
2015-12-14 14:35:47 UTC
Permalink
Hello, also show:
git symbolic-ref refs/remotes/origin/HEAD

But i think you have wrong refs/remotes/origin/<branch> where you pointed
by refs/remotes/origin/HEAD
Post by Nico Weber
OS X 10.10.5
$ git --version
git version 2.3.8 (Apple Git-58)
`find .git/objects/ -name HEAD` finds nothing.
$ git rev-parse refs/remotes/origin/HEAD
warning: ignoring dangling symref refs/remotes/origin/HEAD.
refs/remotes/origin/HEAD
warning: ignoring dangling symref refs/remotes/origin/HEAD.
fatal: ambiguous argument 'refs/remotes/origin/HEAD': unknown revision or
path not in the working tree.
Post by Primiano Tucci
did you happen to have a .git/object/refs/remotes/origin/HEAD (or any
file called HEAD under .git/objects)
If that is the case, you might have mistakenly moved some file around at
some point in the past.
git rev-parse refs/remotes/origin/HEAD
and
git cat-file commit $sha1_from_previous_step ?
I'd expect that if the objects that refs/remotes/origin/HEAD points to
was really busted, your repo would be unusable.
Post by Nico Weber
or is some object on the server bad?
Nah this looks a local issue.
Post by Nico Weber
Hi,
I noticed git printing
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
$ git gc
fatal: bad object refs/remotes/origin/HEAD
error: failed to run repack
Does anyone else see this error? Is this something I can fix locally
(how?), or is some object on the server bad?
Thanks,
Nico
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Nico Weber
2015-12-14 14:38:01 UTC
Permalink
$ git symbolic-ref refs/remotes/origin/HEAD
refs/remotes/origin/trunk

(This is a fairly old checkout that has worked well for years)
Post by Alexey Efimov
git symbolic-ref refs/remotes/origin/HEAD
But i think you have wrong refs/remotes/origin/<branch> where you pointed
by refs/remotes/origin/HEAD
Post by Nico Weber
OS X 10.10.5
$ git --version
git version 2.3.8 (Apple Git-58)
`find .git/objects/ -name HEAD` finds nothing.
$ git rev-parse refs/remotes/origin/HEAD
warning: ignoring dangling symref refs/remotes/origin/HEAD.
refs/remotes/origin/HEAD
warning: ignoring dangling symref refs/remotes/origin/HEAD.
fatal: ambiguous argument 'refs/remotes/origin/HEAD': unknown revision or
path not in the working tree.
Post by Primiano Tucci
did you happen to have a .git/object/refs/remotes/origin/HEAD (or any
file called HEAD under .git/objects)
If that is the case, you might have mistakenly moved some file around at
some point in the past.
git rev-parse refs/remotes/origin/HEAD
and
git cat-file commit $sha1_from_previous_step ?
I'd expect that if the objects that refs/remotes/origin/HEAD points to
was really busted, your repo would be unusable.
Post by Nico Weber
or is some object on the server bad?
Nah this looks a local issue.
Post by Nico Weber
Hi,
I noticed git printing
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
$ git gc
fatal: bad object refs/remotes/origin/HEAD
error: failed to run repack
Does anyone else see this error? Is this something I can fix locally
(how?), or is some object on the server bad?
Thanks,
Nico
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Alexey Efimov
2015-12-14 14:41:07 UTC
Permalink
trunk? Svn branch?

So i guess you might simple replace HEAD to master for example:
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master
git fetch --prune

And then maybe your `git gc` starts working.
Post by Nico Weber
$ git symbolic-ref refs/remotes/origin/HEAD
refs/remotes/origin/trunk
(This is a fairly old checkout that has worked well for years)
Post by Alexey Efimov
git symbolic-ref refs/remotes/origin/HEAD
But i think you have wrong refs/remotes/origin/<branch> where you pointed
by refs/remotes/origin/HEAD
Post by Nico Weber
OS X 10.10.5
$ git --version
git version 2.3.8 (Apple Git-58)
`find .git/objects/ -name HEAD` finds nothing.
$ git rev-parse refs/remotes/origin/HEAD
warning: ignoring dangling symref refs/remotes/origin/HEAD.
refs/remotes/origin/HEAD
warning: ignoring dangling symref refs/remotes/origin/HEAD.
fatal: ambiguous argument 'refs/remotes/origin/HEAD': unknown revision
or path not in the working tree.
Post by Primiano Tucci
did you happen to have a .git/object/refs/remotes/origin/HEAD (or any
file called HEAD under .git/objects)
If that is the case, you might have mistakenly moved some file around
at some point in the past.
git rev-parse refs/remotes/origin/HEAD
and
git cat-file commit $sha1_from_previous_step ?
I'd expect that if the objects that refs/remotes/origin/HEAD points to
was really busted, your repo would be unusable.
Post by Nico Weber
or is some object on the server bad?
Nah this looks a local issue.
Post by Nico Weber
Hi,
I noticed git printing
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
$ git gc
fatal: bad object refs/remotes/origin/HEAD
error: failed to run repack
Does anyone else see this error? Is this something I can fix locally
(how?), or is some object on the server bad?
Thanks,
Nico
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Loading...