Bug 59400 - gdb internal error detected when debuggin xosview
gdb internal error detected when debuggin xosview
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: gdb (Show other bugs)
7.3
alpha Linux
medium Severity medium
: ---
: ---
Assigned To: Beth Uptagrafft
Beth Uptagrafft
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-06 18:28 EST by George France
Modified: 2007-04-18 12:39 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-29 17:47:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description George France 2002-02-06 18:28:50 EST
Description of Problem:

gdb has an internal error when debuggin xosview

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

gdb-5.1-1
xosview-1.7.3-7.src.rpm

How Reproducible:

Always.

Steps to Reproduce:

1. rpm -i xosview-1.7.3-7.src.rpm 
2. cd /usr/src/redhat/SPECS
3. rpm -ba xosview.spec
4. cd /usr/src/redhat/BUILD/
5. Apply the following patch to xosview-1.7.3:

--- xosview-1.7.3-orig/linux/cpumeter.cc	Wed Feb 24 17:16:20 1999
+++ xosview-1.7.3/linux/cpumeter.cciew-1Wed Feb  6 18:24:21 2002 xosview-1.7.3/li
@@ -87,9 +87,9 @@
   }
 
   int line = -1;
-  char buf[1024];
+  char buf[8192];
   while (!stats.eof()){
-    stats.getline(buf, 1024);
+    stats.getline(buf, sizeof(buf));
     if (!stats.eof()){
       line++;
       if (!strncmp(cpuID, buf, strlen(cpuID)) && buf[strlen(cpuID)] == ' ')
@@ -112,9 +112,9 @@
   }
 
   int cpuCount = 0;
-  char buf[1024];
+  char buf[8192];
   while (!stats.eof()){
-    stats.getline(buf, 1024);
+    stats.getline(buf, sizeof(buf));
     if (!stats.eof()){
       if (!strncmp(buf, "cpu", 3) && buf[3] != ' ')
           cpuCount++;

6. cd to BUILD/xosview-1.7.3 directory
7. rebuild xosview with '-g' 
8. gdb ./xosview
9  set verbose on
10.set annotate 1
11.r

Actual Results:

(gdb) set verbose on
(gdb) set annotate 1
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/src/redhat/BUILD/xosview-1.7.3/./xosview 
Reading symbols from /usr/X11R6/lib/libXpm.so.4...done.
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Reading symbols from /usr/lib/libstdc++-libc6.2-2.so.3...done.
Reading symbols from /lib/libm.so.6.1...done.
Reading symbols from /lib/libc.so.6.1...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading in symbols for dl-debug.c...done.
Reading in symbols for rtld.c...done.
Reading in symbols for dl-init.c...done.
Reading in symbols for malloc.c...done.

Program received signal SIGSEGV, Segmentation fault.
ui-out.c:115: gdb-internal-error: push_level: Assertion `uiout->level >= 0 &&
uiout->level < MAX_UI_OUT_LEVELS' failed.
An internal GDB error was detected.  This may make further
debugging unreliable.  Continue this debugging session? (y or n)
Comment 1 Trond Eivind Glomsrxd 2002-02-06 18:41:38 EST
Assigned to the one responsible for the alpha project.
Comment 2 Tom Tromey 2002-02-08 15:22:47 EST
I looked into this a bit.
I can't reproduce it.  For me, gdb doesn't crash but instead xosview does:

[ ... ]
Reading in symbols for dl-init.c...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading in symbols for malloc.c...done.

Program received signal SIGSEGV, Segmentation fault.
0x2000034dae4 in chunk_free (ar_ptr=0x20000424ac0, p=0x120047900)
    at malloc.c:3228
3228    malloc.c: No such file or directory.
        in malloc.c
Current language:  auto; currently c

Could you perhaps debug gdb with itself and get a stack trace of the crash?
That might help.  Thanks.
Comment 3 George France 2002-04-29 17:47:08 EDT
I can not reproduce this problem, please close this item.

--George

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