This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[svn 553476] Crash on Startup

Tags: None
(comma "," separated)
imported4-Tomasu
Registered Member
Posts
302
Karma
0

[svn 553476] Crash on Startup

Wed Jun 21, 2006 7:56 am
This time I made sure to build with full debug info, and ran it in gdb, with the kde crash handler off (it cant seem to get debug info when ktorrent crashed, dunno why)

Code: Select all
moose@natasha ~/build/ktorrent $ gdb /usr/kde/3.5/bin/ktorrent
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run --debug --nofork --nocrashhandler --sync
Starting program: /usr/kde/3.5/bin/ktorrent --debug --nofork --nocrashhandler --sync

Program received signal SIGSEGV, Segmentation fault.
0xb7ef192a in bt::CacheFile::map (this=0x0, thing=0x8b687b8, off=203010385, size=2097152, mode=bt::CacheFile::RW) at cachefile.cpp:109
109                     if (fd == -1)
(gdb) bt
#0  0xb7ef192a in bt::CacheFile::map (this=0x0, thing=0x8b687b8, off=203010385, size=2097152, mode=bt::CacheFile::RW) at cachefile.cpp:109
#1  0xb7ed0f37 in bt::MultiFileCache::prep (this=0x8b2c978, c=0x8b687b8) at multifilecache.cpp:290
#2  0xb7e97470 in bt::ChunkManager::prepareChunk (this=0x8b2c8f0, c=0x8b687b8, allways=false) at chunkmanager.cpp:789
#3  0xb7ea9054 in bt::Downloader::loadDownloads (this=0x8b519a0, file=@0xbfd8b918) at downloader.cpp:538
#4  0xb7eb3a07 in bt::TorrentControl::start (this=0x8b2d1b8) at torrentcontrol.cpp:291
#5  0xb7ee860f in bt::QueueManager::startSafely (this=0x8302958, tc=0x8b2d1b8) at queuemanager.cpp:537
#6  0xb7ee97e3 in bt::QueueManager::start (this=0x8302958, tc=0x8b2d1b8, user=true) at queuemanager.cpp:106
#7  0xb7ee9c92 in bt::QueueManager::orderQueue (this=0x8302958) at queuemanager.cpp:391
#8  0x08076667 in KTorrentCore::loadTorrents (this=0x83027d0) at ktorrentcore.cpp:304
#9  0x08064975 in KTorrent (this=0x81de1b0) at ktorrent.cpp:195
#10 0x0807d54b in KTorrentApp::newInstance (this=0xbfd8c354) at ktorrentapp.cpp:66
#11 0xb779a921 in KUniqueApplication::newInstanceNoFork () from /usr/kde/3.5/lib/libkdecore.so.4
#12 0xbfd8c354 in ?? ()
#13 0xb7f86750 in _dl_make_stack_executable () from /lib/ld-linux.so.2
#14 0xb77a0db8 in KUniqueApplication::qt_invoke () from /usr/kde/3.5/lib/libkdecore.so.4
#15 0xbfd8c354 in ?? ()
#16 0xb7f86750 in _dl_make_stack_executable () from /lib/ld-linux.so.2
#17 0x0807d25d in KTorrentApp::qt_invoke (this=0xbfd8c354, _id=19, _o=0xbfd8be04) at ktorrentapp.moc:77
#18 0xb719cde9 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#19 0xb74c2b41 in QSignal::signal () from /usr/qt/3/lib/libqt-mt.so.3
#20 0xb71b8337 in QSignal::activate () from /usr/qt/3/lib/libqt-mt.so.3
#21 0xb71bf4d3 in QSingleShotTimer::event () from /usr/qt/3/lib/libqt-mt.so.3
#22 0xb713f8a7 in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3
#23 0xb7140501 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#24 0xb77acd7f in KApplication::notify () from /usr/kde/3.5/lib/libkdecore.so.4
#25 0xbfd8c354 in ?? ()
#26 0x081e2008 in ?? ()
#27 0xbfd8c124 in ?? ()
#28 0xb6f0bd89 in operator new () from /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/libstdc++.so.6
Previous frame inner to this frame (corrupt stack?)
(gdb) q
The program is running.  Exit anyway? (y or n) y
George
Moderator
Posts
5421
Karma
1

