Gerrit Pape wrote: > On Wed, Dec 06, 2006 at 09:18:38AM -0300, Alvaro Herrera wrote:
> > Yes. The configuration is the default, I think, and certainly the > > startup script is. (It was started by "aptitude" or dpkg). > > Ok, that's good. Can you please strace the complete command chain? > Please change the final line in /var/service/twoftpd/run to > > ... > strace -f -o/tmp/trace twoftpd-auth cvm-unix twoftpd-xfer Wow, interesting. Now the server fails in a completely different way -- on the client I get "530 Authentication failed." On the strace output I see this: 14242 mmap(NULL, 2344904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = -1 ENOMEM (Cannot allocate memory) 14242 close(3) = 0 14242 writev(2, [{"cvm-unix", 8}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libc.so.6", 9}, {": " , 2}, {"failed to map segment from share"..., 40}, {": ", 2}, {"Cannot allocate memory", 22}, {"\n", 1}], 10) = 124 On the log file I get that mesage: @4000000045770e2f0c79ee7c cvm-unix: error while loading shared libraries: libc.so.6: failed to map segment from shared object: Cannot allocate memory The whole strace file is attached -- it's not very long. -- Alvaro Herrera Valdivia, Chile ICBM: S 39º 49' 18.1", W 73º 13' 56.4" "La espina, desde que nace, ya pincha" (Proverbio africano)
14241 execve("/usr/bin/twoftpd-auth", ["twoftpd-auth", "cvm-unix", "twoftpd-xfer"], [/* 10 vars */]) = 0 14241 uname({sys="Linux", node="perhan", ...}) = 0 14241 brk(0) = 0x509000 14241 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) 14241 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ba780899000 14241 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) 14241 open("/etc/ld.so.cache", O_RDONLY) = 3 14241 fstat(3, {st_mode=S_IFREG|0644, st_size=60525, ...}) = 0 14241 mmap(NULL, 60525, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ba78089b000 14241 close(3) = 0 14241 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) 14241 open("/lib/libc.so.6", O_RDONLY) = 3 14241 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\305"..., 640) = 640 14241 lseek(3, 624, SEEK_SET) = 624 14241 read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0"..., 32) = 32 14241 fstat(3, {st_mode=S_IFREG|0755, st_size=1286312, ...}) = 0 14241 mmap(NULL, 2344904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ba78099a000 14241 mprotect(0x2ba780abb000, 1161160, PROT_NONE) = 0 14241 mmap(0x2ba780bbb000, 98304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x121000) = 0x2ba780bbb000 14241 mmap(0x2ba780bd3000, 14280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ba780bd3000 14241 close(3) = 0 14241 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ba780bd7000 14241 mprotect(0x2ba780bbb000, 86016, PROT_READ) = 0 14241 arch_prctl(ARCH_SET_FS, 0x2ba780bd76d0) = 0 14241 munmap(0x2ba78089b000, 60525) = 0 14241 rt_sigaction(SIGALRM, {0x401990, [], SA_RESTORER, 0x2ba7809c9110}, NULL, 8) = 0 14241 brk(0) = 0x509000 14241 brk(0x52a000) = 0x52a000 14241 alarm(0) = 0 14241 poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 900000) = 1 14241 write(1, "220-TwoFTPd server ready.\r\n", 27) = 27 14241 poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 900000) = 1 14241 write(1, "220 Authenticate first.\r\n", 25) = 25 14241 poll([{fd=0, events=POLLIN, revents=POLLIN}], 1, 900000) = 1 14241 read(0, "FEAT\r\n", 4096) = 6 14241 poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 900000) = 1 14241 write(1, "502 Command not supported.\r\n", 28) = 28 14241 poll([{fd=0, events=POLLIN, revents=POLLIN}], 1, 900000) = 1 14241 read(0, "AUTH TLS\r\n", 4096) = 10 14241 poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 900000) = 1 14241 write(1, "502 Command not supported.\r\n", 28) = 28 14241 poll([{fd=0, events=POLLIN, revents=POLLIN}], 1, 900000) = 1 14241 read(0, "USER alvherre\r\n", 4096) = 15 14241 poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 900000) = 1 14241 write(1, "331 Send PASS.\r\n", 16) = 16 14241 poll([{fd=0, events=POLLIN, revents=POLLIN}], 1, 900000) = 1 14241 read(0, "PASS ********\r\n", 4096) = 15 14241 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0 14241 pipe([3, 4]) = 0 14241 pipe([5, 6]) = 0 14241 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2ba780bd7760) = 14242 14241 close(3) = 0 14241 close(6) = 0 14241 write(4, "\1alvherre\0localhost\0********\0\0", 30) = 30 14241 close(4) = 0 14241 read(5, <unfinished ...> 14242 close(0) = 0 14242 close(4) = 0 14242 dup2(3, 0) = 0 14242 close(3) = 0 14242 close(1) = 0 14242 close(5) = 0 14242 dup2(6, 1) = 1 14242 close(6) = 0 14242 execve("/usr/local/bin/cvm-unix", ["cvm-unix"], [/* 11 vars */]) = -1 ENOENT (No such file or directory) 14242 execve("/usr/local/sbin/cvm-unix", ["cvm-unix"], [/* 11 vars */]) = -1 ENOENT (No such file or directory) 14242 execve("/bin/cvm-unix", ["cvm-unix"], [/* 11 vars */]) = -1 ENOENT (No such file or directory) 14242 execve("/sbin/cvm-unix", ["cvm-unix"], [/* 11 vars */]) = -1 ENOENT (No such file or directory) 14242 execve("/usr/bin/cvm-unix", ["cvm-unix"], [/* 11 vars */]) = 0 14242 uname({sys="Linux", node="perhan", ...}) = 0 14242 brk(0) = 0x506000 14242 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) 14242 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2abc5156d000 14242 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) 14242 open("/etc/ld.so.cache", O_RDONLY) = 3 14242 fstat(3, {st_mode=S_IFREG|0644, st_size=60525, ...}) = 0 14242 mmap(NULL, 60525, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2abc5156f000 14242 close(3) = 0 14242 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) 14242 open("/lib/libcrypt.so.1", O_RDONLY) = 3 14242 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\v\0"..., 640) = 640 14242 fstat(3, {st_mode=S_IFREG|0644, st_size=22656, ...}) = 0 14242 mmap(NULL, 1257888, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2abc5166e000 14242 mprotect(0x2abc51673000, 1237408, PROT_NONE) = 0 14242 mmap(0x2abc51772000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x2abc51772000 14242 mmap(0x2abc51774000, 184736, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2abc51774000 14242 close(3) = 0 14242 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) 14242 open("/lib/libc.so.6", O_RDONLY) = 3 14242 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\305"..., 640) = 640 14242 lseek(3, 624, SEEK_SET) = 624 14242 read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0"..., 32) = 32 14242 fstat(3, {st_mode=S_IFREG|0755, st_size=1286312, ...}) = 0 14242 mmap(NULL, 2344904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = -1 ENOMEM (Cannot allocate memory) 14242 close(3) = 0 14242 writev(2, [{"cvm-unix", 8}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libc.so.6", 9}, {": ", 2}, {"failed to map segment from share"..., 40}, {": ", 2}, {"Cannot allocate memory", 22}, {"\n", 1}], 10) = 124 14242 exit_group(127) = ? 14241 <... read resumed> "", 512) = 0 14241 --- SIGCHLD (Child exited) @ 0 (0) --- 14241 kill(14242, SIGTERM) = 0 14241 wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 127}], 0, NULL) = 14242 14241 rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_IGN}, 8) = 0 14241 poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 900000) = 1 14241 write(1, "530 Authentication failed.\r\n", 28) = 28 14241 poll([{fd=0, events=POLLIN, revents=POLLIN}], 1, 900000) = 1 14241 read(0, "PWD\r\n", 4096) = 5 14241 poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 900000) = 1 14241 write(1, "502 Command not supported.\r\n", 28) = 28 14241 poll([{fd=0, events=POLLIN, revents=POLLIN}], 1, 900000) = 1 14241 read(0, "QUIT\r\n", 4096) = 6 14241 poll([{fd=1, events=POLLOUT, revents=POLLOUT}], 1, 900000) = 1 14241 write(1, "221 Bye.\r\n", 10) = 10 14241 exit_group(0) = ?