select() stalls on fd previously yielding ECONNRESET (tcp)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kernel: 2.6.14.2
	2.6.14.6
	2.6.17.8
	(and probably others)

After noticing performance problems an strace -Ttt revealed
that select() occasionally stalls while it should not AFAIK:

   13:44:26.225471 select(1024, [45], NULL, NULL, {60, 0}) = 1 (in [45], left {60, 0}) <0.000016>
   13:44:26.225721 gettimeofday({1157715866, 225768}, {4294967176, 0}) = 0 <0.000012>
   13:44:26.225833 recv(45, "g\'0\0\0\0\0\0\0\0\0000\0\0\0\0\0\0\0\0000\0\0\0\0\0\0"..., 147, 0) = 147 <0.000018>
   13:44:26.225976 select(1024, NULL, [45], NULL, {5, 0}) = 1 (out [45], left {5, 0}) <0.000018>
   13:44:26.226312 send(45, "GG\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 147, 0) = -1 ECONNRESET (Connection reset by peer) <0.000016>
=> 13:44:26.226437 select(1024, NULL, [45], NULL, {5, 0}) = 0 (Timeout) <4.999663>
=> 13:44:31.226300 select(1024, NULL, [45], NULL, {0, 0}) = 0 (Timeout) <0.000018>
=> 13:44:31.226499 select(1024, NULL, [45], NULL, {0, 0}) = 0 (Timeout) <0.000016>
=> 13:44:31.226670 select(1024, NULL, [45], NULL, {0, 0}) = 0 (Timeout) <0.000015>
=> 13:44:31.226839 select(1024, NULL, [45], NULL, {0, 0}) = 0 (Timeout) <0.000016>
=> 13:44:31.227008 select(1024, NULL, [45], NULL, {0, 0}) = 0 (Timeout) <0.000016>
=> 13:44:31.227178 select(1024, NULL, [45], NULL, {0, 0}) = 0 (Timeout) <0.000016>
=> 13:44:31.227351 select(1024, NULL, [45], NULL, {0, 0}) = 0 (Timeout) <0.000016>
=> 13:44:31.227520 select(1024, NULL, [45], NULL, {0, 0}) = 0 (Timeout) <0.000015>

After an ECONNRESET the fd should (still) be considered writable by
select().

-- 
Frank
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux