qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
@ 2013-05-14  0:02 therock247uk
  2013-05-14  7:51 ` Stefan Hajnoczi
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: therock247uk @ 2013-05-14  0:02 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

just wondering as i just compiled the latest git and qemu goes into none
responding mode when i try to do any networking stuff on guests (both
linux and windows)

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1179731

Title:
  is networking broken on windows hosts?

Status in QEMU:
  New

Bug description:
  just wondering as i just compiled the latest git and qemu goes into
  none responding mode when i try to do any networking stuff on guests
  (both linux and windows)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1179731/+subscriptions

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-14  0:02 [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts? therock247uk
@ 2013-05-14  7:51 ` Stefan Hajnoczi
  2013-05-14 10:24   ` TeLeMan
  2013-05-14 16:28 ` [Qemu-devel] [Bug 1179731] " therock247uk
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Stefan Hajnoczi @ 2013-05-14  7:51 UTC (permalink / raw)
  To: Bug 1179731; +Cc: qemu-devel

On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
> just wondering as i just compiled the latest git and qemu goes into none
> responding mode when i try to do any networking stuff on guests (both
> linux and windows)

Works for me on qemu.git/master on Linux:

  $ git rev-parse HEAD
  b087143b4d010451208264b7c841436aafe1cbb1
  $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
          -drive if=virtio,cache=none,file=test.img

Please include more information, like the QEMU command-line and commit
ID.

Stefan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-14  7:51 ` Stefan Hajnoczi
@ 2013-05-14 10:24   ` TeLeMan
  2013-05-14 10:46     ` Paolo Bonzini
  0 siblings, 1 reply; 18+ messages in thread
From: TeLeMan @ 2013-05-14 10:24 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Bug 1179731, qemu-devel

On Tue, May 14, 2013 at 3:51 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
>> just wondering as i just compiled the latest git and qemu goes into none
>> responding mode when i try to do any networking stuff on guests (both
>> linux and windows)
>
> Works for me on qemu.git/master on Linux:
>
>   $ git rev-parse HEAD
>   b087143b4d010451208264b7c841436aafe1cbb1
>   $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
>           -drive if=virtio,cache=none,file=test.img
>
> Please include more information, like the QEMU command-line and commit
> ID.
>
> Stefan
>

This regression occurs on the Windows host. SLIRP hangs in sorecvfrom().

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-14 10:24   ` TeLeMan
@ 2013-05-14 10:46     ` Paolo Bonzini
  2013-05-14 11:39       ` TeLeMan
  0 siblings, 1 reply; 18+ messages in thread
From: Paolo Bonzini @ 2013-05-14 10:46 UTC (permalink / raw)
  To: TeLeMan; +Cc: Stefan Hajnoczi, qemu-devel, Bug 1179731

Il 14/05/2013 12:24, TeLeMan ha scritto:
> On Tue, May 14, 2013 at 3:51 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>> On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
>>> just wondering as i just compiled the latest git and qemu goes into none
>>> responding mode when i try to do any networking stuff on guests (both
>>> linux and windows)
>>
>> Works for me on qemu.git/master on Linux:
>>
>>   $ git rev-parse HEAD
>>   b087143b4d010451208264b7c841436aafe1cbb1
>>   $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
>>           -drive if=virtio,cache=none,file=test.img
>>
>> Please include more information, like the QEMU command-line and commit
>> ID.
>>
>> Stefan
>>
> 
> This regression occurs on the Windows host. SLIRP hangs in sorecvfrom().

Can you bisect it?

Paolo

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-14 10:46     ` Paolo Bonzini
@ 2013-05-14 11:39       ` TeLeMan
  2013-05-14 11:48         ` Paolo Bonzini
  0 siblings, 1 reply; 18+ messages in thread
From: TeLeMan @ 2013-05-14 11:39 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Stefan Hajnoczi, qemu-devel, Bug 1179731

On Tue, May 14, 2013 at 6:46 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 14/05/2013 12:24, TeLeMan ha scritto:
>> On Tue, May 14, 2013 at 3:51 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>>> On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
>>>> just wondering as i just compiled the latest git and qemu goes into none
>>>> responding mode when i try to do any networking stuff on guests (both
>>>> linux and windows)
>>>
>>> Works for me on qemu.git/master on Linux:
>>>
>>>   $ git rev-parse HEAD
>>>   b087143b4d010451208264b7c841436aafe1cbb1
>>>   $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
>>>           -drive if=virtio,cache=none,file=test.img
>>>
>>> Please include more information, like the QEMU command-line and commit
>>> ID.
>>>
>>> Stefan
>>>
>>
>> This regression occurs on the Windows host. SLIRP hangs in sorecvfrom().
>
> Can you bisect it?
>
> Paolo
>
The first break is the commit
5e3bc735d93dd23f074b5116fd11e1ad8cd4962f. But it need more packets
than HEAD to reproduce this regression.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-14 11:39       ` TeLeMan
@ 2013-05-14 11:48         ` Paolo Bonzini
  2013-05-14 11:55           ` Paolo Bonzini
  0 siblings, 1 reply; 18+ messages in thread
