Re: [GIT] Networking

Eric Dumazet
2011-01-20T21:40:54Z

Le jeudi 20 janvier 2011 à 13:12 -0800, Linus Torvalds a écrit :

> ...
> read(3, 0x9806500, 4096) = -1 EAGAIN (Resource
> temporarily unavailable)
> poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=12,
> events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=9,
> events=POLLIN|POLLPRI}, {fd=10, events=POLLIN|POLLPRI}, {fd=15,
> events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=0}, {fd=19,
> events=POLLIN}], 10, -1) = ? ERESTART_RESTARTBLOCK (To be restarted)
> restart_syscall(
>

Hmm, poll() here on fd=3 only asks events=POLLIN

> and that's it - it's now hung. So why did it work when I straced it
> while hung? And why is it doing that ERESTART_RESTARTBLOCK in the
> first place, I'm not seeing any signals there?
>
> So I tried sending it a useless signal, which will re-animate the
> strace, and now I get:
>
> restart_syscall(<... resuming interrupted call ...>) = 1
> --- SIGWINCH (Window changed) @ 0 (0) ---
> poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
>

Then here ask for fd=3 both POLLIN and POLLOUT :
kernel answers : OK for POLLOUT (not POLLIN), so previous poll() call
was OK to be blocked after all...

So I'm wondering if it could be a userland bug, that triggers with
recent kernel changes.