Re: [Discuss-gnuradio] gr-howto OOT tutorial crash

2017-07-17 Thread Michael Dickens
Hi Vipin - If you look at the linkage of the gnuradio-runtime library, you can 
tell whether log4cpp was used & if it was used then you know logging was 
enabled. If there is no log4cpp linkage in the gnuradio-runtime library, then 
I'm not sure how you determined whether logging was enabled.
By default in an OOT, logging is disabled.

1) If you find log4cpp linkage, then in your OOT use the CMake settings 
enabling logging and log4cpp.
2) If you don't find log4cpp linkage, then redo the OOT build with logging 
enabled (but no log4cpp).
Hopefully one of these will be obvious & will shed some light on the issue. In 
the meantime, I'm looking into fixing the logging issue; I didn't create it, 
exactly, but a commit of mine made it the default for OOTs.
Cheers! - MLD

On Mon, Jul 17, 2017, at 12:44 AM, Vipin Sharma wrote:
> I can try re-building the OOT module.
> 
> I don't think I know how to 'with logging same-same as GR's'. I have two 
> questions:> 1) How do I know how GR was built? With logging?
> 2) Assuming I know the answer to 1) above, where do I change things so that 
> OOT compiles with with same setting for logging?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] gr-howto OOT tutorial crash

2017-07-16 Thread Vipin Sharma
I can try re-building the OOT module.

I don't think I know how to 'with logging same-same as GR's'. I have
two questions:
1) How do I know how GR was built? With logging?
2) Assuming I know the answer to 1) above, where do I change things so that
OOT compiles with with same setting for logging?

Vipin

On Sun, Jul 16, 2017 at 5:24 PM, Michael Dickens 
wrote:

> Maybe you're hitting the logger_ptr bug? See <
> https://github.com/gnuradio/gnuradio/issues/1383
>  >
> for more info. It happens when GR is built with logging enabled but not
> log4cpp, and then the OOT is built either with logging enable and log4cpp
> or logging not enabled. The "free" on gr::block ends up corrupting the
> stack because the logger_ptr is of the wrong size in the OOT block (when
> compared with that compiled into gnuradio_runtime). Not sure if this is the
> issue here, but this is happening during gr::flowgraph::clear (which just
> clears the blocks and then edges), so, maybe? An easy test is to rebuild
> the OOT with logging same-same as GR's. - MLD
>
> On Sun, Jul 16, 2017, at 03:29 PM, Vipin Sharma wrote:
>
> Here is the system config:
>
> vipin@pp001:~/a1/gr-howto/build$ uname -a
> Linux pp001 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51
> UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
>
>
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] gr-howto OOT tutorial crash

2017-07-16 Thread Michael Dickens
Maybe you're hitting the logger_ptr bug? See < 
https://github.com/gnuradio/gnuradio/issues/1383[1] > for more info. It happens 
when GR is built with logging enabled but not log4cpp, and then the OOT is 
built either with logging enable and log4cpp or logging not enabled. The "free" 
on gr::block ends up corrupting the stack because the logger_ptr is of the 
wrong size in the OOT block (when compared with that compiled into 
gnuradio_runtime). Not sure if this is the issue here, but this is happening 
during gr::flowgraph::clear (which just clears the blocks and then edges), so, 
maybe? An easy test is to rebuild the OOT with logging same-same as GR's. - 
MLDOn Sun, Jul 16, 2017, at 03:29 PM, Vipin Sharma wrote:
> Here is the system config: 
> 
> vipin@pp001:~/a1/gr-howto/build$ uname -a
> Linux pp001 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 
> 2017 x86_64 x86_64 x86_64 GNU/Linux

Links:

  1. https://github.com/gnuradio/gnuradio/issues/1383#issuecomment-315605543
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] gr-howto OOT tutorial crash

2017-07-16 Thread Vipin Sharma
Here is the system config:

vipin@pp001:~/a1/gr-howto/build$ uname -a
Linux pp001 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC
2017 x86_64 x86_64 x86_64 GNU/Linux


On Sun, Jul 16, 2017 at 12:25 PM, Vipin Sharma 
wrote:

> Hi,
>
> I have been having some trouble with one of my OOT custom blocks in GRC
> (check this out: https://lists.gnu.org/archive/html/discuss-gnuradio/
> 2017-07/msg00225.html) so I decided to try a bare bones version of the
> OOT module flow described here: https://wiki.gnuradio.
> org/index.php/OutOfTreeModules
>
> All the steps are fine until 'make test'. The command crashes with a large
> traceback which isn't very helpful. This error is different from my
> original exercise of OOT modules, but nevertheless, I need to make sure at
> least the simple OOT module is Ok first on my system.
>
> Here is the trace back error from 'make test'; any ideas how to proceed?
>
> Thanks,
> Vipin
>
> vipin@pp001:~/a1/gr-howto/build$ make test
> Running tests...
> Test project /home/vipin/a1/gr-howto/build
> Start 1: test_howto
> 1/2 Test #1: test_howto ...   Passed0.00 sec
> Start 2: qa_square_ff
> *** Error in `/usr/bin/python2': double free or corruption (!prev):
> 0x022dd400 ***
> === Backtrace: =
> /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fd777ac67e5]
> /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7fd777acf37a]
> /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fd777ad353c]
> /usr/local/lib/libgnuradio-runtime-3.7.11.1.so.0.0.0(_
> ZN2gr4edgeD1Ev+0x51)[0x7fd7761a0871]
> /usr/local/lib/libgnuradio-runtime-3.7.11.1.so.0.0.0(_
> ZN2gr9flowgraph5clearEv+0xbc)[0x7fd7761a0e4c]
> /usr/local/lib/libgnuradio-runtime-3.7.11.1.so.0.0.0(_ZN2gr18hier_block2_
> detail14disconnect_allEv+0x35)[0x7fd7761b10a5]
> /usr/local/lib/libgnuradio-runtime-3.7.11.1.so.0.0.0(_
> ZN2gr11hier_block2D1Ev+0x1c)[0x7fd7761acc0c]
> /usr/local/lib/libgnuradio-runtime-3.7.11.1.so.0.0.0(_
> ZN2gr9top_blockD0Ev+0x9)[0x7fd7761d5609]
> /usr/local/lib/python2.7/dist-packages/gnuradio/gr/_runtime_
> swig.so(+0x63eaa)[0x7fd776a0feaa]
> /usr/local/lib/python2.7/dist-packages/gnuradio/gr/_runtime_
> swig.so(+0x667c5)[0x7fd776a127c5]
> /usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
> /usr/bin/python2(PyObject_CallFunctionObjArgs+0x16a)[0x4b97fa]
> /usr/local/lib/python2.7/dist-packages/gnuradio/gr/_runtime_
> swig.so(+0x2eb50)[0x7fd7769dab50]
> /usr/bin/python2[0x4fd4e6]
> /usr/bin/python2[0x4fd4e6]
> /usr/bin/python2(PyDict_SetItem+0x442)[0x4a0d22]
> /usr/bin/python2(_PyObject_GenericSetAttrWithDict+0xad)[0x4da72d]
> /usr/bin/python2(PyObject_SetAttr+0x5b)[0x4da2ab]
> /usr/bin/python2(PyEval_EvalFrameEx+0x12b9)[0x4c52b9]
> /usr/bin/python2(PyEval_EvalFrameEx+0x5d8f)[0x4c9d8f]
> /usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
> /usr/bin/python2[0x4de8b8]
> /usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
> /usr/bin/python2(PyEval_EvalFrameEx+0x2ad1)[0x4c6ad1]
> /usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
> /usr/bin/python2[0x4de6fe]
> /usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
> /usr/bin/python2[0x4f492e]
> /usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
> /usr/bin/python2[0x553187]
> /usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
> /usr/bin/python2(PyEval_EvalFrameEx+0x5faf)[0x4c9faf]
> /usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
> /usr/bin/python2[0x4de8b8]
> /usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
> /usr/bin/python2(PyEval_EvalFrameEx+0x2ad1)[0x4c6ad1]
> /usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
> /usr/bin/python2[0x4de6fe]
> /usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
> /usr/bin/python2[0x4f492e]
> /usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
> /usr/bin/python2[0x553187]
> /usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
> /usr/bin/python2(PyEval_EvalFrameEx+0x5faf)[0x4c9faf]
> /usr/bin/python2(PyEval_EvalFrameEx+0x5d8f)[0x4c9d8f]
> /usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
> /usr/bin/python2(PyEval_EvalFrameEx+0x6099)[0x4ca099]
> /usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
> /usr/bin/python2(PyEval_EvalCode+0x19)[0x4c2509]
> /usr/bin/python2[0x4f1def]
> /usr/bin/python2(PyRun_FileExFlags+0x82)[0x4ec652]
> /usr/bin/python2(PyRun_SimpleFileExFlags+0x191)[0x4eae31]
> /usr/bin/python2(Py_Main+0x68a)[0x49e14a]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fd777a6f830]
> /usr/bin/python2(_start+0x29)[0x49d9d9]
> === Memory map: 
> 0040-006ea000 r-xp  08:01 4850906
>  /usr/bin/python2.7
> 008e9000-008eb000 r--p 002e9000 08:01 4850906
>  /usr/bin/python2.7
> 008eb000-00962000 rw-p 002eb000 08:01 4850906
>  /usr/bin/python2.7
> 00962000-00985000 rw-p  00:00 0
> 01ac6000-024eb000 rw-p  00:00 0
>  [heap]
> 7fd75800-7fd758021000 rw-p  00:00 0
> 7fd758021000-7fd75c00 ---p  00:00 0
> 7fd76000-7fd760021000 rw-p  00:00 0
> 7fd760021000-7fd76400 ---p  00:00 0
> 7fd7677ff000-7fd76780 ---p 

[Discuss-gnuradio] gr-howto OOT tutorial crash

2017-07-16 Thread Vipin Sharma
Hi,

I have been having some trouble with one of my OOT custom blocks in GRC
(check this out:
https://lists.gnu.org/archive/html/discuss-gnuradio/2017-07/msg00225.html)
so I decided to try a bare bones version of the OOT module flow described
here: https://wiki.gnuradio.org/index.php/OutOfTreeModules

All the steps are fine until 'make test'. The command crashes with a large
traceback which isn't very helpful. This error is different from my
original exercise of OOT modules, but nevertheless, I need to make sure at
least the simple OOT module is Ok first on my system.

Here is the trace back error from 'make test'; any ideas how to proceed?

Thanks,
Vipin

vipin@pp001:~/a1/gr-howto/build$ make test
Running tests...
Test project /home/vipin/a1/gr-howto/build
Start 1: test_howto
1/2 Test #1: test_howto ...   Passed0.00 sec
Start 2: qa_square_ff
*** Error in `/usr/bin/python2': double free or corruption (!prev):
0x022dd400 ***
=== Backtrace: =
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fd777ac67e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7fd777acf37a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fd777ad353c]
/usr/local/lib/libgnuradio-runtime-3.7.11.1.so.0.0.0(_ZN2gr4edgeD1Ev+0x51)[0x7fd7761a0871]
/usr/local/lib/libgnuradio-runtime-3.7.11.1.so.0.0.0(_ZN2gr9flowgraph5clearEv+0xbc)[0x7fd7761a0e4c]
/usr/local/lib/libgnuradio-runtime-3.7.11.1.so.0.0.0(_ZN2gr18hier_block2_detail14disconnect_allEv+0x35)[0x7fd7761b10a5]
/usr/local/lib/libgnuradio-runtime-3.7.11.1.so.0.0.0(_ZN2gr11hier_block2D1Ev+0x1c)[0x7fd7761acc0c]
/usr/local/lib/libgnuradio-runtime-3.7.11.1.so.0.0.0(_ZN2gr9top_blockD0Ev+0x9)[0x7fd7761d5609]
/usr/local/lib/python2.7/dist-packages/gnuradio/gr/_runtime_swig.so(+0x63eaa)[0x7fd776a0feaa]
/usr/local/lib/python2.7/dist-packages/gnuradio/gr/_runtime_swig.so(+0x667c5)[0x7fd776a127c5]
/usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
/usr/bin/python2(PyObject_CallFunctionObjArgs+0x16a)[0x4b97fa]
/usr/local/lib/python2.7/dist-packages/gnuradio/gr/_runtime_swig.so(+0x2eb50)[0x7fd7769dab50]
/usr/bin/python2[0x4fd4e6]
/usr/bin/python2[0x4fd4e6]
/usr/bin/python2(PyDict_SetItem+0x442)[0x4a0d22]
/usr/bin/python2(_PyObject_GenericSetAttrWithDict+0xad)[0x4da72d]
/usr/bin/python2(PyObject_SetAttr+0x5b)[0x4da2ab]
/usr/bin/python2(PyEval_EvalFrameEx+0x12b9)[0x4c52b9]
/usr/bin/python2(PyEval_EvalFrameEx+0x5d8f)[0x4c9d8f]
/usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
/usr/bin/python2[0x4de8b8]
/usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
/usr/bin/python2(PyEval_EvalFrameEx+0x2ad1)[0x4c6ad1]
/usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
/usr/bin/python2[0x4de6fe]
/usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
/usr/bin/python2[0x4f492e]
/usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
/usr/bin/python2[0x553187]
/usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
/usr/bin/python2(PyEval_EvalFrameEx+0x5faf)[0x4c9faf]
/usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
/usr/bin/python2[0x4de8b8]
/usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
/usr/bin/python2(PyEval_EvalFrameEx+0x2ad1)[0x4c6ad1]
/usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
/usr/bin/python2[0x4de6fe]
/usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
/usr/bin/python2[0x4f492e]
/usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
/usr/bin/python2[0x553187]
/usr/bin/python2(PyObject_Call+0x43)[0x4b0cb3]
/usr/bin/python2(PyEval_EvalFrameEx+0x5faf)[0x4c9faf]
/usr/bin/python2(PyEval_EvalFrameEx+0x5d8f)[0x4c9d8f]
/usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
/usr/bin/python2(PyEval_EvalFrameEx+0x6099)[0x4ca099]
/usr/bin/python2(PyEval_EvalCodeEx+0x255)[0x4c2765]
/usr/bin/python2(PyEval_EvalCode+0x19)[0x4c2509]
/usr/bin/python2[0x4f1def]
/usr/bin/python2(PyRun_FileExFlags+0x82)[0x4ec652]
/usr/bin/python2(PyRun_SimpleFileExFlags+0x191)[0x4eae31]
/usr/bin/python2(Py_Main+0x68a)[0x49e14a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fd777a6f830]
/usr/bin/python2(_start+0x29)[0x49d9d9]
=== Memory map: 
0040-006ea000 r-xp  08:01 4850906
 /usr/bin/python2.7
008e9000-008eb000 r--p 002e9000 08:01 4850906
 /usr/bin/python2.7
008eb000-00962000 rw-p 002eb000 08:01 4850906
 /usr/bin/python2.7
00962000-00985000 rw-p  00:00 0
01ac6000-024eb000 rw-p  00:00 0
 [heap]
7fd75800-7fd758021000 rw-p  00:00 0
7fd758021000-7fd75c00 ---p  00:00 0
7fd76000-7fd760021000 rw-p  00:00 0
7fd760021000-7fd76400 ---p  00:00 0
7fd7677ff000-7fd76780 ---p  00:00 0
7fd76780-7fd76800 rw-p  00:00 0
7fd76800-7fd768021000 rw-p  00:00 0
7fd768021000-7fd76c00 ---p  00:00 0
7fd76c017000-7fd76c018000 ---p  00:00 0
7fd76c018000-7fd76c818000 rw-p  00:00 0
7fd76c818000-7fd76c819000 ---p  00:00 0
7fd76c819000-7fd76d019000 rw-p  00:00 0
7fd76d019000-7fd76d01a000 ---p  00:00 0
7fd76d01a000-7fd76d81a000 rw-p  00:00 0
7fd76d81a000-7fd76d827000 r-xp