Bug 1121980

Summary: Regression for vgdb
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: valgrindAssignee: Mark Wielaard <mjw>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dodji, gbenson, jakub, jan.kratochvil, mjw, mjw, palves, patrickm, philippe.waroquiers, pmuldoon, sergiodj
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: valgrind-3.10.0-4.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-01 16:53:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jan Kratochvil 2014-07-22 09:19:17 UTC
Description of problem:
I got a nightly GDB testsuite regression:
-PASS: gdb.base/valgrind-infcall.exp: target remote for vgdb
+FAIL: gdb.base/valgrind-infcall.exp: target remote for vgdb

Version-Release number of selected component (if applicable):
PASS: valgrind-3.9.0-19.svn20140715r14165.fc22.x86_64
FAIL: valgrind-3.9.0-21.svn20140718r14176.fc22.x86_64

How reproducible:
Always.

Steps to Reproduce:
/usr/bin/valgrind --vgdb-error=0 true
+
gdb true
(gdb) target remote | /usr/lib64/valgrind/../../bin/vgdb --pid=42

Actual results:
0x0000000004000d40 in ?? ()

Expected results:
0x0000000004000d40 in _start () from /lib64/ld-linux-x86-64.so.2

Additional info:
It may be also a GDB bug in the end but it is caused by the valgrind version change.  I do not know more but filing it at least as a tracker.

Comment 1 Philippe Waroquiers 2014-07-22 21:29:21 UTC
I looked at the difference in valgrind between revision 14615 and 14176.
It is unclear which change could have caused this.

Also, from what I can see, the above is a stack trace which is produced
by GDB just at startup.
At this stage, the only thing valgrind+vgdb gives to gdb is the
initial program counter.
It is then up to gdb to translate this pc in a function/object/source file.

What is the stack trace given by gdb when running true natively in gdb ?
I.e. doing:
   gdb true
   break _start (or break *0x0000000004000d40?)
   run
   bt

Philipppe

Comment 2 Jan Kratochvil 2014-08-03 17:14:10 UTC
The regression is due to Fedora local patch:
Patch1002: valgrind-3.9.0-ppc64le-functional.patch

Upstream trunk is not affected.

As tested on:
http://pkgs.fedoraproject.org/cgit/valgrind.git/tree/?h=f21&id=da645ddbb5fe9fcac281887b27d29e225ec1ff1a

PASS: svn://svn.valgrind.org/valgrind/trunk@14227
     +svn://svn.valgrind.org/vex/trunk@2911
PASS: valgrind-3.9.0-svn20140718r14176.tar.bz2
PASS: valgrind-3.9.0-svn20140718r14176.tar.bz2
     +Patch1: valgrind-3.9.0-cachegrind-improvements.patch
     +Patch2: valgrind-3.9.0-helgrind-race-supp.patch
     +Patch3: valgrind-3.9.0-stat_h.patch
     +Patch4: valgrind-3.9.0-ldso-supp.patch
     +Patch1001: valgrind-3.9.0-ppc64le-initial.patch
FAIL: valgrind-3.9.0-svn20140718r14176.tar.bz2
     +Patch1: valgrind-3.9.0-cachegrind-improvements.patch
     +Patch2: valgrind-3.9.0-helgrind-race-supp.patch
     +Patch3: valgrind-3.9.0-stat_h.patch
     +Patch4: valgrind-3.9.0-ldso-supp.patch
     +Patch1001: valgrind-3.9.0-ppc64le-initial.patch
     +Patch1002: valgrind-3.9.0-ppc64le-functional.patch

Comment 3 Mark Wielaard 2014-08-04 08:45:12 UTC
Thanks for tracking that down. valgrind-3.9.0-ppc64le-functional.patch is part of the ppc64le port:

# ppc64le
# Initial PPC LE support KDE#334384
# PPC LE functional support KDE#334834
# PPC LE testsuite change KDE#334836
# Note these require regeneration of the auto* files in %%build.
Patch1001: valgrind-3.9.0-ppc64le-initial.patch
Patch1002: valgrind-3.9.0-ppc64le-functional.patch
Patch1003: valgrind-3.9.0-ppc64le-test.patch
Patch1004: valgrind-3.9.0-ppc64le-extra.patch

In particular it is the patch attached to bug:
https://bugs.kde.org/show_bug.cgi?id=334834

I don't immediately see anything that should impact gdb integration on none-ppc64le setups. But apparently something does affect non-ppc64le setups in that patch.

Comment 4 Philippe Waroquiers 2014-08-07 23:05:04 UTC
(In reply to Mark Wielaard from comment #3)
> 
> In particular it is the patch attached to bug:
> https://bugs.kde.org/show_bug.cgi?id=334834
> 
> I don't immediately see anything that should impact gdb integration on
> none-ppc64le setups. But apparently something does affect non-ppc64le setups
> in that patch.
It might have been discovered by a code review:
"Fixed a couple of issues found by Julian during his review.  One of the issues
would have caused issues on non PPC64 systems.  Fixes were in file
coregrind/m_ume/elf.c".

So, the last version of the ppc64 patch might solve the issue.

Comment 5 Fedora Update System 2014-08-29 18:49:20 UTC
valgrind-3.9.0-26.svn20140829r14384.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/valgrind-3.9.0-26.svn20140829r14384.fc21

Comment 6 Fedora Update System 2014-08-30 04:47:41 UTC
Package valgrind-3.9.0-26.svn20140829r14384.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing valgrind-3.9.0-26.svn20140829r14384.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-9965/valgrind-3.9.0-26.svn20140829r14384.fc21
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-10-11 21:14:35 UTC
valgrind-3.10.0-4.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/valgrind-3.10.0-4.fc21

Comment 8 Fedora Update System 2014-11-01 16:53:55 UTC
valgrind-3.10.0-4.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.