public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Ben Gardiner <BenGardiner@nanometrics.ca>
Cc: GCJ <java@gcc.gnu.org>
Subject: Re: libSegFault.so and gcj
Date: Thu, 14 May 2009 16:10:00 -0000	[thread overview]
Message-ID: <4A0C420E.7080708@caviumnetworks.com> (raw)
In-Reply-To: <4A0C38A1.4010300@nanometrics.ca>

Ben Gardiner wrote:
> Hello all,
> 
> We are running a gcj-compiled application on an embedded platform
> (MPC852T). For reference our versions are gcc-4.0.1, glibc-2.3.3 and
> linux-2.4.24 -- I know these versions are ancient, but please don't stop
> reading here.
> 
> We sometimes encounter segfaults in our application; that is to say that
> it will terminate with 'Segmentation fault' on the console and return
> 139. These occur rather infrequently, and we have yet to find a reliable
> way to reproduce them. To make things more difficult, we do not have
> room for core dumps on our filesystem.
> 
> I thought that we could get the some information about these segfaults
> by using the preload library libSegFault.so; I tested it and integrated
> it with our init scripts and let it loose into our releases hoping that
> a backtrace or two would come back to me. None did; there was no output
> produced by libSegFault.so at all.
> 
> I think that since gcj registers its own segfault handler which
> translates segv signals into NullPointerExceptions,
> 

That's right.

Usually if you die with a SIGSEGV, it is due to stack overflow.
Probably for one reason or another you are getting a fault during the
NullPointerException processing which causes the signal handler to be
reentered recursively.  This goes on until the stack overflows and the
kernel then kills the process.  If you could attach a debugger to the
process, that might shed some light on exactly what is happening.
Assuming that it is not normal for your application to take
NullPointerExceptions it shouldn't be too tedious.

David Daney


      parent reply	other threads:[~2009-05-14 16:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14 15:28 Ben Gardiner
2009-05-14 16:04 ` Andrew Haley
2009-05-15  9:17   ` Andrew Haley
2009-05-15 20:23   ` Ben Gardiner
2009-05-15 20:49     ` David Daney
2009-05-14 16:10 ` David Daney [this message]

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=4A0C420E.7080708@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=BenGardiner@nanometrics.ca \
    --cc=java@gcc.gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).