NetBSD Problem Report #51621

From www@NetBSD.org  Fri Nov 11 11:29:18 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3437C7A2CE
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 11 Nov 2016 11:29:18 +0000 (UTC)
Message-Id: <20161111112916.999AC7A2D7@mollari.NetBSD.org>
Date: Fri, 11 Nov 2016 11:29:16 +0000 (UTC)
From: n54@gmx.com
Reply-To: n54@gmx.com
To: gnats-bugs@NetBSD.org
Subject: PT_ATTACH from a parent is unreliable
X-Send-Pr-Version: www-1.0

>Number:         51621
>Category:       kern
>Synopsis:       PT_ATTACH from a parent is unreliable
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 11 11:30:00 +0000 2016
>Closed-Date:    Sat Nov 12 20:54:23 +0000 2016
>Last-Modified:  Sat Nov 12 20:54:23 +0000 2016
>Originator:     Kamil Rytarowski
>Release:        NetBSD 7.99.42 amd64
>Organization:
TNF
>Environment:
NetBSD chieftec 7.99.42 NetBSD 7.99.42 (GENERIC) #0: Wed Nov  9 23:58:23 CET 2016  root@chieftec:/tmp/netbsd-tmp/sys/arch/amd64/compile/GENERIC amd64
>Description:
I want to attach a child from parent with PT_ATTACH & PT_CONTINUE. However I faced the following issues:

- PT_ATTACH seems to work, but waiting for stopped status and signal from the
  child results in getting SIGTRAP, not SIGSTOP like in Linux and FreeBSD. This
  might be by design, I'm unsure. However, so far I was getting SIGSTOP from a
  tracer process that was not the parent. SIGSTOP vs SIGTRAP logic also complicates
  the things up as tracer must check whether is a parent for tracee or not -
  this shouldn't be needed.

- PT_CONTINUE seems to have no effect at all, the child hangs. This operation
  works on Linux and FreeBSD and in the end, test passes correctly.

- Debugging this with gdb(1) results in receiving SIGABRT from the GNU
  debugger (in the moment of raising/receiving SIGTRAP). This is making the things harder in general.

The same code can be debugged on Linux without issues.
>How-To-Repeat:
/* modified src/tests/kernel/t_ptrace_wait.c (c) TNF */

#include <sys/cdefs.h>

#include <sys/param.h>
#include <sys/types.h>
#include <sys/ptrace.h>
#include <sys/resource.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
#include <assert.h>
#include <err.h>
#include <errno.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <unistd.h>

#ifdef __FreeBSD__
#include <sys/user.h>
#endif

#define TWAIT_WAITPID

#ifndef __used
#define __used __attribute__((__used__))
#endif

#ifndef __arraycount
#define __arraycount nitems
#endif

#define atf_utils_fork fork
#define ATF_REQUIRE(a) do{assert((a));}while(0)
#define ATF_REQUIRE_MSG(a,b,...) do{assert((a));}while(0)
#define ATF_REQUIRE_ERRNO(a,b) do{printf("got_errno %d (expected %d)\n", (a), errno);assert((a) == errno);assert((b));}while(0)
#define ATF_REQUIRE_EQ_MSG(a,b,c,...) do{assert((a) == (b));}while(0)

/* Detect plain wait(2) use-case */
#if !defined(TWAIT_WAITPID) && \
    !defined(TWAIT_WAITID) && \
    !defined(TWAIT_WAIT3) && \
    !defined(TWAIT_WAIT4) && \
    !defined(TWAIT_WAIT6)
#define TWAIT_WAIT
#endif

/*
 * There are two classes of wait(2)-like functions:
 * - wait4(2)-like accepting pid_t, optional options parameter, struct rusage*
 * - wait6(2)-like accepting idtype_t, id_t, struct wrusage, mandatory options
 *
 * The TWAIT_FNAME value is to be used for convenience in debug messages.
 *
 * The TWAIT_GENERIC() macro is designed to reuse the same unmodified
 * code with as many wait(2)-like functions as possible.
 *
 * In a common use-case wait4(2) and wait6(2)-like function can work the almost
 * the same way, however there are few important differences:
 * wait6(2) must specify P_PID for idtype to match wpid from wait4(2).
 * To behave like wait4(2), wait6(2) the 'options' to wait must include
 * WEXITED|WTRUNCATED.
 *
 * There are two helper macros (they purpose it to mach more than one
 * wait(2)-like function):
 * The TWAIT_HAVE_STATUS - specifies whether a function can retrieve
 *                         status (as integer value).
 * The TWAIT_HAVE_PID    - specifies whether a function can request
 *                         exact process identifier
 * The TWAIT_HAVE_RUSAGE - specifies whether a function can request
 *                         the struct rusage value
 * 
 */

