From nobody Thu May 25 20:33:21 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 4QS0BQ3Dgrz4Wgcv for ; Thu, 25 May 2023 20:33:34 +0000 (UTC) (envelope-from naman@freebsdfoundation.org) Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) (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 4QS0BQ1X3hz4MpP for ; Thu, 25 May 2023 20:33:34 +0000 (UTC) (envelope-from naman@freebsdfoundation.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-561b65b34c4so2546907b3.1 for ; Thu, 25 May 2023 13:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsdfoundation.org; s=gfnp-20170908; t=1685046813; x=1687638813; 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=WAmuR+dWyvRMQGUfQbPRsAL6wCeOvrNC78caM0Gjntg=; b=lL33zvkDpHxRvoalO/uDnewgZYRyUUxw4Ntz8QjQP/oEdcBuRK0WO1tx9rK6XJM2Q6 thRarfamcksZrivFu/IP+JUhsOzrZneZ7npsOs3u5MGhKzCdMlaCbO1qRr13qMM+uuaN URnailgYNSLu0hGLOPypnA5CG8dZL0wRTVzNM0Pj219STJ9Hfip+rjDw+l3LOGFtwOU9 lOYXH5yyBggV4I7x2nrIvAck8F9U+Z6dCjNFP6CTxfMyxGBxly1X5q1Td/EzowxSmCHk PKjf8RvJSgdDX0JCbPR1TaeoiZJxJEgXmaNoIWUEBXM1C+LWIw+eu+zbtIsc+uLjOL3K NiAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685046813; x=1687638813; 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=WAmuR+dWyvRMQGUfQbPRsAL6wCeOvrNC78caM0Gjntg=; b=Ql7fs6aF+Z+lWh7jSN5toxx8XckFRi7mXRrey6jLoKuf3l4BNlLDM64f0dEE2b/+aE GqFu+4a/VsG+Sj3iLpMnkOBqhYsKYiABRW6qJVMdYv7UkI0s3lgfoLHxVQ66tfPUHyK7 LzKbajn8g7IIxVd3Y2z/4XFeumiMBs9LMBWGjV4PhSDbIwbp5H+68uN4VcZSC04US609 G9oG4weey+PvycJqBpa723nRZO8KjoDpZ7z32dMwFfNhew40Gu34Z9tFLb+RlzSIxYic Of/AdkmjDuExIJS8HG1jqVFhhpV7D1PGJPUdrtiW80TlzEpyyeTsuQW2uJoSiGHyEXU5 FV9Q== X-Gm-Message-State: AC+VfDwN28tnF8F1iJ8gP4w/NCyGMnIWgTktpV1qS9y4om3tlLnRQQxd kD9A3jAjdLLVtrcADcsCNZPTYOddoSxZiMahM5PK3iNtqD8iCuFrLco= X-Google-Smtp-Source: ACHHUZ6ztmEEWzGFTEs2Tye7B/Ai9a7ZZfW8vLY34fwpqsDahFb4bDGHhBhPTxCE4Kci6SPRffcShBmAB0YYbl3it4o= X-Received: by 2002:a0d:e642:0:b0:559:f18d:ee94 with SMTP id p63-20020a0de642000000b00559f18dee94mr784795ywe.10.1685046812875; Thu, 25 May 2023 13:33:32 -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: Thu, 25 May 2023 16:33:21 -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-Rspamd-Queue-Id: 4QS0BQ1X3hz4MpP X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N 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 w= rote: > > 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 guest > > 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 commit > will address the problem you're describing, but you won't have it unless > you're running the main branch: > https://cgit.freebsd.org/src/commit/?id=3Dfefac543590d