From: Paolo Bonzini @ 2013-05-14 11:48 UTC (permalink / raw)
  To: TeLeMan; +Cc: Stefan Hajnoczi, qemu-devel, Fabien Chouteau, Bug 1179731

Il 14/05/2013 13:39, TeLeMan ha scritto:
> On Tue, May 14, 2013 at 6:46 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> Il 14/05/2013 12:24, TeLeMan ha scritto:
>>> On Tue, May 14, 2013 at 3:51 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>>>> On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
>>>>> just wondering as i just compiled the latest git and qemu goes into none
>>>>> responding mode when i try to do any networking stuff on guests (both
>>>>> linux and windows)
>>>>
>>>> Works for me on qemu.git/master on Linux:
>>>>
>>>>   $ git rev-parse HEAD
>>>>   b087143b4d010451208264b7c841436aafe1cbb1
>>>>   $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
>>>>           -drive if=virtio,cache=none,file=test.img
>>>>
>>>> Please include more information, like the QEMU command-line and commit
>>>> ID.
>>>>
>>>> Stefan
>>>>
>>>
>>> This regression occurs on the Windows host. SLIRP hangs in sorecvfrom().
>>
>> Can you bisect it?
>>
>> Paolo
>>
> The first break is the commit
> 5e3bc735d93dd23f074b5116fd11e1ad8cd4962f. But it need more packets
> than HEAD to reproduce this regression.

Please check if this partial revert of that commit fixes it:

diff --git a/main-loop.c b/main-loop.c
index f46aece..79c45b8 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -394,6 +394,20 @@ static int os_host_main_loop_wait(uint32_t timeout)
         return ret;
     }
 
+    FD_ZERO(&rfds);
+    FD_ZERO(&wfds);
+    FD_ZERO(&xfds);
+    nfds = pollfds_fill(gpollfds, &rfds, &wfds, &xfds);
+    if (nfds >= 0) {
+        select_ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv0);
+        if (select_ret != 0) {
+            timeout = 0;
+        }
+        if (select_ret > 0) {
+            pollfds_poll(gpollfds, nfds, &rfds, &wfds, &xfds);
+        }
+    }
+
     g_main_context_prepare(context, &max_priority);
     n_poll_fds = g_main_context_query(context, max_priority, &poll_timeout,
                                       poll_fds, ARRAY_SIZE(poll_fds));
@@ -426,24 +440,11 @@ static int os_host_main_loop_wait(uint32_t timeout)
         g_main_context_dispatch(context);
     }
 
-    /* Call select after g_poll to avoid a useless iteration and therefore
-     * improve socket latency.
+    /* If an edge-triggered socket event occurred, select will return a
+     * positive result on the next iteration.  We do not need to do anything
+     * here.
      */
 
