* fatal: unexpected EOF @ 2006-02-28 13:02 Brian Gerst 2006-02-28 15:34 ` Linus Torvalds 0 siblings, 1 reply; 5+ messages in thread From: Brian Gerst @ 2006-02-28 13:02 UTC (permalink / raw) To: Git Mailing List Lately I've been receiving this error frequently from git.kernel.org: Fetching pack (head and objects)... fatal: unexpected EOF cg-fetch: fetching pack failed What is causing this? -- Brian Gerst ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fatal: unexpected EOF 2006-02-28 13:02 fatal: unexpected EOF Brian Gerst @ 2006-02-28 15:34 ` Linus Torvalds 2006-02-28 15:43 ` Brian Gerst 0 siblings, 1 reply; 5+ messages in thread From: Linus Torvalds @ 2006-02-28 15:34 UTC (permalink / raw) To: Brian Gerst; +Cc: Git Mailing List On Tue, 28 Feb 2006, Brian Gerst wrote: > > Lately I've been receiving this error frequently from git.kernel.org: > > Fetching pack (head and objects)... > fatal: unexpected EOF > cg-fetch: fetching pack failed > > What is causing this? Almost any error will cause the pack sending to abort, and the git:// protocol only opens a single socket for data, so there is no way for the other end to say _what_ failed. With git.kernel.org, I suspect the reason for the failure is almost always the same, though: the mirroring is not complete, so it doesn't have all object files. The mirroring from master.kernel.org to the actual public machines is just a rsync script, so there's no atomicity guarantees. That said, it might be a load issue too - I don't know what limits Peter & co put on the git daemons, and it might also be that it's set up to accept at most <n> connections and will close anything else. Linus ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fatal: unexpected EOF 2006-02-28 15:34 ` Linus Torvalds @ 2006-02-28 15:43 ` Brian Gerst 2006-02-28 15:59 ` Tony Luck 0 siblings, 1 reply; 5+ messages in thread From: Brian Gerst @ 2006-02-28 15:43 UTC (permalink / raw) To: Linus Torvalds; +Cc: Git Mailing List Linus Torvalds wrote: > > On Tue, 28 Feb 2006, Brian Gerst wrote: > >>Lately I've been receiving this error frequently from git.kernel.org: >> >>Fetching pack (head and objects)... >>fatal: unexpected EOF >>cg-fetch: fetching pack failed >> >>What is causing this? > > > Almost any error will cause the pack sending to abort, and the git:// > protocol only opens a single socket for data, so there is no way for the > other end to say _what_ failed. > > With git.kernel.org, I suspect the reason for the failure is almost always > the same, though: the mirroring is not complete, so it doesn't have all > object files. The mirroring from master.kernel.org to the actual public > machines is just a rsync script, so there's no atomicity guarantees. > > That said, it might be a load issue too - I don't know what limits > Peter & co put on the git daemons, and it might also be that it's set up > to accept at most <n> connections and will close anything else. > > Linus > > I doubt it is a problem with mirroring, since it affects all repos (kernel, git, cogito, etc.) at the same time. -- Brian Gerst ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fatal: unexpected EOF 2006-02-28 15:43 ` Brian Gerst @ 2006-02-28 15:59 ` Tony Luck 2006-03-02 22:23 ` Alex Riesen 0 siblings, 1 reply; 5+ messages in thread From: Tony Luck @ 2006-02-28 15:59 UTC (permalink / raw) To: Brian Gerst; +Cc: Linus Torvalds, Git Mailing List > I doubt it is a problem with mirroring, since it affects all repos > (kernel, git, cogito, etc.) at the same time. Ditto. Jes has been grumbling overnight that he can't get a reliable pull from my kernel repo ... and that hasn't been updated in 10 days, so the mirror code shouldn't be touching it. His error was: fatal: read error (Connection reset by peer) Fetch failure: git://git.kernel.org/pub/... He also reported that after a few retries it worked. Does the git daemon log any errors to syslog on the server? If so, can someone with access go take a look. -Tony ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fatal: unexpected EOF 2006-02-28 15:59 ` Tony Luck @ 2006-03-02 22:23 ` Alex Riesen 0 siblings, 0 replies; 5+ messages in thread From: Alex Riesen @ 2006-03-02 22:23 UTC (permalink / raw) To: Tony Luck; +Cc: Brian Gerst, Linus Torvalds, Git Mailing List, Junio C Hamano Tony Luck, Tue, Feb 28, 2006 16:59:09 +0100: > > I doubt it is a problem with mirroring, since it affects all repos > > (kernel, git, cogito, etc.) at the same time. > > Ditto. Jes has been grumbling overnight that he can't get a reliable pull > from my kernel repo ... and that hasn't been updated in 10 days, so the > mirror code shouldn't be touching it. His error was: > > fatal: read error (Connection reset by peer) > Fetch failure: git://git.kernel.org/pub/... > > He also reported that after a few retries it worked. I had the problems too and even made the patch (below) to see what it was. I saw to A-records for zeus-pub.kernel.org (git.kernel.org is an alias of it) where one of them (I believe it was 204.152.191.37) sometimes didn't answer or dropped connection. --- connect.c | 41 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 39 insertions(+), 2 deletions(-) b5ceb5f3f1c6ff62a3ccb13f360a34b07b9c8482 diff --git a/connect.c b/connect.c index 3f2d65c..e911fde 100644 --- a/connect.c +++ b/connect.c @@ -322,6 +322,23 @@ static enum protocol get_protocol(const #ifndef NO_IPV6 +static const char *ai_name(const struct addrinfo *ai) +{ + static char addr[INET_ADDRSTRLEN]; + if ( AF_INET == ai->ai_family ) { + struct sockaddr_in *in; + in = (struct sockaddr_in *)ai->ai_addr; + inet_ntop(ai->ai_family, &in->sin_addr, addr, sizeof(addr)); + } else if ( AF_INET6 == ai->ai_family ) { + struct sockaddr_in6 *in; + in = (struct sockaddr_in6 *)ai->ai_addr; + inet_ntop(ai->ai_family, &in->sin6_addr, addr, sizeof(addr)); + } else { + strcpy(addr, "(unknown)"); + } + return addr; +} + static int git_tcp_connect(int fd[2], const char *prog, char *host, char *path) { int sockfd = -1; @@ -329,6 +346,7 @@ static int git_tcp_connect(int fd[2], co char *port = STR(DEFAULT_GIT_PORT); struct addrinfo hints, *ai0, *ai; int gai; + int cnt = 0; if (host[0] == '[') { end = strchr(host + 1, ']'); @@ -355,15 +373,23 @@ static int git_tcp_connect(int fd[2], co if (gai) die("Unable to look up %s (%s)", host, gai_strerror(gai)); - for (ai0 = ai; ai; ai = ai->ai_next) { + for (ai0 = ai; ai; ++cnt, ai = ai->ai_next) { sockfd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if (sockfd < 0) continue; if (connect(sockfd, ai->ai_addr, ai->ai_addrlen) < 0) { + fprintf(stderr, "%s: %s[%d: %s]: net=%s, errno=%s\n", + argv0, + host, + cnt, + ai_name(ai), + hstrerror(h_errno), + strerror(errno)); close(sockfd); sockfd = -1; continue; } + fprintf(stderr, "using %s[%s]\n", host, ai_name(ai)); break; } @@ -389,6 +415,7 @@ static int git_tcp_connect(int fd[2], co struct sockaddr_in sa; char **ap; unsigned int nport; + int cnt; if (host[0] == '[') { end = strchr(host + 1, ']'); @@ -420,7 +447,7 @@ static int git_tcp_connect(int fd[2], co nport = se->s_port; } - for (ap = he->h_addr_list; *ap; ap++) { + for (cnt = 0, ap = he->h_addr_list; *ap; ap++, cnt++) { sockfd = socket(he->h_addrtype, SOCK_STREAM, 0); if (sockfd < 0) continue; @@ -431,10 +458,20 @@ static int git_tcp_connect(int fd[2], co memcpy(&sa.sin_addr, *ap, he->h_length); if (connect(sockfd, (struct sockaddr *)&sa, sizeof sa) < 0) { + fprintf(stderr, "%s: %s[%d: %s]: net=%s, errno=%s\n", + argv0, + host, + cnt, + inet_ntoa(*(struct in_addr *)&sa.sin_addr), + hstrerror(h_errno), + strerror(errno)); close(sockfd); sockfd = -1; continue; } + fprintf(stderr, "using %s[%s]\n", + host, + inet_ntoa(*(struct in_addr *)&sa.sin_addr)); break; } -- 1.2.3.g3987 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-03-02 22:24 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-02-28 13:02 fatal: unexpected EOF Brian Gerst 2006-02-28 15:34 ` Linus Torvalds 2006-02-28 15:43 ` Brian Gerst 2006-02-28 15:59 ` Tony Luck 2006-03-02 22:23 ` Alex Riesen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).