[Top][All Lists]

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

Re: [Discuss-gnuradio] memory leak problem with GNURadio/Python

From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] memory leak problem with GNURadio/Python
Date: Tue, 27 Sep 2011 10:56:30 -0400

On Fri, Sep 23, 2011 at 6:00 AM, Sanketh Kumar P <address@hidden> wrote:
hey tom,

PFA the output of gdb with back trace after the crash.
i have used scipy/numpy arrays quite extensively. is that causing the crash??
please help me in debugging further.

The backtrace includes this line:

 #10 0x00007f70da35965d in _wrap_gr_vector_sink_f_sptr_data (
    args=<value optimized out>) at python/gnuradio_core_gengen.cc:60241
Which says that you are using a vector sink. This is a C++ stl:::vector that you are filling with data for 2 - 3 minutes, probably at a pretty high rate, too, right? Have you looked at the memory consumption of you machine while you are running it? You're just growing this vector like crazy.

The vector_sinks are not meant to be used like this. You should probably try saving the data to a file and it back in to analyze the data.


On Thu, Sep 22, 2011 at 9:20 PM, Tom Rondeau <address@hidden> wrote:
On Thu, Sep 22, 2011 at 2:55 AM, Sanketh Kumar P <address@hidden> wrote:
after executing a GNURadio flowgraph for sometime (typically for abt 2-3mins) the code crashes and
the following message is displayed.

We're going to need way more information than this to help you. This error tells us almost nothing about where the problem might be.

Here's a helpful process. In the Python program, right at the top before any functions are declared, put this in:

import os
print os.getpid()

That will print out the program's PID and pause it, waiting for you to hit enter. In another terminal, run "gdb." Inside gdb, type:

attach <pid>

Where the <pid> is what was printed by the progra. The "c" tells the debugger to continue. Now, go back to the program's window and hit enter. When the crash occurs, gdb will pick it up. You can then type "bt" in gdb to get a back trace of the program. This will help identify while line of what file caused the error.


*** glibc detected *** python: malloc(): memory corruption: 0x00007f7b94002b00 ***
======= Backtrace: =========
======= Memory map: ========
00400000-0062f000 r-xp 00000000 08:03 5899249                            /usr/bin/python2.7
0082e000-0082f000 r--p 0022e000 08:03 5899249                            /usr/bin/python2.7
0082f000-00897000 rw-p 0022f000 08:03 5899249                            /usr/bin/python2.7
00897000-008a9000 rw-p 00000000 00:00 0
014e3000-02266000 rw-p 00000000 00:00 0                                  [heap]
7f7b94000000-7f7b94021000 rw-p 00000000 00:00 0
7f7b94021000-7f7b98000000 ---p 00000000 00:00 0

please help me in rectifying it. thanx in advance

Discuss-gnuradio mailing list


reply via email to

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