-    FD_ZERO(&rfds);
-    FD_ZERO(&wfds);
-    FD_ZERO(&xfds);
-    nfds = pollfds_fill(gpollfds, &rfds, &wfds, &xfds);
-    if (nfds >= 0) {
-        select_ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv0);
-        if (select_ret != 0) {
-            timeout = 0;
-        }
-        if (select_ret > 0) {
-            pollfds_poll(gpollfds, nfds, &rfds, &wfds, &xfds);
-        }
-    }
-
     return select_ret || g_poll_ret;
 }
 #endif

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-14 11:48         ` Paolo Bonzini
@ 2013-05-14 11:55           ` Paolo Bonzini
  2013-05-15  1:38             ` TeLeMan
  0 siblings, 1 reply; 18+ messages in thread
From: Paolo Bonzini @ 2013-05-14 11:55 UTC (permalink / raw)
  Cc: Bug 1179731, TeLeMan, qemu-devel, Fabien Chouteau,
	Stefan Hajnoczi

Il 14/05/2013 13:48, Paolo Bonzini ha scritto:
> Il 14/05/2013 13:39, TeLeMan ha scritto:
>> On Tue, May 14, 2013 at 6:46 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>> Il 14/05/2013 12:24, TeLeMan ha scritto:
>>>> On Tue, May 14, 2013 at 3:51 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>>>>> On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
>>>>>> just wondering as i just compiled the latest git and qemu goes into none
>>>>>> responding mode when i try to do any networking stuff on guests (both
>>>>>> linux and windows)
>>>>>
>>>>> Works for me on qemu.git/master on Linux:
>>>>>
>>>>>   $ git rev-parse HEAD
>>>>>   b087143b4d010451208264b7c841436aafe1cbb1
>>>>>   $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
>>>>>           -drive if=virtio,cache=none,file=test.img
>>>>>
>>>>> Please include more information, like the QEMU command-line and commit
>>>>> ID.
>>>>>
>>>>> Stefan
>>>>>
>>>>
>>>> This regression occurs on the Windows host. SLIRP hangs in sorecvfrom().
>>>
>>> Can you bisect it?
>>>
>>> Paolo
>>>
>> The first break is the commit
>> 5e3bc735d93dd23f074b5116fd11e1ad8cd4962f. But it need more packets
>> than HEAD to reproduce this regression.
> 
> Please check if this partial revert of that commit fixes it:

Yeah, this should work...  WSAEventSelect is edge-triggered and the
event will not be signaled if the socket handler does not consume all
the data in the socket buffer.

Paolo

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Qemu-devel] [Bug 1179731] Re: is networking broken on windows hosts?
  2013-05-14  0:02 [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts? therock247uk
  2013-05-14  7:51 ` Stefan Hajnoczi
@ 2013-05-14 16:28 ` therock247uk
  2013-05-14 16:50 ` therock247uk
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 18+ messages in thread
From: therock247uk @ 2013-05-14 16:28 UTC (permalink / raw)
  To: qemu-devel

latest git as of yesterday compiled under mingw using qemu-system-i386
-localtime -m 512 windows.img when ever it connects to the internet qemu
hangs.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1179731

Title:
  is networking broken on windows hosts?

Status in QEMU:
  New

Bug description:
  just wondering as i just compiled the latest git and qemu goes into
  none responding mode when i try to do any networking stuff on guests
  (both linux and windows)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1179731/+subscriptions

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Qemu-devel] [Bug 1179731] Re: is networking broken on windows hosts?
  2013-05-14  0:02 [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts? therock247uk
  2013-05-14  7:51 ` Stefan Hajnoczi
  2013-05-14 16:28 ` [Qemu-devel] [Bug 1179731] " therock247uk
@ 2013-05-14 16:50 ` therock247uk
  2013-05-14 21:11   ` Paolo Bonzini
  2013-05-14 23:37 ` therock247uk
  2016-10-19 16:35 ` T. Huth
  4 siblings, 1 reply; 18+ messages in thread
From: therock247uk @ 2013-05-14 16:50 UTC (permalink / raw)
  To: qemu-devel

trying other network adapters does not help either i tried the
model=rtl8139 and the xp guest says limited or no connectivty.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1179731

Title:
  is networking broken on windows hosts?

Status in QEMU:
  New

Bug description:
  just wondering as i just compiled the latest git and qemu goes into
  none responding mode when i try to do any networking stuff on guests
  (both linux and windows)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1179731/+subscriptions

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] Re: is networking broken on windows hosts?
  2013-05-14 16:50 ` therock247uk
@ 2013-05-14 21:11   ` Paolo Bonzini
  0 siblings, 0 replies; 18+ messages in thread
From: Paolo Bonzini @ 2013-05-14 21:11 UTC (permalink / raw)
  To: Bug 1179731; +Cc: therock247uk, qemu-devel

Il 14/05/2013 18:50, therock247uk ha scritto:
> trying other network adapters does not help either i tried the
> model=rtl8139 and the xp guest says limited or no connectivty.
> 

Please test the patch that was sent in this thread.

http://article.gmane.org/gmane.comp.emulators.qemu/211335/raw

