discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] tunnel.py buffer crash


From: yyzhuang
Subject: Re: [Discuss-gnuradio] tunnel.py buffer crash
Date: Thu, 19 Mar 2009 20:21:43 -0700 (PDT)

Is it possible a GNU Radio distribution problem? In the new lab we installed
the whole GNU Radio again. Thanks.

Yanyan


Eric Blossom wrote:
> 
> On Wed, Mar 18, 2009 at 10:36:17PM -0700, yyzhuang wrote:
>> 
>> Hi Eric,
>> 
>> We read through the code. gr_buffer is a circular/ring buffer, so when
>> reading/writing through it, we need to take modular into account. The
>> assert
>> error, it's line 125 in gr_buffer.h
>> (gnuradio/gnuradio-core/src/lib/runtime/gr_buffer.h):
>> 
>>   unsigned
>>   index_add (unsigned a, unsigned b)
>>   {
>>     unsigned s = a + b;
>> 
>>     if (s >= d_bufsize)
>>       s -= d_bufsize;
>> 
>>     assert (s < d_bufsize);
>>     return s;
>>   } 
>> 
>> It is invoked by
>> 
>> void
>> gr_buffer::update_write_pointer (int nitems)
>> {
>>   scoped_lock   guard(*mutex());
>>   d_write_index = index_add (d_write_index, nitems);
>> }
>> 
>> void
>> gr_buffer_reader::update_read_pointer (int nitems)
>> {
>>   scoped_lock   guard(*mutex());
>>   d_read_index = d_buffer->index_add (d_read_index, nitems);
>> } 
>> 
>> I think it wants to add d_write_index or d_read_index by nitems. But when
>> arrival rate is higher than service rate, buffer overflow occurs. Do you
>> know how to increase the buffer size? Thanks.
> 
> The problem is most likely not in this code, but in a gr_block that is
> misbehaving.  Increasing the buffer size will not fundamentally alter
> the behavior. 
> 
> Eric
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
> 

-- 
View this message in context: 
http://www.nabble.com/tunnel.py-buffer-crash-tp22470731p22613693.html
Sent from the GnuRadio mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]