From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: Network hangs when communicating with host Date: Fri, 16 Oct 2015 13:25:56 -0400 Message-ID: <56213324.3010901@oracle.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Kostya Serebryany , Evgenii Stepanov , Alexey Samsonov , Alexander Potapenko , syzkaller@googlegroups.com To: Dmitry Vyukov , levinsasha928@gmail.com, Pekka Enberg , asias.hejun@gmail.com, penberg@cs.helsinki.fi, gorcunov@gmail.com, Will Deacon , andre.przywara@arm.com, matt@ozlabs.org, michael@ellerman.id.au, prasadjoshi124@gmail.com, marc.zyngier@arm.com, "Aneesh Kumar K.V" , mingo@elte.hu, gorcunov@openvz.org Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:30489 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932103AbbJPR2p (ORCPT ); Fri, 16 Oct 2015 13:28:45 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 10/15/2015 04:20 PM, Dmitry Vyukov wrote: > Hello, > > I am trying to run a program in lkvm sandbox so that it communicates > with a program on host. I run lkvm as: > > ./lkvm sandbox --disk sandbox-test --mem=2048 --cpus=4 --kernel > /arch/x86/boot/bzImage --network mode=user -- /my_prog > > /my_prog then connects to a program on host over a tcp socket. > I see that host receives some data, sends some data back, but then > my_prog hangs on network read. > > To localize this I wrote 2 programs (attached). ping is run on host > and pong is run from lkvm sandbox. They successfully establish tcp > connection, but after some iterations both hang on read. > > Networking code in Go runtime is there for more than 3 years, widely > used in production and does not have any known bugs. However, it uses > epoll edge-triggered readiness notifications that known to be tricky. > Is it possible that lkvm contains some networking bug? Can it be > related to the data races in lkvm I reported earlier today? > > I am on commit 3695adeb227813d96d9c41850703fb53a23845eb. Hey Dmitry, How long does it take to reproduce? I've been running ping/pong as you've described and it looks like it doesn't get stuck (read/writes keep going on both sides). Can you share your guest kernel config maybe? Thanks, Sasha