From: Davies L. <dav...@gm...> - 2011-11-03 01:47:43
|
Hi, Found one bug of mfschunkserver, it eats 100% CPU without any activities. strace shows: [pid 7754] gettimeofday({1320117856, 191716}, NULL) = 0 [pid 7754] read(222, 0x7f397c978d08, 408) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] read(29, 0x7f397cad2268, 29368) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] poll([{fd=12, events=POLLIN}, {fd=11, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=224, events=POLLIN|POLLOUT}, {fd=222, events=POLLIN}, {fd=125, events=POLLIN|POLLOUT}, {fd=29, events=POLLIN}], 8, 50) = 2 ([{fd=224, revents=POLLOUT}, {fd=125, revents=POLLOUT}]) [pid 7754] gettimeofday({1320117856, 192052}, NULL) = 0 [pid 7754] read(222, 0x7f397c978d08, 408) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] read(29, 0x7f397cad2268, 29368) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] poll([{fd=12, events=POLLIN}, {fd=11, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=224, events=POLLIN|POLLOUT}, {fd=222, events=POLLIN}, {fd=125, events=POLLIN|POLLOUT}, {fd=29, events=POLLIN}], 8, 50) = 2 ([{fd=224, revents=POLLOUT}, {fd=125, revents=POLLOUT}]) [pid 7754] gettimeofday({1320117856, 192404}, NULL) = 0 [pid 7754] read(222, 0x7f397c978d08, 408) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] read(29, 0x7f397cad2268, 29368) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] poll([{fd=12, events=POLLIN}, {fd=11, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=224, events=POLLIN|POLLOUT}, {fd=222, events=POLLIN}, {fd=125, events=POLLIN|POLLOUT}, {fd=29, events=POLLIN}], 8, 50) = 2 ([{fd=224, revents=POLLOUT}, {fd=125, revents=POLLOUT}]) [pid 7754] gettimeofday({1320117856, 192740}, NULL) = 0 [pid 7754] read(222, 0x7f397c978d08, 408) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] read(29, 0x7f397cad2268, 29368) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] poll([{fd=12, events=POLLIN}, {fd=11, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=224, events=POLLIN|POLLOUT}, {fd=222, events=POLLIN}, {fd=125, events=POLLIN|POLLOUT}, {fd=29, events=POLLIN}], 8, 50) = 2 ([{fd=224, revents=POLLOUT}, {fd=125, revents=POLLOUT}]) [pid 7754] gettimeofday({1320117856, 193063}, NULL) = 0 [pid 7754] read(222, 0x7f397c978d08, 408) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] read(29, 0x7f397cad2268, 29368) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] poll([{fd=12, events=POLLIN}, {fd=11, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=224, events=POLLIN|POLLOUT}, {fd=222, events=POLLIN}, {fd=125, events=POLLIN|POLLOUT}, {fd=29, events=POLLIN}], 8, 50) = 2 ([{fd=224, revents=POLLOUT}, {fd=125, revents=POLLOUT}]) [pid 7754] gettimeofday({1320117856, 193386}, NULL) = 0 [pid 7754] read(222, 0x7f397c978d08, 408) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] read(29, 0x7f397cad2268, 29368) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] poll([{fd=12, events=POLLIN}, {fd=11, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=224, events=POLLIN|POLLOUT}, {fd=222, events=POLLIN}, {fd=125, events=POLLIN|POLLOUT}, {fd=29, events=POLLIN}], 8, 50) = 2 ([{fd=224, revents=POLLOUT}, {fd=125, revents=POLLOUT}]) [pid 7754] gettimeofday({1320117856, 193710}, NULL) = 0 [pid 7754] read(222, 0x7f397c978d08, 408) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] read(29, 0x7f397cad2268, 29368) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] poll([{fd=12, events=POLLIN}, {fd=11, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=224, events=POLLIN|POLLOUT}, {fd=222, events=POLLIN}, {fd=125, events=POLLIN|POLLOUT}, {fd=29, events=POLLIN}], 8, 50) = 2 ([{fd=224, revents=POLLOUT}, {fd=125, revents=POLLOUT}]) [pid 7754] gettimeofday({1320117856, 194033}, NULL) = 0 [pid 7754] read(222, 0x7f397c978d08, 408) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] read(29, 0x7f397cad2268, 29368) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] poll([{fd=12, events=POLLIN}, {fd=11, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=224, events=POLLIN|POLLOUT}, {fd=222, events=POLLIN}, {fd=125, events=POLLIN|POLLOUT}, {fd=29, events=POLLIN}], 8, 50) = 2 ([{fd=224, revents=POLLOUT}, {fd=125, revents=POLLOUT}]) [pid 7754] gettimeofday({1320117856, 194893}, NULL) = 0 [pid 7754] read(222, 0x7f397c978d08, 408) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] read(29, 0x7f397cad2268, 29368) = -1 EAGAIN (Resource temporarily unavailable) [pid 7754] poll([{fd=12, events=POLLIN}, {fd=11, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=224, events=POLLIN|POLLOUT}, {fd=222, events=POLLIN}, {fd=125, events=POLLIN|POLLOUT}, {fd=29, events=POLLIN}], 8, 50) = 2 ([{fd=224, revents=POLLOUT}, {fd=125, revents=POLLOUT}]) It seems that fd 224 and 125 are ready , but it read fd 29 and 222, with -1, then fall into infinite loop. -- - Davies |