-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grgsm_scanner Aborted (core dumped) #336
Comments
Try |
I experience the crash too, when using it with a HackrF One. I get a segfault. To see more about what is going wrong, I patched the latest git version like this:
After this patching I get this error:
I tried the 'sysctl kernel.shmmni=32000' proposal, but it had no effect. Running in valgrind, the code crash like this in the scanner.start() call:
I have no idea how to get any further. :( |
At first glance the problem seems to be in the gr-osmosdr library, you could try to report this problem to them as well. You could also try to install the debug info packages for gr-osmosdr and then run the |
[Vasil Velichkov]
You could also try to install the debug info packages for gr-osmosdr
and then run the `grgsm_scanner` under `gdb` and when it crashes take
a `backtrace`
I installed libgnuradio-osmosdr0.1.4-dbgsym and ran 'valgrind
grgsm_scanner --args=hackrf' to get the backtrace. This is the crash
location:
==26239== Process terminating with default action of signal 11 (SIGSEGV)
==26239== Bad permissions for mapped region at address 0x220C9000
==26239== at 0x1E2766E8: hackrf_source_c::work(int, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) (hackrf_source_c.cc:380)
==26239== by 0x7756766: gr::sync_block::general_work(int, std::vector<int, std::allocator<int> >&, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) (sync_block.cc:66)
==26239== by 0x770B7EF: gr::block_executor::run_one_iteration() (block_executor.cc:451)
==26239== by 0x776285B: gr::tpb_thread_body::tpb_thread_body(boost::shared_ptr<gr::block>, int) (tpb_thread_body.cc:122)
==26239== by 0x7753324: operator() (scheduler_tpb.cc:44)
==26239== by 0x7753324: operator() (thread_body_wrapper.h:51)
==26239== by 0x7753324: boost::detail::function::void_function_obj_invoker0<gr::thread::thread_body_wrapper<gr::tpb_container>, void>::invoke(boost::detail::function::function_buffer&) (function_template.hpp:159)
==26239== by 0x76EF8B1: operator() (function_template.hpp:771)
==26239== by 0x76EF8B1: boost::detail::thread_data<boost::function0<void> >::run() (thread.hpp:116)
==26239== by 0x8D4D115: ??? (in /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.62.0)
==26239== by 0x4E3F493: start_thread (pthread_create.c:333)
==26239==
==26239== HEAP SUMMARY:
==26239== in use at exit: 26,020,241 bytes in 33,363 blocks
==26239== total heap usage: 100,026 allocs, 66,663 frees, 75,259,008 bytes allocated
==26239==
==26239== LEAK SUMMARY:
==26239== definitely lost: 144 bytes in 3 blocks
==26239== indirectly lost: 0 bytes in 0 blocks
==26239== possibly lost: 1,265,079 bytes in 221 blocks
==26239== still reachable: 24,755,018 bytes in 33,139 blocks
==26239== suppressed: 0 bytes in 0 blocks
==26239== Rerun with --leak-check=full to see details of leaked memory
==26239==
==26239== For counts of detected and suppressed errors, rerun with: -v
==26239== Use --track-origins=yes to see where uninitialised values come from
==26239== ERROR SUMMARY: 99350 errors from 111 contexts (suppressed: 0 from 0)
Killed
Note, this only happen with hackrf, not with the RTL2838.
…--
Happy hacking
Petter Reinholdtsen
|
I don't have hackrf so I can't reproduce this.
From lib/hackrf/hackrf_source_c.cc 379 for (int i = 0; i < remaining; ++i)
380 *out++ = _lut[ *(buf + i) ]; It would be useful to run it through
and what the value of
And again consider reporting this to the gr-osmosdr mailing list https://lists.osmocom.org/mailman/listinfo/osmocom-sdr |
[Vasil Velichkov]
I don't have hackrf so I can't reproduce this.
Could you check whether the `/usr/bin/osmocom_fft` and
`/usr/bin/osmocom_spectrum_sense` are working with hackrf
Both seem to be working. I'm testing on a remote machine via ssh, so I
am a bit unsure how well it is working.
It would be useful to run it through `gdb` and check if the two
pointers are valid and which one points to `mapped region at address
0x220C9000`
Thread 35 "hackrf_source_c" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff4affd700 (LWP 27507)]
hackrf_source_c::work (this=0x555555bc1ba0, noutput_items=2000127, input_items=..., output_items=...)
at ./lib/hackrf/hackrf_source_c.cc:380
380 ./lib/hackrf/hackrf_source_c.cc: Ingen slik fil eller filkatalog.
(gdb) p out
$1 = (gr_complex *) 0x7fffd64e2908
(gdb) p *out
$2 = {_M_value = -0.0234375 + 0.015625 * I}
(gdb) p buf
$3 = (unsigned short *) 0x555556ce63c0
(gdb) p *(buf+i)
Cannot access memory at address 0x555557191000
(gdb) p i
$4 = 2446880
(gdb) p remaining
$5 = 3738111
(gdb)
…--
Happy hacking
Petter Reinholdtsen
|
Now either In your first valgrind output there was this error |
[Vasil Velichkov]
In your first valgrind output there was this error `==491== Use of
uninitialised value of size 8` and most probably this is when the
pointer or `i` gets invalid value. Could you run it again with
`valgrind` and provide the first error, now after debug info symbols
are installed the error should be more verbose
Note, it is not the first error, it is the second to last error. Here
is the tail of the valgrind run, with a bit more included than last
time:
==28953== Invalid read of size 4
==28953== at 0x1E2B2E: PyObject_Free (in /usr/bin/python2.7)
==28953== by 0x1F3C27: ??? (in /usr/bin/python2.7)
==28953== by 0x208D17: PyEval_EvalFrameEx (in /usr/bin/python2.7)
==28953== by 0x201534: PyEval_EvalCodeEx (in /usr/bin/python2.7)
==28953== by 0x21DEA7: ??? (in /usr/bin/python2.7)
==28953== by 0x1EF672: PyObject_Call (in /usr/bin/python2.7)
==28953== by 0x233FED: ??? (in /usr/bin/python2.7)
==28953== by 0x1EF672: PyObject_Call (in /usr/bin/python2.7)
==28953== by 0x233D26: ??? (in /usr/bin/python2.7)
==28953== by 0x1F5193: ??? (in /usr/bin/python2.7)
==28953== by 0x1EF672: PyObject_Call (in /usr/bin/python2.7)
==28953== by 0x208E2E: PyEval_EvalFrameEx (in /usr/bin/python2.7)
==28953== Address 0xe95e020 is 18,640 bytes inside an unallocated block of size 19,248 in arena "client"
==28953==
==28953== Thread 35 hackrf_source_c2:
==28953== Invalid read of size 2
==28953== at 0x1E2766E8: hackrf_source_c::work(int, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) (hackrf_source_c.cc:380)
==28953== by 0x7756766: gr::sync_block::general_work(int, std::vector<int, std::allocator<int> >&, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) (sync_block.cc:66)
==28953== by 0x770B7EF: gr::block_executor::run_one_iteration() (block_executor.cc:451)
==28953== by 0x776285B: gr::tpb_thread_body::tpb_thread_body(boost::shared_ptr<gr::block>, int) (tpb_thread_body.cc:122)
==28953== by 0x7753324: operator() (scheduler_tpb.cc:44)
==28953== by 0x7753324: operator() (thread_body_wrapper.h:51)
==28953== by 0x7753324: boost::detail::function::void_function_obj_invoker0<gr::thread::thread_body_wrapper<gr::tpb_container>, void>::invoke(boost::detail::function::function_buffer&) (function_template.hpp:159)
==28953== by 0x76EF8B1: operator() (function_template.hpp:771)
==28953== by 0x76EF8B1: boost::detail::thread_data<boost::function0<void> >::run() (thread.hpp:116)
==28953== by 0x8D4D115: ??? (in /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.62.0)
==28953== by 0x4E3F493: start_thread (pthread_create.c:333)
==28953== Address 0x22009300 is 0 bytes after a block of size 262,144 alloc'd
==28953== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==28953== by 0x1E27A88B: hackrf_source_c::hackrf_source_c(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (hackrf_source_c.cc:229)
==28953== by 0x1E27B7B5: make_hackrf_source_c(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (hackrf_source_c.cc:69)
==28953== by 0x1E22B6EC: source_impl::source_impl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (source_impl.cc:323)
==28953== by 0x1E22D9C5: osmosdr::source::make(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (source_impl.cc:105)
==28953== by 0x1DF728BF: _wrap_source_make (osmosdr_swigPYTHON_wrap.cxx:16803)
==28953== by 0x20A735: PyEval_EvalFrameEx (in /usr/bin/python2.7)
==28953== by 0x201534: PyEval_EvalCodeEx (in /usr/bin/python2.7)
==28953== by 0x209697: PyEval_EvalFrameEx (in /usr/bin/python2.7)
==28953== by 0x201534: PyEval_EvalCodeEx (in /usr/bin/python2.7)
==28953== by 0x21DEA7: ??? (in /usr/bin/python2.7)
==28953== by 0x1EF672: PyObject_Call (in /usr/bin/python2.7)
==28953==
==28953== Use of uninitialised value of size 8
==28953== at 0x1E2766EC: hackrf_source_c::work(int, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) (hackrf_source_c.cc:380)
==28953== by 0x7756766: gr::sync_block::general_work(int, std::vector<int, std::allocator<int> >&, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) (sync_block.cc:66)
==28953== by 0x770B7EF: gr::block_executor::run_one_iteration() (block_executor.cc:451)
==28953== by 0x776285B: gr::tpb_thread_body::tpb_thread_body(boost::shared_ptr<gr::block>, int) (tpb_thread_body.cc:122)
==28953== by 0x7753324: operator() (scheduler_tpb.cc:44)
==28953== by 0x7753324: operator() (thread_body_wrapper.h:51)
==28953== by 0x7753324: boost::detail::function::void_function_obj_invoker0<gr::thread::thread_body_wrapper<gr::tpb_container>, void>::invoke(boost::detail::function::function_buffer&) (function_template.hpp:159)
==28953== by 0x76EF8B1: operator() (function_template.hpp:771)
==28953== by 0x76EF8B1: boost::detail::thread_data<boost::function0<void> >::run() (thread.hpp:116)
==28953== by 0x8D4D115: ??? (in /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.62.0)
==28953== by 0x4E3F493: start_thread (pthread_create.c:333)
==28953==
==28953==
==28953== Process terminating with default action of signal 11 (SIGSEGV)
==28953== Bad permissions for mapped region at address 0x220C9000
==28953== at 0x1E2766E8: hackrf_source_c::work(int, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) (hackrf_source_c.cc:380)
==28953== by 0x7756766: gr::sync_block::general_work(int, std::vector<int, std::allocator<int> >&, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) (sync_block.cc:66)
==28953== by 0x770B7EF: gr::block_executor::run_one_iteration() (block_executor.cc:451)
==28953== by 0x776285B: gr::tpb_thread_body::tpb_thread_body(boost::shared_ptr<gr::block>, int) (tpb_thread_body.cc:122)
==28953== by 0x7753324: operator() (scheduler_tpb.cc:44)
==28953== by 0x7753324: operator() (thread_body_wrapper.h:51)
==28953== by 0x7753324: boost::detail::function::void_function_obj_invoker0<gr::thread::thread_body_wrapper<gr::tpb_container>, void>::invoke(boost::detail::function::function_buffer&) (function_template.hpp:159)
==28953== by 0x76EF8B1: operator() (function_template.hpp:771)
==28953== by 0x76EF8B1: boost::detail::thread_data<boost::function0<void> >::run() (thread.hpp:116)
==28953== by 0x8D4D115: ??? (in /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.62.0)
==28953== by 0x4E3F493: start_thread (pthread_create.c:333)
==28953==
==28953== HEAP SUMMARY:
==28953== in use at exit: 26,019,684 bytes in 33,354 blocks
==28953== total heap usage: 100,088 allocs, 66,734 frees, 80,356,781 bytes allocated
==28953==
==28953== LEAK SUMMARY:
==28953== definitely lost: 144 bytes in 3 blocks
==28953== indirectly lost: 0 bytes in 0 blocks
==28953== possibly lost: 1,265,079 bytes in 221 blocks
==28953== still reachable: 24,754,461 bytes in 33,130 blocks
==28953== suppressed: 0 bytes in 0 blocks
==28953== Rerun with --leak-check=full to see details of leaked memory
==28953==
==28953== For counts of detected and suppressed errors, rerun with: -v
==28953== Use --track-origins=yes to see where uninitialised values come from
==28953== ERROR SUMMARY: 104116 errors from 113 contexts (suppressed: 0 from 0)
Killed
…--
Happy hacking
Petter Reinholdtsen
|
Could you upload the full log somewhere - pastbin, dropbox, google drive ... and provide the link Also under
|
[Vasil Velichkov]
Could you upload the full log somewhere - pastbin, dropbox, google
drive ... and provide the link
Yes, see
<URL: https://0bin.link/paste/DfquG-aQ#RlQfLwEUw8JKjY8IVaHN1VmlolrjafQzW+zIE8K01WV >.
Will be available for a day.
Also under `gdb` after it crashes execute
Sure. Here it is.
(gdb) set print pretty on
(gdb) info locals
i = 2410000
remaining = 3738111
out = 0x7fffd649a888
running = true
buf = 0x555556ce63e0
(gdb) info args
this = 0x555555bc1b30
noutput_items = 2000127
input_items = <optimized out>
output_items = <optimized out>
(gdb) p *buf
$1 = 257
(gdb) p *this
$2 = {
<gr::sync_block> = {
<gr::block> = {
<gr::basic_block> = {
<gr::msg_accepter> = {
<gr::messages::msg_accepter> = {
_vptr.msg_accepter = 0x7fffe0ef7508 <vtable for hackrf_source_c+16>
}, <No data fields>},
<boost::enable_shared_from_this<gr::basic_block>> = {
weak_this_ = {
px = 0x555555bc1b30,
pn = {
pi_ = 0x555556ac9630
}
}
},
members of gr::basic_block:
d_msg_handlers = {
_M_t = {
_M_impl = {
<std::allocator<std::_Rb_tree_node<std::pair<const boost::intrusive_ptr<pmt::pmt_base>, boost::function---Type <return> to continue, or q <return> to quit---
<void(boost::intrusive_ptr<pmt::pmt_base>)> > > >> = {
<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const boost::intrusive_ptr<pmt::pmt_base>, boost::function<void(boost::intrusive_ptr<pmt::pmt_base>)> > > >> = {<No data fields>}, <No data fields>},
members of std::_Rb_tree<boost::intrusive_ptr<pmt::pmt_base>, std::pair<const boost::intrusive_ptr<pmt::pmt_base>, boost::function<void(boost::intrusive_ptr<pmt::pmt_base>)> >, std::_Select1st<std::pair<const boost::intrusive_ptr<pmt::pmt_base>, boost::function<void(boost::intrusive_ptr<pmt::pmt_base>)> > >, pmt::comparator, std::allocator<std::pair<const boost::intrusive_ptr<pmt::pmt_base>, boost::function<void(boost::intrusive_ptr<pmt::pmt_base>)> > > >::_Rb_tree_impl<pmt::comparator, true>:
_M_key_compare = {<No data fields>},
_M_header = {
_M_color = std::_S_red,
_M_parent = 0x555555bc15a0,
_M_left = 0x555555bc15a0,
_M_right = 0x555555bc15a0
},
_M_node_count = 1
}
}
},
msg_queue_ready = {
_M_t = {
_M_impl = {
<std::allocator<std::_Rb_tree_node<std::pair<boost::intrusive_ptr<pmt::pmt_base> const, boost::shared_ptr<boost::condition_variable> > > >> = {
<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<boost::intrusive_ptr<pmt::pmt_base> const, boost::shared_ptr<boost::condition_variable> > > >> = {<No data fields>}, <No data fields>},
members of std::_Rb_tree<boost::intrusive_ptr<pmt::pmt_base>, std::pair<boost::intrusive_ptr<pmt::pmt_base> const, boost::shared_ptr<boost::condition_variable> >, std::_Select1st<std::pair<boost::intrusive_ptr<pmt::pmt_base> const, boost::shared_ptr<boost::condition_variable> > >, pmt::comparator, std::allocator<std::pair<boost::intrusive_ptr<pmt::pmt_base> const, boost::shared_ptr<boost::condition_variable> > > >::_Rb_tree_impl<pmt::comparator, true>:
_M_key_compare = {<No data fields>},
_M_header = {
_M_color = std::_S_red,
_M_parent = 0x555555bc1650,
_M_left = 0x555555bc1650,
_M_right = 0x555555bc1650
},
_M_node_count = 1
}
}
},
mutex = {
m = {
__data = {
__lock = 0,
__count = 0,
__owner = 0,
__nusers = 0,
__kind = 0,
__spins = 0,
__elision = 0,
__list = {
__prev = 0x0,
__next = 0x0
}
},
__size = '\000' <repeats 39 times>,
__align = 0
}
},
d_name = {
static npos = 18446744073709551615,
_M_dataplus = {
<std::allocator<char>> = {
<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
members of std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
_M_p = 0x555555bc1be0 "hackrf_source_c"
},
_M_string_length = 15,
{
_M_local_buf = "hackrf_source_c",
_M_allocated_capacity = 8313476078763204968
}
},
d_input_signature = {
px = 0x555555bc1ec0,
pn = {
pi_ = 0x555555bc1f10
}
},
d_output_signature = {
px = 0x5555564df940,
pn = {
pi_ = 0x555555bc1ea0
}
},
d_unique_id = 2,
d_symbolic_id = 0,
d_symbol_name = {
static npos = 18446744073709551615,
_M_dataplus = {
<std::allocator<char>> = {
<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
members of std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
_M_p = 0x555555bed4a0 "hackrf_source_c0"
},
_M_string_length = 16,
{
_M_local_buf = "\036\000\000\000\000\000\000\000\004d\000\000\002\000\000",
_M_allocated_capacity = 30
}
},
d_symbol_alias = {
static npos = 18446744073709551615,
_M_dataplus = {
<std::allocator<char>> = {
<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
members of std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
_M_p = 0x555555bc1c50 ""
},
_M_string_length = 0,
{
_M_local_buf = "\000l", '\000' <repeats 13 times>,
_M_allocated_capacity = 27648
}
},
d_color = gr::basic_block::BLACK,
d_rpc_set = false,
msg_queue = {
_M_t = {
_M_impl = {
<std::allocator<std::_Rb_tree_node<std::pair<boost::intrusive_ptr<pmt::pmt_base> const, std::deque<boos---Type <return> to continue, or q <return> to quit---
t::intrusive_ptr<pmt::pmt_base>, std::allocator<boost::intrusive_ptr<pmt::pmt_base> > > > > >> = {
<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<boost::intrusive_ptr<pmt::pmt_base> const, std::deque<boost::intrusive_ptr<pmt::pmt_base>, std::allocator<boost::intrusive_ptr<pmt::pmt_base> > > > > >> = {<No data fields>}, <No data fields>},
members of std::_Rb_tree<boost::intrusive_ptr<pmt::pmt_base>, std::pair<boost::intrusive_ptr<pmt::pmt_base> const, std::deque<boost::intrusive_ptr<pmt::pmt_base>, std::allocator<boost::intrusive_ptr<pmt::pmt_base> > > >, std::_Select1st<std::pair<boost::intrusive_ptr<pmt::pmt_base> const, std::deque<boost::intrusive_ptr<pmt::pmt_base>, std::allocator<boost::intrusive_ptr<pmt::pmt_base> > > > >, pmt::comparator, std::allocator<std::pair<boost::intrusive_ptr<pmt::pmt_base> const, std::deque<boost::intrusive_ptr<pmt::pmt_base>, std::allocator<boost::intrusive_ptr<pmt::pmt_base> > > > > >::_Rb_tree_impl<pmt::comparator, true>:
_M_key_compare = {<No data fields>},
_M_header = {
_M_color = std::_S_red,
_M_parent = 0x555555bdba20,
_M_left = 0x555555bdba20,
_M_right = 0x555555bdba20
},
_M_node_count = 1
}
}
},
d_rpc_vars = {
<std::_Vector_base<boost::any, std::allocator<boost::any> >> = {
_M_impl = {
<std::allocator<boost::any>> = {
<__gnu_cxx::new_allocator<boost::any>> = {<No data fields>}, <No data fields>},
members of std::_Vector_base<boost::any, std::allocator<boost::any> >::_Vector_impl:
_M_start = 0x0,
_M_finish = 0x0,
_M_end_of_storage = 0x0
}
}, <No data fields>},
d_message_subscribers = {
px = 0x555555bc6610
}
},
members of gr::block:
d_output_multiple = 1,
d_output_multiple_set = false,
d_unaligned = 0,
d_is_unaligned = false,
d_relative_rate = 1,
d_detail = {
px = 0x555557148300,
pn = {
pi_ = 0x555557148570
}
},
d_history = 1,
d_attr_delay = 0,
d_fixed_rate = true,
d_max_noutput_items_set = true,
d_max_noutput_items = 4000000,
d_min_noutput_items = 0,
d_tag_propagation_policy = gr::block::TPP_ALL_TO_ALL,
d_affinity = {
<std::_Vector_base<int, std::allocator<int> >> = {
_M_impl = {
<std::allocator<int>> = {
<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>},
members of std::_Vector_base<int, std::allocator<int> >::_Vector_impl:
_M_start = 0x0,
_M_finish = 0x0,
_M_end_of_storage = 0x0
}
}, <No data fields>},
d_priority = -1,
d_pc_rpc_set = false,
d_update_rate = false,
d_finished = false,
d_max_output_buffer = {
<std::_Vector_base<long, std::allocator<long> >> = {
_M_impl = {
<std::allocator<long>> = {
<__gnu_cxx::new_allocator<long>> = {<No data fields>}, <No data fields>},
members of std::_Vector_base<long, std::allocator<long> >::_Vector_impl:
_M_start = 0x555555bed510,
_M_finish = 0x555555bed518,
_M_end_of_storage = 0x555555bed518
}
}, <No data fields>},
d_min_output_buffer = {
<std::_Vector_base<long, std::allocator<long> >> = {
_M_impl = {
<std::allocator<long>> = {
<__gnu_cxx::new_allocator<long>> = {<No data fields>}, <No data fields>},
members of std::_Vector_base<long, std::allocator<long> >::_Vector_impl:
_M_start = 0x555556795ef0,
_M_finish = 0x555556795ef8,
_M_end_of_storage = 0x555556795ef8
}
}, <No data fields>},
d_setlock = {
m = {
__data = {
__lock = 0,
__count = 0,
__owner = 0,
__nusers = 0,
__kind = 0,
__spins = 0,
__elision = 0,
__list = {
__prev = 0x0,
__next = 0x0
}
},
__size = '\000' <repeats 39 times>,
__align = 0
}
},
d_logger = 0x5555564779c0,
d_debug_logger = 0x555555bdbd00
}, <No data fields>},
<source_iface> = {
_vptr.source_iface = 0x7fffe0ef7690 <vtable for hackrf_source_c+408>
},
members of hackrf_source_c:
static _usage = 1,
static _usage_mutex = {
m = {
__data = {
__lock = 0,
__count = 0,
__owner = 0,
__nusers = 0,
__kind = 0,
__spins = 0,
__elision = 0,
__list = {
__prev = 0x0,
__next = 0x0
}
},
__size = '\000' <repeats 39 times>,
__align = 0
}
},
_lut = {
<std::_Vector_base<std::complex<float>, std::allocator<std::complex<float> > >> = {
_M_impl = {
<std::allocator<std::complex<float> >> = {
<__gnu_cxx::new_allocator<std::complex<float> >> = {<No data fields>}, <No data fields>},
members of std::_Vector_base<std::complex<float>, std::allocator<std::complex<float> > >::_Vector_impl:
_M_start = 0x555556b26380,
_M_finish = 0x555556ba6380,
_M_end_of_storage = 0x555556ba6380
}
}, <No data fields>},
_dev = 0x555556aba620,
_thread = {
thread_info = {
px = 0x0,
pn = {
pi_ = 0x0
}
}
},
_buf = 0x555556ac95b0,
_buf_num = 15,
_buf_len = 262144,
_buf_head = 2,
_buf_used = 6,
_buf_mutex = {
m = {
__data = {
__lock = 0,
__count = 0,
__owner = 0,
__nusers = 0,
__kind = 0,
__spins = 0,
__elision = 0,
__list = {
__prev = 0x0,
__next = 0x0
}
},
__size = '\000' <repeats 39 times>,
__align = 0
}
},
_buf_cond = {
internal_mutex = {
__data = {
__lock = 0,
__count = 0,
__owner = 0,
__nusers = 0,
__kind = 0,
__spins = 0,
__elision = 0,
__list = {
__prev = 0x0,
__next = 0x0
}
},
__size = '\000' <repeats 39 times>,
__align = 0
},
cond = {
__data = {
__lock = 0,
__futex = 0,
__total_seq = 0,
__wakeup_seq = 0,
__woken_seq = 0,
__mutex = 0x0,
__nwaiters = 0,
__broadcast_seq = 0
},
__size = '\000' <repeats 47 times>,
__align = 0
}
},
_buf_offset = 1869056,
_samp_avail = -1737984,
_sample_rate = 2000000,
_center_freq = 925900000,
_freq_corr = 0,
_auto_gain = true,
_amp_gain = 14,
_lna_gain = 32,
_vga_gain = 30,
_bandwidth = 1750000
}
(gdb)
…--
Happy hacking
Petter Reinholdtsen
|
Something is wrong with the buffer management, the 229 _buf[i] = (unsigned short *) malloc(_buf_len);
375 buf = _buf[_buf_head];
376
377 int remaining = noutput_items - _samp_avail;
378
379 for (int i = 0; i < remaining; ++i)
380 *out++ = _lut[ *(buf + i) ];
381
382 _buf_offset = remaining;
383 _samp_avail = (_buf_len / BYTES_PER_SAMPLE) - remaining; then on the first run the Try to run |
[Vasil Velichkov]
Try to run `grgsm_scanner` with smaller sample rate `-s 0.8e6` or `-s
0x1.2e6` and osmocom_fft with the default grgsm_scanner sample rate
`-s 2e6`
I did, and grgsm_scanner still segfaults, while osmocom_fft did not.
…--
Happy hacking
Petter Reinholdtsen
|
Piotr was able to debug the hackrf crash, and discovered that this patch avoided the segfault:
I'm not sure why, but perhaps it solve your problem too? |
Hi. Any hope to have a new gr-gsm release soon with this fixed included? |
This one-line patch also avoids the segfault here, on Debian systems against HackRF host code |
i am sorry but i do not understand ? where is the patch ? how can i execute it ?what does that mean (ode git-b4a452c and 2017.02.1.) these line of code are already there in my code ! |
Hi @mazen-bassiouny,
It's part of the comment #336 (comment)
https://unix.stackexchange.com/questions/232879/applying-a-diff-patch
Two versions of hackrf he has tested with: greatscottgadgets/hackrf@b4a452c and |
so this patch just to comment this line ?: |
Correct.
After applying the patch you need to install the modified version, run
Try |
It worked with me ,, thanks alot |
I just commented out that line so hackrf shouldn't crash. |
grgsm_scanner
Aborted (core dumped)
What is the problem&
The text was updated successfully, but these errors were encountered: