linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PPC upstream kernel ignored DABR bug
@ 2007-11-26 22:02 Jan Kratochvil
  2007-11-27 22:35 ` Arnd Bergmann
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Kratochvil @ 2007-11-26 22:02 UTC (permalink / raw)
  To: Paul Mackerras, linuxppc-dev; +Cc: Roland McGrath

Hi,

this testcase:
	http://people.redhat.com/jkratoch/dabr-lost.c

reproduces a PPC DABR kernel bug.  The variable `variable' should not get
modified as the thread modifying it should be caught by its DABR:

$ ./dabr-lost
TID 30914: DABR 0x10012a77 NIP 0x80f6ebb318
TID 30915: DABR 0x10012a77 NIP 0x80f6ebb318
TID 30916: DABR 0x10012a77 NIP 0x80f6ebb318
TID 30914: hitting the variable
TID 30915: hitting the variable
TID 30916: hitting the variable
variable found = 30916, caught TID = 30914
TID 30916: DABR 0x10012a77
Variable got modified by a thread which has DABR still set!

At the `variable found =' line the parent ptracer found the TID thread 30916
wrote the value into the variable - despite it had DABR alrady set before.

As the behavior is dependent on the current weather I expect the scheduling
matters there.

It is important the target thread is in the `nanosleep' syscall.  If you define
WORKAROUND_SET_DABR_IN_SYSCALL in the testcase it busyloops in the userland and
the bug gets no longer reproduced.

I got it reproduced on a utrace-patched kernel on dual-CPU Power5 and Roland
McGrath reported it reproduced on the vanilla upstream kernel on a Mac G5.



Regards,
Jan Kratochvil

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

end of thread, other threads:[~2008-03-27  1:49 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-26 22:02 PPC upstream kernel ignored DABR bug Jan Kratochvil
2007-11-27 22:35 ` Arnd Bergmann
2007-11-28  8:59   ` Jan Kratochvil
2007-11-28 12:28     ` Arnd Bergmann
2007-11-28 12:45       ` Jan Kratochvil
2007-11-28 22:59   ` Geoff Levand
2007-11-29  0:13     ` Arnd Bergmann
2008-03-10  0:53       ` Luis Machado
2008-03-10 14:01         ` Jens Osterkamp
2008-03-10 15:13           ` Luis Machado
2008-03-10 19:19           ` Roland McGrath
2008-03-10 19:36             ` Luis Machado
2008-03-10 19:50               ` Olof Johansson
2008-03-10 19:54                 ` Roland McGrath
2008-03-10 22:06             ` Segher Boessenkool
2008-03-12 17:51           ` Luis Machado
2008-03-12 22:30             ` Jens Osterkamp
2008-03-13  1:47               ` Roland McGrath
2008-03-13 22:20                 ` Segher Boessenkool
2008-03-13 22:42                   ` Roland McGrath
2008-03-14  2:11                     ` Segher Boessenkool
2008-03-14  7:45                       ` Roland McGrath
2008-03-14  8:42                         ` Segher Boessenkool
2008-03-16 20:38                           ` Benjamin Herrenschmidt
2008-03-16 20:37                   ` Benjamin Herrenschmidt
2008-03-26 20:57                 ` Josh Boyer
2008-03-27  1:47                   ` Josh Boyer
2008-03-13 13:13               ` Luis Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).