lkml.org 
[lkml]   [2000]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Anyone working on multi-threaded core files for 2.4 ?
On Mon, Oct 02, 2000 at 03:10:10PM +0100, James Cownie wrote:
>
> > Queueing the tcores in the mm_struct could work though. Add a prctl [1]
> > that enables tcore core dumping. When tcore core dumping is enabled every
> > core dump that would dump a mm_struct with reference count > 1 does not
> > actually dump it, but just queues a structure (tqueue) with its registers/
> > signal info/etc. into a list in the mm_struct. When a thread dumps and
> > the mm_struct count is 1 then dump a normal core file with all the tcores
> > as thread notes. Also clean up all the cores then when freeing the mm_struct.
>
> What is your model for the scope of this prctl ?
>
> Should it be on a per-thread (OK, Alexander, "per process sharing the
> same MM") basis, or does it apply to all members of the thread_group ?

It should be per thread and inherited to childs but cleared on exec.
(this way the original thread or the thread manager could set it in
LinuxThreads).

>
> It seems to me that it makes no sense unless
> 1) it applies to all members of the thread_group
> (because without this the ref count on the mm will never get to
> zero).

In this case the tcore information would be lost. If you don't
want that don't enable the prctl.

> 2) if it applies we also ensure that core dump signals get sent to all
> members of the thread_group.
> (because without this the other threads won't exit).

With the prctl you told the kernel that you are comitted to that.


>
> At the moment (test9-pre7) there seems to be no code in the kernel to
> cause the core dumping signals to be fanned out. But then there seems
> to be no code to cause any signals (even the negative "deliver to
> thread group" ones) to be fanned out. I assume that's because it's
> still work in progress.

I see no problem in doing it in user space. It works fine there.
There are potential applications of the Linux clone threads model where
you don't want to kill the other threads (e.g. when you have a
object database that does its own object paging using SIGSEGV)



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

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.049 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site