Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] Issue 71 in ndt: web100srv sometimes fails to retreive packet pair timing results from the fork()'d child

Subject: NDT-DEV email list created

List archive

[ndt-dev] Issue 71 in ndt: web100srv sometimes fails to retreive packet pair timing results from the fork()'d child


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] Issue 71 in ndt: web100srv sometimes fails to retreive packet pair timing results from the fork()'d child
  • Date: Sun, 13 Jan 2013 21:16:30 +0000

Status: New
Owner: ----
Labels: Type-Defect Severity-Medium

New issue 71 by : web100srv sometimes fails to retreive packet pair timing results from the fork()'d child
http://code.google.com/p/ndt/issues/detail?id=71

What steps will reproduce the problem?
Sometimes the ndt server will fail to retrieve packet pair results during both/either the C2S or S2C test.

This is to do with an IPC timing issue, a throughput test forks into the init_pkttrace() code which will start capturing packets via pcap_loop(). This then calls the given callback function (print_speed) when it captures a packet, as part of this code check_signal_flags() is called in order to break the loop if the global variable sig1/sig2 is set. Now the parent tries to break the loop by sending signal SIGUSR1/2 which makes the signal handler set the corresponding global variable sig1/2.

This often works fine, however only if pcap_loop receives a packet after SIGUSR1/2 is sent.

It's quite possible pcap_loop wont process a packet due to it's filter removing all unrelated packets and SIGUSR1/2 actually doesn't get sent until after the sending/receiving finishes. So unless there are packets buffered packet pair results fail to make it back to the parent and the pcap fork() child will hang until killed by its alarm.

What version of the product are you using? On what operating system?
Current version on svn r796 . Linux Debian Wheezy.

Please provide any additional information below.
Fix attached

Attachments:
FixMissingResults.diff 4.5 KB



  • [ndt-dev] Issue 71 in ndt: web100srv sometimes fails to retreive packet pair timing results from the fork()'d child, ndt, 01/13/2013

Archive powered by MHonArc 2.6.16.

Top of Page