#if defined(TWAIT_WAIT)
#	define TWAIT_FNAME			"wait"
#	define TWAIT_WAIT4TYPE(a,b,c,d)		wait((b))
#	define TWAIT_GENERIC(a,b,c)		wait((b))
#	define TWAIT_HAVE_STATUS		1
#elif defined(TWAIT_WAITPID)
#	define TWAIT_FNAME			"waitpid"
#	define TWAIT_WAIT4TYPE(a,b,c,d)		waitpid((a),(b),(c))
#	define TWAIT_GENERIC(a,b,c)		waitpid((a),(b),(c))
#	define TWAIT_HAVE_PID			1
#	define TWAIT_HAVE_STATUS		1
#elif defined(TWAIT_WAITID)
#	define TWAIT_FNAME			"waitid"
#	define TWAIT_GENERIC(a,b,c)		\
		waitid(P_PID,(a),NULL,(c)|WEXITED|WTRAPPED)
#	define TWAIT_WAIT6TYPE(a,b,c,d,e,f)	waitid((a),(b),(f),(d))
#	define TWAIT_HAVE_PID			1
#elif defined(TWAIT_WAIT3)
#	define TWAIT_FNAME			"wait3"
#	define TWAIT_WAIT4TYPE(a,b,c,d)		wait3((b),(c),(d))
#	define TWAIT_GENERIC(a,b,c)		wait3((b),(c),NULL)
#	define TWAIT_HAVE_STATUS		1
#	define TWAIT_HAVE_RUSAGE		1
#elif defined(TWAIT_WAIT4)
#	define TWAIT_FNAME			"wait4"
#	define TWAIT_WAIT4TYPE(a,b,c,d)		wait4((a),(b),(c),(d))
#	define TWAIT_GENERIC(a,b,c)		wait4((a),(b),(c),NULL)
#	define TWAIT_HAVE_PID			1
#	define TWAIT_HAVE_STATUS		1
#	define TWAIT_HAVE_RUSAGE		1
#elif defined(TWAIT_WAIT6)
#	define TWAIT_FNAME			"wait6"
#	define TWAIT_WAIT6TYPE(a,b,c,d,e,f)	wait6((a),(b),(c),(d),(e),(f))
#	define TWAIT_GENERIC(a,b,c)		\
		wait6(P_PID,(a),(b),(c)|WEXITED|WTRAPPED,NULL,NULL)
#	define TWAIT_HAVE_PID			1
#	define TWAIT_HAVE_STATUS		1
#endif

/*
 * There are 3 groups of tests:
 * - TWAIT_GENERIC()	(wait, wait2, waitpid, wait3, wait4, wait6)
 * - TWAIT_WAIT4TYPE()	(wait2, waitpid, wait3, wait4)
 * - TWAIT_WAIT6TYPE()	(waitid, wait6)
 *
 * Tests only in the above categories are allowed. However some tests are not
 * possible in the context requested functionality to be verified, therefore
 * there are helper macros:
 * - TWAIT_HAVE_PID	(wait2, waitpid, waitid, wait4, wait6)
 * - TWAIT_HAVE_STATUS	(wait, wait2, waitpid, wait3, wait4, wait6)
 * - TWAIT_HAVE_RUSAGE	(wait3, wait4)
 * - TWAIT_HAVE_RETPID	(wait, wait2, waitpid, wait3, wait4, wait6)
 *
 * If there is an intention to test e.g. wait6(2) specific features in the
 * ptrace(2) context, find the most matching group and with #ifdefs reduce
 * functionality of less featured than wait6(2) interface (TWAIT_WAIT6TYPE).
 *
 * For clarity never use negative preprocessor checks, like:
 *     #if !defined(TWAIT_WAIT4)
 * always refer to checks for positive values.
 */

/*
 * A child process cannot call atf functions and expect them to magically
 * work like in the parent.
 * The printf(3) messaging from a child will not work out of the box as well
 * without estabilishing a communication protocol with its parent. To not
 * overcomplicate the tests - do not log from a child and use err(3)/errx(3)
 * wrapped with FORKEE_ASSERT()/FORKEE_ASSERTX() as that is guaranteed to work.
 */
#define FORKEE_ASSERT(x) do{assert((x));}while(0)
#define FORKEE_ASSERTX(x) do{assert((x));}while(0)

