Subject: kern/36658: systrace locks the system
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <jmmv@netbsd.org>
List: netbsd-bugs
Date: 07/16/2007 14:00:01
>Number: 36658
>Category: kern
>Synopsis: systrace locks the system
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 16 14:00:00 +0000 2007
>Originator: Julio M. Merino Vidal
>Release: NetBSD 4.99.23
>Organization:
>Environment:
System: NetBSD vm-nb-head 4.99.23 NetBSD 4.99.23 (GENERIC_DIAGNOSTIC) #2: Sun Jul 15 16:02:35 CEST 2007 jmmv@calypso.home.network:/Volumes/NetBSD/obj.i386/Volumes/NetBSD/src/sys/arch/i386/compile/GENERIC_DIAGNOSTIC i386
Architecture: i386
Machine: i386
>Description:
When running the systrace tool against a binary in the system
(after enabling 'options SYSTRACE' in the kernel), the machine
locks up. I cannot cancel the systrace command nor do anything
else, except type characters which are not recognized by the
system. For example, characters will keep appearing on the
console where I ran systrace, but if I switch to a different
virtual terminal and try to log in, the key presses are not
recognized.
If I later enter ddb and ask for a 'sync', the kernel spits out
a diagnostic assertion about locking. Maybe, just maybe, this
problem has been introducing with ad@'s work. But I really don't
know.
I'm not marking this as critical nor serious because systrace is
not enabled by default and supposedly it doesn't work correctly
(or at least that's what I recall hearing).
>How-To-Repeat:
Trivial. Build a kernel with 'options SYSTRACE' support and
preferably 'options DIAGNOSTIC' too and run 'systrace /bin/ls'.
I doubt that command is correct anyway, but it is enough to expose
the problem.
Example:
vm-nb-head:~> systrace /bin/ls
Error: Can't open display:
systrace: EOF on policy input request: No such file or directory
... here I hit ctrl+alt+esc ...
Stopped in pid 456.1 (systrace) at netbsd:cpu_Debugger+0x4: popl %ebp
db> sync
syncing disks... panic: kernel diagnostic assertion "lwp_locked(l, &l->l_cpu->ci_schedstate.spc_lwplock)" failed: file "/Volumes/NetBSD/src/sys/kern/kern_synch.c", line 305
Stopped in pid 456.1 (systrace) at netbsd:cpu_Debugger+0x4: popl %ebp
db>
>Fix:
Don't know.
>Unformatted: