Movatterモバイル変換


[0]ホーム

URL:


Project

General

Profile

ndn-cxx

NFD »ndn-cxx

Tags

Actions

Bug #4770

closed

NLSR hangs due to ndn-cxx SegmentFetcher segfault

Added byAshlesh Gawandeabout 7 years ago. Updatedalmost 7 years ago.

Status:
Closed
Priority:
Urgent
Category:
Utils
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

1) Segment fetcher sends an interest with Nonce=1
2) After 1 second, segment fetcher sends another interest with same name with Nonce=2
3) Face gets data, satisfies interest with Nonce=1
4) Segment fetcher informs NLSR of the new data
5) Segment fetcher removes corresponding entry from from pending interest map
6) Face satisfies interest with Nonce=2
7) Segment fetcher hangs while trying to re-erase the entry already erased in 5) by using an invalid iterator (here)

See attached folder for reproduction on a small scale. Logs from consumer:

1541784024.347425 DEBUG: [ndn.Face] <I /example/testApp?ndn.MustBeFresh=true&ndn.Nonce=25932281521541784025.347404 DEBUG: [ndn.Face] <I /example/testApp?ndn.MustBeFresh=true&ndn.Nonce=10975879361541784025.350393 DEBUG: [ndn.Face] >D /example/testApp/%00%001541784025.350405 DEBUG: [ndn.Face]    satisfying /example/testApp?ndn.MustBeFresh=true&ndn.Nonce=2593228152 from app1541784025.350436 DEBUG: [ndn.security.v2.Validator] > Start validating data /example/testApp/%00%001541784025.350441 TRACE: [ndn.security.v2.ValidationState] > Signature verification bypassed for data `/example/testApp/%00%00`Got data1541784025.350508 TRACE: [ndn.security.v2.ValidationState] ~ValidationState1541784025.350520 DEBUG: [ndn.Face]    satisfying /example/testApp?ndn.MustBeFresh=true&ndn.Nonce=1097587936 from app1541784025.350530 DEBUG: [ndn.security.v2.Validator] > Start validating data /example/testApp/%00%001541784025.350533 TRACE: [ndn.security.v2.ValidationState] > Signature verification bypassed for data `/example/testApp/%00%00Hangs with 100% CPU usage.

This behaviour is not observed in latest ndn-cxx fetcher as the fetcher destroys itself after informing the application about the data on step 4 (see note1).

Workaround is to setuseConstantInterestTimeout to true so that segment fetcher will not send interests before actual timeout.


Files

fetcher-test.tar.gz(3.22 KB)fetcher-test.tar.gzAshlesh Gawande, 11/09/2018 10:16 AM

Updated byAshlesh Gawandeabout 7 years ago

There is a possibility that this could happen with latest ndn-cxx as well if the data is segmented then zeroth segment will be received twice because fetcher would still be alive to send for and receive the next segment.

Updated byAshlesh Gawandeabout 7 years ago

  • Project changed fromNLSR tondn-cxx
  • Subject changed fromNLSR hangs on testbed due to ndn-cxx (0.6.3) segment fetcher segfault toNLSR hangs on testbed due to ndn-cxx segment fetcher segfault
  • Description updated (diff)
  • Status changed fromIn Progress toCode review
  • Target version deleted (v0.5.0)

The solution is to remove the first pending interest from face when we get a Nack or a timeout (before re-expressing the interest). So face informs the fetcher with data only for the latest interest and not for the previous interest as well that lead to the problem. This follows the suggestion given here:https://www.lists.cs.ucla.edu/pipermail/nfd-dev/2018-November/003446.html

The unit test in the change fails with heap-buffer-overflow if the solution is not applied:
https://gerrit.named-data.net/c/ndn-cxx/+/5023

Updated byAshlesh Gawandeabout 7 years ago

  • Category set toUtils

Updated byDavide Pesaventoabout 7 years ago

  • Subject changed fromNLSR hangs on testbed due to ndn-cxx segment fetcher segfault toNLSR hangs due to ndn-cxx SegmentFetcher segfault
  • Description updated (diff)
  • Target version set tov0.7
  • % Done changed from0 to100

Updated byAshlesh Gawandealmost 7 years ago

  • Status changed fromCode review toClosed
Actions

Also available in:AtomPDF

Powered byRedmine © 2006-2025 Jean-Philippe Lang
Loading...

[8]ページ先頭

©2009-2025 Movatter.jp