[opensuse] Re: gdb/corefile question



On Wed, 03 Jun 2009 00:40:57 +0200, Philipp Thomas wrote:

On Tue, 2 Jun 2009 20:45:40 +0000 (UTC), you wrote:

What other options do I have to get a core from this program?

One option would be to run the program under catchsegv (i.e. catchsegv
<your_prog>). For catchsegv to give meaningfull backtraces, you should
have the -debuginfo packages of that program (if it comes from a SUSE
package) installed or have a non-stripped binary with debugging info. To
really help, you should also install the -debuginfo packages for all
involved libraries (i.e. glibc at the very least).

Your problem could stem from the fact that the memory layout when
running under gdb is sufficiently different to not cause a segfault. In
that case, I'd try running the program under valgrind.

If you have the sources for the program, I'd try adding
-D_FORTIFY_SOURCE=2 and -fstack-protector to the compiler flags (if
they've been written in C and/or C++).

You might also get better help on the opensuse-programming mailing list.

Thanks for this information, Phillipp - this helps a lot. I don't have
access to the code (it's part of the Novell Client for Linux), but I do
have access to the developer, so will pass this information along to him
as well for building the debug builds that I'm testing with.

The weird thing is that I do actually get the segfault under gdb, but the
program vanishes immediately after the segfault happens so I can't get
any debug information. I'll give the other tools you suggested a shot.

If I have further questions, I'll look into the programming list.

Jim
--
Jim Henderson
Please keep on-topic replies on the list so everyone benefits

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: [opensuse] gdb/corefile question
    ... One option would be to run the program under catchsegv (i.e. catchsegv ... For catchsegv to give meaningfull backtraces, ... the -debuginfo packages of that program ... you should also install the -debuginfo packages for all involved ...
    (SuSE)
  • Re: Call for thread testers
    ... > stability of our new threading packages. ... libthr: tends to segfault (sig11). ...
    (freebsd-hackers)
  • Re: rekall doesnt work properly on debian
    ... On Mon, 2004-09-13 at 00:18 -0700, Daniel M. wrote: ... > a database front-end, similar to Microsoft's Access, see ... > it crashes with a segfault every couple of minutes when you try to do even ... > of similar issues in rekall's mailing list, and as the program's packages ...
    (Debian-User)
  • Re: bug report advise needed
    ... after recent upgrade of several packages). ... > The main segfault is about gdm, but it seems from the output that ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)