/*
 * If waitid(2) returns because one or more processes have a state change to
 * report, 0 is returned.  If an error is detected, a value of -1 is returned
 * and errno is set to indicate the error. If WNOHANG is specified and there
 * are no stopped, continued or exited children, 0 is returned.
 */
#if defined(TWAIT_WAITID)
#define TWAIT_REQUIRE_SUCCESS(a,b)	ATF_REQUIRE((a) == 0)
#define TWAIT_REQUIRE_FAILURE(a,b)	ATF_REQUIRE_ERRNO((a),(b) == -1)
#define FORKEE_REQUIRE_SUCCESS(a,b)	FORKEE_ASSERTX((a) == 0)
#define FORKEE_REQUIRE_FAILURE(a,b)	\
	FORKEE_ASSERTX(((a) == errno) && ((b) == -1))
#else
#define TWAIT_REQUIRE_SUCCESS(a,b)	ATF_REQUIRE((a) == (b))
#define TWAIT_REQUIRE_FAILURE(a,b)	ATF_REQUIRE_ERRNO((a),(b) == -1)
#define FORKEE_REQUIRE_SUCCESS(a,b)	FORKEE_ASSERTX((a) == (b))
#define FORKEE_REQUIRE_FAILURE(a,b)	\
	FORKEE_ASSERTX(((a) == errno) && ((b) == -1))
#endif

/*
 * Helper tools to verify whether status reports exited value
 */
#if TWAIT_HAVE_STATUS
static void __used
validate_status_exited(int status, int expected)
{
        ATF_REQUIRE_MSG(WIFEXITED(status), "Reported exited process");
        ATF_REQUIRE_MSG(!WIFCONTINUED(status), "Reported continued process");
        ATF_REQUIRE_MSG(!WIFSIGNALED(status), "Reported signaled process");
        ATF_REQUIRE_MSG(!WIFSTOPPED(status), "Reported stopped process");

	ATF_REQUIRE_EQ_MSG(WEXITSTATUS(status), expected,
	    "The process has exited with invalid value");
}

static void __used
forkee_status_exited(int status, int expected)
{
	FORKEE_ASSERTX(WIFEXITED(status));
	FORKEE_ASSERTX(!WIFCONTINUED(status));
	FORKEE_ASSERTX(!WIFSIGNALED(status));
	FORKEE_ASSERTX(!WIFSTOPPED(status));

	FORKEE_ASSERTX(WEXITSTATUS(status) == expected);
}

static void __used
validate_status_continued(int status)
{
	ATF_REQUIRE_MSG(!WIFEXITED(status), "Reported exited process");
	ATF_REQUIRE_MSG(WIFCONTINUED(status), "Reported continued process");
	ATF_REQUIRE_MSG(!WIFSIGNALED(status), "Reported signaled process");
	ATF_REQUIRE_MSG(!WIFSTOPPED(status), "Reported stopped process");
}

static void __used
forkee_status_continued(int status)
{
	FORKEE_ASSERTX(!WIFEXITED(status));
	FORKEE_ASSERTX(WIFCONTINUED(status));
	FORKEE_ASSERTX(!WIFSIGNALED(status));
	FORKEE_ASSERTX(!WIFSTOPPED(status));
}

static void __used
validate_status_signaled(int status, int expected_termsig, int expected_core)
{
	ATF_REQUIRE_MSG(!WIFEXITED(status), "Reported exited process");
	ATF_REQUIRE_MSG(!WIFCONTINUED(status), "Reported continued process");
	ATF_REQUIRE_MSG(WIFSIGNALED(status), "Reported signaled process");
	ATF_REQUIRE_MSG(!WIFSTOPPED(status), "Reported stopped process");

	ATF_REQUIRE_EQ_MSG(WTERMSIG(status), expected_termsig,
	    "Unexpected signal received");

	ATF_REQUIRE_EQ_MSG(WCOREDUMP(status), expected_core,
	    "Unexpectedly core file %s generated", expected_core ? "not" : "");
}

static void __used
forkee_status_signaled(int status, int expected_termsig, int expected_core)
{
	FORKEE_ASSERTX(!WIFEXITED(status));
	FORKEE_ASSERTX(!WIFCONTINUED(status));
	FORKEE_ASSERTX(WIFSIGNALED(status));
	FORKEE_ASSERTX(!WIFSTOPPED(status));

	FORKEE_ASSERTX(WTERMSIG(status) == expected_termsig);
	FORKEE_ASSERTX(WCOREDUMP(status) == expected_core);
}

