From owner-svn-src-head@FreeBSD.ORG Mon Mar 24 01:21:38 2014 Return-Path: Delivered-To: svn-src-head@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 03023BAB; Mon, 24 Mar 2014 01:21:38 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E34E1D1C; Mon, 24 Mar 2014 01:21:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2O1LbPv005018; Mon, 24 Mar 2014 01:21:37 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2O1Lbkd005016; Mon, 24 Mar 2014 01:21:37 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201403240121.s2O1Lbkd005016@svn.freebsd.org> From: Ed Maste Date: Mon, 24 Mar 2014 01:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263678 - head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 01:21:38 -0000 Author: emaste Date: Mon Mar 24 01:21:37 2014 New Revision: 263678 URL: http://svnweb.freebsd.org/changeset/base/263678 Log: 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: head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Mon Mar 24 00:50:12 2014 (r263677) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Mon Mar 24 01:21:37 2014 (r263678) @@ -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;