Bug 135822 - gdb loops when application unloads library with breakpoint
gdb loops when application unloads library with breakpoint
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gdb (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnston
Jay Turner
Depends On:
  Show dependency treegraph
Reported: 2004-10-15 05:34 EDT by Göran Uddeborg
Modified: 2015-01-07 19:08 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-20 17:36:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:561 normal SHIPPED_LIVE Updated gdb and libunwind packages 2004-12-21 00:00:00 EST

  None (edit)
Description Göran Uddeborg 2004-10-15 05:34:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.4.3)

Description of problem:
If you run an application which opens some library with dlopen(), puts
a breakpoint in the directory, and then the application closes the
library with dlclose(), gdb will start looping during the dlclose()
call the second time you run the application.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Create a file main.c with this content:
#include <dlfcn.h>

int main()
  void *handle;
  if (handle = dlopen("./liblyra.so", RTLD_LAZY))
  return 0;

2.Create a file lyra.c with this content
void alfa() {}

3.cc -g -o main main.c -ldl
4.cc -g -o liblyra.so -shared lyra.c
5.gdb main
6.(The rest is in gdb)
  break dlclose
8.break alfa
10.disable 2
12.enable 2

Actual Results:  The last "cont" never returns, and gdb starts looping
with 100% CPU usage.

Expected Results:  The application should terminate, just like the
first time it was run.

Additional info:

This has been verified on i386 and x86_64 platforms.
Comment 1 Jeff Johnston 2004-10-20 17:36:17 EDT
This bug was fixed as part of bugzilla 128618 and the fix is found in
rh gdb as of version .27 and will be part of the next errata release
of gdb.  I have confirmed the problem is fixed and that the
application continues to termination as expected.
Comment 2 Göran Uddeborg 2004-10-22 02:37:40 EDT
Right, when I tried it now, I can't reproduce the problem on our
RHEL4T1 machine.  (With gdb-6.1post-1.20040607.28)
Comment 3 John Flanagan 2004-12-21 14:37:20 EST
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 the 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.


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