Paolo

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Qemu-devel] [Bug 1179731] Re: is networking broken on windows hosts?
  2013-05-14  0:02 [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts? therock247uk
                   ` (2 preceding siblings ...)
  2013-05-14 16:50 ` therock247uk
@ 2013-05-14 23:37 ` therock247uk
  2016-10-19 16:35 ` T. Huth
  4 siblings, 0 replies; 18+ messages in thread
From: therock247uk @ 2013-05-14 23:37 UTC (permalink / raw)
  To: qemu-devel

tried the patch did not work though still hangs/crashes has issues

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1179731

Title:
  is networking broken on windows hosts?

Status in QEMU:
  New

Bug description:
  just wondering as i just compiled the latest git and qemu goes into
  none responding mode when i try to do any networking stuff on guests
  (both linux and windows)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1179731/+subscriptions

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-14 11:55           ` Paolo Bonzini
@ 2013-05-15  1:38             ` TeLeMan
  2013-05-15  8:37               ` Paolo Bonzini
  0 siblings, 1 reply; 18+ messages in thread
From: TeLeMan @ 2013-05-15  1:38 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Stefan Hajnoczi, qemu-devel, Fabien Chouteau, Bug 1179731

On Tue, May 14, 2013 at 7:55 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 14/05/2013 13:48, Paolo Bonzini ha scritto:
>> Il 14/05/2013 13:39, TeLeMan ha scritto:
>>> On Tue, May 14, 2013 at 6:46 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>> Il 14/05/2013 12:24, TeLeMan ha scritto:
>>>>> On Tue, May 14, 2013 at 3:51 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>>>>>> On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
>>>>>>> just wondering as i just compiled the latest git and qemu goes into none
>>>>>>> responding mode when i try to do any networking stuff on guests (both
>>>>>>> linux and windows)
>>>>>>
>>>>>> Works for me on qemu.git/master on Linux:
>>>>>>
>>>>>>   $ git rev-parse HEAD
>>>>>>   b087143b4d010451208264b7c841436aafe1cbb1
>>>>>>   $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
>>>>>>           -drive if=virtio,cache=none,file=test.img
>>>>>>
>>>>>> Please include more information, like the QEMU command-line and commit
>>>>>> ID.
>>>>>>
>>>>>> Stefan
>>>>>>
>>>>>
>>>>> This regression occurs on the Windows host. SLIRP hangs in sorecvfrom().
>>>>
>>>> Can you bisect it?
>>>>
>>>> Paolo
>>>>
>>> The first break is the commit
>>> 5e3bc735d93dd23f074b5116fd11e1ad8cd4962f. But it need more packets
>>> than HEAD to reproduce this regression.
>>
>> Please check if this partial revert of that commit fixes it:
>
> Yeah, this should work...  WSAEventSelect is edge-triggered and the
> event will not be signaled if the socket handler does not consume all
> the data in the socket buffer.
>
> Paolo
Unfortunately, it does not work.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-15  1:38             ` TeLeMan
@ 2013-05-15  8:37               ` Paolo Bonzini
  2013-05-16  5:52                 ` TeLeMan
  0 siblings, 1 reply; 18+ messages in thread
From: Paolo Bonzini @ 2013-05-15  8:37 UTC (permalink / raw)
  To: TeLeMan; +Cc: Stefan Hajnoczi, qemu-devel, Fabien Chouteau, Bug 1179731

Il 15/05/2013 03:38, TeLeMan ha scritto:
> On Tue, May 14, 2013 at 7:55 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> Il 14/05/2013 13:48, Paolo Bonzini ha scritto:
>>> Il 14/05/2013 13:39, TeLeMan ha scritto:
>>>> On Tue, May 14, 2013 at 6:46 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>>> Il 14/05/2013 12:24, TeLeMan ha scritto:
>>>>>> On Tue, May 14, 2013 at 3:51 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>>>>>>> On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
>>>>>>>> just wondering as i just compiled the latest git and qemu goes into none
>>>>>>>> responding mode when i try to do any networking stuff on guests (both
>>>>>>>> linux and windows)
>>>>>>>
>>>>>>> Works for me on qemu.git/master on Linux:
>>>>>>>
>>>>>>>   $ git rev-parse HEAD
>>>>>>>   b087143b4d010451208264b7c841436aafe1cbb1
>>>>>>>   $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
>>>>>>>           -drive if=virtio,cache=none,file=test.img
>>>>>>>
>>>>>>> Please include more information, like the QEMU command-line and commit
>>>>>>> ID.
>>>>>>>
>>>>>>> Stefan
>>>>>>>
>>>>>>
>>>>>> This regression occurs on the Windows host. SLIRP hangs in sorecvfrom().
>>>>>
>>>>> Can you bisect it?
>>>>>
>>>>> Paolo
>>>>>
>>>> The first break is the commit
>>>> 5e3bc735d93dd23f074b5116fd11e1ad8cd4962f. But it need more packets
>>>> than HEAD to reproduce this regression.
>>>
>>> Please check if this partial revert of that commit fixes it:
>>
>> Yeah, this should work...  WSAEventSelect is edge-triggered and the
>> event will not be signaled if the socket handler does not consume all
>> the data in the socket buffer.
>
> Unfortunately, it does not work.

Ok... as you can see the patch is just moving a block of code just
before g_main_context_prepare(context, &max_priority).

Can you please try doing the same on top of these six commits:

134a03e0b3d34b01b68107104c525c3bff1211d4
cbff4b342b000a7642125dbdabf61113e05eee44
48ce11ff972c733afaed3e2a2613a2e56081ec92
8917c3bdba37d6fe4393db0fad3fabbde9530d6b
a3e4b4a8091cc4fcf7cb619570c72c54c2d6a6e9
9cbaacf999b01b27dc3a22502705178057af66de

Paolo

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-15  8:37               ` Paolo Bonzini
@ 2013-05-16  5:52                 ` TeLeMan
  2013-05-16  8:59                   ` Paolo Bonzini
  0 siblings, 1 reply; 18+ messages in thread
From: TeLeMan @ 2013-05-16  5:52 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Stefan Hajnoczi, qemu-devel, Fabien Chouteau, Bug 1179731

The patch is working on 134a03e0b3d34b01b68107104c525c3bff1211d4 and
is not working from cbff4b342b000a7642125dbdabf61113e05eee44.
--
SUN OF A BEACH


On Wed, May 15, 2013 at 4:37 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 15/05/2013 03:38, TeLeMan ha scritto:
>> On Tue, May 14, 2013 at 7:55 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>> Il 14/05/2013 13:48, Paolo Bonzini ha scritto:
>>>> Il 14/05/2013 13:39, TeLeMan ha scritto:
>>>>> On Tue, May 14, 2013 at 6:46 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>>>> Il 14/05/2013 12:24, TeLeMan ha scritto:
>>>>>>> On Tue, May 14, 2013 at 3:51 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>>>>>>>> On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
>>>>>>>>> just wondering as i just compiled the latest git and qemu goes into none
>>>>>>>>> responding mode when i try to do any networking stuff on guests (both
>>>>>>>>> linux and windows)
>>>>>>>>
>>>>>>>> Works for me on qemu.git/master on Linux:
>>>>>>>>
>>>>>>>>   $ git rev-parse HEAD
>>>>>>>>   b087143b4d010451208264b7c841436aafe1cbb1
>>>>>>>>   $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
>>>>>>>>           -drive if=virtio,cache=none,file=test.img
>>>>>>>>
>>>>>>>> Please include more information, like the QEMU command-line and commit
>>>>>>>> ID.
>>>>>>>>
>>>>>>>> Stefan
>>>>>>>>
>>>>>>>
>>>>>>> This regression occurs on the Windows host. SLIRP hangs in sorecvfrom().
>>>>>>
>>>>>> Can you bisect it?
>>>>>>
>>>>>> Paolo
>>>>>>
>>>>> The first break is the commit
>>>>> 5e3bc735d93dd23f074b5116fd11e1ad8cd4962f. But it need more packets
>>>>> than HEAD to reproduce this regression.
>>>>
>>>> Please check if this partial revert of that commit fixes it:
>>>
>>> Yeah, this should work...  WSAEventSelect is edge-triggered and the
>>> event will not be signaled if the socket handler does not consume all
>>> the data in the socket buffer.
>>
>> Unfortunately, it does not work.
>
> Ok... as you can see the patch is just moving a block of code just
> before g_main_context_prepare(context, &max_priority).
>
> Can you please try doing the same on top of these six commits:
>
> 134a03e0b3d34b01b68107104c525c3bff1211d4
> cbff4b342b000a7642125dbdabf61113e05eee44
> 48ce11ff972c733afaed3e2a2613a2e56081ec92
> 8917c3bdba37d6fe4393db0fad3fabbde9530d6b
> a3e4b4a8091cc4fcf7cb619570c72c54c2d6a6e9
> 9cbaacf999b01b27dc3a22502705178057af66de
>
> Paolo

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-16  5:52                 ` TeLeMan
@ 2013-05-16  8:59                   ` Paolo Bonzini
  2013-05-16  9:32                     ` TeLeMan
  2013-05-16 10:33                     ` Fabien Chouteau
  0 siblings, 2 replies; 18+ messages in thread
From: Paolo Bonzini @ 2013-05-16  8:59 UTC (permalink / raw)
  To: TeLeMan; +Cc: Stefan Hajnoczi, qemu-devel, Fabien Chouteau, Bug 1179731

Il 16/05/2013 07:52, TeLeMan ha scritto:
> The patch is working on 134a03e0b3d34b01b68107104c525c3bff1211d4 and
> is not working from cbff4b342b000a7642125dbdabf61113e05eee44.

Thanks.

Fabien or Stefan, can you take a look?

TeLeMan, can you post the exact patches that you tested on those two
commits?  (To recap, there are at least two bugs.  The first is fixed by
the patch at
http://article.gmane.org/gmane.comp.emulators.qemu/211333/raw, the
second is introduced by patch cbff4b3, main-loop: switch to g_poll() on
POSIX hosts, 2013-02-20).

Paolo

> --
> SUN OF A BEACH
> 
> 
> On Wed, May 15, 2013 at 4:37 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> Il 15/05/2013 03:38, TeLeMan ha scritto:
>>> On Tue, May 14, 2013 at 7:55 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>> Il 14/05/2013 13:48, Paolo Bonzini ha scritto:
>>>>> Il 14/05/2013 13:39, TeLeMan ha scritto:
>>>>>> On Tue, May 14, 2013 at 6:46 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>>>>> Il 14/05/2013 12:24, TeLeMan ha scritto:
>>>>>>>> On Tue, May 14, 2013 at 3:51 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>>>>>>>>> On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
>>>>>>>>>> just wondering as i just compiled the latest git and qemu goes into none
>>>>>>>>>> responding mode when i try to do any networking stuff on guests (both
>>>>>>>>>> linux and windows)
>>>>>>>>>
>>>>>>>>> Works for me on qemu.git/master on Linux:
>>>>>>>>>
>>>>>>>>>   $ git rev-parse HEAD
>>>>>>>>>   b087143b4d010451208264b7c841436aafe1cbb1
>>>>>>>>>   $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
>>>>>>>>>           -drive if=virtio,cache=none,file=test.img
>>>>>>>>>
>>>>>>>>> Please include more information, like the QEMU command-line and commit
>>>>>>>>> ID.
>>>>>>>>>
>>>>>>>>> Stefan
>>>>>>>>>
>>>>>>>>
>>>>>>>> This regression occurs on the Windows host. SLIRP hangs in sorecvfrom().
>>>>>>>
>>>>>>> Can you bisect it?
>>>>>>>
>>>>>>> Paolo
>>>>>>>
>>>>>> The first break is the commit
>>>>>> 5e3bc735d93dd23f074b5116fd11e1ad8cd4962f. But it need more packets
>>>>>> than HEAD to reproduce this regression.
>>>>>
>>>>> Please check if this partial revert of that commit fixes it:
>>>>
>>>> Yeah, this should work...  WSAEventSelect is edge-triggered and the
>>>> event will not be signaled if the socket handler does not consume all
>>>> the data in the socket buffer.
>>>
>>> Unfortunately, it does not work.
>>
>> Ok... as you can see the patch is just moving a block of code just
>> before g_main_context_prepare(context, &max_priority).
>>
>> Can you please try doing the same on top of these six commits:
>>
>> 134a03e0b3d34b01b68107104c525c3bff1211d4
>> cbff4b342b000a7642125dbdabf61113e05eee44
>> 48ce11ff972c733afaed3e2a2613a2e56081ec92
>> 8917c3bdba37d6fe4393db0fad3fabbde9530d6b
>> a3e4b4a8091cc4fcf7cb619570c72c54c2d6a6e9
>> 9cbaacf999b01b27dc3a22502705178057af66de
>>
>> Paolo
> 
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-16  8:59                   ` Paolo Bonzini
@ 2013-05-16  9:32                     ` TeLeMan
  2013-05-16 10:33                     ` Fabien Chouteau
  1 sibling, 0 replies; 18+ messages in thread
From: TeLeMan @ 2013-05-16  9:32 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Stefan Hajnoczi, qemu-devel, Fabien Chouteau, Bug 1179731

On Thu, May 16, 2013 at 4:59 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 16/05/2013 07:52, TeLeMan ha scritto:
>> The patch is working on 134a03e0b3d34b01b68107104c525c3bff1211d4 and
>> is not working from cbff4b342b000a7642125dbdabf61113e05eee44.
>
> Thanks.
>
> Fabien or Stefan, can you take a look?
>
> TeLeMan, can you post the exact patches that you tested on those two
> commits?  (To recap, there are at least two bugs.  The first is fixed by
> the patch at
> http://article.gmane.org/gmane.comp.emulators.qemu/211333/raw, the
> second is introduced by patch cbff4b3, main-loop: switch to g_poll() on
> POSIX hosts, 2013-02-20).
>
> Paolo
>

The patch for cbff4b342b000a7642125dbdabf61113e05eee44:

diff --git a/main-loop.c b/main-loop.c
index 489b27c..1558e4b 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -454,6 +454,22 @@ static int os_host_main_loop_wait(uint32_t timeout)
         return ret;
     }

