gdb crashes with Solaris 10 x86

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

gdb crashes with Solaris 10 x86

Walter, Richard

I have to debug a network gateway program with gdb 6.3.50.20051108. When
the network connection is started the program gets a segmentation fault.
When i run the program with gdb, the gdb crashes.
The program is compiled with gcc 3.4.3.
gdb 6.2.1 and 6.3 have the same problem.

Output from program running with gdb:
--pointer agatename=810426c
Segmentation Fault (core dumped)


Output from the program running with solaris truss:
write(1, " t _ l i s t e n   c o m".., 49)      = 49
--pointer agatename=810426c
write(1, " - - p o i n t e r   a g".., 28)      = 28
    Incurred fault #6, FLTBOUNDS  %pc = 0x0805676D
      siginfo: SIGSEGV SEGV_MAPERR addr=0x0805676D
    Received signal #11, SIGSEGV [default]
      siginfo: SIGSEGV SEGV_MAPERR addr=0x0805676D


Is this a gdb bug ?
Reply | Threaded
Open this post in threaded view
|

Re: gdb crashes with Solaris 10 x86

Daniel Jacobowitz-2
On Wed, Nov 09, 2005 at 03:43:21PM +0100, Richard Walter wrote:

>
> I have to debug a network gateway program with gdb 6.3.50.20051108. When
> the network connection is started the program gets a segmentation fault.
> When i run the program with gdb, the gdb crashes.
> The program is compiled with gcc 3.4.3.
> gdb 6.2.1 and 6.3 have the same problem.
>
> Output from program running with gdb:
> --pointer agatename=810426c
> Segmentation Fault (core dumped)
>
>
> Output from the program running with solaris truss:
> write(1, " t _ l i s t e n   c o m".., 49)      = 49
> --pointer agatename=810426c
> write(1, " - - p o i n t e r   a g".., 28)      = 28
>     Incurred fault #6, FLTBOUNDS  %pc = 0x0805676D
>       siginfo: SIGSEGV SEGV_MAPERR addr=0x0805676D
>     Received signal #11, SIGSEGV [default]
>       siginfo: SIGSEGV SEGV_MAPERR addr=0x0805676D
>
>
> Is this a gdb bug ?

I don't know.  You didn't say what platform this is (SPARC Solaris?
AMD64?  What version?)  or what GDB is doing when it crashes.

--
Daniel Jacobowitz
CodeSourcery, LLC
Reply | Threaded
Open this post in threaded view
|

Re: gdb crashes with Solaris 10 x86

Walter, Richard
There are two platforms where the problem occurs, a sunfire with 2 AMD
processors and a virtual machine on vmware.
The OS is Solaris 10 X86 03/05

When the segmentation fault happens the gdb ends and i get a shell
prompt.


Daniel Jacobowitz schrieb:

>
> On Wed, Nov 09, 2005 at 03:43:21PM +0100, Richard Walter wrote:
> >
> > I have to debug a network gateway program with gdb 6.3.50.20051108. When
> > the network connection is started the program gets a segmentation fault.
> > When i run the program with gdb, the gdb crashes.
> > The program is compiled with gcc 3.4.3.
> > gdb 6.2.1 and 6.3 have the same problem.
> >
> > Output from program running with gdb:
> > --pointer agatename=810426c
> > Segmentation Fault (core dumped)
> >
> >
> > Output from the program running with solaris truss:
> > write(1, " t _ l i s t e n   c o m".., 49)      = 49
> > --pointer agatename=810426c
> > write(1, " - - p o i n t e r   a g".., 28)      = 28
> >     Incurred fault #6, FLTBOUNDS  %pc = 0x0805676D
> >       siginfo: SIGSEGV SEGV_MAPERR addr=0x0805676D
> >     Received signal #11, SIGSEGV [default]
> >       siginfo: SIGSEGV SEGV_MAPERR addr=0x0805676D
> >
> >
> > Is this a gdb bug ?
>
> I don't know.  You didn't say what platform this is (SPARC Solaris?
> AMD64?  What version?)  or what GDB is doing when it crashes.
>
> --
> Daniel Jacobowitz
> CodeSourcery, LLC
Reply | Threaded
Open this post in threaded view
|

