From owner-freebsd-fs@freebsd.org Mon Sep 4 13:55:17 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0471EE08E31 for ; Mon, 4 Sep 2017 13:55:17 +0000 (UTC) (envelope-from aijazbaig1@gmail.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AED8974A6B; Mon, 4 Sep 2017 13:55:16 +0000 (UTC) (envelope-from aijazbaig1@gmail.com) Received: by mail-it0-x22d.google.com with SMTP id j17so3043349iti.1; Mon, 04 Sep 2017 06:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9WB6VLUNPw8Nk8HJeYB37Wf6xbU2mlGjyHWIzCxgFFM=; b=pVL1Ld2jWbpaI/WapjP/FCxZyBXqtiv/q5oC4QB7O8Z5QqTArlqWfqTkjnlxiVJe1k uAkGoq+TaVw6K/b4Uw9pvvRjDW8TN/gaosDl6zVCxf+ZJpcmTcjxLSW9d4wZmbjxHU8l yOrCHoGaW5+E3ZeTDSvNzBaTpeYMO0066nf0Rakhxg19p9aO2eDhfUdloDeUR9IoiWQ7 /mnL2iVph4BuKcq6iUUkXdYdo4p7FNJpDM5aTisfQO33SXD+faBz8pCquo1qwpLJj+So 9OwBOuUFhhBAQJhImOjxV06mB3Idykuaf7MKlRXAkJwUSDa/mSrlgwYJl9LeV917vJTQ S1sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9WB6VLUNPw8Nk8HJeYB37Wf6xbU2mlGjyHWIzCxgFFM=; b=RAYL4OXCHbYbJkR6O81F8zbY1DomnbwWQfG+EMGu2DwTHwiMEX81ishyKDdyDP5FhX wY9seshxnMFo4fuW1uqQfyUfrIXE4vin/8Z+U7St6hhDIs0Weq7sBI9xn2M9SxGKdCf1 fmUmwKbP49zNzK1+CPZlJBMh4UJv2A8XIZilNfPsE2vO6tKRHtq9EQCt8ouhqR2ccN5r FRlnSEq+wP0EaON5ySma2IGzGdBs/adFkEMem8ceYhY4xldyxnWJbR474EYBDGJ3k/ZB AU5B+v4KFG/7lJ9Kt83/mR7Ff5RuWmxYEG4BrMaIXiQVKbF6ao9+du5+SPWeIAGuwCkr +UjQ== X-Gm-Message-State: AHPjjUgfPJy8LnltNHeWx5krSUeFeb6FubqJQZRpF3pAbujJfH+TYnTD 93vzfjnIClT8s5lHzO1MaIFV18V9LQ== X-Google-Smtp-Source: ADKCNb7+JvKMnZCfMbdOT1PzZ/CxzkySHZOVVexXnPgqak9qBPe1CNtKprwV1pXsRR6CDDXQGS9466UhP3cUFkY5z7M= X-Received: by 10.36.176.5 with SMTP id d5mr890412itf.150.1504533315558; Mon, 04 Sep 2017 06:55:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.22.66 with HTTP; Mon, 4 Sep 2017 06:55:14 -0700 (PDT) In-Reply-To: References: <201708250251.v7P2pwcl029687@chez.mckusick.com> <20170827195428.49400124AE9F@mail.bitblocks.com> <20170828132647.GA60563@in-addr.com> From: Aijaz Baig Date: Mon, 4 Sep 2017 19:25:14 +0530 Message-ID: Subject: Re: Tips on remote debugging for filesystem code To: Julian Elischer Cc: Gary Palmer , Bakul Shah , Kirk McKusick , freebsd-fs@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Sep 2017 13:55:17 -0000 Hi Julian Yes it just hangs. Yes it's not like it just hangs every time. It's more intermittent. This time I was stepping through 'kern_openat', really slowly as I am new to this, checking out the structures and the likes and finally this hit when I was within vn_open_cred. So yes the total time between attaching to the stub within the VM and this happening was close to 3 hours but nonetheless I do face this eventually is there something I should watch out for, I mean is there something time bound in some way for any of this code? Is this the reason why the VM becomes unresponsive if I step really slowly through the stack trace? On Mon, Sep 4, 2017 at 10:25 AM, Julian Elischer wrote: > On 2/9/17 8:40 pm, Aijaz Baig wrote: > > I was finally able to deploy a FreeBSD-Current VM on Bhyve but even with > that setup I face a similar issue > > For instance I put a breakpoint on 'ffs_read' and let the debugged VM > continue but the control is neither returned to (k)gdb nor does the VM > actually run. It appears hung. > > are you sure it's not stopped at the breakpoint in ddb on the console? > > > Is there something within the ffs/ufs code that I need to be aware of that > it doesn't facilitate this sort of debugging? Or is it because Bhyve is > being run on FreeBSD which is itself run on another hypervisor? Will that > affect this? > > On Mon, Aug 28, 2017 at 7:03 PM, Aijaz Baig wrote: > >> HI Gary >> >> Just checked that. Indeed that was the case. In addition I was running >> FreeBSD on top of vmware hypervisor and had not allowed hardware >> acceleration features pass through to the FreeBSD VM. It is now working! >> Need to explore more on getting it to connect to GDB >> >> Perhaps you'll see a thread soon for it (Has anything worked perfectly >> for the first time ever?? ;) )! >> >> On Mon, Aug 28, 2017 at 6:56 PM, Gary Palmer wrote: >> >>> On Mon, Aug 28, 2017 at 01:12:09PM +0530, Aijaz Baig wrote: >>> > Thanks a lot bakul. Will certain look into this >>> > >>> > Nevertheless I got hold of a PowerEdge 320 system which DOES have a >>> POPCNT >>> > instruction which shows support for V-x support via EPT but I still >>> get the >>> > same error there >>> > >>> > sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 2048M -t tap0 -d >>> guest.img -i >>> > -I FreeBSD-10.3-RELEASE-amd64-bootonly.iso fbsd10 >>> > Launching virtual machine "fbsd10" ... >>> > vm_create: Device not configured >>> > >>> > dmesg: >>> > vmx_init: processor does not support VMX operation >>> > >>> > cat /var/run/dmesg.boot | grep -i popcnt >>> > >>> > Features2=0xffba2203>> SE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND,HV> >>> > >>> > Features2=0xffba2203>> SE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND,HV> >>> > >>> > Any ideas? >>> >>> Hi, >>> >>> Check the BIOS for virtualisation or other related options. Some BIOSes >>> have >>> the ability to turn those features off, even if the processor normally >>> supports them >>> >>> Regards, >>> >>> Gary >>> >> >> >> >> -- >> >> Best Regards, >> Aijaz Baig >> > > > > -- > > Best Regards, > Aijaz Baig > > > -- Best Regards, Aijaz Baig