Ext4 + barriers=1 + ssd + power loss while commiting to a git repo = broken repo?
Michał Piotrowski <mkkp4x4@gmail.com> writes:
> After turning system on I noticed that repo is totally broken.
How do you define "totally broken"?
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
04-14-2011, 08:14 AM
Michał Piotrowski
Ext4 + barriers=1 + ssd + power loss while commiting to a git repo = broken repo?
2011/4/14 Andreas Schwab <schwab@redhat.com>:
> Michał Piotrowski <mkkp4x4@gmail.com> writes:
>
>> After turning system on I noticed that repo is totally broken.
>
> How do you define "totally broken"?
All files in repo looks like added to commit, but not commited.
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
list of over 5000 files to commit...
Also git log says
fatal: bad default revision 'HEAD'
http://eventhorizon.pl/
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
04-14-2011, 08:29 AM
Andreas Schwab
Ext4 + barriers=1 + ssd + power loss while commiting to a git repo = broken repo?
Michał Piotrowski <mkkp4x4@gmail.com> writes:
> Also git log says
> fatal: bad default revision 'HEAD'
Looks like the only issue is that .git/refs/heads/master has been lost.
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
04-14-2011, 08:36 AM
Michał Piotrowski
Ext4 + barriers=1 + ssd + power loss while commiting to a git repo = broken repo?
W dniu 14 kwietnia 2011 10:29 użytkownik Andreas Schwab
<schwab@redhat.com> napisał:
> Michał Piotrowski <mkkp4x4@gmail.com> writes:
>
>> Also git log says
>> fatal: bad default revision 'HEAD'
>
> Looks like the only issue is that .git/refs/heads/master has been lost.
Indeed, the file is empty.
But I don't have this file in the repo that I restored from the backup.
http://eventhorizon.pl/
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
04-14-2011, 08:42 AM
Andreas Schwab
Ext4 + barriers=1 + ssd + power loss while commiting to a git repo = broken repo?
Michał Piotrowski <mkkp4x4@gmail.com> writes:
> But I don't have this file in the repo that I restored from the backup.
You do, in .git/packed-refs.
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
04-14-2011, 08:51 AM
Michał Piotrowski
Ext4 + barriers=1 + ssd + power loss while commiting to a git repo = broken repo?
W dniu 14 kwietnia 2011 10:42 użytkownik Andreas Schwab
<schwab@redhat.com> napisał:
> Michał Piotrowski <mkkp4x4@gmail.com> writes:
>
>> But I don't have this file in the repo that I restored from the backup.
>
> You do, in .git/packed-refs.
You're right.
But the question remains - should enabled barriers protect against
such data loss/breakage? Or I just had a big bad luck?
http://eventhorizon.pl/
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
04-14-2011, 09:04 AM
Andreas Schwab
Ext4 + barriers=1 + ssd + power loss while commiting to a git repo = broken repo?
Michał Piotrowski <mkkp4x4@gmail.com> writes:
> But the question remains - should enabled barriers protect against
> such data loss/breakage? Or I just had a big bad luck?
It could also be a bug in git, perhaps it needs to take more care to
create the ref file atomically.
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
04-14-2011, 09:15 AM
Michał Piotrowski
Ext4 + barriers=1 + ssd + power loss while commiting to a git repo = broken repo?
W dniu 14 kwietnia 2011 11:04 użytkownik Andreas Schwab
<schwab@redhat.com> napisał:
> Michał Piotrowski <mkkp4x4@gmail.com> writes:
>
>> But the question remains - should enabled barriers protect against
>> such data loss/breakage? Or I just had a big bad luck?
>
> It could also be a bug in git, perhaps it needs to take more care to
> create the ref file atomically.
Should I report it to upstream or in bugzilla.redhat.com?
I have no problems with doing backups and restoring from them,
but if it's a git problem, then someone in the future may be less fortunate.
It seems to me that the repairing git repo without a deep knowledge of
it can be rather difficult.
http://eventhorizon.pl/
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
04-14-2011, 09:19 AM
Andreas Schwab
Ext4 + barriers=1 + ssd + power loss while commiting to a git repo = broken repo?
Michał Piotrowski <mkkp4x4@gmail.com> writes:
> W dniu 14 kwietnia 2011 11:04 użytkownik Andreas Schwab
> <schwab@redhat.com> napisał:
>> Michał Piotrowski <mkkp4x4@gmail.com> writes:
>>
>>> But the question remains - should enabled barriers protect against
>>> such data loss/breakage? Or I just had a big bad luck?
>>
>> It could also be a bug in git, perhaps it needs to take more care to
>> create the ref file atomically.
>
> Should I report it to upstream or in bugzilla.redhat.com?
Looking closer it seems like git already does the right thing
(open("master.lock"), write(sha1), rename("master.lock", "master")), so
it appears to be a barriers issue.
> It seems to me that the repairing git repo without a deep knowledge of
> it can be rather difficult.
gitrepository-layout(5)
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
04-14-2011, 09:27 AM
Michał Piotrowski
Ext4 + barriers=1 + ssd + power loss while commiting to a git repo = broken repo?
W dniu 14 kwietnia 2011 11:19 użytkownik Andreas Schwab
<schwab@redhat.com> napisał:
> Michał Piotrowski <mkkp4x4@gmail.com> writes:
>
>> W dniu 14 kwietnia 2011 11:04 użytkownik Andreas Schwab
>> <schwab@redhat.com> napisał:
>>> Michał Piotrowski <mkkp4x4@gmail.com> writes:
>>>
>>>> But the question remains - should enabled barriers protect against
>>>> such data loss/breakage? Or I just had a big bad luck?
>>>
>>> It could also be a bug in git, perhaps it needs to take more care to
>>> create the ref file atomically.
>>
>> Should I report it to upstream or in bugzilla.redhat.com?
>
> Looking closer it seems like git already does the right thing
> (open("master.lock"), write(sha1), rename("master.lock", "master")), so
> it appears to be a barriers issue.