Re: gdb crashes with Solaris 10 x86

Daniel Jacobowitz-2
On Wed, Nov 09, 2005 at 04:11:11PM +0100, Richard Walter wrote:
> There are two platforms where the problem occurs, a sunfire with 2 AMD
> processors and a virtual machine on vmware.
> The OS is Solaris 10 X86 03/05
>
> When the segmentation fault happens the gdb ends and i get a shell
> prompt.

> > I don't know.  You didn't say what platform this is (SPARC Solaris?
> > AMD64?  What version?)  or what GDB is doing when it crashes.

You've told us what your program is doing when _it_ crashes, but we
aren't trying to debug your program here; we're trying to debug GDB.
Please give us some information about what you were doing in GDB.
Preferably paste a session transcript right up to the crash.

--
Daniel Jacobowitz
CodeSourcery, LLC
Reply | Threaded
Open this post in threaded view
|

Re: gdb crashes with Solaris 10 x86

Walter, Richard
The program has a configuration file in xml format.
-bash-3.00$ gdb programname
(gdb) run configfile.xml
--program outputs--
Segmentation Fault (core dumped)
-bash-3.00$

If you need a transcript of the session i have to talk to the developer,
that he comments out his own program trace output.


Daniel Jacobowitz schrieb:

>
> On Wed, Nov 09, 2005 at 04:11:11PM +0100, Richard Walter wrote:
> > There are two platforms where the problem occurs, a sunfire with 2 AMD
> > processors and a virtual machine on vmware.
> > The OS is Solaris 10 X86 03/05
> >
> > When the segmentation fault happens the gdb ends and i get a shell
> > prompt.
>
> > > I don't know.  You didn't say what platform this is (SPARC Solaris?
> > > AMD64?  What version?)  or what GDB is doing when it crashes.
>
> You've told us what your program is doing when _it_ crashes, but we
> aren't trying to debug your program here; we're trying to debug GDB.
> Please give us some information about what you were doing in GDB.
> Preferably paste a session transcript right up to the crash.
>
> --
> Daniel Jacobowitz
> CodeSourcery, LLC
Reply | Threaded
Open this post in threaded view
|

Re: gdb crashes with Solaris 10 x86

Daniel Jacobowitz-2
On Wed, Nov 09, 2005 at 04:43:42PM +0100, Richard Walter wrote:
> The program has a configuration file in xml format.
> -bash-3.00$ gdb programname
> (gdb) run configfile.xml
> --program outputs--
> Segmentation Fault (core dumped)
> -bash-3.00$
>
> If you need a transcript of the session i have to talk to the developer,
> that he comments out his own program trace output.

Sorry, but if that's all you have to go on, you will need to debug GDB
to see where it is crashing.

Your first step should be to try a snapshot of GDB:
  ftp://sourceware.org/pub/gdb/snapshots/branch/gdb.tar.bz2

--
Daniel Jacobowitz
CodeSourcery, LLC
Reply | Threaded
Open this post in threaded view
|

Re: gdb crashes with Solaris 10 x86

Walter, Richard
I installed the snapshot and run the program with gdb as you can see in
the output. I'm not familiar with debugging gdb itself, perhaps there
are further commands to examine the problem.

/home/walter/gw22 $ gdb
GNU gdb 6.3.90_20051110
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-pc-solaris2.10".
(gdb) set verbose on
(gdb) set prompt [top]
[top] exec-file /home/walter/gw22/NBIPGW08
[top] set args /home/walter/gw22/walter.xml
[top] run
Starting program: /home/walter/gw22/NBIPGW08
/home/walter/gw22/walter.xml
PR_SYSEXIT : Exit from a traced system call Exit from SYS_execve
PR_SYSEXIT : Exit from a traced system call Exit from SYS_execve
PR_FAULTED : Incurred a traced hardware fault FLTBPT: Breakpoint trap

