NetBSD-Bugs archive

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

kern/52213: Several ptrace_wait test cases fail under DEBUG+LOCKDEBUG



>Number:         52213
>Category:       kern
>Synopsis:       Several ptrace_wait test cases fail under DEBUG+LOCKDEBUG
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 03 22:30:00 +0000 2017
>Originator:     Paul Goyette
>Release:        NetBSD 7.99.66
>Organization:
+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+
>Environment:
	
	
System: NetBSD speedy.whooppee.com 7.99.66 NetBSD 7.99.66 (SPEEDY 2017-03-24 21:50:36 UTC) #0: Fri Mar 24 22:50:09 UTC 2017 paul%speedy.whooppee.com@localhost:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/SPEEDY amd64
Architecture: x86_64
Machine: amd64
>Description:
When running the /usr/tests/lib/libc/sys/t_ptrace* tests on a kernel with
DEBUG and LOCKDEBUG, several test cases unexpectedly fail:

# atf-run t_ptrace* | atf-report
...
Failed test cases:
    t_ptrace_wait:dbregs_dr2_trap_variable_readwrite_read_4bytes, t_ptrace_wait:resume1, t_ptrace_wait3:resume1, t_ptrace_wait4:resume1, t_ptrace_waitpid:resume1

Summary for 7 test programs:
    901 passed test cases.
    5 failed test cases.
    60 expected failed test cases.
    1 skipped test cases.
# 

The failing tests generate "Expected failure" when run on a kernel with
DIAGNOSTIC but without DEBUG+LOCKDEBUG

(It is unclear if this is a failure in the kernel implementation, or if it
is a failure in the atf test code.  For now, I'm assuming the worst, and
have categoried this as a kernel bug - please feel free to correct me!)

Failure details for one example:

tc-start: 1493850103.488364, resume1
tc-so:Before forking process PID=867
tc-so:Parent process PID=867, child's PID=3944
tc-so:Before calling wait() for the child
tc-so:Before calling PT_TRACE_ME from child 3944
tc-so:Before raising Stopped (signal) from child
tc-so:Before resuming the child process where it left off and without signal to be sent
tc-so:Before calling wait() for the child - expected stopped SIGTRAP
tc-so:Before allocating memory for stack in child
tc-so:Before making context for new lwp in child
tc-so:Before creating new in child
tc-so:Send Message to parent fds
tc-so:Before reading siginfo and lwpid_t
tc-so:Before suspending LWP 2
tc-so:Wait Message from parent fds
tc-so:Before resuming the child process where it left off and without signal to be sent
tc-so:Before calling wait() for the child - expected stopped SIGINT
tc-so:Before resuming LWP 2
tc-so:Before resuming the child process where it left off and without signal to be sent
tc-so:Before calling wait() for the child - expected exited
tc-so:Before waiting for lwp 2 to exit
tc-se:t_ptrace_wait: /build/lc2/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:7288 atfu_resume1_body(): Assertion failed for: _lwp_wait(lid, NULL) == 0: Resource deadlock avoided
tc-end: 1493850103.679355, resume1, failed, Test case raised a failure but was not expecting one; reason was /build/lc2/src_ro/tests/lib/libc/sys/t_ptrace_wait.h:233: WEXITSTATUS(status) != expected: The process has exited with invalid value 1 != 5



	
>How-To-Repeat:
see above
	
>Fix:
yes, please
	

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index