static void __used
validate_status_stopped(int status, int expected)
{
	printf("WIFSTOPPED(x)=%d\n", WIFSTOPPED(status));
	printf("WIFCONTINUED(x)=%d\n", WIFCONTINUED(status));
	printf("WIFSIGNALED(x)=%d\n", WIFSIGNALED(status));
	printf("WIFEXITED(x)=%d\n", WIFEXITED(status));
	printf("WSTOPSIG(status)=0x%x\n", WSTOPSIG(status));
	ATF_REQUIRE_MSG(!WIFEXITED(status), "Reported exited process");
	ATF_REQUIRE_MSG(!WIFCONTINUED(status), "Reported continued process");
	ATF_REQUIRE_MSG(!WIFSIGNALED(status), "Reported signaled process");
	ATF_REQUIRE_MSG(WIFSTOPPED(status), "Reported stopped process");

	ATF_REQUIRE_EQ_MSG(WSTOPSIG(status), expected,
	    "Unexpected stop signal received");
}

static void __used
forkee_status_stopped(int status, int expected)
{
	FORKEE_ASSERTX(!WIFEXITED(status));
	FORKEE_ASSERTX(!WIFCONTINUED(status));
	FORKEE_ASSERTX(!WIFSIGNALED(status));
	FORKEE_ASSERTX(WIFSTOPPED(status));

	FORKEE_ASSERTX(WSTOPSIG(status) == expected);
}
#else
#define validate_status_exited(a,b)
#define forkee_status_exited(a,b)
#define validate_status_continued(a,b)
#define forkee_status_continued(a,b)
#define validate_status_signaled(a,b,c)
#define forkee_status_signaled(a,b,c)
#define validate_status_stopped(a,b)
#define forkee_status_stopped(a,b)
#endif

#if defined(TWAIT_HAVE_PID)
/* This function is currently designed to be run in the main/parent process */
static void
await_zombie(pid_t process)
{
#if defined(__NetBSD__)
	struct kinfo_proc2 p;
	size_t len = sizeof(p);

	const int name[] = {
		[0] = CTL_KERN,
		[1] = KERN_PROC2,
		[2] = KERN_PROC_PID,
		[3] = process,
		[4] = sizeof(p),
		[5] = 1
	};

	const size_t namelen = __arraycount(name);

	/* Await the process becoming a zombie */
	while(1) {
		ATF_REQUIRE(sysctl(name, namelen, &p, &len, NULL, 0) == 0);

		if (p.p_stat == LSZOMB)
			break;

		ATF_REQUIRE(usleep(1000) == 0);
	}
#elif defined(__FreeBSD__)
	struct kinfo_proc p;
	size_t len = sizeof(p);

	const int name[] = {
		[0] = CTL_KERN,
		[1] = KERN_PROC,
		[2] = KERN_PROC_PID,
		[3] = process
	};

	const size_t namelen = __arraycount(name);

	/* Await the process becoming a zombie */
	while(1) {
		if(sysctl(name, namelen, &p, &len, NULL, 0) == -1) {
			if (errno == ESRCH)
				break;
			err(EXIT_FAILURE, "sysctl");
		}

		ATF_REQUIRE(usleep(1000) == 0);
	}
#elif defined(linux)
	int iszombie = 0;
	char pbuf[60];
	snprintf(pbuf, sizeof(pbuf), "/proc/%d/stat", (int)process);

	/* Detect that tracee is zombie */
	while(1) {
		FILE* fpstat = fopen(pbuf, "r");
		if (!fpstat) {
			err(EXIT_FAILURE, "fopen");
		};
		int rpid =0; char rcmd[32]; char rstatc = 0;
		fscanf(fpstat, "%d %30s %c", &rpid, rcmd, &rstatc);
		iszombie = rstatc == 'Z';

		fclose(fpstat);
		if (iszombie == 1) {
			break;
		}

		usleep(1000);
	}
#endif
}
#endif

