git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-daemon problem
@ 2006-07-11 22:24 Matthias Lederhofer
  2006-07-11 23:04 ` Junio C Hamano
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Matthias Lederhofer @ 2006-07-11 22:24 UTC (permalink / raw)
  To: git

A few weeks ago upgrading from 1.3.x to 1.4.1 I had a problem with
git-daemon.  I started git-daemon on a terminal but did not redirect
stdin/stdout/stderr to /dev/null (actually using daemon(8) on freebsd
without -f but just disowning the process and closing the terminal
works fine too, nothing freebsd/daemon(8) specific).  After closing
the terminal I was not able to use the git-daemon anymore with some
versions of the git. So now I took some time and tried to find what
was the reason for that.

It seems to be related to the client version too (git without version
appendix is the current next (028cfcba78c3e4).

583b7ea31b7c16~1 (last good):
$ git clone git://host:9419/foo
$ git1.3.2 clone git://host:9419/foo.git
(cloned successfully, both no output)

583b7ea31b7c16 (first bad):
$ git clone git://host:9420/foo
Generating pack...
Done counting 6 objects.
Deltifying 6 objects.
 100% (6/6) done
 Total 6, written 6 (delta 0), reused 0 (delta 0)
$ git1.3.2 clone git://host:9420/foo.git
fatal: cannot mmap packfile '/somewhere/foo/.git/objects/pack/tmp-VX82qz': Invalid argument
error: git-fetch-pack: unable to read from git-index-pack
error: git-index-pack died with error code 128
fetch-pack from 'git://host:9420/foo.git' failed.
[1]    13267 exit 1     git1.3.2 clone git://host:9420/foo.git
(/somewhere is the cwd on the client)

I tried to find which part of the patch caused the problem and came
out with the patch below.  With this I can clone with git1.3.2 again
but then git 1.4.x does not show any statistics about packing, its
just a starting point to look at.  Perhaps someone has an idea why
this happens.  I've got to sleep now :)

---
 upload-pack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/upload-pack.c b/upload-pack.c
index 7b86f69..94f0d85 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -249,7 +249,7 @@ static void create_pack_file(void)
 				sz = read(pe_pipe[0], progress,
 					  sizeof(progress));
 				if (0 < sz)
-					send_client_data(2, progress, sz);
+					write(2, progress, sz);
 				else if (sz == 0) {
 					close(pe_pipe[0]);
 					pe_pipe[0] = -1;

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2006-07-14 15:53 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-11 22:24 git-daemon problem Matthias Lederhofer
2006-07-11 23:04 ` Junio C Hamano
2006-07-11 23:32 ` Junio C Hamano
2006-07-12  4:42 ` Junio C Hamano
2006-07-12 19:28   ` Matthias Lederhofer
2006-07-13  5:44     ` Junio C Hamano
2006-07-13  7:42       ` Matthias Lederhofer
2006-07-13 11:42       ` Andre Noll
2006-07-13 11:51 ` Matthias Lederhofer
2006-07-13 10:02   ` [PATCH 1/5] daemon: use a custom die routine with syslog Matthias Lederhofer
2006-07-13 10:10   ` [PATCH 2/5] daemon: if one of the standard fds is missing open it to /dev/null Matthias Lederhofer
2006-07-13 13:27     ` Edgar Toernig
2006-07-13 14:04       ` Matthias Lederhofer
2006-07-13 14:36         ` Uwe Zeisberger
2006-07-13 15:37     ` Morten Welinder
2006-07-13 16:03       ` Matthias Lederhofer
2006-07-13 16:32     ` [PATCH 2.1/5] " Matthias Lederhofer
2006-07-13 10:18   ` [PATCH 4/5] daemon: new option --pid-file=<path> to store the pid Matthias Lederhofer
2006-07-13 10:32   ` [PATCH 5/5] daemon: new option --detach to run git-daemon in background Matthias Lederhofer
2006-07-13 13:37     ` Edgar Toernig
2006-07-13 16:47       ` [PATCH 5.1/5] " Matthias Lederhofer
2006-07-13 11:07   ` [PATCH 3/5] upload-pack: ignore write errors to stderr Matthias Lederhofer
2006-07-14 15:53   ` [PATCH] daemon: documentation for --reuseaddr, --detach and --pid-file Matthias Lederhofer

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).