From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30288 invoked by alias); 7 Apr 2012 22:14:05 -0000 Received: (qmail 30278 invoked by uid 22791); 7 Apr 2012 22:14:04 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 07 Apr 2012 22:13:50 +0000 Received: by vcbfk14 with SMTP id fk14so1562527vcb.0 for ; Sat, 07 Apr 2012 15:13:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=fCDeWiiQnL4mN3L5HSY4+GH7Z0uZiA+u7iJd0NTPHWc=; b=YqLWzBlkLMo5bOrnNBbUQTKXOhrzN8NeWv09UOqKt46YH/+IY6yBj8YypXtQETDrOz pHqRbI8TnZte3TGVNStlCA01P3SJ9/BhKTiiFyxpOwZjkjSXlAo0IfjqhL+6E/y3Nrdo kESDSWS9zDddSDFKMowSt+kGKDXQcKFJcE2dpZmj/6tPnMu7FfPTYMZGhNeumBAan5RK xf4oWIHjFG4ppwnv0kRqmcai3yhPfp9GXkQYw8GE0rQFUdDsC1cmv/6uzZF2SO/taTzt SyqYP0s0QPbY0fv9elHJI1G7uJnvDn6Ae7Wl+2EEnvH9992HUN4p5CyFLuuU48cxI2t9 4Ryw== Received: by 10.52.94.146 with SMTP id dc18mr1005107vdb.19.1333836829350; Sat, 07 Apr 2012 15:13:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.94.146 with SMTP id dc18mr1005101vdb.19.1333836829256; Sat, 07 Apr 2012 15:13:49 -0700 (PDT) Received: by 10.220.73.14 with HTTP; Sat, 7 Apr 2012 15:13:49 -0700 (PDT) In-Reply-To: <4F80B598.9050606@eagerm.com> References: <20120407193915.4B21224618E@ruffy.mtv.corp.google.com> <4F80A628.7050304@eagerm.com> <4F80B598.9050606@eagerm.com> Date: Sat, 07 Apr 2012 22:14:00 -0000 Message-ID: Subject: Re: [commit] dwarf2read.c (load_partial_dies): Change condition to assert. From: Doug Evans To: Michael Eager Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQlsoaqvoCNEMEk75kkSy0+iBv2N8aoUBQC1YBX+aD1ZMGO2J7fjfie3l7gNuiXZNurab/ysIAs7dmmR8JBjD9k0Ea6vfoaoOYCHvd19Q/LoFrV97RKwLoEEZ8mAggqZZM+l9QTv9/kmktFZIzCca2JOK/WI+g== X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00119.txt.bz2 On Sat, Apr 7, 2012 at 2:46 PM, Michael Eager wrote: > age_cached_comp_units() is called to age the CU cache and free up > cached CUs which were not recently used. =A0This happens while reading > symbols for a different CU. Right, but such calls won't happen between the time cu->per_cu is set and load_partial_dies is called (unless I've missed something of course). >> My reading of all of the callers says it can't happen (modulo bugs of >> course). >> I could have missed something of course (in which case let's get >> something added to the testsuite to exercise the appropriate code >> path). > > > My concern is that unless the per_cu data was loaded by one of the > immediate callers, it may have been flushed. I welcome someone reviewing the callers and showing what I missed. I know of no case where a struct dwarf2_cu exists without its corresponding struct dwarf2_per_cu_data. > I'm not sure I can create a reasonable test case for this problem. > I ran into this with a large program with many CUs printing a struct > which took several pages to print. =A0The per_cu data disappeared in > the middle of printing the struct. I think we need to be careful with terminology here (gdb sometimes doesn't make this easy though). There's per_cu and there's per_cu->cu. per_cu (i.e. struct dwarf2_per_cu_data) does not get flushed or aged. per_cu->cu (i.e. struct dwarf2_cu) does. In your case did a struct dwarf2_per_cu_data disappear, or was it per_cu->c= u? I have no doubt there are bugs in this area, btw.