From nobody Fri May 26 16:26:48 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QSVgg6g56z4WwQs for ; Fri, 26 May 2023 16:27:11 +0000 (UTC) (envelope-from naman@freebsdfoundation.org) Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QSVgf2QGKz41wD for ; Fri, 26 May 2023 16:27:10 +0000 (UTC) (envelope-from naman@freebsdfoundation.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=freebsdfoundation.org header.s=gfnp-20170908 header.b=Cg1VqGRM; spf=pass (mx1.freebsd.org: domain of naman@freebsdfoundation.org designates 2607:f8b0:4864:20::1135 as permitted sender) smtp.mailfrom=naman@freebsdfoundation.org; dmarc=none Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-55db055b412so28348877b3.0 for ; Fri, 26 May 2023 09:27:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsdfoundation.org; s=gfnp-20170908; t=1685118429; x=1687710429; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=n7yGrgkGn7K1hXijx8npZ3PzfCbzhYvZuJOodfUSpdI=; b=Cg1VqGRMlEeXSzCSSxjghCu3zuZJ0Z2tS+9rel6ApgEdQZQnMwIUQFjwXmRKr1Mql8 fV0EoRoyC2eycwAhAosXwcf5AqXwRDLsaVBYeuqPMk5Lu96Sc46KzZiPbN04Aq9oBDL5 vz1T/5bXRl6z1XwCepwQBSmYHTGkXO++TmMau7v+NL54HX1Mzjuq6ASYzz0kEWs+G9tE 3/x2jRhu25NOteK2IuLofnd8KRhDrk4RxRlAC9BL9N2+3vD5DmvtoaR1dBUJ5Ji+5a/K OWRYbZi/WOKh/+KwClfKpbNKWq9XTBR79tnNYqHIkX3kKGv5Ashgs9LuQkIr0OX6aCrM oJVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685118429; x=1687710429; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n7yGrgkGn7K1hXijx8npZ3PzfCbzhYvZuJOodfUSpdI=; b=IVKwoY+aTxgEC2HMBB9gWKIIp/BkwiqHA0oqkDWZ+KDhKzSrMNMGq14RKSdW/UJ815 FTmeihuYwBZ1mKrrHaxvLenPXm1vkSXyjdGDCfOtPnU+z9e2pCy4m+claxF9fbhkBGyX ezB3MN4EHuItwwyEOQIV/DHK7Xz9J4Shm+k8lWUi2dCdB7J1CyyPrX+ATVXLtUF6J4tz qhhfCmXJwRrDjzMquNcgdSdcewJL6VTymwTvnhajHmMktwGpbtbEQaoKAbAiifjQixVG Laz+c55FLwk0D4F4rBnw3HjsnaZBIoK4duVMzkNLK84EatA0eYUmJrCBXM5kxCYh4Wzx PXlg== X-Gm-Message-State: AC+VfDz53CV9JAB9t1EjI2McQjoU2eH8yV5PqvsOzSc5azQ8gaJ0cdQ+ 2SFUIp5LnlrzHUUW4DN62IZK4Rgox+uQ1wlUZEJ3VxNIv1zeftu0RRHNgg== X-Google-Smtp-Source: ACHHUZ6ctz2Y/7H5J7gjW5qqrOs9DYAOA/Nmw+AjH2viGhJCMyKEgGeKWkU0izKKRfT3g6tfWRAsmhW6pXuDFvJ+6l0= X-Received: by 2002:a81:a14a:0:b0:564:c747:64f4 with SMTP id y71-20020a81a14a000000b00564c74764f4mr2241398ywg.11.1685118429073; Fri, 26 May 2023 09:27:09 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Naman Sood Date: Fri, 26 May 2023 12:26:48 -0400 Message-ID: Subject: Re: APIC interrupting me while stepping through a kernel with kgdb To: Mark Johnston Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[freebsdfoundation.org:s=gfnp-20170908]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1135:from]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[freebsdfoundation.org:+]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[freebsdfoundation.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QSVgf2QGKz41wD X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Okay, this seems to mostly work, but I am still getting timer interrupts sometimes. I'll post here if I can get that to be reproducible, but until then, I can live with this. Thanks! Naman. On Thu, May 25, 2023 at 4:33=E2=80=AFPM Naman Sood wrote: > > Oh. How convenient! I'm running 14.0-CURRENT, though I may have > delayed system updates long enough to not have this patch at the > moment. Let me get back to you after I run updates and retry - thanks! > > Naman. > > On Thu, May 25, 2023 at 4:27=E2=80=AFPM Mark Johnston = wrote: > > > > On Thu, May 25, 2023 at 03:34:56PM -0400, Naman Sood wrote: > > > Hello! > > > > > > I've been following this guide[1] to get kgdb to debug a FreeBSD gues= t > > > on bhyve - I have a WIP patch for pfsync that I want to debug. I'm at > > > the point where I can set breakpoints in if_pfsync.c and get them to > > > break when I hit them. However, when I step/next from there, control > > > always goes to the lapic_handle_timer(), which does its APIC timer > > > things, returns control to the line where I set the breakpoint... and > > > then immediately goes to the timer again, since presumably a timer > > > tick has happened between me pressing Return repeatedly. > > > > > > Is there a way to get around this? Either turn off the timer (doesn't > > > sound like a good idea?) or get kgdb to ignore it so I can debug the > > > rest of the kernel? Running skip at the timer code didn't seem to > > > help. > > > > Which revision of FreeBSD are you running? I believe this recent commi= t > > will address the problem you're describing, but you won't have it unles= s > > you're running the main branch: > > https://cgit.freebsd.org/src/commit/?id=3Dfefac543590d