From fragabr at gmail.com Sat Sep 13 01:02:11 2008 From: fragabr at gmail.com (=?ISO-8859-1?Q?D=E2niel?= Fraga) Date: Sat, 13 Sep 2008 02:02:11 -0300 Subject: [sudo-workers] sudo and stalled connections Message-ID: I have a very exotic problem. Since Linux kernel 2.6.25 I get stalled connections. The problem is better described here: http://kerneltrap.org/mailarchive/linux-netdev/2008/7/7/2374824 It's a huge thread and for most people it seems to be related to tcp_frto. But for me it's not, since I tried to disable frto and the problem persists. So where does sudo is related to this? The problem is that sometimes I try to use sudo, it simple freezes. For example: sudo I hit Enter and instead of seeing the command output, it freezes. The only way I can force sudo to resume the operation is issuing a: nmap -sS and I don't know why, this makes sudo resumes normal operation. First, I thought that it's a 2.6.25 Linux kernel problem, but I'm not sure because it happens just only with sudo. Does sudo tries to open some kind of network connection on the localhost or not? Or could it be related to the loopback interface? It's a very annoying problem and unfortunately I can't reproduce it (it happens randomly). Thanks. -- Linux 2.6.26: Rotary Wombat http://u-br.net http://www.soninha23.can.br From fragabr at gmail.com Sun Sep 14 14:50:22 2008 From: fragabr at gmail.com (=?ISO-8859-1?Q?D=E2niel?= Fraga) Date: Sun, 14 Sep 2008 15:50:22 -0300 Subject: [sudo-workers] sudo and stalled connections In-Reply-To: <20080914163611.GA24768@nimenees.com> References: <20080914163611.GA24768@nimenees.com> Message-ID: <20080914155022.0035ff94@tux> On Sun, 14 Sep 2008 11:36:11 -0500 Eric Haszlakiewicz wrote: > Run it through strace and see where it stops. That might give you some > clues. Hi, here it is: execve("/usr/local/bin/sudo", ["sudo", "nmap", "-sS", "tux"], [/* 69 vars */]) = 0 brk(0) = 0x1fba000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f066235b000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=143930, ...}) = 0 mmap(NULL, 143930, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0662337000 close(3) = 0 open("/lib64/libpam.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p!\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=54297, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0662336000 mmap(NULL, 2139768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0661f37000 mprotect(0x7f0661f42000, 2093056, PROT_NONE) = 0 mmap(0x7f0662141000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7f0662141000 close(3) = 0 open("/lib64/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \16\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=20895, ...}) = 0 mmap(NULL, 2109728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0661d33000 mprotect(0x7f0661d35000, 2097152, PROT_NONE) = 0 mmap(0x7f0661f35000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f0661f35000 close(3) = 0 open("/lib64/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\342\1\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1610001, ...}) = 0 mmap(NULL, 3420568, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f06619ef000 mprotect(0x7f0661b29000, 2097152, PROT_NONE) = 0 mmap(0x7f0661d29000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13a000) = 0x7f0661d29000 mmap(0x7f0661d2e000, 16792, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0661d2e000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0662335000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0662334000 arch_prctl(ARCH_SET_FS, 0x7f06623346f0) = 0 mprotect(0x7f0661d29000, 16384, PROT_READ) = 0 mprotect(0x7f0661f35000, 4096, PROT_READ) = 0 mprotect(0x7f066235c000, 4096, PROT_READ) = 0 munmap(0x7f0662337000, 143930) = 0 geteuid() = 0 rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGTSTP, {SIG_IGN}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGCHLD, {0x40ce90, [], SA_RESTORER|SA_RESTART, 0x7f0661a1fe50}, {SIG_DFL}, 8) = 0 setrlimit(RLIMIT_NPROC, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0 getrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=0}) = 0 setrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=0}) = 0 fcntl(0, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fcntl(1, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fcntl(2, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) brk(0) = 0x1fba000 brk(0x1fdb000) = 0x1fdb000 open("/etc/nsswitch.conf", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=1744, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f066235a000 read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1744 read(3, "", 4096) = 0 close(3) = 0 munmap(0x7f066235a000, 4096) = 0 open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=143930, ...}) = 0 mmap(NULL, 143930, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0662337000 close(3) = 0 open("/lib64/libnss_files.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\37\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=54887, ...}) = 0 mmap(NULL, 2139432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f06617e4000 mprotect(0x7f06617ee000, 2093056, PROT_NONE) = 0 mmap(0x7f06619ed000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7f06619ed000 close(3) = 0 mprotect(0x7f06619ed000, 4096, PROT_READ) = 0 munmap(0x7f0662337000, 143930) = 0 open("/etc/passwd", O_RDONLY|0x80000 /* O_??? */) = 3 fcntl(3, F_GETFD) = 0x1 (flags FD_CLOEXEC) fstat(3, {st_mode=S_IFREG|0644, st_size=909, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f066235a000 lseek(3, 0, SEEK_CUR) = 0 open("/etc/group", O_RDONLY|0x80000 /* O_??? */) = 4 fstat(4, {st_mode=S_IFREG|0664, st_size=397, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0662359000 lseek(4, 0, SEEK_CUR) = 0 socket(PF_NETLINK, SOCK_RAW, 0) = 5 bind(5, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0 getsockname(5, {sa_family=AF_NETLINK, pid=6806, groups=00000000}, [7025265774000341004]) = 0 sendto(5, "\24\0\0\0\22\0\1\3y[\315H\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20 recvmsg(5, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\360\0\0\0\20\0\2\0y[\315H\226\32\0\0\0\0\4\3\1\0\0\0I"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 928 recvmsg(5, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0y[\315H\226\32\0\0\0\0\0\0\1\0\0\0I\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 20 sendto(5, "\24\0\0\0\26\0\1\3z[\315H\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20 recvmsg(5, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"0\0\0\0\24\0\2\0z[\315H\226\32\0\0\2\10\200\376\1\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 212 recvmsg(5, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0z[\315H\226\32\0\0\0\0\0\0\1\0\0\0\10"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 20 close(5) = 0 open("/etc/localtime", O_RDONLY) = 5 fstat(5, {st_mode=S_IFREG|0644, st_size=175, ...}) = 0 fstat(5, {st_mode=S_IFREG|0644, st_size=175, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0662358000 read(5, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\2\0\0"..., 4096) = 175 lseek(5, -95, SEEK_CUR) = 80 read(5, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\2\0\0"..., 4096) = 95 close(5) = 0 munmap(0x7f0662358000, 4096) = 0 uname({sys="Linux", node="tux.abusar.org.br", ...}) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 readlink("/proc/self/fd/0", "/dev/pts/3", 4095) = 10 getuid() = 0 socket(PF_FILE, SOCK_STREAM, 0) = 5 fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(5, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) close(5) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 5 fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(5, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) close(5) = 0 lseek(3, 0, SEEK_SET) = 0 read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 909 close(3) = 0 munmap(0x7f066235a000, 4096) = 0 getgroups(0, NULL) = 8 getgroups(8, [0, 1, 2, 3, 4, 6, 10, 11]) = 8 setresgid(4294967295, 0, 4294967295) = 0 setresuid(0, 0, 0) = 0 getcwd("/home/fraga/src", 4096) = 16 setresuid(0, 0, 0) = 0 setresgid(4294967295, 0, 4294967295) = 0 lstat("/etc/sudoers", {st_mode=S_IFREG|0440, st_size=440, ...}) = 0 setresgid(4294967295, 0, 4294967295) = 0 setresuid(0, 1, 0) = 0 open("/etc/sudoers", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0440, st_size=440, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f066235a000 read(3, "# sudoers file.\n#\n# This file MU"..., 4096) = 440 lseek(3, 0, SEEK_SET) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 setresuid(0, 0, 0) = 0 setresgid(4294967295, 0, 4294967295) = 0 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff6a359fc0) = -1 ENOTTY (Inappropriate ioctl for device) read(3, "# sudoers file.\n#\n# This file MU"..., 8192) = 440 read(3, "", 4096) = 0 read(3, "", 8192) = 0 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff6a359fd0) = -1 ENOTTY (Inappropriate ioctl for device) open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 5 read(5, "65536\n", 31) = 6 close(5) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 5 fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(5, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) close(5) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 5 fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(5, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) close(5) = 0 lseek(4, 0, SEEK_SET) = 0 read(4, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 397 read(4, "", 4096) = 0 close(4) = 0 munmap(0x7f0662359000, 4096) = 0 open("/etc/ld.so.cache", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=143930, ...}) = 0 mmap(NULL, 143930, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f0662310000 close(4) = 0 open("/lib64/libnss_nisplus.so.2", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220 \0\0"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=63319, ...}) = 0 mmap(NULL, 2147624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f06615d7000 mprotect(0x7f06615e2000, 2097152, PROT_NONE) = 0 mmap(0x7f06617e2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xb000) = 0x7f06617e2000 close(4) = 0 open("/lib64/libnsl.so.1", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240@\0\0"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=107462, ...}) = 0 mmap(NULL, 2190032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f06613c0000 mprotect(0x7f06613d4000, 2093056, PROT_NONE) = 0 mmap(0x7f06615d3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x13000) = 0x7f06615d3000 mmap(0x7f06615d5000, 6864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f06615d5000 close(4) = 0 mprotect(0x7f06615d3000, 4096, PROT_READ) = 0 close(4) = 0 open("/lib64/libnss_nisplus.so.2", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220 \0\0"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=63319, ...}) = 0 mmap(NULL, 2147624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f06615d7000 mprotect(0x7f06615e2000, 2097152, PROT_NONE) = 0 mmap(0x7f06617e2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xb000) = 0x7f06617e2000 close(4) = 0 open("/lib64/libnsl.so.1", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240@\0\0"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=107462, ...}) = 0 mmap(NULL, 2190032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f06613c0000 mprotect(0x7f06613d4000, 2093056, PROT_NONE) = 0 mmap(0x7f06615d3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x13000) = 0x7f06615d3000 mmap(0x7f06615d5000, 6864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f06615d5000 close(4) = 0 mprotect(0x7f06615d3000, 4096, PROT_READ) = 0 mprotect(0x7f06617e2000, 4096, PROT_READ) = 0 munmap(0x7f0662310000, 143930) = 0 uname({sys="Linux", node="tux.abusar.org.br", ...}) = 0 stat("/var/nis/NIS_COLD_START", 0x7fff6a359d10) = -1 ENOENT (No such file or directory) open("/var/nis/NIS_COLD_START", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=143930, ...}) = 0 mmap(NULL, 143930, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f0662310000 close(4) = 0 open("/lib64/libnss_nis.so.2", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p \0\0\0"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=54352, ...}) = 0 mmap(NULL, 2139352, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f06611b5000 mprotect(0x7f06611be000, 2097152, PROT_NONE) = 0 mmap(0x7f06613be000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x9000) = 0x7f06613be000 close(4) = 0 mprotect(0x7f06613be000, 4096, PROT_READ) = 0 munmap(0x7f0662310000, 143930) = 0 uname({sys="Linux", node="tux.abusar.org.br", ...}) = 0 setgroups(8, [0, 1, 2, 3, 4, 6, 10, 11]) = 0 getgroups(0, NULL) = 8 getgroups(8, [0, 1, 2, 3, 4, 6, 10, 11]) = 8 setresgid(4294967295, 0, 4294967295) = 0 setresuid(4294967295, 0, 4294967295) = 0 stat("/usr/local/bin/nmap", {st_mode=S_IFREG|0755, st_size=593480, ...}) = 0 setresuid(0, 0, 0) = 0 setresgid(4294967295, 0, 4294967295) = 0 setgroups(8, [0, 1, 2, 3, 4, 6, 10, 11]) = 0 setgroups(8, [0, 1, 2, 3, 4, 6, 10, 11]) = 0 setresgid(4294967295, 0, 4294967295) = 0 setresuid(4294967295, 0, 4294967295) = 0 setresuid(0, 0, 0) = 0 setresgid(4294967295, 0, 4294967295) = 0 setgroups(8, [0, 1, 2, 3, 4, 6, 10, 11]) = 0 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=175, ...}) = 0 socket(PF_FILE, SOCK_DGRAM, 0) = 4 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 connect(4, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0 sendto(4, "<149>Sep 14 15:44:09 sudo: r"..., 119, MSG_NOSIGNAL, NULL, 0) = ? ERESTARTSYS (To be restarted) --- SIGINT (Interrupt) @ 0 (0) --- sendto(4, "<149>Sep 14 15:44:09 sudo: r"..., 119, MSG_NOSIGNAL, NULL, 0 *** Any hints? Thanks. -- From Todd.Miller at courtesan.com Sun Sep 14 16:58:05 2008 From: Todd.Miller at courtesan.com (Todd C. Miller) Date: Sun, 14 Sep 2008 16:58:05 -0400 Subject: [sudo-workers] sudo and stalled connections In-Reply-To: Your message of "Sun, 14 Sep 2008 15:50:22 -0300." <20080914155022.0035ff94@tux> References: <20080914163611.GA24768@nimenees.com> <20080914155022.0035ff94@tux> Message-ID: <200809142058.m8EKw6bu013675@core.courtesan.com> In message <20080914155022.0035ff94 at tux> so spake =?ISO-8859-1?Q?D=E2niel?= Fraga (fragabr): > socket(PF_FILE, SOCK_DGRAM, 0) = 4 > fcntl(4, F_SETFD, FD_CLOEXEC) = 0 > connect(4, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0 > sendto(4, "<149>Sep 14 15:44:09 sudo: r"..., 119, MSG_NOSIGNAL, NULL, 0) > = ? ERESTARTSYS (To be restarted) > --- SIGINT (Interrupt) @ 0 (0) --- > sendto(4, "<149>Sep 14 15:44:09 sudo: r"..., 119, MSG_NOSIGNAL, > NULL, 0 If this is the point at which it is hanging, what is happening is that sudo is trying to log a message to the syslog daemon. Note that this is a UDP connection, not TCP so I don't know why running nmap would wake things up. For that matter, since UDP is a stateless protocol it doesn't make sense that it would hang there at all unless there is a kernel resource issue of some sort. What is the full version of the kernel you are running? It looks like there were a bunch of socket fixes in 2.6.25.7. - todd From fragabr at gmail.com Sun Sep 14 17:40:16 2008 From: fragabr at gmail.com (=?ISO-8859-1?Q?D=E2niel?= Fraga) Date: Sun, 14 Sep 2008 18:40:16 -0300 Subject: [sudo-workers] sudo and stalled connections In-Reply-To: <200809142058.m8EKw6bu013675@core.courtesan.com> References: <20080914163611.GA24768@nimenees.com> <20080914155022.0035ff94@tux> <200809142058.m8EKw6bu013675@core.courtesan.com> Message-ID: <20080914184016.34c5d4d1@tux> On Sun, 14 Sep 2008 16:58:05 -0400 "Todd C. Miller" wrote: > If this is the point at which it is hanging, what is happening is > that sudo is trying to log a message to the syslog daemon. Note > that this is a UDP connection, not TCP so I don't know why running > nmap would wake things up. > > For that matter, since UDP is a stateless protocol it doesn't make > sense that it would hang there at all unless there is a kernel > resource issue of some sort. > > What is the full version of the kernel you are running? It looks > like there were a bunch of socket fixes in 2.6.25.7. I'm using 2.6.26. We've been discussing this issue here: http://kerneltrap.org/mailarchive/linux-netdev/2008/7/7/2374824 It's a huge thread and it seems that my problem isn't related to the problem of the first poster (tcp_frto). I've been exchange many mails with Ilpo J?rvinen, but we couldn't figure it out, since it happens randomly. And yes, I think you're right, it can be probably a kernel issue. But it's been very difficult to debug this. But, as you said, it seems to be a kernel issue. I'll keep trying to figure it. Thank you very much! -- From erh at nimenees.com Sun Sep 14 12:36:11 2008 From: erh at nimenees.com (Eric Haszlakiewicz) Date: Sun, 14 Sep 2008 11:36:11 -0500 Subject: [sudo-workers] sudo and stalled connections In-Reply-To: References: Message-ID: <20080914163611.GA24768@nimenees.com> On Sat, Sep 13, 2008 at 02:02:11AM -0300, D?niel Fraga wrote: ... > So where does sudo is related to this? The problem is that > sometimes I try to use sudo, it simple freezes. For example: > > sudo > > I hit Enter and instead of seeing the command output, it > freezes. ... > Does sudo tries to open some kind of network connection on the > localhost or not? Or could it be related to the loopback interface? Run it through strace and see where it stops. That might give you some clues. eric