kern/139425: Wrong behavior of KTR_VERBOSE

Alexander Zagrebin alexz at visp.ru
Thu Oct 8 12:00:13 UTC 2009


>Number:         139425
>Category:       kern
>Synopsis:       Wrong behavior of KTR_VERBOSE
>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:   Thu Oct 08 12:00:11 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Zagrebin
>Release:        FreeBSD 8.0-RC1
>Organization:
>Environment:
FreeBSD xxxxxxx 8.0-RC1 FreeBSD 8.0-RC1 #5: Fri Oct  2 23:10:02 MSD 2009     alex at xxxxxxx:/usr/src/sys/i386/compile/KERNEL  i386
>Description:
ktr(4) says, that KTR_VERBOSE option only sets the default value for the debug.ktr.verbose environment variable.
But really debug.ktr.verbose is not available without this option.
So behavior of the KTR_VERBOSE differs from behavior, described in the manual page.
>How-To-Repeat:
Add "options KTR" to the kernel config; recompile kernel; reboot

# sysctl debug.ktr.verbose
sysctl: unknown oid 'debug.ktr.verbose'

Add "options KTR_VERBOSE" to the kernel config; recompile kernel; reboot

# sysctl debug.ktr.verbose
debug.ktr.verbose: 0
>Fix:
It depends :)
Or /usr/src/sys/kern/kern_ktr.c or ktr(4) manual page have to be fixed

May be:

--- kern_ktr.c.orig     2009-09-30 09:31:37.000000000 +0400
+++ kern_ktr.c  2009-10-08 15:52:02.000000000 +0400
@@ -124,9 +124,11 @@

 #ifdef KTR_VERBOSE
 int    ktr_verbose = KTR_VERBOSE;
+#else
+int    ktr_verbose = 0;
+#endif
 TUNABLE_INT("debug.ktr.verbose", &ktr_verbose);
 SYSCTL_INT(_debug_ktr, OID_AUTO, verbose, CTLFLAG_RW, &ktr_verbose, 0, "");
-#endif

 #ifdef KTR_ALQ
 struct alq *ktr_alq;


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list