[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110515171512.GA24047@host1.jankratochvil.net>
Date: Sun, 15 May 2011 19:15:12 +0200
From: Jan Kratochvil <jan.kratochvil@...hat.com>
To: Tejun Heo <tj@...nel.org>
Cc: oleg@...hat.com, vda.linux@...glemail.com,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, indan@....nu
Subject: Re: PTRACE_SEIZE should not stop [Re: [PATCH 02/11] ptrace:
implement PTRACE_SEIZE]
On Sun, 15 May 2011 18:26:30 +0200, Tejun Heo wrote:
> the code to SEIZE and establish initial state would be simple.
In normal case yes; but one needs to handle all the corner cases when the
first signal is not INTERRUPT; which one usually does not handle as during
development (=in normal cases) it is always INTERRUPT.
Such thing is even difficult to test in QA testcases as in some cases one just
cannot reproduce the (in current case) non-SIGSTOP signal arriving as first
one.
> How long does it take to attach to / detach from 10000+ threads? If
> you don't do it serially, it shouldn't take that long.
It is not (such) a problem it takes time. It is a problem it stops the tracee
for a moment which completely changes the tracee's racy behavior one tries to
debug.
> You can tell them apart from userland and it doesn't matter which order or
> how many times INTERRUPT occurs.
I must know in which order they come to know when the tracee is still stopped
and I collect the signals to be displayed to the user and at which moment
there are no more signals in the queue and I start waiting on the debuggee
which started running.
Otherwise I can workaround it by various waitpid(NOHANG)s but it is better if
the ordering and when INTERRUPT is / is not reported is well defined.
Thanks,
Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists