{"thread":{"id":"3085","subject":"gitweb on kernel.org broken","startedAt":"2006-01-16T18:44:35Z","lastAt":"2006-01-16T20:28:53Z","messageCount":5,"participants":["H. Peter Anvin","Kay Sievers","Junio C Hamano","Greg KH"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14736","messageId":"43CBE993.9060701@zytor.com","threadId":"3085","inReplyTo":null,"subject":"gitweb on kernel.org broken","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2006-01-16T18:44:35Z","receivedAt":"2006-01-16T18:44:35Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"It seems that gitweb throws an error every time.  This means that \nnothing gets cached, and therefore the load on the kernel.org machines \nis driven into the high double digits:\n\n[Mon Jan 16 10:42:01 2006] [error] [client 82.181.110.11] [Mon Jan 16 \n10:42:01 2006] index.cgi: Use of uninitialized value in scalar \nassignment at /home/httpd/html/git/index.cgi line 411.\n[Mon Jan 16 10:42:03 2006] [error] [client 82.181.110.11] fatal: Not a \ngit repository: '/pub/scm/linux/hotplug/hotplug-ng.git'\n[Mon Jan 16 10:42:03 2006] [error] [client 82.181.110.11] [Mon Jan 16 \n10:42:03 2006] index.cgi: Use of uninitialized value in scalar chomp at \n/home/httpd/html/git/index.cgi line 406.\n[Mon Jan 16 10:42:03 2006] [error] [client 82.181.110.11] [Mon Jan 16 \n10:42:03 2006] index.cgi: Use of uninitialized value in pattern match \n(m//) at /home/httpd/html/git/index.cgi line 407.\n\nThis is all very bad...\n\n\t-hpa\n"},{"id":"14737","messageId":"20060116185342.GA14088@vrfy.org","threadId":"3085","inReplyTo":"43CBE993.9060701@zytor.com","subject":"Re: gitweb on kernel.org broken","fromName":"Kay Sievers","fromEmail":"kay.sievers@vrfy.org","sentAt":"2006-01-16T18:53:42Z","receivedAt":"2006-01-16T18:53:42Z","isPatch":false,"sender":{"key":"kay.sievers@vrfy.org","avatar":null},"body":"On Mon, Jan 16, 2006 at 10:44:35AM -0800, H. Peter Anvin wrote:\n> It seems that gitweb throws an error every time.  This means that \n> nothing gets cached, and therefore the load on the kernel.org machines \n> is driven into the high double digits:\n> \n> [Mon Jan 16 10:42:01 2006] [error] [client 82.181.110.11] [Mon Jan 16 \n> 10:42:01 2006] index.cgi: Use of uninitialized value in scalar \n> assignment at /home/httpd/html/git/index.cgi line 411.\n> [Mon Jan 16 10:42:03 2006] [error] [client 82.181.110.11] fatal: Not a \n> git repository: '/pub/scm/linux/hotplug/hotplug-ng.git'\n> [Mon Jan 16 10:42:03 2006] [error] [client 82.181.110.11] [Mon Jan 16 \n> 10:42:03 2006] index.cgi: Use of uninitialized value in scalar chomp at \n> /home/httpd/html/git/index.cgi line 406.\n> [Mon Jan 16 10:42:03 2006] [error] [client 82.181.110.11] [Mon Jan 16 \n> 10:42:03 2006] index.cgi: Use of uninitialized value in pattern match \n> (m//) at /home/httpd/html/git/index.cgi line 407.\n> \n> This is all very bad...\n\nJunio, seems your \"textual symref HEAD\" change is causing this?\n  http://www.kernel.org/git/?p=git/gitweb.git;a=blob;hb=HEAD;f=gitweb.cgi#l399\n\nThanks,\nKay\n"},{"id":"14739","messageId":"20060116190556.GA14184@vrfy.org","threadId":"3085","inReplyTo":"20060116185342.GA14088@vrfy.org","subject":"Re: gitweb on kernel.org broken","fromName":"Kay Sievers","fromEmail":"kay.sievers@vrfy.org","sentAt":"2006-01-16T19:05:56Z","receivedAt":"2006-01-16T19:05:56Z","isPatch":false,"sender":{"key":"kay.sievers@vrfy.org","avatar":null},"body":"On Mon, Jan 16, 2006 at 07:53:42PM +0100, Kay Sievers wrote:\n> On Mon, Jan 16, 2006 at 10:44:35AM -0800, H. Peter Anvin wrote:\n> > It seems that gitweb throws an error every time.  This means that \n> > nothing gets cached, and therefore the load on the kernel.org machines \n> > is driven into the high double digits:\n> > \n> > [Mon Jan 16 10:42:01 2006] [error] [client 82.181.110.11] [Mon Jan 16 \n> > 10:42:01 2006] index.cgi: Use of uninitialized value in scalar \n> > assignment at /home/httpd/html/git/index.cgi line 411.\n> > [Mon Jan 16 10:42:03 2006] [error] [client 82.181.110.11] fatal: Not a \n> > git repository: '/pub/scm/linux/hotplug/hotplug-ng.git'\n> > [Mon Jan 16 10:42:03 2006] [error] [client 82.181.110.11] [Mon Jan 16 \n> > 10:42:03 2006] index.cgi: Use of uninitialized value in scalar chomp at \n> > /home/httpd/html/git/index.cgi line 406.\n> > [Mon Jan 16 10:42:03 2006] [error] [client 82.181.110.11] [Mon Jan 16 \n> > 10:42:03 2006] index.cgi: Use of uninitialized value in pattern match \n> > (m//) at /home/httpd/html/git/index.cgi line 407.\n> > \n> > This is all very bad...\n> \n> Junio, seems your \"textual symref HEAD\" change is causing this?\n>   http://www.kernel.org/git/?p=git/gitweb.git;a=blob;hb=HEAD;f=gitweb.cgi#l399\n\nI've comment \"strict\" and \"warnings\" out, until it's fixed proper.\n\nKay\n"},{"id":"14743","messageId":"7vwth0rlfm.fsf@assigned-by-dhcp.cox.net","threadId":"3085","inReplyTo":"20060116190556.GA14184@vrfy.org","subject":"Re: gitweb on kernel.org broken","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-16T20:02:05Z","receivedAt":"2006-01-16T20:02:05Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kay Sievers <kay.sievers@vrfy.org> writes:\n\n>> Junio, seems your \"textual symref HEAD\" change is causing this?\n\nYeah, I assumed git_read_head() is called only on a repository\nthat was verified to be valid, and the subroutine did not check\nthe case where HEAD does not verify.  My bad.  The attached\npatch should solve this.\n\nThe error log says hotplug-ng.git is triggering it.  I wonder what\nis so special about that repository.  I hope it is transient\nduring mirroring that mirrored HEAD before objects, not a\ncorrupt repository at the mirroring source.\n\n\t... goes to kernel.org mirroring source machine ...\n\nUgh.  It is _not_ a valid git repository.  HEAD should be either a symlink\nor a symref pointing somewhere under refs/heads/, but in that\ndirectory, it instead is a regular file that contains an object\nname.  There is nothing under refs/ either:\n\n        $ ls -l /pub/scm/linux/hotplug/hotplug-ng.git/HEAD\n        -rw-r--r--  2 gregkh users 41 May  6  2005 /pub/s...ug-ng.git/HEAD\n\t$ cat /pub/scm/linux/hotplug/hotplug-ng.git/HEAD\n        b26bec9f620a969fe5238e8666ab698f197df488\n\t$ ls -l /pub/scm/linux/hotplug/hotplug-ng.git/refs\n\ttotal 0\n\t$ exit\n\nGreg, could you let me know what is going on with this\nrepository, please?\n\nFirst of all, I am wondering if this repository is still used\n(maintained); a regular file HEAD that contains an object name\nwould have stopped working on Aug 27 2005 with this commit at the\nlatest, maybe even before that:\n\n    diff-tree 5f5608b... (from 9740d28...\n    Author: Linus Torvalds <torvalds@osdl.org>\n    Date:   Sat Aug 27 13:54:42 2005 -0700\n\n    [PATCH] Make .git directory validation code test HEAD\n\n    Inspired by a report by Kalle Valo, this changes git-sh-setup-script and\n    the \"setup_git_directory()\" function to test that $GIT_DIR/HEAD is a\n    symlink, since a number of core git features depend on that these days.\n    ...\n\nThe way I expected to see that part of the directory laid out in\na valid git repository would be:\n\n\t$ cd /pub/scm/linux/hotplug/hotplug-ng.git/\n\t$ mkdir -p refs/heads\n\t$ cat HEAD >refs/heads/master\n\t$ rm -f HEAD\n\t$ ln -s refs/heads/master HEAD\n\nAnyhow, here is a gitweb patch to skip this.\n\n---\ndiff --git a/gitweb.cgi b/gitweb.cgi\nindex 986d7da..f3853e7 100755\n--- a/gitweb.cgi\n+++ b/gitweb.cgi\n@@ -404,9 +404,8 @@ sub git_read_head {\n \tif (open my $fd, \"-|\", \"$gitbin/git-rev-parse\", \"--verify\", \"HEAD\") {\n \t\tmy $head = <$fd>;\n \t\tclose $fd;\n-\t\tchomp $head;\n-\t\tif ($head =~ m/^[0-9a-fA-F]{40}$/) {\n-\t\t\t$retval = $head;\n+\t\tif (defined $head && $head =~ /^([0-9a-fA-F]{40})$/) {\n+\t\t\t$retval = $1;\n \t\t}\n \t}\n \t$ENV{'GIT_DIR'} = $oENV;\n"},{"id":"14745","messageId":"20060116202853.GA5676@kroah.com","threadId":"3085","inReplyTo":"7vwth0rlfm.fsf@assigned-by-dhcp.cox.net","subject":"Re: gitweb on kernel.org broken","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2006-01-16T20:28:53Z","receivedAt":"2006-01-16T20:28:53Z","isPatch":false,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"On Mon, Jan 16, 2006 at 12:02:05PM -0800, Junio C Hamano wrote:\n> Kay Sievers <kay.sievers@vrfy.org> writes:\n> \n> >> Junio, seems your \"textual symref HEAD\" change is causing this?\n> \n> Yeah, I assumed git_read_head() is called only on a repository\n> that was verified to be valid, and the subroutine did not check\n> the case where HEAD does not verify.  My bad.  The attached\n> patch should solve this.\n> \n> The error log says hotplug-ng.git is triggering it.  I wonder what\n> is so special about that repository.  I hope it is transient\n> during mirroring that mirrored HEAD before objects, not a\n> corrupt repository at the mirroring source.\n> \n> \t... goes to kernel.org mirroring source machine ...\n> \n> Ugh.  It is _not_ a valid git repository.  HEAD should be either a symlink\n> or a symref pointing somewhere under refs/heads/, but in that\n> directory, it instead is a regular file that contains an object\n> name.  There is nothing under refs/ either:\n> \n>         $ ls -l /pub/scm/linux/hotplug/hotplug-ng.git/HEAD\n>         -rw-r--r--  2 gregkh users 41 May  6  2005 /pub/s...ug-ng.git/HEAD\n> \t$ cat /pub/scm/linux/hotplug/hotplug-ng.git/HEAD\n>         b26bec9f620a969fe5238e8666ab698f197df488\n> \t$ ls -l /pub/scm/linux/hotplug/hotplug-ng.git/refs\n> \ttotal 0\n> \t$ exit\n> \n> Greg, could you let me know what is going on with this\n> repository, please?\n> \n> First of all, I am wondering if this repository is still used\n> (maintained); a regular file HEAD that contains an object name\n> would have stopped working on Aug 27 2005 with this commit at the\n> latest, maybe even before that:\n\nThat's a very old git tree, and the development tree is pretty much dead\ntoo.  I'll just go delete the thing.\n\nSorry about that.\n\ngreg k-h\n"}]}