When running with -DENABLE_PERFORMANCE_COUNTERS I setup a simple graph 
including "Control Port Monitor" and "Performance counters".  When I run the 
graph I get a general protection page fault in the code that calls 
rpcmanager::get().  Turns out rpcmanager::get() returns NULL.    It looks like 
the library (libgnuradio_runtime.so) is getting initialized and the code below 
is called setting up the 'boot' static structure:

gnuradio-runtime/lib/controlport/rpcmanager.cc

bool rpcmanager::booter_registered(false);
bool rpcmanager::aggregator_registered(false);
std::auto_ptr<rpcserver_booter_base> rpcmanager::boot(0);
std::auto_ptr<rpcserver_booter_aggregator> rpcmanager::aggregator(0);

but then the 'init' function for the shared library gets called again which 
zeros out the boot pointer.

This is the first time the boot pointer initializes.

(gdb) bt
#0  rpcmanager::register_booter (booter=0x10074ee0)
    at 
/opt/QorIQ-SDK-V1.8-20150619-yocto/build_b4860qds-64b_release/tmp/work/ppc64e6500-fsl-linux/gnuradio/3.7.10-r0/git/gnuradio-runtime/lib/controlport/rpcmanager.cc:51
#1  0x00003fffb089acf8 in rpcserver_booter_register_helper (
    this=0x3fffb0a535f0 <boot_thrift>)
    at 
/opt/QorIQ-SDK-V1.8-20150619-yocto/build_b4860qds-64b_release/tmp/work/ppc64e6500-fsl-linux/gnuradio/3.7.10-r0/git/gnuradio-runtime/include/gnuradio/rpcmanager.h:46
#2  __static_initialization_and_destruction_0 (__initialize_p=1,
    __priority=65535)
    at 
/opt/QorIQ-SDK-V1.8-20150619-yocto/build_b4860qds-64b_release/tmp/work/ppc64e6500-fsl-linux/gnuradio/3.7.10-r0/git/gnuradio-runtime/lib/controlport/rpcserver_selector.cc:39
#3  _GLOBAL__sub_I_rpcserver_selector.cc(void) ()
    at 
/opt/QorIQ-SDK-V1.8-20150619-yocto/build_b4860qds-64b_release/tmp/work/ppc64e6500-fsl-linux/gnuradio/3.7.10-r0/git/gnuradio-runtime/lib/controlport/rpcserver_selector.cc:39
#4  0x00003fffb09ac03c in .__do_global_ctors_aux ()
   from /usr/lib64/libgnuradio-runtime-3.7.10.so.0.0.0
#5  0x00003fffb088ff4c in ._init ()
   from /usr/lib64/libgnuradio-runtime-3.7.10.so.0.0.0
#6  0x00003fffb7fda048 in call_init (l=0x1054a800, argc=<optimized out>,
---Type <return> to continue, or q <return> to quit-

The is the second time the shared library init gets called zering out the boot 
pointer.

Old value = (rpcserver_booter_base *) 0x10074ee0
New value = (rpcserver_booter_base *) 0x0
__static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
    at 
/opt/QorIQ-SDK-V1.8-20150619-yocto/build_b4860qds-64b_release/tmp/work/ppc64e6500-fsl-linux/gnuradio/3.7.10-r0/git/gnuradio-runtime/lib/controlport/rpcmanager.cc:29
29          std::auto_ptr<rpcserver_booter_base> rpcmanager::boot(0);
(gdb) bt
#0  __static_initialization_and_destruction_0 (__initialize_p=1,
    __priority=65535)
    at 
/opt/QorIQ-SDK-V1.8-20150619-yocto/build_b4860qds-64b_release/tmp/work/ppc64e6500-fsl-linux/gnuradio/3.7.10-r0/git/gnuradio-runtime/lib/controlport/rpcmanager.cc:29
#1  _GLOBAL__sub_I_rpcmanager.cc(void) ()
    at 
/opt/QorIQ-SDK-V1.8-20150619-yocto/build_b4860qds-64b_release/tmp/work/ppc64e6500-fsl-linux/gnuradio/3.7.10-r0/git/gnuradio-runtime/lib/controlport/rpcmanager.cc:68
#2  0x00003fffb09ac03c in .__do_global_ctors_aux ()
   from /usr/lib64/libgnuradio-runtime-3.7.10.so.0.0.0
#3  0x00003fffb088ff4c in ._init ()
   from /usr/lib64/libgnuradio-runtime-3.7.10.so.0.0.0
#4  0x00003fffb7fda048 in call_init (l=0x1054a800, argc=<optimized out>,
    argv=0x3ffffffffad8, env=0x3ffffffffaf0) at dl-init.c:64
#5  0x00003fffb7fda20c in _dl_init (main_map=0x10507e20, argc=<optimized out>,
    argv=0x3ffffffffad8, env=0x3ffffffffaf0) at dl-init.c:126
#6  0x00003fffb7fe01fc in dl_open_worker (a=0x3fffffff5c20) at dl-open.c:566
#7  0x00003fffb7fd9e38 in _dl_catch_error (objname=0x3fffffff5c70,
    errstring=0x3fffffff5c68, mallocedp=0x3fffffff5c78,
    operate=@0x3fffb7ffd9f0: 0x3fffb7fdfc40 <dl_open_worker>,
    args=0x3fffffff5c20) at dl-error.c:187
#8  0x00003fffb7fdf4d8 in _dl_open (
---Type <return> to continue, or q <return> to quit---
    file=0x104f6a7c 
"/usr/lib64/python2.7/site-packages/gnuradio/gr/_runtime_swig.so", 
mode=<optimized out>,
    caller_dlopen=0x3fffb571c6dc <_PyImport_GetDynLoadFunc+412>, nsid=-2,
    argc=<optimized out>, argv=0x3ffffffffad8, env=0x3ffffffffaf0)
    at dl-open.c:650
#9  0x00003fffb2cfd7e0 in dlopen_doit (a=0x3fffffff61c0) at dlopen.c:66
#10 0x00003fffb7fd9e38 in _dl_catch_error (objname=0x1009ee50,
    errstring=0x1009ee58, mallocedp=0x1009ee48,
    operate=@0x3fffb2d10098: 0x3fffb2cfd750 <dlopen_doit>, args=0x3fffffff61c0)
    at dl-error.c:187
#11 0x00003fffb2cfe284 in _dlerror_run (
    operate=@0x3fffb2d10098: 0x3fffb2cfd750 <dlopen_doit>, args=0x3fffffff61c0)
    at dlerror.c:163
#12 0x00003fffb2cfd8e4 in __dlopen (file=<optimized out>, mode=<optimized out>)
    at dlopen.c:87
#13 0x00003fffb571c6dc in _PyImport_GetDynLoadFunc (fqname=<optimized out>,
    shortname=0x10371674 "_runtime_swig",
    pathname=0x104f6a7c 
"/usr/lib64/python2.7/site-packages/gnuradio/gr/_runtime_swig.so", 
fp=<optimized out>) at Python/dynload_shlib.c:130
#14 0x00003fffb56ffc34 in _PyImport_LoadDynamicModule (
    name=0x10371674 "_runtime_swig",
    pathname=0x104f6a7c 
"/usr/lib64/python2.7/site-packages/gnuradio/gr/_runtime_swig.so", 
fp=0x10507be0) at ./Python/importdl.c:42
---Type <return> to continue, or q <return> to quit-



W. Kyle Unice
Staff Engineer
MS F1H03
322 North 2200 West Dock 3
Salt Lake City, Utah 84116-0850

Voice: 801-594-2687

_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to