[USRP-users] uhd driver and valgrind

Anoniem 0011 anoniem0011 at gmail.com
Fri Feb 3 06:52:04 EST 2012


Hi Josh,

Would you be so kind to cleanup some stuff in the uhd driver?
(ubuntu 11.10 32 bit)

See below

These are the valgrind options i used and tested with your tx_waveforms
example application:

valgrind --tool=memcheck --leak-check=yes --show-reachable=yes
--num-callers=20 --track-fds=yes --track-origins=yes
/usr/local/share/uhd/examples/tx_waveforms --rate 256000 --freq 0

Regards,

Ano


==8047== Memcheck, a memory error detector
==8047== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==8047== Using Valgrind-3.6.1-Debian and LibVEX; rerun with -h for
copyright info
==8047== Command: /usr/local/share/uhd/examples/tx_waveforms --rate 256000
--freq 0
==8047==
linux; GNU C++ version 4.6.1; Boost_104601; UHD_003.004.000-607b9a3


Creating the usrp device with: ...
-- Opening a USRP1 device...
-- Using FPGA clock rate of 64.000000MHz...
==8047== Use of uninitialised value of size 4
==8047==    at 0x448BEBF: ??? (in
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16)
==8047==    by 0x448C332: std::num_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::do_put(std::ostreambuf_iterator<char,
std::char_traits<char> >, std::ios_base&, char, unsigned long) const (in
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16)
==8047==    by 0x44983FB: std::ostream& std::ostream::_M_insert<unsigned
long>(unsigned long) (in /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16)
==8047==    by 0x4214735: usrp1_iface_impl::poke32(unsigned int, unsigned
int) (in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x5C9F127: ???
==8047==  Uninitialised value was created by a heap allocation
==8047==    at 0x402842F: operator new(unsigned int)
(vg_replace_malloc.c:255)
==8047==    by 0x4222519: usrp1_make(uhd::device_addr_t const&) (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x5AF3A4B: ???
==8047==
==8047== Syscall param ioctl(USBDEVFS_SUBMITURB).buffer.data points to
uninitialised byte(s)
==8047==    at 0x460B8C9: ioctl (syscall-template.S:82)
==8047==    by 0x48290A2: ??? (in /lib/i386-linux-gnu/libusb-1.0.so.0.0.0)
==8047==    by 0x4825373: libusb_submit_transfer (in
/lib/i386-linux-gnu/libusb-1.0.so.0.0.0)
==8047==    by 0x4826C27: libusb_control_transfer (in
/lib/i386-linux-gnu/libusb-1.0.so.0.0.0)
==8047==    by 0x40B92B5: libusb_control_impl::submit(unsigned char,
unsigned char, unsigned short, unsigned short, unsigned char*, unsigned
short) (in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x41DB476: fx2_ctrl_impl::usrp_control_write(unsigned char,
unsigned short, unsigned short, unsigned char*, unsigned short) (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x5C9F127: ???
==8047==  Address 0x5ca0f2b is 11 bytes inside a block of size 12 alloc'd
==8047==    at 0x4028876: malloc (vg_replace_malloc.c:236)
==8047==    by 0x4826B5B: libusb_control_transfer (in
/lib/i386-linux-gnu/libusb-1.0.so.0.0.0)
==8047==    by 0x40B92B5: libusb_control_impl::submit(unsigned char,
unsigned char, unsigned short, unsigned short, unsigned char*, unsigned
short) (in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x41DB476: fx2_ctrl_impl::usrp_control_write(unsigned char,
unsigned short, unsigned short, unsigned char*, unsigned short) (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x5C9F127: ???
==8047==  Uninitialised value was created by a heap allocation
==8047==    at 0x402842F: operator new(unsigned int)
(vg_replace_malloc.c:255)
==8047==    by 0x4222519: usrp1_make(uhd::device_addr_t const&) (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x5AF3A4B: ???
==8047==
==8047== Conditional jump or move depends on uninitialised value(s)
==8047==    at 0x448C3ED: std::ostreambuf_iterator<char,
std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> >
>::_M_insert_int<long>(std::ostreambuf_iterator<char,
std::char_traits<char> >, std::ios_base&, char, long) const (in
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16)
==8047==    by 0x448C732: std::num_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::do_put(std::ostreambuf_iterator<char,
std::char_traits<char> >, std::ios_base&, char, long) const (in
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16)
==8047==    by 0x5: ???
==8047==  Uninitialised value was created by a stack allocation
==8047==    at 0x41DE49A: fx2_ctrl_impl::read_i2c(unsigned char, unsigned
int) (in /usr/local/lib/libuhd.so.003.004)
==8047==
==8047== Use of uninitialised value of size 4
==8047==    at 0x448BEBF: ??? (in
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16)
==8047==    by 0x448C732: std::num_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::do_put(std::ostreambuf_iterator<char,
std::char_traits<char> >, std::ios_base&, char, long) const (in
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16)
==8047==    by 0x5: ???
==8047==  Uninitialised value was created by a stack allocation
==8047==    at 0x41DE49A: fx2_ctrl_impl::read_i2c(unsigned char, unsigned
int) (in /usr/local/lib/libuhd.so.003.004)
==8047==
==8047== Conditional jump or move depends on uninitialised value(s)
==8047==    at 0x448BECA: ??? (in
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16)
==8047==    by 0x448C732: std::num_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::do_put(std::ostreambuf_iterator<char,
std::char_traits<char> >, std::ios_base&, char, long) const (in
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16)
==8047==    by 0x5: ???
==8047==  Uninitialised value was created by a stack allocation
==8047==    at 0x41DE49A: fx2_ctrl_impl::read_i2c(unsigned char, unsigned
int) (in /usr/local/lib/libuhd.so.003.004)
==8047==
==8047== Conditional jump or move depends on uninitialised value(s)
==8047==    at 0x40ECE37: uhd::usrp::dboard_eeprom_t::load(uhd::i2c_iface&,
unsigned char) (in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x421EB63: usrp1_impl::usrp1_impl(uhd::device_addr_t const&)
(in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x5CBF02B: ???
==8047==  Uninitialised value was created by a stack allocation
==8047==    at 0x41DE49A: fx2_ctrl_impl::read_i2c(unsigned char, unsigned
int) (in /usr/local/lib/libuhd.so.003.004)
==8047==
==8047== Conditional jump or move depends on uninitialised value(s)
==8047==    at 0x40ECE37: uhd::usrp::dboard_eeprom_t::load(uhd::i2c_iface&,
unsigned char) (in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x421EAE9: usrp1_impl::usrp1_impl(uhd::device_addr_t const&)
(in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x422252B: usrp1_make(uhd::device_addr_t const&) (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x5AF3A4B: ???
==8047==  Uninitialised value was created by a stack allocation
==8047==    at 0x41DE49A: fx2_ctrl_impl::read_i2c(unsigned char, unsigned
int) (in /usr/local/lib/libuhd.so.003.004)
==8047==
==8047== Conditional jump or move depends on uninitialised value(s)
==8047==    at 0x40ECE37: uhd::usrp::dboard_eeprom_t::load(uhd::i2c_iface&,
unsigned char) (in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x421EB26: usrp1_impl::usrp1_impl(uhd::device_addr_t const&)
(in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x422252B: usrp1_make(uhd::device_addr_t const&) (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x5AF3A4B: ???
==8047==  Uninitialised value was created by a stack allocation
==8047==    at 0x41DE49A: fx2_ctrl_impl::read_i2c(unsigned char, unsigned
int) (in /usr/local/lib/libuhd.so.003.004)
==8047==
==8047== Conditional jump or move depends on uninitialised value(s)
==8047==    at 0x40ECE37: uhd::usrp::dboard_eeprom_t::load(uhd::i2c_iface&,
unsigned char) (in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x421EB63: usrp1_impl::usrp1_impl(uhd::device_addr_t const&)
(in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x422252B: usrp1_make(uhd::device_addr_t const&) (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x5AF3A4B: ???
==8047==  Uninitialised value was created by a stack allocation
==8047==    at 0x41DE49A: fx2_ctrl_impl::read_i2c(unsigned char, unsigned
int) (in /usr/local/lib/libuhd.so.003.004)
==8047==
==8047== Thread 3:
==8047== Conditional jump or move depends on uninitialised value(s)
==8047==    at 0x41FBD8F: usrp1_impl::vandal_conquest_loop() (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x42017B0:
boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void,
boost::_mfi::mf0<void, usrp1_impl>,
boost::_bi::list1<boost::_bi::value<usrp1_impl*> > >,
void>::invoke(boost::detail::function::function_buffer&) (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x42CDEED: task_impl::task_loop(boost::function<void ()()>
const&) (in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x42CC1F5:
boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void,
task_impl, boost::function<void ()()> const&>,
boost::_bi::list2<boost::_bi::value<task_impl*>,
boost::_bi::value<boost::function<void ()()> > > > >::run() (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x46140CD: clone (clone.S:130)
==8047==  Uninitialised value was created by a heap allocation
==8047==    at 0x402842F: operator new(unsigned int)
(vg_replace_malloc.c:255)
==8047==    by 0x4222519: usrp1_make(uhd::device_addr_t const&) (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x5AF3A4B: ???
==8047==
==8047== Conditional jump or move depends on uninitialised value(s)
==8047==    at 0x41FBCEB: usrp1_impl::vandal_conquest_loop() (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x42017B0:
boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void,
boost::_mfi::mf0<void, usrp1_impl>,
boost::_bi::list1<boost::_bi::value<usrp1_impl*> > >,
void>::invoke(boost::detail::function::function_buffer&) (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x42CDEED: task_impl::task_loop(boost::function<void ()()>
const&) (in /usr/local/lib/libuhd.so.003.004)
==8047==    by 0x42CC1F5:
boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void,
task_impl, boost::function<void ()()> const&>,
boost::_bi::list2<boost::_bi::value<task_impl*>,
boost::_bi::value<boost::function<void ()()> > > > >::run() (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x46140CD: clone (clone.S:130)
==8047==  Uninitialised value was created by a heap allocation
==8047==    at 0x402842F: operator new(unsigned int)
(vg_replace_malloc.c:255)
==8047==    by 0x4222519: usrp1_make(uhd::device_addr_t const&) (in
/usr/local/lib/libuhd.so.003.004)
==8047==    by 0x5AF3A4B: ???
==8047==
Using Device: Single USRP:
  Device: USRP1 Device
  Mboard 0: USRP1 (Classic)
  RX Channel: 0
    RX DSP: 0
    RX Dboard: A
    RX Subdev: LF RX (0x000f) - AB
  TX Channel: 0
    TX DSP: 0
    TX Dboard: A
    TX Subdev: LF TX (0x000e) - AB

Setting TX Rate: 0.256000 Msps...
Actual TX Rate: 0.256000 Msps...

Setting TX Freq: 0.000000 MHz...
Actual TX Freq: 0.000000 MHz...

Setting device timestamp to 0...
Press Ctrl + C to stop streaming...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20120203/58985a23/attachment-0002.html>


More information about the USRP-users mailing list