kern/169350: Extraneous output when tracing writes with output
redirect to a file
W.L. Tai
t10661789 at yahoo.com
Sat Jun 23 15:30:11 UTC 2012
>Number: 169350
>Category: kern
>Synopsis: Extraneous output when tracing writes with output redirect to a file
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Jun 23 15:30:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: W.L. Tai
>Release: 9.0 stable
>Organization:
>Environment:
FreeBSD aaa.local 9.0-STABLE FreeBSD 9.0-STABLE #0: Fri Jun 22 20:51:15 HKT 2012 root at aaa.local:/usr/obj/usr/src/sys/TAI amd64
>Description:
Extraneous output when tracing writes from entry to return with output redirection to a file.
>How-To-Repeat:
Consider the following script: test-bug.d
#!/usr/sbin/dtrace -s
#pragma D option quiet
vfs::vop_read:entry, vfs::vop_write:entry
/execname != "dtrace"/
{
self->flag = 1;
}
vfs::vop_read:return, vfs::vop_write:return
/self->flag/
{
this->flag = 1;
self->flag = 0;
}
vfs::vop_read:return, vfs::vop_write:return
/this->flag/
{
printf("%s\n", execname);
}
After running
dtrace -s test-bug.d -n 'tick-5s { exit(0); }' > /tmp/test
the file /tmp/test would contains lines with dtrace, which should not be there. Somehow dtrace has inherit the value of this->flag.
>Fix:
Work around:
Either continue to use self->flag or use the predicate
/this->flag && execname != "dtrace"/
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list