Re: [dtn-users] Problem DTN2 daemon

Nik Ansell <nikansell00@gmail.com> Wed, 27 January 2016 15:41 UTC

Return-Path: <nikansell00@gmail.com>
X-Original-To: dtn-users@ietfa.amsl.com
Delivered-To: dtn-users@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E08F21B3882 for <dtn-users@ietfa.amsl.com>; Wed, 27 Jan 2016 07:41:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.55
X-Spam-Level:
X-Spam-Status: No, score=-0.55 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zbccb-eXV8bW for <dtn-users@ietfa.amsl.com>; Wed, 27 Jan 2016 07:41:26 -0800 (PST)
Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 114491B388F for <dtn-users@ietfa.amsl.com>; Wed, 27 Jan 2016 07:41:26 -0800 (PST)
Received: by mail-io0-f171.google.com with SMTP id d63so6003731ioj.2 for <dtn-users@ietfa.amsl.com>; Wed, 27 Jan 2016 07:41:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=q3S/LZBq1us/3GH+W5eVs6Mo1V8SbBLu6wCOx1DItA0=; b=gRnGq3u96IIHhhKQX2/W2k8H4P810TIdLL1dnch3wKkBTwhPEEcCUArG6gZfk2VPjg v//fBP9A691xa/dsNteFIsKZssS02k6SjQOL2a+sqGuNt4AERMM/jAHGAoHi5ipzE6h7 ZIB+9tJCKRbXLYe5xrWshx3bf9dHxaSsZLUT9pu6AaDoTiKwWDATDZQXpjZc3ZHjIjS+ p8WLS0e2iQVKrhPKixqOgl29G/02LMPrS4MBi18/CAW6S8T+deDjD/Vwvn/WRmp5smfQ 73YpWHg6Wmtv4OPdtRbdAAteQE1T+VAq0eIaniLyAr+T/pQCblLGUKcpmHW0ektNXj9d Xn/w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=q3S/LZBq1us/3GH+W5eVs6Mo1V8SbBLu6wCOx1DItA0=; b=X5WIQz/0YRwpbDI6jQYYdScw2vI3jkJNSDBAqN9URpV4BJC+TsqDuklRBdjiVT9ZxX wtURmVyvE3PDfzWgU2hAmHK+5K+K3xWCWnnYxIKOTaMJFCzKZzC5KaPacyXP4vJ31beB afmC2ffeSqb5dZRj1LTyJ0608DXlsU/bTXrnSdXf8c0FFazj1QEFwPdCrxe/BOpwVnvA UXpczwJmngW0spdr8Eim5GyFaknRoEih5o9Wgv+lw3nDUsXzSTXWOi7L0YvNV/s8N/eg ZI9TA8MftLl/xlirdj7hIkyHt/VyCnJGQRcJcEPg23aDm2wqaxnvmZ8S4EnP74KioaJN ZcfQ==
X-Gm-Message-State: AG10YOSwCicp+YJj6dBPfMDCZBzPJeMybN4yiICKtPqd8hazlYr+0u0xqLySp2ycmUfeRkPVMO1VkHvvv7HHGQ==
MIME-Version: 1.0
X-Received: by 10.107.170.212 with SMTP id g81mr33312150ioj.44.1453909285115; Wed, 27 Jan 2016 07:41:25 -0800 (PST)
Received: by 10.79.24.2 with HTTP; Wed, 27 Jan 2016 07:41:25 -0800 (PST)
In-Reply-To: <CAKvrc=1DB_4ajY1YNPSvmW6F2Rvp3k5a_LpxXUtgi2ctMm5UrQ@mail.gmail.com>
References: <CAKvrc=1DB_4ajY1YNPSvmW6F2Rvp3k5a_LpxXUtgi2ctMm5UrQ@mail.gmail.com>
Date: Wed, 27 Jan 2016 19:41:25 +0400
Message-ID: <CAKLzrV8atPBtw2ks5oZU+iSXjWW7rqnSdqgZe0z0MRaDXCUUBg@mail.gmail.com>
From: Nik Ansell <nikansell00@gmail.com>
To: kevin prima <sir.kevinprima@gmail.com>
Content-Type: multipart/alternative; boundary="001a11425b70799ea2052a52a2e2"
Archived-At: <http://mailarchive.ietf.org/arch/msg/dtn-users/vBr9aWS7s7gHiPMervHTwe78gAo>
Cc: dtn-users@ietfa.amsl.com
Subject: Re: [dtn-users] Problem DTN2 daemon
X-BeenThere: dtn-users@irtf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: nikansell00@gmail.com
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: <https://mailarchive.ietf.org/arch/browse/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: Wed, 27 Jan 2016 15:41:28 -0000

Hi Kevin,

I have been doing some digging and managed to find a fix which works on my
tested.
Assuming your configuration files are correct, you may want to try my fix
and see how you get on, you can always back-out the change if you back up
the original files.

My fix has been posted to the dtn-users forum, in response to my post on
frequent spinlock errors, but I have copied the fixes into the email below
FYI.
After making the changes, simply re-run make && make install from the oasys
directory.

1. Add the following code to the start of the function, to allow locking or
unlocking when lock_holder_name_ is NULL.

Lock.h -> is_locked_by_me():

    bool is_locked_by_me()
    {

        if (lock_holder_name_ == NULL) {
         return is_locked() && true;
        }

2. Add the following 11,000 microsecond pause, if the thread is waiting to
acquire a lock:

SpinLock.cc -> SpinLock::lock():

    while (atomic_cmpxchg32(&lock_count_, 0, 1) != 0)
    {
        Thread::spin_yield();
        // 0.011 sec sleep
        usleep(11000);

Kind Regards,
Nik

On Thu, Dec 31, 2015 at 12:17 PM, kevin prima <sir.kevinprima@gmail.com>
wrote:

> Dear all,
>
> I want to run 5 DTN node in 2 hop topology scenario with DTLSR routing,
> source and destination node connected with dtn node 1,2,and 3 but couldn't
> reach each other.
> When I try to send ping packet use dtnping, sometimes it show error like
> this in node 1, node 2, and node 3:
>
> warning: Bundle::del_ref is waiting for spin lock held by (null), which
> has reached spin limit
> STACK TRACE: 0x76f51c84 0x3eda8 0x3ed00 0x59444
>
> The impact is node 1, 2 or 3 become unavailable. What should I do to fix
> this problem ?
>
> Thanks,
> Kevin
>
> _______________________________________________
> dtn-users mailing list
> dtn-users@irtf.org
> https://www.irtf.org/mailman/listinfo/dtn-users
>
>