| Summary: | ktorrent bad_alloc | ||
|---|---|---|---|
| Product: | [Applications] ktorrent | Reporter: | lg3dx6fd |
| Component: | general | Assignee: | Joris Guisson <joris.guisson> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | lg3dx6fd |
| Priority: | NOR | ||
| Version First Reported In: | 23.08.5 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Other | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
lg3dx6fd
2024-04-18 19:45:37 UTC
recompiled without lto, got another bad_alloc:
backtrace:
[Thread 0x7fffcddc96c0 (LWP 79595) exited]
Warning: Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt.
You must not let any exception whatsoever propagate through Qt code.
If that is not possible, in Qt 5 you must at least reimplement
QCoreApplication::notify() and catch all exceptions there.
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Thread 1 "ktorrent" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007ffff54af5df in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007ffff5460612 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff54494ed in __GI_abort () at abort.c:79
#4 0x00007ffff56a0b32 in __gnu_cxx::__verbose_terminate_handler ()
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libstdc++-v3/libsupc++/vterminate.cc:95
#5 0x00007ffff56b44e6 in __cxxabiv1::__terminate (handler=<optimized out>)
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libstdc++-v3/libsupc++/eh_terminate.cc:48
#6 0x00007ffff56b3179 in __cxa_call_terminate (ue_header=0x55555777cb30)
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libstdc++-v3/libsupc++/eh_call.cc:54
#7 0x00007ffff56b385c in __cxxabiv1::__gxx_personality_v0
(version=<optimized out>, actions=6, exception_class=5138137972254386944, ue_header=<optimized out>, context=<optimized out>)
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libstdc++-v3/libsupc++/eh_personality.cc:688
#8 0x00007ffff6faa6a4 in _Unwind_RaiseException_Phase2
(exc=exc@entry=0x55555777cb30, context=context@entry=0x7fffffffcb50, frames_p=frames_p@entry=0x7fffffffca58)
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libgcc/unwind.inc:64
#9 0x00007ffff6faaf84 in _Unwind_Resume (exc=exc@entry=0x55555777cb30)
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libgcc/unwind.inc:242
#10 0x00007ffff5aa1251 in QIODevice::readAll (this=this@entry=0x7fffffffcdb0)
at /usr/src/debug/dev-qt/qtcore-5.15.12-r2/qtbase-everywhere-src-5.15.12/src/corelib/io/qiodevice.cpp:892
#11 0x00007ffff73181d1 in KConfigIniBackend::parseConfig (this=this@entry=0x55555604ddc0, currentLocale=..., entryMap=..., options=...,
options@entry=..., merging=merging@entry=true) at /usr/src/debug/kde-frameworks/kconfig-5.115.0/kconfig-5.115.0/src/core/kconfigini.cpp:89
#12 0x00007ffff73192cc in KConfigIniBackend::writeConfig (this=0x55555604ddc0, locale=..., entryMap=..., options=...)
at /usr/src/debug/kde-frameworks/kconfig-5.115.0/kconfig-5.115.0/src/core/kconfigini.cpp:414
#13 0x00007ffff7302d1e in KConfig::sync (this=0x55555604e620) at /usr/src/debug/kde-frameworks/kconfig-5.115.0/kconfig-5.115.0/src/core/kconfig.cpp:481
#14 0x00007ffff7df248e in bt::TorrentControl::stop (this=0x55555604cb90, wjob=0x0)
at /usr/src/debug/net-libs/libktorrent-23.08.5/libktorrent-23.08.5/src/torrent/torrentcontrol.cpp:460
#15 0x00007ffff7ded584 in bt::TorrentControl::~TorrentControl (this=0x55555604cb90, this=<optimized out>)
at /usr/src/debug/net-libs/libktorrent-23.08.5/libktorrent-23.08.5/src/torrent/torrentcontrol.cpp:104
#16 0x00007ffff7ded639 in bt::TorrentControl::~TorrentControl (this=0x55555604cb90, this=<optimized out>)
at /usr/src/debug/net-libs/libktorrent-23.08.5/libktorrent-23.08.5/src/torrent/torrentcontrol.cpp:124
#17 0x00007ffff7f28a8e in qDeleteAll<QList<bt::TorrentInterface*>::const_iterator> (end=..., begin=...) at /usr/include/qt5/QtCore/qalgorithms.h:320
#18 qDeleteAll<kt::QueuePtrList> (c=...) at /usr/include/qt5/QtCore/qalgorithms.h:328
#19 kt::QueueManager::~QueueManager (this=0x555555eecdb0, __in_chrg=<optimized out>)
at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/libktcore/torrent/queuemanager.cpp:53
#20 0x00007ffff7f28b09 in kt::QueueManager::~QueueManager (this=0x555555eecdb0, __in_chrg=<optimized out>)
at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/libktcore/torrent/queuemanager.cpp:54
#21 0x00005555555b101e in kt::Core::~Core (this=0x555555f155a0, __in_chrg=<optimized out>)
--Type <RET> for more, q to quit, c to continue without paging--
at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/ktorrent/core.cpp:115
#22 0x00005555555b16e9 in kt::Core::~Core (this=0x555555f155a0, __in_chrg=<optimized out>)
at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/ktorrent/core.cpp:118
#23 0x00005555555bcbe2 in kt::GUI::~GUI (this=0x7fffffffd290, __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/ktorrent/gui.cpp:116
#24 0x00005555555902ba in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/ktorrent/main.cpp:251
recompiled with -O0 -march=native -ggdb3 , no lto
at roughly 102.65 MiB/s it crashed with bad_alloc
[Thread 0x7fffd2ca46c0 (LWP 160020) exited]
Warning: Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt.
You must not let any exception whatsoever propagate through Qt code.
If that is not possible, in Qt 5 you must at least reimplement
QCoreApplication::notify() and catch all exceptions there.
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Thread 1 "ktorrent" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007ffff54af5df in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007ffff5460612 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff54494ed in __GI_abort () at abort.c:79
#4 0x00007ffff56a0b32 in __gnu_cxx::__verbose_terminate_handler ()
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libstdc++-v3/libsupc++/vterminate.cc:95
#5 0x00007ffff56b44e6 in __cxxabiv1::__terminate (handler=<optimized out>)
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libstdc++-v3/libsupc++/eh_terminate.cc:48
#6 0x00007ffff56b3179 in __cxa_call_terminate (ue_header=0x555557a337a0)
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libstdc++-v3/libsupc++/eh_call.cc:54
#7 0x00007ffff56b385c in __cxxabiv1::__gxx_personality_v0
(version=<optimized out>, actions=6, exception_class=5138137972254386944, ue_header=<optimized out>, context=<optimized out>)
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libstdc++-v3/libsupc++/eh_personality.cc:688
#8 0x00007ffff6f686a4 in _Unwind_RaiseException_Phase2
(exc=exc@entry=0x555557a337a0, context=context@entry=0x7fffffffcc20, frames_p=frames_p@entry=0x7fffffffcb28)
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libgcc/unwind.inc:64
#9 0x00007ffff6f68f84 in _Unwind_Resume (exc=exc@entry=0x555557a337a0)
at /usr/src/debug/sys-devel/gcc-13.2.1_p20240113-r1/gcc-13-20240113/libgcc/unwind.inc:242
#10 0x00007ffff5aa152b in QLockFilePrivate::isApparentlyStale (this=this@entry=0x7fffc3ffd950)
at /usr/src/debug/dev-qt/qtcore-5.15.12-r2/qtbase-everywhere-src-5.15.12/src/corelib/io/qlockfile.cpp:396
#11 0x00007ffff5c01750 in QLockFile::tryLock (this=<optimized out>, timeout=timeout@entry=-1)
at /usr/src/debug/dev-qt/qtcore-5.15.12-r2/qtbase-everywhere-src-5.15.12/src/corelib/io/qlockfile.cpp:254
#12 0x00007ffff5c0195a in QLockFile::lock (this=<optimized out>)
at /usr/src/debug/dev-qt/qtcore-5.15.12-r2/qtbase-everywhere-src-5.15.12/src/corelib/io/qlockfile.cpp:216
#13 0x00007ffff72d1099 in KConfigIniBackend::lock (this=0x5555560be310)
at /usr/src/debug/kde-frameworks/kconfig-5.115.0/kconfig-5.115.0/src/core/kconfigini.cpp:645
#14 0x00007ffff72c0f6e in KConfigPrivate::lockLocal (this=0x5555560c0c90)
at /usr/src/debug/kde-frameworks/kconfig-5.115.0/kconfig-5.115.0/src/core/kconfig.cpp:128
#15 KConfig::sync (this=0x5555560bf0f0) at /usr/src/debug/kde-frameworks/kconfig-5.115.0/kconfig-5.115.0/src/core/kconfig.cpp:431
#16 0x00007ffff7db048e in bt::TorrentControl::stop (this=0x5555560bdd30, wjob=0x0)
at /usr/src/debug/net-libs/libktorrent-23.08.5/libktorrent-23.08.5/src/torrent/torrentcontrol.cpp:460
#17 0x00007ffff7dab584 in bt::TorrentControl::~TorrentControl (this=0x5555560bdd30, this=<optimized out>)
at /usr/src/debug/net-libs/libktorrent-23.08.5/libktorrent-23.08.5/src/torrent/torrentcontrol.cpp:104
#18 0x00007ffff7dab639 in bt::TorrentControl::~TorrentControl (this=0x5555560bdd30, this=<optimized out>)
at /usr/src/debug/net-libs/libktorrent-23.08.5/libktorrent-23.08.5/src/torrent/torrentcontrol.cpp:124
#19 0x00007ffff7eec058 in qDeleteAll<QList<bt::TorrentInterface*>::const_iterator> (begin=..., end=...) at /usr/include/qt5/QtCore/qalgorithms.h:320
#20 0x00007ffff7eea9a8 in qDeleteAll<kt::QueuePtrList> (c=...) at /usr/include/qt5/QtCore/qalgorithms.h:328
#21 0x00007ffff7ee5562 in kt::QueueManager::~QueueManager (this=0x555555f8d780, __in_chrg=<optimized out>)
--Type <RET> for more, q to quit, c to continue without paging--
at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/libktcore/torrent/queuemanager.cpp:53
#22 0x00007ffff7ee55d2 in kt::QueueManager::~QueueManager (this=0x555555f8d780, __in_chrg=<optimized out>)
at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/libktcore/torrent/queuemanager.cpp:54
#23 0x00005555555a4701 in kt::Core::~Core (this=0x555555f89240, __in_chrg=<optimized out>)
at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/ktorrent/core.cpp:115
#24 0x00005555555a47bc in kt::Core::~Core (this=0x555555f89240, __in_chrg=<optimized out>)
at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/ktorrent/core.cpp:118
#25 0x00005555555b5cba in kt::GUI::~GUI (this=0x7fffffffd290, __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/ktorrent/gui.cpp:116
#26 0x00005555555a19fd in main (argc=1, argv=0x7fffffffd4f8) at /usr/src/debug/net-p2p/ktorrent-23.08.5/ktorrent-23.08.5/ktorrent/main.cpp:251
recompiled with -fsanitize=address -fsanitize=leak -O0 -march=native -ggdb3 . got this at roughlt 60 MiB/s download speed ==9516==ERROR: AddressSanitizer: out of memory: failed to allocate 0x1000 (4096) bytes of InternalMmapVector (error code: 12) ERROR: Failed to mmap I guess it somehow relates to the bug https://bugs.kde.org/show_bug.cgi?id=456666 Some really smart guys from IRC #gentoo said it can relate to kernel overcommiting https://www.kernel.org/doc/html/latest/mm/overcommit-accounting.html After # root : sysctl vm.overcommit_memory=1 I cannot get the problem |