Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 632259

Summary: ../../gdb/infrun.c:5467: internal-error after setting breakpoint in glibc-statically-linked program
Product: Red Hat Enterprise Linux 6 Reporter: Petr Muller <pmuller>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: ebachalo, ohudlick
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
GDB aborted unexpectedly if you set breakpoints on GNU-IFUNC functions and started the debugged program because the breakpoints could not resolve the target functions of the GNU-IFUNC functions at program startup. Breakpoints on GNU-IFUNC functions are now resolved when the program calls the target function.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:48:16 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: 624967    
Bug Blocks:    

Description Petr Muller 2010-09-09 14:29:25 UTC
Description of problem:
During bug 631011 testing, I tried to use gdb for looking into what is executing in the testcase. I tried to set a breakpoint on 'strspn' function, and run the testcase. An internal error followed.

Testcase:

# cat static.c
#include <stdio.h>
#include <string.h>

int main (int argc, char *argv[]){
   char strtext[] = "129th";
   char cset[]    = "1234567890";
   int i;

   i = strspn( strtext, cset );
   printf ( "The length of initial number is %d.\n", i );

   return 0;
}
# gcc static.c -g -static -O0 -o static64 -m64

Version-Release number of selected component (if applicable):
# rpm -q gdb
gdb-7.1-29.el6.x86_64
# rpm -q glibc
glibc-2.12-1.7.el6.x86_64

How reproducible:
seems like always (both 32 and 64 bit), but only when the testcase is compiled with -static

Steps to Reproduce:
1. obtain the binary as described above
2. gdb static64
3. b strspn
4. r
  
Actual results:
Starting program: /tmp/glibc-testing/static 

Breakpoint 1, 0x0804fa40 in strspn ()
Error in re-setting breakpoint 1: The program being debugged stopped while in a function called from GDB.
Evaluation of the expression containing the function
(strspn) will be abandoned.
When the function is done executing, GDB will silently stop.
../../gdb/infrun.c:5467: internal-error: normal_stop: Assertion `get_frame_type (frame) == DUMMY_FRAME' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n

../../gdb/infrun.c:5467: internal-error: normal_stop: Assertion `get_frame_type (frame) == DUMMY_FRAME' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n

Expected results:
no internal errors

Additional info:
The issue occurs no matter if original bug 631011 in glibc is fixed or not

Comment 1 Jan Kratochvil 2010-11-13 19:00:18 UTC
I still did not push the new variant of archer-jankratochvil-ifunc.
Not sure yet whether I will find the time to finish the new variant or just fix-up this problem.

Comment 6 Eva Kopalova 2011-04-05 15:55:59 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
GDB aborted unexpectedly if you set breakpoints on GNU-IFUNC functions and started the debugged program because the breakpoints could not resolve the target functions of the GNU-IFUNC functions at program startup. Breakpoints on GNU-IFUNC functions are now resolved when the program calls the target function.

Comment 8 errata-xmlrpc 2011-05-19 13:48:16 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0638.html