insufficent ptrace status when a thread calls exec

From: Tom Horsley
Date: Wed Dec 14 2005 - 07:19:37 EST


The redhat folks sent me to the kernel folks with this one:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=171323

This bugzilla contains a test program that takes the (admittedly
weird) action of having a thread in a multi-threaded program
call exec() (not fork then exec, just exec :-). When a poor
old debugger is debugging this thing, most of the threads
just up and disappear, the main thread says it is about to
exit, then instead of exiting, it actually execs.

I don't believe there is enough information laying around for
any debugger to deduce what just happened and handle it
correctly. The bugzilla proposes the creation of a new
extended status so the main thread could say "I'm about to
exec on behalf of one of my threads which are all disappearing"
instead of saying "I'm about to exit" (which is a lie).

I certainly don't know enough to figure out how to actually
implement this and propose a patch, but I thought I'd at least
raise the issue with folks who probably know more about ptrace
than I do.

Thanks.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/