int
main(int argc, char **argv)
{
	int fds_totracee[2], fds_fromtracee[2];
	int rv;
	const int exitval_tracee = 5;
	pid_t tracee, wpid;
	uint8_t msg = 0xde; /* dummy message for IPC based on pipe(2) */
#if defined(TWAIT_HAVE_STATUS)
	int status;
#endif

	printf("Spawn tracee\n");
	ATF_REQUIRE(pipe(fds_totracee) == 0);
	ATF_REQUIRE(pipe(fds_fromtracee) == 0);
	tracee = atf_utils_fork();
	if (tracee == 0) {
		FORKEE_ASSERT(close(fds_totracee[1]) == 0);
		FORKEE_ASSERT(close(fds_fromtracee[0]) == 0);

		/* Wait for message from the parent */
		rv = read(fds_totracee[0], &msg, sizeof(msg));
		FORKEE_ASSERT(rv == sizeof(msg));

		/* Wait for message from the parent */
		rv = write(fds_fromtracee[1], &msg, sizeof(msg));
		FORKEE_ASSERT(rv == sizeof(msg));

		printf("ccc!\n");fflush(stdout);

		_exit(exitval_tracee);
	}
	ATF_REQUIRE(close(fds_totracee[0]) == 0);
	ATF_REQUIRE(close(fds_fromtracee[1]) == 0);

	printf("Wait for the tracee to become ready\n");
	rv = write(fds_totracee[1], &msg, sizeof(msg));
	ATF_REQUIRE(rv == sizeof(msg));

	printf("Before calling PT_ATTACH for tracee %d\n", tracee);
	ATF_REQUIRE(ptrace(PT_ATTACH, tracee, NULL, 0) != -1);

	printf("Wait for the stopped tracee process with %s()\n",
	    TWAIT_FNAME);
	TWAIT_REQUIRE_SUCCESS(
	    wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);

#ifdef __NetBSD__
	validate_status_stopped(status, SIGTRAP);
#else
	validate_status_stopped(status, SIGSTOP);
#endif

	printf("Resume tracee with PT_CONTINUE\n");
	ATF_REQUIRE(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);

	printf("Let the tracee exit now\n");
	rv = read(fds_fromtracee[0], &msg, sizeof(msg));
	ATF_REQUIRE(rv == sizeof(msg));

	printf("Wait for tracee to exit with %s()\n", TWAIT_FNAME);
	TWAIT_REQUIRE_SUCCESS(
	    wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);

	validate_status_exited(status, exitval_tracee);

	printf("Before calling %s() for tracee\n", TWAIT_FNAME);
	wpid = TWAIT_GENERIC(tracee, &status, 0);
	assert(wpid == -1);
	assert(errno == ECHILD);

	printf("fds_fromtracee is no longer needed - close it\n");
	ATF_REQUIRE(close(fds_fromtracee[0]) == 0);

	printf("fds_totracee is no longer needed - close it\n");
	ATF_REQUIRE(close(fds_totracee[1]) == 0);
}

>Fix:
N/A

>Release-Note:

