NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/52118: x86: tests with debug registers sometimes fail



>Number:         52118
>Category:       kern
>Synopsis:       x86: tests with debug registers sometimes fail
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 28 03:25:00 +0000 2017
>Originator:     Kamil Rytarowski
>Release:        NetBSD 7.99.66 amd64
>Organization:
TNF
>Environment:
NetBSD chieftec 7.99.66 NetBSD 7.99.66 (GENERIC) #3: Tue Mar 28 02:01:26 CEST 2017  root@chieftec:/public/netbsd-root/sys/arch/amd64/compile/GENERIC amd64
>Description:
There is race with x86 debug register ATF t_ptrace_wait tests.

These tests almost always work on amd64, i386 and usually on xen. xen seems to be the most racy. amd64 and i386 appear to be very reliable, however at least it's possible to trigger it sometimes on i386.

Example failure:

Test case: kernel/arch/x86/t_ptrace_wait4/dbregs_dr2_trap_code

Duration: 0.555134 seconds
Termination reason

FAILED: /tmp/bracket/build/2017.03.26.18.38.33-i386/src/tests/kernel/arch/x86/../../t_ptrace_wait.h:305: WSTOPSIG(status) != expected: Unexpected stop signal received [Stopped (signal)] != [Trace/BPT trap]
Standard output stream

Before forking process PID=13550
Parent process PID=13550, child's PID=802
Before calling PT_TRACE_ME from child 802
Before calling wait4() for the child
Before raising Stopped (signal) from child
Call GETDBREGS for the child process (r1)
State of the debug registers (r1):
r1[0]=0
r1[1]=0
r1[2]=0
r1[3]=0
r1[4]=0
r1[5]=0
r1[6]=ffff0ff0
r1[7]=400
Set DR2 (r1.dr[2]) to new value 46ade6
Set DR7 (r1.dr[7]) to new value 20
New state of the debug registers (r1):
r1[0]=0
r1[1]=0
r1[2]=46ade6
r1[3]=0
r1[4]=0
r1[5]=0
r1[6]=ffff0ff0
r1[7]=20
Call SETDBREGS for the child process (r1)
Call CONTINUE for the child process
Before calling wait4() for the child
check_happy(1)=1
Before raising Stopped (signal) from child
>How-To-Repeat:
Run  kernel/arch/x86/t_ptrace_wait* tests.
>Fix:
N/A



Home | Main Index | Thread Index | Old Index