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

[SVN 560680] Crash

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

[SVN 560680] Crash

Tue Jul 11, 2006 4:08 am
Code: Select all
(gdb) run --nofork --debug
Starting program: /usr/kde/3.5/bin/ktorrent --nofork --debug

Program received signal SIG42, Real-time event 42.
0xb7e72910 in Packet (this=0x8b1fab0, index=17246, begin=212992, len=16384, ch=0x853a0c8) at packet.cpp:86
86                      memcpy(data+13,ch->getData() + begin,len);
(gdb) bt
#0  0xb7e72910 in Packet (this=0x8b1fab0, index=17246, begin=212992, len=16384, ch=0x853a0c8) at packet.cpp:86
#1  0xb7e719a4 in bt::PacketWriter::sendChunk (this=0x8ca6ef0, index=17246, begin=212992, len=16384, ch=0x853a0c8) at packetwriter.cpp:168
#2  0xb7e6fc39 in bt::PeerUploader::update (this=0x8b61e70, cman=@0x8479730, opt_unchoked=67) at peeruploader.cpp:99
#3  0xb7e57a7e in bt::Uploader::update (this=0x8547d78, opt_unchoked=67) at uploader.cpp:49
#4  0xb7e5e459 in bt::TorrentControl::update (this=0x84831c8) at torrentcontrol.cpp:138
#5  0x08075737 in KTorrentCore::update (this=0x82e2ae0) at ktorrentcore.cpp:466
#6  0x0807618f in KTorrentCore::qt_invoke (this=0x82e2ae0, _id=4, _o=0xbf90c0a8) at ktorrentcore.moc:228
#7  0xb7045349 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#8  0xb7045b1d in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#9  0xb737e9d9 in QTimer::timeout () from /usr/qt/3/lib/libqt-mt.so.3
#10 0xb706847e in QTimer::event () from /usr/qt/3/lib/libqt-mt.so.3
#11 0xb6fe5c27 in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3
#12 0xb6fe68b1 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#13 0xb76427aa in KApplication::notify () from /usr/kde/3.5/lib/libkdecore.so.4
#14 0xbf90c550 in ?? ()
#15 0x082e2b18 in ?? ()
#16 0xbf90c344 in ?? ()
#17 0xb7d62959 in operator new () from /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/libstdc++.so.6
#18 0xb6f9499e in QEventLoop::processEvents () from /usr/qt/3/lib/libqt-mt.so.3
#19 0xb6ffc480 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#20 0xb6ffc386 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3
#21 0xb6fe57cf in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3
#22 0x0805f7c1 in main (argc=3, argv=0xbf90c714) at main.cpp:115


DHT on, Encryption on, no unencrypted connections allowed.
George
Moderator
Posts
5421
Karma
1

Tue Jul 11, 2006 8:09 am
If you do continue what happens ? Not all signals result in crashes.
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Tue Jul 11, 2006 10:21 am
I can try it again, though it had crashed several times prior.
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Tue Jul 11, 2006 11:01 am
Real crash this time, I promise!

