NetBSD Problem Report #55587

From martin@aprisoft.de  Wed Aug 19 10:07:05 2020
Return-Path: <martin@aprisoft.de>
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B56DE1A9217
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 19 Aug 2020 10:07:05 +0000 (UTC)
Message-Id: <20200819100657.466DC5CC7A5@emmas.aprisoft.de>
Date: Wed, 19 Aug 2020 12:06:57 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: ptrace tests failing
X-Send-Pr-Version: 3.95

>Number:         55587
>Category:       port-arm
>Synopsis:       ptrace tests failing
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-arm-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 19 10:10:00 +0000 2020
>Closed-Date:    Sat Oct 17 06:01:36 +0000 2020
>Last-Modified:  Sat Oct 17 06:01:36 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.71
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD h-pulse.aprisoft.de 9.99.71 NetBSD 9.99.71 (GENERIC64) #153: Tue Aug 18 19:44:24 CEST 2020 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/evbarm/compile/GENERIC64 evbarm
Architecture: aarch64
Machine: evbarm
>Description:

In my aarch64 test runs ~50 of the ptrace tests are failing on aarch64,
most reporting:

src/tests/lib/libc/sys/t_ptrace_bytetransfer_wait.h:808: errno != EINVAL

and some:

src/tests/lib/libc/sys/t_ptrace_wait.h:242: Reported !exited process


>How-To-Repeat:

cd /usr/test/lib/libc/sys && atf-run 

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Rin Okuyama <rokuyama.rk@gmail.com>
To: gnats-bugs@netbsd.org, port-arm-maintainer@netbsd.org,
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: port-arm/55587: ptrace tests failing
Date: Sat, 17 Oct 2020 14:58:33 +0900

 On 2020/08/19 19:10, martin@NetBSD.org wrote:
 > In my aarch64 test runs ~50 of the ptrace tests are failing on aarch64,
 > most reporting:
 > 
 > src/tests/lib/libc/sys/t_ptrace_bytetransfer_wait.h:808: errno != EINVAL
 > 
 > and some:
 > 
 > src/tests/lib/libc/sys/t_ptrace_wait.h:242: Reported !exited process

 For the former, return value from the fault handler was incorrect.
 For the latter, test was broken. Both have been fixed.

 -------- Forwarded Message --------
 Subject: CVS commit: src/sys/arch/aarch64/aarch64
 Date: Thu, 15 Oct 2020 22:30:34 +0000
 From: Rin Okuyama <rin@netbsd.org>
 Reply-To: source-changes-d@NetBSD.org
 To: source-changes-full@NetBSD.org

 Module Name:	src
 Committed By:	rin
 Date:		Thu Oct 15 22:30:34 UTC 2020

 Modified Files:
 	src/sys/arch/aarch64/aarch64: fault.c

 Log Message:
 For cpu_jump_onfault() in data_abort_handler(), stop returning
 hard-coded EFAULT and use return value from uvm_fault() instead.

 There are some paths that do not call uvm_fault():

 (1) For fatalabort case, use EFAULT as before.
 (2) When va range is invalid, use EFAULT instead of EINVAL.

 These change fixes bytes_transfer_eof_* tests in
 sys/lib/libc/sys/t_ptrace_wait*.

 Note that without (2) above, some tests like
 sys/lib/libc/sys/t_wait:write_error become newly failing.

 I've confirmed that there's no new regression in full ATF run.

 OK ryo


 To generate a diff of this commit:
 cvs rdiff -u -r1.19 -r1.20 src/sys/arch/aarch64/aarch64/fault.c

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

 -------- Forwarded Message --------
 Subject: CVS commit: src/tests/lib/libc/sys
 Date: Thu, 15 Oct 2020 22:59:50 +0000
 From: Rin Okuyama <rin@netbsd.org>
 Reply-To: source-changes-d@NetBSD.org
 To: source-changes-full@NetBSD.org

 Module Name:	src
 Committed By:	rin
 Date:		Thu Oct 15 22:59:50 UTC 2020

 Modified Files:
 	src/tests/lib/libc/sys: t_ptrace_core_wait.h

 Log Message:
 Apply fix in rev 1.2 for core_dump_procinfo to aarch64 and arm:

 http://cvsweb.netbsd.org/bsdweb.cgi/src/tests/lib/libc/sys/t_ptrace_core_wait.h#rev1.2

 > For powerpc, program counter is not automatically incremented by trap
 > instruction. We cannot increment PC in the trap handler, which breaks
 > applications depending on this behavior, e.g., GDB.

 This statement is true for aarch64 and arm.

 Also, use PTRACE_BREAKPOINT_SIZE instead of hard-coded 4 to address
 instruction next to PC.

 OK ryo


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_ptrace_core_wait.h

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

State-Changed-From-To: open->closed
State-Changed-By: rin@NetBSD.org
State-Changed-When: Sat, 17 Oct 2020 06:01:36 +0000
State-Changed-Why:
Fixed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.