+    gpollfds_from_select();
+    FD_ZERO(&rfds);
+    FD_ZERO(&wfds);
+    FD_ZERO(&xfds);
+    nfds = pollfds_fill(gpollfds, &rfds, &wfds, &xfds);
+    if (nfds >= 0) {
+        select_ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv0);
+        if (select_ret != 0) {
+            timeout = 0;
+        }
+        if (select_ret > 0) {
+            pollfds_poll(gpollfds, nfds, &rfds, &wfds, &xfds);
+        }
+    }
+    gpollfds_to_select(select_ret);
+
     g_main_context_prepare(context, &max_priority);
     n_poll_fds = g_main_context_query(context, max_priority, &poll_timeout,
                                       poll_fds, ARRAY_SIZE(poll_fds));
@@ -493,21 +509,6 @@ static int os_host_main_loop_wait(uint32_t timeout)
     /* This back-and-forth between GPollFDs and select(2) is temporary.  We'll
      * drop it in a couple of patches, I promise :).
      */
-    gpollfds_from_select();
-    FD_ZERO(&rfds);
-    FD_ZERO(&wfds);
-    FD_ZERO(&xfds);
-    nfds = pollfds_fill(gpollfds, &rfds, &wfds, &xfds);
-    if (nfds >= 0) {
-        select_ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv0);
-        if (select_ret != 0) {
-            timeout = 0;
-        }
-        if (select_ret > 0) {
-            pollfds_poll(gpollfds, nfds, &rfds, &wfds, &xfds);
-        }
-    }
-    gpollfds_to_select(select_ret);

     return select_ret || g_poll_ret;
 }




