From: Vitaly Belostotsky <byly.useless@tochka.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] qemu tun networking bug
Date: Tue, 12 Jul 2005 01:01:25 +0400 [thread overview]
Message-ID: <20050711210125.GA8022@home.byly.local> (raw)
Dear QEMU developers!
This is my first post to this list so please don't be very angry
if I'm doing something wrong.
I've encountered some network related bug when using qemu with tun
and I'm willing to debug it but could you please provide some help.
The bug isn't new, I believe it's described in debian bug tracking system (see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=290569)
but I've found the conditions when it's easily reproducable.
It occurs when using tun (user mode networking is reportedly fine).
After sending packets for some time to the virtual host the network stalls.
This isn't fatal, the emulator remains responsive and even the network traffic
can be resumed by sending some packets in the opposite direction,
for instance running tcpdump on the emulated host over ssh is enough.
How to reproduce the bug: boot the emulator with some low network usage system
(I use damnsmalllinux cd: qemu -boot -d -cdrom xxx),
open udp port 9 (for DSL: /etc/init.d/inetd start)
and start sending udp packets from outside (I use: tcpblast -d 100 vhost 9999).
It stalls usually in the very beginning of the first run.
-----------------------------------------------------------------
I tried to debug it a bit and discovered that in such a situation
the poll() in vl.c/main_loop_wait() goes on being called
and usually returns with the value -1 (EINTR) or 0 less frequently but steadily.
The tun fd is included into the poll set (max_size > 0, several lines above poll()).
So to my mind tun fd keeps being polled but no data detected.
According to kernel source drivers/net/tun.c poll() uses
> if (skb_queue_len(&tun->readq))
> mask |= POLLIN | POLLRDNORM;
and the buffer should be full due to udp sent, but I don't know for sure.
I also tried to run tcpdump on both sides of a link with more or less obvious results.
Could you please give me some clue for further debugging or confirm the bug presence
or any other help would be highly appreciated.
My configuration:
qemu: I started from debian qemu-0.7.0-2 and then used pristine qemu-0.7.0 sources, i386-softmmu
host: ubuntu hoary, linux kernel 2.6.10, i386
target system: the same ubuntu or DSL-1.2.1 (kernels 2.6 and 2.4)
next reply other threads:[~2005-07-11 21:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-11 21:01 Vitaly Belostotsky [this message]
2005-07-12 1:09 ` [Qemu-devel] qemu tun networking bug Henrik Nordstrom
2005-07-12 10:09 ` Vitaly Belostotsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050711210125.GA8022@home.byly.local \
--to=byly.useless@tochka.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).