public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ODEBUG: selftest warnings failed 4 != 5 (WARNING: at lib/debugobjects.c:908 check_results.constprop.9)
@ 2012-02-18  2:35 Witold Baryluk
  2012-03-01 23:18 ` richard -rw- weinberger
  0 siblings, 1 reply; 5+ messages in thread
From: Witold Baryluk @ 2012-02-18  2:35 UTC (permalink / raw)
  To: akpm
  Cc: Stephen Boyd, Thomas Gleixner, Linux Kernel Mailing List,
	Stanislaw Gruszka, Marcin Slusarz

Hello everybody,

I recently enabled a CONFIG_DEBUG_OBJECTS kconfig option, and this is what I got when booting

...
[    0.000000] Linux version 3.3.0-rc3-t43-devel-smp-00278-g4903062-dirty (baryluk@sredniczarny) (gcc version 4.6.2 (Debian 4.6.2-14) ) #27 SMP Fri Feb 17 20:13:29 CE
...
...
...
[    0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU debugfs-based tracing is enabled.
[    0.000000]  RCU lockdep checking is enabled.
[    0.000000] NR_IRQS:2304 nr_irqs:256 16
[    0.000000] CPU 0 irqstacks, hard=f5408000 soft=f540a000
[    0.000000] Extended CMOS year: 2000
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.000000] ... CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 3823 kB
[    0.000000]  per task-struct memory footprint: 1920 bytes
[    0.000000] ------------------------
[    0.000000] | Locking API testsuite:
...
...
[    0.000000] -------------------------------------------------------
[    0.000000] Good, all 218 testcases passed! |
[    0.000000] ---------------------------------
[    0.000000] ODEBUG: 14 of 14 active objects replaced
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: at lib/debugobjects.c:908 check_results.constprop.9+0x11c/0x140()
[    0.000000] Hardware name: 2669UYD
[    0.000000] ODEBUG: selftest warnings failed 4 != 5
[    0.000000] Modules linked in:
[    0.000000] Pid: 0, comm: swapper/0 Not tainted 3.3.0-rc3-t43-devel-smp-00272-g7ada1dd-dirty #25
[    0.000000] Call Trace:
[    0.000000]  [<c104a4d2>] warn_slowpath_common+0x72/0xa0
[    0.000000]  [<c1b5eb22>] ? check_results.constprop.9+0x11c/0x140
[    0.000000]  [<c1b5eb22>] ? check_results.constprop.9+0x11c/0x140
[    0.000000]  [<c104a5a3>] warn_slowpath_fmt+0x33/0x40
[    0.000000]  [<c1b5eb22>] check_results.constprop.9+0x11c/0x140
[    0.000000]  [<c1b5edb8>] debug_objects_selftest+0x1c3/0x2d1
[    0.000000]  [<c1b5efbf>] debug_objects_mem_init+0x6c/0x6e
[    0.000000]  [<c1b3a6f0>] start_kernel+0x2a7/0x33a
[    0.000000]  [<c1b3a25a>] ? obsolete_checksetup+0x95/0x95
[    0.000000]  [<c1b3a11e>] ? reserve_ebda_region+0x6b/0x6d
[    0.000000]  [<c1b3a0ac>] i386_start_kernel+0x9b/0xa2
[    0.000000] ---[ end trace 4eaa2a86a8e2da22 ]---
...

Kernel is booting however without bigger problems. I have some lockdep
problems latter, but I'm not sure if this is related (already reported
few days ago to few people including Andrew).

I cannot say when bug was introduced, because well, I noticed it just
today when inspecting some kernel messages in more detail, and because I
had previously not CONFIG_DEBUG_OBJECTS not set in kernel config.

This is IBM Thinkpad T43, with Intel Pentium-M (32-bit). Was using
gcc-4.6.2-14 from Debian sid.

Oh, It looks that it already was noticed by Stephen Boyd on -mm kernel
( https://lkml.org/lkml/2012/1/14/132 ), but now looks to happen on
mainline. Can a fix be rechecked and merged?

Or should I start using -mm kernel for testing more fresh code?

Regards,
Witek

-- 
Witold Baryluk

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ODEBUG: selftest warnings failed 4 != 5 (WARNING: at lib/debugobjects.c:908 check_results.constprop.9)
  2012-02-18  2:35 ODEBUG: selftest warnings failed 4 != 5 (WARNING: at lib/debugobjects.c:908 check_results.constprop.9) Witold Baryluk
@ 2012-03-01 23:18 ` richard -rw- weinberger
  2012-03-02 21:17   ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: richard -rw- weinberger @ 2012-03-01 23:18 UTC (permalink / raw)
  To: Witold Baryluk
  Cc: akpm, Stephen Boyd, Thomas Gleixner, Linux Kernel Mailing List,
	Stanislaw Gruszka, Marcin Slusarz

