On 11/26, Jan Kratochvil wrote: > > On Thu, 30 Oct 2014 22:55:41 +0100, Mark Wielaard wrote: > > On Thu, 2014-10-09 at 23:25 +0200, Jan Kratochvil wrote: > > > + if (opt_core_pattern == true && show_one_tid == false) > > > + argp_error (state, > > > + N_("--core-pattern requires -1")); > > > > Why this restriction? > > I was blindly following Oleg's note which was not so obvious to me, though: > > On Wed, 03 Sep 2014 16:26:41 +0200, Oleg Nesterov wrote: > # Obviously, this way you can only inspect the thread which dumps the core. > > Therefore I have now tried to remove this limitation of > -1 Show the backtrace of only one thread > > But I have found the other threads end up with: > wait4(13902, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV && WCOREDUMP(s)}], __WALL, NULL) = 13902 > > Therefore they are dead at the core_pattern time, they cannot be ptraced and > therefore they cannot be unwound. Yes. I guess PTRACE_ATTACH should work but it is pointless, this thread can't report an event and other ptrace requests won't work. In fact I think PTRACE_ATTACH should fail in this case... Oleg.