dominikj111
dominikj111

Reputation: 375

Broken git repository after chmod operation

After I did chmod -R 755 /.../[repo_root]/some_inner_project_folder upon more then 5000 files, git add . and git commit -m "..." and git push I've got Interrupted system call errors.

I solved my problem by re-clone the repository and copy over whatever is differ between new and old local repository.

But I'm continuously getting this issue with git and not sure how to avoid it. So after error, I'm getting something like this from the git fsck:

error: unable to mmap .git/objects/03/503a48d98793cd58fbdf18e6f2aafa19616a15: Interrupted system call
error: 03503a48d98793cd58fbdf18e6f2aafa19616a15: object corrupt or missing: .git/objects/03/503a48d98793cd58fbdf18e6f2aafa19616a15

Sometimes, I'm successful with git gc --aggressive --prune=now --force and sometimes not.

It happened on the repository used by multiple devs and upon the one used by me only.

Update 1

The files I was working with belong to inner folder of the git repository. I didn't touch the .git folder.

Upvotes: 3

Views: 490

Answers (1)

dominikj111
dominikj111

Reputation: 375

The issue was related to the Trend Micro Security as discovered here.

I was getting multiple "interrupted system call" and I couldn't do git push anymore. So I marked these git repos as non fixable.

The issue appeared after chmod command I mentioned on top in the particular project, but when I uninstall the Trend Micro Security I was able to fix project by git gc as mentioned as well.

Upvotes: 2

Related Questions