{"thread":{"id":"2739","subject":"git-update-server-info crashes on hera.kernel.org:/pub/scm/libs/klibc/klibc.git","startedAt":"2005-12-03T22:35:26Z","lastAt":"2005-12-04T07:12:02Z","messageCount":5,"participants":["H. Peter Anvin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"13160","messageId":"43921DAE.7060606@zytor.com","threadId":"2739","inReplyTo":null,"subject":"git-update-server-info crashes on hera.kernel.org:/pub/scm/libs/klibc/klibc.git","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-12-03T22:35:26Z","receivedAt":"2005-12-03T22:35:26Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"git-core-0.99.9j-1, and the backtrace is as follows:\n\n: hera 29 ; ls -l /usr/lib/debug/usr/bin/git-update-\ngit-update-index.debug*       git-update-ref.debug* \ngit-update-server-info.debug*\n: hera 29 ; gdb -s /usr/lib/debug/usr/bin/git-update-server-info.debug \n/usr/bin/git-update-server-info\nGNU gdb Red Hat Linux (6.3.0.0-1.63rh)\nCopyright 2004 Free Software Foundation, Inc.\nGDB is free software, covered by the GNU General Public License, and you are\nwelcome to change it and/or distribute copies of it under certain \nconditions.\nType \"show copying\" to see the conditions.\nThere is absolutely no warranty for GDB.  Type \"show warranty\" for details.\nThis GDB was configured as \"i386-redhat-linux-gnu\"...Using host \nlibthread_db library \"/lib/tls/libthread_db.so.1\".\n\n(gdb) run\nStarting program: /usr/bin/git-update-server-info\n\nProgram received signal SIGSEGV, Segmentation fault.\n0x0804c04c in nth_packed_object_sha1 (p=0x986a1f0, n=0, sha1=0xbfffc9f0 \n\"\") at sha1_file.c:1017\n1017            memcpy(sha1, (index + 24 * n + 4), 20);\n(gdb) where\n#0  0x0804c04c in nth_packed_object_sha1 (p=0x986a1f0, n=0, \nsha1=0xbfffc9f0 \"\") at sha1_file.c:1017\n#1  0x08049a61 in update_server_info (force=0) at server-info.c:248\n#2  0x08049466 in main (ac=1, av=0xbfffeed4) at update-server-info.c:22\n#3  0x00ce1e23 in __libc_start_main () from /lib/tls/libc.so.6\n#4  0x080493a1 in _start ()\n\n\t-hpa\n"},{"id":"13166","messageId":"7vzmnhtmi1.fsf@assigned-by-dhcp.cox.net","threadId":"2739","inReplyTo":"43921DAE.7060606@zytor.com","subject":"Re: git-update-server-info crashes on hera.kernel.org:/pub/scm/libs/klibc/klibc.git","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-04T06:16:54Z","receivedAt":"2005-12-04T06:16:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I made a copy of that repository on hera and tried it but cannot\nreproduce (with or without -f flag -- and running under gdb with\nsymbols did not make difference either).  Sorry, I am baffled.\nThe same machine, the same set of input and binary.\n\njunio@hera:~/t(0)$ echo $PATH\n/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin\njunio@hera:~/t(0)$ (cd /pub/scm/libs/klibc/ && tar cf - klibc.git ) | tar xf -\njunio@hera:~/t(0)$ head -n 4 klibc.git/objects/info/packs\nP pack-122eb314270865bdaaded7d02c7340014537abbf.pack\nD 0\nT 0 005146812e1e36309409128e0bbaf86e6745a637 tag\nT 0 00aea41acad6d139679416a79ff9139a50b5001c tag\njunio@hera:~/t(0)$ GIT_DIR=klibc.git /usr/bin/git-update-server-info ; echo $?\n0\njunio@hera:~/t(0)$ head -n 4 klibc.git/objects/info/packs\nP pack-1433c87e76496ad3f628652c0cb81d288c178fc5.pack\nP pack-f9db0b232716d835858232fbecfb410d22ae5afb.pack\nD 0\njunio@hera:~/t(0)$ rm -fr klibc.git\njunio@hera:~/t(0)$ (cd /pub/scm/libs/klibc/ && tar cf - klibc.git ) | tar xf -  junio@hera:~/t(0)$ head -n 4 klibc.git/objects/info/packs\nP pack-122eb314270865bdaaded7d02c7340014537abbf.pack\nD 0\nT 0 005146812e1e36309409128e0bbaf86e6745a637 tag\nT 0 00aea41acad6d139679416a79ff9139a50b5001c tag\njunio@hera:~/t(0)$ GIT_DIR=klibc.git /usr/bin/git-update-server-info -f; echo $?\n0\njunio@hera:~/t(0)$ head -n 4 klibc.git/objects/info/packs\nP pack-122eb314270865bdaaded7d02c7340014537abbf.pack\nP pack-1433c87e76496ad3f628652c0cb81d288c178fc5.pack\nP pack-f9db0b232716d835858232fbecfb410d22ae5afb.pack\nD 0\njunio@hera:~/t(0)$ exit\n"},{"id":"13171","messageId":"43928C39.8050105@zytor.com","threadId":"2739","inReplyTo":"7vzmnhtmi1.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-update-server-info crashes on hera.kernel.org:/pub/scm/libs/klibc/klibc.git","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-12-04T06:27:05Z","receivedAt":"2005-12-04T06:27:05Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Junio C Hamano wrote:\n> I made a copy of that repository on hera and tried it but cannot\n> reproduce (with or without -f flag -- and running under gdb with\n> symbols did not make difference either).  Sorry, I am baffled.\n> The same machine, the same set of input and binary.\n> \n\nFWIW, I invoked this as:\n\nhpa@hera:~(0)$ GIT_DIR=/pub/scm/libs/klibc/klibc.git git-update-server-info\nSegmentation fault\n\n\t-hpa\n"},{"id":"13172","messageId":"7v64q5tkhi.fsf@assigned-by-dhcp.cox.net","threadId":"2739","inReplyTo":"43928C39.8050105@zytor.com","subject":"Re: git-update-server-info crashes on hera.kernel.org:/pub/scm/libs/klibc/klibc.git","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-04T07:00:25Z","receivedAt":"2005-12-04T07:00:25Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"H. Peter Anvin\" <hpa@zytor.com> writes:\n\n> FWIW, I invoked this as:\n>\n> hpa@hera:~(0)$ GIT_DIR=/pub/scm/libs/klibc/klibc.git git-update-server-info\n> Segmentation fault\n\nTrusting that I *won't* be able to write into that repository, I\ntried to run that and after getting an error (\"cannot update\ninfo/refs file\", which I wanted to see) I seem to be getting the\nsame segfault.  GDB session reveals the binary is heavily\noptimized or inlined, so it is hard to see what it is doing\nthough.\n\nBut there is one thing that is mysterious about your repository,\nand by mirroring that peculiarity with the copy in my home\ndirectory, I managed to reproduce the problem with my copy.  Why\ndoes the objects/info/alternates in that repository point at\nitself?  I suspect if you remove that file you will be OK.\n\nupdate-server-info simply dying, instead of complaining about\nit, is a bug nevertheless, and removal of the\nunnecessary/possibly wrong alternate is only a workaround, but I\nhope that would unblock you in the meantime..\n"},{"id":"13173","messageId":"439296C2.8020809@zytor.com","threadId":"2739","inReplyTo":"7v64q5tkhi.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-update-server-info crashes on hera.kernel.org:/pub/scm/libs/klibc/klibc.git","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-12-04T07:12:02Z","receivedAt":"2005-12-04T07:12:02Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Junio C Hamano wrote:\n> \"H. Peter Anvin\" <hpa@zytor.com> writes:\n> \n> \n>>FWIW, I invoked this as:\n>>\n>>hpa@hera:~(0)$ GIT_DIR=/pub/scm/libs/klibc/klibc.git git-update-server-info\n>>Segmentation fault\n> \n> \n> Trusting that I *won't* be able to write into that repository, I\n> tried to run that and after getting an error (\"cannot update\n> info/refs file\", which I wanted to see) I seem to be getting the\n> same segfault.  GDB session reveals the binary is heavily\n> optimized or inlined, so it is hard to see what it is doing\n> though.\n> \n> But there is one thing that is mysterious about your repository,\n> and by mirroring that peculiarity with the copy in my home\n> directory, I managed to reproduce the problem with my copy.  Why\n> does the objects/info/alternates in that repository point at\n> itself?  I suspect if you remove that file you will be OK.\n> \n> update-server-info simply dying, instead of complaining about\n> it, is a bug nevertheless, and removal of the\n> unnecessary/possibly wrong alternate is only a workaround, but I\n> hope that would unblock you in the meantime..\n> \n\nRemoving that file did indeed work.  I have no idea where it comes from, \nthough; although I would guess it comes from another repository that I \nmerged with (which had my original repository set as an alternate.)\n\n\t-hpa\n"}]}