lkml.org 
[lkml]   [2011]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: thread leader death under strace (was Re: [PATCH 03/10] ptrace: implement PTRACE_SEIZE)
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.



\
 
 \ /
  Last update: 2011-06-02 18:43    [W:0.078 / U:2.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site