The patch for 134a03e0b3d34b01b68107104c525c3bff1211d4 :

diff --git a/main-loop.c b/main-loop.c
index d0d8fe4..7cdd969 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -346,6 +346,13 @@ static int os_host_main_loop_wait(uint32_t timeout)
         return ret;
     }

+    if (nfds >= 0) {
+        select_ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv0);
+        if (select_ret != 0) {
+            timeout = 0;
+        }
+    }
+
     g_main_context_prepare(context, &max_priority);
     n_poll_fds = g_main_context_query(context, max_priority, &poll_timeout,
                                       poll_fds, ARRAY_SIZE(poll_fds));
@@ -382,12 +389,6 @@ static int os_host_main_loop_wait(uint32_t timeout)
      * improve socket latency.
      */

-    if (nfds >= 0) {
-        select_ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv0);
-        if (select_ret != 0) {
-            timeout = 0;
-        }
-    }

     return select_ret || g_poll_ret;
 }



>> --
>> SUN OF A BEACH
>>
>>
>> On Wed, May 15, 2013 at 4:37 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>> Il 15/05/2013 03:38, TeLeMan ha scritto:
>>>> On Tue, May 14, 2013 at 7:55 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>>> Il 14/05/2013 13:48, Paolo Bonzini ha scritto:
>>>>>> Il 14/05/2013 13:39, TeLeMan ha scritto:
>>>>>>> On Tue, May 14, 2013 at 6:46 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>>>>>> Il 14/05/2013 12:24, TeLeMan ha scritto:
>>>>>>>>> On Tue, May 14, 2013 at 3:51 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>>>>>>>>>> On Tue, May 14, 2013 at 12:02:24AM -0000, therock247uk wrote:
>>>>>>>>>>> just wondering as i just compiled the latest git and qemu goes into none
>>>>>>>>>>> responding mode when i try to do any networking stuff on guests (both
>>>>>>>>>>> linux and windows)
>>>>>>>>>>
>>>>>>>>>> Works for me on qemu.git/master on Linux:
>>>>>>>>>>
>>>>>>>>>>   $ git rev-parse HEAD
>>>>>>>>>>   b087143b4d010451208264b7c841436aafe1cbb1
>>>>>>>>>>   $ x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm -cpu host \
>>>>>>>>>>           -drive if=virtio,cache=none,file=test.img
>>>>>>>>>>
>>>>>>>>>> Please include more information, like the QEMU command-line and commit
>>>>>>>>>> ID.
>>>>>>>>>>
>>>>>>>>>> Stefan
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> This regression occurs on the Windows host. SLIRP hangs in sorecvfrom().
>>>>>>>>
>>>>>>>> Can you bisect it?
>>>>>>>>
>>>>>>>> Paolo
>>>>>>>>
>>>>>>> The first break is the commit
>>>>>>> 5e3bc735d93dd23f074b5116fd11e1ad8cd4962f. But it need more packets
>>>>>>> than HEAD to reproduce this regression.
>>>>>>
>>>>>> Please check if this partial revert of that commit fixes it:
>>>>>
>>>>> Yeah, this should work...  WSAEventSelect is edge-triggered and the
>>>>> event will not be signaled if the socket handler does not consume all
>>>>> the data in the socket buffer.
>>>>
>>>> Unfortunately, it does not work.
>>>
>>> Ok... as you can see the patch is just moving a block of code just
>>> before g_main_context_prepare(context, &max_priority).
>>>
>>> Can you please try doing the same on top of these six commits:
>>>
>>> 134a03e0b3d34b01b68107104c525c3bff1211d4
>>> cbff4b342b000a7642125dbdabf61113e05eee44
>>> 48ce11ff972c733afaed3e2a2613a2e56081ec92
>>> 8917c3bdba37d6fe4393db0fad3fabbde9530d6b
>>> a3e4b4a8091cc4fcf7cb619570c72c54c2d6a6e9
>>> 9cbaacf999b01b27dc3a22502705178057af66de
>>>
>>> Paolo
>>
>>
>

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts?
  2013-05-16  8:59                   ` Paolo Bonzini
  2013-05-16  9:32                     ` TeLeMan
@ 2013-05-16 10:33                     ` Fabien Chouteau
  1 sibling, 0 replies; 18+ messages in thread
From: Fabien Chouteau @ 2013-05-16 10:33 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Bug 1179731, TeLeMan, qemu-devel, Stefan Hajnoczi

On 05/16/2013 10:59 AM, Paolo Bonzini wrote:
> Il 16/05/2013 07:52, TeLeMan ha scritto:
>> The patch is working on 134a03e0b3d34b01b68107104c525c3bff1211d4 and
>> is not working from cbff4b342b000a7642125dbdabf61113e05eee44.
> 
> Thanks.
> 
> Fabien or Stefan, can you take a look?
> 

Unfortunately I don't have time to investigate these days.

-- 
Fabien Chouteau

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Qemu-devel] [Bug 1179731] Re: is networking broken on windows hosts?
  2013-05-14  0:02 [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts? therock247uk
                   ` (3 preceding siblings ...)
  2013-05-14 23:37 ` therock247uk
@ 2016-10-19 16:35 ` T. Huth
  4 siblings, 0 replies; 18+ messages in thread
From: T. Huth @ 2016-10-19 16:35 UTC (permalink / raw)
  To: qemu-devel

Looking at http://lists.gnu.org/archive/html/qemu-
devel/2013-05/msg02268.html it seems this has been fixed with commits
8db165b36ef893ac69af045 and 3cb8c205e36531a07dff1d84 ==> setting status
to "Fix released"

