Bug 397 - Crash (segfault) when user tries to run >=50G samples
Summary: Crash (segfault) when user tries to run >=50G samples
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Acquisition (show other bugs)
Version: unreleased development snapshot
Hardware: x86 Linux
: Normal major
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-26 19:34 CEST by Vadim A. Misbakh-Soloviov (mva)
Modified: 2015-08-23 21:26 CEST (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim A. Misbakh-Soloviov (mva) 2014-08-26 19:34:37 CEST
Hi!
I've found reproducible-every-time segfault issue:
When I trying to run 50G (or more) samples queue PulseView segfaults with backtrace like that:


#0  0x00007ffff559a0ab in __memcpy_ssse3_back () from /lib64/libc.so.6
#1  0x00005555555af8c2 in pv::data::Snapshot::append_data(void*, unsigned long) ()
#2  0x00005555555aed93 in pv::data::LogicSnapshot::append_payload(sr_datafeed_logic const&) ()
#3  0x00005555555aee8b in pv::data::LogicSnapshot::LogicSnapshot(sr_datafeed_logic const&, unsigned long) ()
#4  0x00005555555a76e4 in pv::SigSession::feed_in_logic(sr_datafeed_logic const&) ()
#5  0x00007ffff65a1e1f in sr_session_send () from /usr/lib64/libsigrok.so.2
#6  0x00007ffff65cc689 in fx2lafw_receive_transfer () from /usr/lib64/libsigrok.so.2
#7  0x00007ffff24b2a78 in usbi_handle_transfer_completion () from /lib64/libusb-1.0.so.0
#8  0x00007ffff24b8366 in op_handle_events () from /lib64/libusb-1.0.so.0
#9  0x00007ffff24b2719 in handle_events () from /lib64/libusb-1.0.so.0
#10 0x00007ffff24b33f7 in libusb_handle_events_timeout_completed () from /lib64/libusb-1.0.so.0
#11 0x00007ffff65ccc2a in receive_data () from /usr/lib64/libsigrok.so.2
#12 0x00007ffff65a2275 in sr_session_run () from /usr/lib64/libsigrok.so.2
#13 0x00005555555a6d19 in pv::SigSession::sample_thread_proc(std::shared_ptr<pv::device::DevInst>, std::function<void (QString)>) ()
#14 0x00005555555ab279 in std::_Mem_fn<void (pv::SigSession::*)(std::shared_ptr<pv::device::DevInst>, std::function<void (QString)>)>::operator()(pv::SigSession*, std::shared_ptr<pv::device::DevInst>, std::function<void (QString)>) const ()
#15 0x00005555555ab3cb in void std::_Bind_simple<std::_Mem_fn<void (pv::SigSession::*)(std::shared_ptr<pv::device::DevInst>, std::function<void (QString)>)> (pv::SigSession*, std::shared_ptr<pv::device::DevInst>, std::function<void (QString)>)>::_M_invoke<0ul, 1ul, 2ul>(std::_Index_tuple<0ul, 1ul, 2ul>) ()
#16 0x00005555555ab4a1 in std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (pv::SigSession::*)(std::shared_ptr<pv::device::DevInst>, std::function<void (QString)>)> (pv::SigSession*, std::shared_ptr<pv::device::DevInst>, std::function<void (QString)>)> >::_M_run() ()
#17 0x00007ffff5dee510 in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libstdc++.so.6
#18 0x00007ffff524af3a in start_thread () from /lib64/libpthread.so.0
#19 0x00007ffff554ce8d in clone () from /lib64/libc.so.6



I tried to run it with any samplerates on both demo driver and fx2lafw (which you can notice in bt)


P.S. It would be nice to have possibility to run just conituous capture mode, I think :)
Comment 1 Soeren Apel 2015-08-23 21:24:04 CEST
In the backtrace, the memcpy() in append_data() fails because PV runs out of memory. This issue was covered by http://sigrok.org/bugzilla/show_bug.cgi?id=626 and is now fixed. Thanks for filing this bug!
Comment 2 Soeren Apel 2015-08-23 21:26:23 CEST
Note: your suggestion of a continuous capture mode is covered by http://sigrok.org/bugzilla/show_bug.cgi?id=624