#3900 closed Bug (fixed)
Transmission tries to move previously moved data again when an additional file is requested in the file list of a seeding (100% of selected) torrent
Reported by: | x190 | Owned by: | jordan |
---|---|---|---|
Priority: | Normal | Milestone: | 2.20 |
Component: | libtransmission | Version: | 2.13 |
Severity: | Normal | Keywords: | duplicate data moves, mode switching |
Cc: |
Description
When a user has a distinct location set for incomplete files and a torrent (multi-folder/file) reaches 100% of selected files all data is moved to the download location. The bug I am reporting occurs when the torrent I just described is forced to re-enter download mode from seeding mode as the user has just selected another file in the list for download.
At that point, Transmission forgets where the data is located and tries to move all the data again altho it is already in the download location. This causes a hang (beachballing) in the GUI and necessitates an extra click or two before the new selection actually shows up in the GUI (Inspector).
2011-01-13 11:39:09 -0700 torrent.c:3007 [Debug] Transmission: Moving "-" location from currentDir "/Users/-/Movies/Potential_Stuff" to "/Users/-/Movies" 2011-01-13 11:39:09 -0700 torrent.c:3031 [Debug] Transmission: Found file #4: /Users/-/Movies/-/--H-s/-.1of6.avi 2011-01-13 11:39:09 -0700 torrent.c:3037 [Info] -: moving "/Users/-/Movies/-/--H-s/-.1of6.avi" to "/Users/-/Movies/-/--H-s/-.1of6.avi" 2011-01-13 11:39:09 -0700 torrent.c:3031 [Debug] Transmission: Found file #5: /Users/-/Movies/Potential_Stuff/-/--H-s/-.2of6.avi.part 2011-01-13 11:39:09 -0700 torrent.c:3037 [Info] -: moving "/Users/-/Movies/Potential_Stuff/-/--H-s/-.2of6.avi.part" to "/Users/-/Movies/-/--H-s/-.2of6.avi.part" 2011-01-13 11:39:09 -0700 torrent.c:3031 [Debug] Transmission: Found file #10: /Users/-/Movies/-/---/-n.1.of.4.DivX-.avi.part 2011-01-13 11:39:09 -0700 torrent.c:3037 [Info] -: moving "/Users/-/Movies/-/---/-n.1.of.4.DivX-.avi.part" to "/Users/-/Movies/-/---/-n.1.of.4.DivX-.avi.part" 2011-01-13 11:39:09 -0700 torrent.c:3031 [Debug] Transmission: Found file #11: /Users/-/Movies/-/---/-n.2.of.4.DivX-.avi 2011-01-13 11:39:09 -0700 torrent.c:3037 [Info] -: moving "/Users/-/Movies/-/---/-n.2.of.4.DivX-.avi" to "/Users/-/Movies/-/---/-n.2.of.4.DivX-.avi" 2011-01-13 11:39:09 -0700 torrent.c:3031 [Debug] Transmission: Found file #12: /Users/-/Movies/-/---/-n.3.of.4.DivX-.avi.part 2011-01-13 11:39:09 -0700 torrent.c:3037 [Info] -: moving "/Users/-/Movies/-/---/-n.3.of.4.DivX-.avi.part" to "/Users/-/Movies/-/---/-n.3.of.4.DivX-.avi.part" 2011-01-13 11:39:09 -0700 torrent.c:3031 [Debug] Transmission: Found file #15: /Users/-/Movies/-/---/-n.Extra.2.of.3.DivX-.avi 2011-01-13 11:39:09 -0700 torrent.c:3037 [Info] -: moving "/Users/-/Movies/-/---/-n.Extra.2.of.3.DivX-.avi" to "/Users/-/Movies/-/---/-n.Extra.2.of.3.DivX-.avi" And so on for all files...
Attachments (2)
Change History (20)
comment:1 Changed 12 years ago by x190
- Summary changed from Transmission tries to move previously moved data again when an additional file is requested in the file list of a seeding (100% of selected) torrentWhen a user has a distinct location set for incomplete files and a torrent (multi-folder/file) reaches 100% of selected files all data is moved to the download location. The bug I am reporting occurs when the torrent I just described is forced to re-enter download mode from seeding mode as the user has just selected another file in the list for download. At that point, Transmission forgets where the data is located and tries to move all the data again altho it is already in the download location. This causes a hang (beachballing) in the GUI and necessitates an extra click or two before the new selection actually shows up in the GUI (Inspector). to Transmission tries to move previously moved data again when an additional file is requested in the file list of a seeding (100% of selected) torrent
comment:2 Changed 12 years ago by x190
comment:3 Changed 12 years ago by x190
Please see comment:95 in #532.
comment:4 Changed 12 years ago by jordan
Well it looks like what's required here is to not bother trying to move files when they're already there.
2011-01-13 11:39:09 -0700 torrent.c:3037 [Info] -: moving
"/Users/-/Movies/-/--H-s/-.1of6.avi" to
"/Users/-/Movies/-/--H-s/-.1of6.avi"
...they're the same path.
comment:5 Changed 12 years ago by jordan
x190, does this patch solve the problem for you?
Index: libtransmission/torrent.c =================================================================== --- libtransmission/torrent.c (revision 11750) +++ libtransmission/torrent.c (working copy) @@ -2855,7 +2855,7 @@ tr_dbg( "Found file #%d: %s", (int)i, oldpath ); - if( do_move ) + if( do_move && !tr_is_same_file( oldpath, newpath ) ) { tr_bool renamed = FALSE;
comment:6 follow-up: ↓ 7 Changed 12 years ago by x190
Sorry, I haven't tried this patch yet because (a) I was trying to find a solution to #3857, (b) this patch doesn't address the real problem, and (c) the patch from #532 needs (and is ready IMHO) to be checked in. I'll try to explain.
Regarding this ticket, I believe the real issue is that incomplete .part files should always be left in the incomplete directory (if one is set) regardless of the status of the torrent. Of course the path to all files needs to be retained correctly (probably in .resume). So in that sense your patch is only addressing an issue that shouldn't exist in the first place. Nevertheless, I'll try to test it later today to see if it is useful after the fact.
Please note that the patch from #532 appears to handle all this correctly including the verify issue and should entirely eliminate the problem for new torrents.
comment:7 in reply to: ↑ 6 Changed 12 years ago by livings124
Replying to x190:
Regarding this ticket, I believe the real issue is that incomplete .part files should always be left in the incomplete directory (if one is set) regardless of the status of the torrent.
I disagree. Once a transfer is moved, all data should be moved instead of now having a folder with complete data and a folder with just parts. Everything should be moved all at once, as opposed to in pieces.
comment:8 follow-up: ↓ 9 Changed 12 years ago by jordan
I agree with livings wrt moving .part files.
Anyway, if you're saying this ticket is redundant in the wake of #532, should this ticket be closed?
Lastly, as for "the patch from #532 needs (and is ready IMHO) to be checked in," this has already been discussed...
comment:9 in reply to: ↑ 8 Changed 12 years ago by x190
Replying to jordan:
Anyway, if you're saying this ticket is redundant in the wake of #532, should this ticket be closed?
In no way am I saying that. Can you please provide your patch in a working (via patch -p1 < ) and downloadable form? Also can I use 11744 or do I need a specific revision? Thanks!
can't find file to patch at input line 5 Perhaps you used the wrong -p or --strip option? The text leading up to this was:
Changed 12 years ago by jordan
comment:10 follow-up: ↓ 11 Changed 12 years ago by jordan
Attached is a diff for the change in comment:5 :)
Probably any svn revision from the past few days would be fine.
comment:11 in reply to: ↑ 10 Changed 12 years ago by x190
Replying to jordan:
Attached is a diff for the change in comment:5 :)
Probably any svn revision from the past few days would be fine.
Thanks jordan. By all means go ahead and check in setLocation.diff if you want. It's a step in the right direction. :) I'm afraid the code that generates the "Found file" message still insists on checking the destination directory instead of only checking the "currentDir" which in my current example is equivalent to the "Incomplete directory". In this example only one file needed to be moved but indeed the dozens of files for that torrent that had previously been moved generated a lengthy "Found File" debug message.
I have noted similar behavior sans #532 patch which is even more bizarre as nothing at all needed to be moved but something in the code was telling the app. that the just completed file must be in the "Incomplete directory" and therefore in need of moving.
I realize that this is all a bit complicated to understand and would best be tested with/without #532 yourself using a multifolder/file torrent that can reach 100% of selected numerous times. The worst side-effect of all this apparently unnecessary code execution is a GUI hang of a few seconds.
I still fundamentally disagree about the use of "Incomplete" directories. To me their whole raison d’etre is to keep partially completed files separate from viewable, readable, listenable, and yes patchable ones. :)
Sorry about the double attachment---please delete the second one.
Changed 12 years ago by x190
comment:12 Changed 12 years ago by jordan
Here are the contents of Pal_move.rtf:
2011-01-23 19:22:39 -0700 torrent.c:2059 [Info] Mn: State changed from "Incomplete" to "Done" 2011-01-23 19:22:39 -0700 torrent.c:435 [Info] Mn: Seed ratio reached; pausing torrent 2011-01-23 19:22:39 -0700 torrent.c:3043 [Debug] Transmission: Moving "Mn" location from currentDir "/Users/sl/Movies/Potential_Stuff" to "/Users/sl/Movies" 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #1: /Users/sl/Movies/Mn/Mn-H.2.of.4.DivXi.part 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #4: /Users/sl/Movies/Mn/Mn-Hs/B.1of6.avi 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #5: /Users/sl/Movies/Mn/Mn-Hs/B.2of6.avi 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #6: /Users/sl/Movies/Mn/Mn-Hs/B.3of6.avi 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #8: /Users/sl/Movies/Mn/Mn-Hs/B.5of6.avi 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #10: /Users/sl/Movies/Mn/Mn-Sn.1.of.4.DivXi.part 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #11: /Users/sl/Movies/Mn/Mn-Sn.2.of.4.DivXi 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #12: /Users/sl/Movies/Mn/Mn-Sn.3.of.4.DivXi.part 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #15: /Users/sl/Movies/Mn/Mn-Sn.Extra.2.of.3.DivXi 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #17: /Users/sl/Movies/Mn/Mn-an.7.of.7.DivXi.part 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #29: /Users/sl/Movies/Mn/Mn-f.5.of.10.DivXi.part 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #33: /Users/sl/Movies/Potential_Stuff/Mn/Mn-f.9.of.10.DivXi.part 2011-01-23 19:22:39 -0700 torrent.c:3073 [Info] Mn: moving "/Users/sl/Movies/Potential_Stuff/Mn/Mn-f.9.of.10.DivXi.part" to "/Users/sl/Movies/Mn/Mn-f.9.of.10.DivXi.part" 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #38: /Users/sl/Movies/Mn/Mn-p.avi 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #42: /Users/sl/Movies/Mn/Mn-p.avi 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #46: /Users/sl/Movies/Mn/Mn-.avi.part 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #47: /Users/sl/Movies/Mn/Mn-w.avi 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #48: /Users/sl/Movies/Mn/Mn-w.avi 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #50: /Users/sl/Movies/Mn/Mn-w.avi 2011-01-23 19:22:39 -0700 torrent.c:3067 [Debug] Transmission: Found file #51: /Users/sl/Movies/Mn/Mn-.avi 2011-01-23 19:22:39 -0700 torrent.c:435 [Info] Mn: Seed ratio reached; pausing torrent 2011-01-23 19:22:39 -0700 torrent.c:1744 [Info] Mn: Pausing
comment:13 Changed 12 years ago by jordan
comment:14 Changed 12 years ago by x190
comment:15 Changed 12 years ago by jordan
comment:16 Changed 12 years ago by x190
Okay boss, I guess it's time to let you off the hook on this one. :) The initial premise of this ticket appears to have been covered by your setLocation.diff in conjunction with the patch from #532.. When #3357 is addressed that may well help with some of the related issues I raised. If necessary, I will open a new ticket if other issues arise. Thanks!
comment:17 Changed 12 years ago by livings124
- Milestone changed from None Set to 2.20
- Resolution set to fixed
- Status changed from new to closed
comment:18 Changed 12 years ago by jordan
fixed in r11764
Just noticed that this fake moving process is repeated when the torrent again completes to 100% of selected and switches to seeding mode.
If and when any work is done on this ticket please consider how it integrates with ijuxda's pieces patch which should simplify the use of incomplete directories in this case of multiple completions to 100% of selected as unwanted .parts will no longer be a factor.