** Changed in: qemu
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1179731

Title:
  is networking broken on windows hosts?

Status in QEMU:
  Fix Released

Bug description:
  just wondering as i just compiled the latest git and qemu goes into
  none responding mode when i try to do any networking stuff on guests
  (both linux and windows)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1179731/+subscriptions

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-10-19 16:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14  0:02 [Qemu-devel] [Bug 1179731] [NEW] is networking broken on windows hosts? therock247uk
2013-05-14  7:51 ` Stefan Hajnoczi
2013-05-14 10:24   ` TeLeMan
2013-05-14 10:46     ` Paolo Bonzini
2013-05-14 11:39       ` TeLeMan
2013-05-14 11:48         ` Paolo Bonzini
2013-05-14 11:55           ` Paolo Bonzini
2013-05-15  1:38             ` TeLeMan
2013-05-15  8:37               ` Paolo Bonzini
2013-05-16  5:52                 ` TeLeMan
2013-05-16  8:59                   ` Paolo Bonzini
2013-05-16  9:32                     ` TeLeMan
2013-05-16 10:33                     ` Fabien Chouteau
2013-05-14 16:28 ` [Qemu-devel] [Bug 1179731] " therock247uk
2013-05-14 16:50 ` therock247uk
2013-05-14 21:11   ` Paolo Bonzini
2013-05-14 23:37 ` therock247uk
2016-10-19 16:35 ` T. Huth

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).