Bug 1055155

Summary: gdb resolves symbolic links when passing argv[0]
Product: [Fedora] Fedora Reporter: Ravishankar N <ravishankar>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: gbenson, jan.kratochvil, palves, pmuldoon, sergiodj, tromey
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gdb-7.6.50.20130731-19.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-22 23:06:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ravishankar N 2014-01-19 09:15:06 UTC
Description of problem:
Already described here:https://sourceware.org/bugzilla/show_bug.cgi?id=15415#c0
I encountered it while starting glusterd with gdb. glusterd is a symlink to glusterfsd. Since gdb resolves the symlink, the program does not work as expected and terminates.

According to https://sourceware.org/bugzilla/show_bug.cgi?id=15415#c9, seems to have been fixed in gdb 7.6.1 but I am still observing it on 7.6.5 on my Fedora 20 Laptop.

Version-Release number of selected component (if applicable):
[ravi@tuxpad ~]$ gdb --version|head -n2
GNU gdb (GDB) Fedora 7.6.50.20130731-16.fc20
Copyright (C) 2013 Free Software Foundation, Inc.

[ravi@tuxpad ~]$ uname -a
Linux tuxpad 3.12.7-300.fc20.x86_64 #1 SMP Fri Jan 10 15:35:31 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
Always

Steps to Reproduce:
[ravi@tuxpad ~]$ gdb -q /usr/local/sbin/glusterd
Reading symbols from /usr/local/sbin/glusterfsd...done.
(gdb) b main
Breakpoint 1 at 0x408f98: file glusterfsd.c, line 1893.
(gdb) run
Starting program: /usr/local/sbin/glusterfsd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, main (argc=1, argv=0x7fff32e65e98) at glusterfsd.c:1893
1893    {
Missing separate debuginfos, use: debuginfo-install glibc-2.18-11.fc20.x86_64 libgcc-4.8.2-7.fc20.x86_64 openssl-libs-1.0.1e-37.fc20.x86_64 python-libs-2.7.5-9.fc20.x86_64 zlib-1.2.8-3.fc20.x86_64
(gdb) print argv[0]
$1 = 0x7fff32e6708a "/usr/local/sbin/glusterfsd"
(gdb)


Actual results:
(gdb) print argv[0]
$1 = 0x7fff32e6708a "/usr/local/sbin/glusterfsd"

Expected results:
(gdb) print argv[0]
$1 = 0x7fff32e6708a "/usr/local/sbin/glusterd"

Comment 1 Jan Kratochvil 2014-01-19 09:20:22 UTC
(In reply to Ravishankar N from comment #0)
> seems to have been fixed in gdb 7.6.1 but I am still observing it on 7.6.5

The version is gdb-7.6.50.20130731-16.fc20.x86_64, "7.6.50.*" in GDB versioning means a trunk snapshot between 7.6 and 7.7. At the time of the snapshot the fix was not yet on the 7.6 branch.

Going to backport it.

Comment 2 Fedora Update System 2014-01-19 19:11:12 UTC
gdb-7.6.50.20130731-19.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/gdb-7.6.50.20130731-19.fc20

Comment 3 Fedora Update System 2014-01-21 05:56:30 UTC
Package gdb-7.6.50.20130731-19.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gdb-7.6.50.20130731-19.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-1222/gdb-7.6.50.20130731-19.fc20
then log in and leave karma (feedback).

Comment 4 Ravishankar N 2014-01-21 15:41:46 UTC
Updated to gdb-7.6.50.20130731-19.fc20; tested and confirmed that issue is fixed.

Comment 5 Fedora Update System 2014-01-22 23:06:08 UTC
gdb-7.6.50.20130731-19.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.