git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git clone over smart-http hanging for just one repo.

From
BCBrady Catherman <brady@catherman.org>
Date
Mar 22, 2010, 06:52 UTC
Message-ID
<51569EE6-A926-45DB-A588-B659750BA643@catherman.org>

I have a git repo that fails to clone or fetch over smart-http, but works great over dav. I am wondering if somebody can help me debug the issue since I am at a loss why this is happening.

Just for clarification, I have several dozen repos in a directory, almost all others work without issue, but one of them is messed up. Replacing it with a different repo works so the error has to be somewhere in the git files themselves. Cloning the repo via DAV works and git fsck reports no problems with the repo.

This is all on git 1.7.0.1 on a Linux machine.

The interesting parts of a strace of git-http-backend following a git clone follow:

12037 execve("/usr/libexec/git-core/git-http-backend.real", ["/usr/ 
libexec/git-core/git-http-backend.real"], [/* 33 vars */]) = 0
... various library loads and such ...
12037 access("/usr/local/git/gitrepo", F_OK) = 0
12037 chdir("/usr/local/git/gitrepo")  = 0
12037 access("objects", X_OK)           = 0
12037 access("refs", X_OK)              = 0
12037 lstat("HEAD", {st_mode=S_IFREG|0644, st_size=23, ...}) = 0
12037 open("HEAD", O_RDONLY)            = 3
12037 read(3, "ref: refs/heads/master\n", 255) = 23
12037 access("/usr/local/etc/gitconfig", R_OK) = -1 ENOENT (No such  
file or directory)
12037 access("./config", R_OK)          = 0
12037 open("./config", O_RDONLY)        = 3
12037 read(3, "[core]\n\trepositoryformatversion = 0\n\tfilemode = true 
\n\tbare = true\n\tlogallrefupdates = true\n\tsharedRepository = true 
\n", 4096) = 116
12037 read(3, "", 4096)                 = 0
12037 close(3)                          = 0
12037 munmap(0x2aaaaaaac000, 4096)      = 0
12037 write(1, "Expires: Fri, 01 Jan 1980 00:00:00 GMT\r\n", 40) = 40
12037 write(1, "Pragma: no-cache\r\n", 18) = 18
12037 write(1, "Cache-Control: no-cache, max-age=0, must-revalidate\r 
\n", 53) = 53
12037 write(1, "Content-Type: application/x-git-upload-pack-result\r 
\n", 52) = 52
12037 write(1, "\r\n", 2)               = 2
12037 pipe([3, 4])                      = 0
12037 pipe([3, 4])                      = 012037 pipe([5,  
6])                      = 0
12037 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID| 
CLONE_CHILD_SETTID|SIGCHLD
, child_tidptr=0x2aaaaae12c20) = 12038
12038 close(5 <unfinished ...>
12037 close(6)                          = 0
12037 read(5,  <unfinished ...>
12038 <... close resumed> )             = 0
12038 fcntl(6, F_GETFD)                 = 0
12038 fcntl(6, F_SETFD, FD_CLOEXEC)     = 012038 dup2(3,  
0)                        = 0
12038 close(3)                          = 012038  
close(4)                          = 0
12038 execve("/usr/local/libexec/git-core/git", ["git", "upload-pack",  
"--stateless-rpc", "."], [/* 36 vars */]) = -1 ENOENT (No such file or  
directory)
12038 execve("/usr/libexec/git-core/git", ["git", "upload-pack", "-- 
stateless-rp
c", "."], [/* 36 vars */] <unfinished ...>
12037 <... read resumed> "", 1)         = 0
12037 <... read resumed> "", 1)         = 012037  
close(5)                          = 0
12037 close(3)                          = 012038 <... execve  
resumed> )            = 0
12037 close(1)                          = 0
... More random library loads ...
12038 pipe([3, 4])                      = 0
12038 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID| 
CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2aaaaae12c40) = 12039
12039 close(3)                          = 0
12039 fcntl(4, F_GETFD)                 = 0
12039 fcntl(4, F_SETFD, FD_CLOEXEC)     = 0
12039 execve("/usr/libexec/git-core/git-upload-pack", ["git-upload- 
pack", "--stateless-rpc", "."], [/* 36 vars */] <unfinished ...>
12038 close(4)                          = 0
12037 read(0, "0067want c83f5a4ec9fb6b6681e74dc3c2276de5b947a76c  
multi_ack_detailed side-band-64k thin-pack ofs-delta\n0032want  
92e9b73bbd59b5ecf711381716c8aa13948f5a5d\n0032want
.. clipped out lots of sha's ..
98040a8100513ad2852ca911ac330ebd4ff9e10d\n00000009done\n", 8192) = 2316
12039 <... execve resumed> )            = 0
12038 <... read resumed> "", 1)         = 0
12038 close(3)                          = 0
12039 brk(0 <unfinished ...>
12038 wait4(12039,  <unfinished ...>
12039 <... brk resumed> )               = 0xf9d1000
12037 write(1, "Status: 500 Internal Server Error\r\n", 35  
<unfinished ...>
12039 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| 
MAP_ANONYMOUS, -1, 0 <unfinished ...>
12037 <... write resumed> )             = -1 EBADF (Bad file descriptor)
12039 <... mmap resumed> )              = 0x2aaaaaaab000
... This repeats for a while.. spitting out 500's on a bad file  
descriptor...
12037 write(1, "Status: 500 Internal Server Error\r\n", 35) = -1 EBADF  
(Bad file descriptor)
... Eventually this just repeats a few thousand times ...
12037 write(1, "Status: 500 Internal Server Error\r\n", 35) = -1 EBADF  
(Bad file descriptor)
12037 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
12037 +++ killed by SIGSEGV +++
12039 <... read resumed> "", 4)         = 0
12039 write(2, "fatal: The remote end hung up unexpectedly\n", 43) = 43
12039 exit_group(128)                   = ?
12038 <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 128}],  
0, NULL) = 12039
12038 --- SIGCHLD (Child exited) @ 0 (0) ---
12038 exit_group(128)                   = ?

Anybody have any thoughts why this would happen or what can be done to fix it?

Next: Shawn O. Pearce
Message 1 of 9 in “git clone over smart-http hanging for just one repo.”
  1. Brady CathermanMar 22, 2010
  2. Shawn O. PearceMar 22, 2010
  3. http-backend: Don't infinite loop during die()Shawn O. Pearce, Mar 22, 2010
  4. Junio C HamanoMar 22, 2010
  5. Junio C HamanoMar 24, 2010
  6. Shawn O. PearceMar 24, 2010
  7. Nicolas PitreMar 24, 2010
  8. Shawn PearceMar 24, 2010
  9. Junio C HamanoMar 24, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.