Bug 437970

Summary: ppc kernel hardware watchpoint support
Product: Red Hat Enterprise Linux 5 Reporter: Jan Kratochvil <jan.kratochvil>
Component: kernelAssignee: Ameet Paranjape <aparanja>
Status: CLOSED DUPLICATE QA Contact: Martin Jenner <mjenner>
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: luisgpm, peterm, roland
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-05 17:30:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 253117, 439619, 469749    
Attachments:
Description Flags
Upstream fix. none

Description Jan Kratochvil 2008-03-18 14:10:52 UTC
Description of problem:
There was a request for GDB (Bug 253117) to support hardware watchpoints in
RHEL-5.2.
But it still does not (reliably) work as it is broken even upstream.
No one knows if it is a kernel or hardware problem.

Version-Release number of selected component (if applicable):
Not found the right kernel/RHEL-5 combo machine in RH.
All the Fedora kernels (such as kernel-2.6.25-0.121.rc5.git4.fc9.ppc64).
All the upstream kernels.

How reproducible:
99% of runs with enough (>16) threads (set by THREADS).

Steps to Reproduce:
1. wget -O ppc-dabr-race.c
'http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/tests/ptrace-tests/tests/ppc-dabr-race.c?cvsroot=systemtap'
2. gcc -o ppc-dabr-race ppc-dabr-race.c -Wall -ggdb2 -m32 -D_GNU_SOURCE -pthread
3. ./ppc-dabr-race ;echo $?

Actual results:
1
Tested on: ppc03.englab.brq.redhat.com
kernel-2.6.25-0.121.rc5.git4.fc9.ppc64
Dual:
cpu             : POWER5 (gr)
clock           : 1502.496000MHz
revision        : 2.2 (pvr 003a 0202)

Expected results:
0

Additional info:
Compile with -DDEBUG to see why it fails.
It was discussed upstream with IBM, mail threads at:
  http://ozlabs.org/pipermail/linuxppc-dev/2007-November/thread.html#46951
  http://ozlabs.org/pipermail/linuxppc-dev/2008-March/thread.html#52788

-m64 has the same error as -m32.

Return code 77 means the kernel/CPU combo does not support hardware watchpoints.

Comment 1 Roland McGrath 2008-03-28 21:40:15 UTC
See upstream commit a2ceff5e555e664751bc653a4d9b133efa18c742,
seems to have fixed it.

Comment 2 Jan Kratochvil 2008-03-29 17:30:27 UTC
Created attachment 299586 [details]
Upstream fix.

Comment 3 RHEL Program Management 2008-07-25 17:05:18 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 4 Ludek Smid 2008-07-25 21:54:27 UTC
Unfortunately the previous automated notification about the
non-inclusion of this request in Red Hat Enterprise Linux 5.3 used
the wrong text template. It should have read: this request has been
reviewed by Product Management and is not planned for inclusion
in the current minor release of Red Hat Enterprise Linux.

If you would like this request to be reviewed for the next minor
release, ask your support representative to set the next rhel-x.y
flag to "?" or raise an exception.

Comment 5 Ameet Paranjape 2009-02-05 16:01:16 UTC
I tested this on the *.128 kernel for RHEL5.3 and the test case passed.

Kernel version:
[root@ibm-p5-185-01 ~]# uname -a
Linux ibm-p5-185-01.rhts.bos.redhat.com 2.6.18-128.el5 #1 SMP Wed Dec 17 11:58:23 EST 2008 ppc64 ppc64 ppc64 GNU/Linux

Test case results:
[root@ibm-p5-185-01 ~]# ./ppc-dabr-race ;echo $?
0
[root@ibm-p5-185-01 ~]#

If there are no objections, I would like to close this as fixed in the latest release.  I'll wait until Friday, 2/20 for a response.

Comment 6 Jan Kratochvil 2009-02-05 17:30:47 UTC

*** This bug has been marked as a duplicate of bug 444076 ***

Comment 7 Jan Kratochvil 2009-02-05 17:33:17 UTC
As Bug 444076 is not public, it should (with no guarantees) be found in RHEL-5.3:
linux-2.6-ppc64-missed-hw-breakpoints-across-multiple-threads.patch
-  [ppc64] missed hw breakpoints across multiple threads (Brad Peters ) [444076]