Re: [PATCH v2 00/14] Short circuit delivery for coredump signals

From: Oleg Nesterov

Date: Fri Jul 10 2026 - 11:11:57 EST


On 07/09, Eric W. Biederman wrote:
>
> Oleg Nesterov <oleg@xxxxxxxxxx> writes:
>
> > Hmm. And it seems that V2 doesn't fix the problem I noticed in V1: the dumper
> > thread can be wrong.
> >
> > The first thread which calls get_signal() -> dequeue_exit_signal() will
> > initiate the coredumping, not necessary the faulting thread. This looks
> > very wrong to me.

...

> With the signal on the shared_pending queue any thread can initiate the
> core dump without problems.

Yes,

> The only other effect I can see is that the order of the threads notes
> as written into the coredump with fill_note_info will be different.
> Perhaps a debugger takes that as a signal to report which thread has
> died?

AFAIK gdb assumes that the the first NT_PRSTATUS in the core dump is the
"crashed thread".

If the wrong thread is the dumper, the developer will see the unrelated stack
trace / etc. How can the user find the faulted thread which actually triggered
the coredump?

I think this is another regression which should be fixed.

Oleg.