PR_FAULTED : Incurred a traced hardware fault FLTTRACE: Trace trap

PR_FAULTED : Incurred a traced hardware fault FLTBPT: Breakpoint trap

Reading symbols from /usr/sfw/lib/libstdc++.so.6...(no debugging symbols
found)...done.
Reading symbols from
/usr/share/src/xerces-c-src_2_6_0_gcc/lib/libxerces-c.so.26...(no
debugging symbols found)...done.
Reading symbols from /lib/libsocket.so.1...(no debugging symbols
found)...done.
Reading symbols from /lib/libnsl.so.1...(no debugging symbols
found)...done.
Reading symbols from /lib/libdl.so.1...
(no debugging symbols found)...done.
Reading symbols from /lib/libc.so.1...(no debugging symbols
found)...done.
Reading symbols from /lib/libm.so.2...(no debugging symbols
found)...done.
Reading symbols from /usr/sfw/lib/libgcc_s.so.1...(no debugging symbols
found)...done.
Reading symbols from /lib/libpthread.so.1...warning: Lowest section in
/lib/libpthread.so.1 is .dynamic at 00000074

(no debugging symbols found)...done.
Reading symbols from /lib/libgen.so.1...(no debugging symbols
found)...done.
PR_FAULTED : Incurred a traced hardware fault FLTTRACE: Trace trap

*********Programm Output***************

PR_FAULTED : Incurred a traced hardware fault FLTBOUNDS: Memory bounds
violation


Program received signal SIGSEGV, Segmentation fault.
0x0805676d in ?? ()
[top]


Daniel Jacobowitz schrieb:

>
> On Wed, Nov 09, 2005 at 04:43:42PM +0100, Richard Walter wrote:
> > The program has a configuration file in xml format.
> > -bash-3.00$ gdb programname
> > (gdb) run configfile.xml
> > --program outputs--
> > Segmentation Fault (core dumped)
> > -bash-3.00$
> >
> > If you need a transcript of the session i have to talk to the developer,
> > that he comments out his own program trace output.
>
> Sorry, but if that's all you have to go on, you will need to debug GDB
> to see where it is crashing.
>
> Your first step should be to try a snapshot of GDB:
>   ftp://sourceware.org/pub/gdb/snapshots/branch/gdb.tar.bz2
>
> --
> Daniel Jacobowitz
> CodeSourcery, LLC
Reply | Threaded
Open this post in threaded view
|

Re: gdb crashes with Solaris 10 x86

Daniel Jacobowitz-2
On Thu, Nov 10, 2005 at 09:40:15AM +0100, Richard Walter wrote:
> I installed the snapshot and run the program with gdb as you can see in
> the output. I'm not familiar with debugging gdb itself, perhaps there
> are further commands to examine the problem.

I've got no idea, sorry.


--
Daniel Jacobowitz
CodeSourcery, LLC
Reply | Threaded
Open this post in threaded view
|

Re: gdb crashes with Solaris 10 x86

Walter, Richard
I found the solution, the gdb doesn't crash anymore.
I build  the gcc-4.0.2 with the configure option --enable-debug.
Now the gdb can load the symbol tables and will stay alive when my
program crashes.

best regards

Richard

Daniel Jacobowitz schrieb:

>
> On Thu, Nov 10, 2005 at 09:40:15AM +0100, Richard Walter wrote:
> > I installed the snapshot and run the program with gdb as you can see in
> > the output. I'm not familiar with debugging gdb itself, perhaps there
> > are further commands to examine the problem.
>
> I've got no idea, sorry.
>
> --
> Daniel Jacobowitz
> CodeSourcery, LLC