[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] tunnel.py buffer crash
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] tunnel.py buffer crash |
Date: |
Thu, 19 Mar 2009 09:22:39 -0700 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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] tunnel.py buffer crash, yyzhuang, 2009/03/12
- Re: [Discuss-gnuradio] tunnel.py buffer crash, Eric Blossom, 2009/03/12
- Re: [Discuss-gnuradio] tunnel.py buffer crash, yyzhuang, 2009/03/12
- Re: [Discuss-gnuradio] tunnel.py buffer crash, Eric Blossom, 2009/03/12
- Re: [Discuss-gnuradio] tunnel.py buffer crash, yyzhuang, 2009/03/13
- Re: [Discuss-gnuradio] tunnel.py buffer crash, yyzhuang, 2009/03/19
- Re: [Discuss-gnuradio] tunnel.py buffer crash,
Eric Blossom <=
- Re: [Discuss-gnuradio] tunnel.py buffer crash, yyzhuang, 2009/03/19
- Re: [Discuss-gnuradio] tunnel.py buffer crash, Eric Blossom, 2009/03/19
- Re: [Discuss-gnuradio] tunnel.py buffer crash, yyzhuang, 2009/03/19
- Re: [Discuss-gnuradio] tunnel.py buffer crash, Eric Blossom, 2009/03/20
- Re: [Discuss-gnuradio] tunnel.py buffer crash, Eric Blossom, 2009/03/20
- Re: [Discuss-gnuradio] tunnel.py buffer crash, yyzhuang, 2009/03/25
- Re: [Discuss-gnuradio] tunnel.py buffer crash, Eric Blossom, 2009/03/26