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

[bug] Torrents create all space even when it's disabled

Tags: None
(comma "," separated)
Pi72
Registered Member
Posts
12
Karma
0
Tested on 3.2.4 under Ubuntu 9.10 with KDE 4.3.2.

Excuse me if the option names sound strange, as I use spanish locale.

How to reproduce:
* Ensure that in preferences, you have disabled "reserve space in disc before starting a torrent".
* Add a torrent.
* In the opening torrent window, select "controlled by user" and disable "start torrent".
* You can check where the torrent is saved, that KTorrent only created the folder tree and all files with size of 0 bytes.
* Now start the torrent, if the bug appears it'll take a while.
* Check again the files; KTorrent have reserved all the space for each file (not only for the ones it starts to download).

Now the problem comes: Following those steps makes the bug appear *sometimes*. I've noticed it at least twice (noting that I rarely don't start a torrent when adding it), but don't remember which torrents. I know that fixing a bug that can't be reproduced 100% of the times is not worth trying. Maybe others have observed this behaviour?
George
Moderator
Posts
5421
Karma
1
This is normal behavior, chunk download order is random, so if KT decides to download a chunk near the end of a file, that file will get at least as large as that chunk's position in the file.

Note: just because the file size is shown to be something, it doesn't mean that it actually takes that much space on disk (it's known as sparse files)
Pi72
Registered Member
Posts
12
Karma
0
Ok, first sorry because the steps to reproduce the bug weren't the one I posted. I had a different idea of what triggered the bug, but now after some tests I can always reproduce the bug, which is the first step for fixing it ^_^

Now I can make it happen every time:
How to reproduce:
* Ensure that in preferences, you have disabled "reserve space in disc before starting a torrent".
* Add a torrent with many files.
* Select only one file to download.
* Now go to the file section, and select all files. It will take a long time because it will reserve all the space for each file, even when you told him to not do so.

I had now 30gb torrent and only downloaded 2.4gb of it (by choice, just certain files). Now I checked it to download all of them and it's creating all the space. Not "sparse" space, I know what's that. It's eating the whole 30gb of space of every file from the hard disk as I'm typing this, not downloading just the last chunk of every file by coincidence.

No matter how severe you think it is, this is unintended behaviour, a bug, which might make people lose downloads because they lost all the space without noticing. Also, what you'd think by your settings that will take just a couple of seconds, converts into a long operation and KT doesn't respond until finished.

I don't think it's a hard to find bug, and I hope that you can continue to keep KTorrent as the best client for many of us.
George
Moderator
Posts
5421
Karma
1
I see what the problem is, will fix it.
Pi72
Registered Member
Posts
12
Karma
0
I noticed the real problem because I was moving out some torrents from one HD to another (both sata) and then since I was going to have more space, started this 30gb one. Both operations became slooooooow. I was seeing that KTorrent was making complete (not sparse) 50mb files at a pace of 1-2 per minute. Once I stopped the file transfer, KT finished faster (in about 3-4 minutes) and could continue the transfer. But it was pure chance that I had enough free space, what if the torrent was 150gb and I had only 70gb free as I had?

Well, thanks a lot in advance!


Bookmarks



Who is online

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