Wed Jun 21, 2006 5:41 pm
svn up

I just fixed this.
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Wed Jun 21, 2006 8:28 pm
Ok, seems to work now. I'll follow up with any more crashes I find.

:)
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Wed Jun 21, 2006 8:34 pm
Two issues, on startup I get allot of these:
QApplication::postEvent: Unexpected null receiver
QSocketNotifier: invalid socket 293 and type 'Read', disabling...


and On exit, ktorrent crashes, but not in gdb, which makes me think it might be some uninitilized variables, but I can't be sure. And ktorrent is taking forever to launch in valgrind...
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Wed Jun 21, 2006 8:42 pm
Ok, here we go, valgrind results:

Code: Select all
==28018== Syscall param socketcall.send(msg) points to uninitialised byte(s)
==28018==    at 0x40008B2: (within /lib/ld-2.4.so)
==28018==    by 0x40B5E7A: mse::StreamSocket::sendData(unsigned char const*, unsigned) (streamsocket.cpp:95)
==28018==    by 0x40B8724: mse::EncryptedServerAuthenticate::EncryptedServerAuthenticate(mse::StreamSocket*, bt::Server*) (encryptedserverauthenticate.cpp:48)
==28018==    by 0x411BD27: bt::Server::newConnection(int) (server.cpp:122)
==28018==    by 0x411CB58: bt::ServerSocket::newConnection(int) (server.cpp:53)
==28018==    by 0x4DF5D48: QServerSocket::incomingConnection(int) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4F652EB: QServerSocket::qt_invoke(int, QUObject*) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4C0CDE8: QObject::activate_signal(QConnectionList*, QUObject*) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4C0D4C1: QObject::activate_signal(int, int) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4F3399F: QSocketNotifier::activated(int) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4C2A48E: QSocketNotifier::event(QEvent*) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4BAF8A6: QApplication::internalNotify(QObject*, QEvent*) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==  Address 0xBEE2A3F0 is on thread 1's stack
==28018==
==28018== Use of uninitialised value of size 4
==28018==    at 0x4BDA46A: QIconSetPrivate::icon(QIconSet const*, QIconSet::Size, QIconSet::Mode, QIconSet::State) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4BDAFC8: QIconSet::pixmap(QIconSet::Size, QIconSet::Mode, QIconSet::State) const (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4668640: KToolBarButton::drawButton(QPainter*) (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Use of uninitialised value of size 4
==28018==    at 0x4BDA471: QIconSetPrivate::icon(QIconSet const*, QIconSet::Size, QIconSet::Mode, QIconSet::State) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4BDAFC8: QIconSet::pixmap(QIconSet::Size, QIconSet::Mode, QIconSet::State) const (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4668640: KToolBarButton::drawButton(QPainter*) (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Use of uninitialised value of size 4
==28018==    at 0x4BDA513: QIconSetPrivate::icon(QIconSet const*, QIconSet::Size, QIconSet::Mode, QIconSet::State) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4BDAFC8: QIconSet::pixmap(QIconSet::Size, QIconSet::Mode, QIconSet::State) const (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4668640: KToolBarButton::drawButton(QPainter*) (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Use of uninitialised value of size 4
==28018==    at 0x4BDA529: QIconSetPrivate::icon(QIconSet const*, QIconSet::Size, QIconSet::Mode, QIconSet::State) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4BDAFC8: QIconSet::pixmap(QIconSet::Size, QIconSet::Mode, QIconSet::State) const (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4668640: KToolBarButton::drawButton(QPainter*) (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Conditional jump or move depends on uninitialised value(s)
==28018==    at 0x48F0CEF: (within /usr/kde/3.5/lib/libkdecore.so.4.2.0)
==28018==
==28018== Use of uninitialised value of size 4
==28018==    at 0x48F0D6F: (within /usr/kde/3.5/lib/libkdecore.so.4.2.0)
==28018==
==28018== Use of uninitialised value of size 4
==28018==    at 0x4BDA552: QIconSetPrivate::icon(QIconSet const*, QIconSet::Size, QIconSet::Mode, QIconSet::State) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4BDAFC8: QIconSet::pixmap(QIconSet::Size, QIconSet::Mode, QIconSet::State) const (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4668640: KToolBarButton::drawButton(QPainter*) (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Use of uninitialised value of size 4
==28018==    at 0x4BDAFCC: QIconSet::pixmap(QIconSet::Size, QIconSet::Mode, QIconSet::State) const (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4668640: KToolBarButton::drawButton(QPainter*) (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Conditional jump or move depends on uninitialised value(s)
==28018==    at 0x4014A63: (within /lib/ld-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x4010CB3: (within /lib/ld-2.4.so)
==28018==    by 0x5594E3C: (within /lib/libdl-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x55952DB: (within /lib/libdl-2.4.so)
==28018==    by 0x5594D73: dlopen (in /lib/libdl-2.4.so)
==28018==    by 0x564A18F: open_object (in /usr/lib/libX11.so.6.2)
==28018==    by 0x62696C2E: ???
==28018==
==28018== Conditional jump or move depends on uninitialised value(s)
==28018==    at 0x4014A6E: (within /lib/ld-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x4010CB3: (within /lib/ld-2.4.so)
==28018==    by 0x5594E3C: (within /lib/libdl-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x55952DB: (within /lib/libdl-2.4.so)
==28018==    by 0x5594D73: dlopen (in /lib/libdl-2.4.so)
==28018==    by 0x564A18F: open_object (in /usr/lib/libX11.so.6.2)
==28018==    by 0x62696C2E: ???
==28018==
==28018== Conditional jump or move depends on uninitialised value(s)
==28018==    at 0x4014A79: (within /lib/ld-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x4010CB3: (within /lib/ld-2.4.so)
==28018==    by 0x5594E3C: (within /lib/libdl-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x55952DB: (within /lib/libdl-2.4.so)
==28018==    by 0x5594D73: dlopen (in /lib/libdl-2.4.so)
==28018==    by 0x564A18F: open_object (in /usr/lib/libX11.so.6.2)
==28018==    by 0x62696C2E: ???
==28018==
==28018== Conditional jump or move depends on uninitialised value(s)
==28018==    at 0x4014A84: (within /lib/ld-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x4010CB3: (within /lib/ld-2.4.so)
==28018==    by 0x5594E3C: (within /lib/libdl-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x55952DB: (within /lib/libdl-2.4.so)
==28018==    by 0x5594D73: dlopen (in /lib/libdl-2.4.so)
==28018==    by 0x564A18F: open_object (in /usr/lib/libX11.so.6.2)
==28018==    by 0x62696C2E: ???
==28018==
==28018== Invalid read of size 4
==28018==    at 0x4014B67: (within /lib/ld-2.4.so)
==28018==    by 0x400624D: (within /lib/ld-2.4.so)
==28018==    by 0x4007FCA: (within /lib/ld-2.4.so)
==28018==    by 0x40111E5: (within /lib/ld-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x4010CB3: (within /lib/ld-2.4.so)
==28018==    by 0x5594E3C: (within /lib/libdl-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x55952DB: (within /lib/libdl-2.4.so)
==28018==    by 0x5594D73: dlopen (in /lib/libdl-2.4.so)
==28018==    by 0x564A18F: open_object (in /usr/lib/libX11.so.6.2)
==28018==    by 0x62696C2E: ???
==28018==  Address 0x93DD6D4 is 44 bytes inside a block of size 47 alloc'd
==28018==    at 0x4021541: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==28018==    by 0x40075E4: (within /lib/ld-2.4.so)
==28018==    by 0x4007F12: (within /lib/ld-2.4.so)
==28018==    by 0x40111E5: (within /lib/ld-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x4010CB3: (within /lib/ld-2.4.so)
==28018==    by 0x5594E3C: (within /lib/libdl-2.4.so)
==28018==    by 0x400D3C5: (within /lib/ld-2.4.so)
==28018==    by 0x55952DB: (within /lib/libdl-2.4.so)
==28018==    by 0x5594D73: dlopen (in /lib/libdl-2.4.so)
==28018==    by 0x564A18F: open_object (in /usr/lib/libX11.so.6.2)
==28018==    by 0x62696C2E: ???
QApplication::postEvent: Unexpected null receiver
QApplication::postEvent: Unexpected null receiver
==28018==
==28018== Use of uninitialised value of size 4
==28018==    at 0x4BDA55B: QIconSetPrivate::icon(QIconSet const*, QIconSet::Size, QIconSet::Mode, QIconSet::State) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4BDAFC8: QIconSet::pixmap(QIconSet::Size, QIconSet::Mode, QIconSet::State) const (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4668640: KToolBarButton::drawButton(QPainter*) (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Conditional jump or move depends on uninitialised value(s)
==28018==    at 0x4BDB001: QIconSet::pixmap(QIconSet::Size, QIconSet::Mode, QIconSet::State) const (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4668640: KToolBarButton::drawButton(QPainter*) (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
QApplication::postEvent: Unexpected null receiver
==28018==
==28018== Syscall param write(buf) points to uninitialised byte(s)
==28018==    at 0x40008B2: (within /lib/ld-2.4.so)
==28018==    by 0x5239DCA: write (in /lib/libc-2.4.so)
==28018==    by 0x561D9ED: _X11TransSocketWrite (in /usr/lib/libX11.so.6.2)
==28018==  Address 0x573B544 is 28 bytes inside a block of size 16,384 alloc'd
==28018==    at 0x40207B7: calloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==28018==    by 0x55F264B: XOpenDisplay (in /usr/lib/libX11.so.6.2)
QApplication::postEvent: Unexpected null receiver
QApplication::postEvent: Unexpected null receiver
QApplication::postEvent: Unexpected null receiver
==28018==
==28018== Invalid write of size 4
==28018==    at 0x414772D: dht::Task::setListener(dht::TaskListener*) (task.cpp:58)
==28018==    by 0x4147787: dht::TaskListener::~TaskListener() (task.cpp:33)
==28018==    by 0x414D3EC: dht::DHTTrackerBackend::~DHTTrackerBackend() (dhttrackerbackend.cpp:44)
==28018==    by 0x40E1BD7: bt::Tracker::~Tracker() (tracker.cpp:71)
==28018==    by 0x40EDBDC: bt::TorrentControl::~TorrentControl() (torrentcontrol.cpp:114)
==28018==    by 0x80796DD: QPtrList<kt::TorrentInterface>::deleteItem(void*) (qptrlist.h:150)
==28018==    by 0x4EB2B7C: QGList::clear() (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x80789D4: QPtrList<kt::TorrentInterface>::clear() (qptrlist.h:93)
==28018==    by 0x412648A: bt::QueueManager::clear() (queuemanager.cpp:74)
==28018==    by 0x8073DEF: KTorrentCore::onExit() (ktorrentcore.cpp:372)
==28018==    by 0x8061CA9: KTorrent::queryExit() (ktorrent.cpp:476)
==28018==    by 0x45A0DCD: KMainWindow::shuttingDown() (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==  Address 0x92D500C is 60 bytes inside a block of size 116 free'd
==28018==    at 0x4020E29: operator delete(void*) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==28018==    by 0x414B18F: dht::AnnounceTask::~AnnounceTask() (announcetask.cpp:37)
==28018==    by 0x414B06B: QPtrList<dht::Task>::deleteItem(void*) (qptrlist.h:150)
==28018==    by 0x4EB2B7C: QGList::clear() (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x41496B6: QPtrList<dht::Task>::clear() (qptrlist.h:93)
==28018==    by 0x41496E9: QPtrList<dht::Task>::~QPtrList() (qptrlist.h:70)
==28018==    by 0x4148C58: dht::TaskManager::~TaskManager() (taskmanager.cpp:42)
==28018==    by 0x413D1D3: dht::DHT::stop() (dht.cpp:83)
==28018==    by 0x8061C98: KTorrent::queryExit() (ktorrent.cpp:474)
==28018==    by 0x45A0DCD: KMainWindow::shuttingDown() (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Invalid read of size 4
==28018==    at 0x4147733: dht::Task::setListener(dht::TaskListener*) (task.cpp:59)
==28018==    by 0x4147787: dht::TaskListener::~TaskListener() (task.cpp:33)
==28018==    by 0x414D3EC: dht::DHTTrackerBackend::~DHTTrackerBackend() (dhttrackerbackend.cpp:44)
==28018==    by 0x40E1BD7: bt::Tracker::~Tracker() (tracker.cpp:71)
==28018==    by 0x40EDBDC: bt::TorrentControl::~TorrentControl() (torrentcontrol.cpp:114)
==28018==    by 0x80796DD: QPtrList<kt::TorrentInterface>::deleteItem(void*) (qptrlist.h:150)
==28018==    by 0x4EB2B7C: QGList::clear() (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x80789D4: QPtrList<kt::TorrentInterface>::clear() (qptrlist.h:93)
==28018==    by 0x412648A: bt::QueueManager::clear() (queuemanager.cpp:74)
==28018==    by 0x8073DEF: KTorrentCore::onExit() (ktorrentcore.cpp:372)
==28018==    by 0x8061CA9: KTorrent::queryExit() (ktorrent.cpp:476)
==28018==    by 0x45A0DCD: KMainWindow::shuttingDown() (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==  Address 0x92D500C is 60 bytes inside a block of size 116 free'd
==28018==    at 0x4020E29: operator delete(void*) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==28018==    by 0x414B18F: dht::AnnounceTask::~AnnounceTask() (announcetask.cpp:37)
==28018==    by 0x414B06B: QPtrList<dht::Task>::deleteItem(void*) (qptrlist.h:150)
==28018==    by 0x4EB2B7C: QGList::clear() (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x41496B6: QPtrList<dht::Task>::clear() (qptrlist.h:93)
==28018==    by 0x41496E9: QPtrList<dht::Task>::~QPtrList() (qptrlist.h:70)
==28018==    by 0x4148C58: dht::TaskManager::~TaskManager() (taskmanager.cpp:42)
==28018==    by 0x413D1D3: dht::DHT::stop() (dht.cpp:83)
==28018==    by 0x8061C98: KTorrent::queryExit() (ktorrent.cpp:474)
==28018==    by 0x45A0DCD: KMainWindow::shuttingDown() (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Invalid read of size 4
==28018==    at 0x8071E47: KTorrentViewItem::paintCell(QPainter*, QColorGroup const&, int, int, int) (ktorrentviewitem.cpp:219)
==28018==    by 0x4CEB162: QListView::drawContentsOffset(QPainter*, int, int, int, int, int, int) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4D1878E: QScrollView::viewportPaintEvent(QPaintEvent*) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x45EC441: KListView::viewportPaintEvent(QPaintEvent*) (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==  Address 0x70CA818 is 136 bytes inside a block of size 376 free'd
==28018==    at 0x4020E29: operator delete(void*) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==28018==    by 0x40EDE1B: bt::TorrentControl::~TorrentControl() (torrentcontrol.cpp:116)
==28018==    by 0x80796DD: QPtrList<kt::TorrentInterface>::deleteItem(void*) (qptrlist.h:150)
==28018==    by 0x4EB2B7C: QGList::clear() (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x80789D4: QPtrList<kt::TorrentInterface>::clear() (qptrlist.h:93)
==28018==    by 0x412648A: bt::QueueManager::clear() (queuemanager.cpp:74)
==28018==    by 0x8073DEF: KTorrentCore::onExit() (ktorrentcore.cpp:372)
==28018==    by 0x8061CA9: KTorrent::queryExit() (ktorrent.cpp:476)
==28018==    by 0x45A0DCD: KMainWindow::shuttingDown() (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Syscall param write(buf) points to uninitialised byte(s)
==28018==    at 0x40008B2: (within /lib/ld-2.4.so)
==28018==    by 0x5239DCA: write (in /lib/libc-2.4.so)
==28018==    by 0x56AC28D: _IceTransSocketWrite (in /usr/lib/libICE.so.6.3)
==28018==  Address 0x5FC9354 is 12 bytes inside a block of size 1,024 alloc'd
==28018==    at 0x40207B7: calloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==28018==    by 0x56A172D: IceOpenConnection (in /usr/lib/libICE.so.6.3)
==28018==
==28018== ERROR SUMMARY: 11557 errors from 95 contexts (suppressed: 157 from 1)
==28018== malloc/free: in use at exit: 1,905,487 bytes in 35,902 blocks.
==28018== malloc/free: 2,712,717 allocs, 2,676,815 frees, 214,518,429 bytes allocated.
==28018== For counts of detected errors, rerun with: -v
==28018== searching for pointers to 35,902 not-freed blocks.
==28018== checked 11,606,508 bytes.
==28018==
==28018== LEAK SUMMARY:
==28018==    definitely lost: 224,056 bytes in 4,704 blocks.
==28018==      possibly lost: 1,044 bytes in 6 blocks.
==28018==    still reachable: 1,680,387 bytes in 31,192 blocks.
==28018==         suppressed: 0 bytes in 0 blocks.
==28018== Use --leak-check=full to see details of leaked memory.
George
Moderator
Posts
5421
Karma
1

Thu Jun 22, 2006 6:07 pm
Running KT in valgrind is very slow (most apps are very slow in valgrind)

Those postEvent messages, I still need to look into it.
As for the socket stuff, just ignore it, probably the other side closing the connection.
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Thu Jun 22, 2006 11:41 pm
so far ktorrent is the slowest I've ever seen in valgrind.

How about the invalid reads and writes in the dht code?
ie:
Code: Select all
==28018== Invalid write of size 4
==28018==    at 0x414772D: dht::Task::setListener(dht::TaskListener*) (task.cpp:58)
==28018==    by 0x4147787: dht::TaskListener::~TaskListener() (task.cpp:33)
==28018==    by 0x414D3EC: dht::DHTTrackerBackend::~DHTTrackerBackend() (dhttrackerbackend.cpp:44)
==28018==    by 0x40E1BD7: bt::Tracker::~Tracker() (tracker.cpp:71)
==28018==    by 0x40EDBDC: bt::TorrentControl::~TorrentControl() (torrentcontrol.cpp:114)
==28018==    by 0x80796DD: QPtrList<kt::TorrentInterface>::deleteItem(void*) (qptrlist.h:150)
==28018==    by 0x4EB2B7C: QGList::clear() (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x80789D4: QPtrList<kt::TorrentInterface>::clear() (qptrlist.h:93)
==28018==    by 0x412648A: bt::QueueManager::clear() (queuemanager.cpp:74)
==28018==    by 0x8073DEF: KTorrentCore::onExit() (ktorrentcore.cpp:372)
==28018==    by 0x8061CA9: KTorrent::queryExit() (ktorrent.cpp:476)
==28018==    by 0x45A0DCD: KMainWindow::shuttingDown() (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==  Address 0x92D500C is 60 bytes inside a block of size 116 free'd
==28018==    at 0x4020E29: operator delete(void*) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==28018==    by 0x414B18F: dht::AnnounceTask::~AnnounceTask() (announcetask.cpp:37)
==28018==    by 0x414B06B: QPtrList<dht::Task>::deleteItem(void*) (qptrlist.h:150)
==28018==    by 0x4EB2B7C: QGList::clear() (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x41496B6: QPtrList<dht::Task>::clear() (qptrlist.h:93)
==28018==    by 0x41496E9: QPtrList<dht::Task>::~QPtrList() (qptrlist.h:70)
==28018==    by 0x4148C58: dht::TaskManager::~TaskManager() (taskmanager.cpp:42)
==28018==    by 0x413D1D3: dht::DHT::stop() (dht.cpp:83)
==28018==    by 0x8061C98: KTorrent::queryExit() (ktorrent.cpp:474)
==28018==    by 0x45A0DCD: KMainWindow::shuttingDown() (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Invalid read of size 4
==28018==    at 0x4147733: dht::Task::setListener(dht::TaskListener*) (task.cpp:59)
==28018==    by 0x4147787: dht::TaskListener::~TaskListener() (task.cpp:33)
==28018==    by 0x414D3EC: dht::DHTTrackerBackend::~DHTTrackerBackend() (dhttrackerbackend.cpp:44)
==28018==    by 0x40E1BD7: bt::Tracker::~Tracker() (tracker.cpp:71)
==28018==    by 0x40EDBDC: bt::TorrentControl::~TorrentControl() (torrentcontrol.cpp:114)
==28018==    by 0x80796DD: QPtrList<kt::TorrentInterface>::deleteItem(void*) (qptrlist.h:150)
==28018==    by 0x4EB2B7C: QGList::clear() (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x80789D4: QPtrList<kt::TorrentInterface>::clear() (qptrlist.h:93)
==28018==    by 0x412648A: bt::QueueManager::clear() (queuemanager.cpp:74)
==28018==    by 0x8073DEF: KTorrentCore::onExit() (ktorrentcore.cpp:372)
==28018==    by 0x8061CA9: KTorrent::queryExit() (ktorrent.cpp:476)
==28018==    by 0x45A0DCD: KMainWindow::shuttingDown() (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==  Address 0x92D500C is 60 bytes inside a block of size 116 free'd
==28018==    at 0x4020E29: operator delete(void*) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==28018==    by 0x414B18F: dht::AnnounceTask::~AnnounceTask() (announcetask.cpp:37)
==28018==    by 0x414B06B: QPtrList<dht::Task>::deleteItem(void*) (qptrlist.h:150)
==28018==    by 0x4EB2B7C: QGList::clear() (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x41496B6: QPtrList<dht::Task>::clear() (qptrlist.h:93)
==28018==    by 0x41496E9: QPtrList<dht::Task>::~QPtrList() (qptrlist.h:70)
==28018==    by 0x4148C58: dht::TaskManager::~TaskManager() (taskmanager.cpp:42)
==28018==    by 0x413D1D3: dht::DHT::stop() (dht.cpp:83)
==28018==    by 0x8061C98: KTorrent::queryExit() (ktorrent.cpp:474)
==28018==    by 0x45A0DCD: KMainWindow::shuttingDown() (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==
==28018== Invalid read of size 4
==28018==    at 0x8071E47: KTorrentViewItem::paintCell(QPainter*, QColorGroup const&, int, int, int) (ktorrentviewitem.cpp:219)
==28018==    by 0x4CEB162: QListView::drawContentsOffset(QPainter*, int, int, int, int, int, int) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x4D1878E: QScrollView::viewportPaintEvent(QPaintEvent*) (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x45EC441: KListView::viewportPaintEvent(QPaintEvent*) (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)
==28018==  Address 0x70CA818 is 136 bytes inside a block of size 376 free'd
==28018==    at 0x4020E29: operator delete(void*) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==28018==    by 0x40EDE1B: bt::TorrentControl::~TorrentControl() (torrentcontrol.cpp:116)
==28018==    by 0x80796DD: QPtrList<kt::TorrentInterface>::deleteItem(void*) (qptrlist.h:150)
==28018==    by 0x4EB2B7C: QGList::clear() (in /usr/qt/3/lib/libqt-mt.so.3.3.4)
==28018==    by 0x80789D4: QPtrList<kt::TorrentInterface>::clear() (qptrlist.h:93)
==28018==    by 0x412648A: bt::QueueManager::clear() (queuemanager.cpp:74)
==28018==    by 0x8073DEF: KTorrentCore::onExit() (ktorrentcore.cpp:372)
==28018==    by 0x8061CA9: KTorrent::queryExit() (ktorrent.cpp:476)
==28018==    by 0x45A0DCD: KMainWindow::shuttingDown() (in /usr/kde/3.5/lib/libkdeui.so.4.2.0)


That seems to coincide with the crashes I've seen on exiting ktorrent. (I recall hearing that other people I talk to have the same crash on exit, and one mentioned that stopping torrents before exiting helps, don't know for sure though)

Though since that last svn up I did, it hasn't crashed at runtime, which is good. I do believe it still crashes on exit, but not in gdb, and kde's crash dialog never returns valid info when ktorrent crashes.
George
Moderator
Posts
5421
Karma
1

Fri Jun 23, 2006 5:08 pm
This weekend, DHT will be seriously tested, with some luck I should be able to fix most issues with the DHT.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]