From owner-svn-src-stable@FreeBSD.ORG Wed Jul 23 19:37:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEFA6A34; Wed, 23 Jul 2014 19:37:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA9C521D6; Wed, 23 Jul 2014 19:37:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6NJbOE5034803; Wed, 23 Jul 2014 19:37:24 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6NJbOEW034802; Wed, 23 Jul 2014 19:37:24 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201407231937.s6NJbOEW034802@svn.freebsd.org> From: Ed Maste Date: Wed, 23 Jul 2014 19:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r269025 - stable/10/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 19:37:25 -0000 Author: emaste Date: Wed Jul 23 19:37:24 2014 New Revision: 269025 URL: http://svnweb.freebsd.org/changeset/base/269025 Log: MFC r263678: lldb: Invoke PT_KILL from ProcessPosix::DoDestroy We previously sent SIGKILL to the debuggee in DoDestroy, but did not actually detach or kill via ptrace. It seems that this somehow didn't matter on Linux, but did on FreeBSD. This would happen when quitting LLDB while stopped at a breakpoint, for example. The debuggee remained stopped in ptrace (with the signal either pending or lost). After a timeout of a second or two LLDB exits, which caused the debuggee to resume and dump core from an unhandled SIGTRAP. BringProcessIntoLimbo is a poorly named wrapper for ptrace(PT_KILL) which is the desired behaviour from DoDestroy. http://llvm.org/pr18894 Sponsored by: DARPA, AFRL Modified: stable/10/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp ============================================================================== --- stable/10/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Wed Jul 23 19:35:02 2014 (r269024) +++ stable/10/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Wed Jul 23 19:37:24 2014 (r269025) @@ -335,11 +335,9 @@ ProcessPOSIX::DoDestroy() if (!HasExited()) { - // Drive the exit event to completion (do not keep the inferior in - // limbo). + assert (m_monitor); m_exit_now = true; - - if ((m_monitor == NULL || kill(m_monitor->GetPID(), SIGKILL)) && error.Success()) + if (m_monitor->BringProcessIntoLimbo()) { error.SetErrorToErrno(); return error;