[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] Timers



Apu Kapadia wrote:
> 
> I have a timer that expires every x microseconds, and send packets (simple
> scheduling of packets) on a timeout. This works fine for over 10
> milliseconds, but when I go down to a few hundred microseconds, I get a
> segmentation fault.
> 
> Any idea why this could be happening? Maybe the timer that calls the send
> function, that in turn activates the timer again is filling up the stack
> space?
> 
> Thanks,
> Apu

I've had the same problem, so this certainly isn't bogus. There are a
couple of ways to accomodate this problem:
1) Send multiple packets per timer tick, and cut how often the timer
fires.
2) Have multiple timers that call the same send packet function and then
cut how often each timer fires. 
3) Send less data.

But I have yet to figure out exactly WHY it segmentation faults. I also
have found that sometimes the join / leave multicast group latencies are
high enough (still less than an second) to the point where sometimes
I'll leave a group before I join it, even though logically I should have
no problem.
 
ohh fun!

 -Will