On 2009-12-19 23:06:52 +0100, Vincent Lefevre wrote:
> When I connect by ssh, the connection sometimes freezes before I get
> the prompt. When this happens, a "ps -aef" always shows processes
> like:
> 
> UID        PID  PPID  C STIME TTY          TIME CMD
> vlefevre 22902 22901  0 22:45 pts/0    00:00:00 -bash
> vlefevre 22903 22902  0 22:45 pts/0    00:00:00 git help -a
> vlefevre 22905 22902  0 22:45 pts/0    00:00:00 egrep ^
> 
> and these commands come from /etc/bash_completion.d/git (note that
> I have
> 
>   [ -f /etc/bash_completion ] && source /etc/bash_completion
> 
> run from my .bashrc / .bash_profile when the shell is interactive).

To trace the problem, I added

  strace -f -r -o ~/private/strace-git.out git help -a >& /dev/null

before

  source /etc/bash_completion

The problem occurred a few minutes ago, and here's an excerpt of
the strace:

[...]
31817      0.000107 brk(0)              = 0x191d000
31817      0.000015 brk(0x193e000)      = 0x193e000
31817      0.000145 getcwd("/home/vlefevre"..., 4096) = 15
31817      0.000029 stat(".git", 0x7fff603c5a60) = -1 ENOENT (No such file or 
directory)
31817      0.000035 access(".git/objects", X_OK) = -1 ENOENT (No such file or 
directory)
31817      0.000024 access("./objects", X_OK) = -1 ENOENT (No such file or 
directory)
31817      0.000023 chdir("..")         = 0
31817      0.000023 stat(".git", 0x7fff603c5a60) = -1 ENOENT (No such file or 
directory)
31817    165.109930 access(".git/objects", X_OK) = -1 ENOENT (No such file or 
directory)
31817      0.013526 access("./objects", X_OK) = -1 ENOENT (No such file or 
directory)
31817      0.011951 chdir("..")         = 0
31817      0.000027 stat(".git", 0x7fff603c5a60) = -1 ENOENT (No such file or 
directory)
31817      0.000033 access(".git/objects", X_OK) = -1 ENOENT (No such file or 
directory)
31817      0.000021 access("./objects", X_OK) = -1 ENOENT (No such file or 
directory)
[...]

See the freeze for almost 3 minutes...

I'm wondering... does git try to access files outside my home
directory? i.e. files I do not control???

-- 
Vincent Lefèvre <[email protected]> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to