From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6637554036180370091==" MIME-Version: 1.0 From: Oleg Nesterov To: elfutils-devel@lists.fedorahosted.org Subject: Re: [PATCH] Add --core-pattern option to eu-stack Date: Wed, 26 Nov 2014 21:08:22 +0100 Message-ID: <20141126200822.GB19810@redhat.com> In-Reply-To: 20141126143239.GA16611@host2.jankratochvil.net --===============6637554036180370091== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 =3D=3D true && show_one_tid =3D=3D 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, thoug= h: > > On Wed, 03 Sep 2014 16:26:41 +0200, Oleg Nesterov wrote: > # Obviously, this way you can only inspect the thread which dumps the cor= e. > > 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) =3D=3D SIGSEGV && WCOREDUMP= (s)}], __WALL, NULL) =3D 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. --===============6637554036180370091==--