Skip to Content.
Sympa Menu

wg-multicast - Re: Huge multicast spike just now?

Subject: All things related to multicast

List archive

Re: Huge multicast spike just now?


Chronological Thread 
  • From: Frank Fulchiero <>
  • To: wg-multicast <>
  • Subject: Re: Huge multicast spike just now?
  • Date: Wed, 3 Sep 2008 10:30:38 -0400

Just to remind everyone, we have a new SAP announcer available, which has been working fine for a few months.
http://nutmeg.conncoll.edu/wiki/index.php/ESA

I am trying to see if we can post it, in the meantime, I can email it to anyone that would like to evaluate or use it.
Let me know if you would like the OSX, Windows, or Linux version.

Thanks,
Frank Fulchiero
Digital Media Specialist
Connecticut College


On Sep 3, 2008, at 7:24 AM, Bruce Rodger wrote:

On Thu, 26 Jun 2008,

wrote:

miniSAPserver in its current (buggy) form has been around
for ages....and yet thee storms have only just started to
occur. is it, perhaps, that some 'config example' which
is out there i the one causing this issue

I've just managed to unintentionally reproduce the problem. Fortunately, it
was noticed quickly, and hopefully was only local :)

miniSAPserver version 0.3.4
on Ubuntu 7.10

The default config contains:

# Number of seconds between announces. 5 is default. Internet announces better use 30.
sap_delay=5

If you use this default, all is OK. If you add the "-s" flag to the
command, it prints a "." every time it sends out a sap. And as
expected, we get a "." appearing every 5 seconds.

However, if we make the suggested change and increase the value of
sap_delay to 30 (in fact to any value greater than 15!) we get our
SAP storm - thousands of SAPs (and thousands of dots on the screen)
appearing per second.

The problem appears to be an integer overflow in sapserver.cpp

unsigned n = config.Programs.size() ?: 1;
div_t d = div ((1000000000 / n) * config.GetDelay(), 1000000000);
struct timespec delay;
delay.tv_sec = d.quot;
delay.tv_nsec = d.rem;
(snip)
while(!should_exit)
{
for( unsigned int i = 0; i< announces.size() ; i ++ )
{
(snip - send the SAP here)
nanosleep( &delay, NULL );
}
}

So it appears that when config.GetDelay is >15, 1000000000*config.GetDelay
overflows, the arguments to nanosleep are negative.... it doesn't
sleep.... we get a storm.

A quick workaround is to remove the "div" line, and just have
delay.tv_sec = config.GetDelay();
delay.tv_nsec = 0;

I will leave development of a "proper" solution to someone else. But I will log it on the videolan forum...

Bruce.
--
Bruce Rodger
|
Network Manager, IT Services |http://www.strath.ac.uk/IT/ People/bruce.html
The University of Strathclyde | +44 (0)141 548 3300
Glasgow G4 0LN, Scotland. | Fax 553 4100

"The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263."





Archive powered by MHonArc 2.6.16.

Top of Page