public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: Paolo Carlini <paolo.carlini@oracle.com>
Cc: "'gcc@gcc.gnu.org'" <gcc@gcc.gnu.org>, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: Recent libstdc++-v3 regressions (PCHs related?!?)
Date: Wed, 21 Aug 2013 09:58:00 -0000	[thread overview]
Message-ID: <1377048362.8019.19.camel@surprise> (raw)
In-Reply-To: <5213850F.2000604@oracle.com>

On Tue, 2013-08-20 at 17:02 +0200, Paolo Carlini wrote:
> Hi,
> 
> On 08/20/2013 04:41 PM, David Malcolm wrote:
> > On Tue, 2013-08-20 at 14:03 +0200, Paolo Carlini wrote:
> >> Hi,
> >>
> >> sorry it the issue is by now well known but... I see many libstdc++-v3
> >> regressions on at least x86_64-linux. When running the libstdc++-v3
> >> testsuite (which uses PCHs) one gets tons of new fails like the below.
> >> That's annoying, a lot of confusing noise.
> >>
> >> Thanks!
> >> Paolo.
> >>
> >> PS: CC-ing two "random" ;) people lately very active.
> > Sorry about this - looking at the backtrace this could well be due to
> > me, specifically r201865, which moved the gcc::pass_manager and all the
> > passes into the GC heap (so that we can then move GC-owned per-pass
> > state into the pass instances).
> I can confirm that r201864 isn't affected. Thanks for looking into this!

Thanks.

It tool me a while to reproduce the failure - perhaps on my test box, GC
is happening much less than on yours?  On a test run I only saw 6
failures due to this (my test machine appears to have 3.6 GB of RAM)

Is there a good way to encourage the testsuite to GC more? (I know about
setting --param ggc-min-expand=0 --param ggc-min-heapsize=0 on an
individual invocation, but is there a standard way of doing this?  Or do
I need to run the whole thing in a cgroup or somesuch, and constrain the
available RAM?)

The bug (or, at least the first one I see) is that the pass_manager's
"passes_by_id" array is being allocated using XRESIZEVEC (xrealloc,
hence malloc/realloc under the covers), but given that all this is meant
to interact with GC, it needs to be persistable to PCH [1].  Now that I
see it, I'm wondering how it managed to work in my prior testing.
Presumably the array always happened to be allocated at the same
location between the process that created the pch file and the processes
that read it.

Is there a good way to perturb memory so that accidentally mixing a
malloc allocation with a GC allocation is more reliably fatal, to shake
out this kind of bug?  i.e. to make malloc place its results at
locations that vary from process to process?  (perhaps in libiberty?)
Perhaps also valgrind can catch this kind of thing?

Thanks
Dave

[1] I wish I could just have GC and not have to deal with PCH; oh well.

  reply	other threads:[~2013-08-21  1:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 13:35 Paolo Carlini
2013-08-20 13:36 ` Rainer Orth
2013-08-20 15:49 ` David Malcolm
2013-08-20 15:53   ` Paolo Carlini
2013-08-21  9:58     ` David Malcolm [this message]
2013-08-21 13:16       ` David Malcolm
2013-08-20 19:38   ` David Malcolm

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=1377048362.8019.19.camel@surprise \
    --to=dmalcolm@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=paolo.carlini@oracle.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).