Bug 378488 - abort() when transfering big files
Summary: abort() when transfering big files
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-06 05:38 UTC by Yuxuan Shui
Modified: 2017-08-01 22:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuxuan Shui 2017-04-06 05:38:31 UTC
(gdb) bt
#0  0x00007efe20b8ca10 in raise () from /usr/lib/libc.so.6
#1  0x00007efe20b8e13a in abort () from /usr/lib/libc.so.6
#2  0x00007efe20f8e4ed in __gnu_cxx::__verbose_terminate_handler ()
    at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
#3  0x00007efe20f8c2a6 in __cxxabiv1::__terminate (handler=<optimized out>)
    at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:47
#4  0x00007efe20f8c2f1 in std::terminate () at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:57
#5  0x00007efe20f8c508 in __cxxabiv1::__cxa_throw (obj=0xbaa260, tinfo=0x7efe21276770 <typeinfo for std::bad_alloc>, 
    dest=0x7efe20f8a650 <std::bad_alloc::~bad_alloc()>) at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:87
#6  0x00007efe21314362 in qBadAlloc() () from /usr/lib/libQt5Core.so.5
#7  0x00007efe2133635a in QByteArray::reallocData(unsigned int, QFlags<QArrayData::AllocationOption>) () from /usr/lib/libQt5Core.so.5
#8  0x00007efe2133650a in QByteArray::resize(int) () from /usr/lib/libQt5Core.so.5
#9  0x00007efe21439bd3 in QIODevice::readAll() () from /usr/lib/libQt5Core.so.5
#10 0x00007efe233328ae in DownloadJob::socketFailed(QAbstractSocket::SocketError) () from /usr/lib/libkdeconnectcore.so.1
#11 0x00007efe21538d49 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#12 0x00007efe208babe1 in QAbstractSocket::error(QAbstractSocket::SocketError) () from /usr/lib/libQt5Network.so.5
#13 0x00007efe208fc52d in ?? () from /usr/lib/libQt5Network.so.5
#14 0x00007efe208e73c1 in ?? () from /usr/lib/libQt5Network.so.5
#15 0x00007efe21538d49 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#16 0x00007efe208bba93 in ?? () from /usr/lib/libQt5Network.so.5
#17 0x00007efe208bbb4c in ?? () from /usr/lib/libQt5Network.so.5
#18 0x00007efe208c7101 in ?? () from /usr/lib/libQt5Network.so.5
#19 0x00007efe221ef34c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#20 0x00007efe221f6b61 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#21 0x00007efe2150d440 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#22 0x00007efe215624fd in ?? () from /usr/lib/libQt5Core.so.5
#23 0x00007efe1b1515a7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#24 0x00007efe1b151810 in ?? () from /usr/lib/libglib-2.0.so.0
#25 0x00007efe1b1518bc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#26 0x00007efe2156204f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#27 0x00007efe2150b89a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#28 0x00007efe21513de4 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
---Type <return> to continue, or q <return> to quit---
#29 0x0000000000401cc4 in ?? ()
#30 0x00007efe20b79511 in __libc_start_main () from /usr/lib/libc.so.6
#31 0x0000000000401d2a in _start ()
Comment 1 Christoph Feck 2017-04-21 17:04:18 UTC
For very large files, the code could use multiple transfers instead of using readAll(). Qt has a 2 GiB limitation on QByteArray.
Comment 2 Albert Astals Cid 2017-08-01 22:39:55 UTC
Git commit d1d84bc464c5f85268a9a1229c8a46ef20367cff by Albert Astals Cid.
Committed on 01/08/2017 at 22:39.
Pushed by aacid into branch '1.x'.

Fix DownloadJob not finishing

We stop using a buffer so it's less memory intensive and allows for larger files to be sent.

With current KIO has CPU usage issues, there's a patch in review that fixes them.

M  +13   -15   core/backends/lan/downloadjob.cpp
M  +1    -2    core/backends/lan/downloadjob.h
M  +4    -0    core/filetransferjob.cpp

https://commits.kde.org/kdeconnect-kde/d1d84bc464c5f85268a9a1229c8a46ef20367cff