
From morgenro@ibr.cs.tu-bs.de  Wed Nov  9 06:17:04 2011
Return-Path: <morgenro@ibr.cs.tu-bs.de>
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 3927721F8906 for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 06:17:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, NO_RELAYS=-0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6SAN8-3tp-kO for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 06:16:59 -0800 (PST)
Received: from salvator.ibr.cs.tu-bs.de (salvator.ibr.cs.tu-bs.de [IPv6:2001:638:602:1181:21a:64ff:fed3:6c8c]) by ietfa.amsl.com (Postfix) with ESMTP id 3063121F8A67 for <dtn-users@irtf.org>; Wed,  9 Nov 2011 06:16:59 -0800 (PST)
Received: from [IPv6:2001:638:602:1181:5e26:aff:fe1b:5500] (syrah.ibr.cs.tu-bs.de [IPv6:2001:638:602:1181:5e26:aff:fe1b:5500]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: morgenro@salvator) by salvator.ibr.cs.tu-bs.de (Postfix) with ESMTPSA id 22C1214154; Wed,  9 Nov 2011 15:16:53 +0100 (CET)
Message-ID: <4EBA8B54.8030601@ibr.cs.tu-bs.de>
Date: Wed, 09 Nov 2011 15:16:52 +0100
From: Johannes Morgenroth <morgenro@ibr.cs.tu-bs.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: ibr-dtn@ibr.cs.tu-bs.de, dtn-users@irtf.org
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms030502010904040600000602"
X-Virus-Scanned: clamav-milter 0.97.3 at salvator
X-Virus-Status: Clean
Subject: [dtn-users] IBR-DTN release 0.6.5
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: Wed, 09 Nov 2011 14:17:04 -0000

Dies ist eine kryptografisch unterzeichnete Nachricht im MIME-Format.

--------------ms030502010904040600000602
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

 Hi.

A new release of IBR-DTN is available.

* Common fixes
   * Connection down deletes all static routes
   * Reconnect mechnism tries to connect each second
   * Some shutdown issues
   * Extension block discard issue
   * Wrong CBHE parsing

 * Bundle Security Protocol
   * Serialization fixed
   * PCB: Store the integrity check value in the right TLV
   * Handle the salt as binary not as string

 * Connection up now triggers all routing modules to look
   for bundles to transfer
 * Disable autoconnect feature if not specified
 * CBHE and group support for internal apps
 * Configurable parallel event processing
   Set the "-t" parameter on daemon startup to enable this feature.

 * Extended API
   * Plain text API for clients
   * Some management routines
   * Event / Log dumping
   * Add and remove IP addresses dynamically via API for
     non-netlink systems

 * File Convergence Layer added. Use the USB Key as intermittent node!
 * New LoWPAN CL architecture - Multiple connections, larger
   bundles and discovery
 * C++ API: Added method to get the timestamp of a bundle

For more information visit this page:
http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/

Regards,
Johannes

--=20
Johannes Morgenroth     Institut fuer Betriebssysteme und Rechnerverbund
Tel.: +49-531-391-3249                           Muehlenpfordtstrasse 23
Fax.: +49-531-391-5936      TU Braunschweig         D-38106 Braunschweig



--------------ms030502010904040600000602
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Kryptografische Unterschrift

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIILLzCC
BR8wggMHoAMCAQICAwDYlDANBgkqhkiG9w0BAQUFADBUMRQwEgYDVQQKEwtDQWNlcnQgSW5j
LjEeMBwGA1UECxMVaHR0cDovL3d3dy5DQWNlcnQub3JnMRwwGgYDVQQDExNDQWNlcnQgQ2xh
c3MgMyBSb290MB4XDTExMDcxMzE0MjA0NVoXDTEzMDcxMjE0MjA0NVowRzEcMBoGA1UEAxMT
Sm9oYW5uZXMgTW9yZ2Vucm90aDEnMCUGCSqGSIb3DQEJARYYbW9yZ2Vucm9AaWJyLmNzLnR1
LWJzLmRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvRpQte7dSpNwhDqRVX4T
wh4mHeSgl8XL/2nZ0fxoHnnL/akE5gskfo5WMII4mkwZ61CIqkqejOXhMHGGj16XJLLH/rtx
kCLr7lrSmiQD9oO1qw7qnaxl4abi4PPmcipk+BgUCheOSGu3nsbR/ahi+Vj2nwzMfuNmg19z
fgVynoxxpL7WNpMVucWJkuGmRnhIMYMqhlJouoAAG2guzWOL+naA6vj8Jlk45wK8ecjkvufZ
UK0sgt8vF5otffcd1WWqPWszM3G7ExWo0SHDisU0dLlwxFCecMDw+gBOdXU6UFwNhNtNnBTS
vE1Fx+AMXtvhpd4KvC+qC+NXe7f02KZ8+QIDAQABo4IBBTCCAQEwDAYDVR0TAQH/BAIwADBW
BglghkgBhvhCAQ0ESRZHVG8gZ2V0IHlvdXIgb3duIGNlcnRpZmljYXRlIGZvciBGUkVFIGhl
YWQgb3ZlciB0byBodHRwOi8vd3d3LkNBY2VydC5vcmcwQAYDVR0lBDkwNwYIKwYBBQUHAwQG
CCsGAQUFBwMCBgorBgEEAYI3CgMEBgorBgEEAYI3CgMDBglghkgBhvhCBAEwMgYIKwYBBQUH
AQEEJjAkMCIGCCsGAQUFBzABhhZodHRwOi8vb2NzcC5jYWNlcnQub3JnMCMGA1UdEQQcMBqB
GG1vcmdlbnJvQGlici5jcy50dS1icy5kZTANBgkqhkiG9w0BAQUFAAOCAgEAO2vbo414ZQZc
QcxQIFwyNj66zQ/eLtsrSy8uIOIQfwUvTAVWZQCPrwphZ0kltiusd9jIH+oUVZp/34UGTAHi
gSXjryE8QusPDM4R7Yk9zk7guh2b5oPUOAPbhlEr4N+oh/CY9FiSBDd/2mn5lZ+TUSxJ+ObE
rxuukexH6Wnllo2re/X3LBBpCur+DL4FkXDdwUCRrYAoUQfzFHHErs78WsnmND2yFrMyqtam
YgyaB5lT74ry7Zo0ryPgB/xuEJpgTfD7ovQrJXv/0/GMvE6T6ea9JP2lyIgBEEvmMcIYqqaH
Xh8/5aUyK6/zNsq3IAqzmhN9ESypY2zkigOby2/eXKR9EEBdMUvDYdEqUUfrDQGACMLj2SDu
XAMxsCUuCC63JJfMB/IHso6amT9vsbKgtOWAAwN9KXNrbg56AnEcTsVHNsfNIbWWgy9XVIZ3
LgAhjxTAMjC87F1PYswgrebIoEzUlvJcamfDacTxgYpuWdQ/M5+yz17eXdu54wY8QiesxQof
KAVfzxuiDe2ItEjPVNNeZ8xD2IwPcCoyvzpjxp9XuH3bokWWsanMCqFZAl8B8fUMHw2GKqO3
sNNoeffe+HWNLAT8c97QvGCzWDidoYA9mZ14T9prOzVm+nkF05a6mtkqEpaACJKGlR7q3XpO
Nm8vhhb3aGTypueaSsDyBCAwggYIMIID8KADAgECAgEBMA0GCSqGSIb3DQEBBAUAMHkxEDAO
BgNVBAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEiMCAGA1UE
AxMZQ0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJARYSc3VwcG9ydEBj
YWNlcnQub3JnMB4XDTA1MTAxNDA3MzY1NVoXDTMzMDMyODA3MzY1NVowVDEUMBIGA1UEChML
Q0FjZXJ0IEluYy4xHjAcBgNVBAsTFWh0dHA6Ly93d3cuQ0FjZXJ0Lm9yZzEcMBoGA1UEAxMT
Q0FjZXJ0IENsYXNzIDMgUm9vdDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKtJ
NRFIfNImflOUz0Op3SjXQiqL84d4GVh8D57aiX3h++tykA10oZZkq5+gJJlz2uJVdscXe/UE
rEa4w75/ZI0QbCTzYZzA8pD6Ueb1aQFjww9W4kpCz+JEjCUoqMV5CX1GuYrz6fM0KQhF5Byf
y5QEHIGoFLOYZcRD7E6CjQnRvapbjZLQ7N6QxX8KwuPr5jFaXnQ+lzNZ6MMDPWAzv/fRb0fE
ze5ig1JuLgiapNkVGJGmhZJHsK5I6223IeyFGmhyNav/8BBdwPSUp2rVO5J+TJAFfpPBLIuk
jmJ0FXFuC3ED6q8VOJrU0gVyb4z5K+taciX5OUbjchs+BMNkJyIQKopPWKcDrb60LhPtXapI
19V91Cp7XPpGBFDkzA5CW4zt2/LP/JaT4NsRNlRiNDiPDGCbO5dWOK3z0luLoFvqTpa4fNfV
oIZwQNORKbeiPK31jLvPGpKK5DR7wNhsX+kKwsOnIJpa3yxdUly6R9Wb7yQocDggL9V/KcCy
QQNokszgnMyXS0XvOhAKq3A6mJVwrTWx6oUrpByAITGprmB6gCZIALgBwJNjVSKRPFbnr9s6
JfOPMVTqJouBWfmh0VMRxXudA/Z0EeBtsSw/LIaRmXGapneLNGDRFLQsrJ2vjBDTn8Rq+G8T
/HNZ92ZCdB6K4/jc0m+YnMtHmJVABfvpAgMBAAGjgb8wgbwwDwYDVR0TAQH/BAUwAwEB/zBd
BggrBgEFBQcBAQRRME8wIwYIKwYBBQUHMAGGF2h0dHA6Ly9vY3NwLkNBY2VydC5vcmcvMCgG
CCsGAQUFBzAChhxodHRwOi8vd3d3LkNBY2VydC5vcmcvY2EuY3J0MEoGA1UdIARDMEEwPwYI
KwYBBAGBkEowMzAxBggrBgEFBQcCARYlaHR0cDovL3d3dy5DQWNlcnQub3JnL2luZGV4LnBo
cD9pZD0xMDANBgkqhkiG9w0BAQQFAAOCAgEAfwiIodoaUEnaifuhCHLzivcexDq0eVsgMLFF
3sJd02Vp8cJdVFQ8hV+5e0KRwpn9G1Gbq0aloRBTnm2IrHNuLDOm8PSe4HXBPohFqeFmQ/5W
WtF6QXj3QNpKOvELW6W7FgbmwueTuYVNl0+xHjhDgO+bDYzvuKdgAIdXfR5EHMsj75s8mZ2v
tSkcRXkWlk0nbfEcbMPCVWSzvBTi86QfHjL8JxUFz90urj6CYXvwIRAY9kTqUzn53NCaIODG
u+C7Wk/EmcgHvbW9otsuYg1CNEG8/4uK9VEiqogwAOKw1Ly+ZbrVA1d5m+jcyE34UO2RpVIo
oqz7Nlg+6ZQrkVCHG9Ze1ozM9w8QDFJO0BZh5eUKbL8Xx3JGV5yY9WxgY3pvXrlOL8i5ubtq
hbyYDe35PpeENJSuAK+h5eeSbk698+LZFItc0usBbKAXpS0Q65x6Sr297s797SJAq3A4iPUK
h2rCqwVgyUgF2lPB3kR3arPzPDztgLymOEopJF/+WTubJXpWYwBkuV2kYn1XNk+tg+8fklOg
jndX3eVhET0jAJBMPPqjYJMEo6819g5qj09KYKeFBWxGoY/0x3bjoVlX93GyxG4UXG1tQWbf
G5Ox1ADD7svPPD0hgKlfY2X83eBfpPQr8IVxQdRnJfsasZeu1pmCE0HSbqUbmSeA5wupqAAx
ggMeMIIDGgIBATBbMFQxFDASBgNVBAoTC0NBY2VydCBJbmMuMR4wHAYDVQQLExVodHRwOi8v
d3d3LkNBY2VydC5vcmcxHDAaBgNVBAMTE0NBY2VydCBDbGFzcyAzIFJvb3QCAwDYlDAJBgUr
DgMCGgUAoIIBmDAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0x
MTExMDkxNDE2NTJaMCMGCSqGSIb3DQEJBDEWBBSvXoGBY80O6iS7V43Df7GXQ1Sc5zBfBgkq
hkiG9w0BCQ8xUjBQMAsGCWCGSAFlAwQBAjAKBggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAw
DQYIKoZIhvcNAwICAUAwBwYFKw4DAgcwDQYIKoZIhvcNAwICASgwagYJKwYBBAGCNxAEMV0w
WzBUMRQwEgYDVQQKEwtDQWNlcnQgSW5jLjEeMBwGA1UECxMVaHR0cDovL3d3dy5DQWNlcnQu
b3JnMRwwGgYDVQQDExNDQWNlcnQgQ2xhc3MgMyBSb290AgMA2JQwbAYLKoZIhvcNAQkQAgsx
XaBbMFQxFDASBgNVBAoTC0NBY2VydCBJbmMuMR4wHAYDVQQLExVodHRwOi8vd3d3LkNBY2Vy
dC5vcmcxHDAaBgNVBAMTE0NBY2VydCBDbGFzcyAzIFJvb3QCAwDYlDANBgkqhkiG9w0BAQEF
AASCAQClrLV1ztLHEJwmjb2f/trXLMnS9wxxdUp0CYUBSRJM5GSpwQ81VoKkk1Ip/NEMCOHf
f+omE6bNiqJjkE/feSf4LqeHQlR+iXUnOCaQc7lDef/THPQqUlBwhANafidsnYbcn8juhIq8
rd9l7v2bhCiFA2p+T4Akypo3dJ/WP5ptUlhnVcu6Ur+rkasGxSxZo/diqliT1cY67IgSeum2
C2EpEcgnGACtU79lYfB7qxvyEQxNOlpDakYxT6owIRp0VQgInmZQWS3nhLkrMowpJuzs94vW
fYr+ZErXoa9eTMYimEAlwkYyh1qsZ1/s7VRIYnyw+nEVfk/BHb/ncAS72OPkAAAAAAAA
--------------ms030502010904040600000602--

From darren.long@mac.com  Wed Nov  9 13:23:06 2011
Return-Path: <darren.long@mac.com>
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 DAB3521F8591 for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 13:23:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.11
X-Spam-Level: 
X-Spam-Status: No, score=-1.11 tagged_above=-999 required=5 tests=[BAYES_05=-1.11]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SJ5MeGk527ga for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 13:23:06 -0800 (PST)
Received: from nk11p99mm-asmtpout008.mac.com (nk11p99mm-asmtpout008.mac.com [17.158.233.229]) by ietfa.amsl.com (Postfix) with ESMTP id 6617D21F858D for <dtn-users@irtf.org>; Wed,  9 Nov 2011 13:23:06 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; CHARSET=US-ASCII
Received: from [192.168.1.10] ([94.30.69.47]) by nk11p03mm-asmtp998.mac.com (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTPSA id <0LUE00G0JWPTGR20@nk11p03mm-asmtp998.mac.com> for dtn-users@irtf.org; Wed, 09 Nov 2011 21:22:44 +0000 (GMT)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.211,0.0.0000 definitions=2011-11-09_04:2011-11-09, 2011-11-09, 1970-01-01 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1111090206
From: Darren Long <darren.long@mac.com>
Date: Wed, 09 Nov 2011 21:22:40 +0000
Message-id: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com>
To: dtn-users@irtf.org
X-Mailer: Apple Mail (2.1251.1)
Subject: [dtn-users] DurableStore errors from dtnd with code from tip
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: Wed, 09 Nov 2011 21:23:07 -0000

Hiya,

I've been having runtime problems with dtnd on Debian Squeeze.  I'm using libdb4.8 and the berkelydb store.  The logs pretty much carry on like the snippet below, usually culminating in epic fail.  I'd not seen this problem before the release of 2.8.0, but hadn't been keeping up with the tip.

Does anyone have any idea what's going on?


Cheers,

Darren

[1320873124.849271 /dtnd notice] random seed is 849265
[1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 30444)
[1320873124.954349 /dtn/storage warning] DurableStoreImpl::endTransaction not implemented.
[1320873124.954662 /S10 notice] Lines marked "S10" are log lines added to make parsing
[1320873124.954687 /S10 notice] the logs easier after extended tests. These were added for
[1320873124.954707 /S10 notice] the summer 2010 N4C summer trial and are mainly new lines
[1320873124.954726 /S10 notice] that allow tracing bundles across multiple hops.
[1320873124.954745 /S10 notice] To extract these do the following...
[1320873124.954765 /S10 notice] 	 grep "S10 info" <dtnd-log-files> | grep -v grep | awk '{print $4,$5}' | sort -n
[1320873124.957788 /dtn/bundle/daemon notice] loading bundles from data store
[1320873124.961231 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
[1320873124.961255 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
[1320873124.961327 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
[1320873124.961349 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
[1320873124.961709 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.

From mifel@hotmail.com  Wed Nov  9 13:29:52 2011
Return-Path: <mifel@hotmail.com>
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 353AF21F86AA for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 13:29:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level: 
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qBasVybuw1qy for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 13:29:51 -0800 (PST)
Received: from snt0-omc2-s21.snt0.hotmail.com (snt0-omc2-s21.snt0.hotmail.com [65.55.90.96]) by ietfa.amsl.com (Postfix) with ESMTP id 27C8C21F86A5 for <dtn-users@irtf.org>; Wed,  9 Nov 2011 13:29:51 -0800 (PST)
Received: from SNT102-W58 ([65.55.90.72]) by snt0-omc2-s21.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675);  Wed, 9 Nov 2011 13:29:50 -0800
Message-ID: <SNT102-W588C4F30A2FE5B5BE73C38A4DF0@phx.gbl>
Content-Type: multipart/alternative; boundary="_770c406b-8c18-476e-a8d8-8242b2dd4ec0_"
X-Originating-IP: [201.122.47.225]
From: Mario F <mifel@hotmail.com>
To: <darren.long@mac.com>, <dtn-users@irtf.org>
Date: Wed, 9 Nov 2011 21:29:50 +0000
Importance: Normal
In-Reply-To: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com>
MIME-Version: 1.0
X-OriginalArrivalTime: 09 Nov 2011 21:29:50.0425 (UTC) FILETIME=[B6607490:01CC9F26]
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip
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: Wed, 09 Nov 2011 21:29:52 -0000

--_770c406b-8c18-476e-a8d8-8242b2dd4ec0_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


=20
Hi:
=20
=20
I have the same problem but in Ubuntu.=20
=20
=20
Thank you.


=20
=20
=20
=20


> From: darren.long@mac.com
> Date: Wed=2C 9 Nov 2011 21:22:40 +0000
> To: dtn-users@irtf.org
> Subject: [dtn-users] DurableStore errors from dtnd with code from tip
>=20
> Hiya=2C
>=20
> I've been having runtime problems with dtnd on Debian Squeeze. I'm using =
libdb4.8 and the berkelydb store. The logs pretty much carry on like the sn=
ippet below=2C usually culminating in epic fail. I'd not seen this problem =
before the release of 2.8.0=2C but hadn't been keeping up with the tip.
>=20
> Does anyone have any idea what's going on?
>=20
>=20
> Cheers=2C
>=20
> Darren
>=20
> [1320873124.849271 /dtnd notice] random seed is 849265
> [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 30444)
> [1320873124.954349 /dtn/storage warning] DurableStoreImpl::endTransaction=
 not implemented.
> [1320873124.954662 /S10 notice] Lines marked "S10" are log lines added to=
 make parsing
> [1320873124.954687 /S10 notice] the logs easier after extended tests. The=
se were added for
> [1320873124.954707 /S10 notice] the summer 2010 N4C summer trial and are =
mainly new lines
> [1320873124.954726 /S10 notice] that allow tracing bundles across multipl=
e hops.
> [1320873124.954745 /S10 notice] To extract these do the following...
> [1320873124.954765 /S10 notice] grep "S10 info" <dtnd-log-files> | grep -=
v grep | awk '{print $4=2C$5}' | sort -n
> [1320873124.957788 /dtn/bundle/daemon notice] loading bundles from data s=
tore
> [1320873124.961231 /dtn/storage warning] DurableStoreImpl::beginTransacti=
on not implemented.
> [1320873124.961255 /dtn/storage warning] error in beginTransaction=3B rel=
easing lock and DS_ERR
> [1320873124.961327 /dtn/storage warning] DurableStoreImpl::beginTransacti=
on not implemented.
> [1320873124.961349 /dtn/storage warning] error in beginTransaction=3B rel=
easing lock and DS_ERR
> [1320873124.961709 /dtn/storage warning] DurableStoreImpl::beginTransacti=
on not implemented.
> _______________________________________________
> dtn-users mailing list
> dtn-users@irtf.org
> https://www.irtf.org/mailman/listinfo/dtn-users
 		 	   		  =

--_770c406b-8c18-476e-a8d8-8242b2dd4ec0_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Tahoma
}
--></style>
</head>
<body class=3D'hmmessage'><div dir=3D'ltr'>
&nbsp=3B
<P>Hi:<BR>
&nbsp=3B<BR>
&nbsp=3B<BR>
I have the same problem but in Ubuntu. <BR>
&nbsp=3B<BR>
&nbsp=3B<BR>
Thank you.<BR><BR><BR>
<DIV>&nbsp=3B</DIV>
<DIV>&nbsp=3B</DIV>
<DIV>&nbsp=3B</DIV><BR>&nbsp=3B
<BR>
<DIV>
&gt=3B From: darren.long@mac.com<BR>&gt=3B Date: Wed=2C 9 Nov 2011 21:22:40=
 +0000<BR>&gt=3B To: dtn-users@irtf.org<BR>&gt=3B Subject: [dtn-users] Dura=
bleStore errors from dtnd with code from tip<BR>&gt=3B <BR>&gt=3B Hiya=2C<B=
R>&gt=3B <BR>&gt=3B I've been having runtime problems with dtnd on Debian S=
queeze. I'm using libdb4.8 and the berkelydb store. The logs pretty much ca=
rry on like the snippet below=2C usually culminating in epic fail. I'd not =
seen this problem before the release of 2.8.0=2C but hadn't been keeping up=
 with the tip.<BR>&gt=3B <BR>&gt=3B Does anyone have any idea what's going =
on?<BR>&gt=3B <BR>&gt=3B <BR>&gt=3B Cheers=2C<BR>&gt=3B <BR>&gt=3B Darren<B=
R>&gt=3B <BR>&gt=3B [1320873124.849271 /dtnd notice] random seed is 849265<=
BR>&gt=3B [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 3=
0444)<BR>&gt=3B [1320873124.954349 /dtn/storage warning] DurableStoreImpl::=
endTransaction not implemented.<BR>&gt=3B [1320873124.954662 /S10 notice] L=
ines marked "S10" are log lines added to make parsing<BR>&gt=3B [1320873124=
.954687 /S10 notice] the logs easier after extended tests. These were added=
 for<BR>&gt=3B [1320873124.954707 /S10 notice] the summer 2010 N4C summer t=
rial and are mainly new lines<BR>&gt=3B [1320873124.954726 /S10 notice] tha=
t allow tracing bundles across multiple hops.<BR>&gt=3B [1320873124.954745 =
/S10 notice] To extract these do the following...<BR>&gt=3B [1320873124.954=
765 /S10 notice] grep "S10 info" &lt=3Bdtnd-log-files&gt=3B | grep -v grep =
| awk '{print $4=2C$5}' | sort -n<BR>&gt=3B [1320873124.957788 /dtn/bundle/=
daemon notice] loading bundles from data store<BR>&gt=3B [1320873124.961231=
 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.<=
BR>&gt=3B [1320873124.961255 /dtn/storage warning] error in beginTransactio=
n=3B releasing lock and DS_ERR<BR>&gt=3B [1320873124.961327 /dtn/storage wa=
rning] DurableStoreImpl::beginTransaction not implemented.<BR>&gt=3B [13208=
73124.961349 /dtn/storage warning] error in beginTransaction=3B releasing l=
ock and DS_ERR<BR>&gt=3B [1320873124.961709 /dtn/storage warning] DurableSt=
oreImpl::beginTransaction not implemented.<BR>&gt=3B ______________________=
_________________________<BR>&gt=3B dtn-users mailing list<BR>&gt=3B dtn-us=
ers@irtf.org<BR>&gt=3B https://www.irtf.org/mailman/listinfo/dtn-users<BR><=
/DIV> 		 	   		  </div></body>
</html>=

--_770c406b-8c18-476e-a8d8-8242b2dd4ec0_--

From darren.long@mac.com  Wed Nov  9 13:37:30 2011
Return-Path: <darren.long@mac.com>
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 010AD11E808B for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 13:37:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.854
X-Spam-Level: 
X-Spam-Status: No, score=-1.854 tagged_above=-999 required=5 tests=[AWL=0.744,  BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id flX+b+vzRqBA for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 13:37:29 -0800 (PST)
Received: from nk11p99mm-asmtpout006.mac.com (nk11p99mm-asmtpout006.mac.com [17.158.233.227]) by ietfa.amsl.com (Postfix) with ESMTP id 5DB2A11E8085 for <dtn-users@irtf.org>; Wed,  9 Nov 2011 13:37:29 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_GQ1uXx9QPtlVKb7sb+MGAA)"
Received: from [192.168.1.10] ([94.30.69.47]) by nk11p03mm-asmtp996.mac.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0LUE00J2VXEAK300@nk11p03mm-asmtp996.mac.com> for dtn-users@irtf.org; Wed, 09 Nov 2011 21:37:28 +0000 (GMT)
From: Darren Long <darren.long@mac.com>
In-reply-to: <SNT102-W588C4F30A2FE5B5BE73C38A4DF0@phx.gbl>
Date: Wed, 09 Nov 2011 21:37:21 +0000
Message-id: <EEC54628-491A-4D34-8F83-3002C01E0D16@mac.com>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com> <SNT102-W588C4F30A2FE5B5BE73C38A4DF0@phx.gbl>
To: Mario F <mifel@hotmail.com>
X-Mailer: Apple Mail (2.1251.1)
Cc: dtn-users@irtf.org
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip
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: Wed, 09 Nov 2011 21:37:30 -0000

--Boundary_(ID_GQ1uXx9QPtlVKb7sb+MGAA)
Content-type: text/plain; CHARSET=US-ASCII
Content-transfer-encoding: 7BIT

Hi Mario,

Does your dtnd  crash too, or do you just have the errors (actually  I suppose they are just warnings) in the log?  I'm not sure yet if the two are related.  My latest rebuild of dtnd hasn't crashed so far (I purged the /var/dtn directory by building a deb package and installing that) and is pinging dtn://bravo.grc.dtn/ping happily but I'm still getting all the log entries as below.

Darren

On 9 Nov 2011, at 21:29, Mario F wrote:

> Hi:
>  
>  
> I have the same problem but in Ubuntu. 
>  
>  
> Thank you.
> 
> 
>  
>  
>  
> 
>   
> > From: darren.long@mac.com
> > Date: Wed, 9 Nov 2011 21:22:40 +0000
> > To: dtn-users@irtf.org
> > Subject: [dtn-users] DurableStore errors from dtnd with code from tip
> > 
> > Hiya,
> > 
> > I've been having runtime problems with dtnd on Debian Squeeze. I'm using libdb4.8 and the berkelydb store. The logs pretty much carry on like the snippet below, usually culminating in epic fail. I'd not seen this problem before the release of 2.8.0, but hadn't been keeping up with the tip.
> > 
> > Does anyone have any idea what's going on?
> > 
> > 
> > Cheers,
> > 
> > Darren
> > 
> > [1320873124.849271 /dtnd notice] random seed is 849265
> > [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 30444)
> > [1320873124.954349 /dtn/storage warning] DurableStoreImpl::endTransaction not implemented.
> > [1320873124.954662 /S10 notice] Lines marked "S10" are log lines added to make parsing
> > [1320873124.954687 /S10 notice] the logs easier after extended tests. These were added for
> > [1320873124.954707 /S10 notice] the summer 2010 N4C summer trial and are mainly new lines
> > [1320873124.954726 /S10 notice] that allow tracing bundles across multiple hops.
> > [1320873124.954745 /S10 notice] To extract these do the following...
> > [1320873124.954765 /S10 notice] grep "S10 info" <dtnd-log-files> | grep -v grep | awk '{print $4,$5}' | sort -n
> > [1320873124.957788 /dtn/bundle/daemon notice] loading bundles from data store
> > [1320873124.961231 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > [1320873124.961255 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> > [1320873124.961327 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > [1320873124.961349 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> > [1320873124.961709 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > _______________________________________________
> > dtn-users mailing list
> > dtn-users@irtf.org
> > https://www.irtf.org/mailman/listinfo/dtn-users


--Boundary_(ID_GQ1uXx9QPtlVKb7sb+MGAA)
Content-type: text/html; CHARSET=US-ASCII
Content-transfer-encoding: quoted-printable

<html><head><base href=3D"x-msg://745/"></head><body style=3D"word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space; ">Hi Mario,<div><br></div><div>Does your dtnd =
&nbsp;crash too, or do you just have the errors (actually &nbsp;I =
suppose they are just warnings) in the log? &nbsp;I'm not sure yet if =
the two are related. &nbsp;My latest rebuild of dtnd hasn't crashed so =
far (I purged the /var/dtn directory by building a deb package and =
installing that) and is pinging&nbsp;<a =
href=3D"dtn://bravo.grc.dtn/ping">dtn://bravo.grc.dtn/ping</a> happily =
but I'm still getting all the log entries as =
below.</div><div><br></div><div>Darren</div><div><br><div><div>On 9 Nov =
2011, at 21:29, Mario F wrote:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite"><span =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
font-family: Helvetica; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; =
orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: =
none; white-space: normal; widows: 2; word-spacing: 0px; =
-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div =
class=3D"hmmessage" style=3D"font-size: 10pt; font-family: Tahoma; =
"><div dir=3D"ltr"><div style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: =
0px; padding-bottom: 0px; padding-left: 0px; =
">Hi:<br>&nbsp;<br>&nbsp;<br>I have the same problem but in Ubuntu.<span =
class=3D"Apple-converted-space">&nbsp;</span><br>&nbsp;<br>&nbsp;<br>Thank=
 =
you.<br><br><br></div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><=
br>&nbsp;<span class=3D"Apple-converted-space">&nbsp;</span><br><div>&gt; =
From:<span class=3D"Apple-converted-space">&nbsp;</span><a =
href=3D"mailto:darren.long@mac.com">darren.long@mac.com</a><br>&gt; =
Date: Wed, 9 Nov 2011 21:22:40 +0000<br>&gt; To:<span =
class=3D"Apple-converted-space">&nbsp;</span><a =
href=3D"mailto:dtn-users@irtf.org">dtn-users@irtf.org</a><br>&gt; =
Subject: [dtn-users] DurableStore errors from dtnd with code from =
tip<br>&gt;<span class=3D"Apple-converted-space">&nbsp;</span><br>&gt; =
Hiya,<br>&gt;<span class=3D"Apple-converted-space">&nbsp;</span><br>&gt; =
I've been having runtime problems with dtnd on Debian Squeeze. I'm using =
libdb4.8 and the berkelydb store. The logs pretty much carry on like the =
snippet below, usually culminating in epic fail. I'd not seen this =
problem before the release of 2.8.0, but hadn't been keeping up with the =
tip.<br>&gt;<span class=3D"Apple-converted-space">&nbsp;</span><br>&gt; =
Does anyone have any idea what's going on?<br>&gt;<span =
class=3D"Apple-converted-space">&nbsp;</span><br>&gt;<span =
class=3D"Apple-converted-space">&nbsp;</span><br>&gt; =
Cheers,<br>&gt;<span class=3D"Apple-converted-space">&nbsp;</span><br>&gt;=
 Darren<br>&gt;<span class=3D"Apple-converted-space">&nbsp;</span><br>&gt;=
 [1320873124.849271 /dtnd notice] random seed is 849265<br>&gt; =
[1320873124.850379 /dtnd notice] DTN daemon starting up... (pid =
30444)<br>&gt; [1320873124.954349 /dtn/storage warning] =
DurableStoreImpl::endTransaction not implemented.<br>&gt; =
[1320873124.954662 /S10 notice] Lines marked "S10" are log lines added =
to make parsing<br>&gt; [1320873124.954687 /S10 notice] the logs easier =
after extended tests. These were added for<br>&gt; [1320873124.954707 =
/S10 notice] the summer 2010 N4C summer trial and are mainly new =
lines<br>&gt; [1320873124.954726 /S10 notice] that allow tracing bundles =
across multiple hops.<br>&gt; [1320873124.954745 /S10 notice] To extract =
these do the following...<br>&gt; [1320873124.954765 /S10 notice] grep =
"S10 info" &lt;dtnd-log-files&gt; | grep -v grep | awk '{print $4,$5}' | =
sort -n<br>&gt; [1320873124.957788 /dtn/bundle/daemon notice] loading =
bundles from data store<br>&gt; [1320873124.961231 /dtn/storage warning] =
DurableStoreImpl::beginTransaction not implemented.<br>&gt; =
[1320873124.961255 /dtn/storage warning] error in beginTransaction; =
releasing lock and DS_ERR<br>&gt; [1320873124.961327 /dtn/storage =
warning] DurableStoreImpl::beginTransaction not implemented.<br>&gt; =
[1320873124.961349 /dtn/storage warning] error in beginTransaction; =
releasing lock and DS_ERR<br>&gt; [1320873124.961709 /dtn/storage =
warning] DurableStoreImpl::beginTransaction not implemented.<br>&gt; =
_______________________________________________<br>&gt; dtn-users =
mailing list<br>&gt; <a =
href=3D"mailto:dtn-users@irtf.org">dtn-users@irtf.org</a><br>&gt; <a =
href=3D"https://www.irtf.org/mailman/listinfo/dtn-users">https://www.irtf.=
org/mailman/listinfo/dtn-users</a></div></div></div></span></blockquote></=
div><br></div></body></html>=

--Boundary_(ID_GQ1uXx9QPtlVKb7sb+MGAA)--

From darren.long@mac.com  Wed Nov  9 14:41:18 2011
Return-Path: <darren.long@mac.com>
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 9346711E808E for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 14:41:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.227
X-Spam-Level: 
X-Spam-Status: No, score=-2.227 tagged_above=-999 required=5 tests=[AWL=0.373,  BAYES_00=-2.599]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sfEQV-me73nt for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 14:41:17 -0800 (PST)
Received: from nk11p99mm-asmtpout007.mac.com (nk11p99mm-asmtpout007.mac.com [17.158.233.228]) by ietfa.amsl.com (Postfix) with ESMTP id D42E811E8087 for <dtn-users@irtf.org>; Wed,  9 Nov 2011 14:41:17 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; CHARSET=US-ASCII
Received: from [192.168.1.10] ([94.30.69.47]) by nk11p03mm-asmtp997.mac.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0LUF00I3Y0AJLH80@nk11p03mm-asmtp997.mac.com> for dtn-users@irtf.org; Wed, 09 Nov 2011 22:39:59 +0000 (GMT)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.211,0.0.0000 definitions=2011-11-09_04:2011-11-09, 2011-11-09, 1970-01-01 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1111090230
From: Darren Long <darren.long@mac.com>
In-reply-to: <1320877780.29100.88.camel@mightyatom.folly.org.uk>
Date: Wed, 09 Nov 2011 22:39:54 +0000
Message-id: <4B996A32-FB4E-4C4F-9180-B278851D9FC6@mac.com>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com> <SNT102-W588C4F30A2FE5B5BE73C38A4DF0@phx.gbl> <EEC54628-491A-4D34-8F83-3002C01E0D16@mac.com> <1320877780.29100.88.camel@mightyatom.folly.org.uk>
To: Elwyn Davies <elwynd@folly.org.uk>
X-Mailer: Apple Mail (2.1251.1)
Cc: dtn-users@irtf.org
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip
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: Wed, 09 Nov 2011 22:41:18 -0000

Hi again Elwyn,

Thanks for the informative response. I've not touched the N4C repos so I don't think that is the issue, but my source tree has a long history so I might do a full hg clone from scratch and try that.  

As I mentioned the other minor complication on the x86 host in question is my tendency to build debs and install those and I have just realised that I had an old version of oasys-dev installed which may have gnarled up the build of the DTN2 debs I guess.  I'm rebuilding the DTN2 deb package as I type.

I've started experimenting on my arm box too, and that seems to be exhibiting similar behaviour, on this box I'm using old good old 'make install' with no packaging nonsense.  I've fallen down the rabbit hole of trying memorydb too and am still stuck down there at the mo.

I think the S10 stuff came in changeset 3504 from SF. I've pondered over the spreadsheets myself :P

BTW, would you recommend the new SQL storage? I've really only stuck with libdb as its the way I've always done it.

Cheers,

Darren

On 9 Nov 2011, at 22:29, Elwyn Davies wrote:

> Hi.
> 
> The 'error messages' you are getting are an artefact from the update
> that Keith Scott put in (DTN2 #3518 and oasys #2279, 2 months ago) which
> allows dtnd to use SQL databases for storage.  To do this he put in full
> transactional control for operations on the database.
> 
> The messages are coming from the DurableStoreImpl.cc base class default
> implementation in oasys v1.5.0.  In theory if the Berkeley DB durable
> store implementation is working correctly, these methods should be
> overridden and never called.
> 
> I am wondering whether you have a mixed installation?  Are you running
> oasys 1.5.0 from the main repository and the dtnd from an N4C
> repository?  The S10 messages come from the N4C branch and (I believe)
> they have not been merged into the main branch as yet. This would give
> the symptoms you are seeing because, conversely, Keith Scott's
> transactional updates have not been merged into th N4C branch.  The
> result would be (I suspect) that the DTN implementation doesn't provide
> the begin/end transaction implementations and the base class routines
> are called - I'm not quite sure what is happening but if my diagnosis is
> correct there would certainly be some sort of problems like you are
> seeing.
> 
> The moral is to make sure you are running consistent versions of oasys
> and DTN2 either both from the N4C repository or both from the main
> sourceforge repository. 
> 
> I am not surprised that there is eventually a major crash if my
> diagnosis is correct!  There probably needs to be a warning in the N4C
> repository about this issue - and we probably need to try and merge the
> stuff we did for N4C into the main branch asap.
> 
> Regards,
> Elwyn
> 
> 
> 
> 
> 
> On Wed, 2011-11-09 at 21:37 +0000, Darren Long wrote:
>> Hi Mario,
>> 
>> 
>> Does your dtnd  crash too, or do you just have the errors (actually  I
>> suppose they are just warnings) in the log?  I'm not sure yet if the
>> two are related.  My latest rebuild of dtnd hasn't crashed so far (I
>> purged the /var/dtn directory by building a deb package and installing
>> that) and is pinging dtn://bravo.grc.dtn/ping happily but I'm still
>> getting all the log entries as below.
>> 
>> 
>> Darren
>> 
>> On 9 Nov 2011, at 21:29, Mario F wrote:
>> 
>>> Hi:
>>> 
>>> 
>>> I have the same problem but in Ubuntu. 
>>> 
>>> 
>>> Thank you.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>> From: darren.long@mac.com
>>>> Date: Wed, 9 Nov 2011 21:22:40 +0000
>>>> To: dtn-users@irtf.org
>>>> Subject: [dtn-users] DurableStore errors from dtnd with code from
>>> tip
>>>> 
>>>> Hiya,
>>>> 
>>>> I've been having runtime problems with dtnd on Debian Squeeze. I'm
>>> using libdb4.8 and the berkelydb store. The logs pretty much carry
>>> on like the snippet below, usually culminating in epic fail. I'd not
>>> seen this problem before the release of 2.8.0, but hadn't been
>>> keeping up with the tip.
>>>> 
>>>> Does anyone have any idea what's going on?
>>>> 
>>>> 
>>>> Cheers,
>>>> 
>>>> Darren
>>>> 
>>>> [1320873124.849271 /dtnd notice] random seed is 849265
>>>> [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid
>>> 30444)
>>>> [1320873124.954349 /dtn/storage warning]
>>> DurableStoreImpl::endTransaction not implemented.
>>>> [1320873124.954662 /S10 notice] Lines marked "S10" are log lines
>>> added to make parsing
>>>> [1320873124.954687 /S10 notice] the logs easier after extended
>>> tests. These were added for
>>>> [1320873124.954707 /S10 notice] the summer 2010 N4C summer trial
>>> and are mainly new lines
>>>> [1320873124.954726 /S10 notice] that allow tracing bundles across
>>> multiple hops.
>>>> [1320873124.954745 /S10 notice] To extract these do the
>>> following...
>>>> [1320873124.954765 /S10 notice] grep "S10 info" <dtnd-log-files> |
>>> grep -v grep | awk '{print $4,$5}' | sort -n
>>>> [1320873124.957788 /dtn/bundle/daemon notice] loading bundles from
>>> data store
>>>> [1320873124.961231 /dtn/storage warning]
>>> DurableStoreImpl::beginTransaction not implemented.
>>>> [1320873124.961255 /dtn/storage warning] error in
>>> beginTransaction; releasing lock and DS_ERR
>>>> [1320873124.961327 /dtn/storage warning]
>>> DurableStoreImpl::beginTransaction not implemented.
>>>> [1320873124.961349 /dtn/storage warning] error in
>>> beginTransaction; releasing lock and DS_ERR
>>>> [1320873124.961709 /dtn/storage warning]
>>> DurableStoreImpl::beginTransaction not implemented.
>>>> _______________________________________________
>>>> dtn-users mailing list
>>>> dtn-users@irtf.org
>>>> https://www.irtf.org/mailman/listinfo/dtn-users
>> 
>> 
>> _______________________________________________
>> dtn-users mailing list
>> dtn-users@irtf.org
>> https://www.irtf.org/mailman/listinfo/dtn-users
> 


From stephen.farrell@cs.tcd.ie  Wed Nov  9 14:43:35 2011
Return-Path: <stephen.farrell@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 B393621F848F for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 14:43:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.449
X-Spam-Level: 
X-Spam-Status: No, score=-102.449 tagged_above=-999 required=5 tests=[AWL=0.150, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Dd-MivEGxJWV for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 14:43:34 -0800 (PST)
Received: from scss.tcd.ie (hermes.cs.tcd.ie [IPv6:2001:770:10:200:889f:cdff:fe8d:ccd2]) by ietfa.amsl.com (Postfix) with ESMTP id E6EE421F8494 for <dtn-users@irtf.org>; Wed,  9 Nov 2011 14:43:33 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by hermes.scss.tcd.ie (Postfix) with ESMTP id E0BBF153E46; Wed,  9 Nov 2011 22:43:32 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.tcd.ie; h= content-transfer-encoding:content-type:in-reply-to:references :subject:mime-version:user-agent:from:date:message-id:received :received:x-virus-scanned; s=cs; t=1320878612; bh=6AI6+fuwRsnyGP aP6seXga+08eXzpWPbXc9IOftzRkM=; b=6GTOH9buYY4sK4FvNory4y83L68iV9 KRG7hNJKS4hz+ihHB2+TpQxEPRie3RK5LOYBMdXBOXu7agKmrUNp3V5mj5iUsdcY UIJs13sS/qSwB0Vby5x40eIqPfgTXvaY3tyBiLaavsO81CsZ5SWiOZ0EISYb001u v6f23bJ13C5LzbJMXHzBOWY38OzQ0daiAL0iNqFD6Th9RyaMtH2YNBaihWoNk9CH gTEbQkYlbaDtW+lDZDH9YFUNJ4IEyqDoc78t1FIT60LS72TFKaGOjb5vuT+NKbGQ sx5cBmKsQhDL0N2D+DYOLaWwEHbjfDFjzYwoTjQ0y4U1iNIVqPw4FDNg==
X-Virus-Scanned: Debian amavisd-new at scss.tcd.ie
Received: from scss.tcd.ie ([127.0.0.1]) by localhost (scss.tcd.ie [127.0.0.1]) (amavisd-new, port 10027) with ESMTP id ixcAXqlok6Am; Wed,  9 Nov 2011 22:43:32 +0000 (GMT)
Received: from [10.87.48.4] (unknown [86.42.185.118]) by smtp.scss.tcd.ie (Postfix) with ESMTPSA id 0770D153D57; Wed,  9 Nov 2011 22:43:31 +0000 (GMT)
Message-ID: <4EBB0209.40706@cs.tcd.ie>
Date: Wed, 09 Nov 2011 22:43:21 +0000
From: Stephen Farrell <stephen.farrell@cs.tcd.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: Darren Long <darren.long@mac.com>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com> <SNT102-W588C4F30A2FE5B5BE73C38A4DF0@phx.gbl> <EEC54628-491A-4D34-8F83-3002C01E0D16@mac.com> <1320877780.29100.88.camel@mightyatom.folly.org.uk> <4B996A32-FB4E-4C4F-9180-B278851D9FC6@mac.com>
In-Reply-To: <4B996A32-FB4E-4C4F-9180-B278851D9FC6@mac.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: dtn-users@irtf.org
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip
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: Wed, 09 Nov 2011 22:43:35 -0000

I'm pretty sure the S10 stuff is in 2.8.0 so its a mixed
build in that sense.

Sorry I've no other help to offer now;-)

S

On 11/09/2011 10:39 PM, Darren Long wrote:
> Hi again Elwyn,
>
> Thanks for the informative response. I've not touched the N4C repos so I don't think that is the issue, but my source tree has a long history so I might do a full hg clone from scratch and try that.
>
> As I mentioned the other minor complication on the x86 host in question is my tendency to build debs and install those and I have just realised that I had an old version of oasys-dev installed which may have gnarled up the build of the DTN2 debs I guess.  I'm rebuilding the DTN2 deb package as I type.
>
> I've started experimenting on my arm box too, and that seems to be exhibiting similar behaviour, on this box I'm using old good old 'make install' with no packaging nonsense.  I've fallen down the rabbit hole of trying memorydb too and am still stuck down there at the mo.
>
> I think the S10 stuff came in changeset 3504 from SF. I've pondered over the spreadsheets myself :P
>
> BTW, would you recommend the new SQL storage? I've really only stuck with libdb as its the way I've always done it.
>
> Cheers,
>
> Darren
>
> On 9 Nov 2011, at 22:29, Elwyn Davies wrote:
>
>> Hi.
>>
>> The 'error messages' you are getting are an artefact from the update
>> that Keith Scott put in (DTN2 #3518 and oasys #2279, 2 months ago) which
>> allows dtnd to use SQL databases for storage.  To do this he put in full
>> transactional control for operations on the database.
>>
>> The messages are coming from the DurableStoreImpl.cc base class default
>> implementation in oasys v1.5.0.  In theory if the Berkeley DB durable
>> store implementation is working correctly, these methods should be
>> overridden and never called.
>>
>> I am wondering whether you have a mixed installation?  Are you running
>> oasys 1.5.0 from the main repository and the dtnd from an N4C
>> repository?  The S10 messages come from the N4C branch and (I believe)
>> they have not been merged into the main branch as yet. This would give
>> the symptoms you are seeing because, conversely, Keith Scott's
>> transactional updates have not been merged into th N4C branch.  The
>> result would be (I suspect) that the DTN implementation doesn't provide
>> the begin/end transaction implementations and the base class routines
>> are called - I'm not quite sure what is happening but if my diagnosis is
>> correct there would certainly be some sort of problems like you are
>> seeing.
>>
>> The moral is to make sure you are running consistent versions of oasys
>> and DTN2 either both from the N4C repository or both from the main
>> sourceforge repository.
>>
>> I am not surprised that there is eventually a major crash if my
>> diagnosis is correct!  There probably needs to be a warning in the N4C
>> repository about this issue - and we probably need to try and merge the
>> stuff we did for N4C into the main branch asap.
>>
>> Regards,
>> Elwyn
>>
>>
>>
>>
>>
>> On Wed, 2011-11-09 at 21:37 +0000, Darren Long wrote:
>>> Hi Mario,
>>>
>>>
>>> Does your dtnd  crash too, or do you just have the errors (actually  I
>>> suppose they are just warnings) in the log?  I'm not sure yet if the
>>> two are related.  My latest rebuild of dtnd hasn't crashed so far (I
>>> purged the /var/dtn directory by building a deb package and installing
>>> that) and is pinging dtn://bravo.grc.dtn/ping happily but I'm still
>>> getting all the log entries as below.
>>>
>>>
>>> Darren
>>>
>>> On 9 Nov 2011, at 21:29, Mario F wrote:
>>>
>>>> Hi:
>>>>
>>>>
>>>> I have the same problem but in Ubuntu.
>>>>
>>>>
>>>> Thank you.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> From: darren.long@mac.com
>>>>> Date: Wed, 9 Nov 2011 21:22:40 +0000
>>>>> To: dtn-users@irtf.org
>>>>> Subject: [dtn-users] DurableStore errors from dtnd with code from
>>>> tip
>>>>>
>>>>> Hiya,
>>>>>
>>>>> I've been having runtime problems with dtnd on Debian Squeeze. I'm
>>>> using libdb4.8 and the berkelydb store. The logs pretty much carry
>>>> on like the snippet below, usually culminating in epic fail. I'd not
>>>> seen this problem before the release of 2.8.0, but hadn't been
>>>> keeping up with the tip.
>>>>>
>>>>> Does anyone have any idea what's going on?
>>>>>
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Darren
>>>>>
>>>>> [1320873124.849271 /dtnd notice] random seed is 849265
>>>>> [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid
>>>> 30444)
>>>>> [1320873124.954349 /dtn/storage warning]
>>>> DurableStoreImpl::endTransaction not implemented.
>>>>> [1320873124.954662 /S10 notice] Lines marked "S10" are log lines
>>>> added to make parsing
>>>>> [1320873124.954687 /S10 notice] the logs easier after extended
>>>> tests. These were added for
>>>>> [1320873124.954707 /S10 notice] the summer 2010 N4C summer trial
>>>> and are mainly new lines
>>>>> [1320873124.954726 /S10 notice] that allow tracing bundles across
>>>> multiple hops.
>>>>> [1320873124.954745 /S10 notice] To extract these do the
>>>> following...
>>>>> [1320873124.954765 /S10 notice] grep "S10 info"<dtnd-log-files>  |
>>>> grep -v grep | awk '{print $4,$5}' | sort -n
>>>>> [1320873124.957788 /dtn/bundle/daemon notice] loading bundles from
>>>> data store
>>>>> [1320873124.961231 /dtn/storage warning]
>>>> DurableStoreImpl::beginTransaction not implemented.
>>>>> [1320873124.961255 /dtn/storage warning] error in
>>>> beginTransaction; releasing lock and DS_ERR
>>>>> [1320873124.961327 /dtn/storage warning]
>>>> DurableStoreImpl::beginTransaction not implemented.
>>>>> [1320873124.961349 /dtn/storage warning] error in
>>>> beginTransaction; releasing lock and DS_ERR
>>>>> [1320873124.961709 /dtn/storage warning]
>>>> DurableStoreImpl::beginTransaction not implemented.
>>>>> _______________________________________________
>>>>> dtn-users mailing list
>>>>> dtn-users@irtf.org
>>>>> https://www.irtf.org/mailman/listinfo/dtn-users
>>>
>>>
>>> _______________________________________________
>>> dtn-users mailing list
>>> dtn-users@irtf.org
>>> https://www.irtf.org/mailman/listinfo/dtn-users
>>
>
> _______________________________________________
> dtn-users mailing list
> dtn-users@irtf.org
> https://www.irtf.org/mailman/listinfo/dtn-users
>

From kscott@mitre.org  Wed Nov  9 18:01:05 2011
Return-Path: <kscott@mitre.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 E480E1F0C3D for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 18:01:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level: 
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4dj4mGBOVjF3 for <dtn-users@ietfa.amsl.com>; Wed,  9 Nov 2011 18:01:05 -0800 (PST)
Received: from smtpksrv1.mitre.org (smtpksrv1.mitre.org [198.49.146.77]) by ietfa.amsl.com (Postfix) with ESMTP id 478DC1F0C34 for <dtn-users@irtf.org>; Wed,  9 Nov 2011 18:01:05 -0800 (PST)
Received: from smtpksrv1.mitre.org (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 9DEFB21B1282; Wed,  9 Nov 2011 21:01:04 -0500 (EST)
Received: from IMCCAS04.MITRE.ORG (imccas04.mitre.org [129.83.29.81]) by smtpksrv1.mitre.org (Postfix) with ESMTP id 9628921B1276; Wed,  9 Nov 2011 21:01:04 -0500 (EST)
Received: from IMCMBX01.MITRE.ORG ([169.254.1.57]) by IMCCAS04.MITRE.ORG ([129.83.29.81]) with mapi id 14.01.0339.001; Wed, 9 Nov 2011 21:01:04 -0500
From: "Scott, Keith L." <kscott@mitre.org>
To: Darren Long <darren.long@mac.com>, "dtn-users@irtf.org" <dtn-users@irtf.org>
Thread-Topic: [dtn-users] DurableStore errors from dtnd with code from tip
Thread-Index: AQHMnyXPgDOM6aZ5kkiIoAXsh/BCQ5WlWlPA
Date: Thu, 10 Nov 2011 02:01:03 +0000
Message-ID: <5EE81C5C4CFFF4418C5EAD12F49D64EE0117AD@IMCMBX01.MITRE.ORG>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com>
In-Reply-To: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [129.83.31.56]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip
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: Thu, 10 Nov 2011 02:01:06 -0000

Yeah, that's the DurableStore module complaining that the storage mechanism=
 (BerkeleyDB?) doesn't support transactions (really that the oasys Berkeley=
DB manager doesn't implement them, BerekeleyDB I think does support them).

These errors are safe to ignore for now, and should only show up at a highe=
r debug level soon.

		--keith

-----Original Message-----
From: dtn-users-bounces@irtf.org [mailto:dtn-users-bounces@irtf.org] On Beh=
alf Of Darren Long
Sent: Wednesday, November 09, 2011 4:23 PM
To: dtn-users@irtf.org
Subject: [dtn-users] DurableStore errors from dtnd with code from tip

Hiya,

I've been having runtime problems with dtnd on Debian Squeeze.  I'm using l=
ibdb4.8 and the berkelydb store.  The logs pretty much carry on like the sn=
ippet below, usually culminating in epic fail.  I'd not seen this problem b=
efore the release of 2.8.0, but hadn't been keeping up with the tip.

Does anyone have any idea what's going on?


Cheers,

Darren

[1320873124.849271 /dtnd notice] random seed is 849265
[1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 30444)
[1320873124.954349 /dtn/storage warning] DurableStoreImpl::endTransaction n=
ot implemented.
[1320873124.954662 /S10 notice] Lines marked "S10" are log lines added to m=
ake parsing
[1320873124.954687 /S10 notice] the logs easier after extended tests. These=
 were added for
[1320873124.954707 /S10 notice] the summer 2010 N4C summer trial and are ma=
inly new lines
[1320873124.954726 /S10 notice] that allow tracing bundles across multiple =
hops.
[1320873124.954745 /S10 notice] To extract these do the following...
[1320873124.954765 /S10 notice] 	 grep "S10 info" <dtnd-log-files> | grep -=
v grep | awk '{print $4,$5}' | sort -n
[1320873124.957788 /dtn/bundle/daemon notice] loading bundles from data sto=
re
[1320873124.961231 /dtn/storage warning] DurableStoreImpl::beginTransaction=
 not implemented.
[1320873124.961255 /dtn/storage warning] error in beginTransaction; releasi=
ng lock and DS_ERR
[1320873124.961327 /dtn/storage warning] DurableStoreImpl::beginTransaction=
 not implemented.
[1320873124.961349 /dtn/storage warning] error in beginTransaction; releasi=
ng lock and DS_ERR
[1320873124.961709 /dtn/storage warning] DurableStoreImpl::beginTransaction=
 not implemented.
_______________________________________________
dtn-users mailing list
dtn-users@irtf.org
https://www.irtf.org/mailman/listinfo/dtn-users

From alexmcm@gmail.com  Thu Nov 10 02:15:58 2011
Return-Path: <alexmcm@gmail.com>
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 B1B7A21F8B31 for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 02:15:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6AyzjUrV4iLp for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 02:15:58 -0800 (PST)
Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by ietfa.amsl.com (Postfix) with ESMTP id AFCC921F8B05 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 02:15:57 -0800 (PST)
Received: by wyf23 with SMTP id 23so355944wyf.13 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 02:15:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:subject:from:reply-to:to:cc:in-reply-to:references :content-type:organization:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=+XJUqrEttKu+Tr6ht/UKriJ+13QHY2CZhTYmnOHBUug=; b=Odchl5vXxU1Pn/m1SFJxBDcu0w4hOozgbMSjLGKKAuvs/jRlDlmenFnimCGZ35hKVp idG2z6sPD8dY7cy7rUc77t65uxSwbBZggr9b5VyA5P8r3eXIalC5g7EDURuhfSkeMbpM KaZlNsUbGXIUjnbFksIPKA7u9o43w2LsPNOnY=
Received: by 10.216.220.223 with SMTP id o73mr6091330wep.89.1320920156672; Thu, 10 Nov 2011 02:15:56 -0800 (PST)
Received: from [192.168.1.32] (86-45-83-249-dynamic.b-ras2.srl.dublin.eircom.net. [86.45.83.249]) by mx.google.com with ESMTPS id a27sm8992564wbp.16.2011.11.10.02.15.44 (version=SSLv3 cipher=OTHER); Thu, 10 Nov 2011 02:15:55 -0800 (PST)
Sender: Alex McMahon <alexmcm@gmail.com>
From: Alex McMahon <alex.mcmahon@cs.tcd.ie>
To: Darren Long <darren.long@mac.com>
In-Reply-To: <5EE81C5C4CFFF4418C5EAD12F49D64EE0117AD@IMCMBX01.MITRE.ORG>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com> <5EE81C5C4CFFF4418C5EAD12F49D64EE0117AD@IMCMBX01.MITRE.ORG>
Content-Type: text/plain; charset="UTF-8"
Organization: Trinity College Dublin
Date: Thu, 10 Nov 2011 10:15:13 +0000
Message-ID: <1320920113.2223.236.camel@oblong>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.3
Content-Transfer-Encoding: 7bit
Cc: "dtn-users@irtf.org" <dtn-users@irtf.org>
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip
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: Thu, 10 Nov 2011 10:21:31 -0000

Hi Darren,

While I can reproduce the DurableStore warning i'm unable to reproduce
runtime problems or an epic failure/crash (on 64bit Ubuntu 10.04.3) can
you provide any more detail/logs on this. 

also just to confirm that S10 logging stuff is in 2.8.0.


Thanks

Alex       


On Thu, 2011-11-10 at 02:01 +0000, Scott, Keith L. wrote:
> Yeah, that's the DurableStore module complaining that the storage mechanism (BerkeleyDB?) doesn't support transactions (really that the oasys BerkeleyDB manager doesn't implement them, BerekeleyDB I think does support them).
> 
> These errors are safe to ignore for now, and should only show up at a higher debug level soon.
> 
> 		--keith
> 
> -----Original Message-----
> From: dtn-users-bounces@irtf.org [mailto:dtn-users-bounces@irtf.org] On Behalf Of Darren Long
> Sent: Wednesday, November 09, 2011 4:23 PM
> To: dtn-users@irtf.org
> Subject: [dtn-users] DurableStore errors from dtnd with code from tip
> 
> Hiya,
> 
> I've been having runtime problems with dtnd on Debian Squeeze.  I'm using libdb4.8 and the berkelydb store.  The logs pretty much carry on like the snippet below, usually culminating in epic fail.  I'd not seen this problem before the release of 2.8.0, but hadn't been keeping up with the tip.
> 
> Does anyone have any idea what's going on?
> 
> 
> Cheers,
> 
> Darren
> 
> [1320873124.849271 /dtnd notice] random seed is 849265
> [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 30444)
> [1320873124.954349 /dtn/storage warning] DurableStoreImpl::endTransaction not implemented.
> [1320873124.954662 /S10 notice] Lines marked "S10" are log lines added to make parsing
> [1320873124.954687 /S10 notice] the logs easier after extended tests. These were added for
> [1320873124.954707 /S10 notice] the summer 2010 N4C summer trial and are mainly new lines
> [1320873124.954726 /S10 notice] that allow tracing bundles across multiple hops.
> [1320873124.954745 /S10 notice] To extract these do the following...
> [1320873124.954765 /S10 notice] 	 grep "S10 info" <dtnd-log-files> | grep -v grep | awk '{print $4,$5}' | sort -n
> [1320873124.957788 /dtn/bundle/daemon notice] loading bundles from data store
> [1320873124.961231 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> [1320873124.961255 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> [1320873124.961327 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> [1320873124.961349 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> [1320873124.961709 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> _______________________________________________
> dtn-users mailing list
> dtn-users@irtf.org
> https://www.irtf.org/mailman/listinfo/dtn-users
> _______________________________________________
> dtn-users mailing list
> dtn-users@irtf.org
> https://www.irtf.org/mailman/listinfo/dtn-users



From davieseb@scss.tcd.ie  Thu Nov 10 09:57:17 2011
Return-Path: <davieseb@scss.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 93DFA21F8AB0 for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 09:57:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.147
X-Spam-Level: 
X-Spam-Status: No, score=0.147 tagged_above=-999 required=5 tests=[AWL=-1.454,  BAYES_00=-2.599, J_CHICKENPOX_13=0.6, J_CHICKENPOX_35=0.6, J_CHICKENPOX_45=0.6, J_CHICKENPOX_53=0.6, J_CHICKENPOX_63=0.6, J_CHICKENPOX_73=0.6, J_CHICKENPOX_75=0.6]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LM+GEQCxjzxr for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 09:57:15 -0800 (PST)
Received: from scss.tcd.ie (hermes.cs.tcd.ie [IPv6:2001:770:10:200:889f:cdff:fe8d:ccd2]) by ietfa.amsl.com (Postfix) with ESMTP id EA28B21F8A95 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 09:57:14 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by hermes.scss.tcd.ie (Postfix) with ESMTP id 506F8153657 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 17:57:14 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=scss.tcd.ie; h= x-mailer:mime-version:message-id:date:organization:content-type :references:in-reply-to:from:subject:received:received: x-virus-scanned; s=scss; t=1320947833; bh=RjUPM6iZDsMKOT2pCCcisH fwu++j7M8hq2k0Jd4nF5k=; b=BUORWrRYn16N6VT28oGAxc9hzyF7/NTL1XKEza 5u42kma6lpWoRbHQT6k6dm3gfs4wbbbS9uI2AEOxj/gmqAuN5AHkXZBQ7bppRvAD K0L/VNUQ66GywjjUz2xcieRQmlkUNzjA2FYMZcfb/UkL0uiK0fdHDQCy9U9dgJ44 Ec/LRax5DiRh1YrNwdJ+KnAlVUM3JG16RMyHmnGCjmb17QCPdN2tosa1o9T3zAD4 WP9FZiCLgPgczTriontpcc92MMiPvV7F8/F3eRKEFABvkWkYFvCCRWJK4DSHb7ht YcTr5rXBXvBlKU+gRF3RIjlDTS2sPbVnrbo+iR3oIytHpfJQ==
X-Virus-Scanned: Debian amavisd-new at scss.tcd.ie
Received: from scss.tcd.ie ([127.0.0.1]) by localhost (scss.tcd.ie [127.0.0.1]) (amavisd-new, port 10027) with ESMTP id ukvEpKoqskMm for <dtn-users@irtf.org>; Thu, 10 Nov 2011 17:57:13 +0000 (GMT)
Received: from [81.187.254.250] (250.254.187.81.in-addr.arpa [81.187.254.250]) by smtp.scss.tcd.ie (Postfix) with ESMTPSA id E8263153655 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 17:57:11 +0000 (GMT)
From: Elwyn Davies <davieseb@scss.tcd.ie>
To: "dtn-users@irtf.org" <dtn-users@irtf.org>
In-Reply-To: <1320920113.2223.236.camel@oblong>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com> <5EE81C5C4CFFF4418C5EAD12F49D64EE0117AD@IMCMBX01.MITRE.ORG> <1320920113.2223.236.camel@oblong>
Content-Type: multipart/mixed; boundary="=-2nr5G/K6+bIrUxULfT8b"
Organization: School of Computer Science and Statistics,  TCD
Date: Thu, 10 Nov 2011 18:03:39 +0000
Message-Id: <1320948220.29100.1097.camel@mightyatom.folly.org.uk>
Mime-Version: 1.0
X-Mailer: Evolution 2.26.3 
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip - some fixes
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: Thu, 10 Nov 2011 18:01:55 -0000

--=-2nr5G/K6+bIrUxULfT8b
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Further to the bug report below...

I believe the attached updated files (and the patches to get there)
should fix the problem for the Berkeley DB store.  I'll check them out
shortly but they do compile OK.

However, we ought really to put some empty routines into memory and file
store classes to prevent them generating spurious warning messages.

Regards,
Elwyn

Hi, Alex/Darren/Keith.

There is a bug and it could well result in a crash.

The interface signatures of begin/endTransaction in the
BerkeleyDBStore.h do not match those in the DurableStoreImpl.h whereas
they do in ODBCstore.h.

This is why the base class routines are getting called and generating
the warnings.  The result is that the transaction id is not set up
correctly (it should be an 'out' parameter to beginTransaction but the
default code just leaves the value in the caller untouched).

Regards,
Elwyn

On Thu, 2011-11-10 at 10:15 +0000, Alex McMahon wrote:
> Hi Darren,
> 
> While I can reproduce the DurableStore warning i'm unable to reproduce
> runtime problems or an epic failure/crash (on 64bit Ubuntu 10.04.3) can
> you provide any more detail/logs on this. 
> 
> also just to confirm that S10 logging stuff is in 2.8.0.
> 
> 
> Thanks
> 
> Alex       
> 
> 
> On Thu, 2011-11-10 at 02:01 +0000, Scott, Keith L. wrote:
> > Yeah, that's the DurableStore module complaining that the storage mechanism (BerkeleyDB?) doesn't support transactions (really that the oasys BerkeleyDB manager doesn't implement them, BerekeleyDB I think does support them).
> > 
> > These errors are safe to ignore for now, and should only show up at a higher debug level soon.
> > 
> > 		--keith
> > 
> > -----Original Message-----
> > From: dtn-users-bounces@irtf.org [mailto:dtn-users-bounces@irtf.org] On Behalf Of Darren Long
> > Sent: Wednesday, November 09, 2011 4:23 PM
> > To: dtn-users@irtf.org
> > Subject: [dtn-users] DurableStore errors from dtnd with code from tip
> > 
> > Hiya,
> > 
> > I've been having runtime problems with dtnd on Debian Squeeze.  I'm using libdb4.8 and the berkelydb store.  The logs pretty much carry on like the snippet below, usually culminating in epic fail.  I'd not seen this problem before the release of 2.8.0, but hadn't been keeping up with the tip.
> > 
> > Does anyone have any idea what's going on?
> > 
> > 
> > Cheers,
> > 
> > Darren
> > 
> > [1320873124.849271 /dtnd notice] random seed is 849265
> > [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 30444)
> > [1320873124.954349 /dtn/storage warning] DurableStoreImpl::endTransaction not implemented.
> > [1320873124.954662 /S10 notice] Lines marked "S10" are log lines added to make parsing
> > [1320873124.954687 /S10 notice] the logs easier after extended tests. These were added for
> > [1320873124.954707 /S10 notice] the summer 2010 N4C summer trial and are mainly new lines
> > [1320873124.954726 /S10 notice] that allow tracing bundles across multiple hops.
> > [1320873124.954745 /S10 notice] To extract these do the following...
> > [1320873124.954765 /S10 notice] 	 grep "S10 info" <dtnd-log-files> | grep -v grep | awk '{print $4,$5}' | sort -n
> > [1320873124.957788 /dtn/bundle/daemon notice] loading bundles from data store
> > [1320873124.961231 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > [1320873124.961255 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> > [1320873124.961327 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > [1320873124.961349 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> > [1320873124.961709 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > _______________________________________________
> > dtn-users mailing list
> > dtn-users@irtf.org
> > https://www.irtf.org/mailman/listinfo/dtn-users
> > _______________________________________________
> > dtn-users mailing list
> > dtn-users@irtf.org
> > https://www.irtf.org/mailman/listinfo/dtn-users
> 
> 
> _______________________________________________
> dtn-users mailing list
> dtn-users@irtf.org
> https://www.irtf.org/mailman/listinfo/dtn-users

--=-2nr5G/K6+bIrUxULfT8b
Content-Disposition: attachment; filename="BerkeleyDBStore.cc"
Content-Type: text/x-c++src; name="BerkeleyDBStore.cc"; charset="us-ascii"
Content-Transfer-Encoding: 7bit

/*
 *    Copyright 2004-2006 Intel Corporation
 * 
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 * 
 *        http://www.apache.org/licenses/LICENSE-2.0
 * 
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

#ifdef HAVE_CONFIG_H
#  include <oasys-config.h>
#endif

#include <sys/types.h>
#include <errno.h>
#include <unistd.h>

#include <debug/DebugUtils.h>
#include <io/FileUtils.h>

#include <util/StringBuffer.h>
#include <util/Pointers.h>
#include <util/ScratchBuffer.h>

#include <serialize/MarshalSerialize.h>
#include <serialize/TypeShims.h>

#include "BerkeleyDBStore.h"
#include "StorageConfig.h"
#include "util/InitSequencer.h"

#if LIBDB_ENABLED

#define NO_TX  0 // for easily going back and changing TX id's later

namespace oasys {
/******************************************************************************
 *
 * BerkeleyDBStore
 *
 *****************************************************************************/
const std::string BerkeleyDBStore::META_TABLE_NAME("___META_TABLE___");
//----------------------------------------------------------------------------
BerkeleyDBStore::BerkeleyDBStore(const char* logpath)
    : DurableStoreImpl("BerkeleyDBStore", logpath),
      init_(false)
{}

//----------------------------------------------------------------------------
BerkeleyDBStore::~BerkeleyDBStore()
{
    StringBuffer err_str;

    err_str.append("Tables still open at deletion time: ");
    bool busy = false;

    for (RefCountMap::iterator iter = ref_count_.begin(); 
         iter != ref_count_.end(); ++iter)
    {
        if (iter->second != 0)
        {
            err_str.appendf("%s ", iter->first.c_str());
            busy = true;
        }
    }

    if (busy)
    {
        log_err("%s", err_str.c_str());
    }

    if (deadlock_timer_) {
        deadlock_timer_->cancel();
    }
    
    dbenv_->close(dbenv_, 0);
    dbenv_ = 0;
    log_info("db closed");
}

//----------------------------------------------------------------------------
int 
BerkeleyDBStore::init(const StorageConfig& cfg)
{
    std::string dbdir = cfg.dbdir_;
    FileUtils::abspath(&dbdir);

    db_name_ = cfg.dbname_;
    sharefile_ = cfg.db_sharefile_;

    // XXX/bowei need to expose options if needed later
    if (cfg.tidy_) {
        prune_db_dir(dbdir.c_str(), cfg.tidy_wait_);
    }

    bool db_dir_exists;
    int  err = check_db_dir(dbdir.c_str(), &db_dir_exists);
    if (err != 0)
    {
        return DS_ERR;
    }
    if (!db_dir_exists) 
    {
        if (cfg.init_) {
            if (create_db_dir(dbdir.c_str()) != 0) {
                return DS_ERR;
            }
        } else {
            log_crit("DB dir %s does not exist and not told to create!",
                     dbdir.c_str());
            return DS_ERR;
        }
    }

    db_env_create(&dbenv_, 0);
    if (dbenv_ == 0) 
    {
        log_crit("Can't create db env");
        return DS_ERR;
    }

    dbenv_->set_errcall(dbenv_, BerkeleyDBStore::db_errcall);

    log_info("initializing db name=%s (%s), dir=%s",
             db_name_.c_str(), sharefile_ ? "shared" : "not shared",
             dbdir.c_str());

#define SET_DBENV_OPTION(_opt, _fn)                     \
    if (cfg._opt != 0) {                                \
        err = dbenv_->_fn(dbenv_, cfg._opt);            \
                                                        \
        if (err != 0)                                   \
        {                                               \
            log_crit("DB: %s, cannot %s to %d",         \
                     db_strerror(err), #_fn, cfg._opt); \
            return DS_ERR;                              \
        }                                               \
    } 

    SET_DBENV_OPTION(db_max_tx_, set_tx_max);
    SET_DBENV_OPTION(db_max_locks_, set_lk_max_locks);
    SET_DBENV_OPTION(db_max_lockers_, set_lk_max_lockers);
    SET_DBENV_OPTION(db_max_lockedobjs_, set_lk_max_objects);
    SET_DBENV_OPTION(db_max_logregion_, set_lg_regionmax);

#undef SET_DBENV_OPTION

    int dbenv_opts =
        DB_CREATE  | 	// create new files
        DB_PRIVATE	// only one process can access the db
        ;

    if (cfg.db_lockdetect_ != 0) { // locking
        dbenv_opts |= DB_INIT_LOCK | DB_THREAD;
    }

    if (cfg.db_mpool_) { // memory pool
        dbenv_opts |= DB_INIT_MPOOL;
    }

    if (cfg.db_log_) { // logging
        dbenv_opts |= DB_INIT_LOG;
    }

    if (cfg.db_txn_) { // transactions / recovery
        dbenv_opts |= DB_INIT_TXN | DB_RECOVER;
    }
    
    err = dbenv_->open(dbenv_, dbdir.c_str(), dbenv_opts, 0 /* default mode */);
    
    if (err != 0) 
    {
        log_crit("DB: %s, cannot open database", db_strerror(err));
        return DS_ERR;
    }

    if (cfg.db_txn_) {
        err = dbenv_->set_flags(dbenv_,
                                DB_AUTO_COMMIT, // every operation is a tx
                                1);
        if (err != 0) 
        {
            log_crit("DB: %s, cannot set flags", db_strerror(err));
            return DS_ERR;
        }
    }

    err = dbenv_->set_paniccall(dbenv_, BerkeleyDBStore::db_panic);
    
    if (err != 0) 
    {
        log_crit("DB: %s, cannot set panic call", db_strerror(err));
        return DS_ERR;
    }

    if (cfg.db_lockdetect_ != 0) {
        deadlock_timer_ = new DeadlockTimer(logpath_, dbenv_, cfg.db_lockdetect_);
        deadlock_timer_->reschedule();
    } else {
        deadlock_timer_ = NULL;
    }
    
    init_ = true;

    return 0;
}

//----------------------------------------------------------------------------
int
BerkeleyDBStore::beginTransaction(void **txid)
{
    DB_TXN *txid_local;
    u_int32_t flags = 0x0;
    int ret;

    log_debug("BerkeleyDBStore::beginTransaction.");

    ret = dbenv_->txn_begin(dbenv_, NULL, &txid_local, flags);
    if ( ret!=0 ) {
        if ( ret==DB_RUNRECOVERY ) {
            PANIC("RUN DB Recovery on fooDB.");
        }
        return(DS_ERR);
    }
    if ( txid != NULL ) {
        *txid = (void *)txid_local;
    }

    return 0;
}

//----------------------------------------------------------------------------
int
BerkeleyDBStore::endTransaction(void *txid, bool be_durable)
{
    int ret;
    u_int32_t flags = 0x0;
    DB_TXN *txp = (DB_TXN *) txid;

    log_debug("BerkeleyDBStore::endTransaction");

    if ( be_durable ) {
    	log_debug("BerkeleyDBStore::endTransaction called with be_durable TRUE");
    }

    ret = txp->commit(txp, flags);

    return 0;
}

//----------------------------------------------------------------------------
void *
BerkeleyDBStore::getUnderlying()
{
    return((void*) dbenv_);
}

//----------------------------------------------------------------------------
int
BerkeleyDBStore::get_table(DurableTableImpl** table,
                           const std::string& name,
                           int                flags,
                           PrototypeVector&   prototypes)
{
    (void)prototypes;
    
    DB* db;
    int err;
    DBTYPE db_type = DB_BTREE;
    u_int32_t db_flags;
                               
    ASSERT(init_);

    // grab a new database handle
    err = db_create(&db, dbenv_, 0);
    if (err != 0) {
        log_err("error creating database handle: %s", db_strerror(err));
        return DS_ERR;
    }
    
    // calculate the db type and creation flags
    db_flags = 0;
    
    if (flags & DS_CREATE) {
        db_flags |= DB_CREATE;

        if (flags & DS_EXCL) {
            db_flags |= DB_EXCL;
        }

        if (((flags & DS_BTREE) != 0) && ((flags & DS_HASH) != 0)) {
            PANIC("both DS_HASH and DS_BTREE were specified");
        }
        
        if (flags & DS_HASH)
        {
            db_type = DB_HASH;
        }
        else if (flags & DS_BTREE)
        {
            db_type = DB_BTREE;
        }
        else // XXX/demmer force type to be specified??
        {
            db_type = DB_BTREE;
        }

    } else {
        db_type = DB_UNKNOWN;
    }

    if (deadlock_timer_) {
        // locking is enabled
        db_flags |= DB_THREAD;
    }

 retry:
    if (sharefile_) {
        oasys::StaticStringBuffer<128> dbfile("%s.db", db_name_.c_str());
        err = db->open(db, NO_TX, dbfile.c_str(), name.c_str(),
                       db_type, db_flags, 0);
    } else {
        oasys::StaticStringBuffer<128> dbname("%s-%s.db",
                                              db_name_.c_str(), name.c_str());
        err = db->open(db, NO_TX, dbname.c_str(), NULL,
                       db_type, db_flags, 0);
    }
        
    if (err == ENOENT)
    {
        log_debug("get_table -- notfound database %s", name.c_str());
        db->close(db, 0);
        return DS_NOTFOUND;
    }
    else if (err == EEXIST)
    {
        log_debug("get_table -- already existing database %s", name.c_str());
        db->close(db, 0);
        return DS_EXISTS;
    }
    else if (err == DB_LOCK_DEADLOCK)
    {
        log_warn("deadlock in get_table, retrying operation");
        goto retry;
    }
    else if (err != 0)
    {
        log_err("DB internal error in get_table: %s", db_strerror(err));
        db->close(db, 0);
        return DS_ERR;
    }

    if (db_type == DB_UNKNOWN) {
        err = db->get_type(db, &db_type);
        if (err != 0) {
            log_err("DB internal error in get_type: %s", db_strerror(err));
            db->close(db, 0);
            return DS_ERR;
        }
    }
    
    log_debug("get_table -- opened table %s type %d", name.c_str(), db_type);

    *table = new BerkeleyDBTable(logpath_, this, name, (flags & DS_MULTITYPE), 
                                 db, db_type);

    return 0;
}

//----------------------------------------------------------------------------
int
BerkeleyDBStore::del_table(const std::string& name)
{
    int err;
    
    ASSERT(init_);

    if (ref_count_[name] != 0)
    {
        log_info("Trying to delete table %s with %d refs still on it",
                 name.c_str(), ref_count_[name]);
        
        return DS_BUSY;
    }

    log_info("deleting table %s", name.c_str());

    if (sharefile_) {
        oasys::StaticStringBuffer<128> dbfile("%s.db", db_name_.c_str());
        err = dbenv_->dbremove(dbenv_, NO_TX, dbfile.c_str(), name.c_str(), 0);
    } else {
        oasys::StaticStringBuffer<128> dbfile("%s-%s.db",
                                              db_name_.c_str(), name.c_str());
        err = dbenv_->dbremove(dbenv_, NO_TX, dbfile.c_str(), NULL, 0);
    }

    if (err != 0) {
        log_err("del_table %s", db_strerror(err));

        if (err == ENOENT) 
        {
            return DS_NOTFOUND;
        }
        else 
        {
            return DS_ERR;
        }
    }
    
    ref_count_.erase(name);

    return 0;
}

//----------------------------------------------------------------------------
int 
BerkeleyDBStore::get_table_names(StringVector* names)
{
    names->clear();
    
    if (sharefile_) 
    {
        BerkeleyDBTable* metatable;
        int err = get_meta_table(&metatable);
        
        if (err != DS_OK) {
            return err;
        }
        
        // unfortunately, we can't use the standard serialization stuff
        // for the metatable, because the string stored in the metatable are
        // not null-terminated
        DBC* cursor = 0;
        err = metatable->db_->cursor(metatable->db_, NO_TX, &cursor, 0);
        if (err != 0) 
        {
            log_err("cannot create iterator for metatable, err=%s",
                    db_strerror(err));
            return DS_ERR;
        }

        for (;;) 
        {
            DBTRef key, data;
            err = cursor->c_get(cursor, key.dbt(), data.dbt(), DB_NEXT);
            if (err == DB_NOTFOUND) 
            {
                break;
            }
            else if (err != 0)
            {
                log_err("error getting next item with iterator, err=%s",
                        db_strerror(err));
                return DS_ERR;
            }
            names->push_back(std::string(static_cast<char*>(key->data),
                                         key->size));
        }

        if (cursor) 
        {
            err = cursor->c_close(cursor);
            if (err != 0) 
            {
                log_err("DB: cannot close cursor, %s", db_strerror(err));
                return DS_ERR;
            }
        }
        delete_z(metatable);
    } 
    else 
    {
        // XXX/bowei -- TODO
        NOTIMPLEMENTED;
    }

    return 0;
}

//----------------------------------------------------------------------------
std::string 
BerkeleyDBStore::get_info() const
{
    StringBuffer desc;

    return "BerkeleyDB";
}

//----------------------------------------------------------------------------
int  
BerkeleyDBStore::get_meta_table(BerkeleyDBTable** table)
{
    DB* db;
    int err;
    
    ASSERT(init_);

    if (! sharefile_) {
        log_err("unable to open metatable for an unshared berkeley db");
        return DS_ERR;
    }

    err = db_create(&db, dbenv_, 0);
    if (err != 0) {
        log_err("Can't create db pointer");
        return DS_ERR;
    }
    
    oasys::StaticStringBuffer<128> dbfile("%s.db", db_name_.c_str());    
    err = db->open(db, NO_TX, dbfile.c_str(), 
                   NULL, DB_UNKNOWN, DB_RDONLY, 0);
    if (err != 0) {
        log_err("unable to open metatable - DB: %s", db_strerror(err));
        return DS_ERR;
    }

    DBTYPE type;
    err = db->get_type(db, &type);
    if (err != 0) {
        log_err("unable to get metatable type - DB: %s", db_strerror(err));
        return DS_ERR;
    }
    
    *table = new BerkeleyDBTable(logpath_, this, META_TABLE_NAME, false, db, type);
    
    return 0;
}

//----------------------------------------------------------------------------
int
BerkeleyDBStore::acquire_table(const std::string& table)
{
    ASSERT(init_);

    ++ref_count_[table];
    ASSERT(ref_count_[table] >= 0);

    log_debug("table %s, +refcount=%d", table.c_str(), ref_count_[table]);

    return ref_count_[table];
}

//----------------------------------------------------------------------------
int
BerkeleyDBStore::release_table(const std::string& table)
{
    ASSERT(init_);

    --ref_count_[table];
    ASSERT(ref_count_[table] >= 0);

    log_debug("table %s, -refcount=%d", table.c_str(), ref_count_[table]);

    return ref_count_[table];
}

//----------------------------------------------------------------------------
#if (DB_VERSION_MINOR >= 3) || (DB_VERSION_MAJOR >= 5)
void
BerkeleyDBStore::db_errcall(const DB_ENV* dbenv,
                            const char* errpfx,
                            const char* msg)
{
    (void)dbenv;
    (void)errpfx;
    log_err_p("/storage/berkeleydb", "DB internal error: %s", msg);
}

#else

//----------------------------------------------------------------------------
void
BerkeleyDBStore::db_errcall(const char* errpfx, char* msg)
{
    (void)errpfx;
    log_err_p("/storage/berkeleydb", "DB internal error: %s", msg);
}

#endif

//----------------------------------------------------------------------------
void
BerkeleyDBStore::db_panic(DB_ENV* dbenv, int errval)
{
    (void)dbenv;
    PANIC("fatal berkeley DB internal error: %s", db_strerror(errval));
}

//----------------------------------------------------------------------------
void
BerkeleyDBStore::DeadlockTimer::reschedule()
{
    log_debug("rescheduling in %d msecs", frequency_);
    schedule_in(frequency_);
}

//----------------------------------------------------------------------------
void
BerkeleyDBStore::DeadlockTimer::timeout(const struct timeval& now)
{
    (void)now;
    int aborted = 0;
    log_debug("running deadlock detection");
    dbenv_->lock_detect(dbenv_, 0, DB_LOCK_YOUNGEST, &aborted);

    if (aborted != 0) {
        log_warn("deadlock detection found %d aborted transactions", aborted);
    }

    reschedule();
}

/******************************************************************************
 *
 * BerkeleyDBTable
 *
 *****************************************************************************/
BerkeleyDBTable::BerkeleyDBTable(const char* logpath,
                                 BerkeleyDBStore* store,
                                 const std::string& table_name,
                                 bool multitype,
                                 DB* db, DBTYPE db_type)
    : DurableTableImpl(table_name, multitype),
      Logger("BerkeleyDBTable", "%s/%s", logpath, table_name.c_str()),
      db_(db), db_type_(db_type), store_(store)
{
    store_->acquire_table(table_name);
}

//----------------------------------------------------------------------------
BerkeleyDBTable::~BerkeleyDBTable() 
{
    // Note: If we are to multithread access to the same table, this
    // will have potential concurrency problems, because close can
    // only happen if no other instance of Db is around.
    store_->release_table(name());

    log_debug("closing db %s", name());
    db_->close(db_, 0); // XXX/bowei - not sure about comment above
    db_ = NULL;
}

//----------------------------------------------------------------------------
int 
BerkeleyDBTable::get(const SerializableObject& key, 
                     SerializableObject*       data)
{
    ASSERTF(!multitype_, "single-type get called for multi-type table");

    ScratchBuffer<u_char*, 256> key_buf;
    size_t key_buf_len = flatten(key, &key_buf);
    ASSERT(key_buf_len != 0);

    DBTRef k(key_buf.buf(), key_buf_len);
    DBTRef d;

    int err = db_->get(db_, NO_TX, k.dbt(), d.dbt(), 0);
     
    if (err == DB_NOTFOUND) 
    {
        return DS_NOTFOUND;
    }
    else if (err != 0)
    {
        log_err("DB: %s", db_strerror(err));
        return DS_ERR;
    }

    u_char* bp = (u_char*)d->data;
    size_t  sz = d->size;
    
    Unmarshal unmarshaller(Serialize::CONTEXT_LOCAL, bp, sz);
    
    if (unmarshaller.action(data) != 0) {
        log_err("DB: error unserializing data object");
        return DS_ERR;
    }

    return 0;
}

//----------------------------------------------------------------------------
int
BerkeleyDBTable::get(const SerializableObject&   key,
                     SerializableObject**        data,
                     TypeCollection::Allocator_t allocator)
{
    ASSERTF(multitype_, "multi-type get called for single-type table");
    
    ScratchBuffer<u_char*, 256> key_buf;
    size_t key_buf_len = flatten(key, &key_buf);
    if (key_buf_len == 0) 
    {
        log_err("zero or too long key length");
        return DS_ERR;
    }

    DBTRef k(key_buf.buf(), key_buf_len);
    DBTRef d;

    int err = db_->get(db_, NO_TX, k.dbt(), d.dbt(), 0);
     
    if (err == DB_NOTFOUND) 
    {
        return DS_NOTFOUND;
    }
    else if (err != 0)
    {
        log_err("DB: %s", db_strerror(err));
        return DS_ERR;
    }

    u_char* bp = (u_char*)d->data;
    size_t  sz = d->size;

    TypeCollection::TypeCode_t typecode;
    size_t typecode_sz = MarshalSize::get_size(&typecode);

    Builder b;
    UIntShim type_shim(b);
    Unmarshal type_unmarshaller(Serialize::CONTEXT_LOCAL, bp, typecode_sz);

    if (type_unmarshaller.action(&type_shim) != 0) {
        log_err("DB: error unserializing type code");
        return DS_ERR;
    }
    
    typecode = type_shim.value();

    bp += typecode_sz;
    sz -= typecode_sz;

    err = allocator(typecode, data);
    if (err != 0) {
        *data = NULL;
        return DS_ERR;
    }

    ASSERT(*data != NULL);

    Unmarshal unmarshaller(Serialize::CONTEXT_LOCAL, bp, sz);
    
    if (unmarshaller.action(*data) != 0) {
        log_err("DB: error unserializing data object");
        delete *data;
       *data = NULL;
        return DS_ERR;
    }
    
    return DS_OK;
}

//----------------------------------------------------------------------------
int 
BerkeleyDBTable::put(const SerializableObject&  key,
                     TypeCollection::TypeCode_t typecode,
                     const SerializableObject*  data,
                     int                        flags)
{
    ScratchBuffer<u_char*, 256> key_buf;
    size_t key_buf_len = flatten(key, &key_buf);
    int err;

    // flatten and fill in the key
    DBTRef k(key_buf.buf(), key_buf_len);

    // if the caller does not want to create new entries, first do a
    // db get to see if the key already exists
    if ((flags & DS_CREATE) == 0) {
        DBTRef d;
        err = db_->get(db_, NO_TX, k.dbt(), d.dbt(), 0);
        if (err == DB_NOTFOUND) {
            return DS_NOTFOUND;
        } else if (err != 0) {
            log_err("put -- DB internal error: %s", db_strerror(err));
            return DS_ERR;
        }
    }

    // figure out the size of the data
    MarshalSize sizer(Serialize::CONTEXT_LOCAL);
    if (sizer.action(data) != 0) {
        log_err("error sizing data object");
        return DS_ERR;
    }
    size_t object_sz = sizer.size();

    // and the size of the type code (if multitype)
    size_t typecode_sz = 0;
    if (multitype_) {
        typecode_sz = MarshalSize::get_size(&typecode);
    }

    // XXX/demmer -- one little optimization would be to pass the
    // calculated size out to the caller (the generic DurableTable),
    // so we don't have to re-calculate it in the object cache code
    
    log_debug("put: serializing %zu byte object (plus %zu byte typecode)",
              object_sz, typecode_sz);

    ScratchBuffer<u_char*, 1024> scratch;
    u_char* buf = scratch.buf(typecode_sz + object_sz);
    DBTRef d(buf, typecode_sz + object_sz);
    
    // if we're a multitype table, marshal the type code
    if (multitype_) 
    {
        Marshal typemarshal(Serialize::CONTEXT_LOCAL, buf, typecode_sz);
        UIntShim type_shim(typecode);
            
        if (typemarshal.action(&type_shim) != 0) {
            log_err("error serializing type code");
            return DS_ERR;
        }
    }
        
    Marshal m(Serialize::CONTEXT_LOCAL, buf + typecode_sz, object_sz);
    if (m.action(data) != 0) {
        log_err("error serializing data object");
        return DS_ERR;
    }
    
    int db_flags = 0;
    if (flags & DS_EXCL) {
        db_flags |= DB_NOOVERWRITE;
    }
        
    err = db_->put(db_, NO_TX, k.dbt(), d.dbt(), db_flags);

    if (err == DB_KEYEXIST) {
        return DS_EXISTS;
    } else if (err != 0) {
        log_err("DB internal error: %s", db_strerror(err));
        return DS_ERR;
    }

    return 0;
}

//----------------------------------------------------------------------------
int 
BerkeleyDBTable::del(const SerializableObject& key)
{
    u_char key_buf[256];
    size_t key_buf_len;

    key_buf_len = flatten(key, key_buf, 256);
    if (key_buf_len == 0) 
    {
        log_err("zero or too long key length");
        return DS_ERR;
    }

    DBTRef k(key_buf, key_buf_len);
    
    int err = db_->del(db_, NO_TX, k.dbt(), 0);
    
    if (err == DB_NOTFOUND) 
    {
        return DS_NOTFOUND;
    } 
    else if (err != 0) 
    {
        log_err("DB internal error: %s", db_strerror(err));
        return DS_ERR;
    }

    return 0;
}

//----------------------------------------------------------------------------
size_t
BerkeleyDBTable::size() const
{
    int err;
    int flags = 0;

    union {
        void* ptr;
        struct __db_bt_stat* btree_stats;
        struct __db_h_stat*  hash_stats;
    } stats;

    stats.ptr = 0;
    
#if ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR <= 2))
    err = db_->stat(db_, &stats.ptr, flags);
#else
    err = db_->stat(db_, NO_TX, &stats.ptr, flags);
#endif
    if (err != 0) {
        log_crit("error in DB::stat: %d", errno);
        ASSERT(stats.ptr == 0);
        return 0;
    }
    
    ASSERT(stats.ptr != 0);

    size_t ret;
    
    switch(db_type_) {
    case DB_BTREE:
        ret = stats.btree_stats->bt_nkeys;
        break;
    case DB_HASH:
        ret = stats.hash_stats->hash_nkeys;
        break;
    default:
        PANIC("illegal value for db_type %d", db_type_);
    }

    free(stats.ptr);

    return ret;
}

//----------------------------------------------------------------------------
DurableIterator*
BerkeleyDBTable::itr()
{
    return new BerkeleyDBIterator(this);
}

//----------------------------------------------------------------------------
int 
BerkeleyDBTable::key_exists(const void* key, size_t key_len)
{
    DBTRef k(const_cast<void*>(key), key_len);
    DBTRef d;

    int err = db_->get(db_, NO_TX, k.dbt(), d.dbt(), 0);
    if (err == DB_NOTFOUND) 
    {
        return DS_NOTFOUND;
    }
    else if (err != 0)
    {
        log_err("DB: %s", db_strerror(err));
        return DS_ERR;
    }

    return 0;
}

/******************************************************************************
 *
 * BerkeleyDBIterator
 *
 *****************************************************************************/
BerkeleyDBIterator::BerkeleyDBIterator(BerkeleyDBTable* t)
    : Logger("BerkeleyDBIterator", "%s/iter", t->logpath()),
      cur_(0), valid_(false)
{
    int err = t->db_->cursor(t->db_, NO_TX, &cur_, 0);
    if (err != 0) {
        log_err("DB: cannot create a DB iterator, err=%s", db_strerror(err));
        cur_ = 0;
    }

    if (cur_)
    {
        valid_ = true;
    }
}

//----------------------------------------------------------------------------
BerkeleyDBIterator::~BerkeleyDBIterator()
{
    valid_ = false;
    if (cur_) 
    {
        int err = cur_->c_close(cur_);

        if (err != 0) {
            log_err("Unable to close cursor, %s", db_strerror(err));
        }
    }
}

//----------------------------------------------------------------------------
int
BerkeleyDBIterator::next()
{
    ASSERT(valid_);

    memset(&key_, 0, sizeof(key_));
    memset(&data_, 0, sizeof(data_));

    int err = cur_->c_get(cur_, key_.dbt(), data_.dbt(), DB_NEXT);

    if (err == DB_NOTFOUND) {
        valid_ = false;
        return DS_NOTFOUND;
    } 
    else if (err != 0) {
        log_err("next() DB: %s", db_strerror(err));
        valid_ = false;
        return DS_ERR;
    }

    return 0;
}

//----------------------------------------------------------------------------
int
BerkeleyDBIterator::get_key(SerializableObject* key)
{
    ASSERT(key != NULL);
    oasys::Unmarshal un(oasys::Serialize::CONTEXT_LOCAL,
                        static_cast<u_char*>(key_->data), key_->size);

    if (un.action(key) != 0) {
        log_err("error unmarshalling");
        return DS_ERR;
    }
    
    return 0;
}

//----------------------------------------------------------------------------
int 
BerkeleyDBIterator::raw_key(void** key, size_t* len)
{
    if (!valid_) return DS_ERR;

    *key = key_->data;
    *len = key_->size;

    return 0;
}

//----------------------------------------------------------------------------
int 
BerkeleyDBIterator::raw_data(void** data, size_t* len)
{
    if (!valid_) return DS_ERR;

    *data = data_->data;
    *len  = data_->size;

    return 0;
}

} // namespace oasys

#endif // LIBDB_ENABLED

--=-2nr5G/K6+bIrUxULfT8b
Content-Disposition: attachment; filename="BerkeleyDBStore.h"
Content-Type: text/x-chdr; name="BerkeleyDBStore.h"; charset="us-ascii"
Content-Transfer-Encoding: 7bit

/*
 *    Copyright 2004-2006 Intel Corporation
 * 
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 * 
 *        http://www.apache.org/licenses/LICENSE-2.0
 * 
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */


#ifndef __BERKELEY_TABLE_STORE_H__
#define __BERKELEY_TABLE_STORE_H__

#ifndef OASYS_CONFIG_STATE
#error "MUST INCLUDE oasys-config.h before including this file"
#endif

#if LIBDB_ENABLED

#include <map>
#include <db.h>

#if (DB_VERSION_MAJOR != 4) && (DB_VERSION_MAJOR != 5)
#error "must use Berkeley DB major version 4 or 5"
#endif

#include "../debug/Logger.h"
#include "../thread/Mutex.h"
#include "../thread/SpinLock.h"
#include "../thread/Timer.h"

#include "DurableStore.h"

namespace oasys {

// forward decls
class BerkeleyDBStore;
class BerkeleyDBTable;
class BerkeleyDBIterator;
class StorageConfig;

/**
 * Interface for the generic datastore
 */
class BerkeleyDBStore : public DurableStoreImpl {
    friend class BerkeleyDBTable;
    
public:
    BerkeleyDBStore(const char* logpath);

    // Can't copy or =, don't implement these
    BerkeleyDBStore& operator=(const BerkeleyDBStore&);
    BerkeleyDBStore(const BerkeleyDBStore&);

    ~BerkeleyDBStore();

    //! @{ Virtual from DurableStoreImpl
    //! Initialize BerkeleyDBStore
    int init(const StorageConfig& cfg);

    //! Primitive support for transactions (assumes ALL
    //! transactionalized accesses are single-threaded).
    int   beginTransaction(void **txid);
    int   endTransaction(void *txid, bool be_durable);

    //! Allow access to the underlying DB implementation
    void* getUnderlying();

    int get_table(DurableTableImpl** table,
                  const std::string& name,
                  int                flags,
                  PrototypeVector&   prototypes);

    int del_table(const std::string& name);
    int get_table_names(StringVector* names);
    std::string get_info() const;
    /// @}

private:
    bool        init_;        //!< Initialized?
    std::string db_name_;     ///< Name of the database file
    DB_ENV*     dbenv_;       ///< database environment for all tables
    bool	sharefile_;   ///< share a single db file

    SpinLock    ref_count_lock_;
    RefCountMap ref_count_;   ///< Ref. count for open tables.

    /// Id that represents the metatable of tables
    static const std::string META_TABLE_NAME;

    /// Get meta-table
    int get_meta_table(BerkeleyDBTable** table);
    
    /// @{ Changes the ref count on the tables, used by
    /// BerkeleyDBTable
    int acquire_table(const std::string& table);
    int release_table(const std::string& table);
    /// @}

    /// DB internal error log callback (unfortunately, the function
    /// signature changed between 4.2 and 4.3)

#if (DB_VERSION_MINOR >= 3) || (DB_VERSION_MAJOR >= 5)
    static void db_errcall(const DB_ENV* dbenv,
                           const char* errpfx,
                           const char* msg);
#else
    static void db_errcall(const char* errpfx, char* msg);
#endif
    
    /// DB internal panic callback
    static void db_panic(DB_ENV* dbenv, int errval);

    /**
     * Timer class used to periodically check for deadlocks.
     */
    class DeadlockTimer : public oasys::Timer, public oasys::Logger {
    public:
        DeadlockTimer(const char* logbase, DB_ENV* dbenv, int frequency)
            : Logger("BerkeleyDBStore::DeadlockTimer",
                     "%s/%s", logbase, "deadlock_timer"),
              dbenv_(dbenv), frequency_(frequency) {}

        void reschedule();
        virtual void timeout(const struct timeval& now);

    protected:
        DB_ENV* dbenv_;
        int     frequency_;
    };

    DeadlockTimer* deadlock_timer_;
};

/**
 * Object that encapsulates a single table. Multiple instances of
 * this object represent multiple uses of the same table.
 */
class BerkeleyDBTable : public DurableTableImpl, public Logger {
    friend class BerkeleyDBStore;
    friend class BerkeleyDBIterator;

public:
    ~BerkeleyDBTable();

    /// @{ virtual from DurableTableImpl
    int get(const SerializableObject& key,
            SerializableObject* data);
    
    int get(const SerializableObject& key,
            SerializableObject** data,
            TypeCollection::Allocator_t allocator);
    
    int put(const SerializableObject& key,
            TypeCollection::TypeCode_t typecode,
            const SerializableObject* data,
            int flags);
    
    int del(const SerializableObject& key);

    size_t size() const;
    
    DurableIterator* itr();
    /// @}

private:
    DB*              db_;
    DBTYPE	     db_type_;
    BerkeleyDBStore* store_;

    //! Only BerkeleyDBStore can create BerkeleyDBTables
    BerkeleyDBTable(const char* logpath,
                    BerkeleyDBStore* store, 
                    const std::string& table_name,
                    bool multitype,
                    DB* db, DBTYPE type);

    /// Whether a specific key exists in the table.
    int key_exists(const void* key, size_t key_len);
};

/**
 * Wrapper around a DBT that correctly handles memory management.
 */
class DBTRef {
public:
    /// Initialize an empty key with the DB_DBT_REALLOC flag
    DBTRef()
    {
        memset(&dbt_, 0, sizeof(dbt_));
        dbt_.flags = DB_DBT_REALLOC;
    }

    /// Initialize a key with the given data/len and the
    /// DB_DBT_USERMEM flag
    DBTRef(void* data, size_t size)
    {
        memset(&dbt_, 0, sizeof(dbt_));
        dbt_.data  = data;
        dbt_.size  = size;
        dbt_.flags = DB_DBT_USERMEM;
    }

    /// If any data was malloc'd in the key, free it
    ~DBTRef()
    {
        if (dbt_.flags == DB_DBT_MALLOC ||
            dbt_.flags == DB_DBT_REALLOC)
        {
            if (dbt_.data != NULL) {
                free(dbt_.data);
                dbt_.data = NULL;
            }
        }
    }

    /// Return a pointer to the underlying DBT structure
    DBT* dbt() { return &dbt_; }

    /// Convenience operator overload
    DBT* operator->() { return &dbt_; }

protected:
    DBT dbt_;
};

/**
 * Iterator class for Berkeley DB tables.
 */
class BerkeleyDBIterator : public DurableIterator, public Logger {
    friend class BerkeleyDBTable;

private:
    /**
     * Create an iterator for table t. These should not be called
     * except by BerkeleyDBTable.
     */
    BerkeleyDBIterator(BerkeleyDBTable* t);

public:
    virtual ~BerkeleyDBIterator();
    
    /// @{ Obtain the raw byte representations of the key and data.
    // Buffers are only valid until the next invocation of the
    // iterator.
    int raw_key(void** key, size_t* len);
    int raw_data(void** data, size_t* len);
    /// @}
    
    /// @{ virtual from DurableIteratorImpl
    int next();
    int get_key(SerializableObject* key);
    /// @}

protected:
    DBC* cur_;          ///< Current database cursor
    bool valid_;        ///< Status of the iterator

    DBTRef key_;	///< Current element key
    DBTRef data_;	///< Current element data
};

}; // namespace oasys

#endif // LIBDB_ENABLED

#endif //__BERKELEY_TABLE_STORE_H__

--=-2nr5G/K6+bIrUxULfT8b
Content-Disposition: attachment; filename="berk_patches"
Content-Type: text/x-patch; name="berk_patches"; charset="us-ascii"
Content-Transfer-Encoding: 7bit

diff -r e3c74c2b622a -r 44eef8479b95 storage/BerkeleyDBStore.cc
--- a/storage/BerkeleyDBStore.cc	Wed Aug 31 12:14:24 2011 +0100
+++ b/storage/BerkeleyDBStore.cc	Thu Nov 10 14:13:56 2011 +0000
@@ -213,35 +213,42 @@
 }
 
 //----------------------------------------------------------------------------
-void *
-BerkeleyDBStore::beginTransaction()
+int
+BerkeleyDBStore::beginTransaction(void **txid)
 {
-    DB_TXN *txid;
+    DB_TXN *txid_local;
     u_int32_t flags = 0x0;
     int ret;
 
-    log_debug("fooDBStore::beginTransaction.");
+    log_debug("BerkeleyDBStore::beginTransaction.");
 
-    ret = dbenv_->txn_begin(dbenv_, NULL, &txid, flags);
+    ret = dbenv_->txn_begin(dbenv_, NULL, &txid_local, flags);
     if ( ret!=0 ) {
         if ( ret==DB_RUNRECOVERY ) {
             PANIC("RUN DB Recovery on fooDB.");
         }
-        return((void *) NULL);
+        return(DS_ERR);
+    }
+    if ( txid != NULL ) {
+        *txid = (void *)txid_local;
     }
 
-    return((void *) txid);
+    return 0;
 }
 
 //----------------------------------------------------------------------------
 int
-BerkeleyDBStore::endTransaction(void *txid)
+BerkeleyDBStore::endTransaction(void *txid, bool be_durable)
 {
     int ret;
     u_int32_t flags = 0x0;
     DB_TXN *txp = (DB_TXN *) txid;
 
-    log_debug("fooDBStore::endTransaction");
+    log_debug("BerkeleyDBStore::endTransaction");
+
+    if ( be_durable ) {
+    	log_debug("BerkeleyDBStore::endTransaction called with be_durable TRUE");
+    }
 
     ret = txp->commit(txp, flags);
 
diff -r e3c74c2b622a -r 44eef8479b95 storage/BerkeleyDBStore.h
--- a/storage/BerkeleyDBStore.h	Wed Aug 31 12:14:24 2011 +0100
+++ b/storage/BerkeleyDBStore.h	Thu Nov 10 14:13:56 2011 +0000
@@ -67,8 +67,8 @@
 
     //! Primitive support for transactions (assumes ALL
     //! transactionalized accesses are single-threaded).
-    void* beginTransaction();
-    int   endTransaction(void *txid);
+    int   beginTransaction(void **txid);
+    int   endTransaction(void *txid, bool be_durable);
 
     //! Allow access to the underlying DB implementation
     void* getUnderlying();

--=-2nr5G/K6+bIrUxULfT8b--


From davieseb@scss.tcd.ie  Thu Nov 10 09:56:39 2011
Return-Path: <davieseb@scss.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 9670A21F85AA for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 09:56:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.307
X-Spam-Level: 
X-Spam-Status: No, score=-1.307 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, MISSING_HEADERS=1.292]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DhLcR7zMv6DF for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 09:56:38 -0800 (PST)
Received: from scss.tcd.ie (hermes.cs.tcd.ie [IPv6:2001:770:10:200:889f:cdff:fe8d:ccd2]) by ietfa.amsl.com (Postfix) with ESMTP id 0BE4C21F8557 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 09:56:37 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by hermes.scss.tcd.ie (Postfix) with ESMTP id 1FE9A153657 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 17:56:36 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=scss.tcd.ie; h= content-transfer-encoding:x-mailer:mime-version:message-id:date :organization:content-type:references:in-reply-to:from:subject :received:received:x-virus-scanned; s=scss; t=1320947795; bh=QTs 88ZUiKaqtClzBqLpnfpz40yGpx6SZV4UCsUen/p4=; b=Qqz1d//M8ef9HykG1kN 4NmOfBns9XtN9HDbn3+6cm0JDNI1AG3rzZC4qO0RXZ+84vwJYWoCCJicp9aBuE6T +WPPPA9GtxzeliDmkwvQkar88zV0W8NEUiGtb7W82Y8q6zJjADhdmP5zDf2XcsOL 7gG3tiG/URQT9MBduMO/aG7+nzL5KZaUAe7dnk/p9Wf5i3eTN72+AoeHTNN7oOhA ko6wdaP6w1US2SREQZWUh535y2f3QKKyXQZq8XwbcEKEuuWcavxh2eOI3wzcNf70 1N/EFYclmc7Th11M0HcgMziFpQq7X+17Xb/MXixMSmMc4TUCRwpOaPzSJ3OhIUD+ pAQ==
X-Virus-Scanned: Debian amavisd-new at scss.tcd.ie
Received: from scss.tcd.ie ([127.0.0.1]) by localhost (scss.tcd.ie [127.0.0.1]) (amavisd-new, port 10027) with ESMTP id Zeyl1mpCBfxQ for <dtn-users@irtf.org>; Thu, 10 Nov 2011 17:56:35 +0000 (GMT)
Received: from [81.187.254.250] (250.254.187.81.in-addr.arpa [81.187.254.250]) by smtp.scss.tcd.ie (Postfix) with ESMTPSA id 7B7BD153655 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 17:56:35 +0000 (GMT)
From: Elwyn Davies <davieseb@scss.tcd.ie>
Cc: "dtn-users@irtf.org" <dtn-users@irtf.org>
In-Reply-To: <1320920113.2223.236.camel@oblong>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com> <5EE81C5C4CFFF4418C5EAD12F49D64EE0117AD@IMCMBX01.MITRE.ORG> <1320920113.2223.236.camel@oblong>
Content-Type: text/plain
Organization: School of Computer Science and Statistics,  TCD
Date: Thu, 10 Nov 2011 18:03:02 +0000
Message-Id: <1320948182.29100.1094.camel@mightyatom.folly.org.uk>
Mime-Version: 1.0
X-Mailer: Evolution 2.26.3 
Content-Transfer-Encoding: 7bit
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip
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: Thu, 10 Nov 2011 18:02:06 -0000

Hi, Alex/Darren/Keith.

There is a bug and it could well result in a crash.

The interface signatures of begin/endTransaction in the
BerkeleyDBStore.h do not match those in the DurableStoreImpl.h whereas
they do in ODBCstore.h.

This is why the base class routines are getting called and generating
the warnings.  The result is that the transaction id is not set up
correctly (it should be an 'out' parameter to beginTransaction but the
default code just leaves the value in the caller untouched).

Regards,
Elwyn

On Thu, 2011-11-10 at 10:15 +0000, Alex McMahon wrote:
> Hi Darren,
> 
> While I can reproduce the DurableStore warning i'm unable to reproduce
> runtime problems or an epic failure/crash (on 64bit Ubuntu 10.04.3) can
> you provide any more detail/logs on this. 
> 
> also just to confirm that S10 logging stuff is in 2.8.0.
> 
> 
> Thanks
> 
> Alex       
> 
> 
> On Thu, 2011-11-10 at 02:01 +0000, Scott, Keith L. wrote:
> > Yeah, that's the DurableStore module complaining that the storage mechanism (BerkeleyDB?) doesn't support transactions (really that the oasys BerkeleyDB manager doesn't implement them, BerekeleyDB I think does support them).
> > 
> > These errors are safe to ignore for now, and should only show up at a higher debug level soon.
> > 
> > 		--keith
> > 
> > -----Original Message-----
> > From: dtn-users-bounces@irtf.org [mailto:dtn-users-bounces@irtf.org] On Behalf Of Darren Long
> > Sent: Wednesday, November 09, 2011 4:23 PM
> > To: dtn-users@irtf.org
> > Subject: [dtn-users] DurableStore errors from dtnd with code from tip
> > 
> > Hiya,
> > 
> > I've been having runtime problems with dtnd on Debian Squeeze.  I'm using libdb4.8 and the berkelydb store.  The logs pretty much carry on like the snippet below, usually culminating in epic fail.  I'd not seen this problem before the release of 2.8.0, but hadn't been keeping up with the tip.
> > 
> > Does anyone have any idea what's going on?
> > 
> > 
> > Cheers,
> > 
> > Darren
> > 
> > [1320873124.849271 /dtnd notice] random seed is 849265
> > [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 30444)
> > [1320873124.954349 /dtn/storage warning] DurableStoreImpl::endTransaction not implemented.
> > [1320873124.954662 /S10 notice] Lines marked "S10" are log lines added to make parsing
> > [1320873124.954687 /S10 notice] the logs easier after extended tests. These were added for
> > [1320873124.954707 /S10 notice] the summer 2010 N4C summer trial and are mainly new lines
> > [1320873124.954726 /S10 notice] that allow tracing bundles across multiple hops.
> > [1320873124.954745 /S10 notice] To extract these do the following...
> > [1320873124.954765 /S10 notice] 	 grep "S10 info" <dtnd-log-files> | grep -v grep | awk '{print $4,$5}' | sort -n
> > [1320873124.957788 /dtn/bundle/daemon notice] loading bundles from data store
> > [1320873124.961231 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > [1320873124.961255 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> > [1320873124.961327 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > [1320873124.961349 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> > [1320873124.961709 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > _______________________________________________
> > dtn-users mailing list
> > dtn-users@irtf.org
> > https://www.irtf.org/mailman/listinfo/dtn-users
> > _______________________________________________
> > dtn-users mailing list
> > dtn-users@irtf.org
> > https://www.irtf.org/mailman/listinfo/dtn-users
> 
> 
> _______________________________________________
> dtn-users mailing list
> dtn-users@irtf.org
> https://www.irtf.org/mailman/listinfo/dtn-users


From alexmcm@gmail.com  Thu Nov 10 10:03:42 2011
Return-Path: <alexmcm@gmail.com>
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 C3D7721F8B45 for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 10:03:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.402
X-Spam-Level: 
X-Spam-Status: No, score=-3.402 tagged_above=-999 required=5 tests=[AWL=0.197,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BLnTPU7Edmdg for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 10:03:42 -0800 (PST)
Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by ietfa.amsl.com (Postfix) with ESMTP id AD7E721F8B30 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 10:03:41 -0800 (PST)
Received: by wyf23 with SMTP id 23so1051225wyf.13 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 10:03:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:subject:from:reply-to:to:cc:in-reply-to:references :content-type:organization:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=PhE+oCyJ9HSGvHe1ZujlOHlzVs1Hh1SkHC+s66ay2tc=; b=JXi9fjO4EdQL9g/ULH1/UAaKmu+Ty2cVacjHopmwidvZ4G1gyFfOEaa0AA7bTWWHT/ DyZFoV4r8Eifmm1AmQvLwzNGhtt8RXE8tAjUOT2pAJd61pfZNc9m34p05bBQLsBdAIKg nP5x1P+nAkaHKqzxjaP+yIj+hn9Yugi/9cWF0=
Received: by 10.227.198.85 with SMTP id en21mr5238904wbb.11.1320948220430; Thu, 10 Nov 2011 10:03:40 -0800 (PST)
Received: from [192.168.1.32] (86-45-83-249-dynamic.b-ras2.srl.dublin.eircom.net. [86.45.83.249]) by mx.google.com with ESMTPS id a27sm10402547wbp.16.2011.11.10.10.03.38 (version=SSLv3 cipher=OTHER); Thu, 10 Nov 2011 10:03:39 -0800 (PST)
Sender: Alex McMahon <alexmcm@gmail.com>
From: Alex McMahon <alex.mcmahon@cs.tcd.ie>
To: Darren Long <darren.long@mac.com>
In-Reply-To: <1320935300.29100.1089.camel@mightyatom.folly.org.uk>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com> <5EE81C5C4CFFF4418C5EAD12F49D64EE0117AD@IMCMBX01.MITRE.ORG> <1320920113.2223.236.camel@oblong> <1320935300.29100.1089.camel@mightyatom.folly.org.uk>
Content-Type: text/plain; charset="UTF-8"
Organization: Trinity College Dublin
Date: Thu, 10 Nov 2011 18:03:17 +0000
Message-ID: <1320948197.2223.2320.camel@oblong>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.3
Content-Transfer-Encoding: 7bit
Cc: dtn-users <dtn-users@irtf.org>
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip - some fixes
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: Thu, 10 Nov 2011 18:03:42 -0000

Hi Darren,


Elwyn has found a bug which might have caused runtime
problems/failure/crash (Although as yet I have been unable to
reproduce). I have tested the patch (oasys) and posted to
SourceForge[1] 

Grateful if other folks who have experienced the problem Darren
described could apply the oasys update and post to the list whether this
resolves the issue

Thanks

Alex  

[1] http://dtn.hg.sourceforge.net/hgweb/dtn/oasys


On Thu, 2011-11-10 at 14:28 +0000, Elwyn Davies wrote:
> Further to the bug report below...
> 
> I believe the attached updated files (and the patches to get there)
> should fix the problem for the Berkeley DB store.  I'll check them out
> shortly but they do compile OK.
> 
> However, we ought really to put some empty routines into memory and file
> store classes to prevent them generating spurious warning messages.
> 
> Regards,
> Elwyn
> 
> Hi, Alex/Darren/Keith.
> 
> There is a bug and it could well result in a crash.
> 
> The interface signatures of begin/endTransaction in the
> BerkeleyDBStore.h do not match those in the DurableStoreImpl.h whereas
> they do in ODBCstore.h.
> 
> This is why the base class routines are getting called and generating
> the warnings.  The result is that the transaction id is not set up
> correctly (it should be an 'out' parameter to beginTransaction but the
> default code just leaves the value in the caller untouched).
> 
> Regards,
> Elwyn
> 
> On Thu, 2011-11-10 at 10:15 +0000, Alex McMahon wrote:
> > Hi Darren,
> > 
> > While I can reproduce the DurableStore warning i'm unable to reproduce
> > runtime problems or an epic failure/crash (on 64bit Ubuntu 10.04.3) can
> > you provide any more detail/logs on this. 
> > 
> > also just to confirm that S10 logging stuff is in 2.8.0.
> > 
> > 
> > Thanks
> > 
> > Alex       
> > 
> > 
> > On Thu, 2011-11-10 at 02:01 +0000, Scott, Keith L. wrote:
> > > Yeah, that's the DurableStore module complaining that the storage mechanism (BerkeleyDB?) doesn't support transactions (really that the oasys BerkeleyDB manager doesn't implement them, BerekeleyDB I think does support them).
> > > 
> > > These errors are safe to ignore for now, and should only show up at a higher debug level soon.
> > > 
> > > 		--keith
> > > 
> > > -----Original Message-----
> > > From: dtn-users-bounces@irtf.org [mailto:dtn-users-bounces@irtf.org] On Behalf Of Darren Long
> > > Sent: Wednesday, November 09, 2011 4:23 PM
> > > To: dtn-users@irtf.org
> > > Subject: [dtn-users] DurableStore errors from dtnd with code from tip
> > > 
> > > Hiya,
> > > 
> > > I've been having runtime problems with dtnd on Debian Squeeze.  I'm using libdb4.8 and the berkelydb store.  The logs pretty much carry on like the snippet below, usually culminating in epic fail.  I'd not seen this problem before the release of 2.8.0, but hadn't been keeping up with the tip.
> > > 
> > > Does anyone have any idea what's going on?
> > > 
> > > 
> > > Cheers,
> > > 
> > > Darren
> > > 
> > > [1320873124.849271 /dtnd notice] random seed is 849265
> > > [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 30444)
> > > [1320873124.954349 /dtn/storage warning] DurableStoreImpl::endTransaction not implemented.
> > > [1320873124.954662 /S10 notice] Lines marked "S10" are log lines added to make parsing
> > > [1320873124.954687 /S10 notice] the logs easier after extended tests. These were added for
> > > [1320873124.954707 /S10 notice] the summer 2010 N4C summer trial and are mainly new lines
> > > [1320873124.954726 /S10 notice] that allow tracing bundles across multiple hops.
> > > [1320873124.954745 /S10 notice] To extract these do the following...
> > > [1320873124.954765 /S10 notice] 	 grep "S10 info" <dtnd-log-files> | grep -v grep | awk '{print $4,$5}' | sort -n
> > > [1320873124.957788 /dtn/bundle/daemon notice] loading bundles from data store
> > > [1320873124.961231 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > > [1320873124.961255 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> > > [1320873124.961327 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > > [1320873124.961349 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> > > [1320873124.961709 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> > > _______________________________________________
> > > dtn-users mailing list
> > > dtn-users@irtf.org
> > > https://www.irtf.org/mailman/listinfo/dtn-users
> > > _______________________________________________
> > > dtn-users mailing list
> > > dtn-users@irtf.org
> > > https://www.irtf.org/mailman/listinfo/dtn-users
> > 
> > 
> > _______________________________________________
> > dtn-users mailing list
> > dtn-users@irtf.org
> > https://www.irtf.org/mailman/listinfo/dtn-users



From leo.iannacone@gmail.com  Thu Nov 10 10:31:13 2011
Return-Path: <leo.iannacone@gmail.com>
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 1D5C621F8B74 for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 10:31:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7DwPzw1vtKWw for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 10:31:12 -0800 (PST)
Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by ietfa.amsl.com (Postfix) with ESMTP id F016421F8B70 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 10:31:11 -0800 (PST)
Received: by vcbfo14 with SMTP id fo14so3916368vcb.13 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 10:31:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=5m99DgHT2Jfe498Q8ShMNVyuMhB8qFrqEIw2ra08LtM=; b=AwnSkKZaltr+wmVekwVMLEek2RX4LfUgxkoe3A1x+ejZS+PAyKL9K3IO4IygbSU3ds cWeJ4Oy3CWLcyVVVVuatQjkDGboiWoaNjQ8q4NqfcSaSxbM6k+PTOpAIB1Ch/0Us9cVn R7IuJuDkbUzvB6gT3Is3ik7OYCwAIq1JmrviM=
Received: by 10.52.185.137 with SMTP id fc9mr14581086vdc.100.1320949870148; Thu, 10 Nov 2011 10:31:10 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.178.1 with HTTP; Thu, 10 Nov 2011 10:30:49 -0800 (PST)
From: Leo Iannacone <leo.iannacone@gmail.com>
Date: Thu, 10 Nov 2011 19:30:49 +0100
Message-ID: <CACzqv1f9w4ZQiyw=TqZE=yKbJOJWMah0is19gr9njR-HKQbmmQ@mail.gmail.com>
To: dtn-users@irtf.org
Content-Type: multipart/mixed; boundary=bcaec5485950c6bb1504b1659bcb
Subject: [dtn-users] DTN fails build: configure unable to find Oasys in the system
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: Thu, 10 Nov 2011 18:31:13 -0000

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

Dear DTN users and developers,

in Oasys there's a problem that makes DTN impossible to install if
library Oasys files are not in the "../" level.

This problem has been reported one year ago, but patch was not
imported in the Oasys devel branch.

In fact, after release 1.5.0 I've discovered problem is still there,
so I rewrote the patch (see attach).

Please, could you try it and give me feedback?

On debian systems you can run following commands to apply patch:

# apt-get install mercurial autotools-dev libdb-dev tcl-dev \
   libxerces-c2-dev build-essential
$ hg clone http://dtn.hg.sourceforge.net/hgweb/dtn/oasys
$ cd oasys

Download the patch (in attachment) and copy it into the Oasys dir,
after that run:
$ patch -p1 < fix-aclocal-oasys_v1.5.patch

Run this script to rebuild configure script:
$ ./build-configure.sh

And now classic build way:
$ ./configure
$ make
# make install

$ cd ..


Download DTN2:
$ hg clone http://dtn.hg.sourceforge.net/web/dtn/DTN2

Run this script to rebuild the configure script:
$ ./build-configure.sh

And again with classic build:
$ ./configure
$ make
# make install


Could you please import patch into devel branch if it works?

Best regards,

Leonardo Iannacone.

--bcaec5485950c6bb1504b1659bcb
Content-Type: text/x-patch; charset=US-ASCII; name="fix-aclocal-oasys_v1.5.patch"
Content-Disposition: attachment; filename="fix-aclocal-oasys_v1.5.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_guu3b6mc0

LS0tIGEvYWNsb2NhbC9vYXN5cy5hYworKysgYi9hY2xvY2FsL29hc3lzLmFjCkBAIC00OCw3ICs0
OCw5IEBACiBkbmwgQUNfT0FTWVNfQ09ORklHIFttYWpvcl0gW21pbm9yXQogZG5sCiBBQ19ERUZV
TihBQ19PQVNZU19DT05GSUcsIFsKLSAgICBybSAtcmYgb2FzeXMKKyAgICBpZiB0ZXN0IC1kIG9h
c3lzIDsgdGhlbgorICAgIAlybSAtcmYgb2FzeXMKKyAgICBmaSAgCiAKICAgICBhY19vYXN5c3Zl
cl9tYWpvcj0kMQogICAgIGFjX29hc3lzdmVyX21pbm9yPSQyCkBAIC02MywzOCArNjUsMzMgQEAK
ICAgICBBQ19NU0dfQ0hFQ0tJTkcoW2ZvciBhbiBvYXN5cyBpbnN0YWxsYXRpb24gKHZlcnNpb24g
JGFjX29hc3lzdmVyX21ham9yLiRhY19vYXN5c3Zlcl9taW5vciBvciBiZXR0ZXIpXSkKIAogICAg
IGFjX29hc3lzZGlyX3Zlcj1gZmluZCAuLiAtbWF4ZGVwdGggMSAtdHlwZSBkIC1uYW1lICRhY19v
YXN5c2Rpcl92ZXJfYmFzZS4qIHwgdGFpbCAtMWAKLSAgICBpZiB0ZXN0ICIkYWNfb2FzeXNkaXIi
ID0gIiIgOyB0aGVuCi0JaWYgdGVzdCAtZCAiJGFjX29hc3lzZGlyX3ZlciIgOyB0aGVuCi0JICAg
IGFjX29hc3lzZGlyPSRhY19vYXN5c2Rpcl92ZXIKLQllbGlmIHRlc3QgLWQgLi4vb2FzeXMgOyB0
aGVuCi0JICAgIGFjX29hc3lzZGlyPS4uL29hc3lzCi0KLQllbHNlCi0JICAgIGFjX29hc3lzZGly
PS91c3IKLQkgICAgIyBTZXQgdGhlIG9hc3lzIHBhdGhzIHByb3Blcmx5LiBPQVNZU19JTkNESVIg
cG9pbnRzIHRvIHRoZSBwYXJlbnQKLQkgICAgIyBkaXJlY3RvcnkgY29udGFpbmluZyB0aGUgb2Fz
eXMgaGVhZGVyIGZpbGVzIG9yIHRoZSBzb3VyY2UKLQkgICAgIyBkaXJlY3RvcnkgaXRzZWxmIHdp
dGggYSBzeW1saW5rIChpbmNsdWRlL29hc3lzIC0+IC4pLAotCSAgICAjIE9BU1lTX0xJQkRJUiBw
b2ludHMgdG8gdGhlIGRpcmVjdG9yeSB3aGVyZSB0aGUgbGlicmFyaWVzIGFyZS4KLQkgICAgIyBP
QVNZU19FVENESVIgcG9pbnRzIHRvIHdoZXJlIHRoZSB2YXJpb3VzIHNjcmlwdHMgYXJlLgotCSAg
ICAjCi0JICAgIE9BU1lTX0lOQ0RJUj0iJGFjX29hc3lzZGlyL2luY2x1ZGUiCi0JICAgIE9BU1lT
X0xJQkRJUj0iJGFjX29hc3lzZGlyL2xpYiIKLQkgICAgT0FTWVNfRVRDRElSPSIkYWNfb2FzeXNk
aXIvc2hhcmUvb2FzeXMiCi0JZmkKKworICAgIGlmIHRlc3QgLWQgIiRhY19vYXN5c2Rpcl92ZXIi
IDsgdGhlbgorICAgICAgYWNfb2FzeXNkaXI9JGFjX29hc3lzZGlyX3ZlcgorICAgCisgICAgZWxp
ZiB0ZXN0IC1kIC4uL29hc3lzIDsgdGhlbgorICAgICAgYWNfb2FzeXNkaXI9Li4vb2FzeXMKKyAg
ICAgIGFjX29hc3lzZGlyX3Zlcj0kYWNfb2FzeXNkaXIgCiAgICAgZmkKLSAgICAgICAgaWYgdGVz
dCAtZCBvYXN5cyA7IHRoZW4KLSAgICAgICAgICAgICAgICBybSAtcmYgb2FzeXMKLSAgICAgICAg
ZmkKLSAgICAgICAgICAgIG1rZGlyIC1wIG9hc3lzL2luY2x1ZGUKLSAgICAgICAgICAgIE9BU1lT
X0RJUj0ib2FzeXMvaW5jbHVkZS9vYXN5cyIKLSAgICAgICAgICAgIE9BU1lTX0lOQ0RJUj0ib2Fz
eXMvaW5jbHVkZSIKLSAgICAgICAgICAgIE9BU1lTX0xJQkRJUj0ib2FzeXMvbGliIgotICAgICAg
ICAgICAgT0FTWVNfRVRDRElSPSJvYXN5cy9zaGFyZSIKLSAgICAgICAgICAgIGxuIC1zIC4uLy4u
LyRhY19vYXN5c2RpciAkT0FTWVNfRElSCi0gICAgICAgICAgICBsbiAtcyAuLi8kYWNfb2FzeXNk
aXIvbGliICRPQVNZU19MSUJESVIKLSAgICAgICAgICAgIGxuIC1zIC4uLyRhY19vYXN5c2RpciAk
T0FTWVNfRVRDRElSCiAKLSAgICAjCisgICAgaWYgdGVzdCAtZCAiJGFjX29hc3lzZGlyX3ZlciIg
OyB0aGVuCisgICAgICBta2RpciBvYXN5cyBvYXN5cy9pbmNsdWRlCisgICAgICBPQVNZU19JTkNE
SVI9Im9hc3lzL2luY2x1ZGUiCisgICAgICBPQVNZU19MSUJESVI9Im9hc3lzL2xpYiIKKyAgICAg
IE9BU1lTX0VUQ0RJUj0ib2FzeXMvc2hhcmUiCisgICAgICBsbiAtcyAuLi8uLi8kYWNfb2FzeXNk
aXIgJE9BU1lTX0lOQ0RJUgorICAgICAgbG4gLXMgLi4vJGFjX29hc3lzZGlyL2xpYiAkT0FTWVNf
TElCRElSCisgICAgICBsbiAtcyAuLi8kYWNfb2FzeXNkaXIgJE9BU1lTX0VUQ0RJUgorCisgICAg
ZWxzZQorICAgICAgaWYgdGVzdCAiJGFjX29hc3lzZGlyIiA9ICIiIDsgdGhlbgorICAgICAgICBh
Y19vYXN5c2Rpcj0vdXNyCisgICAgICBmaQorICAgICAgT0FTWVNfSU5DRElSPSIkYWNfb2FzeXNk
aXIvaW5jbHVkZSIKKyAgICAgIE9BU1lTX0xJQkRJUj0iJGFjX29hc3lzZGlyL2xpYiIKKyAgICAg
IE9BU1lTX0VUQ0RJUj0iJGFjX29hc3lzZGlyL3NoYXJlL29hc3lzIgorICAgIGZpCisgICAKICAg
ICBpZiB0ZXN0ICEgLWQgJE9BU1lTX0lOQ0RJUiA7IHRoZW4gZWNobyAiIgogICAgIEFDX09BU1lT
X0NPTkZJR19IRUxQCiAgICAgQUNfTVNHX0VSUk9SKG5vbmV4aXN0ZW50IG9hc3lzIGluY2x1ZGUg
ZGlyZWN0b3J5ICRPQVNZU19JTkNESVIpCg==
--bcaec5485950c6bb1504b1659bcb--

From darren.long@mac.com  Thu Nov 10 11:22:29 2011
Return-Path: <darren.long@mac.com>
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 635FA21F8B7A for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 11:22:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.703
X-Spam-Level: 
X-Spam-Status: No, score=-0.703 tagged_above=-999 required=5 tests=[AWL=-1.399, BAYES_00=-2.599, FB_WORD2_END_DOLLAR=3.294, WEIRD_PORT=0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LTZFDr-YrmQi for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 11:22:28 -0800 (PST)
Received: from nk11p99mm-asmtpout008.mac.com (nk11p99mm-asmtpout008.mac.com [17.158.233.229]) by ietfa.amsl.com (Postfix) with ESMTP id 84A4C21F8AE9 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 11:22:28 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; CHARSET=US-ASCII
Received: from [192.168.1.10] ([94.30.69.47]) by nk11p03mm-asmtp998.mac.com (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTPSA id <0LUG004YTLRB4570@nk11p03mm-asmtp998.mac.com> for dtn-users@irtf.org; Thu, 10 Nov 2011 19:22:00 +0000 (GMT)
From: Darren Long <darren.long@mac.com>
In-reply-to: <1320948197.2223.2320.camel@oblong>
Date: Thu, 10 Nov 2011 19:21:55 +0000
Message-id: <EC74E572-DFBF-4F82-BE45-7A3BD677FA1E@mac.com>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com> <5EE81C5C4CFFF4418C5EAD12F49D64EE0117AD@IMCMBX01.MITRE.ORG> <1320920113.2223.236.camel@oblong> <1320935300.29100.1089.camel@mightyatom.folly.org.uk> <1320948197.2223.2320.camel@oblong>
To: dtn-users@irtf.org
X-Mailer: Apple Mail (2.1251.1)
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip - some fixes
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: Thu, 10 Nov 2011 19:22:29 -0000

Hi all,

I've not had much luck with the new tip, currently dtnd dies when run with --init-db

In GDB I'm getting this:

darren@delaytolerant:~/dtn$ gdb -args dtnd -c ./dtn.conf --init-db
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/dtnd...done.
(gdb) run
Starting program: /usr/local/bin/dtnd -c ./dtn.conf --init-db
[Thread debugging using libthread_db enabled]
[1320952483.531550 /dtnd notice] random seed is 531543
[1320952483.531634 /dtnd notice] DTN daemon starting up... (pid 5238)
[New Thread 0xb6a71b70 (LWP 5241)]
[1320952483.562681 /dtnd notice] initializing persistent data store
[1320952483.562900 /dtn/storage notice] creating new database directory /home/darren/dtn/db

Program received signal SIGSEGV, Segmentation fault.
0x0832836e in oasys::BerkeleyDBStore::endTransaction (this=0x84bcae8, txid=0x0, be_durable=true) at storage/BerkeleyDBStore.cc:253
253	    ret = txp->commit(txp, flags);
(gdb) bt
#0  0x0832836e in oasys::BerkeleyDBStore::endTransaction (this=0x84bcae8, txid=0x0, be_durable=true) at storage/BerkeleyDBStore.cc:253
#1  0x082fec74 in oasys::DurableStore::endTransaction (this=0x84bc930) at storage/DurableStore.cc:215
#2  0x080765c9 in dtn::DTNServer::init_datastore (this=0x84a0e58) at DTNServer.cc:153
#3  0x08064d57 in dtn::DTND::main (this=0xbffff200, argc=4, argv=0xbffff7b4) at dtnd.cc:188
#4  0x0806505c in main (argc=4, argv=0xbffff7b4) at dtnd.cc:263
(gdb) 

I thought I'd pass this on sooner rather than later. I'm gonna carry on sniffing around in GDB, but the storage side of things is a place I've never been before in DTN2.

Cheers,

Darren

On 10 Nov 2011, at 18:03, Alex McMahon wrote:

> Hi Darren,
> 
> 
> Elwyn has found a bug which might have caused runtime
> problems/failure/crash (Although as yet I have been unable to
> reproduce). I have tested the patch (oasys) and posted to
> SourceForge[1] 
> 
> Grateful if other folks who have experienced the problem Darren
> described could apply the oasys update and post to the list whether this
> resolves the issue
> 
> Thanks
> 
> Alex  
> 
> [1] http://dtn.hg.sourceforge.net/hgweb/dtn/oasys
> 
> 
> On Thu, 2011-11-10 at 14:28 +0000, Elwyn Davies wrote:
>> Further to the bug report below...
>> 
>> I believe the attached updated files (and the patches to get there)
>> should fix the problem for the Berkeley DB store.  I'll check them out
>> shortly but they do compile OK.
>> 
>> However, we ought really to put some empty routines into memory and file
>> store classes to prevent them generating spurious warning messages.
>> 
>> Regards,
>> Elwyn
>> 
>> Hi, Alex/Darren/Keith.
>> 
>> There is a bug and it could well result in a crash.
>> 
>> The interface signatures of begin/endTransaction in the
>> BerkeleyDBStore.h do not match those in the DurableStoreImpl.h whereas
>> they do in ODBCstore.h.
>> 
>> This is why the base class routines are getting called and generating
>> the warnings.  The result is that the transaction id is not set up
>> correctly (it should be an 'out' parameter to beginTransaction but the
>> default code just leaves the value in the caller untouched).
>> 
>> Regards,
>> Elwyn
>> 
>> On Thu, 2011-11-10 at 10:15 +0000, Alex McMahon wrote:
>>> Hi Darren,
>>> 
>>> While I can reproduce the DurableStore warning i'm unable to reproduce
>>> runtime problems or an epic failure/crash (on 64bit Ubuntu 10.04.3) can
>>> you provide any more detail/logs on this. 
>>> 
>>> also just to confirm that S10 logging stuff is in 2.8.0.
>>> 
>>> 
>>> Thanks
>>> 
>>> Alex       
>>> 
>>> 
>>> On Thu, 2011-11-10 at 02:01 +0000, Scott, Keith L. wrote:
>>>> Yeah, that's the DurableStore module complaining that the storage mechanism (BerkeleyDB?) doesn't support transactions (really that the oasys BerkeleyDB manager doesn't implement them, BerekeleyDB I think does support them).
>>>> 
>>>> These errors are safe to ignore for now, and should only show up at a higher debug level soon.
>>>> 
>>>> 		--keith
>>>> 
>>>> -----Original Message-----
>>>> From: dtn-users-bounces@irtf.org [mailto:dtn-users-bounces@irtf.org] On Behalf Of Darren Long
>>>> Sent: Wednesday, November 09, 2011 4:23 PM
>>>> To: dtn-users@irtf.org
>>>> Subject: [dtn-users] DurableStore errors from dtnd with code from tip
>>>> 
>>>> Hiya,
>>>> 
>>>> I've been having runtime problems with dtnd on Debian Squeeze.  I'm using libdb4.8 and the berkelydb store.  The logs pretty much carry on like the snippet below, usually culminating in epic fail.  I'd not seen this problem before the release of 2.8.0, but hadn't been keeping up with the tip.
>>>> 
>>>> Does anyone have any idea what's going on?
>>>> 
>>>> 
>>>> Cheers,
>>>> 
>>>> Darren
>>>> 
>>>> [1320873124.849271 /dtnd notice] random seed is 849265
>>>> [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 30444)
>>>> [1320873124.954349 /dtn/storage warning] DurableStoreImpl::endTransaction not implemented.
>>>> [1320873124.954662 /S10 notice] Lines marked "S10" are log lines added to make parsing
>>>> [1320873124.954687 /S10 notice] the logs easier after extended tests. These were added for
>>>> [1320873124.954707 /S10 notice] the summer 2010 N4C summer trial and are mainly new lines
>>>> [1320873124.954726 /S10 notice] that allow tracing bundles across multiple hops.
>>>> [1320873124.954745 /S10 notice] To extract these do the following...
>>>> [1320873124.954765 /S10 notice] 	 grep "S10 info" <dtnd-log-files> | grep -v grep | awk '{print $4,$5}' | sort -n
>>>> [1320873124.957788 /dtn/bundle/daemon notice] loading bundles from data store
>>>> [1320873124.961231 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
>>>> [1320873124.961255 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
>>>> [1320873124.961327 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
>>>> [1320873124.961349 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
>>>> [1320873124.961709 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
>>>> _______________________________________________
>>>> dtn-users mailing list
>>>> dtn-users@irtf.org
>>>> https://www.irtf.org/mailman/listinfo/dtn-users
>>>> _______________________________________________
>>>> dtn-users mailing list
>>>> dtn-users@irtf.org
>>>> https://www.irtf.org/mailman/listinfo/dtn-users
>>> 
>>> 
>>> _______________________________________________
>>> dtn-users mailing list
>>> dtn-users@irtf.org
>>> https://www.irtf.org/mailman/listinfo/dtn-users
> 
> 


From davieseb@scss.tcd.ie  Thu Nov 10 13:58:08 2011
Return-Path: <davieseb@scss.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 45BB011E808D for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 13:58:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.144
X-Spam-Level: 
X-Spam-Status: No, score=-1.144 tagged_above=-999 required=5 tests=[AWL=-1.840, BAYES_00=-2.599, FB_WORD2_END_DOLLAR=3.294, WEIRD_PORT=0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0+odK9hbbFqs for <dtn-users@ietfa.amsl.com>; Thu, 10 Nov 2011 13:58:07 -0800 (PST)
Received: from scss.tcd.ie (hermes.cs.tcd.ie [IPv6:2001:770:10:200:889f:cdff:fe8d:ccd2]) by ietfa.amsl.com (Postfix) with ESMTP id 0F9A811E8089 for <dtn-users@irtf.org>; Thu, 10 Nov 2011 13:58:05 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by hermes.scss.tcd.ie (Postfix) with ESMTP id EF26F153658; Thu, 10 Nov 2011 21:58:04 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=scss.tcd.ie; h= content-transfer-encoding:x-mailer:mime-version:message-id:date :organization:content-type:references:in-reply-to:from:subject :received:received:x-virus-scanned; s=scss; t=1320962284; bh=xlp kP3of86wfUSCIHdFOpXzOo5yr1eNWS4Yb1TbrqqQ=; b=w185sIKO16ZLgGPEVYr 6MXfwm0KVBO+A6CB0rjm6MVd3r3QQ5S311ViYYZA2MH3GjPNBuxqps9L37ED2C9M vCxv9iI5tZf5V8+PGx6LmV5e0I7YGhQ3OeCp7QHTNV+DiH78lvq8OJnPdNii/stw N0tWjzv6tEtn0sPnrN+jQegFRvXJ7wm6x89hJOr5elkX2qqbdAunpFkRtEmkD+tA wjpSJvHeGUlg4UETL64bd11wstN1v+7xKpf1ZasZuw8lmu3XRtC2CxMc0NdUNNXV /UC+h4AIQ3PNFk588VNUVXkHZwB9scpv8OTS09RbggTbRyfhYohkF7zDG0kNUBPc BVg==
X-Virus-Scanned: Debian amavisd-new at scss.tcd.ie
Received: from scss.tcd.ie ([127.0.0.1]) by localhost (scss.tcd.ie [127.0.0.1]) (amavisd-new, port 10027) with ESMTP id k6enu+ClMboi; Thu, 10 Nov 2011 21:58:04 +0000 (GMT)
Received: from [81.187.254.250] (250.254.187.81.in-addr.arpa [81.187.254.250]) by smtp.scss.tcd.ie (Postfix) with ESMTPSA id 3E19F153657; Thu, 10 Nov 2011 21:58:02 +0000 (GMT)
From: Elwyn Davies <davieseb@scss.tcd.ie>
To: Darren Long <darren.long@mac.com>, Alex McMahon <alex.mcmahon@cs.tcd.ie>
In-Reply-To: <EC74E572-DFBF-4F82-BE45-7A3BD677FA1E@mac.com>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com> <5EE81C5C4CFFF4418C5EAD12F49D64EE0117AD@IMCMBX01.MITRE.ORG> <1320920113.2223.236.camel@oblong> <1320935300.29100.1089.camel@mightyatom.folly.org.uk> <1320948197.2223.2320.camel@oblong> <EC74E572-DFBF-4F82-BE45-7A3BD677FA1E@mac.com>
Content-Type: text/plain
Organization: School of Computer Science and Statistics,  TCD
Date: Thu, 10 Nov 2011 22:04:26 +0000
Message-Id: <1320962666.29100.1173.camel@mightyatom.folly.org.uk>
Mime-Version: 1.0
X-Mailer: Evolution 2.26.3 
Content-Transfer-Encoding: 7bit
Cc: dtn-users@irtf.org
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip - some fixes
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: Thu, 10 Nov 2011 21:58:08 -0000

Hmm.

It looks as if there is some more work to do.  I think init_datastore is
broken.  It doesn't seem to have a beginTransaction to match the
endTransaction.  This calls the endTransaction in DurableStore.cc so the
lack of parameters is right.

With ODBC txid isn't used in the actual database so it doesn't matter
but for BerkeleyDB it does.

If you want to try things further comment out the makeTransactionDurable
and endTransaction at lines 152/153 of DTN2/servlib/DTNserver.cc.

oasys/storage/DurableStore.cc needs some extra code to stop it barfing
when open_txid_ is NULL as it is if beginTransaction is not called
first.  As I said the ODBC case doesn't care.

I'll look at this further tomorrow.

Regards,
Elwyn


On Thu, 2011-11-10 at 19:21 +0000, Darren Long wrote:
> Hi all,
> 
> I've not had much luck with the new tip, currently dtnd dies when run with --init-db
> 
> In GDB I'm getting this:
> 
> darren@delaytolerant:~/dtn$ gdb -args dtnd -c ./dtn.conf --init-db
> GNU gdb (GDB) 7.0.1-debian
> Copyright (C) 2009 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i486-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /usr/local/bin/dtnd...done.
> (gdb) run
> Starting program: /usr/local/bin/dtnd -c ./dtn.conf --init-db
> [Thread debugging using libthread_db enabled]
> [1320952483.531550 /dtnd notice] random seed is 531543
> [1320952483.531634 /dtnd notice] DTN daemon starting up... (pid 5238)
> [New Thread 0xb6a71b70 (LWP 5241)]
> [1320952483.562681 /dtnd notice] initializing persistent data store
> [1320952483.562900 /dtn/storage notice] creating new database directory /home/darren/dtn/db
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x0832836e in oasys::BerkeleyDBStore::endTransaction (this=0x84bcae8, txid=0x0, be_durable=true) at storage/BerkeleyDBStore.cc:253
> 253	    ret = txp->commit(txp, flags);
> (gdb) bt
> #0  0x0832836e in oasys::BerkeleyDBStore::endTransaction (this=0x84bcae8, txid=0x0, be_durable=true) at storage/BerkeleyDBStore.cc:253
> #1  0x082fec74 in oasys::DurableStore::endTransaction (this=0x84bc930) at storage/DurableStore.cc:215
> #2  0x080765c9 in dtn::DTNServer::init_datastore (this=0x84a0e58) at DTNServer.cc:153
> #3  0x08064d57 in dtn::DTND::main (this=0xbffff200, argc=4, argv=0xbffff7b4) at dtnd.cc:188
> #4  0x0806505c in main (argc=4, argv=0xbffff7b4) at dtnd.cc:263
> (gdb) 
> 
> I thought I'd pass this on sooner rather than later. I'm gonna carry on sniffing around in GDB, but the storage side of things is a place I've never been before in DTN2.
> 
> Cheers,
> 
> Darren
> 
> On 10 Nov 2011, at 18:03, Alex McMahon wrote:
> 
> > Hi Darren,
> > 
> > 
> > Elwyn has found a bug which might have caused runtime
> > problems/failure/crash (Although as yet I have been unable to
> > reproduce). I have tested the patch (oasys) and posted to
> > SourceForge[1] 
> > 
> > Grateful if other folks who have experienced the problem Darren
> > described could apply the oasys update and post to the list whether this
> > resolves the issue
> > 
> > Thanks
> > 
> > Alex  
> > 
> > [1] http://dtn.hg.sourceforge.net/hgweb/dtn/oasys
> > 
> > 
> > On Thu, 2011-11-10 at 14:28 +0000, Elwyn Davies wrote:
> >> Further to the bug report below...
> >> 
> >> I believe the attached updated files (and the patches to get there)
> >> should fix the problem for the Berkeley DB store.  I'll check them out
> >> shortly but they do compile OK.
> >> 
> >> However, we ought really to put some empty routines into memory and file
> >> store classes to prevent them generating spurious warning messages.
> >> 
> >> Regards,
> >> Elwyn
> >> 
> >> Hi, Alex/Darren/Keith.
> >> 
> >> There is a bug and it could well result in a crash.
> >> 
> >> The interface signatures of begin/endTransaction in the
> >> BerkeleyDBStore.h do not match those in the DurableStoreImpl.h whereas
> >> they do in ODBCstore.h.
> >> 
> >> This is why the base class routines are getting called and generating
> >> the warnings.  The result is that the transaction id is not set up
> >> correctly (it should be an 'out' parameter to beginTransaction but the
> >> default code just leaves the value in the caller untouched).
> >> 
> >> Regards,
> >> Elwyn
> >> 
> >> On Thu, 2011-11-10 at 10:15 +0000, Alex McMahon wrote:
> >>> Hi Darren,
> >>> 
> >>> While I can reproduce the DurableStore warning i'm unable to reproduce
> >>> runtime problems or an epic failure/crash (on 64bit Ubuntu 10.04.3) can
> >>> you provide any more detail/logs on this. 
> >>> 
> >>> also just to confirm that S10 logging stuff is in 2.8.0.
> >>> 
> >>> 
> >>> Thanks
> >>> 
> >>> Alex       
> >>> 
> >>> 
> >>> On Thu, 2011-11-10 at 02:01 +0000, Scott, Keith L. wrote:
> >>>> Yeah, that's the DurableStore module complaining that the storage mechanism (BerkeleyDB?) doesn't support transactions (really that the oasys BerkeleyDB manager doesn't implement them, BerekeleyDB I think does support them).
> >>>> 
> >>>> These errors are safe to ignore for now, and should only show up at a higher debug level soon.
> >>>> 
> >>>> 		--keith
> >>>> 
> >>>> -----Original Message-----
> >>>> From: dtn-users-bounces@irtf.org [mailto:dtn-users-bounces@irtf.org] On Behalf Of Darren Long
> >>>> Sent: Wednesday, November 09, 2011 4:23 PM
> >>>> To: dtn-users@irtf.org
> >>>> Subject: [dtn-users] DurableStore errors from dtnd with code from tip
> >>>> 
> >>>> Hiya,
> >>>> 
> >>>> I've been having runtime problems with dtnd on Debian Squeeze.  I'm using libdb4.8 and the berkelydb store.  The logs pretty much carry on like the snippet below, usually culminating in epic fail.  I'd not seen this problem before the release of 2.8.0, but hadn't been keeping up with the tip.
> >>>> 
> >>>> Does anyone have any idea what's going on?
> >>>> 
> >>>> 
> >>>> Cheers,
> >>>> 
> >>>> Darren
> >>>> 
> >>>> [1320873124.849271 /dtnd notice] random seed is 849265
> >>>> [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 30444)
> >>>> [1320873124.954349 /dtn/storage warning] DurableStoreImpl::endTransaction not implemented.
> >>>> [1320873124.954662 /S10 notice] Lines marked "S10" are log lines added to make parsing
> >>>> [1320873124.954687 /S10 notice] the logs easier after extended tests. These were added for
> >>>> [1320873124.954707 /S10 notice] the summer 2010 N4C summer trial and are mainly new lines
> >>>> [1320873124.954726 /S10 notice] that allow tracing bundles across multiple hops.
> >>>> [1320873124.954745 /S10 notice] To extract these do the following...
> >>>> [1320873124.954765 /S10 notice] 	 grep "S10 info" <dtnd-log-files> | grep -v grep | awk '{print $4,$5}' | sort -n
> >>>> [1320873124.957788 /dtn/bundle/daemon notice] loading bundles from data store
> >>>> [1320873124.961231 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> >>>> [1320873124.961255 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> >>>> [1320873124.961327 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> >>>> [1320873124.961349 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
> >>>> [1320873124.961709 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
> >>>> _______________________________________________
> >>>> dtn-users mailing list
> >>>> dtn-users@irtf.org
> >>>> https://www.irtf.org/mailman/listinfo/dtn-users
> >>>> _______________________________________________
> >>>> dtn-users mailing list
> >>>> dtn-users@irtf.org
> >>>> https://www.irtf.org/mailman/listinfo/dtn-users
> >>> 
> >>> 
> >>> _______________________________________________
> >>> dtn-users mailing list
> >>> dtn-users@irtf.org
> >>> https://www.irtf.org/mailman/listinfo/dtn-users
> > 
> > 
> 
> _______________________________________________
> dtn-users mailing list
> dtn-users@irtf.org
> https://www.irtf.org/mailman/listinfo/dtn-users


From alexmcm@gmail.com  Fri Nov 11 03:16:21 2011
Return-Path: <alexmcm@gmail.com>
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 EAE3521F8669 for <dtn-users@ietfa.amsl.com>; Fri, 11 Nov 2011 03:16:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.468
X-Spam-Level: 
X-Spam-Status: No, score=-3.468 tagged_above=-999 required=5 tests=[AWL=0.132,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k04JDCPKqwMk for <dtn-users@ietfa.amsl.com>; Fri, 11 Nov 2011 03:16:21 -0800 (PST)
Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by ietfa.amsl.com (Postfix) with ESMTP id 32D7621F8663 for <dtn-users@irtf.org>; Fri, 11 Nov 2011 03:16:18 -0800 (PST)
Received: by wyf23 with SMTP id 23so2056405wyf.13 for <dtn-users@irtf.org>; Fri, 11 Nov 2011 03:16:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:subject:from:reply-to:to:cc:in-reply-to:references :content-type:organization:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=kPq+k2AwX83bfYbjPyIl+Qo53svrnZVR2sEUy6Q15xg=; b=ck/tYy8OE3Jh+/SYFBNckshXADxVgT7fYahpBZ5XvLt0Y7zBPFsPLaPzo6gZFc2ptf vFqosrJRNJfbsK+lVY7TtDb5+dXBnHGBBg+c87VIUvsyTtArFYlottq1AOeOp5TNT1t8 sdOjaF+YYNmNmc5GFJIp4dTEwgMT2i5D0QJiA=
Received: by 10.227.205.132 with SMTP id fq4mr7465748wbb.5.1321010176026; Fri, 11 Nov 2011 03:16:16 -0800 (PST)
Received: from [192.168.1.32] (86-45-83-249-dynamic.b-ras2.srl.dublin.eircom.net. [86.45.83.249]) by mx.google.com with ESMTPS id en10sm5500267wbb.0.2011.11.11.03.16.13 (version=SSLv3 cipher=OTHER); Fri, 11 Nov 2011 03:16:15 -0800 (PST)
Sender: Alex McMahon <alexmcm@gmail.com>
From: Alex McMahon <alex.mcmahon@cs.tcd.ie>
To: Leo Iannacone <leo.iannacone@gmail.com>
In-Reply-To: <CACzqv1f9w4ZQiyw=TqZE=yKbJOJWMah0is19gr9njR-HKQbmmQ@mail.gmail.com>
References: <CACzqv1f9w4ZQiyw=TqZE=yKbJOJWMah0is19gr9njR-HKQbmmQ@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Organization: Trinity College Dublin
Date: Fri, 11 Nov 2011 09:29:11 +0000
Message-ID: <1321003751.23044.1002.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] DTN fails build: configure unable to find Oasys in the system
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: Fri, 11 Nov 2011 11:16:22 -0000

Hi Leo,


Your oasys patch works and will be applied

All the best

Alex 

On Thu, 2011-11-10 at 19:30 +0100, Leo Iannacone wrote:
> Dear DTN users and developers,
> 
> in Oasys there's a problem that makes DTN impossible to install if
> library Oasys files are not in the "../" level.
> 
> This problem has been reported one year ago, but patch was not
> imported in the Oasys devel branch.
> 
> In fact, after release 1.5.0 I've discovered problem is still there,
> so I rewrote the patch (see attach).
> 
> Please, could you try it and give me feedback?
> 
> On debian systems you can run following commands to apply patch:
> 
> # apt-get install mercurial autotools-dev libdb-dev tcl-dev \
>    libxerces-c2-dev build-essential
> $ hg clone http://dtn.hg.sourceforge.net/hgweb/dtn/oasys
> $ cd oasys
> 
> Download the patch (in attachment) and copy it into the Oasys dir,
> after that run:
> $ patch -p1 < fix-aclocal-oasys_v1.5.patch
> 
> Run this script to rebuild configure script:
> $ ./build-configure.sh
> 
> And now classic build way:
> $ ./configure
> $ make
> # make install
> 
> $ cd ..
> 
> 
> Download DTN2:
> $ hg clone http://dtn.hg.sourceforge.net/web/dtn/DTN2
> 
> Run this script to rebuild the configure script:
> $ ./build-configure.sh
> 
> And again with classic build:
> $ ./configure
> $ make
> # make install
> 
> 
> Could you please import patch into devel branch if it works?
> 
> Best regards,
> 
> Leonardo Iannacone.
> _______________________________________________
> dtn-users mailing list
> dtn-users@irtf.org
> https://www.irtf.org/mailman/listinfo/dtn-users



From elwynd@folly.org.uk  Fri Nov 11 09:07:12 2011
Return-Path: <elwynd@folly.org.uk>
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 29CDE21F8538 for <dtn-users@ietfa.amsl.com>; Fri, 11 Nov 2011 09:07:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 2.317
X-Spam-Level: **
X-Spam-Status: No, score=2.317 tagged_above=-999 required=5 tests=[AWL=4.916,  BAYES_00=-2.599]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gzt5ulJWoZ1s for <dtn-users@ietfa.amsl.com>; Fri, 11 Nov 2011 09:07:11 -0800 (PST)
Received: from c.painless.aaisp.net.uk (c.painless.aaisp.net.uk [IPv6:2001:8b0:0:30::51bb:1e35]) by ietfa.amsl.com (Postfix) with ESMTP id 30C0821F851A for <dtn-users@irtf.org>; Fri, 11 Nov 2011 09:07:10 -0800 (PST)
Received: from 249.254.187.81.in-addr.arpa ([81.187.254.249]) by c.painless.aaisp.net.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from <elwynd@folly.org.uk>) id 1ROuZH-0002Pk-GV; Fri, 11 Nov 2011 17:07:07 +0000
Message-ID: <4EBD5638.20503@folly.org.uk>
Date: Fri, 11 Nov 2011 17:07:04 +0000
From: Elwyn Davies <elwynd@folly.org.uk>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Thunderbird/3.1.15
MIME-Version: 1.0
To: dtn-users@irtf.org
Content-Type: multipart/mixed; boundary="------------000803060003090302050405"
Subject: [dtn-users] More work on transaction problem in oasys
X-BeenThere: dtn-users@irtf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: elwynd@folly.org.uk
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: Fri, 11 Nov 2011 17:07:12 -0000

This is a multi-part message in MIME format.
--------------000803060003090302050405
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi.

Darren Long reported that yesterday's 'fix' to the oasys storage 
routines resulted in a crash during database initialization.

I was able to reproduce the crash on a 32 bit machine running Berkeley 
DB 4.7.  For some reason Alex could not do so on a 64 bit machine.

However, inspection of the code indicates that there is a problem, at 
least during full database initialization, due to an apparent unmatched 
endTransaction in DTNServer::init_datastore.  This feeds a NULL pointer 
to the Berkeley commit routine as there is no transaction open at the 
time.  Closer inspection reveals that there is some more work to be done 
to properly integrate the new transaction control with the legacy 
storage mechanisms (BerkeleyDB, memorydb, filedb) so I have implemented 
a temporary workaround that turns the BerkeleyDB begin/endTransaction 
routines into no-ops, and added some debugging statements to allow us to 
track what is going on in case of further disaster.

I have checked this out to a limited extent with BerkeleyDB and it 
appears to work correctly so far.  If anybody (notably Darren) has any 
further problems - and has any feedback - please let me know.

The patch is attached and it is now in the repository on Sourcefourge 
(Change 2283).

Keith Scott is away until next week.  I'll liaise with him when he gets 
back to get a fully functional and unhacked system back up.

Regards,
Elwyn


--------------000803060003090302050405
Content-Type: text/plain;
 name="patch_2283"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="patch_2283"

diff -r 8941bd3e6dfb -r ee5bc0d3f40d storage/BerkeleyDBStore.cc
--- a/storage/BerkeleyDBStore.cc	Thu Nov 10 17:24:03 2011 +0000
+++ b/storage/BerkeleyDBStore.cc	Fri Nov 11 15:54:29 2011 +0000
@@ -222,6 +222,7 @@
 
     log_debug("BerkeleyDBStore::beginTransaction.");
 
+#if 0
     ret = dbenv_->txn_begin(dbenv_, NULL, &txid_local, flags);
     if ( ret!=0 ) {
         if ( ret==DB_RUNRECOVERY ) {
@@ -232,6 +233,13 @@
     if ( txid != NULL ) {
         *txid = (void *)txid_local;
     }
+#else
+    if ( txid != NULL) {
+        txid_local = (DB_TXN *)(*txid);
+	flags = 0x0;
+	ret = 0;
+    }
+#endif
 
     return 0;
 }
@@ -244,15 +252,21 @@
     u_int32_t flags = 0x0;
     DB_TXN *txp = (DB_TXN *) txid;
 
-    log_debug("BerkeleyDBStore::endTransaction");
+    log_debug("BerkeleyDBStore::endTransaction: txid = %p", txid);
 
     if ( be_durable ) {
     	log_debug("BerkeleyDBStore::endTransaction called with be_durable TRUE");
     }
 
+#if 0
     ret = txp->commit(txp, flags);
+#else
+    flags = 0x0;
+    txp = (DB_TXN *) txid;
+    ret = 0;
+#endif
 
-    return 0;
+    return ret;
 }
 
 //----------------------------------------------------------------------------
diff -r 8941bd3e6dfb -r ee5bc0d3f40d storage/DurableStore.cc
--- a/storage/DurableStore.cc	Thu Nov 10 17:24:03 2011 +0000
+++ b/storage/DurableStore.cc	Fri Nov 11 15:54:29 2011 +0000
@@ -171,6 +171,8 @@
 //         transaction_lock_.lock("beginTransaction");
 //     }
 
+     log_debug("DurableStore::beginTransaction entered");
+
      if (impl_!=NULL) {
         if ( open_txid_ ) {
             log_debug("DurableStore::beginTransaction called with Tx already open.");
@@ -179,6 +181,8 @@
             }
             return(0);
         } else {
+	    tx_counter_++;
+	    log_info("DurableStore::beginTransaction calling implementation beginTransaction for transaction %u", tx_counter_);
             ret = impl_->beginTransaction(&open_txid_);
             if ( ret==DS_ERR ) {
                 log_warn("error in beginTransaction; releasing lock and DS_ERR");
@@ -212,6 +216,7 @@
     }
 
     if (impl_!=NULL) {
+	log_info("DurableStore::endTransaction calling implementation endTransaction for transaction %u", tx_counter_);
         ret = impl_->endTransaction(open_txid_, durably_close_next_transaction_);
         open_txid_ = NULL;
         log_debug("DurableStore::endTransaction - releasing transaction lock.");
diff -r 8941bd3e6dfb -r ee5bc0d3f40d storage/DurableStore.h
--- a/storage/DurableStore.h	Thu Nov 10 17:24:03 2011 +0000
+++ b/storage/DurableStore.h	Fri Nov 11 15:54:29 2011 +0000
@@ -107,7 +107,7 @@
      */
     DurableStore(const char* logpath)
         : Logger("DurableStore", "%s", logpath), open_txid_(NULL),
-          haveSeenTransaction(false), impl_(0)
+          haveSeenTransaction(false), tx_counter_(0), impl_(0)
     { 
         log_debug("DurableStore instantiated (%p)", this);
         set_instance(this);
@@ -246,6 +246,7 @@
     void *open_txid_;
     pthread_t transactionThread;
     bool haveSeenTransaction;
+    unsigned int tx_counter_;		  // Counter for transactions executed
 
     bool durably_close_next_transaction_; // Durably save state at next
                                           // transaction close.


--------------000803060003090302050405--

From leo.iannacone@gmail.com  Fri Nov 11 09:14:35 2011
Return-Path: <leo.iannacone@gmail.com>
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 2592621F8A97 for <dtn-users@ietfa.amsl.com>; Fri, 11 Nov 2011 09:14:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gLOLJWWxG2J0 for <dtn-users@ietfa.amsl.com>; Fri, 11 Nov 2011 09:14:34 -0800 (PST)
Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by ietfa.amsl.com (Postfix) with ESMTP id EAD5A21F85F2 for <dtn-users@irtf.org>; Fri, 11 Nov 2011 09:14:33 -0800 (PST)
Received: by vws11 with SMTP id 11so5275571vws.13 for <dtn-users@irtf.org>; Fri, 11 Nov 2011 09:14:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=q3PccoBbzTjyco77sPQ5y5Is2vwZazoJYhtbe9CNUnE=; b=DDdIKUn6g2ogH47DY3rTiuyc9jfnRw/34UJL7b1OVe2gXIGERspKe2HIrr737YM+oP hvBSSPfbPFaKDaNsDLkvRzv+3q+w1l5qnvhFIrQpJHqDtxQNiKERDRBB4qtH04IYLF6y QykmomIJzRekb4uDyyJJyf/pf2fgTf1nOq1ZU=
Received: by 10.52.24.11 with SMTP id q11mr22382265vdf.83.1321031673077; Fri, 11 Nov 2011 09:14:33 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.178.1 with HTTP; Fri, 11 Nov 2011 09:14:12 -0800 (PST)
From: Leo Iannacone <leo.iannacone@gmail.com>
Date: Fri, 11 Nov 2011 18:14:12 +0100
Message-ID: <CACzqv1fEDO0c38wiNN51OQ_77536nSq6y1uajdwN-T6M9HVx7Q@mail.gmail.com>
To: dtn-users@irtf.org
Content-Type: text/plain; charset=ISO-8859-1
Subject: [dtn-users] DTN has non standard dir in var
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: Fri, 11 Nov 2011 17:14:35 -0000

By default, dtn uses /var/dtn to store bundles and db, but it isn't
the standard way.

The FHS says "Applications should generally not add directories to the
top level of /var. Such directories should only be added if they have
some system-wide implication, and in consultation with the FHS mailing
list."

Refer to Filesystem Hierarchy Standard(1) (The /var Hierarchy (2)) for details.

I suggest to move all in /var/cache/dtn/

Is it possible do it editing code?

Best regards,
Leo.

REF:
1 - http://www.pathname.com/fhs/pub/fhs-2.3.html
2 - http://www.pathname.com/fhs/pub/fhs-2.3.html#THEVARHIERARCHY

From leo.iannacone@gmail.com  Fri Nov 11 09:42:22 2011
Return-Path: <leo.iannacone@gmail.com>
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 A036121F86EE for <dtn-users@ietfa.amsl.com>; Fri, 11 Nov 2011 09:42:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2zIiFwso9jYo for <dtn-users@ietfa.amsl.com>; Fri, 11 Nov 2011 09:42:22 -0800 (PST)
Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by ietfa.amsl.com (Postfix) with ESMTP id 09EF421F8678 for <dtn-users@irtf.org>; Fri, 11 Nov 2011 09:42:21 -0800 (PST)
Received: by vws11 with SMTP id 11so5310420vws.13 for <dtn-users@irtf.org>; Fri, 11 Nov 2011 09:42:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=nGnyVucN9XmrNNstrt/5Ol9/1WhjQl5/1H3cKwzmBNY=; b=krVAtsQ/aOHOcLBIx6oybJGb8u3fVVd7p5VwlqhvVibJbF0SRhoY07sevGZBr5Srxx 8/3LxBjTdv+CE2+9+V9XWsgeTVP3mZNnsrhV7BEW+CcANqjBWzumdLGWniPEknQZeQtU xMyg0prN0pOsxfazg7sLcvzQT/vOiZceyuRl0=
Received: by 10.52.65.37 with SMTP id u5mr22902480vds.45.1321033341367; Fri, 11 Nov 2011 09:42:21 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.178.1 with HTTP; Fri, 11 Nov 2011 09:42:00 -0800 (PST)
In-Reply-To: <1321003751.23044.1002.camel@oblong>
References: <CACzqv1f9w4ZQiyw=TqZE=yKbJOJWMah0is19gr9njR-HKQbmmQ@mail.gmail.com> <1321003751.23044.1002.camel@oblong>
From: Leo Iannacone <leo.iannacone@gmail.com>
Date: Fri, 11 Nov 2011 18:42:00 +0100
Message-ID: <CACzqv1cgZtwAYNUrB5RnU7FhkB7_KL-250jE7BVZP9yDVePCMA@mail.gmail.com>
To: alex.mcmahon@cs.tcd.ie
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: dtn-users@irtf.org
Subject: Re: [dtn-users] DTN fails build: configure unable to find Oasys in the system
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: Fri, 11 Nov 2011 17:42:22 -0000

On 11 November 2011 10:29, Alex McMahon <alex.mcmahon@cs.tcd.ie> wrote:
> Hi Leo,

Hi Alex!


> Your oasys patch works and will be applied

Thank you!

Just a remind: in order to "really" apply patch you must edit the DTN
branch too, the file "aclocal.m4" need to be updated.

Thanks again,

yours,
Leo.



> All the best
>
> Alex
>
> On Thu, 2011-11-10 at 19:30 +0100, Leo Iannacone wrote:
>> Dear DTN users and developers,
>>
>> in Oasys there's a problem that makes DTN impossible to install if
>> library Oasys files are not in the "../" level.
>>
>> This problem has been reported one year ago, but patch was not
>> imported in the Oasys devel branch.
>>
>> In fact, after release 1.5.0 I've discovered problem is still there,
>> so I rewrote the patch (see attach).
>>
>> Please, could you try it and give me feedback?
>>
>> On debian systems you can run following commands to apply patch:
>>
>> # apt-get install mercurial autotools-dev libdb-dev tcl-dev \
>> =A0 =A0libxerces-c2-dev build-essential
>> $ hg clone http://dtn.hg.sourceforge.net/hgweb/dtn/oasys
>> $ cd oasys
>>
>> Download the patch (in attachment) and copy it into the Oasys dir,
>> after that run:
>> $ patch -p1 < fix-aclocal-oasys_v1.5.patch
>>
>> Run this script to rebuild configure script:
>> $ ./build-configure.sh
>>
>> And now classic build way:
>> $ ./configure
>> $ make
>> # make install
>>
>> $ cd ..
>>
>>
>> Download DTN2:
>> $ hg clone http://dtn.hg.sourceforge.net/web/dtn/DTN2
>>
>> Run this script to rebuild the configure script:
>> $ ./build-configure.sh
>>
>> And again with classic build:
>> $ ./configure
>> $ make
>> # make install
>>
>>
>> Could you please import patch into devel branch if it works?
>>
>> Best regards,
>>
>> Leonardo Iannacone.
>> _______________________________________________
>> dtn-users mailing list
>> dtn-users@irtf.org
>> https://www.irtf.org/mailman/listinfo/dtn-users
>
>
>

From leo.iannacone@gmail.com  Fri Nov 11 09:57:56 2011
Return-Path: <leo.iannacone@gmail.com>
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 03D0721F8997 for <dtn-users@ietfa.amsl.com>; Fri, 11 Nov 2011 09:57:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id auz0FdgzBe21 for <dtn-users@ietfa.amsl.com>; Fri, 11 Nov 2011 09:57:55 -0800 (PST)
Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by ietfa.amsl.com (Postfix) with ESMTP id 1A8B621F8AF0 for <dtn-users@irtf.org>; Fri, 11 Nov 2011 09:57:55 -0800 (PST)
Received: by vws11 with SMTP id 11so5328508vws.13 for <dtn-users@irtf.org>; Fri, 11 Nov 2011 09:57:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=YBJit2M60M+1Vwfx2pAoNzJZ/RUSE2oWJmcAjLkpJDI=; b=kWlHbIDS4HQ9nC2zkqfkFmGwkLXAlTwjA1eQIvsg/Btt1QtjDhsP5v6xDyZHauOjXI Dyg17AjSc0mimDnxSX0l6o3jK+vJBs1tpBXsqk8uGEifGGHjDkCzvjq2Qnrs8PseZj2R i6CrhYZkqnGDdFwbq1noIKF8lhci7a0ptB7AY=
Received: by 10.52.65.37 with SMTP id u5mr22996825vds.45.1321034274130; Fri, 11 Nov 2011 09:57:54 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.178.1 with HTTP; Fri, 11 Nov 2011 09:57:31 -0800 (PST)
In-Reply-To: <1321033482.29100.1540.camel@mightyatom.folly.org.uk>
References: <CACzqv1fEDO0c38wiNN51OQ_77536nSq6y1uajdwN-T6M9HVx7Q@mail.gmail.com> <1321033482.29100.1540.camel@mightyatom.folly.org.uk>
From: Leo Iannacone <leo.iannacone@gmail.com>
Date: Fri, 11 Nov 2011 18:57:31 +0100
Message-ID: <CACzqv1cvj33cy3is-Ze7WBAod=uG7sYLr6371SYH2NgFaoZvcA@mail.gmail.com>
To: Elwyn Davies <elwynd@folly.org.uk>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: dtn-users@irtf.org
Subject: Re: [dtn-users] DTN has non standard dir in var
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: Fri, 11 Nov 2011 17:57:56 -0000

On 11 November 2011 18:44, Elwyn Davies <elwynd@folly.org.uk> wrote:
> Hi, Leo.
>

Hi Elwyn,

> The location of the data is controlled by the dtn.conf configuration
> file.
>
> If you would prefer not to use /var/dtn tweak the dbdir value being
> used.

I know, what I'm asking is: Is it possible change it by default?. In
other words: "could it be changed in the DTN branch?"

This is just to make things in "standard way".

Moreover, consider that in some files you have this reference to
/var/dtn, to be more precious:

~/DTN2 $ grep -r '/var/dtn' * | cut -d':' -f1 | uniq

apps/dtnperf/dtnperf-client.c
apps/dtnperf/dtnperf-server.c
apps/dtnperf/dtnperf-details.txt
daemon/dtn.conf
debian/dtn.postinst
debian/dtn.init.d
debian/dtn.logrotate
debian/dtn.postrm
doc/manual/configuration.html
doc/manual/man_dtncpd.html
servlib/cmd/StorageCommand.cc
tools/uninstall.sh

> Actually there is an issue with the example dtn.conf in the current
> SourceForge distribution. =A0A hard coded dbdir has crept in at chanegset
> 3523.
> Line 86: set dbdir /home/user/workspace/hg_10_10_11/dbdir
>
> This should not be there.

Right...

>
> Regards,
> Elwyn
>

Regards,

Leo.


> On Fri, 2011-11-11 at 18:14 +0100, Leo Iannacone wrote:
>> By default, dtn uses /var/dtn to store bundles and db, but it isn't
>> the standard way.
>>
>> The FHS says "Applications should generally not add directories to the
>> top level of /var. Such directories should only be added if they have
>> some system-wide implication, and in consultation with the FHS mailing
>> list."
>>
>> Refer to Filesystem Hierarchy Standard(1) (The /var Hierarchy (2)) for d=
etails.
>>
>> I suggest to move all in /var/cache/dtn/
>>
>> Is it possible do it editing code?
>>
>> Best regards,
>> Leo.
>>
>> REF:
>> 1 - http://www.pathname.com/fhs/pub/fhs-2.3.html
>> 2 - http://www.pathname.com/fhs/pub/fhs-2.3.html#THEVARHIERARCHY
>> _______________________________________________
>> dtn-users mailing list
>> dtn-users@irtf.org
>> https://www.irtf.org/mailman/listinfo/dtn-users
>
>

From darren.long@mac.com  Tue Nov 15 09:59:08 2011
Return-Path: <darren.long@mac.com>
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 842E01F0C40 for <dtn-users@ietfa.amsl.com>; Tue, 15 Nov 2011 09:59:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.353
X-Spam-Level: 
X-Spam-Status: No, score=-0.353 tagged_above=-999 required=5 tests=[AWL=-1.049, BAYES_00=-2.599, FB_WORD2_END_DOLLAR=3.294, WEIRD_PORT=0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HmfXvdpqhCMM for <dtn-users@ietfa.amsl.com>; Tue, 15 Nov 2011 09:59:03 -0800 (PST)
Received: from nk11p99mm-asmtpout005.mac.com (nk11p99mm-asmtpout005.mac.com [17.158.233.226]) by ietfa.amsl.com (Postfix) with ESMTP id 1F44D1F0C3C for <dtn-users@irtf.org>; Tue, 15 Nov 2011 09:59:00 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; CHARSET=US-ASCII
Received: from [192.168.1.10] ([94.30.69.47]) by nk11p03mm-asmtp995.mac.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0LUP005VQR94RF30@nk11p03mm-asmtp995.mac.com> for dtn-users@irtf.org; Tue, 15 Nov 2011 17:58:56 +0000 (GMT)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110,1.0.211,0.0.0000 definitions=2011-11-15_06:2011-11-15, 2011-11-15, 1970-01-01 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=3 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1111150173
From: Darren Long <darren.long@mac.com>
In-reply-to: <1320962666.29100.1173.camel@mightyatom.folly.org.uk>
Date: Tue, 15 Nov 2011 17:58:53 +0000
Message-id: <E2B3A726-4A88-4856-B1EB-664E7921B715@mac.com>
References: <802E8B1D-899B-467D-9A3B-BC8D795D49A3@mac.com> <5EE81C5C4CFFF4418C5EAD12F49D64EE0117AD@IMCMBX01.MITRE.ORG> <1320920113.2223.236.camel@oblong> <1320935300.29100.1089.camel@mightyatom.folly.org.uk> <1320948197.2223.2320.camel@oblong> <EC74E572-DFBF-4F82-BE45-7A3BD677FA1E@mac.com> <1320962666.29100.1173.camel@mightyatom.folly.org.uk>
To: dtn-users@irtf.org
X-Mailer: Apple Mail (2.1251.1)
Subject: Re: [dtn-users] DurableStore errors from dtnd with code from tip - some fixes
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: Tue, 15 Nov 2011 17:59:08 -0000

Hi all,

Just wanted to give some feedback on the hacky fix.  So far so good with berekelydb storage.  I've been a bit distracted as I'm now playing with ION too :P

Darren


On 10 Nov 2011, at 22:04, Elwyn Davies wrote:

> Hmm.
> 
> It looks as if there is some more work to do.  I think init_datastore is
> broken.  It doesn't seem to have a beginTransaction to match the
> endTransaction.  This calls the endTransaction in DurableStore.cc so the
> lack of parameters is right.
> 
> With ODBC txid isn't used in the actual database so it doesn't matter
> but for BerkeleyDB it does.
> 
> If you want to try things further comment out the makeTransactionDurable
> and endTransaction at lines 152/153 of DTN2/servlib/DTNserver.cc.
> 
> oasys/storage/DurableStore.cc needs some extra code to stop it barfing
> when open_txid_ is NULL as it is if beginTransaction is not called
> first.  As I said the ODBC case doesn't care.
> 
> I'll look at this further tomorrow.
> 
> Regards,
> Elwyn
> 
> 
> On Thu, 2011-11-10 at 19:21 +0000, Darren Long wrote:
>> Hi all,
>> 
>> I've not had much luck with the new tip, currently dtnd dies when run with --init-db
>> 
>> In GDB I'm getting this:
>> 
>> darren@delaytolerant:~/dtn$ gdb -args dtnd -c ./dtn.conf --init-db
>> GNU gdb (GDB) 7.0.1-debian
>> Copyright (C) 2009 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "i486-linux-gnu".
>> For bug reporting instructions, please see:
>> <http://www.gnu.org/software/gdb/bugs/>...
>> Reading symbols from /usr/local/bin/dtnd...done.
>> (gdb) run
>> Starting program: /usr/local/bin/dtnd -c ./dtn.conf --init-db
>> [Thread debugging using libthread_db enabled]
>> [1320952483.531550 /dtnd notice] random seed is 531543
>> [1320952483.531634 /dtnd notice] DTN daemon starting up... (pid 5238)
>> [New Thread 0xb6a71b70 (LWP 5241)]
>> [1320952483.562681 /dtnd notice] initializing persistent data store
>> [1320952483.562900 /dtn/storage notice] creating new database directory /home/darren/dtn/db
>> 
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x0832836e in oasys::BerkeleyDBStore::endTransaction (this=0x84bcae8, txid=0x0, be_durable=true) at storage/BerkeleyDBStore.cc:253
>> 253	    ret = txp->commit(txp, flags);
>> (gdb) bt
>> #0  0x0832836e in oasys::BerkeleyDBStore::endTransaction (this=0x84bcae8, txid=0x0, be_durable=true) at storage/BerkeleyDBStore.cc:253
>> #1  0x082fec74 in oasys::DurableStore::endTransaction (this=0x84bc930) at storage/DurableStore.cc:215
>> #2  0x080765c9 in dtn::DTNServer::init_datastore (this=0x84a0e58) at DTNServer.cc:153
>> #3  0x08064d57 in dtn::DTND::main (this=0xbffff200, argc=4, argv=0xbffff7b4) at dtnd.cc:188
>> #4  0x0806505c in main (argc=4, argv=0xbffff7b4) at dtnd.cc:263
>> (gdb) 
>> 
>> I thought I'd pass this on sooner rather than later. I'm gonna carry on sniffing around in GDB, but the storage side of things is a place I've never been before in DTN2.
>> 
>> Cheers,
>> 
>> Darren
>> 
>> On 10 Nov 2011, at 18:03, Alex McMahon wrote:
>> 
>>> Hi Darren,
>>> 
>>> 
>>> Elwyn has found a bug which might have caused runtime
>>> problems/failure/crash (Although as yet I have been unable to
>>> reproduce). I have tested the patch (oasys) and posted to
>>> SourceForge[1] 
>>> 
>>> Grateful if other folks who have experienced the problem Darren
>>> described could apply the oasys update and post to the list whether this
>>> resolves the issue
>>> 
>>> Thanks
>>> 
>>> Alex  
>>> 
>>> [1] http://dtn.hg.sourceforge.net/hgweb/dtn/oasys
>>> 
>>> 
>>> On Thu, 2011-11-10 at 14:28 +0000, Elwyn Davies wrote:
>>>> Further to the bug report below...
>>>> 
>>>> I believe the attached updated files (and the patches to get there)
>>>> should fix the problem for the Berkeley DB store.  I'll check them out
>>>> shortly but they do compile OK.
>>>> 
>>>> However, we ought really to put some empty routines into memory and file
>>>> store classes to prevent them generating spurious warning messages.
>>>> 
>>>> Regards,
>>>> Elwyn
>>>> 
>>>> Hi, Alex/Darren/Keith.
>>>> 
>>>> There is a bug and it could well result in a crash.
>>>> 
>>>> The interface signatures of begin/endTransaction in the
>>>> BerkeleyDBStore.h do not match those in the DurableStoreImpl.h whereas
>>>> they do in ODBCstore.h.
>>>> 
>>>> This is why the base class routines are getting called and generating
>>>> the warnings.  The result is that the transaction id is not set up
>>>> correctly (it should be an 'out' parameter to beginTransaction but the
>>>> default code just leaves the value in the caller untouched).
>>>> 
>>>> Regards,
>>>> Elwyn
>>>> 
>>>> On Thu, 2011-11-10 at 10:15 +0000, Alex McMahon wrote:
>>>>> Hi Darren,
>>>>> 
>>>>> While I can reproduce the DurableStore warning i'm unable to reproduce
>>>>> runtime problems or an epic failure/crash (on 64bit Ubuntu 10.04.3) can
>>>>> you provide any more detail/logs on this. 
>>>>> 
>>>>> also just to confirm that S10 logging stuff is in 2.8.0.
>>>>> 
>>>>> 
>>>>> Thanks
>>>>> 
>>>>> Alex       
>>>>> 
>>>>> 
>>>>> On Thu, 2011-11-10 at 02:01 +0000, Scott, Keith L. wrote:
>>>>>> Yeah, that's the DurableStore module complaining that the storage mechanism (BerkeleyDB?) doesn't support transactions (really that the oasys BerkeleyDB manager doesn't implement them, BerekeleyDB I think does support them).
>>>>>> 
>>>>>> These errors are safe to ignore for now, and should only show up at a higher debug level soon.
>>>>>> 
>>>>>> 		--keith
>>>>>> 
>>>>>> -----Original Message-----
>>>>>> From: dtn-users-bounces@irtf.org [mailto:dtn-users-bounces@irtf.org] On Behalf Of Darren Long
>>>>>> Sent: Wednesday, November 09, 2011 4:23 PM
>>>>>> To: dtn-users@irtf.org
>>>>>> Subject: [dtn-users] DurableStore errors from dtnd with code from tip
>>>>>> 
>>>>>> Hiya,
>>>>>> 
>>>>>> I've been having runtime problems with dtnd on Debian Squeeze.  I'm using libdb4.8 and the berkelydb store.  The logs pretty much carry on like the snippet below, usually culminating in epic fail.  I'd not seen this problem before the release of 2.8.0, but hadn't been keeping up with the tip.
>>>>>> 
>>>>>> Does anyone have any idea what's going on?
>>>>>> 
>>>>>> 
>>>>>> Cheers,
>>>>>> 
>>>>>> Darren
>>>>>> 
>>>>>> [1320873124.849271 /dtnd notice] random seed is 849265
>>>>>> [1320873124.850379 /dtnd notice] DTN daemon starting up... (pid 30444)
>>>>>> [1320873124.954349 /dtn/storage warning] DurableStoreImpl::endTransaction not implemented.
>>>>>> [1320873124.954662 /S10 notice] Lines marked "S10" are log lines added to make parsing
>>>>>> [1320873124.954687 /S10 notice] the logs easier after extended tests. These were added for
>>>>>> [1320873124.954707 /S10 notice] the summer 2010 N4C summer trial and are mainly new lines
>>>>>> [1320873124.954726 /S10 notice] that allow tracing bundles across multiple hops.
>>>>>> [1320873124.954745 /S10 notice] To extract these do the following...
>>>>>> [1320873124.954765 /S10 notice] 	 grep "S10 info" <dtnd-log-files> | grep -v grep | awk '{print $4,$5}' | sort -n
>>>>>> [1320873124.957788 /dtn/bundle/daemon notice] loading bundles from data store
>>>>>> [1320873124.961231 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
>>>>>> [1320873124.961255 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
>>>>>> [1320873124.961327 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
>>>>>> [1320873124.961349 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR
>>>>>> [1320873124.961709 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented.
>>>>>> _______________________________________________
>>>>>> dtn-users mailing list
>>>>>> dtn-users@irtf.org
>>>>>> https://www.irtf.org/mailman/listinfo/dtn-users
>>>>>> _______________________________________________
>>>>>> dtn-users mailing list
>>>>>> dtn-users@irtf.org
>>>>>> https://www.irtf.org/mailman/listinfo/dtn-users
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> dtn-users mailing list
>>>>> dtn-users@irtf.org
>>>>> https://www.irtf.org/mailman/listinfo/dtn-users
>>> 
>>> 
>> 
>> _______________________________________________
>> dtn-users mailing list
>> dtn-users@irtf.org
>> https://www.irtf.org/mailman/listinfo/dtn-users
> 

