Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1055186 - GDB: bracktrace gives "No stack" on trivial test program
Summary: GDB: bracktrace gives "No stack" on trivial test program
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 19
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-01-19 13:24 UTC by Jascha Wetzel
Modified: 2017-07-18 20:44 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-01-19 13:33:37 UTC
Type: Bug

Attachments (Terms of Use)

Description Jascha Wetzel 2014-01-19 13:24:49 UTC
GDB debugging seems broken in current F19.

[jascha@localhost ~]$ yum list installed | grep gcc
gcc.x86_64                             4.8.2-7.fc19                    @updates 
gcc-c++.x86_64                         4.8.2-7.fc19                    @updates 
libgcc.i686                            4.8.2-7.fc19                    @updates 
libgcc.x86_64                          4.8.2-7.fc19                    @updates 
[jascha@localhost ~]$ yum list installed | grep gdb
gdb.x86_64                             7.6.1-46.fc19                   @updates 
gdbm.x86_64                            1.10-6.fc19                     @anaconda
[jascha@localhost ~]$ cat bt_test.c 
int main()
    int* p = 0;
    return *p;
[jascha@localhost ~]$ gcc -g -o bt_test bt_test.c
[jascha@localhost ~]$ gdb bt_test
GNU gdb (GDB) Fedora 7.6.1-46.fc19
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /home/jascha/bt_test...done.
(gdb) run
Starting program: /home/jascha/bt_test 
During startup program terminated with signal SIGSEGV, Segmentation fault.
(gdb) bt
No stack.

Expected results:

Program received signal SIGSEGV, Segmentation fault.
0x080483a4 in main () at bt_test.c:4
4	    return *p;
(gdb) bt
#0  0x080483a4 in main () at bt_test.c:4

Comment 1 Jan Kratochvil 2014-01-19 13:31:06 UTC
(In reply to Jascha Wetzel from comment #0)
> During startup program terminated with signal SIGSEGV, Segmentation fault.

This means the program did not even start.  It usually means you have some special environment variables set (like LD_PRELOAD etc.) which break execution of initial shell launching the debugged program.

Try it on some newly created user and also check your /etc/profile* files.

Your testcase really works on my F-19 box.

> (gdb) bt
> No stack.

No program is running in GDB so this is correct then.

Comment 2 Jascha Wetzel 2014-01-19 13:33:13 UTC
This seems to be caused by the Nvidia driver, sorry.
Does not happen when Nouveau is used.

Comment 3 nh2 2017-07-18 20:21:51 UTC
Did you understand why this is the case?

I need to use gdb and nvidia at the same time.

Comment 4 Jan Kratochvil 2017-07-18 20:44:55 UTC
No, I do not know what is happening there.
So ask nVidia, there are sources from GDB but no sources from nVidia.
Therefore only nVidia can fix it, moreover it looks as an nVidia bug.

Note You need to log in before you can comment on or make changes to this bug.