[opensuse] gdb/corefile question
Wondering if someone here might be able to help me out with a weird (at least to me) gdb issue... openSUSE 11.0, trying to obtain a core file (via gdb or whatever means) for a program that's segfaulting so the developer can diagnose the problem further. I've set the core limit to unlimited (both in limits.conf and using ulimit -c) but I don't get a core. I don't see any condition that would prevent a core file from being written (cwd is writable, binary is readable, no suid stuff in use at all with it, /proc/kernel settings are for a corefile called "core" with no PID in the cwd) I thought that I might get around this by running the program under gdb. But when the program segfaults, gdb immediately tells me that the program no longer exists and won't give me a backtrace or any useful debugging information. In fact, it doesn't even give me any useless debugging information. I had done a little reading and found the "catch signal" command, but it seems that gdb 6.8 (on 11.0) doesn't have this feature implemented. What other options do I have to get a core from this program? Thanks, Jim -- Jim Henderson Please keep on-topic replies on the list so everyone benefits -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
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
On Tuesday 02 June 2009 05:40:57 pm Philipp Thomas wrote: ...
You might also get better help on the opensuse-programming mailing list.
Programming seems to be dead silent since January, 2009. -- Regards, Rajko http://news.opensuse.org/category/people-of-opensuse/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Rajko M. wrote:
On Tuesday 02 June 2009 05:40:57 pm Philipp Thomas wrote: ...
You might also get better help on the opensuse-programming mailing list.
Programming seems to be dead silent since January, 2009.
It was never overly active. But not posting just because it's quiet will only make the silence louder. /Per -- Per Jessen, Zürich (0.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
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
). 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@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Jim Henderson
-
Per Jessen
-
Philipp Thomas
-
Rajko M.