From: Oleg Nesterov <oleg@redhat.com>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Tejun Heo <tj@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
indan@nul.nu, bdonlan@gmail.com, linux-kernel@vger.kernel.org,
jan.kratochvil@redhat.com, akpm@linux-foundation.org
Subject: Re: thread leader death under strace (was Re: [PATCH 03/10] ptrace: implement PTRACE_SEIZE)
Date: Thu, 2 Jun 2011 18:39:09 +0200 [thread overview]
Message-ID: <20110602163909.GA18025@redhat.com> (raw)
In-Reply-To: <20110602163654.GA17754@redhat.com>
On 06/02, Oleg Nesterov wrote:
>
> On 06/02, Denys Vlasenko wrote:
> >
> > The problem is that right now it seems that if tracer doesn't catch
> > EVENT_EXIT and detach tracee when it sees it, really weird things
> > happen.
>
> The test-case is wrong afaics...
>
> Perhaps this should be considered as a bug in glibc, I dunno.
>
> > thread1(void *unused)
> > {
> > // usleep(100*1000);
> > // VERBOSE("WINCH\n");
> > // raise(SIGWINCH);
> >
> > usleep(100*1000);
> > VERBOSE("DYING\n");
> > raise(SIGUSR1);
>
> This doesn't send a signal. This does tgkill(tgid, 0, SIGUSR1) which
> fails correctly with -EINVAL.
>
> > static int
> > thread_leader(void *unused)
> > {
> > /* malloc gives sufficiently aligned buffer.
> > * long buf[] does not! (on ia64).
> > */
> > clone2(thread1, malloc(16 * 1024), 16 * 1024, 0
>
> Probably because of this clone2.
>
> Could you test with pthread_create? Or s/raise/tkill/ ?
Btw, did you use -lpthread?
Oleg.
next prev parent reply other threads:[~2011-06-02 16:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 15:33 thread leader death under strace (was Re: [PATCH 03/10] ptrace: implement PTRACE_SEIZE) Denys Vlasenko
2011-06-02 16:36 ` Oleg Nesterov
2011-06-02 16:39 ` Oleg Nesterov [this message]
2011-06-02 22:26 ` Denys Vlasenko
2011-06-03 15:29 ` Oleg Nesterov
2011-06-03 18:10 ` Denys Vlasenko
2011-06-04 15:27 ` Oleg Nesterov
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=20110602163909.GA18025@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bdonlan@gmail.com \
--cc=indan@nul.nu \
--cc=jan.kratochvil@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vda.linux@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox