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

Crash on Multi Files

Tags: None
(comma "," separated)
weyerma
Registered Member
Posts
5
Karma
0

Crash on Multi Files

Tue Apr 29, 2008 6:34 pm
Hi,
I have a problem with large torrentfiles.
If i use a torrent with only 3 files, all works perfect.
When i try to open a larger torrentfile with more files, ktorrent crashes....it quits without any message.
If i restart Ktorrent, no file was in the downloadlist.
I use Ktorrent 2.2.5 (same problem with 2.2.6) and KDE 3.5.8 on Gentoo Sparc64.
Here the last debug output from the shell:

Loading file /root/Desktop/SomeBigTorrent.torrent
Encoding : UTF-8
Multi file torrent

Thanks for help
George
Moderator
Posts
5421
Karma
1

Wed Apr 30, 2008 6:16 pm
Have you got a backtrace ?
weyerma
Registered Member
Posts
5
Karma
0

Wed Apr 30, 2008 7:05 pm
no. it only quits...

here is the full log:

Wed Apr 30 20:45:29 2008: Bound to port 50000
Wed Apr 30 20:45:30 2008: DHT: Starting on port 6881
Wed Apr 30 20:45:30 2008: Plugin ktscanfolderplugin version does not match KTorrent version, unloading it.
Wed Apr 30 20:45:30 2008: Plugin ktlogviewerplugin version does not match KTorrent version, unloading it.
Wed Apr 30 20:45:30 2008: Plugin ktupnpplugin version does not match KTorrent version, unloading it.
Wed Apr 30 20:45:30 2008: Plugin ktinfowidgetplugin version does not match KTorrent version, unloading it.
Wed Apr 30 20:45:31 2008: Plugin ktsearchplugin version does not match KTorrent version, unloading it.
Wed Apr 30 20:45:31 2008: Plugin ktwebinterfaceplugin version does not match KTorrent version, unloading it.
Wed Apr 30 20:45:31 2008: Plugin ktschedulerplugin version does not match KTorrent version, unloading it.
Wed Apr 30 20:45:31 2008: Plugin ktipfilterplugin version does not match KTorrent version, unloading it.
Wed Apr 30 20:45:31 2008: IP 0.0.0.0 banned.
Wed Apr 30 20:45:31 2008: Plugin ktrssfeedplugin version does not match KTorrent version, unloading it.
Wed Apr 30 20:45:31 2008: Plugin ktstatsplugin version does not match KTorrent version, unloading it.
Wed Apr 30 20:45:31 2008: Plugin ktpartfileimportplugin version does not match KTorrent version, unloading it.
Wed Apr 30 20:45:32 2008: File limit allready at maximum
Wed Apr 30 20:45:32 2008: Data limit allready at maximum
Wed Apr 30 20:46:13 2008: Loading file /root/Orbital_4_albums_v2.3728186.TPB.torrent
Wed Apr 30 20:46:13 2008: Encoding : UTF-8
Wed Apr 30 20:46:13 2008: Multi file torrent
George
Moderator
Posts
5421
Karma
1

Thu May 01, 2008 9:07 am
I would first make sure that you have a proper installation (all the plugin version mismatches).
weyerma
Registered Member
Posts
5
Karma
0

Fri May 02, 2008 11:24 pm
i reinstalled all:

Sat May 3 01:10:57 2008: Bound to port 50000
Sat May 3 01:10:58 2008: DHT: Starting on port 6881
Sat May 3 01:10:58 2008: Loading plugin Scan Folder
Sat May 3 01:10:59 2008: Loading plugin Log Viewer
Sat May 3 01:10:59 2008: Loading plugin UPnP
Sat May 3 01:11:00 2008: Trying to find UPnP devices on the local network
Sat May 3 01:11:00 2008: Loading plugin Info Widget
Sat May 3 01:11:00 2008: Loading plugin Search
Sat May 3 01:11:01 2008: Loading plugin Web Interface
Sat May 3 01:11:01 2008: WWW Root Directory /usr/kde/3.5/share/apps/ktorrent/www/
Sat May 3 01:11:01 2008: Web server listen on port 8080
Sat May 3 01:11:01 2008: Loading plugin Bandwith Scheduler
Sat May 3 01:11:01 2008: Loading plugin IP Filter
Sat May 3 01:11:01 2008: IP 0.0.0.0 banned.
Sat May 3 01:11:01 2008: Loading plugin RSS Feeds
Sat May 3 01:11:02 2008: Loading plugin Statistics
Sat May 3 01:11:02 2008: Loading plugin Import
Sat May 3 01:11:03 2008: Starting minimized
Sat May 3 01:11:03 2008: File limit allready at maximum
Sat May 3 01:11:03 2008: Data limit allready at maximum
Sat May 3 01:11:31 2008: Trying to find UPnP devices on the local network
Sat May 3 01:11:59 2008: Loading file /root/Orbital_4_albums_v2.3728186.TPB.torrent
Sat May 3 01:12:00 2008: Encoding : UTF-8
Sat May 3 01:12:00 2008: Multi file torrent


same thing...
George
Moderator
Posts
5421
Karma
1

Sun May 04, 2008 10:28 am
Send me that torrent, so I can try it myself.
George
Moderator
Posts
5421
Karma
1

Sun May 04, 2008 5:24 pm
OK, I tried your link and the torrent loads without crashing.

Would it be possible to run ktorrent under gdb ?

gdb /usr/bin/ktorrent

In gdb do :
run --nofork

Wait for the window to show, if it doesn't and the gdb prompt returns, type continue and press enter. Then open the torrent.

Then it should crash, and then type in bt and press enter, and that should hopefully print a good backtrace.
weyerma
Registered Member
Posts
5
Karma
0

Sun May 04, 2008 6:03 pm
ok, here is the output :

Starting program: /usr/kde/3.5/bin/ktorrent --nofork
[Thread debugging using libthread_db enabled]
[New Thread 0xf74f28f0 (LWP 6799)]
kdevelop (core): [virtual void DDockWindow::addWidget(const QString&, QWidget*,
bool)]
kdevelop (core): [virtual void DDockWindow::addWidget(const QString&, QWidget*,
bool)]
kdevelop (core): [virtual void DDockWindow::addWidget(const QString&, QWidget*,
bool)]
kdevelop (core): [virtual void DDockWindow::addWidget(const QString&, QWidget*, bool)]
kdevelop (core): [virtual void DDockWindow::addWidget(const QString&, QWidget*, bool)]
kdevelop (core): [virtual void DDockWindow::addWidget(const QString&, QWidget*, bool)]
kdevelop (core): [virtual void DDockWindow::addWidget(const QString&, QWidget*, bool)]
kdevelop (core): [virtual void DDockWindow::addWidget(const QString&, QWidget*, bool)]
kdevelop (core): [virtual void DDockWindow::addWidget(const QString&, QWidget*, bool)]

Program received signal SIGBUS, Bus error.
[Switching to Thread 0xf74f28f0 (LWP 6799)]
0xf7dfe2dc in bt::SHA1HashGen::processChunk (this=0xff8e3bf4,
chunk=0x5c14d7 "d5:filesld6:lengthi53477e4:pathl24:In_The_Middle_Of_Nowhere1 2:lf_bkgnd.jpge10:path.utf-8l24:In_The_Middle_Of_Nowhere12:lf_bkgnd.jpgeed6:leng thi7679472e4:pathl24:In_The_Middle_Of_Nowhere44:Orbital-The_"...)
at sha1hashgen.cpp:142
142 w[i] = ntohl(*(const Uint32*)(chunk + (4 *i)));
(gdb)
George
Moderator
Posts
5421
Karma
1

Mon May 05, 2008 9:20 am
Interesting, after some googling and finding some similar problems, I think I have found the solution :

libktorrent/util/sha1hashgen.cpp around line 142 :
Code: Select all
                                w[i] = ntohl(*(const Uint32*)(chunk + (4*i)));
                        /*      w[i] = (chunk[4*i] << 24) |
                                                (chunk[4*i + 1] << 16) |
                                                (chunk[4*i + 2] << 8) |
                                                chunk[4*i + 3];
                                */

Change this block of code into :
Code: Select all
       //     w[i] = ntohl(*(const Uint32*)(chunk + (4*i)));
              w[i] = (chunk[4*i] << 24) |
                                                (chunk[4*i + 1] << 16) |
                                                (chunk[4*i + 2] << 8) |
                                                chunk[4*i + 3];
         

Then recompile and it should no longer crash. I don't have a sparc, so I cannot test this.[/code]
weyerma
Registered Member
Posts
5
Karma
0

Mon May 05, 2008 2:50 pm
I make the changes and recompiled.
Now it works with all torrents and don`t crashed anymore.
It seems to be a memory-addressing bug...sparcs are more sensible :-)

Thanks for your nice help!!
George
Moderator
Posts
5421
Karma
1

Mon May 05, 2008 4:09 pm
That is good to here, I will commit the fix.


Bookmarks



Who is online

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