lkml.org 
[lkml]   [2003]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: PID of multi-threaded core's file name is wrong in 2.5.59
    On Tue, Jan 28, 2003 at 12:27:03PM -0500, Robert Love wrote:
    > On Tue, 2003-01-28 at 10:45, Daniel Jacobowitz wrote:
    >
    > > I think this isn't an issue; multi-threaded core dumps are done by
    > > the core_waiter synchronization, so all other threads will have exited
    > > before the first thread to crash actually writes out its core.
    >
    > I think the problem is the filenames need to not overwrite each other -
    > not actual synchronization in the kernel (which, as you point out, is
    > correct).
    >
    > If we name the coredumps based on ->tgid, then all threads will dump to
    > the same file. If we use ->pid, each thread will use its unique PID as
    > its filename.

    That wasn't my point. All of the other threads have already terminated
    without dumping core at tis point; I don't think it's possible for two
    threads of a CLONE_THREAD application to both dump core. See
    fs/exec.c:coredump_wait.

    Also, once one thread gets into do_coredump it clears mm->dumpable;
    nothing else will dump core from that MM anyway.

    I think using ->tgid is a good idea.

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

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