>Audit-Trail:
From: "Kamil Rytarowski" <kamil@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51621 CVS commit: src/tests/kernel
Date: Fri, 11 Nov 2016 12:01:14 +0000

 Module Name:	src
 Committed By:	kamil
 Date:		Fri Nov 11 12:01:14 UTC 2016

 Modified Files:
 	src/tests/kernel: t_ptrace_wait.c

 Log Message:
 Add new test t_ptrace_attach3 in t_ptrace

 Assert that tracer parent can PT_ATTACH to its child.
 This test is for all members of the wait(2) family.

 Currently it is marked as an explicit failure PR kern/51621.

 I faced the following issues (noted and discussed in the bug report):

 - PT_ATTACH seems to work, but waiting for stopped status and signal from the
   child results in getting SIGTRAP, not SIGSTOP like in Linux and FreeBSD. This
   might be by design, I'm unsure. However, so far I was getting SIGSTOP from a
   tracer process that was not the parent. SIGSTOP vs SIGTRAP logic also
   complicates the things up as tracer must check whether is a parent for tracee
   or not - this shouldn't be needed.

 - PT_CONTINUE seems to have no effect at all, the child hangs. This operation
   works on Linux and FreeBSD and in the end, test passes correctly.

 - Debugging this with gdb(1) results in receiving SIGABRT from the GNU
   debugger (in the moment of raising/receiving SIGTRAP). This is making the
   things harder in general.

 Sponsored by <The NetBSD Foundation>.


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 src/tests/kernel/t_ptrace_wait.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Kamil Rytarowski <n54@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Fwd: Re: kern/51621: PT_ATTACH from a parent is unreliable
Date: Fri, 11 Nov 2016 13:47:49 +0100

 This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
 --oJqus1d4f6G0HeEnOdHL1BguGXo4pQ88w
 Content-Type: multipart/mixed; boundary="dsKGnfI3X6HaEQOXhfW3ExLxgujBpG2nV"
 From: Kamil Rytarowski <n54@gmx.com>
 To: gnats-bugs@NetBSD.org
 Message-ID: <c4691439-a9e0-263a-d066-cf5e2c955be5@gmx.com>
 Subject: Fwd: Re: kern/51621: PT_ATTACH from a parent is unreliable
 References: <Pine.NEB.4.64.1611112045310.10724@speedy.whooppee.com>
 In-Reply-To: <Pine.NEB.4.64.1611112045310.10724@speedy.whooppee.com>

 --dsKGnfI3X6HaEQOXhfW3ExLxgujBpG2nV
 Content-Type: text/plain; charset=windows-1252
 Content-Transfer-Encoding: quoted-printable




 -------- Forwarded Message --------
 Subject: Re: kern/51621: PT_ATTACH from a parent is unreliable
 Date: Fri, 11 Nov 2016 20:45:52 +0800 (PHT)
 From: Paul Goyette <paul@whooppee.com>
 To: Kamil Rytarowski <n54@gmx.com>

 On Fri, 11 Nov 2016, Kamil Rytarowski wrote:

 > On 11.11.2016 12:36, Paul Goyette wrote:
 >> This PR got me thinking....
 >>
 >> What happens if a child process attempts to attach to its own parent? =
 Do
 >> we get all the signalling correct?  Does the parent still succeed when=

 >> wait(2) for the child?
 >>
 >> Sorry, just thinking about possible pathological situations.  :)
 >>
 >
 > This is currently uncovered (we are talking only PT_ATTACH, as
 > PT_TRACE_ME is already functional). I will add a test for it as well.
 >
 > There is another flaw, and I forgot to add it in the original PR; in th=
 e
 > documentation signal(7) redirects in SIGTRAP details to ptrace(2) but
 > there is no single word on SIGTRAP in the debugging interface man-page.=

 >
 > Signaling shall be described in details in ptrace(2) - not just that
 > something is stopped by a signal, but with a specification what exact
 > signal.
 >
 >
 > Can I CC gnats this message?

 Certainly!


 +------------------+--------------------------+------------------------+
 | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
 | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
 | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
 +------------------+--------------------------+------------------------+


 --dsKGnfI3X6HaEQOXhfW3ExLxgujBpG2nV--

 --oJqus1d4f6G0HeEnOdHL1BguGXo4pQ88w
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2

 iQIcBAEBCAAGBQJYJb38AAoJEEuzCOmwLnZsnHYP/2nfu68T5PXgw68Zy7YOeDm0
 JZy5FRQRg3uYDA1Qvl+S+I88wUybSmmTfU9Wq0at+zhx7paI7rGwZBYcKaBBD/JX
 WT57JuEGDO9SFMXvN+jJ0dhI/wRg/vtnyAHO/UXsXl35msdyF4y+Ue3gUfQe7+Fw
 g3qXHykLksT5Tl9CeIvB8Arzr2xHqsv0B8hPavyVuyfQQ4hHUKsHfiFnnQBMRSf4
 elu2taKDKSNcVUx3LX3xJAmgESljdgFR5geJgNSuwW+8sgk3wpt0y+LQQlhWQgEo
 Irwwfqt3NCDE8czgBFpjZGiBZ4VCNvfQnMdPWQ8Gfb1ovwT71ZGpw63z3q3hF0cY
 rmf0aU4wbafyRJOhV0WXKOid3w168PatvSLVL50fRB8KfbXhO5aRyT2E3eqHjERv
 wMiXcyS9sXsqti3sApGI7+ElxBc97pYzIMJpKKM6WKqP5i0vC1z0wRD3V0XYSlk+
 I5P3O/m8cun6getGS1gGenfRyXALgsHqGkmnH6MPuFvk+F3n/N7dcsQi2D5PU3g2
 jh584nXGeZK8xkqGUaSa3+s4Wz95dxxcdVxstHx532IDLRIkOkZ9QqATtCtwNPn4
 FTVBBgGGgu12H+jZr+un67/7b7foOGzvSgnDz4W6JQBHw2liuP79XW0Sb22p2SBT
 cb0HUu99SzwvfUWAAlXA
 =y8ua
 -----END PGP SIGNATURE-----

 --oJqus1d4f6G0HeEnOdHL1BguGXo4pQ88w--

State-Changed-From-To: open->closed
State-Changed-By: kamil@NetBSD.org
State-Changed-When: Sat, 12 Nov 2016 21:54:23 +0100
State-Changed-Why:
Fixed by Christos
Thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.