Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Louis LeBlanc <leblanc@keyslapper.net>
To: gdb@sources.redhat.com
Subject: Re: stack corruption?
Date: Tue, 14 Jun 2005 20:52:00 -0000	[thread overview]
Message-ID: <20050614205212.GK62467@keyslapper.net> (raw)
In-Reply-To: <10DBEAA7-48B2-4298-A8CC-58A138415516@apple.com>

On 06/14/05 01:35 PM, Jason Molenda sat at the `puter and typed:
> 
> On Jun 13, 2005, at 8:32 PM, Louis LeBlanc wrote:
> 
> > Stack corruption shows up anytime I open the program in gdb.  I get an
> > occasional core dump (SEGV and BUS) from my program, but when I can
> > make heads or tails of it, it appears to be deep in a host lookup
> > (system libs, Solaris 9) or Oracle 8.1.7 database calls (which could
> > also be a host lookup).
> 
> 
> Louis, I think you're going to need to be a lot more specific.   
> You're using gdb on Solaris 9 with a SPARC CPU?  What version of  
> gdb?  Your paragraph above sounds like there's a bug in your program  
> causing it to crash, and you cannot understand the stack backtrace --  
> are you asking for help in using gdb to find your bug, or are you  
> saying that gdb is not behaving properly?
> 
> If it's the latter, some example output of the problem would do  
> wonders to clear things up.

Sorry for being too general.  I am on a SPARC, running Solaris 8 and 9
on different machines.  Whether there's a bug in my code, well, I'm
sure there are minor bugs, but I'm not convinced yet that there's a
serious one.  This process runs at high network volumes for days and
weeks at a time without problem, then suddenly it dumps.  When I try
to examine the core, I get stack corruption messages.

Basically, I'm not entirely sure.  The codebase in question has never
had this problem in the past, but now (with a newer version of gdb,
and after much work on my code) I always get the corrupt stack notice
when I open the process in gdb.

The gdb version I am using is:
$ gdb -v
GNU gdb 6.3.0.20050516-cvs

I have been planning to get a later snapshot, but haven't gotten
around to it yet.

BTW, I've seen problems in several applications while performing
network lookups, not just my code, and not just C programs.  I got a
couple created by Perl scripts a couple weeks ago and they were also
in the middle of network lookups.  This makes me skeptical of the
system libs, not my code and not gcc.  The real problem is that gdb
tells me nothing useful in these cases, unless the corrupt stack
message is a real issue with my code.

BTW, I have always used the standard pstack utility on all cores I've
had to examine on Solaris - they don't always match up directly with
the gdb backtrace, but they're usually close.  Thread numbers and LWP
ids are sometimes way off too.

Lou
-- 
Louis LeBlanc                                     dev@keyslapper.net
Fully Funded Hobbyist,                   KeySlapper Extrordinaire :þ
http://www.keyslapper.net                                       Ô¿Ô¬
Key fingerprint = C5E7 4762 F071 CE3B ED51  4FB8 AF85 A2FE 80C8 D9A2

Facts are stubborn, but statistics are more pliable.


  reply	other threads:[~2005-06-14 20:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-14  1:45 Louis LeBlanc
2005-06-14  2:01 ` Daniel Jacobowitz
2005-06-14  3:33   ` Louis LeBlanc
2005-06-14 20:36     ` Jason Molenda
2005-06-14 20:52       ` Louis LeBlanc [this message]
2005-06-14 21:24         ` Mark Kettenis
2005-06-14 21:31           ` Louis LeBlanc
2005-06-14 21:36             ` Jason Molenda
2005-06-14 21:44             ` Mark Kettenis
2005-06-14 22:09               ` Louis LeBlanc
2005-06-14 22:35                 ` Daniel Jacobowitz
2005-06-14 21:26         ` Jason Molenda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050614205212.GK62467@keyslapper.net \
    --to=leblanc@keyslapper.net \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox