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

ktorrent won't start

Tags: None
(comma "," separated)
KyferEz
Registered Member
Posts
32
Karma
0

ktorrent won't start

Tue May 05, 2009 11:54 pm
Ok, I did some searching and found that ktorrent not starting can be from the settings getting fubared. So I did a test and renamed the /home/user/.kde/share/apps/ktorrent folder to a different name, and ktorrent started fine.

However, it doesn't have the files I was downloading now. How do I get them back? I assume the torxx folder are these, but obviously one or more of them is keeping ktorrent from loading, so what do I do?
stoeptegel
Registered Member
Posts
1075
Karma
0

Wed May 06, 2009 9:44 am
Well, i do not know why it is working now after you have renamed it, but normally ktorrent looks information like statics and other torrent information up in it own folder. So for KTorrent to work you should rename this folder it to it's own folder so KTorrent can look up which torrent should be loaded for example.
KyferEz
Registered Member
Posts
32
Karma
0

Wed May 06, 2009 3:34 pm
After I renamed the folder and started ktorrent, ktorrent automatically recreated the missing folder.

I have tried moving the torxx files from the old folder to the new one, it prevents ktorrent from starting again. Actually, I noticed in the logs that it does start, but dies without an error.
George
Moderator
Posts
5421
Karma
1

Sat May 09, 2009 10:13 am
Then one of your tor directories is **** up.

You can try moving them one by one to find the troubled one. Then send the one which is causing problems to me, so I can have a look at what is going on.
KyferEz
Registered Member
Posts
32
Karma
0

Fri May 15, 2009 7:28 pm
Ok, found the bad torrent. Where do I send it to?

On another note: My PC has not been crashing while ktorrent wasn't running, which also means kde wasn't running.
George
Moderator
Posts
5421
Karma
1

Sun May 17, 2009 10:33 am
KyferEz wrote:Ok, found the bad torrent. Where do I send it to?

On another note: My PC has not been crashing while ktorrent wasn't running, which also means kde wasn't running.


joris DOT guisson AT gmail DOT com
KyferEz
Registered Member
Posts
32
Karma
0

Mon May 18, 2009 4:17 pm
sent, thx
George
Moderator
Posts
5421
Karma
1

Tue May 19, 2009 8:31 am
Trying that with both latest stable and latest trunk code, does not prevent KT from starting up.

What exactly happens when you start up ? Do you get a crash dialog ? Also, what version are you running ?
KyferEz
Registered Member
Posts
32
Karma
0

Tue May 19, 2009 3:40 pm
I've installed 3.2.1 and that file does indeed still cause ktorrent to crash.

Here's how it crashes:
It writes a log file and quietly exits with no error messages. It never shows the tray icon.

I'm going to send my whole ktorrent directory. Maybe that will help.
George
Moderator
Posts
5421
Karma
1

Fri May 22, 2009 9:23 am
Just tried your entire ktorrent directory, and I don't get a crash or an exit or anything else.

Can you run ktorrent in gdb ?

gdb /usr/bin/ktorrent

> run --nofork

If you get something like a SIGSEGV or SIGABRT run the bt command to get a backtrace.
KyferEz
Registered Member
Posts
32
Karma
0

Fri May 22, 2009 10:32 pm
Here's what I got
Code: Select all
user@LinuxOnGX280:~$ gdb /usr/bin/ktorrent
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run --nofork
Starting program: /usr/bin/ktorrent --nofork
[Thread debugging using libthread_db enabled]
[New Thread 0xb58f26c0 (LWP 14029)]
[New Thread 0xb4313b90 (LWP 14032)]
[Thread 0xb4313b90 (LWP 14032) exited]

Program received signal SIGBUS, Bus error.
[Switching to Thread 0xb58f26c0 (LWP 14029)]
0xb6649bb6 in memcpy () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb6649bb6 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1  0x0b083bb0 in ?? ()
#2  0xb64eaa4c in QCA::SecureArray::SecureArray () from /usr/lib/libqca.so.2
#3  0xb65026a7 in QCA::Hash::update () from /usr/lib/libqca.so.2
#4  0xb6502738 in QCA::Hash::update () from /usr/lib/libqca.so.2
#5  0xb7eb417a in bt::SHA1HashGen::update (this=0xb07be6c,
    data=0xb3b00000 <Address 0xb3b00000 out of bounds>, len=16384)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libbtcore/util/sha1hashgen.cpp:238
#6  0xb7eec4aa in bt::ChunkDownload::updateHash (this=0xb07bde8)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libbtcore/download/chunkdownload.cpp:562
#7  0xb7eec78a in bt::ChunkDownload::load (this=0xb07bde8, file=@0xbf8dcf60,
    hdr=@0xbf8dcf54, update_hash=true)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libbtcore/download/chunkdownload.cpp:476
#8  0xb7ef48b5 in bt::Downloader::loadDownloads (this=0xaa860c0,
    file=@0xbf8dcfd4)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libbtcore/download/downloader.cpp:600
#9  0xb7f181b2 in bt::TorrentControl::continueStart (this=0xaa7b0f8)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libbtcore/torrent/torrentcontrol.cpp:408
---Type <return> to continue, or q <return> to quit---Quit
(gdb)
#0  0xb6649bb6 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1  0x0b083bb0 in ?? ()
#2  0xb64eaa4c in QCA::SecureArray::SecureArray () from /usr/lib/libqca.so.2
#3  0xb65026a7 in QCA::Hash::update () from /usr/lib/libqca.so.2
#4  0xb6502738 in QCA::Hash::update () from /usr/lib/libqca.so.2
#5  0xb7eb417a in bt::SHA1HashGen::update (this=0xb07be6c,
    data=0xb3b00000 <Address 0xb3b00000 out of bounds>, len=16384)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libbtcore/util/sha1hashgen.cpp:238
#6  0xb7eec4aa in bt::ChunkDownload::updateHash (this=0xb07bde8)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libbtcore/download/chunkdownload.cpp:562
#7  0xb7eec78a in bt::ChunkDownload::load (this=0xb07bde8, file=@0xbf8dcf60,
    hdr=@0xbf8dcf54, update_hash=true)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libbtcore/download/chunkdownload.cpp:476
#8  0xb7ef48b5 in bt::Downloader::loadDownloads (this=0xaa860c0,
    file=@0xbf8dcfd4)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libbtcore/download/downloader.cpp:600
#9  0xb7f181b2 in bt::TorrentControl::continueStart (this=0xaa7b0f8)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libbtcore/torrent/torrentcontrol.cpp:408
---Type <return> to continue, or q <return> to quit---
#10 0xb7f1887d in bt::TorrentControl::start (this=0xaa7b0f8)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libbtcore/torrent/torrentcontrol.cpp:398
#11 0xb7e3c685 in kt::QueueManager::startSafely (this=0xa03f5b0, tc=0xaa7b0f8)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libktcore/torrent/queuemanager.cpp:722
#12 0xb7e3ea67 in kt::QueueManager::startInternal (this=0xa03f5b0,
    tc=0xaa7b0f8, user=false)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libktcore/torrent/queuemanager.cpp:149
#13 0xb7e3f47f in kt::QueueManager::orderQueue (this=0xa03f5b0)
    at /home/user/Desktop/filez/ktorrent-3.2.1/libktcore/torrent/queuemanager.cpp:552
#14 0x0806d54e in kt::Core::loadTorrents (this=0xa040b10)
    at /home/user/Desktop/filez/ktorrent-3.2.1/ktorrent/core.cpp:658
#15 0x0807bf93 in GUI (this=0x9ffbbb0)
    at /home/user/Desktop/filez/ktorrent-3.2.1/ktorrent/gui.cpp:99
#16 0x0807d3f9 in kt::App::newInstance (this=0xbf8ddb2c)
    at /home/user/Desktop/filez/ktorrent-3.2.1/ktorrent/app.cpp:52
#17 0xb799bc30 in KUniqueApplication::Private::_k_newInstanceNoFork ()
   from /usr/lib/libkdeui.so.5
#18 0xb799bca8 in KUniqueApplication::qt_metacall ()
   from /usr/lib/libkdeui.so.5
---Type <return> to continue, or q <return> to quit---
#19 0xb72cca60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#20 0xb72cd7e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#21 0xb72d2db7 in ?? () from /usr/lib/libQtCore.so.4
#22 0xb72d2edc in ?? () from /usr/lib/libQtCore.so.4
#23 0xb72c753f in QObject::event () from /usr/lib/libQtCore.so.4
#24 0xb69a88ec in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#25 0xb69b072e in QApplication::notify () from /usr/lib/libQtGui.so.4
#26 0xb79942ad in KApplication::notify () from /usr/lib/libkdeui.so.5
#27 0xb72b7e61 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#28 0xb72e5d81 in ?? () from /usr/lib/libQtCore.so.4
#29 0xb72e2520 in ?? () from /usr/lib/libQtCore.so.4
#30 0xb5cf1718 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#31 0xb5cf4dc3 in ?? () from /usr/lib/libglib-2.0.so.0
#32 0xb5cf4f81 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#33 0xb72e2478 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#34 0xb6a42ea5 in ?? () from /usr/lib/libQtGui.so.4
#35 0xb72b652a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#36 0xb72b66ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#37 0xb72b8da5 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#38 0xb69a8767 in QApplication::exec () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#39 0x08064f99 in main (argc=2, argv=0xbf8ddeb4)
    at /home/user/Desktop/filez/ktorrent-3.2.1/ktorrent/main.cpp:170
(gdb)
George
Moderator
Posts
5421
Karma
1

Sat May 23, 2009 8:57 am
For some reason ktorrent is trying to access the data of a chunk which lies outside the current size of the file. This results in a SIGBUS.

That file must have been truncated by something else. KT will ensure that the file is big enough, so that this doesn't happen.

I'm gonna add a check for situations like this, and enlarge the file if is necessary.

As a workaround I suggest you delete the current_chunks file of that torrent (located in the tor directory of the torrent). This will result in some data loss of all the chunks which were being downloaded of that torrent, but it will allow KT to start up again.
George
Moderator
Posts
5421
Karma
1

Sat May 23, 2009 9:12 am
Had a closer look at the code, and the file should always be resized in situations like this, and if that doesn't succeed you should get an error.

Strange, something weird going on.
KyferEz
Registered Member
Posts
32
Karma
0

Sat May 23, 2009 6:55 pm
Deleted current_chunks from tor32 and it started no problem. Thanks.

Now if we could just figure out why it crashes all the time. It just dies without any error messages after a few minutes to an hour.
stoeptegel
Registered Member
Posts
1075
Karma
0

Re: ktorrent won't start

Fri Sep 18, 2009 2:56 pm
s-p-a-m :|


Bookmarks



Who is online

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