{"thread":{"id":"12783","subject":"[Fwd: Re: strange git delays]","startedAt":"2008-03-21T00:32:59Z","lastAt":"2008-03-21T00:32:59Z","messageCount":1,"participants":["James Utter"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"72544","messageId":"1206059579.29416.26.camel@localhost","threadId":"12783","inReplyTo":null,"subject":"[Fwd: Re: strange git delays]","fromName":"James Utter","fromEmail":"james.utter@gmail.com","sentAt":"2008-03-21T00:32:59Z","receivedAt":"2008-03-21T00:32:59Z","isPatch":false,"sender":{"key":"james.utter@gmail.com","avatar":null},"body":"\nOn Thu, 2008-03-20 at 14:53 -0700, Linus Torvalds wrote:\n> \n> On Fri, 21 Mar 2008, James Utter wrote:\n> >\n> > james@timesink:~/testgit$ time git commit --message \"initial commit\"\n> > Created initial commit 4f4b3a3: initial commit\n> >  1 files changed, 1 insertions(+), 0 deletions(-)\n> >  create mode 100644 hello\n> > \n> > real\t0m10.008s\n> > user\t0m0.000s\n> > sys\t0m0.008s\n> \n> Ok, that is almost exactly 10 seconds longer than it should take.\n> \n> And I can almost guarantee that it's something like a problem looking up \n> your hostname or perhaps user identity - I would guess you have some name \n> service problem.\n> \n> Do an\n> \n> \tstrace -tT git commit --message \"initial commit\"\n> \n> on that git commit to make sure, but I would almost bet that it's when git \n> does tget \"getpwuid()\" thing to get your name from the gecos fields, and \n> you have some setup problem with nscd o similar.\n> \n> It might just go away if you set up your user name and email manually, ie \n> try doing\n> \n> \tgit config --global user.name \"James Utter\"\n> \tgit config --global user.email james.utter@gmail.com\n> \n> and see if that makes the delay go away. It probably tries to look up your \n> login info from some non-existent NIS setup, and then times out after ten \n> seconds and picks the data from your /etc/passwd file instead.\n> \n> (There can be other things that do similar things - misconfigured name \n> servers etc can cause delay etc. So maybe I'm wrogn on blaming nscd, but \n> it would be my first guess).\n> \n> \t\tLinus\n\nIt looks like you are right. Setting the git config --global settings\nmakes the problem disappear. I am not aware of (actively) setting up any\nNIS, but there may be trouble in the DNS server.\n\n>From the strace (attached):\n\n10:55:34 sendto(3, \"\\307\\304\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\ttimesink\\n\\5svana\n\\3net\"..., 37, MSG_NOSIGNAL, NULL, 0) = 37 <0.000159>\n10:55:34 poll([{fd=3, events=POLLIN}], 1, 5000) = 0 <4.995564>\n10:55:39 poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1\n<0.000098>\n10:55:39 sendto(3, \"\\307\\304\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\ttimesink\\n\\5svana\n\\3net\"..., 37, MSG_NOSIGNAL, NULL, 0) = 37 <0.000130>\n10:55:39 poll([{fd=3, events=POLLIN}], 1, 5000) = 0 <4.999161>\n10:55:44 close(3)                       = 0 <0.000111>\n10:55:44 open(\"/etc/ld.so.cache\", O_RDONLY) = 3 <0.000066>\n\nThank you,\n\nJames Utter\n"}]}