Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 285664 - dev-util/git random segfaults - pack corrupted
Summary: dev-util/git random segfaults - pack corrupted
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-20 10:37 UTC by Patrick Lauer
Modified: 2009-10-16 03:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2009-09-20 10:37:07 UTC
When updating git repos I randomly get segfaults. They are reproducable as long as the state of the repo doesn't change, usually a commit (either local or by pull) changes the state enough to make the error go away.

kde $ git pull                                                                                                 
remote: Counting objects: 55, done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 30 (delta 24), reused 0 (delta 0)
Unpacking objects: 100% (30/30), done.         
From git+ssh://git.overlays.gentoo.org/proj/kde
   79e4616..9006c7e  master     -> origin/master
Updating 79e4616..9006c7e                       
Fast forward                                    
Auto packing your repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.    
Counting objects: 101332, done.                                   
Delta compression using up to 4 threads.                          
*** glibc detected *** git: free(): invalid pointer: 0x00000000012317c0 ***
======= Backtrace: =========                                               
/lib/libc.so.6[0x3002271e46]                                               
git[0x466b80]                                                              
git[0x43c294]                                                              
git[0x43c7a1]                                                              
/lib/libpthread.so.0[0x3002e06624]                                         
/lib/libc.so.6(clone+0x6d)[0x30022cd56d]                                   
======= Memory map: ========                                               
00400000-004e7000 r-xp 00000000 09:00 66096918                           /usr/libexec/git-core/git
006e6000-006e7000 r--p 000e6000 09:00 66096918                           /usr/libexec/git-core/git
006e7000-006ec000 rw-p 000e7000 09:00 66096918                           /usr/libexec/git-core/git
006ec000-00733000 rw-p 00000000 00:00 0                                                           
00c68000-01293000 rw-p 00000000 00:00 0                                  [heap]                   
3000000000-300001d000 r-xp 00000000 09:00 56463102                       /lib64/ld-2.10.1.so      
300021c000-300021d000 r--p 0001c000 09:00 56463102                       /lib64/ld-2.10.1.so      
300021d000-300021e000 rw-p 0001d000 09:00 56463102                       /lib64/ld-2.10.1.so      
3002200000-300234c000 r-xp 00000000 09:00 59742972                       /lib64/libc-2.10.1.so    
300234c000-300254c000 ---p 0014c000 09:00 59742972                       /lib64/libc-2.10.1.so    
300254c000-3002550000 r--p 0014c000 09:00 59742972                       /lib64/libc-2.10.1.so    
3002550000-3002551000 rw-p 00150000 09:00 59742972                       /lib64/libc-2.10.1.so    
3002551000-3002556000 rw-p 00000000 00:00 0                                                       
3002a00000-3002a02000 r-xp 00000000 09:00 81673857                       /lib64/libdl-2.10.1.so   
3002a02000-3002c02000 ---p 00002000 09:00 81673857                       /lib64/libdl-2.10.1.so   
3002c02000-3002c03000 r--p 00002000 09:00 81673857                       /lib64/libdl-2.10.1.so   
3002c03000-3002c04000 rw-p 00003000 09:00 81673857                       /lib64/libdl-2.10.1.so   
3002e00000-3002e16000 r-xp 00000000 09:00 74448155                       /lib64/libpthread-2.10.1.so
3002e16000-3003016000 ---p 00016000 09:00 74448155                       /lib64/libpthread-2.10.1.so
3003016000-3003017000 r--p 00016000 09:00 74448155                       /lib64/libpthread-2.10.1.so
3003017000-3003018000 rw-p 00017000 09:00 74448155                       /lib64/libpthread-2.10.1.so
3003018000-300301c000 rw-p 00000000 00:00 0                                                         
3003200000-3003214000 r-xp 00000000 09:00 74448095                       /lib64/libz.so.1.2.3       
3003214000-3003414000 ---p 00014000 09:00 74448095                       /lib64/libz.so.1.2.3       
3003414000-3003415000 r--p 00014000 09:00 74448095                       /lib64/libz.so.1.2.3       
3003415000-3003416000 rw-p 00015000 09:00 74448095                       /lib64/libz.so.1.2.3       
3016200000-3016361000 r-xp 00000000 09:00 65498744                       /usr/lib64/libcrypto.so.0.9.8
3016361000-3016560000 ---p 00161000 09:00 65498744                       /usr/lib64/libcrypto.so.0.9.8
3016560000-301656e000 r--p 00160000 09:00 65498744                       /usr/lib64/libcrypto.so.0.9.8
301656e000-3016586000 rw-p 0016e000 09:00 65498744                       /usr/lib64/libcrypto.so.0.9.8
3016586000-301658a000 rw-p 00000000 00:00 0
7f6187307000-7f6187308000 ---p 00000000 00:00 0
7f6187308000-7f6187b08000 rw-p 00000000 00:00 0
7f6187b08000-7f6187b09000 ---p 00000000 00:00 0
7f6187b09000-7f6188309000 rw-p 00000000 00:00 0
7f6188309000-7f618830a000 ---p 00000000 00:00 0
7f618830a000-7f6188b0a000 rw-p 00000000 00:00 0
7f6188b0a000-7f6188b0b000 ---p 00000000 00:00 0
7f6188b0b000-7f618930b000 rw-p 00000000 00:00 0
7f618930b000-7f618a035000 rw-p 00000000 00:00 0
7f618a567000-7f618a57c000 r-xp 00000000 09:00 92261975                   /lib64/libgcc_s.so.1
7f618a57c000-7f618a77c000 ---p 00015000 09:00 92261975                   /lib64/libgcc_s.so.1
7f618a77c000-7f618a77d000 r--p 00015000 09:00 92261975                   /lib64/libgcc_s.so.1
7f618a77d000-7f618a77e000 rw-p 00016000 09:00 92261975                   /lib64/libgcc_s.so.1
7f618a77e000-7f618aae8000 rw-p 00000000 00:00 0
7f618aae8000-7f618ac0c000 rw-p 00000000 00:00 0
7f618ac6b000-7f618adad000 r--p 00000000 09:00 77603807                   /home/me/code/kde/.git/objects/pack/pack-44916ab03220216fd89ea880a7caae09a6b0b012.pack
7f618adad000-7f618adc8000 r--p 00000000 09:00 78532627                   /home/me/code/kde/.git/objects/pack/paerror: failed to run repack