On Sat, Feb 18, 2012 at 3:35 AM, Witold Baryluk
<baryluk@smp.if.uj.edu.pl> wrote:
> Hello everybody,
>
> I recently enabled a CONFIG_DEBUG_OBJECTS kconfig option, and this is what I got when booting
>
> ...
> [    0.000000] Linux version 3.3.0-rc3-t43-devel-smp-00278-g4903062-dirty (baryluk@sredniczarny) (gcc version 4.6.2 (Debian 4.6.2-14) ) #27 SMP Fri Feb 17 20:13:29 CE
> ...
> ...
> ...
> [    0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> [    0.000000] Hierarchical RCU implementation.
> [    0.000000]  RCU debugfs-based tracing is enabled.
> [    0.000000]  RCU lockdep checking is enabled.
> [    0.000000] NR_IRQS:2304 nr_irqs:256 16
> [    0.000000] CPU 0 irqstacks, hard=f5408000 soft=f540a000
> [    0.000000] Extended CMOS year: 2000
> [    0.000000] Console: colour VGA+ 80x25
> [    0.000000] console [tty0] enabled
> [    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
> [    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
> [    0.000000] ... MAX_LOCK_DEPTH:          48
> [    0.000000] ... MAX_LOCKDEP_KEYS:        8191
> [    0.000000] ... CLASSHASH_SIZE:          4096
> [    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
> [    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
> [    0.000000] ... CHAINHASH_SIZE:          16384
> [    0.000000]  memory used by lock dependency info: 3823 kB
> [    0.000000]  per task-struct memory footprint: 1920 bytes
> [    0.000000] ------------------------
> [    0.000000] | Locking API testsuite:
> ...
> ...
> [    0.000000] -------------------------------------------------------
> [    0.000000] Good, all 218 testcases passed! |
> [    0.000000] ---------------------------------
> [    0.000000] ODEBUG: 14 of 14 active objects replaced
> [    0.000000] ------------[ cut here ]------------
> [    0.000000] WARNING: at lib/debugobjects.c:908 check_results.constprop.9+0x11c/0x140()
> [    0.000000] Hardware name: 2669UYD
> [    0.000000] ODEBUG: selftest warnings failed 4 != 5

This warning is still present.
Andrew?

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ODEBUG: selftest warnings failed 4 != 5 (WARNING: at lib/debugobjects.c:908 check_results.constprop.9)
  2012-03-01 23:18 ` richard -rw- weinberger
@ 2012-03-02 21:17   ` Andrew Morton
  2012-03-02 21:20     ` Stephen Boyd
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2012-03-02 21:17 UTC (permalink / raw)
  To: richard -rw- weinberger
  Cc: Witold Baryluk, Stephen Boyd, Thomas Gleixner,
	Linux Kernel Mailing List, Stanislaw Gruszka, Marcin Slusarz

On Fri, 2 Mar 2012 00:18:37 +0100
richard -rw- weinberger <richard.weinberger@gmail.com> wrote:

> On Sat, Feb 18, 2012 at 3:35 AM, Witold Baryluk
> <baryluk@smp.if.uj.edu.pl> wrote:
> > Hello everybody,
> >
> > I recently enabled a CONFIG_DEBUG_OBJECTS kconfig option, and this is what I got when booting
> >
> > ...
> > [ __ __0.000000] Linux version 3.3.0-rc3-t43-devel-smp-00278-g4903062-dirty (baryluk@sredniczarny) (gcc version 4.6.2 (Debian 4.6.2-14) ) #27 SMP Fri Feb 17 20:13:29 CE
> > ...
> > ...
> > ...
> > [ __ __0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> > [ __ __0.000000] Hierarchical RCU implementation.
> > [ __ __0.000000] __RCU debugfs-based tracing is enabled.
> > [ __ __0.000000] __RCU lockdep checking is enabled.
> > [ __ __0.000000] NR_IRQS:2304 nr_irqs:256 16
> > [ __ __0.000000] CPU 0 irqstacks, hard=f5408000 soft=f540a000
> > [ __ __0.000000] Extended CMOS year: 2000
> > [ __ __0.000000] Console: colour VGA+ 80x25
> > [ __ __0.000000] console [tty0] enabled
> > [ __ __0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
> > [ __ __0.000000] ... MAX_LOCKDEP_SUBCLASSES: __8
> > [ __ __0.000000] ... MAX_LOCK_DEPTH: __ __ __ __ __48
> > [ __ __0.000000] ... MAX_LOCKDEP_KEYS: __ __ __ __8191
> > [ __ __0.000000] ... CLASSHASH_SIZE: __ __ __ __ __4096
> > [ __ __0.000000] ... MAX_LOCKDEP_ENTRIES: __ __ 16384
> > [ __ __0.000000] ... MAX_LOCKDEP_CHAINS: __ __ __32768
> > [ __ __0.000000] ... CHAINHASH_SIZE: __ __ __ __ __16384
> > [ __ __0.000000] __memory used by lock dependency info: 3823 kB
> > [ __ __0.000000] __per task-struct memory footprint: 1920 bytes
> > [ __ __0.000000] ------------------------
> > [ __ __0.000000] | Locking API testsuite:
> > ...
> > ...
> > [ __ __0.000000] -------------------------------------------------------
> > [ __ __0.000000] Good, all 218 testcases passed! |
> > [ __ __0.000000] ---------------------------------
> > [ __ __0.000000] ODEBUG: 14 of 14 active objects replaced
> > [ __ __0.000000] ------------[ cut here ]------------
> > [ __ __0.000000] WARNING: at lib/debugobjects.c:908 check_results.constprop.9+0x11c/0x140()
> > [ __ __0.000000] Hardware name: 2669UYD
> > [ __ __0.000000] ODEBUG: selftest warnings failed 4 != 5
> 
> This warning is still present.
> Andrew?

Dunno, sorry.  There are only two patches to bisect through - try
reverting b84d435cc228e ("debugobjects: Extend to assert that an object
is initialized") and then feac18dda25134 ("debugobjects: Be smarter
about static objects")?  

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ODEBUG: selftest warnings failed 4 != 5 (WARNING: at lib/debugobjects.c:908 check_results.constprop.9)
  2012-03-02 21:17   ` Andrew Morton
@ 2012-03-02 21:20     ` Stephen Boyd
  2012-03-02 21:23       ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Boyd @ 2012-03-02 21:20 UTC (permalink / raw)
  To: Andrew Morton
  Cc: richard -rw- weinberger, Witold Baryluk, Thomas Gleixner,
	Linux Kernel Mailing List, Stanislaw Gruszka, Marcin Slusarz,
	Ingo Molnar

On 03/02/12 13:17, Andrew Morton wrote:
> On Fri, 2 Mar 2012 00:18:37 +0100
> richard -rw- weinberger <richard.weinberger@gmail.com> wrote:
>
>> On Sat, Feb 18, 2012 at 3:35 AM, Witold Baryluk
>> <baryluk@smp.if.uj.edu.pl> wrote:
>>> Hello everybody,
>>>
>>> I recently enabled a CONFIG_DEBUG_OBJECTS kconfig option, and this is what I got when booting
>>>
>>> ...
>>> [ __ __0.000000] Linux version 3.3.0-rc3-t43-devel-smp-00278-g4903062-dirty (baryluk@sredniczarny) (gcc version 4.6.2 (Debian 4.6.2-14) ) #27 SMP Fri Feb 17 20:13:29 CE
>>> ...
>>> ...
>>> ...
>>> [ __ __0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
>>> [ __ __0.000000] Hierarchical RCU implementation.
>>> [ __ __0.000000] __RCU debugfs-based tracing is enabled.
>>> [ __ __0.000000] __RCU lockdep checking is enabled.
>>> [ __ __0.000000] NR_IRQS:2304 nr_irqs:256 16
>>> [ __ __0.000000] CPU 0 irqstacks, hard=f5408000 soft=f540a000
>>> [ __ __0.000000] Extended CMOS year: 2000
>>> [ __ __0.000000] Console: colour VGA+ 80x25
>>> [ __ __0.000000] console [tty0] enabled
>>> [ __ __0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
>>> [ __ __0.000000] ... MAX_LOCKDEP_SUBCLASSES: __8
>>> [ __ __0.000000] ... MAX_LOCK_DEPTH: __ __ __ __ __48
>>> [ __ __0.000000] ... MAX_LOCKDEP_KEYS: __ __ __ __8191
>>> [ __ __0.000000] ... CLASSHASH_SIZE: __ __ __ __ __4096
>>> [ __ __0.000000] ... MAX_LOCKDEP_ENTRIES: __ __ 16384
>>> [ __ __0.000000] ... MAX_LOCKDEP_CHAINS: __ __ __32768
>>> [ __ __0.000000] ... CHAINHASH_SIZE: __ __ __ __ __16384
>>> [ __ __0.000000] __memory used by lock dependency info: 3823 kB
>>> [ __ __0.000000] __per task-struct memory footprint: 1920 bytes
>>> [ __ __0.000000] ------------------------
>>> [ __ __0.000000] | Locking API testsuite:
>>> ...
>>> ...
>>> [ __ __0.000000] -------------------------------------------------------
>>> [ __ __0.000000] Good, all 218 testcases passed! |
>>> [ __ __0.000000] ---------------------------------
>>> [ __ __0.000000] ODEBUG: 14 of 14 active objects replaced
>>> [ __ __0.000000] ------------[ cut here ]------------
>>> [ __ __0.000000] WARNING: at lib/debugobjects.c:908 check_results.constprop.9+0x11c/0x140()
>>> [ __ __0.000000] Hardware name: 2669UYD
>>> [ __ __0.000000] ODEBUG: selftest warnings failed 4 != 5
>> This warning is still present.
>> Andrew?
> Dunno, sorry.  There are only two patches to bisect through - try
> reverting b84d435cc228e ("debugobjects: Extend to assert that an object
> is initialized") and then feac18dda25134 ("debugobjects: Be smarter
> about static objects")?  

The fix is in -mm. Can we send the patch to Linus directly? Or perhaps
go through Ingo since he sent the pull request in the first place?

> ------------------------------------------------------
> From: Stephen Boyd <sboyd@codeaurora.org>
> Subject: debugobjects: Fix selftest for static warnings
>
> debugobjects is now printing a warning when a fixup for a NOTAVAILABLE
> object is run.  This causes the selftest to fail like:
>
> [    0.000000] ODEBUG: selftest warnings failed 4 != 5
>
> We could just increase the number of warnings that the selftest is
> expecting to see because that is actually what has changed.  But, it turns
> out that fixup_activate() was written with inverted logic and thus a fixup
> for a static object returned 1 indicating the object had been fixed, and 0
> otherwise.  Fix the logic to be correct and update the counts to reflect
> that nothing needed fixing for a static object.
>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> Reported-By: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ODEBUG: selftest warnings failed 4 != 5 (WARNING: at lib/debugobjects.c:908 check_results.constprop.9)
  2012-03-02 21:20     ` Stephen Boyd
@ 2012-03-02 21:23       ` Andrew Morton
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2012-03-02 21:23 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: richard -rw- weinberger, Witold Baryluk, Thomas Gleixner,
	Linux Kernel Mailing List, Stanislaw Gruszka, Marcin Slusarz,
	Ingo Molnar

On Fri, 02 Mar 2012 13:20:21 -0800
Stephen Boyd <sboyd@codeaurora.org> wrote:

> > Dunno, sorry.  There are only two patches to bisect through - try
> > reverting b84d435cc228e ("debugobjects: Extend to assert that an object
> > is initialized") and then feac18dda25134 ("debugobjects: Be smarter
> > about static objects")?  
> 
> The fix is in -mm. Can we send the patch to Linus directly? Or perhaps
> go through Ingo since he sent the pull request in the first place?

Oh, OK, I had that queued for Thomas to mull over.  I'll send it in
for 3.3.


From: Stephen Boyd <sboyd@codeaurora.org>
Subject: debugobjects: Fix selftest for static warnings

debugobjects is now printing a warning when a fixup for a NOTAVAILABLE
object is run.  This causes the selftest to fail like:

[    0.000000] ODEBUG: selftest warnings failed 4 != 5

We could just increase the number of warnings that the selftest is
expecting to see because that is actually what has changed.  But, it turns
out that fixup_activate() was written with inverted logic and thus a fixup
for a static object returned 1 indicating the object had been fixed, and 0
otherwise.  Fix the logic to be correct and update the counts to reflect
that nothing needed fixing for a static object.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/debugobjects.c |   14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff -puN lib/debugobjects.c~debugobjects-fix-selftest-for-static-warnings lib/debugobjects.c
--- a/lib/debugobjects.c~debugobjects-fix-selftest-for-static-warnings
+++ a/lib/debugobjects.c
@@ -818,17 +818,9 @@ static int __init fixup_activate(void *a
 		if (obj->static_init == 1) {
 			debug_object_init(obj, &descr_type_test);
 			debug_object_activate(obj, &descr_type_test);
-			/*
-			 * Real code should return 0 here ! This is
-			 * not a fixup of some bad behaviour. We
-			 * merily call the debug_init function to keep
-			 * track of the object.
-			 */
-			return 1;
-		} else {
-			/* Real code needs to emit a warning here */
+			return 0;
 		}
-		return 0;
+		return 1;
 
 	case ODEBUG_STATE_ACTIVE:
 		debug_object_deactivate(obj, &descr_type_test);
@@ -967,7 +959,7 @@ static void __init debug_objects_selftes
 
 	obj.static_init = 1;
 	debug_object_activate(&obj, &descr_type_test);
-	if (check_results(&obj, ODEBUG_STATE_ACTIVE, ++fixups, warnings))
+	if (check_results(&obj, ODEBUG_STATE_ACTIVE, fixups, warnings))
 		goto out;
 	debug_object_init(&obj, &descr_type_test);
 	if (check_results(&obj, ODEBUG_STATE_INIT, ++fixups, ++warnings))
_


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-02 21:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-18  2:35 ODEBUG: selftest warnings failed 4 != 5 (WARNING: at lib/debugobjects.c:908 check_results.constprop.9) Witold Baryluk
2012-03-01 23:18 ` richard -rw- weinberger
2012-03-02 21:17   ` Andrew Morton
2012-03-02 21:20     ` Stephen Boyd
2012-03-02 21:23       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox