All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Denis V. Lunev" <den@openvz.org>,
	qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Zhao Liu" <zhao1.liu@intel.com>, "Stefan Weil" <sw@weilnetz.de>
Subject: Re: [PATCH 02/10] oslib: add qemu_debugger_attached()
Date: Fri, 20 Nov 2026 16:19:35 +0000	[thread overview]
Message-ID: <awBzF9i3fo1KRGMk@redhat.com> (raw)
In-Reply-To: <CAFEAcA-Bc_Lev19s7=UjokZKjxTgDkZRYO-hbPMexj9BXqs2xQ@mail.gmail.com>

On Tue, Nov 17, 2026 at 02:38:44PM +0000, Peter Maydell wrote:
> On Tue, 15 Sept 2026 at 21:36, Denis V. Lunev <den@openvz.org> wrote:
> >
> > From: Denis V. Lunev <den@openvz.org>
> >
> > Code that watches for a hang has to tell a hang apart from a debugger
> > stop, because under a debugger every thread stops and whatever liveness
> > signal the watcher samples stops changing with them.
> >
> > Linux reports the tracer in /proc/self/status and Windows has
> > IsDebuggerPresent(). Answer false elsewhere, which leaves the caller
> > behaving as it did before the check.
> >
> > Match the Linux field at the start of a line. The Name: line holds
> > fifteen characters of comm, enough to spell the field name and appear
> > ahead of the real one.
> 
> Should we have a mechanism for the user to force this to
> claim "no debugger present" ? You might want to debug the
> watchdog mechanism itself, for instance, or maybe you're
> running QEMU under something that looks like a debugger or
> process tracer but which isn't going to do user-controlled
> "stop for arbitrary time" (e.g. does the record-and-replay
> tool "rr" appear as a tracer for these purposes?)

"strace" is going to be detected as a debugger this way, but it does
not  halt execution of the program, merely slow it down a bit.


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



  reply	other threads:[~2026-11-20 16:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 20:34 [PATCH 0/10] system: add a watchdog for the Big QEMU Lock Denis V. Lunev
2026-09-15 20:34 ` [PATCH 01/10] util/qemu-thread: track bql_locked across the timed condvar wait Denis V. Lunev
2026-10-14 22:36   ` Fabiano Rosas
2026-09-15 20:34 ` [PATCH 02/10] oslib: add qemu_debugger_attached() Denis V. Lunev
2026-11-17 13:45   ` Fabiano Rosas
2026-11-17 14:38   ` Peter Maydell
2026-11-20 16:19     ` Daniel P. Berrangé [this message]
2026-11-20 16:27   ` Daniel P. Berrangé
2026-09-15 20:34 ` [PATCH 03/10] oslib: add qemu_thread_states() Denis V. Lunev
2026-11-17 14:02   ` Fabiano Rosas
2026-09-15 20:34 ` [PATCH 04/10] oslib: report kernel stacks in qemu_thread_states() Denis V. Lunev
2026-11-17 18:13   ` Fabiano Rosas
2026-11-20 16:14     ` Denis V. Lunev
2026-11-20 15:28   ` Daniel P. Berrangé
2026-09-15 20:34 ` [PATCH 05/10] util/qemu-thread: reserve a signal for thread introspection Denis V. Lunev
2026-09-15 20:34 ` [PATCH 06/10] oslib: report each thread's program counter Denis V. Lunev
2026-11-17 18:19   ` Fabiano Rosas
2026-09-15 20:34 ` [PATCH 07/10] system/cpus: report a BQL held past a deadline Denis V. Lunev
2026-11-17 18:24   ` Fabiano Rosas
2026-09-15 20:34 ` [PATCH 08/10] system/cpus: hold off the BQL watchdog under a debugger Denis V. Lunev
2026-11-17 18:25   ` Fabiano Rosas
2026-09-15 20:34 ` [PATCH 09/10] system/cpus: add bql-watchdog-abort Denis V. Lunev
2026-10-14 23:30   ` Fabiano Rosas
2026-09-15 20:34 ` [PATCH 10/10] tests/functional: cover the BQL watchdog Denis V. Lunev
2026-09-16  4:57   ` Thomas Huth
2026-09-16  6:44     ` Marc-André Lureau
2026-09-16  7:56       ` Denis V. Lunev
2026-09-18 21:56 ` [PATCH 0/10] system: add a watchdog for the Big QEMU Lock Fabiano Rosas
2026-11-20 16:22 ` Daniel P. Berrangé
2026-11-20 16:25   ` Denis V. Lunev
2026-11-20 17:57   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=awBzF9i3fo1KRGMk@redhat.com \
    --to=berrange@redhat.com \
    --cc=den@openvz.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sw@weilnetz.de \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.