Code: Select all
(gdb) run --debug --nofork
Starting program: /usr/kde/3.5/bin/ktorrent --debug --nofork
*** glibc detected *** ktorrent: malloc(): memory corruption: 0x08dbc098 ***
======= Backtrace: =========
/lib/libc.so.6[0xb6cf4312]
/lib/libc.so.6[0xb6cf6254]
/lib/libc.so.6(malloc+0x7d)[0xb6cf7b7d]
/usr/lib/libgmp.so.3(__gmp_default_allocate+0x22)[0xb6c675d2]
/usr/kde/3.5/lib/libktorrent.so.0(_ZN3mse6BigInt10fromBufferEPKhj+0x28)[0xb7e3b9d8]
/usr/kde/3.5/lib/libktorrent.so.0(_ZN3mse27EncryptedServerAuthenticate8handleYAEv+0x32)[0xb7e4020e]
/usr/kde/3.5/lib/libktorrent.so.0(_ZN3mse27EncryptedServerAuthenticate11onReadyReadEv+0x161)[0xb7e40441]
/usr/kde/3.5/lib/libktorrent.so.0(_ZN2bt21AuthenticationMonitor6updateEv+0x340)[0xb7eb74f4]
/usr/kde/3.5/lib/libktorrent.so.0(_ZN2bt6Server6updateEv+0x1f)[0xb7ea4149]
ktorrent[0x80756e1]
ktorrent[0x807618f]
/usr/qt/3/lib/libqt-mt.so.3(_ZN7QObject15activate_signalEP15QConnectionListP8QUObject+0x169)[0xb705e349]
/usr/qt/3/lib/libqt-mt.so.3(_ZN7QObject15activate_signalEi+0xbd)[0xb705eb1d]
/usr/qt/3/lib/libqt-mt.so.3(_ZN6QTimer7timeoutEv+0x29)[0xb73979d9]
/usr/qt/3/lib/libqt-mt.so.3(_ZN6QTimer5eventEP6QEvent+0x3e)[0xb708147e]
/usr/qt/3/lib/libqt-mt.so.3(_ZN12QApplication14internalNotifyEP7QObjectP6QEvent+0x97)[0xb6ffec27]
/usr/qt/3/lib/libqt-mt.so.3(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x71)[0xb6fff8b1]
/usr/kde/3.5/lib/libkdecore.so.4(_ZN12KApplication6notifyEP7QObjectP6QEvent+0x20a)[0xb765b7aa]
/usr/qt/3/lib/libqt-mt.so.3(_ZN10QEventLoop13processEventsEj+0x58e)[0xb6fad99e]
/usr/qt/3/lib/libqt-mt.so.3(_ZN10QEventLoop9enterLoopEv+0xb9)[0xb7015499]
/usr/qt/3/lib/libqt-mt.so.3(_ZN10QEventLoop4execEv+0x26)[0xb7015386]
/usr/qt/3/lib/libqt-mt.so.3(_ZN12QApplication4execEv+0x1f)[0xb6ffe7cf]
ktorrent(_ZN6QFrame10paintEventEP11QPaintEvent+0x449)[0x805f7c1]
/lib/libc.so.6(__libc_start_main+0xdc)[0xb6ca782c]
ktorrent(_ZN6QFrame10paintEventEP11QPaintEvent+0x39)[0x805f3b1]
======= Memory map: ========
<snip>
Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb6cba5c0 in raise () from /lib/libc.so.6
#2  0xb6cbbc20 in abort () from /lib/libc.so.6
#3  0xb6ceeb27 in __fsetlocking () from /lib/libc.so.6
#4  0xb6cf4312 in malloc_usable_size () from /lib/libc.so.6
#5  0xb6cf6254 in free () from /lib/libc.so.6
#6  0xb6cf7b7d in malloc () from /lib/libc.so.6
#7  0xb6c675d2 in __gmp_default_allocate () from /usr/lib/libgmp.so.3
#8  0x00000060 in ?? ()
#9  0xb6dab120 in __after_morecore_hook () from /lib/libc.so.6
#10 0x082558a8 in ?? ()
#11 0xbff6a398 in ?? ()
#12 0xb6cf5952 in free () from /lib/libc.so.6
#13 0xb7e3b9d8 in mse::BigInt::fromBuffer (buf=0x8dbbaac "\023BitTorrent protocol", size=96) at bigint.cpp:95
#14 0xb7e4020e in mse::EncryptedServerAuthenticate::handleYA (this=0x8dbb988) at encryptedserverauthenticate.cpp:61
#15 0xb7e40441 in mse::EncryptedServerAuthenticate::onReadyRead (this=0x8dbb988) at encryptedserverauthenticate.cpp:276
#16 0xb7eb74f4 in bt::AuthenticationMonitor::update (this=0xb7f39df4) at authenticationmonitor.cpp:112
#17 0xb7ea4149 in bt::Server::update (this=0x82e1518) at server.cpp:176
#18 0x080756e1 in KTorrentCore::update (this=0x82e2918) at ktorrentcore.cpp:457
#19 0x0807618f in KTorrentCore::qt_invoke (this=0x82e2918, _id=4, _o=0xbff6a708) at ktorrentcore.moc:228
#20 0xb705e349 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#21 0xb705eb1d in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#22 0xb73979d9 in QTimer::timeout () from /usr/qt/3/lib/libqt-mt.so.3
#23 0xb708147e in QTimer::event () from /usr/qt/3/lib/libqt-mt.so.3
#24 0xb6ffec27 in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3
#25 0xb6fff8b1 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#26 0xb765b7aa in KApplication::notify () from /usr/kde/3.5/lib/libkdecore.so.4
#27 0xbff6abb0 in ?? ()
#28 0x082e2950 in ?? ()
#29 0xbff6a9a4 in ?? ()
#30 0xb7d7b959 in operator new () from /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/libstdc++.so.6
#31 0xb6fad99e in QEventLoop::processEvents () from /usr/qt/3/lib/libqt-mt.so.3
#32 0xb7015499 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#33 0xb7015386 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3
#34 0xb6ffe7cf in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3
#35 0x0805f7c1 in main (argc=3, argv=0xbff6ad74) at main.cpp:115
stoeptegel
Registered Member
Posts
1075
Karma
0

Re: [SVN 560680] Crash

Tue Jul 11, 2006 3:32 pm
Tomasu wrote:DHT on, Encryption on, no unencrypted connections allowed.


Running 2 days here with no problem. This is with "unencrypted connections allowed".
I suspect the problem is in here, i'll try the same setting as Tomasu and see what happens.

EDIT
I can't seem to get it to crash here.
George
Moderator
Posts
5421
Karma
1

Tue Jul 11, 2006 5:58 pm
It crashes in gmp which is used to handle really big integers (needed during setup of an encrypted connection).

The stuff we provide gmp should be OK.
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Tue Jul 11, 2006 9:22 pm
Somewhere someone is writing past the beginning/end of an allocated block. I'll try running it in valgrind to see where the problem occurs.
George
Moderator
Posts
5421
Karma
1

Wed Jul 12, 2006 8:27 am
OK, I have added a safety check which should prevent this.
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Wed Jul 12, 2006 9:03 am
Thanks. I got tired of waiting for ktorrent to actually do anything this time under valgrind. Last time I tried it, it was slower, but not this slow :o

svn up'ing I go.
George
Moderator
Posts
5421
Karma
1

Wed Jul 12, 2006 9:55 am
Tomasu wrote:Thanks. I got tired of waiting for ktorrent to actually do anything this time under valgrind. Last time I tried it, it was slower, but not this slow :o

svn up'ing I go.


Valgrind is bound to be slower on KT, most GUI apps have nothing running in the background, and just sleep most of the time waiting for the user to do something.

KT continuously has a thread receiving and sending data, Stuff continuously gets updated ...
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Wed Jul 12, 2006 10:46 am
Valgrind is bound to be slower on KT
Yup. But the last I tried ktorrent under valgrind it was at least usable and managed to start downloading and stuff. This time however, it only managed to load up DHT, and redraw the gui every few seconds (not just the list, but the entire gui). And that was after hours of having it running.


Bookmarks



Who is online

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