Re: [GIT] Networking

From: Eric Dumazet
Date: Thu Jan 20 2011 - 16:40:58 EST


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.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/