
From aloomis@sarn.org  Mon Nov 12 08:10:27 2012
Return-Path: <aloomis@sarn.org>
X-Original-To: dtn-users@ietfa.amsl.com
Delivered-To: dtn-users@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3FBF421F854B for <dtn-users@ietfa.amsl.com>; Mon, 12 Nov 2012 08:10:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level: 
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6ZfuJ+AHjYS9 for <dtn-users@ietfa.amsl.com>; Mon, 12 Nov 2012 08:10:26 -0800 (PST)
Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by ietfa.amsl.com (Postfix) with ESMTP id 9C1FA21F8419 for <dtn-users@irtf.org>; Mon, 12 Nov 2012 08:10:26 -0800 (PST)
Received: by mail-qa0-f47.google.com with SMTP id t11so1831438qaa.13 for <dtn-users@irtf.org>; Mon, 12 Nov 2012 08:10:25 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=VNpOF1Wl2Cry0nkJkTrP77382UFgpaOFWk89hhCrtJc=; b=Ri0hjPSI86VfuR9Tu2mDu52fAPsWGY8+HT94awjuERSIFofcEWE07QZpeNL+ntNTC0 O+lFheblNnxY/ubofDucPr/6RLyIMNCXTwp1OP8rJrBOHm/zMZtS00rRs2YtsZYFNOAp tnYnmsiPpN6lR0s0wEk7pJJET1+12jtDO49E05mls6S/C3/JYd2vaoFeQrXiIsjLUHJH 3D2MXvgrVtIgDn/kmIB2twcgTenaYS76CIjuOCs63fRIw0sexaPWx8g47wBa7vuUzJxh Y+wIUXWH+ZZ9i0y+083T0H//X5vGyEHK7OewF7OE7tG3yaUpgNPZSxXoSfs92wF6/4kq PnMw==
MIME-Version: 1.0
Received: by 10.224.33.135 with SMTP id h7mr21514766qad.26.1352736625743; Mon, 12 Nov 2012 08:10:25 -0800 (PST)
Received: by 10.49.86.169 with HTTP; Mon, 12 Nov 2012 08:10:25 -0800 (PST)
Date: Mon, 12 Nov 2012 11:10:25 -0500
Message-ID: <CAB9rx+9nor+Lpxm3y0bfHghS7SddHH4PoE5tgvFo4mRKk5E0zA@mail.gmail.com>
From: Amy Alford <aloomis@sarn.org>
To: dtn-users@irtf.org
Content-Type: multipart/alternative; boundary=20cf306f77040d55d704ce4e8a86
X-Gm-Message-State: ALoCoQnOBLkQSi3S+YCHCknJEuICnra6gbwyk9n10u4fl813G/fasaDWFRggUWGcw8Svohn/zvq4
Subject: [dtn-users] Has anyone tried running DTN2 under valgrind lately?
X-BeenThere: dtn-users@irtf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "The Delay-Tolerant Networking Research Group \(DTNRG\) - Users." <dtn-users.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/dtn-users>, <mailto:dtn-users-request@irtf.org?subject=unsubscribe>
List-Archive: <http://www.irtf.org/mail-archive/web/dtn-users>
List-Post: <mailto:dtn-users@irtf.org>
List-Help: <mailto:dtn-users-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/dtn-users>, <mailto:dtn-users-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Nov 2012 16:10:27 -0000

--20cf306f77040d55d704ce4e8a86
Content-Type: text/plain; charset=ISO-8859-1

I've been trying to do this, but I get a lot of spurious output.  Most of
it falls into the following couple of categories:

1) Threads shutdown uncleanly.  Sometimes one thread is accessing variables
another thread has already freed.
2) Lots of memory is intentionally freed by the OS on exit.  This wouldn't
be such a problem, since valgrind classifies this as "still reachable"
rather than a memory leak.  However, the gcc STL implementation uses an
internal pointer to the block of memory it has allocated (rather than a
pointer to the beginning of the block).  This causes valgrind to classify
this memory as "possibly lost" instead of "still reachable".

I discovered an environment variable "OASYS_CLEANUP_SINGLETONS" that causes
oasys to delete classes that inherit from Singleton on exit.  This helps
with the valgrind output, but actually causes dtnd to segfault since some
Singletons are already manually deleted.

I have a slew of changes that got the valgrind output down from about 2000
lines to 500, but I'm not sure that my changes don't have unintended
effects.

- Amy

--20cf306f77040d55d704ce4e8a86
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>I&#39;ve been trying to do this, but I get a lot of spurious output. =
=A0Most of it falls into the following couple of categories:</div><div><br>=
</div><div>1) Threads shutdown uncleanly. =A0Sometimes one thread is access=
ing variables another thread has already freed.</div>

<div>2) Lots of memory is intentionally freed by the OS on exit. =A0This wo=
uldn&#39;t be such a problem, since valgrind classifies this as &quot;still=
 reachable&quot; rather than a memory leak. =A0However, the gcc STL impleme=
