Debian Bug report logs -
#696178
git: Non-helpful error message if expected object file is a directory: fatal: Out of memory? mmap failed: No such device
Subject: git: Non-helpful error message if expected object file is a directory: fatal: Out of memory? mmap failed: No such device
Date: Mon, 17 Dec 2012 17:13:54 +0100 (CET)
Package: git
Version: 1:1.7.10.4-2
Severity: minor
Dear Git Maintainer,
the following case likely was initially caused through some underlying
file system corruption. Nevertheless git's error message is anything but
helpful here:
/tmp # mkdir git-debug
/tmp # cd git-debug
/tmp/git-debug # git init
Initialized empty Git repository in /tmp/git-debug/.git/
/tmp/git-debug # echo foo > bar
/tmp/git-debug # git add bar
/tmp/git-debug # git commit -m bar
[master (root-commit) f2baaf1] bar
1 file changed, 1 insertion(+)
create mode 100644 bar
/tmp/git-debug # mkdir -pv .git/objects/5e/ebe399b43531af39cbc484571a6f909991f5c8
mkdir: created directory `.git/objects/5e'
mkdir: created directory `.git/objects/5e/ebe399b43531af39cbc484571a6f909991f5c8'
/tmp/git-debug # git fsck
Checking object directories: 100% (256/256), done.
fatal: Out of memory? mmap failed: No such device
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
("git gc" gives btw. the same error message if the SHA1 id is actually a
referenced object.)
It took me quite a while to figure out what's actually wrong. It would
be nice if git would give a more helpful error message as it does if an
object is not a valid SHA1 id:
/tmp/git-debug # rmdir -v .git/objects/5e/ebe399b43531af39cbc484571a6f909991f5c8
rmdir: removing directory, `.git/objects/5e/ebe399b43531af39cbc484571a6f909991f5c8'
/tmp/git-debug # touch .git/objects/5e/ebe399b43531af39cbc484571a6f909991f5cz
^
/tmp/git-debug # git fsck
bad sha1 file: .git/objects/5e/ebe399b43531af39cbc484571a6f909991f5cz
Checking object directories: 100% (256/256), done.
An error message like "sha1 file is a directory:
.git/objects/5e/ebe399b43531af39cbc484571a6f909991f5c8" would be much
more helpful.
-- System Information:
Debian Release: 7.0
APT prefers unstable
APT policy: (990, 'unstable'), (600, 'testing'), (400, 'stable'), (110, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.5-trunk-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages git depends on:
ii git-man 1:1.7.10.4-2
ii libc6 2.13-37
ii libcurl3-gnutls 7.28.0-3
ii liberror-perl 0.17-1
ii libexpat1 2.1.0-1
ii perl-modules 5.14.2-16
ii zlib1g 1:1.2.7.dfsg-13
Versions of packages git recommends:
ii less 456-1
ii openssh-client [ssh-client] 1:6.0p1-3
ii patch 2.6.1-3
ii rsync 3.0.9-4
Versions of packages git suggests:
ii gettext-base 0.18.1.1-10
ii git-arch 1:1.7.10.4-2
ii git-cvs 1:1.7.10.4-2
pn git-daemon-run | git-daemon-sysvinit <none>
ii git-doc 1:1.7.10.4-2
ii git-el 1:1.7.10.4-2
ii git-email 1:1.7.10.4-2
ii git-gui 1:1.7.10.4-2
ii git-svn 1:1.7.10.4-2
ii gitk 1:1.7.10.4-2
pn gitweb <none>
-- no debconf information
Acknowledgement sent
to Michał Mirosław <[email protected]>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <[email protected]>.
(Mon, 11 Jun 2018 18:03:06 GMT) (full text, mbox, link).
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.