[Yes, the output of the last line is actually garbled like that with pack being overwritten by error into "paerror"]

Portage 2.2_rc40 (default/linux/amd64/2008.0/desktop, gcc-4.4.1, glibc-2.10.1-r0, 2.6.30-gentoo-r1 x86_64)
=================================================================                                         
System uname: Linux-2.6.30-gentoo-r1-x86_64-AMD_Phenom-tm-_9950_Quad-Core_Processor-with-gentoo-2.0.1     
Timestamp of tree: Unknown                                                                                
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p33
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.5.4-r2, 2.6.2-r1, 3.1.1
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.1
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/4.3/env /usr/kde/4.3/share/config /usr/kde/4.3/shutdown /usr/kde/4.4/env /usr/kde/4.4/share/config /usr/kde/4.4/shutdown /usr/kde/live/env /usr/kde/live/share/config /usr/kde/live/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildpkg ccache collision-protect distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/home/me/code/gentoo-x86/"
PORTDIR_OVERLAY="/usr/local/portage/layman/java-overlay /home/me/code/kde"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdio cdparanoia cdr cli cracklib crypt cups curl dbus dga dri dts dv dvd dvdr eds emboss encode evo fam firefox flac fortran ftp gdbm ggi gif gpm iconv ipv6 isdnlog jack jpeg jpeg2k kde kdeenablefinal kdeprefix kpathsea ladspa libnotify lzo mad md5sum mikmod mmx mmxext mng mp2 mp3 mp4 mpeg mudflap multilib musepack nas ncurses nls nptl nptlonly objc ogg openal opengl openmp pam pcre pdf perl png pnm ppds pppd python qt3 qt3support qt4 quicktime rar readline reflection rtc sasl sdl session slang speex spell spl sqlite sse sse2 ssl startup-notification svg sysfs tcpd tga theora thunar tiff truetype unicode usb vorbis webkit x264 xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vga radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-09-20 20:51:38 UTC
1. What version of git?
2. When is the last time it worked properly?
3. If you do a fresh clone is it ok?
Comment 2 Patrick Lauer gentoo-dev 2009-09-20 20:54:47 UTC
1) git version 1.6.5.rc1 currently installed, but it has existed for at least the two previous version bumps.

2) The problem is transient, but reproducable. The next commit or pull will most likely make it disappear, but until then I can trigger it every time with git repack

3) Haven't tried yet. Will do next time it implodes.
Comment 3 Patrick Lauer gentoo-dev 2009-09-27 08:34:53 UTC
(In reply to comment #1)
> 3. If you do a fresh clone is it ok?
> 
Just was able to reproduce it. New clone is ok, old checkout reliably triggers segfaults
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-09-29 19:23:52 UTC
I'm suspecting that there is corruption in your old pack, since you couldn't reproduce with a fresh clone per my testcase.
Comment 5 Kelvie Wong 2009-10-16 03:03:36 UTC
I actually get this too, fairly regularly (with my git checkouts of the KDE svn repositories).

It doesn't happen all the time, either, and I've upgraded git various times.  It happens in more than one repository, as well, and my backtrace is similar.