ntation uses an internal pointer to the block of memory it has allocated (r=
ather than a pointer to the beginning of the block). =A0This causes valgrin=
d to classify this memory as &quot;possibly lost&quot; instead of &quot;sti=
ll reachable&quot;.</div>

<div><br></div><div>I discovered an environment variable &quot;OASYS_CLEANU=
P_SINGLETONS&quot; that causes oasys to delete classes that inherit from Si=
ngleton on exit. =A0This helps with the valgrind output, but actually cause=
s dtnd to segfault since some Singletons are already manually deleted.</div=
>

<div><br></div><div>I have a slew of changes that got the valgrind output d=
own from about 2000 lines to 500, but I&#39;m not sure that my changes don&=
#39;t have unintended effects.</div><div><br></div><div>- Amy</div>

--20cf306f77040d55d704ce4e8a86--

From alex.mcmahon@cs.tcd.ie  Mon Nov 12 09:56:14 2012
Return-Path: <alex.mcmahon@cs.tcd.ie>
X-Original-To: dtn-users@ietfa.amsl.com
Delivered-To: dtn-users@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 65AEC21F874A for <dtn-users@ietfa.amsl.com>; Mon, 12 Nov 2012 09:56:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QCQIP2hj2XRJ for <dtn-users@ietfa.amsl.com>; Mon, 12 Nov 2012 09:56:12 -0800 (PST)
Received: from mercury.scss.tcd.ie (mercury.scss.tcd.ie [134.226.56.6]) by ietfa.amsl.com (Postfix) with ESMTP id BC6D321F8748 for <dtn-users@irtf.org>; Mon, 12 Nov 2012 09:56:12 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by mercury.scss.tcd.ie (Postfix) with ESMTP id 11F60BE50; Mon, 12 Nov 2012 17:55:51 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at scss.tcd.ie
Received: from mercury.scss.tcd.ie ([127.0.0.1]) by localhost (mercury.scss.tcd.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id itxy3snJzmSi; Mon, 12 Nov 2012 17:55:48 +0000 (GMT)
Received: from [134.226.36.242] (oblong.dsg.cs.tcd.ie [134.226.36.242]) by mercury.scss.tcd.ie (Postfix) with ESMTPA id 665C5BE2F; Mon, 12 Nov 2012 17:55:48 +0000 (GMT)
From: Alex McMahon <alex.mcmahon@cs.tcd.ie>
To: Amy Alford <aloomis@sarn.org>
In-Reply-To: <CAB9rx+9nor+Lpxm3y0bfHghS7SddHH4PoE5tgvFo4mRKk5E0zA@mail.gmail.com>
References: <CAB9rx+9nor+Lpxm3y0bfHghS7SddHH4PoE5tgvFo4mRKk5E0zA@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Organization: Trinity College Dublin
Date: Mon, 12 Nov 2012 17:55:48 +0000
Message-ID: <1352742948.4741.92.camel@oblong>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.3 
Content-Transfer-Encoding: 7bit
Cc: dtn-users@irtf.org
Subject: Re: [dtn-users] Has anyone tried running DTN2 under valgrind lately?
X-BeenThere: dtn-users@irtf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: alex.mcmahon@cs.tcd.ie
List-Id: "The Delay-Tolerant Networking Research Group \(DTNRG\) - Users." <dtn-users.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/dtn-users>, <mailto:dtn-users-request@irtf.org?subject=unsubscribe>
List-Archive: <http://www.irtf.org/mail-archive/web/dtn-users>
List-Post: <mailto:dtn-users@irtf.org>
List-Help: <mailto:dtn-users-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/dtn-users>, <mailto:dtn-users-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Nov 2012 17:56:14 -0000

Hi Amy,

If you export them mercurial changesets for oasys/DTN2 and post to the
list we could test on our flamebox (which runs nightly unit tests for
DTN2 and oasys under valgrind).

All the best,

Alex

On Mon, 2012-11-12 at 11:10 -0500, Amy Alford wrote:
> I've been trying to do this, but I get a lot of spurious output.  Most
> of it falls into the following couple of categories:
> 
> 
> 1) Threads shutdown uncleanly.  Sometimes one thread is accessing
> variables another thread has already freed.
> 2) Lots of memory is intentionally freed by the OS on exit.  This
> wouldn't be such a problem, since valgrind classifies this as "still
> reachable" rather than a memory leak.  However, the gcc STL
> implementation uses an internal pointer to the block of memory it has
> allocated (rather than a pointer to the beginning of the block).  This
> causes valgrind to classify this memory as "possibly lost" instead of
> "still reachable".
> 
> 
> I discovered an environment variable "OASYS_CLEANUP_SINGLETONS" that
> causes oasys to delete classes that inherit from Singleton on exit.
>  This helps with the valgrind output, but actually causes dtnd to
> segfault since some Singletons are already manually deleted.
> 
> 
> I have a slew of changes that got the valgrind output down from about
> 2000 lines to 500, but I'm not sure that my changes don't have
> unintended effects.
> 
> 
> - Amy
> _______________________________________________
> dtn-users mailing list
> dtn-users@irtf.org
> https://www.irtf.org/mailman/listinfo/dtn-users


