Eu tive frequentemente problemas semelhantes quando havia uma montagem fft obsoleta / lenta + FUSE no meu diretório inicial; Eu verificaria isso primeiro.
Eu corro o vi no Linux CentOS 5.3. Sempre que saio de um arquivo, tenho que esperar alguns segundos antes de o vi salvar o arquivo. A mesma coisa acontece com o vim.
Eu executei este comando:
strace -odetails -ff -f -r -v vi test
Esta é a seção do arquivo de log que mostra um longo atraso (16 segundos). O atraso nem sempre é o mesmo:
0.000041 write(1, "q", 1) = 1 0.000040 select(1, [0], NULL, [0], {4, 0}) = 1 (in [0], left {3, 737000}) 0.262932 select(1, [0], NULL, [0], NULL) = 1 (in [0]) 0.000055 read(0, "\r", 250) = 1 0.000047 select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) 0.000050 write(1, "\r", 1) = 1
0.000057 stat64("/root/yyy58/test", 0xbfb50ee8) = -1 ENOENT (No such file or directory)
0.000060 write(1, "[?25l", 6) = 6 0.000044 ioctl(0, SNDCTL_TMR_START or TCSETS, {c_iflags=0x500, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
0.000077 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x500, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0 0.000063 write(1, "\"test\"", 6) = 6 0.000043 stat64("test", 0xbfb511c0) = -1 ENOENT (No such file or directory) 0.000089 open("test", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 4
0.000089 write(4, "\nsdf\nsf\nsdf\nsd\nfsdf\nsdf\nsdf\ns\nd\n"..., 42) = 42 0.000076 fsync(4) = 0
16.520635 stat64("test", {st_dev=makedev(0, 189), st_ino=30549058, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=42, st_atime=2011/08/06-15:59:23, st_mtime=2011/08/06-15:59:23, st_ctime=2011/08/06-15:59:23}) = 0 0.000106 close(4) = 0 0.000061 write(1, " [New] 13L, 42C written", 23) = 23 0.000054 _llseek(3, 0, [0], SEEK_SET) = 0 0.000038 write(3, "b0VIM 7.0strace -odetails -ff -f -r -v vi test
0.000041 write(1, "q", 1) = 1 0.000040 select(1, [0], NULL, [0], {4, 0}) = 1 (in [0], left {3, 737000}) 0.262932 select(1, [0], NULL, [0], NULL) = 1 (in [0]) 0.000055 read(0, "\r", 250) = 1 0.000047 select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) 0.000050 write(1, "\r", 1) = 1
0.000057 stat64("/root/yyy58/test", 0xbfb50ee8) = -1 ENOENT (No such file or directory)
0.000060 write(1, "[?25l", 6) = 6 0.000044 ioctl(0, SNDCTL_TMR_START or TCSETS, {c_iflags=0x500, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
0.000077 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x500, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0 0.000063 write(1, "\"test\"", 6) = 6 0.000043 stat64("test", 0xbfb511c0) = -1 ENOENT (No such file or directory) 0.000089 open("test", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 4
0.000089 write(4, "\nsdf\nsf\nsdf\nsd\nfsdf\nsdf\nsdf\ns\nd\n"..., 42) = 42 0.000076 fsync(4) = 0
16.520635 stat64("test", {st_dev=makedev(0, 189), st_ino=30549058, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=42, st_atime=2011/08/06-15:59:23, st_mtime=2011/08/06-15:59:23, st_ctime=2011/08/06-15:59:23}) = 0 0.000106 close(4) = 0 0.000061 write(1, " [New] 13L, 42C written", 23) = 23 0.000054 _llseek(3, 0, [0], SEEK_SET) = 0 0.000038 write(3, "b0VIM 7.0%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%5%pre%%pre%root"..., 4096) = 4096 0.000055 stat64("/root/yyy58/test", {st_dev=makedev(0, 189), st_ino=30549058, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=42, st_atime=2011/08/06-15:59:23, st_mtime=2011/08/06-15:59:23, st_ctime=2011/08/06-15:59:23}) = 0 0.000089 write(1, "\r\r\n[?1l>", 10) = 10 0.000042 write(1, "[?12l[?25h[?1049l", 20) = 20
0.000036 close(3) = 0
0.000030 unlink("/root/yyy58/.test.swp") = 0 0.000150 exit_group(0) = ?
%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%5%pre%%pre%root"..., 4096) = 4096 0.000055 stat64("/root/yyy58/test", {st_dev=makedev(0, 189), st_ino=30549058, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=42, st_atime=2011/08/06-15:59:23, st_mtime=2011/08/06-15:59:23, st_ctime=2011/08/06-15:59:23}) = 0 0.000089 write(1, "\r\r\n[?1l>", 10) = 10 0.000042 write(1, "[?12l[?25h[?1049l", 20) = 20
0.000036 close(3) = 0
0.000030 unlink("/root/yyy58/.test.swp") = 0 0.000150 exit_group(0) = ?
Como posso corrigir isso ou rastrear melhor o problema?
Eu tive frequentemente problemas semelhantes quando havia uma montagem fft obsoleta / lenta + FUSE no meu diretório inicial; Eu verificaria isso primeiro.