Discussion:
SIGSEGV informations
(too old to reply)
Serge Wenger
2005-08-12 09:24:33 UTC
Permalink
Hello,

I run on Linux.I have a big multithread application with many dynamic
library. Sometimes I receive a SIGSEGV.

How is it possible to obtain more informations, call stack or something else
to help me to find my bug(s)?

Thanks for all suggestions.

Serge
tosoAplos
2005-08-12 11:14:31 UTC
Permalink
Post by Serge Wenger
Hello,
I run on Linux.I have a big multithread application with many dynamic
library. Sometimes I receive a SIGSEGV.
How is it possible to obtain more informations, call stack or
something else to help me to find my bug(s)?
man gdb

Good luck,
Apostolos
--
Replace earth.space with gmail.com for a valid e-mail
Serge Wenger
2005-08-17 09:06:55 UTC
Permalink
Thank for the suggestion.

It was not what I hope. I search for a method to give the call stack when an
error occurs on a customer machine, not only on development machine.

Thanks

Serge
Post by tosoAplos
Post by Serge Wenger
Hello,
I run on Linux.I have a big multithread application with many dynamic
library. Sometimes I receive a SIGSEGV.
How is it possible to obtain more informations, call stack or
something else to help me to find my bug(s)?
man gdb
Good luck,
Apostolos
--
Replace earth.space with gmail.com for a valid e-mail
tosoAplos
2005-08-17 10:07:12 UTC
Permalink
Please don't top-post. You can use OE-QuoteFix for a proper arrangement
of quotes ( http://home.in.tum.de/~jain/software/oe-quotefix/ )
Post by Serge Wenger
Post by tosoAplos
Post by Serge Wenger
I run on Linux.I have a big multithread application with many dynamic
library. Sometimes I receive a SIGSEGV.
How is it possible to obtain more informations, call stack or
something else to help me to find my bug(s)?
man gdb
Apostolos
Thank for the suggestion.
It was not what I hope. I search for a method to give the call stack when an
error occurs on a customer machine, not only on development machine.
Serge
If you have the source, you can use assert(), or other debugging
techniques, in certain places of your code to find out what's wrong.

If you don't have the source code, I know gdb can do remote debugging
but I've never used it remotely.

Apostolos
--
Replace earth.space with gmail.com for a valid e-mail
Paul Pluzhnikov
2005-08-18 03:43:27 UTC
Permalink
Post by Serge Wenger
Thank for the suggestion.
Please do not top-post:
http://catb.org/~esr/jargon/html/T/top-post.html
Post by Serge Wenger
It was not what I hope. I search for a method to give the call stack when an
error occurs on a customer machine, not only on development machine.
The exact same method works on the customer machine.
Just ask customer to run your program under gdb.

There are also routines in glibc, which allow you to print crash
stack trace: backtrace() and backtrace_symbols() [do "info libc"
-> Backtraces].

You'll have to install a SIGSEGV handler, print the stack trace
and abort(). Further details here:
http://groups.google.com/group/comp.os.linux.development.apps/msg/0e4ff8fb2959797a

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Paul Pluzhnikov
2005-08-18 04:24:03 UTC
Permalink
Post by Serge Wenger
How is it possible to obtain more informations, call stack or
something else to help me to find my bug(s)?
Oh, and one more thing: run your app ander valgrind, and be sure
to fix all bugs it finds.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Serge Wenger
2005-08-19 06:31:48 UTC
Permalink
Post by Paul Pluzhnikov
Post by Serge Wenger
How is it possible to obtain more informations, call stack or
something else to help me to find my bug(s)?
Oh, and one more thing: run your app ander valgrind, and be sure
to fix all bugs it finds.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Thanks for your help

Serge

PS: Sorry for the top-post
Olivier
2005-08-25 21:27:56 UTC
Permalink
Post by tosoAplos
Post by Serge Wenger
Hello,
I run on Linux.I have a big multithread application with many dynamic
library. Sometimes I receive a SIGSEGV.
How is it possible to obtain more informations, call stack or
something else to help me to find my bug(s)?
man gdb
Good luck,
Apostolos
--
Replace earth.space with gmail.com for a valid e-mail
The idea would be to get a core dumped on your client. Then you can
fetch it back to your developpment platform and analyse it with gdb as
Apostolos suggested.

Of course to get a "juicy" core it would be better you have the source
that you can compile on debug mode. Also check ulimit is set correctly
on your client side.

Loading...