Compiled and ran Swiften 3.0 on Beaglebone Black and "SendFile" example terminates randomly while transfer


(faisal alghamdi) #1

Hi Everyone,

I downloaded swiften 3.0 library on the beaglebone black. I installed
openssl lib and its dev headers. I installed all the boost library
component " libboost-all-dev " and compiled the library using command
./SCons Swiften V=1

First thing while compilation I got an error because
3rdParty/LibMiniUPnPc/src/miniupnpc.c line:77 has a struct with the
name ip_mreqn . I noticed that when I compile on PC the problem does not
occur. However, I renamed the struct and recompiled again and everything
seemed ok and the compilation finished with no errors..

I ran two applications from the examples in Swiften directory
under /swift-3.0/Swiften/Examples/SendFile/ . These example applications
are "SendFile" and "ReceiveFile". I ran "./ReceiveFile JID PASS" example on
the beaglebone and on the other end I used swift client on PC to send a
file to be received by "ReceiveFile" on the beaglebone. I was able to
transfer files (10MB to 100MB files) with no single problem from linux PC
swift client to beaglebone "ReceiveFile" example.

The problem happens when I run the example "SendFile" from the beaglebone
to transfer file to the swift client on linux PC. The connection terminates
randomly while transfer. Sometimes after sending 3MB and some other times
after 20MB... So it's not clear why this happens I debugged using gdb and
here is the backtrace:

···

===============================
[warning] Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp:51
~SOCKS5BytestreamServerManager: Assertion failed: !connectionServer.
[warning] Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp:54
~SOCKS5BytestreamServerManager: Assertion failed: state == Start.
[warning] Swiften/Client/CoreClient.cpp:474 forceReset: Client not
disconnected properly: Session still active
[debug] Swiften/Network/BoostConnection.cpp:129 handleSocketRead: Socket
read asio.misc:2

Program received signal SIGSEGV, Segmentation fault.
0xb6fa6520 in boost::signals::detail::named_slot_map::begin() () from
/usr/lib/arm-linux-gnueabihf/libboost_signals.so.1.55.0
(gdb) bt
#0 0xb6fa6520 in boost::signals::detail::named_slot_map::begin() () from
/usr/lib/arm-linux-gnueabihf/libboost_signals.so.1.55.0
#1 0x00337b62 in boost::signal0<void, boost::last_value<void>, int,
std::less<int>, boost::function<void ()>

::do_disconnect<boost::_bi::bind_t<void, boost::_mfi::mf0<void,

Swift::LocalJingleTransportCandidateGenerator>,
boost::_bi::list1<boost::_bi::value<Swift::LocalJingleTransportCandidateGenerator*>

> >(boost::_bi::bind_t<void, boost::_mfi::mf0<void,

Swift::LocalJingleTransportCandidateGenerator>,
boost::_bi::list1<boost::_bi::value<Swift::LocalJingleTransportCandidateGenerator*>

> const&, mpl_::bool_<false>) (this=0x50db08, f=...)

    at /usr/include/boost/signals/signal_template.hpp:240
#2 0x00337274 in boost::signal0<void, boost::last_value<void>, int,
std::less<int>, boost::function<void ()>

::disconnect<boost::_bi::bind_t<void, boost::_mfi::mf0<void,

Swift::LocalJingleTransportCandidateGenerator>,
boost::_bi::list1<boost::_bi::value<Swift::LocalJingleTransportCandidateGenerator*>

> >(boost::_bi::bind_t<void, boost::_mfi::mf0<void,

Swift::LocalJingleTransportCandidateGenerator>,
boost::_bi::list1<boost::_bi::value<Swift::LocalJingleTransportCandidateGenerator*>

> const&) (this=0x50db08, t=...)

    at /usr/include/boost/signals/signal_template.hpp:224
#3 0x00335e38 in Swift::LocalJingleTransportCandidateGenerator::stop
(this=0x5895a0) at
Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp:76
#4 0x0032a30a in
Swift::DefaultFileTransferTransporter::stopGeneratingLocalCandidates
(this=0x589348) at
Swiften/FileTransfer/DefaultFileTransferTransporter.cpp:98
#5 0x0032a0fe in
Swift::DefaultFileTransferTransporter::~DefaultFileTransferTransporter
(this=0x589348, __in_chrg=<optimized out>)
    at Swiften/FileTransfer/DefaultFileTransferTransporter.cpp:75
#6 0x0032a24e in
Swift::DefaultFileTransferTransporter::~DefaultFileTransferTransporter
(this=0x589348, __in_chrg=<optimized out>)
    at Swiften/FileTransfer/DefaultFileTransferTransporter.cpp:83
#7 0x00325668 in Swift::JingleFileTransfer::removeTransporter
(this=0x588ce8) at Swiften/FileTransfer/JingleFileTransfer.cpp:231
#8 0x00313466 in
Swift::OutgoingJingleFileTransfer::~OutgoingJingleFileTransfer
(this=0x588c90, __in_chrg=<optimized out>) at
Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp:86
#9 0x0031357e in
Swift::OutgoingJingleFileTransfer::~OutgoingJingleFileTransfer
(this=0x588c90, __in_chrg=<optimized out>) at
Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp:87
#10 0x002b2b2a in boost::checked_delete<Swift::OutgoingJingleFileTransfer>
(x=0x588c90) at /usr/include/boost/checked_delete.hpp:34
#11 0x002b2b92 in
boost::detail::sp_counted_impl_p<Swift::OutgoingJingleFileTransfer>::dispose
(this=0x589038) at
/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:78
#12 0x00023436 in boost::detail::sp_counted_base::release (this=0x589038)
at /usr/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:128
#13 0x000234ae in boost::detail::shared_count::~shared_count
(this=0xbefff3f0, __in_chrg=<optimized out>) at
/usr/include/boost/smart_ptr/detail/shared_count.hpp:371
#14 0x00024e3a in
boost::shared_ptr<Swift::OutgoingFileTransfer>::~shared_ptr
(this=0xbefff3ec, __in_chrg=<optimized out>) at
/usr/include/boost/smart_ptr/shared_ptr.hpp:328
#15 0x00025290 in FileSender::~FileSender (this=0xbefff3e4,
__in_chrg=<optimized out>) at Swiften/Examples/SendFile/SendFile.cpp:50
#16 0x00022c66 in main (argc=5, argv=0xbefff604) at
Swiften/Examples/SendFile/SendFile.cpp:136

Thanks