From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.4.3) Gecko/20040924 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): gdb-6.1post-1.20040607.17 How reproducible: Always 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)) dlclose(handle); 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 7.run 8.break alfa 9.cont 10.disable 2 11.run 12.enable 2 13.cont 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.
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.
Right, when I tried it now, I can't reproduce the problem on our RHEL4T1 machine. (With gdb-6.1post-1.20040607.28)
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. http://rhn.redhat.com/errata/RHBA-2004-561.html